An application to make managing releases to specific environments easier.
This is a Ruby on Rails app, and should follow our Rails app conventions.
You can use the GOV.UK Docker environment to run the application and its tests with all the necessary dependencies. Follow the usage instructions to get started.
To see the kubernetes API view you will need to run the Release
app on your machine, not in the govuk-docker
stack.
If you are just running the tests you can use govuk-docker
.
- Before running the app you will need to update the
Trust relationship
for therelease-assumed
role on the AWSIAM
control panel using yourfulladmin
account on theintegration
environment. The additional trusted entity that you are adding should look like this -
{
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::1234567890:role/your.name-developer"
},
"Action": "sts:AssumeRole"
}
This step needs to be repeated for the staging
environment as the app will show the status for both integration
and staging
environments.
Note that the production
environment is not updated in order to reduce the risk of affecting the production
environment if the allowable actions on the kubernetes API changes in the future.
- Finally on the
AWS console
you will also need to add the following IAM policy to your developer role inintegration
. Under the AWSIAM
control panel using yourfulladmin
account, select your developer role and then add a new permission usingCreate inline policy
and switch toJSON
so that you can paste the following json block -
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"sts:AssumeRole"
],
"Resource": "arn:aws:iam::210287912431:role/release-assumed"
},
{
"Effect": "Allow",
"Action": [
"sts:AssumeRole"
],
"Resource": "arn:aws:iam::696911096973:role/release-assumed"
}
]
}
Click on Next
to name your new policy, it should probably be something like TestAssumeRole
and finally you should be able to click on Create policy
.
-
Once the extra trust entity and IAM policy has been added you should be able to run the Release app locally after assuming your developer account.
-
Then ensure that you have
mysql server
running on your machine.
brew install mysql # needed if you don't have mysql installed already
mysql.server start
- Install the dependencies
bundle install
- Setup the database
bin/rails db:setup
- Start the Rails server
rails s
Use GOV.UK Docker to run any commands that follow.
bundle exec rake