Skip to content

Commit 367ccd2

Browse files
authored
CLOUDP-233647: Document ROSA cluster update (#1681)
* CLOUDP-233647: Document ROSA cluster update * Apply suggestions from code review redact sample hostname
1 parent ddac601 commit 367ccd2

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

docs/dev/release.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,52 @@ git push
195195

196196
If the release is a new minor version, then the CLI must be updated with the new version (and any new CRDs) [here](https://github.com/mongodb/mongodb-atlas-cli/blob/master/internal/kubernetes/operator/features/crds.go).
197197

198+
# Updating the ROSA cluster
199+
200+
For the Openshift upgrade tests we rely on a service account to be present in the OpenShift cluster and its login token to be present in CI.
201+
202+
## Setup Kubectl against the new cluster
203+
204+
1. Go to https://console.redhat.com/openshift
205+
1. Use your RedHat account credentials to log in, see Pre-requisites on the RedHat Connect account you need to setup before this.
206+
1. Form the list of Clusters, click of the name of the one to be used now.
207+
1. CLick the `Open Console` in the top right of the page.
208+
1. Use the cluster `htpasswd` credentials you should have been given beforehand to login to the cluster itself.
209+
1. On the landing page, click the account drop down on the top right corner if the page and click on `Copy login command` there.
210+
1. Login again with the `htpasswd`credentials.
211+
1. On the white page click `Display token`.
212+
1. Copy the `oc` command there and run it. You need to have [oc installed](https://docs.openshift.com/container-platform/4.8/cli_reference/openshift_cli/getting-started-cli.html) for this step to work.
213+
214+
After that if you do `kubectl config current-context` it should display you are connected to your new cluster.
215+
216+
## Create the cluster managing service account
217+
218+
Using the kubectl context against the new cluster, create the service account and its token:
219+
220+
```shell
221+
$ kubectl create ns atlas-upgrade-test-tokens
222+
$ kubectl -n atlas-upgrade-test-tokens create serviceaccount atlas-operator-upgrade-test
223+
$ oc create token --duration=87600h -n atlas-upgrade-test-tokens atlas-operator-upgrade-test >token.txt
224+
```
225+
226+
Give this service account enough permissions, currently this is cluster-admin:
227+
228+
```shell
229+
$ oc adm policy add-cluster-role-to-user cluster-admin system:serviceaccount:atlas-upgrade-test-tokens:atlas-operator-upgrade-test
230+
```
231+
232+
Copy & Paste token.txt into the `OPENSHIFT_UPGRADE_TOKEN` secret in Github Actions.
233+
234+
Run `kubectl cluster-info` Eg:
235+
236+
```shell
237+
% kubectl cluster-info
238+
Kubernetes control plane is running at https://***somehostname***.com:6443
239+
...
240+
```
241+
242+
And use the URL there to set `OPENSHIFT_UPGRADE_SERVER_API` so that openshift upgrade tests to run successfully.
243+
198244
## Troubleshooting
199245

200246
### Major version issues when executing the "Create Release Branch" workflow

0 commit comments

Comments
 (0)