Helm Deployment
Warning
This feature is currently in beta. It may change in a future version without prior notice. See the Beta Features page for the full list of beta features and their planned release. If you’re using this feature, we encourage you to share your feedback to help with the evaluation process.
This section describes the process to install OnSphere’s Helm package to deploy a basic default configuration.
It aims to deploy OnSphere’s basic default configuration, installing ssh key to clone configuration and have a small stack ready. For more precise information about configuration, see helm chart values references.
List of modules deployed in this getting started:
osp-configuration-dispatcher: That handle git configuration, verification and dispatching.
osp-rights: That is responsible of right checking and management for the stack.
osp-keycloak: That is responsible of user authentication.
osp-mysql: That is a database for user account management.
osp-rabbitmq: That is a messaging module that ensure communication.
Let’s start with Helm basics.
What is helm
Helm is a package manager for Kubernetes applications. It is basically a templating system that generates manifests for Kubernetes. On top of that, it provides a manifest version management system to be able to upgrade or revert changes made to an application.
Conceptually, user provide a values.yaml file that is actually a parameter to solve templates and create manifests. For more information about helm, see official documentation.
Requirements
This guide require at least helm’s tools installed on host. However it is strongly encourage the have kubectl and a kubernetes cluster with empty namespace ready to apply install and have a clear result of what is happening.
Setup repository
Helm uses a list of versioned repositories to keep all versions of a chart. First, install a custom repository:
helm repo add <repo-name> <url>
helm repo update
Hint
To install SDN’s repo:
helm repo add osp-helm https://nexus.onsphere.ch/repository/osp-helm/ --password-stdin --username-stdin
It is also possible to directly use a tar version of the package without installing the repo but it won’t be covered by this guide.
Values files
Values are very key point of helm usage. They are used to override defaults installation with custom settings. A very important thing to note is that a valid values file that contains all default is always available using this helm command:
helm show values osp-helm/onsphere --version <set-a-version-to-install> > values.yml
Custom values file
Most of helm installation require customization. This is done by passing a Yaml file that contains configuration for deployment.
Let’s start by setting a registry and a version for OnSphere docker images:
1registry: "nexus.onsphere.ch"
2version: "<onsphere-version>"
Hint
Replace <onsphere-version> by the version to install. Latest is: 2.1.2
Then we insert an ssh key into authorized_keys of the dispatcher to be able to clone the configuration without entering a password. To do that add an element in array authorizedKeys that contains your public key. Usually you can find it in ~/.ssh/id_rsa.pub (Linux).
1registry: "nexus.onsphere.ch"
2version: "<onsphere-version>"
3authorizedKeys:
Finally, modules has to be explicitly set to present to be created. By default all modules has a sample of instance in map modulesConfiguration that can be enable to be created with default configuration but it absolutely possible to create a completely custom one.
1registry: "nexus.onsphere.ch"
2version: "<onsphere-version>"
3authorizedKeys:
4- ssh-rsa AAAAB3NzaC1yc2... foo@bar-workstation
5modulesConfiguration:
6 configuration_dispatcher-1:
7 present: true
8 keycloak-1:
9 present: true
10 rabbitmq-1:
11 present: true
12 mysql-1:
13 present: true
14 rights-1:
15 present: true
All configuration is now complete and the only thing left is to run the installation and let Helm do its job:
helm install <choose-a-name> osp-helm/onsphere --version <set-a-version-to-install>
All resources are now being created. It is possible to check verify module creation using kubectl :
kubectl get deployment
This is a very minimal configuration to get started with module configuration. To discover all Helm capabilities, see helm chart values references.