Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ summary:
@echo "zero-deployable-backend:"
@echo "- Repository URL: ${REPOSITORY}"
@echo "- Deployment Pipeline URL: https://app.circleci.com/pipelines/github/${GITHUB_ORG}/${GITHUB_REPO}"
@echo $(shell echo ${ENVIRONMENT} | grep production > /dev/null && echo "- Production API: ${productionBackendSubdomain}${productionHostRoot}")
@echo $(shell echo ${ENVIRONMENT} | grep staging > /dev/null && echo "- Staging API: ${stagingBackendSubdomain}${stagingHostRoot}")
@echo $(shell echo ${ENVIRONMENT} | grep prod > /dev/null && echo "- Production API: ${productionBackendSubdomain}${productionHostRoot}")
@echo $(shell echo ${ENVIRONMENT} | grep stage > /dev/null && echo "- Staging API: ${stagingBackendSubdomain}${stagingHostRoot}")
8 changes: 4 additions & 4 deletions templates/.circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -262,9 +262,9 @@ workflows:
name: deploy_staging
account-id: "<% index .Params `accountId` %>"
repo: "<% .Name %>"
cluster-name: "<% .Name %>-staging-<% index .Params `region` %>"
cluster-name: "<% .Name %>-stage-<% index .Params `region` %>"
config-environment: "staging"
cluster-authentication-role-arn: "arn:aws:iam::<% index .Params `accountId` %>:role/<% .Name %>-kubernetes-admin-staging"
cluster-authentication-role-arn: "arn:aws:iam::<% index .Params `accountId` %>:role/<% .Name %>-kubernetes-admin-stage"
region: "<% index .Params `region` %>"
namespace: "<% .Name %>"
tag: "${VERSION_TAG}"
Expand All @@ -285,9 +285,9 @@ workflows:
name: deploy_production
account-id: "<% index .Params `accountId` %>"
repo: "<% .Name %>"
cluster-name: "<% .Name %>-production-<% index .Params `region` %>"
cluster-name: "<% .Name %>-prod-<% index .Params `region` %>"
config-environment: "production"
cluster-authentication-role-arn: "arn:aws:iam::<% index .Params `accountId` %>:role/<% .Name %>-kubernetes-admin-production"
cluster-authentication-role-arn: "arn:aws:iam::<% index .Params `accountId` %>:role/<% .Name %>-kubernetes-admin-prod"
region: "<% index .Params `region` %>"
namespace: "<% .Name %>"
tag: "${VERSION_TAG}"
Expand Down
2 changes: 1 addition & 1 deletion templates/kubernetes/overlays/production/kustomization.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ configMapGenerator:
behavior: merge
literals:
- DATABASE_HOST=<% index .Params `productionDatabaseHostname` %>
- DATABASE_NAME=<% .Name %>_production
- DATABASE_NAME=<% .Name %>_prod
- ENVIRONMENT=production
2 changes: 1 addition & 1 deletion templates/kubernetes/overlays/staging/kustomization.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ configMapGenerator:
behavior: merge
literals:
- DATABASE_HOST=<% index .Params `stagingDatabaseHostname` %>
- DATABASE_NAME=<% .Name %>-staging
- DATABASE_NAME=<% .Name %>-stage
- ENVIRONMENT=staging
24 changes: 24 additions & 0 deletions zero-module.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,44 @@ parameters:
- "us-east-2"
- field: productionHostRoot
label: Production Root Host Name (e.g. mydomain.com) - this must be the root of the chosen domain, not a subdomain.
fieldValidation:
type: regex
value: '^([a-z0-9]+(-[a-z0-9]+)*\.{1})+[a-z]{2,}$'
errorMessage: Invalid root domain name
- field: productionFrontendSubdomain
label: Production Frontend Host Name (e.g. app.)
default: app.
fieldValidation:
type: regex
value: '^([a-z0-9]+(-[a-z0-9]+)*\.)$'
errorMessage: Invalid subdomain (cannot contain special chars & must end with a '.')
- field: productionBackendSubdomain
label: Production Backend Host Name (e.g. api.)
default: api.
fieldValidation:
type: regex
value: '^([a-z0-9]+(-[a-z0-9]+)*\.)$'
errorMessage: Invalid subdomain (cannot contain special chars & must end with a '.')
- field: stagingHostRoot
label: Staging Root Host Name (e.g. mydomain-staging.com) - this must be the root of the chosen domain, not a subdomain.
fieldValidation:
type: regex
value: '^([a-z0-9]+(-[a-z0-9]+)*\.{1})+[a-z]{2,}$'
errorMessage: Invalid root domain name
- field: stagingFrontendSubdomain
label: Staging Frontend Host Name (e.g. app.)
default: app.
fieldValidation:
type: regex
value: '^([a-z0-9]+(-[a-z0-9]+)*\.)$'
errorMessage: Invalid subdomain (cannot contain special chars & must end with a '.')
- field: stagingBackendSubdomain
label: Staging Backend Host Name (e.g. api.)
default: api.
fieldValidation:
type: regex
value: '^([a-z0-9]+(-[a-z0-9]+)*\.)$'
errorMessage: Invalid subdomain (cannot contain special chars & must end with a '.')
- field: accountId
label: AWS Account ID
execute: aws sts get-caller-identity --query "Account" | tr -d '"'
Expand Down