Skip to content
Snippets Groups Projects
Commit 34d5b649 authored by Bryan BRANCOTTE's avatar Bryan BRANCOTTE
Browse files

applying package rename, updating dohelm doc

parent 0447a65b
No related branches found
No related tags found
No related merge requests found
Pipeline #132632 passed
...@@ -132,7 +132,8 @@ while testing you app in a browser. ...@@ -132,7 +132,8 @@ while testing you app in a browser.
The do helm script The do helm script
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
The script ``do_helm.sh`` is present in both example project, it's purpose is The script ``do_helm.sh`` is available `here <https://gitlab.pasteur.fr/hub/shiny-k8s-example/-/blob/advanced-scripts/dohelm.sh>`_
present in both example project, it's purpose is
to mimics what happens in the CI, and deploy to kubernetes the application. to mimics what happens in the CI, and deploy to kubernetes the application.
The script The script
...@@ -150,7 +151,7 @@ The script ...@@ -150,7 +151,7 @@ The script
.. code-block:: bash .. code-block:: bash
:caption: The script ``do_helm.sh`` present in the skeleton of the project :caption: The script ``do_helm.sh`` is available at https://gitlab.pasteur.fr/hub/shiny-k8s-example/-/tree/advanced-scripts.
:linenos: :linenos:
#!/usr/bin/env bash #!/usr/bin/env bash
...@@ -158,6 +159,11 @@ The script ...@@ -158,6 +159,11 @@ The script
touch tokens.sh touch tokens.sh
source ./tokens.sh # put `export SECRET_KEY="..."` in this file source ./tokens.sh # put `export SECRET_KEY="..."` in this file
if [ ! -e .gitlab-ci.yml ]; then
echo "You are not at the root of your project (where .gitlab-ci.yml is), we cannot run."
exit 1
fi
NAMESPACE="rshiny-dev" NAMESPACE="rshiny-dev"
CI_PROJECT_NAMESPACE="hub" CI_PROJECT_NAMESPACE="hub"
CI_PROJECT_NAME="shiny-k8s-example" CI_PROJECT_NAME="shiny-k8s-example"
...@@ -176,12 +182,12 @@ The script ...@@ -176,12 +182,12 @@ The script
helm ${ACTION} --namespace=${NAMESPACE} \ helm ${ACTION} --namespace=${NAMESPACE} \
--render-subchart-notes \ --render-subchart-notes \
--set shiny-server.ingress.className=${INGRESS_CLASS} \ --set shiny-k8s-toolkit-helm.ingress.className=${INGRESS_CLASS} \
--set shiny-server.ingress.hostname=${PUBLIC_URL} \ --set shiny-k8s-toolkit-helm.ingress.hostname=${PUBLIC_URL} \
--set shiny-server.imageFullNameAndTag=${IMAGE} \ --set shiny-k8s-toolkit-helm.imageFullNameAndTag=${IMAGE} \
--set shiny-server.registry.username=${DEPLOY_USER} \ --set shiny-k8s-toolkit-helm.registry.username=${DEPLOY_USER} \
--set shiny-server.registry.password=${DEPLOY_TOKEN} \ --set shiny-k8s-toolkit-helm.registry.password=${DEPLOY_TOKEN} \
--set shiny-server.registry.host=${CI_REGISTRY} \ --set shiny-k8s-toolkit-helm.registry.host=${CI_REGISTRY} \
${CI_COMMIT_REF_SLUG}-${CHART_LOCATION} ./${CHART_LOCATION}/ ${CI_COMMIT_REF_SLUG}-${CHART_LOCATION} ./${CHART_LOCATION}/
...@@ -189,7 +195,7 @@ If you use the script as is, it produce on the ouput the yaml template that ...@@ -189,7 +195,7 @@ If you use the script as is, it produce on the ouput the yaml template that
would be applied by helm to deploy your application to Kubernetes. would be applied by helm to deploy your application to Kubernetes.
You should first adapte variables to your settings (line 6-8). You should first adapte variables to your settings (line 6-8).
Commenting line 20, will make the action to be ``upgrade --install``, and Commenting line 25, will make the action to be ``upgrade --install``, and
thus running the script will actually deploy the application. thus running the script will actually deploy the application.
Here is an example output: Here is an example output:
......
...@@ -312,7 +312,7 @@ Here are all the settings you may want to change ...@@ -312,7 +312,7 @@ Here are all the settings you may want to change
.. code-block:: yaml .. code-block:: yaml
:linenos: :linenos:
shiny-server: shiny-k8s-toolkit-helm:
registry: registry:
private: false private: false
nodowntime: nodowntime:
...@@ -357,7 +357,7 @@ your sources. ...@@ -357,7 +357,7 @@ your sources.
:caption: private/internal project :caption: private/internal project
:linenos: :linenos:
shiny-server: shiny-k8s-toolkit-helm:
registry: registry:
private: true private: true
...@@ -367,7 +367,7 @@ your sources. ...@@ -367,7 +367,7 @@ your sources.
:caption: public project :caption: public project
:linenos: :linenos:
shiny-server: shiny-k8s-toolkit-helm:
registry: registry:
private: false private: false
...@@ -396,7 +396,7 @@ your quota (cf :ref:`See quota and logs <quota and logs>`). ...@@ -396,7 +396,7 @@ your quota (cf :ref:`See quota and logs <quota and logs>`).
.. code-block:: yaml .. code-block:: yaml
shiny-server: shiny-k8s-toolkit-helm:
nodowntime: nodowntime:
enabled: false enabled: false
...@@ -412,7 +412,7 @@ will consume resources, so keep an eye on your quota and your resources. ...@@ -412,7 +412,7 @@ will consume resources, so keep an eye on your quota and your resources.
.. code-block:: yaml .. code-block:: yaml
shiny-server: shiny-k8s-toolkit-helm:
autoscaling: autoscaling:
enabled: false enabled: false
minReplicas: 1 minReplicas: 1
...@@ -432,7 +432,7 @@ and also the quota you need. ...@@ -432,7 +432,7 @@ and also the quota you need.
.. code-block:: yaml .. code-block:: yaml
shiny-server: shiny-k8s-toolkit-helm:
resources: resources:
requests: requests:
memory: "256Mi" memory: "256Mi"
...@@ -450,7 +450,7 @@ define the maximum size of such file. ...@@ -450,7 +450,7 @@ define the maximum size of such file.
.. code-block:: yaml .. code-block:: yaml
shiny-server: shiny-k8s-toolkit-helm:
ingress: ingress:
annotations: annotations:
nginx.ingress.kubernetes.io/affinity: cookie nginx.ingress.kubernetes.io/affinity: cookie
...@@ -476,7 +476,7 @@ You can have folders for a persistent storage : ...@@ -476,7 +476,7 @@ You can have folders for a persistent storage :
.. code-block:: yaml .. code-block:: yaml
shiny-server: shiny-k8s-toolkit-helm:
storage: storage:
enabled: false enabled: false
size: "1Gi" size: "1Gi"
...@@ -518,7 +518,7 @@ application is removed. ...@@ -518,7 +518,7 @@ application is removed.
.. code-block:: yaml .. code-block:: yaml
shiny-server: shiny-k8s-toolkit-helm:
autoscaling: autoscaling:
enabled: true enabled: true
nodowntime: nodowntime:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment