Skip to content

Commit

Permalink
Merge pull request #542 from alphagov/185560080_documentaion-for-dock…
Browse files Browse the repository at this point in the history
…er-grafana-and-creds

added docker update howto
  • Loading branch information
jackjoy-gds committed Feb 7, 2024
2 parents 3ac672e + 7bf5b22 commit 10c9f8c
Show file tree
Hide file tree
Showing 2 changed files with 83 additions and 0 deletions.
82 changes: 82 additions & 0 deletions source/guides/updating_docker_images.html.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
---
title: Updating Docker Images
---

# Updating Docker Images

## Making changes to docker-cloudfoundry-tools repo

Push the relevant changes to your docker image in a branch of the docker-cloudfoundry-tools repo

```
git clone [email protected]:alphagov/paas-docker-cloudfoundry-tools.git
cd paas-docker-cloudfoundry-tools
git checkout -b "test_docker_branch"
<make changes>
git add -A
git commit -m "description of my changes"
git push --set-upstream origin test_docker_branch
```

## Trigger the build

Creating a PR for this branch will trigger a new build for each docker image in the repo.

eg: https://github.com/alphagov/paas-docker-cloudfoundry-tools/pull/new/test_docker_branch

Look at the github actions to confirm build success

eg: https://github.com/alphagov/paas-docker-cloudfoundry-tools/actions

Take a note of the commit ref which will be used to tag the newly build docker images

```
git log
commit 0a8c473a98866f99789a382ff8edbb324f6e35f0 (HEAD -> test_docker_branch, origin/test_docker_branch)
Author: Jack Joy <[email protected]>
Date: Tue Jan 21 12:48:34 2024 +0000
description of my changes
```

## Test new docker image in paas-bootstrap and paas-cf

create branches for each of these repos and update the tags for the relevant docker images

eg:
```
GDS11779:paas-bootstrap jack.joy$ git diff
diff --git a/concourse/tasks/delete-ssh-keys.yml b/concourse/tasks/delete-ssh-keys.yml
index ad05cbb..4b4480e 100644
--- a/concourse/tasks/delete-ssh-keys.yml
+++ b/concourse/tasks/delete-ssh-keys.yml
@@ -4,7 +4,7 @@ image_resource:
type: registry-image
source:
repository: ghcr.io/alphagov/paas/awscli
- tag: 10f7bb56a8f4c0493acdd303ca08571ef3ecc8e9
+ tag: 0a8c473a98866f99789a382ff8edbb324f6e35f0
inputs:
- name: paas-bootstrap
run:
```

Replace each instance of the old tag (10f7bb56a8f4c0493acdd303ca08571ef3ecc8e9) for the new tag (0a8c473a98866f99789a382ff8edbb324f6e35f0)

Push the changes to the branches and configure the pipelines to use these branches in your dev environment

eg:
```
gds-cli aws paas-dev-admin -- make dev04 deployer-concourse pipelines DEPLOY_ENV=dev04 BRANCH=test_docker_branch
```

Run the pipelines to test the changes

## Merge the docker-cloudfoundry-tools changes

Have the PR approved and merge it into main

Once the build has run, update the docker tag references in the paas-bootstrap and paas-cf repos again with the new tag and push the changes

Get the PRs approved and merge
1 change: 1 addition & 0 deletions source/index.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ title: PaaS Team Manual
- [How to manage frontend dependencies](guides/manage_frontend_dependencies/)
- [How to use the fast-startup-and-shutdown pipelines](guides/fast-startup-and-shutdown/)
- [How to enable private access to backing services](guides/vpc_peer_backing_service_access)
- [How to update Docker images](guides/updating_docker_images)

### Other information
- [Our orgs on the paas](team/our_orgs_on_the_paas/)
Expand Down

0 comments on commit 10c9f8c

Please sign in to comment.