...
As part of this walkthrough, it is important to note that the items chosen for deployment via Helm, can be added or removed as seen fit, given the chosen configuration of the environment. For instance, Spring Cloud Configuration Server, which is the backing configuration mechanism for ModelOp Center. If You can find additional information regarding advanced configurations in the "Additional Configuration" section of this documentation.
...
Ensure that a Kubernetes cluster has been allocated and is running, available, and usable with credentials that have adequate access. This will be likely managed by enterprise IT, whereby either an existing cluster or a new one is made available to use. Please ensure that this step is completed, though the following steps can be accomplished in parallel to having the Kubernetes cluster created/allocated. The link to installing Kubernetes has been provided below, though as mentioned, a specific enterprise team will likely create the cluster/infrastructure.
Ensure that the utility
kubectl
is installed and functional on the workstation or chosen jumpbox/server. Installation of the utility can be accomplished by following the guide here: https://kubernetes.io/docs/tasks/tools/Ensure that a context is properly set so that connectivity can be established with your cluster following this guide: https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/
To ensure that
kubectl
is working correctly, the output of the following command should result in the displaying of the namespaces for the context in which you are operating:kubectl get namespaces
Note that if this command is not generating output correctly, please invoke the assistance of your enterprise support teams to assist in the installation.Ensure that Helm is installed and operational by following the guide found here: https://helm.sh/docs/intro/install/
To test that Helm is ready and available, please run:
helm version
which should generate output similar to:version.BuildInfo{Version:"v3.9.0", GitCommit:"7ceeda6c585217a19a1131663d8cd1f7d641b2a7", GitTreeState:"clean", GoVersion:"go1.18.2"}
Ensure that the version of Helm that is currently being used is 3.0+. e.g.
Version:"v3.9.0"
Windows
It is strongly recommended that the aforementioned commands be run using WSL: https://learn.microsoft.com/en-us/windows/wsl/about
Useful Links
Kubernetes Installation Documentation:
https://kubernetes.io/docs/setup/
Kubectl Installation Documentation:
https://kubernetes.io/docs/tasks/tools/
Creating a kube-config Context using kubectl:
https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/
Helm Installation Documentation:
https://helm.sh/docs/intro/install/
ModelOp DockerHub Repository:
https://hub.docker.com/u/modelop
Getting the Helm Charts
There are two methods for fetching the Helm Charts may be acquired from ModelOp , either by requesting a tar .gz tgz compressed file of the content of the Git repository where the Helm Charts reside chart from your ModelOp Account Executive or Sales Engineer, which will be delivered via bucket link.
Bring the ModelOp Center Helm Charts onto the workstation or the operating system with both the kubectl
and helm
utilities installed, as per the previous section.
From With the provided tar.gz file: tar -xvf helmmoc-installer.tar.gz
Despite which method of retrieving the Helm Charts is chosen, the directory helm-installer
will be created with a number of files and folders inside in the directory where the tar
command is executed[version].tgz
This will create a directory named moc
which contains the chart.
Configure Helm Charts
Before deploying an instance of ModelOp Center, choices need to be made in specific configuration files related to which services are deployed, which affects how ModelOp utilizes enterprise resources in a variety of fashions. Prior to understanding which files to modify, it is important to understand the directory structure of the Helm Charts, please read through the following items.
The "installer" directory moc
directory is the chart itself, and contains all of the necessary files for installing using Helm.
Within the "installer" directory, the installer/The moc
directory contains a scripts
subdirectory, which contains a generatePullSecrets.sh
script is that can be used to generate secrets within Kubernetes in order to allow the cluster to import images.
The installer/3.0-sccs-compat.yaml
file contains certain default settings for a ModelOp Center v.3.0 installation which include SCCS (Spring Cloud Configuration Server) which is used as the backing configuration service for ModelOp services.
The installer/moc
directory is a default configuration ModelOp Center deployment, using database pods to support the core application of ModelOp Center. It is suggested that a copy of this directory be made for every release that would need to be deployed. e.g. cp -R installer/moc installer/example-release
This directory can be referred to as an "environment", and each environment directory can be used to deploy any number of Helm "releases", which is the way Helm manages deployed applications to Kubernetes.
Within the copied directory, there are a number of files that are created, but at the root of the environment directory there are two primary files:
moc/starter/
directory contains a simple.yaml
file that can serve as the starting point for customizing your MOC deployment via Helm. It is recommended that you copy this file outside the chart and add/modify configuration only in this file, leaving the contents of the moc
directory untouched.
moc/values.yaml
contains the bulk majority of the configurations that will need to be modified and made specific to the environment they are targeting. Please find information related to Again, it is not recommended that the values
file here: https://helm.sh/docs/chart_best_practices/values/ .yaml
file be modified. Rather, the simple.yaml
file should be filled out with whatever values you wish to override.
Chart.yaml
contains details about what will describe the release once installed, it is a place to track details on what is deployed.
The my-config
sccs
directory contains all of the base yaml files that will be used by Spring Cloud Configuration Server to configure the ModelOp Center application.
Modifying the values.yaml
file is necessary to tailor the installation to the targeted environment. The main section of values.yaml
that should be modified is moc
, which contains a number of key/values that need to be set to adjust the deployment to specific needs. Please refer both to the following documentation, with general guidelines on the sections, as well as the in-line comments that are part of the file itself.Please refer to the document Configuring values.yaml
before proceeding to the section "Complete the Installation"
...
Please only begin this section after having tailored the valuessimple.yaml
file to the specific deployment needs.
...
Code Block |
---|
$ ./generatePullSecrets.sh --apply Enter username: modelopdevops Enter password: secret/modelop-regcreds created |
Update the contents of the simple.yaml
file to reflect your desired version and namespace:
Code Block |
---|
moc:
namespace: my-moc-namespace
version: "3.1" |
Then trigger the installation by running the following command from the installer
directory inside the helm-installer
directory that was providedthat contains the moc
directory:
helm install RELEASENAME DIRECTORY --set moc .version=DESIREDVERSION --namespace TARGETNAMESPACE -f 3.0-sccs-compat.simple.yaml
Whereby:
RELEASENAME
= The name given to the release, tracked by Helm, which can be anything relevant to the deployment itself. e.g. "moc-dev-helm1" Please see the following documentation that describes the concept of a Helm Release: https://helm.sh/docs/intro/using_helm/#three-big-concepts DIRECTORY
=
The directory moc
in which the targeted Chart.yaml resides, no slashes necessary. e.g. "moc-dev"
DESIREDVERSION
= The version of ModelOp Center desired for the Helm deployment. e.g. "3.0"
TARGETNAMESPACE
= The namespace into which you would like to deploy ModelOp Center within your current context in Kubernetes.
Example command structure:
helm install moc-test-rel1 moc-test --set moc.version=3.0 --namespace moc-test-1 -f 3.0-sccs-compat.yaml
This example command assumes the existence of the directory %helm-installer/installer/moc-test
which is a copy of the %helm-installer/installer/moc
directory with all values changed to what is desired for the environmentthe above command is referencing the local moc
subdirectory.
Output will resemble this example:
...
To fetch the IP of the ModelOp Gateway pod, simply ensure you are in the targeted namespace chosen for deployment, and use the following command:
Code Block |
---|
`$$ kkubectl get services | grep gateway`gateway |
Output should resemble the following as an example:
Code Block |
---|
$ kkubectl get services | grep gateway gateway LoadBalancer 10.100.8.109 abb3888bb91fc49d5a101f1a1340d5b8-116610426.us-east-2.elb.amazonaws.com 8090:30285/TCP 70d |
...