Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Devops #71

Merged
merged 40 commits into from
Nov 6, 2023
Merged

Devops #71

merged 40 commits into from
Nov 6, 2023

Conversation

slawosz
Copy link
Contributor

@slawosz slawosz commented Sep 20, 2023

DfE CPD standard scripts with 4 environments: review, staging, sandbox and production.

Dockerfile Outdated
Comment on lines 75 to 76
CMD RAILS_ENV=production bundle exec rails db:migrate && \
RAILS_ENV=production bundle exec rails server -b 0.0.0.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
CMD RAILS_ENV=production bundle exec rails db:migrate && \
RAILS_ENV=production bundle exec rails server -b 0.0.0.0
CMD RAILS_ENV=${RAILS_ENV} bundle exec rails db:migrate && \
RAILS_ENV=${RAILS_ENV} bundle exec rails server -b 0.0.0.0

Makefile Outdated Show resolved Hide resolved
@slawosz slawosz force-pushed the devops branch 2 times, most recently from a566ab6 to 8d8524c Compare September 27, 2023 12:56
"cluster": "test",
"namespace": "cpd-development",
"environment": "development",
"deploy_azure_backing_services": false,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We normally use azure backing services for permanent envs. i.e. dev, staging, production. And then set deploy_azure_backing_services to false for review environments only.

terraform/application/application.tf Outdated Show resolved Hide resolved
.github/workflows/aks_deploy.yml Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Makefile Outdated
terraform -chdir=terraform/application init -upgrade -reconfigure \
-backend-config=resource_group_name=${RESOURCE_GROUP_NAME} \
-backend-config=storage_account_name=${STORAGE_ACCOUNT_NAME} \
-backend-config=key=${ENVIRONMENT}_kubernetes.tfstate
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this won't work with review apps. Something like
$(if $(PULL_REQUEST_NUMBER), $(eval KEY_PREFIX=$(PULL_REQUEST_NUMBER)), $(eval KEY_PREFIX=$(ENVIRONMENT)))
then
-backend-config=key=${KEY_PREFIX}_kubernetes.tfstate

@slawosz slawosz force-pushed the devops branch 3 times, most recently from b082d64 to bafe313 Compare September 28, 2023 11:50
@slawosz slawosz force-pushed the devops branch 5 times, most recently from 3f8fe2e to d02632e Compare October 5, 2023 15:47
@slawosz slawosz temporarily deployed to review October 16, 2023 17:21 — with GitHub Actions Inactive
@github-actions
Copy link

Review app deployed to https://cpd-tsh-review-71.test.teacherservices.cloud/

@slawosz slawosz temporarily deployed to review October 17, 2023 13:24 — with GitHub Actions Inactive
@slawosz slawosz temporarily deployed to review October 17, 2023 14:01 — with GitHub Actions Inactive
Makefile Outdated Show resolved Hide resolved
@slawosz slawosz merged commit 1934737 into main Nov 6, 2023
9 checks passed
@slawosz slawosz deleted the devops branch November 6, 2023 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants