Skip to content

Commit

Permalink
Add Studio Self-hosted upgrade instructions (#4913)
Browse files Browse the repository at this point in the history
* Add Studio Self-hosted upgrade instructions

* Few fixes, address PR feedback

* Update content/docs/studio/self-hosting/upgrading/regular-procedure.md

Co-authored-by: Helio Machado <0x2b3bfa0+git@googlemail.com>

* Address more PR feedback

---------

Co-authored-by: Helio Machado <0x2b3bfa0+git@googlemail.com>
  • Loading branch information
jesper7 and 0x2b3bfa0 authored Oct 17, 2023
1 parent 5d8dc65 commit ea323de
Show file tree
Hide file tree
Showing 5 changed files with 163 additions and 0 deletions.
14 changes: 14 additions & 0 deletions content/docs/sidebar.json
Original file line number Diff line number Diff line change
Expand Up @@ -753,6 +753,20 @@
"slug": "support-bundle"
}
]
},
{
"slug": "upgrading",
"source": "upgrading/index.md",
"children": [
{
"label": "Regular procedure",
"slug": "regular-procedure"
},
{
"label": "Air-gap procedure",
"slug": "airgap-procedure"
}
]
}
]
},
Expand Down
101 changes: 101 additions & 0 deletions content/docs/studio/self-hosting/upgrading/airgap-procedure.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
## Upgrading Studio (Air-gapped)

<admon type="warn">

These upgrade procedures are only applicable if you've deployed Studio in a VM
on an air-gapped machine.

</admon>

First, we'll start by downloading the latest Helm chart and the latest Docker
images from a machine with internet access.

1. Downloading the Helm chart

```cli
$ helm repo update
$ helm pull iterative/studio
```

Then, let's get the filename:

```cli
$ ls -l studio-*.tgz
-rw-r--r--. 1 username username 392409 Oct 11 14:30 studio-0.7.0.tgz
```

Now, we'll retrieve the Studio application version embedded in the Helm chart.
Use the filename from before in the following command:

```cli
$ export STUDIO_VERSION=$(tar zxf studio-0.7.0.tgz -O studio/Chart.yaml | grep -Po '(?<=appVersion: )v[\d.]+')
```

2. Downloading the Docker images

Authenticate to the Docker registry with your personal credentials and download
the Docker images:

```cli
$ docker login docker.iterative.ai
```

```cli
$ docker pull docker.iterative.ai/studio-frontend:$STUDIO_VERSION
$ docker save docker.iterative.ai/studio-frontend:$STUDIO_VERSION > studio-frontend-$STUDIO_VERSION.tar
$ docker pull docker.iterative.ai/studio-backend:$STUDIO_VERSION
$ docker save docker.iterative.ai/studio-backend:$STUDIO_VERSION > studio-backend-$STUDIO_VERSION.tar
$ docker pull docker.iterative.ai/studio-dvcx-worker:$STUDIO_VERSION
$ docker save docker.iterative.ai/studio-dvcx-worker:$STUDIO_VERSION > studio-dvcx-worker-$STUDIO_VERSION.tar
```

3. Transfer the Helm chart and Docker images to the instance

The procedure on transferring the the Helm chart and Docker images to the
instance will vary for each user, thus we can't provide any examples. However,
any method that you deem acceptable will do.

4. Loading the Docker images into the container runtime

```cli
$ docker load -i studio-frontend-$STUDIO_VERSION.tar
$ docker load -i studio-backend-$STUDIO_VERSION.tar
$ docker load -i studio-dvcx-worker-$STUDIO_VERSION.tar
```

5. Upgrading Studio

We'll start by extracting the archive containing the Helm chart:

```cli
$ tar zxvf studio-0.7.0.tgz
```

Finally, we'll execute the upgrade:

```cli
$ helm upgrade --atomic studio studio --namespace studio --values values.yaml
```

<admon type="info">

`values.yaml` refers to your configuration file. In case you've named it
differently, please update the file name in the command accordingly.

</admon>

Once the upgrade succeds, you should see output such as this:

```
Release "studio" has been upgraded. Happy Helming!
NAME: studio
LAST DEPLOYED: Tue Oct 17 17:51:53 2023
NAMESPACE: studio
STATUS: deployed
REVISION: 5
NOTES:
Application URL:
http://192.168.1.1/
```
12 changes: 12 additions & 0 deletions content/docs/studio/self-hosting/upgrading/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Upgrading Studio

The procedure for upgrading Studio varies depends on the environment Studio is
deployed onto.

If you've deployed Studio in an environment with internet access (like most
users), follow this guide:
[Upgrading Studio (Regular procedure)](/doc/studio/self-hosting/upgrading/regular-procedure)

If, on the other hand, you've deployed Studio in an air-gapped environment,
follow this guide:
[Upgrading Studio (Air-gap procedure)](/doc/studio/self-hosting/upgrading/airgap-procedure)
36 changes: 36 additions & 0 deletions content/docs/studio/self-hosting/upgrading/regular-procedure.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
## Upgrading Studio (Regular procedure)

1. Connect to the instance with SSH

2. Update the Helm repository

```cli
$ helm repo update
```

3. Upgrade Studio to the latest version

```cli
$ helm upgrade --atomic studio iterative/studio --namespace studio --values values.yaml
```

<admon type="info">

`values.yaml` refers to your configuration file. In case you've named it
differently, please update the file name in the command accordingly.

</admon>

Once the upgrade succeds, you should see output such as this:

```
Release "studio" has been upgraded. Happy Helming!
NAME: studio
LAST DEPLOYED: Tue Oct 17 17:51:53 2023
NAMESPACE: studio
STATUS: deployed
REVISION: 5
NOTES:
Application URL:
http://192.168.1.1/
```
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 ea323de

Please sign in to comment.