Skip to content

Commit

Permalink
Merge pull request input-output-hk#1360 from input-output-hk/jpraynau…
Browse files Browse the repository at this point in the history
…d/1356-test-docker-deploy-runbooks

Runbooks for test distributions and deployments
  • Loading branch information
jpraynaud authored Nov 21, 2023
2 parents 48ff787 + 5be0cb9 commit b17533f
Show file tree
Hide file tree
Showing 10 changed files with 63 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
if: inputs.environment == matrix.environment
uses: actions/checkout@v3

- name: ${{ inputs.dry_run == 'true' && 'Plan' || 'Apply' }} terraform infrastructure
- name: ${{ inputs.dry_run == true && 'Plan' || 'Apply' }} terraform infrastructure
if: inputs.environment == matrix.environment
uses: ./.github/workflows/actions/deploy-terraform-infrastructure
with:
Expand Down
2 changes: 2 additions & 0 deletions docs/runbook/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ This page gathers the available guides to operate a Mithril network.
| **Fix terraform lock** | [terraform-lock](./terraform-lock/README.md) | Fix a terraform lock in CD workflows. |
| **Manage SSH access to infrastructure** | [ssh-access](./ssh-access/README.md) | Manage SSH access on the VM of the infrastructure for a user. |
| **Upgrade VM of infrastructure** | [upgrade-vm](./upgrade-vm/README.md) | Upgrade the VM of the infrastructure of a Mithril network. |
| **Create test Docker distribution** | [test-docker-distribution](./test-docker-distribution/README.md) | Create a custom test Docker distribution. |
| **Deploy a test network** | [test-docker-distribution](./test-deploy-network/README.md) | Manually deploy a test distribution to a test Mithril network. |
29 changes: 29 additions & 0 deletions docs/runbook/test-deploy-network/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Manually deploy a test distribution to a test Mithril network.

## Introduction

From time to time, we may need to deploy manually on a test Mithril network a test distribution in order to test unreleased features independently from the regular [release process](https://mithril.network/doc/adr/3). In that case, we have the opportunity to manually deploy to a pre-configured network a specific distribution.

## Run the associated 'Test network deploy' GitHub Actions workflow

Go to the page of the workflow with your browser: [Docker image test](https://github.com/input-output-hk/mithril/actions/workflows/test-deploy.yml)

Then, click on the **Run workflow** button:

![Run workflow button](./img/run-workflow-button.png)

Then fill the form to manually run the workflow:

![Run workflow form](./img/run-workflow-form.png)

> [!WARNING]
> - The **Mithril image id** of the of the distribution to deploy must be published on the [package registry](https://github.com/orgs/input-output-hk/packages?repo_name=mithril)
> [!CAUTION]
> It is highly recommended to run with the **Dry run** option checked at first and make sure that the process works as expected
> The deployment of a distribution can lead to irreversible damages or loss for the network

The result should look like this in the GitHub Actions:

![Run workflow result](./img/run-workflow-result.png)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 31 additions & 0 deletions docs/runbook/test-docker-distribution/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Create a custom test Docker distribution.

## Introduction

From time to time, we may need to create a test Docker distribution with custom arguments (notably the version of the Cardano CLi that is used).
This is a convenient way for testing early releases of the Cardano node. This is also commonly used to create a Docker distribution from an unmerged PR.

## Run the associated 'Docker images test' GitHub Actions workflow

Go to the page of the workflow with your browser: [Docker image test](https://github.com/input-output-hk/mithril/actions/workflows/test-docker.yml)

Then, click on the **Run workflow** button:

![Run workflow button](./img/run-workflow-button.png)

Then fill the form to manually run the workflow:

![Run workflow form](./img/run-workflow-form.png)

> [!WARNING]
> - The SHA of the commit must have been run successfully in the CI workflow beforehand
> [!CAUTION]
> It is highly recommended to run with the **Dry run** option checked at first and make sure that the process works as expected

The result should look like this in the GitHub Actions:

![Run workflow result](./img/run-workflow-result.png)

You should also be able to see the newly created Docker images in the [package registry](https://github.com/orgs/input-output-hk/packages?repo_name=mithril)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b17533f

Please sign in to comment.