Skip to content

Commit

Permalink
catalog-new app for db and solr backup/restore
Browse files Browse the repository at this point in the history
  • Loading branch information
FuhuXia committed Jul 14, 2023
1 parent e4308f9 commit 920761c
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 37 deletions.
6 changes: 5 additions & 1 deletion .profile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,11 @@ function vcap_get_service () {
local path name
name="$1"
path="$2"
service_name=${APP_NAME}-${name}
appname="catalog"
if [ "$name" == "db" ]; then
appname="catalog-new"
fi
service_name=$appname-${name}
echo $VCAP_SERVICES | jq --raw-output --arg service_name "$service_name" ".[][] | select(.name == \$service_name) | $path"
}

Expand Down
44 changes: 22 additions & 22 deletions manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ applications:
- python_buildpack
services:
- ((app_name))-db
- ((app_name))-redis
- ((app_name))-s3
- ((app_name))-secrets
- ((app_name))-solr
- catalog-redis
- catalog-s3
- catalog-secrets
- catalog-solr
- sysadmin-users
routes:
- route: ((route-internal))
Expand All @@ -25,7 +25,7 @@ applications:
CKANEXT__SAML2AUTH__IDP_METADATA__LOCAL_PATH: ((ckanext__saml2auth__idp_metadata__local_path))
CKANEXT__SAML2AUTH__ENTITY_ID: ((ckanext__saml2auth__entity_id))
SAML2_CERTIFICATE: ((saml2_certificate))
NEW_RELIC_APP_NAME: ((app_name))-web-((space_name))
NEW_RELIC_APP_NAME: catalog-web-((space_name))
NEW_RELIC_HOST: gov-collector.newrelic.com
NEW_RELIC_MONITOR_MODE: ((new_relic_monitor_mode))
CKAN_SITE_URL: https://((route-public))
Expand All @@ -36,11 +36,11 @@ applications:
- python_buildpack
services:
- ((app_name))-db
- ((app_name))-redis
- ((app_name))-secrets
- ((app_name))-solr
- ((app_name))-smtp
- ((app_name))-s3
- catalog-redis
- catalog-secrets
- catalog-solr
- catalog-smtp
- catalog-s3
- sysadmin-users
routes:
- route: ((route-internal-admin))
Expand All @@ -55,7 +55,7 @@ applications:
CKANEXT__SAML2AUTH__IDP_METADATA__LOCAL_PATH: ((ckanext__saml2auth__idp_metadata__local_path))
CKANEXT__SAML2AUTH__ENTITY_ID: ((ckanext__saml2auth__entity_id))
SAML2_CERTIFICATE: ((saml2_certificate))
NEW_RELIC_APP_NAME: ((app_name))-admin-((space_name))
NEW_RELIC_APP_NAME: catalog-admin-((space_name))
NEW_RELIC_HOST: gov-collector.newrelic.com
NEW_RELIC_MONITOR_MODE: ((new_relic_monitor_mode))
CKAN_SITE_URL: https://((route-external-admin))
Expand All @@ -64,8 +64,8 @@ applications:
buildpacks:
- https://github.com/cloudfoundry/nginx-buildpack
services:
- ((app_name))-secrets
- ((app_name))-s3
- catalog-secrets
- catalog-s3
path: ./proxy
# TODO: tweak with load testing
memory: 100M
Expand All @@ -85,10 +85,10 @@ applications:
- python_buildpack
services:
- ((app_name))-db
- ((app_name))-redis
- ((app_name))-secrets
- ((app_name))-solr
- ((app_name))-s3
- catalog-redis
- catalog-secrets
- catalog-solr
- catalog-s3
- sysadmin-users
no-route: true
instances: ((gather-instances))
Expand All @@ -101,7 +101,7 @@ applications:
CKANEXT__SAML2AUTH__IDP_METADATA__LOCAL_PATH: ((ckanext__saml2auth__idp_metadata__local_path))
CKANEXT__SAML2AUTH__ENTITY_ID: ((ckanext__saml2auth__entity_id))
SAML2_CERTIFICATE: ((saml2_certificate))
NEW_RELIC_APP_NAME: ((app_name))-gather-((space_name))
NEW_RELIC_APP_NAME: catalog-gather-((space_name))
NEW_RELIC_HOST: gov-collector.newrelic.com
NEW_RELIC_MONITOR_MODE: ((new_relic_monitor_mode))
CKAN_SITE_URL: https://((route-public))
Expand All @@ -112,9 +112,9 @@ applications:
- python_buildpack
services:
- ((app_name))-db
- ((app_name))-redis
- ((app_name))-secrets
- ((app_name))-solr
- catalog-redis
- catalog-secrets
- catalog-solr
- sysadmin-users
no-route: true
instances: ((fetch-instances))
Expand All @@ -126,7 +126,7 @@ applications:
CKANEXT__SAML2AUTH__IDP_METADATA__LOCAL_PATH: ((ckanext__saml2auth__idp_metadata__local_path))
CKANEXT__SAML2AUTH__ENTITY_ID: ((ckanext__saml2auth__entity_id))
SAML2_CERTIFICATE: ((saml2_certificate))
NEW_RELIC_APP_NAME: ((app_name))-fetch-((space_name))
NEW_RELIC_APP_NAME: catalog-fetch-((space_name))
NEW_RELIC_HOST: gov-collector.newrelic.com
NEW_RELIC_MONITOR_MODE: ((new_relic_monitor_mode))
CKAN_SITE_URL: https://((route-public))
14 changes: 7 additions & 7 deletions vars.prod.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This is the name to use for the staging catalog app in Cloud Foundry
app_name: catalog
app_name: catalog-new
space_name: prod

ckanext__saml2auth__entity_id: urn:gov:gsa:SAML:2.0.profiles:sp:sso:gsa:datagov-prod-catalog
Expand All @@ -12,14 +12,14 @@ fetch-instances: 4
memory_quota: 850M
gather_memory_quota: 3G

new_relic_monitor_mode: true
new_relic_monitor_mode: false

# use CDN domain for route-public if available, otherwise use route-external
route-public: catalog.data.gov
route-external: catalog-prod-datagov.app.cloud.gov
route-internal: catalog-prod-datagov.apps.internal
route-external-admin: catalog-prod-admin-datagov.app.cloud.gov
route-internal-admin: catalog-prod-admin-datagov.apps.internal
route-public: catalog-new-prod-datagov.app.cloud.gov
route-external: catalog-new-prod-datagov.app.cloud.gov
route-internal: catalog-new-prod-datagov.apps.internal
route-external-admin: catalog-new-prod-admin-datagov.app.cloud.gov
route-internal-admin: catalog-new-prod-admin-datagov.apps.internal

saml2_certificate: |
-----BEGIN CERTIFICATE-----
Expand Down
14 changes: 7 additions & 7 deletions vars.staging.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This is the name to use for the staging catalog app in Cloud Foundry
app_name: catalog
app_name: catalog-new
space_name: staging

ckanext__saml2auth__entity_id: urn:gov:gsa:SAML:2.0.profiles:sp:sso:gsa:datagov-stage-catalog
Expand All @@ -12,14 +12,14 @@ fetch-instances: 0
memory_quota: 850M
gather_memory_quota: 3G

new_relic_monitor_mode: true
new_relic_monitor_mode: false

# use CDN domain for route-public if available, otherwise use route-external
route-public: catalog-stage.data.gov
route-external: catalog-stage-datagov.app.cloud.gov
route-internal: catalog-stage-datagov.apps.internal
route-external-admin: catalog-stage-admin-datagov.app.cloud.gov
route-internal-admin: catalog-stage-admin-datagov.apps.internal
route-public: catalog-new-stage-datagov.app.cloud.gov
route-external: catalog-new-stage-datagov.app.cloud.gov
route-internal: catalog-new-stage-datagov.apps.internal
route-external-admin: catalog-new-stage-admin-datagov.app.cloud.gov
route-internal-admin: catalog-new-stage-admin-datagov.apps.internal

saml2_certificate: |
-----BEGIN CERTIFICATE-----
Expand Down

0 comments on commit 920761c

Please sign in to comment.