Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
shiny-k8s
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hub
shiny-k8s
Commits
34d5b649
Commit
34d5b649
authored
1 year ago
by
Bryan BRANCOTTE
Browse files
Options
Downloads
Patches
Plain Diff
applying package rename, updating dohelm doc
parent
0447a65b
No related branches found
No related tags found
No related merge requests found
Pipeline
#132632
passed
1 year ago
Stage: build
Stage: deploy
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
source/developer_guide/interact_with_k8s.rst
+15
-9
15 additions, 9 deletions
source/developer_guide/interact_with_k8s.rst
source/user_guide/helm_settings.rst
+9
-9
9 additions, 9 deletions
source/user_guide/helm_settings.rst
with
24 additions
and
18 deletions
source/developer_guide/interact_with_k8s.rst
+
15
−
9
View file @
34d5b649
...
@@ -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 2
0
, will make the action to be ``upgrade --install``, and
Commenting line 2
5
, 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:
...
...
This diff is collapsed.
Click to expand it.
source/user_guide/helm_settings.rst
+
9
−
9
View file @
34d5b649
...
@@ -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:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment