From 943b3a66f48fc400f08600129fcc0ecbe26f7067 Mon Sep 17 00:00:00 2001 From: nospame Date: Wed, 14 Aug 2024 14:38:16 -0700 Subject: [PATCH 1/6] remove india j2me references --- environments/india/proxy.yml | 1 - environments/india/public.yml | 2 -- 2 files changed, 3 deletions(-) diff --git a/environments/india/proxy.yml b/environments/india/proxy.yml index 1f91dd7422..a2c284c091 100644 --- a/environments/india/proxy.yml +++ b/environments/india/proxy.yml @@ -1,7 +1,6 @@ fake_ssl_cert: yes SITE_HOST: 'india.commcarehq.org' CAS_SITE_HOST: 'cas.commcarehq.org' -J2ME_SITE_HOST: 'j2me-india.commcarehq.org' tableau_server: 'tableau2.internal.commcarehq.org' TABLEAU_HOST: 'icds.commcarehq.org' primary_ssl_env: "india" diff --git a/environments/india/public.yml b/environments/india/public.yml index 423a7f2977..0527beedbf 100644 --- a/environments/india/public.yml +++ b/environments/india/public.yml @@ -114,7 +114,6 @@ TWO_FACTOR_GATEWAY_ENABLED: True localsettings: ALLOWED_HOSTS: - "{{ CAS_SITE_HOST }}" - - "{{ J2ME_SITE_HOST }}" ALLOW_MAKE_SUPERUSER_COMMAND: False ASYNC_INDICATORS_TO_QUEUE: 30000 AUDIT_ALL_VIEWS: True @@ -172,7 +171,6 @@ localsettings: 'website': "http://www.dimagi.com" INVOICE_PREFIX: India- INVOICE_STARTING_NUMBER: 5000 - J2ME_ADDRESS: "{{ J2ME_SITE_HOST }}" LOCAL_CUSTOM_DB_ROUTING: auditcare: auditcare repeaters: repeaters From 1b097df0d4ab9c682cb3b086ba1ad02c3e61026b Mon Sep 17 00:00:00 2001 From: nospame Date: Wed, 14 Aug 2024 14:41:45 -0700 Subject: [PATCH 2/6] remove staging j2me references --- environments/staging/proxy.yml | 1 - environments/staging/public.yml | 2 -- 2 files changed, 3 deletions(-) diff --git a/environments/staging/proxy.yml b/environments/staging/proxy.yml index 3ad0ff18f9..35574ea270 100644 --- a/environments/staging/proxy.yml +++ b/environments/staging/proxy.yml @@ -1,6 +1,5 @@ fake_ssl_cert: yes SITE_HOST: 'staging.commcarehq.org' -J2ME_SITE_HOST: 'j2mestaging.commcarehq.org' primary_ssl_env: "staging" nginx_hsts_max_age: 31536000 # 1 year diff --git a/environments/staging/public.yml b/environments/staging/public.yml index e6d161d7a2..cf89fbabc4 100644 --- a/environments/staging/public.yml +++ b/environments/staging/public.yml @@ -116,7 +116,6 @@ s3_blob_db_s3_bucket: 'dimagi-commcare-staging-blobdb' localsettings: ALLOWED_HOSTS: - - j2mestaging.commcarehq.org - testserver ALLOW_MAKE_SUPERUSER_COMMAND: False ANALYTICS_DEBUG: True @@ -155,7 +154,6 @@ localsettings: 'website': "http://www.dimagi.com" INVOICE_PREFIX: INC- INVOICE_STARTING_NUMBER: 5000 - J2ME_ADDRESS: "{{ J2ME_SITE_HOST }}" LOCAL_CUSTOM_DB_ROUTING: auditcare: auditcare repeaters: repeaters From 5e86fc911276dd8a02276590c2f02fa35a62fd71 Mon Sep 17 00:00:00 2001 From: nospame Date: Wed, 14 Aug 2024 14:42:33 -0700 Subject: [PATCH 3/6] remove production j2me references --- environments/production/proxy.yml | 1 - environments/production/public.yml | 2 -- 2 files changed, 3 deletions(-) diff --git a/environments/production/proxy.yml b/environments/production/proxy.yml index 601b582940..714ceb0ee7 100644 --- a/environments/production/proxy.yml +++ b/environments/production/proxy.yml @@ -1,7 +1,6 @@ fake_ssl_cert: yes SITE_HOST: 'www.commcarehq.org' NO_WWW_SITE_HOST: 'commcarehq.org' -J2ME_SITE_HOST: 'j2mewww.commcarehq.org' # This sets production_commcare as the default endpoint for ssl connections primary_ssl_env: "production" trusted_proxies: diff --git a/environments/production/public.yml b/environments/production/public.yml index 60a91fa9ec..8f1c7ec421 100644 --- a/environments/production/public.yml +++ b/environments/production/public.yml @@ -138,7 +138,6 @@ localsettings: ALLOWED_HOSTS: - testserver - proxytest.commcarehq.org - - "{{ J2ME_SITE_HOST }}" ALLOW_MAKE_SUPERUSER_COMMAND: False ANALYTICS_DEBUG: False ANALYTICS_LOG_LEVEL: "warning" @@ -213,7 +212,6 @@ localsettings: 'website': "http://www.dimagi.com" INVOICE_PREFIX: INC- INVOICE_STARTING_NUMBER: 5000 - J2ME_ADDRESS: "{{ J2ME_SITE_HOST }}" LOCAL_CUSTOM_DB_ROUTING: auditcare: auditcare repeaters: repeaters From 1cfc3b49875d98e866f2cfc27d4650bdd9d81a35 Mon Sep 17 00:00:00 2001 From: nospame Date: Wed, 14 Aug 2024 14:53:18 -0700 Subject: [PATCH 4/6] remove J2ME_ADDRESS --- .tests/environments/testenv/public.yml | 1 - commcare-cloud-bootstrap/environment/public.yml | 1 - environments/64-test/public.yml | 1 - environments/backup-production/public.yml | 1 - environments/development/public.yml | 1 - environments/enikshay-reference/public.yml | 1 - environments/pna/public.yml | 1 - environments/swiss/public.yml | 1 - quick_monolith_install/sample-environment/public.yml.j2 | 1 - .../ansible/roles/commcarehq/templates/localsettings.py.j2 | 4 ---- 10 files changed, 13 deletions(-) diff --git a/.tests/environments/testenv/public.yml b/.tests/environments/testenv/public.yml index 30de50e171..98b08fc9e6 100644 --- a/.tests/environments/testenv/public.yml +++ b/.tests/environments/testenv/public.yml @@ -77,7 +77,6 @@ localsettings: EMAIL_USE_TLS: no FULLSTORY_ID: HQ_INSTANCE: 'dev' - J2ME_ADDRESS: '' LOCAL_PILLOWS: custom: - name: 'kafka-ucr-main-custom-1' diff --git a/commcare-cloud-bootstrap/environment/public.yml b/commcare-cloud-bootstrap/environment/public.yml index 7bb479613f..9b0bdd15b2 100644 --- a/commcare-cloud-bootstrap/environment/public.yml +++ b/commcare-cloud-bootstrap/environment/public.yml @@ -65,7 +65,6 @@ localsettings: EMAIL_USE_TLS: no FULLSTORY_ID: HQ_INSTANCE: 'dev' - J2ME_ADDRESS: '' REDIS_DB: '0' REDIS_HOST: "{{ groups.redis.0 }}" REDIS_PORT: '6379' diff --git a/environments/64-test/public.yml b/environments/64-test/public.yml index b8f5d61a46..130ab29aea 100644 --- a/environments/64-test/public.yml +++ b/environments/64-test/public.yml @@ -61,7 +61,6 @@ localsettings: EMAIL_USE_TLS: yes FULLSTORY_ID: HQ_INSTANCE: 'dev' - J2ME_ADDRESS: '' REDIS_DB: '0' REDIS_HOST: "{{ groups.redis.0 }}" REDIS_PORT: '6379' diff --git a/environments/backup-production/public.yml b/environments/backup-production/public.yml index 6f4d29ce96..45fdd2076f 100644 --- a/environments/backup-production/public.yml +++ b/environments/backup-production/public.yml @@ -189,7 +189,6 @@ localsettings: 'website': "http://www.dimagi.com" INVOICE_PREFIX: INC- INVOICE_STARTING_NUMBER: 5000 - J2ME_ADDRESS: "" LOCAL_CUSTOM_DB_ROUTING: auditcare: auditcare repeaters: repeaters diff --git a/environments/development/public.yml b/environments/development/public.yml index 4bb12f66b1..989266ab89 100644 --- a/environments/development/public.yml +++ b/environments/development/public.yml @@ -80,7 +80,6 @@ localsettings: # INVOICE_FROM_ADDRESS: # INVOICE_PREFIX: # INVOICE_STARTING_NUMBER: - J2ME_ADDRESS: '' # MEDIA_ROOT: # PILLOWTOP_MACHINE_ID: REDIS_DB: '0' diff --git a/environments/enikshay-reference/public.yml b/environments/enikshay-reference/public.yml index 6e5c3ffeff..d4a113fe4a 100644 --- a/environments/enikshay-reference/public.yml +++ b/environments/enikshay-reference/public.yml @@ -65,7 +65,6 @@ localsettings: EMAIL_USE_TLS: no FULLSTORY_ID: HQ_INSTANCE: 'dev' - J2ME_ADDRESS: '' REDIS_DB: '0' REDIS_HOST: "{{ groups.redis.0 }}" REDIS_PORT: '6379' diff --git a/environments/pna/public.yml b/environments/pna/public.yml index 57704b3dd7..126ecfa1ac 100644 --- a/environments/pna/public.yml +++ b/environments/pna/public.yml @@ -108,7 +108,6 @@ localsettings: 'website': "http://www.dimagi.com" INVOICE_PREFIX: INC- INVOICE_STARTING_NUMBER: 5000 - J2ME_ADDRESS: '' # KAFKA_HOST: # PILLOWTOP_MACHINE_ID: REDIS_DB: '0' diff --git a/environments/swiss/public.yml b/environments/swiss/public.yml index dac084fa41..baac51d754 100644 --- a/environments/swiss/public.yml +++ b/environments/swiss/public.yml @@ -161,7 +161,6 @@ localsettings: 'website': "http://www.dimagi.com" INVOICE_PREFIX: INC- INVOICE_STARTING_NUMBER: 5000 - J2ME_ADDRESS: '' # KAFKA_HOST: # PILLOWTOP_MACHINE_ID: LOCAL_MIDDLEWARE: diff --git a/quick_monolith_install/sample-environment/public.yml.j2 b/quick_monolith_install/sample-environment/public.yml.j2 index 74dde7767a..1fce1c76f8 100644 --- a/quick_monolith_install/sample-environment/public.yml.j2 +++ b/quick_monolith_install/sample-environment/public.yml.j2 @@ -103,7 +103,6 @@ localsettings: 'website': "http://www.dimagi.com" INVOICE_PREFIX: INC- INVOICE_STARTING_NUMBER: 5000 - J2ME_ADDRESS: '' PILLOW_RETRY_QUEUE_ENABLED: True REDIS_DB: '0' REDIS_HOST: "localhost" diff --git a/src/commcare_cloud/ansible/roles/commcarehq/templates/localsettings.py.j2 b/src/commcare_cloud/ansible/roles/commcarehq/templates/localsettings.py.j2 index b02e8d6456..ba1c66cbc0 100644 --- a/src/commcare_cloud/ansible/roles/commcarehq/templates/localsettings.py.j2 +++ b/src/commcare_cloud/ansible/roles/commcarehq/templates/localsettings.py.j2 @@ -708,10 +708,6 @@ INACTIVITY_TIMEOUT = {{ localsettings.INACTIVITY_TIMEOUT }} # See corehq/apps/builds/README.md for more information. BASE_ADDRESS = '{{ SITE_HOST }}' -{% if localsettings.get('J2ME_ADDRESS') %} -J2ME_ADDRESS = '{{ localsettings.J2ME_ADDRESS }}' -{% endif %} - EMAIL_USE_TLS = {{ localsettings.EMAIL_USE_TLS }} BANK_ROUTING_NUMBER_ACH = '{{ BANK_ROUTING_NUMBER_ACH }}' From 4b78af30efd3e5c4b9a935e94748c1044ecbcbe4 Mon Sep 17 00:00:00 2001 From: nospame Date: Wed, 14 Aug 2024 14:54:53 -0700 Subject: [PATCH 5/6] remove cchq_http_j2me and remaining J2ME_SITE_HOST refs --- src/commcare_cloud/ansible/deploy_proxy.yml | 12 ------ .../ansible/roles/nginx/defaults/main.yml | 1 - .../roles/nginx/vars/cchq_http_j2me.yml | 41 ------------------- .../environment/schemas/proxy.py | 1 - 4 files changed, 55 deletions(-) delete mode 100644 src/commcare_cloud/ansible/roles/nginx/vars/cchq_http_j2me.yml diff --git a/src/commcare_cloud/ansible/deploy_proxy.yml b/src/commcare_cloud/ansible/deploy_proxy.yml index 4a75f5916e..ab5e44ff3f 100644 --- a/src/commcare_cloud/ansible/deploy_proxy.yml +++ b/src/commcare_cloud/ansible/deploy_proxy.yml @@ -56,18 +56,6 @@ loop_var: site_config tags: nginx_sites - - name: install j2me http site - include_role: - name: {name: nginx, tags: nginx_sites} - tasks_from: set_site_present - vars: - site_present: "{{ J2ME_SITE_HOST|default(None) is not none }}" - with_items: - - {name: cchq_http_j2me, vars_file: cchq_http_j2me} - loop_control: - loop_var: site_config - tags: nginx_sites - - name: install other sites include_role: name: {name: nginx, tags: nginx_sites} diff --git a/src/commcare_cloud/ansible/roles/nginx/defaults/main.yml b/src/commcare_cloud/ansible/roles/nginx/defaults/main.yml index c6d4623601..eae75f864c 100644 --- a/src/commcare_cloud/ansible/roles/nginx/defaults/main.yml +++ b/src/commcare_cloud/ansible/roles/nginx/defaults/main.yml @@ -1,4 +1,3 @@ -J2ME_SITE_HOST: null NO_WWW_SITE_HOST: null TABLEAU_HOST: null tableau_server: null diff --git a/src/commcare_cloud/ansible/roles/nginx/vars/cchq_http_j2me.yml b/src/commcare_cloud/ansible/roles/nginx/vars/cchq_http_j2me.yml deleted file mode 100644 index 0695886a0c..0000000000 --- a/src/commcare_cloud/ansible/roles/nginx/vars/cchq_http_j2me.yml +++ /dev/null @@ -1,41 +0,0 @@ ---- -nginx_sites: -- server: - balancers: - - name: "{{ deploy_env }}_commcare_j2me" - hosts: webworkers - port: "{{ django_port }}" - file_name: "{{ deploy_env }}_commcare_j2me" - listen: "80" - server_name: "{{ J2ME_SITE_HOST }}" - client_max_body_size: 100m - proxy_set_headers: - - "Host $host" - - "X-Forwarded-For $remote_addr" - - "X-Forwarded-Protocol $scheme" - access_log: "{{ log_home }}/{{ deploy_env }}-j2me-timing.log timing" - locations: - - name: "~* /a/[^/]+/phone/keys/" - balancer: "{{ deploy_env }}_commcare_j2me" - proxy_next_upstream_tries: 1 - proxy_read_timeout: 900s - - name: "~* /a/[^/]+/receiver/" - balancer: "{{ deploy_env }}_commcare_j2me" - proxy_next_upstream_tries: 1 - proxy_read_timeout: 900s - - name: "~* /a/[^/]+/phone/restore/" - balancer: "{{ deploy_env }}_commcare_j2me" - proxy_next_upstream_tries: 1 - proxy_read_timeout: 900s - - name: "~* /a/[^/]+/apps/download/[a-z0-9]+/(profile|suite).xml" - balancer: "{{ deploy_env }}_commcare_j2me" - proxy_next_upstream_tries: 1 - proxy_read_timeout: 900s - - name: "~* /a/[^/]+/apps/download/[a-z0-9]+/modules-[0-9]+/forms-[0-9]+.xml" - balancer: "{{ deploy_env }}_commcare_j2me" - proxy_next_upstream_tries: 1 - proxy_read_timeout: 900s - - name: "~* /a/[^/]+/apps/download/[^/]+/[^/]+/app_strings.txt" - balancer: "{{ deploy_env }}_commcare_j2me" - proxy_next_upstream_tries: 1 - proxy_read_timeout: 900s diff --git a/src/commcare_cloud/environment/schemas/proxy.py b/src/commcare_cloud/environment/schemas/proxy.py index 42813216b6..e2541b3ad0 100644 --- a/src/commcare_cloud/environment/schemas/proxy.py +++ b/src/commcare_cloud/environment/schemas/proxy.py @@ -8,7 +8,6 @@ class ProxyConfig(jsonobject.JsonObject): SITE_HOST = jsonobject.StringProperty(required=True) NO_WWW_SITE_HOST = jsonobject.StringProperty() - J2ME_SITE_HOST = jsonobject.StringProperty() nginx_combined_cert_value = jsonobject.StringProperty() nginx_key_value = jsonobject.StringProperty() nginx_hsts_max_age = jsonobject.IntegerProperty() From bbfcbdb126a49dc690709e963db667c7e7469f00 Mon Sep 17 00:00:00 2001 From: nospame Date: Thu, 15 Aug 2024 08:56:15 -0700 Subject: [PATCH 6/6] linter --- src/commcare_cloud/environment/schemas/proxy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commcare_cloud/environment/schemas/proxy.py b/src/commcare_cloud/environment/schemas/proxy.py index e2541b3ad0..505aef0e8b 100644 --- a/src/commcare_cloud/environment/schemas/proxy.py +++ b/src/commcare_cloud/environment/schemas/proxy.py @@ -22,7 +22,7 @@ class ProxyConfig(jsonobject.JsonObject): trusted_proxies = jsonobject.ListProperty(str) special_sites = jsonobject.ListProperty(str) - + extra_sites = jsonobject.ListProperty(str) nginx_block_ips = jsonobject.ListProperty(str)