@@ -29,7 +29,9 @@ and dependencies of the operator.
2929 used to secure Redis. Each example (see below) already changes the password
3030 to ` mySecurePassword12 ` . For an example see
3131 the [ ` overlays/1-namespaced/patches/redis.secret.yaml ` ] ( overlays/1-namespaced/patches/redis.secret.yaml )
32- file.
32+ file. Make sure to change the password ** before** deploying,
33+ see [ changing Redis password] ( #changing-redis-password ) for instructions on how
34+ to change the password after deploying.
3335
3436## Tutorial using minikube
3537
@@ -45,7 +47,7 @@ ShinyProxy operator on minikube.
45472 . Start minikube:
4648
4749 ``` bash
48- minikube start --kubernetes-version=' v1.25.6 ' --addons=metrics-server,ingress --container-runtime=containerd
50+ minikube start --kubernetes-version=' v1.30.3 ' --addons=metrics-server,ingress --container-runtime=containerd
4951 ````
5052
51533. Clone this repository and change the working directory:
@@ -119,32 +121,33 @@ ShinyProxy operator on minikube.
119121 imagePullPolicy: Always
120122 fqdn: shinyproxy-demo.local
121123 ` ` `
124+
12212510. Apply this change using ` kubectl` :
123126
124- ` ` ` bash
125- kubectl apply -f resources/shinyproxy.shinyproxy.yaml
126- ` ` `
127+ ` ` ` bash
128+ kubectl apply -f resources/shinyproxy.shinyproxy.yaml
129+ ` ` `
127130
128- The operator now deploys a new ShinyProxy instance. The old instance will be
129- kept intact as long as a Websocket connection is active on the old instance. The
130- old instance will automatically be removed once it no longer has any open
131- Websocket connections. New requests will immediately be handled by the new
132- server as soon as it is ready. Try going to the main page of ShinyProxy and
133- check whether the change your made has been applied.
131+ The operator now deploys a new ShinyProxy instance. The old instance will be
132+ kept intact as long as a Websocket connection is active on the old instance. The
133+ old instance will automatically be removed once it no longer has any open
134+ Websocket connections. New requests will immediately be handled by the new
135+ server as soon as it is ready. Try going to the main page of ShinyProxy and
136+ check whether the change your made has been applied.
134137
13513811. Try the other examples. The following commands first remove the current
136139 example, next you can open another example (e.g. ` 2-clustered` ) and deploy
137140 it using ` kubectl` :
138141
139- ` ` ` bash
140- kubectl delete namespace/shinyproxy
141- kubectl delete namespace/shinyproxy-operator # may fail
142- kubectl delete namespace/shinyproxy-dept2 # may fail
143- kubectl delete namespace/my-namespace # may fail
144- kubectl delete namespace/redis # may fail
145- cd ../2-clustered
146- kustomize build . | kubectl apply -f -
147- ` ` `
142+ ` ` ` bash
143+ kubectl delete namespace/shinyproxy
144+ kubectl delete namespace/shinyproxy-operator # may fail
145+ kubectl delete namespace/shinyproxy-dept2 # may fail
146+ kubectl delete namespace/my-namespace # may fail
147+ kubectl delete namespace/redis # may fail
148+ cd ../2-clustered
149+ kustomize build . | kubectl apply -f -
150+ ` ` `
148151
149152# # Overview of examples
150153
@@ -452,3 +455,41 @@ behavior can be changed by setting `antiAffinityRequired` to `true` in your
452455ShinyProxy configuration. It is also possible to change the topology, by setting
453456the ` antiAffinityTopologyKey` , e.g. to not run multiple replicas in the same
454457availability zone you can set this property to ` topology.kubernetes.io/zone ` .
458+
459+ # # Changing Redis password
460+
461+ Each example changes the password to ` mySecurePassword12` . It' s important to
462+ change this password in your environment. Ideally, the password must be changed
463+ before deploying Redis for the first time, since changing the password after
464+ initial deployment requires deleting all data.
465+
466+ In order to change the password after deployment:
467+
468+ **Note**: during this process ShinyProxy will be stopped and all apps and users
469+ are stopped!
470+
471+ 1. change the password in the yaml file (e.g.
472+ in [`overlays/1-namespaced/patches/redis.secret.yaml`](overlays/1-namespaced/patches/redis.secret.yaml))
473+ 2. stop ShinyProxy by removing the ShinyProxy resource (pods of running apps are
474+ not automatically removed):
475+
476+ ```bash
477+ kubectl delete shinyproxy -n shinyproxy shinyproxy
478+ ```
479+
480+ 3. delete all Redis related resources:
481+
482+ ```bash
483+ kubectl delete statefulset -n shinyproxy redis-node
484+ kubectl delete pvc -n shinyproxy redis-data-redis-node-0
485+ kubectl delete pvc -n shinyproxy redis-data-redis-node-1
486+ kubectl delete pvc -n shinyproxy redis-data-redis-node-2
487+ ```
488+
489+ 4. wait for all related pods to be stopped and all resources to be removed
490+ 5. check that the `PersistentVolumes` of Redis are removed using `kubectl get pv`
491+ 6. re-deploy Redis and ShinyProxy:
492+
493+ ```bash
494+ kustomize build . | kubectl apply -f - --server-side
495+ ```
0 commit comments