Skip to content

Commit

Permalink
Refactor DEPLOY_MODE documentation for clarity and conciseness
Browse files Browse the repository at this point in the history
  • Loading branch information
marrobi committed Nov 15, 2024
1 parent 4074476 commit 0390321
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 90 deletions.
46 changes: 0 additions & 46 deletions docs/tre-admins/setup-instructions/manual-deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,52 +71,6 @@ Open your browser and navigate to the `/api/docs` route of the API: `https://<a

![Swagger UI](../../assets/quickstart_swaggerui.png)


## Using the DEPLOY_MODE variable

The `DEPLOY_MODE` variable allows you to control whether the deployment runs in 'plan' mode or 'apply' mode. In 'plan' mode, the terraform plan is generated and can be reviewed before applying. In 'apply' mode, the terraform plan is applied directly.

### Setting the DEPLOY_MODE variable

To set the `DEPLOY_MODE` variable, use the following commands:

```bash
export DEPLOY_MODE=plan
```

or

```bash
export DEPLOY_MODE=apply
```

### Example usage

To run the deployment in 'plan' mode:
=======
## Using the `DEPLOY_MODE` variable

To use the `DEPLOY_MODE` variable, follow these steps:

1. Set the `DEPLOY_MODE` variable to either `plan` or `apply` depending on your desired deployment mode.
2. Run the deployment command with the `DEPLOY_MODE` variable set.

Example:
```bash
export DEPLOY_MODE=plan
make all
```

To run the deployment in 'apply' mode:

```bash
export DEPLOY_MODE=apply
make all
```
=======
When `DEPLOY_MODE` is set to `plan`, the deployment script will execute the terraform plan without applying it, allowing you to review the changes before deciding to apply them. When `DEPLOY_MODE` is set to `apply`, the deployment script will execute the terraform plan and apply the changes automatically.


## Next steps

* [Configure Shared Services](configuring-shared-services.md)
Expand Down
45 changes: 1 addition & 44 deletions docs/tre-admins/setup-instructions/workflows.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,51 +147,8 @@ Configure variables used in the deployment workflow:
| `ENABLE_SWAGGER` | Optional. Determines whether the Swagger interface for the API will be available. Default value is `false`. |
| `FIREWALL_SKU` | Optional. The SKU of the Azure Firewall instance. Default value is `Standard`. Allowed values [`Basic`, `Standard`, `Premium`]. See [Azure Firewall SKU feature comparison](https://learn.microsoft.com/en-us/azure/firewall/choose-firewall-sku). |
| `APP_GATEWAY_SKU` | Optional. The SKU of the Application Gateway. Default value is `Standard_v2`. Allowed values [`Standard_v2`, `WAF_v2`] |

### Using the DEPLOY_MODE variable

The `DEPLOY_MODE` variable allows you to control whether the deployment runs in 'plan' mode or 'apply' mode. In 'plan' mode, the terraform plan is generated and can be reviewed before applying. In 'apply' mode, the terraform plan is applied directly.

### Setting the DEPLOY_MODE variable

To set the `DEPLOY_MODE` variable, use the following commands:

```bash
export DEPLOY_MODE=plan
```

or

```bash
export DEPLOY_MODE=apply
```

### Example usage

To run the deployment in 'plan' mode:

```bash
export DEPLOY_MODE=plan
make all
```

To run the deployment in 'apply' mode:

```bash
export DEPLOY_MODE=apply
make all
```
| `DEPLOY_MODE` | Optional. Control whether the terraform operations run in `plan` mode or `apply` mode. Defaults to `apply` |

### Deploy the TRE using the workflow

With all the repository secrets set, you can trigger a workflow run by pushing to develop/main of your fork, or by dispatching the workflow manually.

To use the `DEPLOY_MODE` variable, follow these steps:

1. Go to the "Actions" tab of your GitHub repository.
2. Select the `deploy_tre.yml` workflow from the list of workflows.
3. Click on the "Run workflow" button.
4. In the "DEPLOY_MODE" input field, enter either `plan` or `apply` depending on your desired deployment mode.
5. Click on the "Run workflow" button to start the deployment.

When `DEPLOY_MODE` is set to `plan`, the workflow will execute the terraform plan without applying it, allowing you to review the changes before deciding to apply them. When `DEPLOY_MODE` is set to `apply`, the workflow will execute the terraform plan and apply the changes automatically.
18 changes: 18 additions & 0 deletions docs/tre-admins/upgrading-tre.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,21 @@ If you wish to deploy the Azure TRE from a forked repository you can change the
- `"OSS_REPO": "myorg/AzureTRE"` (to point to fork of the Azure TRE in your GitHub organisation)

When changing `OSS_REPO` ensure the `OSS_VERSION` variable refers to a GitHub ref on the repository fork.

## Check infrastructure changes using a Terraform plan

The `DEPLOY_MODE` variable allows you to control whether the deployment runs in 'plan' mode or 'apply' mode. In 'plan' mode, the terraform plan is generated and can be reviewed before applying. In 'apply' mode, the terraform plan is applied directly. This can be useful when evaluating an updgrade and don't want to make any actual changes to the deployed infrastructure.

### Setting the DEPLOY_MODE variable

To set the `DEPLOY_MODE` variable, use the following commands:

```bash
export DEPLOY_MODE=plan
```

### Example usage
```bash
export DEPLOY_MODE=plan
make core
```

0 comments on commit 0390321

Please sign in to comment.