# Upgrade Nomad Clusters

## Prerequisites

---

- Ansible >= 2.10
- `ENV_NAME` - environment name where you want to upgrade
- `DOMAIN_NAME` - depends on which AWS account environment was created, for production account - `safersoftware.net`, for qa - `p81-qa.net`
- `NOMAD_VERSION` - version which you want to upgrade
- `NOMAD_TOKEN` - depends on configured ACL token, the token is stored on AWS Secrets Manager
- `EXECUTION_MODE` - choose mode, `check` will do only `--check` `--diff` without apply

### Structure of this directory

---

```bash

.
├── requirements                         # Roles to install from remote repository
├── upgrade                              # Upgrade foler
│   ├── roles                            # Roles to upgrade multinode Nomad clusters
│   ├── ansible.cfg                      # Default ansible configuration file
│   ├── create_peers.sh                  # Script will upgarde raft v2 to v3 for single node clusters
│   ├── upgrade_cluster.yml              # Playbook for multinode clusters with 3/5 nodes
│   ├── upgrade_single.yml               # Playbook for singlenode clusters
│   ├── upgrade.sh                       # Initial script to create inventory, roles and execute playbook
└── README.md
```
