From 8651b145de206a561cfead2c4efb59c70c01993c Mon Sep 17 00:00:00 2001 From: Michael Olund Date: Thu, 29 Oct 2020 14:50:32 -0700 Subject: [PATCH] DIV-1210 - Removed all references to Minishift --- edivorce/apps/core/context_processors.py | 2 +- edivorce/apps/core/utils/efiling_submission.py | 3 +-- edivorce/apps/core/views/main.py | 4 ++-- edivorce/apps/core/views/system.py | 2 +- edivorce/settings/base.py | 4 ++-- edivorce/settings/openshift.py | 18 ------------------ edivorce/urls.py | 4 ++-- openshift/README.md | 2 ++ .../edivorce-django-deploy.yaml | 2 +- 9 files changed, 12 insertions(+), 29 deletions(-) diff --git a/edivorce/apps/core/context_processors.py b/edivorce/apps/core/context_processors.py index 634bda63..f3fbeeda 100644 --- a/edivorce/apps/core/context_processors.py +++ b/edivorce/apps/core/context_processors.py @@ -7,5 +7,5 @@ def settings_processor(request): 'gtm_id': settings.GTM_ID, 'proxy_root_path': settings.FORCE_SCRIPT_NAME, 'deployment_environment': settings.ENVIRONMENT, - 'show_debug': settings.ENVIRONMENT in ['localdev', 'dev', 'test', 'minishift'] + 'show_debug': settings.ENVIRONMENT in ['localdev', 'dev', 'test'] } diff --git a/edivorce/apps/core/utils/efiling_submission.py b/edivorce/apps/core/utils/efiling_submission.py index 504694dc..8841ae65 100644 --- a/edivorce/apps/core/utils/efiling_submission.py +++ b/edivorce/apps/core/utils/efiling_submission.py @@ -118,8 +118,7 @@ class EFilingSubmission: def _get_bceid(self, request): def _get_raw_bceid(request): - is_localdev = settings.DEPLOYMENT_TYPE in ['localdev', 'minishift'] - if is_localdev: + if settings.DEPLOYMENT_TYPE == 'localdev': # to integrate with the Test eFiling Hub, we need a valid BCEID which is # unavailable for a local eDivorce environment. Use an env specified mapping # to figure out what we should pass through to eFiling Hub. This BCEID username diff --git a/edivorce/apps/core/views/main.py b/edivorce/apps/core/views/main.py index 1b279a4d..04042efa 100644 --- a/edivorce/apps/core/views/main.py +++ b/edivorce/apps/core/views/main.py @@ -93,7 +93,7 @@ def register(request): """ Sets a session variable and redirects users to register for BCeID """ - if settings.DEPLOYMENT_TYPE in ['localdev', 'minishift']: + if settings.DEPLOYMENT_TYPE == 'localdev': return render(request, 'localdev/register.html') request.session['went_to_register'] = True @@ -104,7 +104,7 @@ def register_sc(request): """ Sets a session variable and redirects users to register for BC Services Card """ - if settings.DEPLOYMENT_TYPE in ['localdev', 'minishift']: + if settings.DEPLOYMENT_TYPE == 'localdev': return render(request, 'localdev/register.html') request.session['went_to_register'] = True diff --git a/edivorce/apps/core/views/system.py b/edivorce/apps/core/views/system.py index 768f1400..6261af1c 100644 --- a/edivorce/apps/core/views/system.py +++ b/edivorce/apps/core/views/system.py @@ -17,7 +17,7 @@ def current(request): """ Debug tool usable in dev and test environments, available at /current """ - if settings.ENVIRONMENT not in ['localdev', 'dev', 'test', 'minishift']: + if settings.ENVIRONMENT not in ['localdev', 'dev', 'test']: raise Http404() if request.GET.get('reset', False): diff --git a/edivorce/settings/base.py b/edivorce/settings/base.py index b353a8e8..6405b18e 100644 --- a/edivorce/settings/base.py +++ b/edivorce/settings/base.py @@ -59,7 +59,7 @@ INSTALLED_APPS = ( ) # add the POC app only if applicable -if ENVIRONMENT in ['localdev', 'dev', 'test', 'minishift']: +if ENVIRONMENT in ['localdev', 'dev', 'test']: INSTALLED_APPS += ( 'edivorce.apps.poc', ) @@ -174,7 +174,7 @@ GTM_ID = 'GTM-NJLR7LT' def show_toolbar(request): - return ENVIRONMENT in ['localdev', 'dev', 'minishift'] + return ENVIRONMENT in ['localdev', 'dev'] DEBUG_TOOLBAR_CONFIG = { diff --git a/edivorce/settings/openshift.py b/edivorce/settings/openshift.py index d84a2125..e796a2c6 100644 --- a/edivorce/settings/openshift.py +++ b/edivorce/settings/openshift.py @@ -95,19 +95,6 @@ if DEPLOYMENT_TYPE == 'prod': # Google Tag Manager (Production) GTM_ID = 'GTM-W4Z2SPS' -if DEPLOYMENT_TYPE == 'minishift': - DEBUG = True - REGISTER_BCEID_URL = '#' - REGISTER_BCSC_URL = '#' - PROXY_BASE_URL = '' - # Keycloak OpenID Connect settings - OIDC_OP_JWKS_ENDPOINT = 'http://localhost:8081/auth/realms/justice/protocol/openid-connect/certs' - OIDC_OP_AUTHORIZATION_ENDPOINT = 'http://localhost:8081/auth/realms/justice/protocol/openid-connect/auth' - OIDC_OP_TOKEN_ENDPOINT = 'http://localhost:8081/auth/realms/justice/protocol/openid-connect/token' - OIDC_OP_USER_ENDPOINT = 'http://localhost:8081/auth/realms/justice/protocol/openid-connect/userinfo' - KEYCLOAK_LOGOUT = 'http://localhost:8081/auth/realms/justice/protocol/openid-connect/logout' - OIDC_RP_CLIENT_ID = 'edivorce-app' - # Internal Relative Urls FORCE_SCRIPT_NAME = PROXY_URL_PREFIX + '/' STATIC_URL = PROXY_URL_PREFIX + '/static/' @@ -125,11 +112,6 @@ BASICAUTH_PASSWORD = os.getenv('BASICAUTH_PASSWORD', '') # Lock down the session cookie settings SESSION_EXPIRE_AT_BROWSER_CLOSE = True -if DEPLOYMENT_TYPE != 'minishift': - SESSION_COOKIE_PATH = PROXY_URL_PREFIX - SESSION_COOKIE_SECURE = True - CSRF_COOKIE_SECURE = True - # CLAMAV settings CLAMAV_ENABLED = True CLAMAV_TCP_PORT = 3310 diff --git a/edivorce/urls.py b/edivorce/urls.py index b0e8ee6a..01ead84f 100644 --- a/edivorce/urls.py +++ b/edivorce/urls.py @@ -9,7 +9,7 @@ from .apps.core.views.graphql import PrivateGraphQLView, graphql_schema urlpatterns = [] -if settings.ENVIRONMENT in ['localdev', 'dev', 'test', 'minishift']: +if settings.ENVIRONMENT in ['localdev', 'dev', 'test']: import debug_toolbar urlpatterns.append(url(r'^__debug__/', include(debug_toolbar.urls)),) urlpatterns.append(url(r'^poc/', include('edivorce.apps.poc.urls'))) @@ -17,7 +17,7 @@ if settings.ENVIRONMENT in ['localdev', 'dev', 'test', 'minishift']: else: urlpatterns.append(path('api/graphql/', csrf_exempt(PrivateGraphQLView.as_view(graphiql=False, schema=graphql_schema)), name='graphql')) -if settings.ENVIRONMENT in ['localdev', 'minishift']: +if settings.ENVIRONMENT == 'localdev': urlpatterns.append(url(r'^admin/', admin.site.urls)) urlpatterns.append(url(r'^404/$', main.page_not_found, {'exception': Exception()})) urlpatterns.append(url(r'^500/$', main.server_error)) diff --git a/openshift/README.md b/openshift/README.md index d7aa0a9f..16417001 100644 --- a/openshift/README.md +++ b/openshift/README.md @@ -29,6 +29,8 @@ Some useful commands to help you determine your current context: ## Setting up a local OpenShift environment +NOTE: THIS DOCUMENTATION HAS NOT BEEN UPDATED SINCE E-FILING WAS IMPLEMENTED. ADDITIONAL DEPENDENCIES LIKE CLAMAV, REDIS, KEYCLOAK, AND THE E-FILING HUB HAVE WERE ADDDED IN THIS RELEASE. + If you are NOT setting up a local OpenShift environment you can skip over this section, otherwise read on. Setting up a local OpenShift environment is not much different than setting up a hosted environment, there are just a few extra steps and then you can follow the same instructions in either case. diff --git a/openshift/templates/edivorce-django/edivorce-django-deploy.yaml b/openshift/templates/edivorce-django/edivorce-django-deploy.yaml index 642a1899..c23b52c4 100644 --- a/openshift/templates/edivorce-django/edivorce-django-deploy.yaml +++ b/openshift/templates/edivorce-django/edivorce-django-deploy.yaml @@ -173,7 +173,7 @@ parameters: value: jag-csb-edivorce-tools - name: TAG_NAME displayName: Environment TAG name - description: The TAG name for this environment, e.g., dev, test, prod, or minishift. + description: The TAG name for this environment, e.g., dev, test, or prod. required: true value: dev - name: PROXY_URL_PREFIX