Skip to main content

Application: release

Internal dashboard summarising the release pipeline for components of the GOV.UK web content management system.

README

An application to make managing releases to specific environments easier.

Technical documentation

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.

Seeing the kubernetes API view running locally

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 the release-assumed role on the AWS IAM control panel using your fulladmin account on the integration 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 in integration. Under the AWS IAM control panel using your fulladmin account, select your developer role and then add a new permission using Create inline policy and switch to JSON 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.

To the run the tests

bundle exec rake

Architecture diagrams

Licence

MIT License