DFE-Digital / ecf2

This application will replace the Manage training for early career teachers service in 2025.
5 stars 0 forks source link

Environments and deployment pipelines #7

Closed peteryates closed 3 days ago

peteryates commented 2 months ago

ECF2 will follow the continuous delivery model set out in DfE's technical guidance, we will follow the pattern established in ECF1 and the applications deployed on DfE's Azure space and follow the established conventions.

image

Environments

We will need the following environments, both in Azure and Rails. The names should match, so review apps run with the review Rails environment.

Test subscription (s189t01)

Production subscription (s189p01)

Pipelines

On every commit to a pull request

The ECF1 pipelines also run smoke tests and API performance tests, but we won't be ready for those for a while.

When a pull requests are closed or merged

When pull requests are merged

Approach

Like in ECF1, build actions for bits we might want to reuse. This keeps things modular and makes the actual flows much shorter and easier to read.

We'll need help from @DFE-Digital/teacher-services-infrastructure with Azure keys for each environment.

peteryates commented 1 month ago

Having thought more about this I'd also like us to keep the root of the repo tidy and minimal. The infrastructure config is config - let's put it (both terraform and global_config) under config?

saliceti commented 1 month ago

Having thought more about this I'd also like us to keep the root of the repo tidy and minimal. The infrastructure config is config - let's put it (both terraform and global_config) under config?

This makes sense. The inconvenients are this will deviate from the template so paths must be amended, and it will make it a bit more difficult to support. Also "config" is specific to rails.

peteryates commented 1 month ago

That's fair, appreciate it brings a support burden too. Maybe having terraform at the project root isn't so bad and we put global_config in that directory too?

gracecbrennan commented 1 month ago

Steve is progressing through Terrafrom set-up

peteryates commented 1 month ago

@saliceti - you mentioned that we might be able to shorten the names by using s189pXXX instead of s189p01XXX. Is anything stopping us from making a start on this? i.e., do you need to do any work/config to support it?

saliceti commented 1 month ago

I suggest generating fresh code from template but tweak the azure naming in the template. If it works, you can PR the template.

mason-emily commented 1 month ago

@tonyheadford looking at this today

gracecbrennan commented 1 month ago

Ongoing work with the infrastructure team. Steve is chatting with Colin on this at the moment and we should soon have our resources available to build out environments.

gracecbrennan commented 1 month ago

Colin was due to take a look at this yesterday but that hasn't happened just yet - Steve will chase up with Colin.

gracecbrennan commented 1 month ago

Colin has review draft pull request and he is continuing to create Azure elements we can't self-serve on.

mason-emily commented 1 month ago

Waiting on infrastructure team - Colin is keeping an eye on this

steventux commented 4 weeks ago

https://trello.com/c/72rf64KK is the Trello card for infra work on this.

peteryates commented 4 weeks ago

We can use this action for building and pushing to the container registry.

gracecbrennan commented 3 weeks ago

Ticket is ongoing. Steve is doing a dry-run - will bring up test environment first and move onto prod etc.

gracecbrennan commented 3 weeks ago

Have got to a point of spinning up a review environment - this is currently timing out but Steve is going to look at this today.

steventux commented 3 weeks ago

We have a review app POC https://ec2-review-79-web.test.teacherservices.cloud/ which was created with terraform from https://github.com/DFE-Digital/ecf2/pull/79 Decided to break PRs down to each environment, the first (review env) PR is being checked by Colin. Will follow with staging and other envs, these should be fairly trivial in comparison to initial setup.

peteryates commented 2 weeks ago

I think it was the 'Development' section on the right that was causing this issue to close. I thought it'd close when all the development tasks were complete, not any of them 🙈 My fault, I've unlinked them now!

mason-emily commented 1 week ago

Staging environment is now up and running - waiting on code review on this

Working on migration environment today with Colin.

gracecbrennan commented 1 week ago

Steve working on migration issue.

gracecbrennan commented 5 days ago

Sandbox and Production remaining that we hope to get done this week.

gracecbrennan commented 4 days ago

Migration and Sandbox solved.

Pushing forward to production today!

gracecbrennan commented 3 days ago

All environments are now built!!!

Waiting for entire deployment pipeline working correctly before we can move to done.

steventux commented 3 days ago

Image

Deploying to all environments