# Upgrade ISD-Argo with Argo CD and Argo Rollouts from v4.1.2 to v4.1.3

Please follow these instructions if you are upgrading from v4.1.2 (to 4.1.3).

{% hint style="warning" %}
**WARNING**: Please backup all the databases, in particular the Postgres DB, BEFORE beginning the upgrade. Backup procedures may differ depending on your usage of external DBs for Autopilot Services.
{% endhint %}

{% hint style="info" %}
**NOTE**: There are no DB changes from v4.1.2 to v4.1.3 so you need to only upgrade the helm chart.&#x20;
{% endhint %}

Following are the sequence of activities to perform the upgrade.

* [**Pre-requisites**](#pre-requisites)
* [**Cloning the Repo and update values file**](#cloning-the-repo-and-update-values-file)
* [**Helm upgrade**](#helm-upgrade)
* [**Post Installation Steps**](#post-installation-steps)
* [**If an upgrade fails**](#if-an-upgrade-fails)

### Pre-requisites:

* Users need to have access to the Kubernetes Cluster and namespace where **ISD-Argo with Argo CD and Argo Rollouts** is running that is where v4.1.1 is running.
* Users need to have access to GitHub and be able to clone [**enterprise-argo**](https://github.com/OpsMx/enterprise-argo) repo.

### Cloning the Repo and update values file:

1. Clone the enterprise-argo repo using the below command<br>

   ```
   git clone https://github.com/OpsMx/enterprise-argo.git
   ```

2. You need to use [**isd-argo-minimal-values.yaml**](https://github.com/OpsMx/enterprise-argo/blob/main/charts/isdargo/isd-argo-minimal-values.yaml) file for upgrading to v4.1.3.

3. Update the isd-argo-minimal-values.yaml file with specifically ISD URL, ArgoCD URL, Argo Rollouts URL, Vela URL, Keycloak URL by using the below commands. The complete set of values.yaml is available [here](https://github.com/OpsMx/enterprise-argo/blob/main/charts/isdargo/values.yaml).&#x20;

4. Use the below command to update the ISD, Keycloak,Vela,Argo CD, Argo Rollouts URL<br>

   <pre data-overflow="wrap"><code>sed -i "s/ISD.REPLACE.THIS.WITH.YOURCOMPANY.COM/&#x3C;Provide your ISD url here>/g" isd-argo-minimal-values.yaml
   </code></pre>

   <pre data-overflow="wrap"><code>sed -i "s/ARGO.REPLACE.THIS.WITH.YOURCOMPANY.COM/&#x3C;Provide your Argo CD url here>/g" isd-argo-minimal-values.yaml
   </code></pre>

   <pre data-overflow="wrap"><code>sed -i "s/ROLLOUTS.REPLACE.THIS.WITH.YOURCOMPANY.COM/&#x3C;Provide your Argo rollouts url here>/g" isd-argo-minimal-values.yaml
   </code></pre>

   <pre data-overflow="wrap"><code>sed -i "s/VELA.REPLACE.THIS.WITH.YOURCOMPANY.COM/&#x3C;Provide your VELA url here>/g" isd-argo-minimal-values.yaml
   </code></pre>

   <pre data-overflow="wrap"><code>sed -i "s/KEYCLOAK.REPLACE.THIS.WITH.YOURCOMPANY.COM/&#x3C;Provide your Keycloak url here>/g" isd-argo-minimal-values.yaml
   </code></pre>

5. Set argo crds to false. In isd-argo-minimal-values.yaml, under the argo-cd.crds.install to false.

### Helm upgrade

Go to the cloned repo, for eg: cd enterprise-argo and execute the below command:

{% code overflow="wrap" %}

```
helm upgrade <release name> charts/isdargo/ -f charts/isdargo/isd-argo-minimal-values.yaml -n <namespace> --timeout=10m --debug
```

{% endcode %}

Wait for 10 minutes till the helm upgrade completes.

{% code overflow="wrap" %}

```
helm upgrade <release name> charts/isdargo/ -f charts/isdargo/isd-argo-minimal-values.yaml -n <namespace> --timeout=10m --debug
Release "<release name>" has been upgraded. Happy Helming!
NAME: <release name>
LAST DEPLOYED: Mon Feb  6 19:40:34 2023
NAMESPACE: <namespace>
STATUS: deployed
REVISION: 2
TEST SUITE: None
```

{% endcode %}

### Post Installation Steps

1. Login to ISD UI and check whether the ISD version is updated right after the help button in the top right corner. Refer to the image below.
2. Navigate to the Agent Screen in ISD and click on edit button.

   <figure><img src="https://2047464521-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MBEa1hoX6SqpDj-ymNs%2Fuploads%2FuCT19jN85IYEos6uPjlB%2Fimage.png?alt=media&#x26;token=4e49836e-0b93-4fbf-b410-08e36fa09c59" alt=""><figcaption></figcaption></figure>
3. Click **Download Agent Manifest** and apply the file where ISD-Argo is running. Use the below command to apply the file

   <pre data-overflow="wrap"><code>kubectl apply -f isd-argo-agent.yml -n &#x3C;namespace>
   </code></pre>

   <figure><img src="https://lh6.googleusercontent.com/AKTcTBvbvceq4r_HsaFOdhcar3YuqHT_ZHRX_DYoqltvC5jNujpQvPwiH4fI8y2TfnsQLNPaX0UOEuRGzEkmfZHBm-eJfT_oXFDxWODaVThSQkrddCGGoHa_LpGNoiFtsoleRh1M1nbgf3qDJVK1WqA" alt=""><figcaption></figcaption></figure>
4. Delete the **Agent pod** by using the command given below:                                                      `kubectl delete po -l agent.opsmx.com/role=agent -n`
5. Click the CD integration page and verify the agent status is healthy(green).

   <figure><img src="https://lh6.googleusercontent.com/McqaFbEiDpGMPpYNG1mHS1bmAOG-9EyKKrekphNIHYOPWZ_Qzq0V1XNHWseTo2xAG8EkAs3VOBHIsezGU9QG-RHUObqCIvUJvjCaA-dLn0LgCEN4g0R1tnWBVsQiPdi_HnuDxcliKqUPhSNuwY79yz4" alt=""><figcaption></figcaption></figure>
6. Please verify all the screens of ISD.

### If an upgrade fails

If anything goes wrong during upgrade, please Rollback to the previous version using the below command:

{% code overflow="wrap" %}

```
helm rollback <release name> -n <namesp
```

{% endcode %}
