Installing ModelOp Center Using Helm

Introduction

This guide has as a purpose to guide the user through the steps necessary to deploy ModelOp Center from end to end. It will involve creating resources in Kubernetes, ensuring that specific utilities and docker images are available to support the installation, as well as walking through and understanding the configuration items in the Helm Charts that are provided by ModelOp. Note that access to any ModelOp resources, e.g. Docker images, is dependent on having been provided access after having been onboarded as a ModelOp customer.

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. You can find additional information regarding advanced configurations in the "Additional Configuration" section of this documentation.

Pre-Requisites

Before beginning, determining which environment ModelOp Center will be deployed into will be important. If this installation is occurring locally, or in a development environment, ModelOp suggests making use of Docker Desktop with Kubernetes enabled if possible to test deploying with Helm prior to targeting a full-fledged Kubernetes cluster, please see the Docker Desktop installation and documentation here: https://www.docker.com/products/docker-desktop/

There are a few key items that will need to be available prior to deploying ModelOp Center. Firstly, a Kubernetes cluster that has access to either DockerHub via the web, or an image repository that has the ModelOp Center images stored. Second, a workstation or jumpbox/server that has a properly credentialed and configured kubectl cli utility which allows for interaction with the Kubernetes cluster. Thirdly, the Helm utility, version 3+, will be necessary for deployment. Kubectl will require a properly configured context will be necessary to connect to the Kubernetes cluster, which can be done using the kubectl utility itself. Lastly, the ModelOp Center images will be necessary for the deployment. The images can either be accessed directly from DockerHub, as well as from a repository of your choosing, which may be inside your network as well.

To validate that the above is ready, please complete the following:

  1. 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.

  2. 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/

  3. 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/

  4. 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.

  5. Ensure that Helm is installed and operational by following the guide found here:

  6. 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"}

  7. 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:

Useful Links

Kubernetes Installation Documentation:

Kubectl Installation Documentation:

Creating a kube-config Context using kubectl:

Helm Installation Documentation:


ModelOp DockerHub Repository:

https://hub.docker.com/u/modelop

Helm Primer:

Getting the Helm Charts

Helm Charts may be acquired from ModelOp by requesting a .tgz compressed file of the 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.

With the provided tar.gz file: tar -xvf moc-[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 moc directory is the chart itself, and contains all of the necessary files for installing using Helm.

The moc directory contains a scripts subdirectory, which contains a generatePullSecrets.sh script that can be used to generate secrets within Kubernetes in order to allow the cluster to import images.

The 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. Again, it is not recommended that the 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 sccs directory contains all of the base yaml files that will be used by Spring Cloud Configuration Server to configure the ModelOp Center application.

Pre-Install Utility

Before installing the MOC core services, it is recommended that the Pre-Install utility be installed first.

Complete the Installation

Please only begin this section after having tailored the simple.yaml file to the specific deployment needs.

In order to successfully pull the images intended for the ModelOp Center deployment the generatePullSecrets.sh script performs the addition of credentials into a Kubernetes secret which is leveraged to pull the images down from either DockerHub or an internal Docker image registry. Please refer to the documentation concerning this script in the "Additional Configuration" section. Note that credentials to access DockerHub to pull ModelOp images would be provided by ModelOp, whereas credentials for in-house registries would likely be provided by enterprise IT. To execute, perform the following:

From a shell terminal (bash/zsh): ./generatePullSecrets.sh --apply

Output will be similar to the following:

$ ./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:

moc: namespace: my-moc-namespace version: "3.1"

Then trigger the installation by running the following command from the directory that contains the moc directory:

helm install RELEASENAME moc -f 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:

The moc in the above command is referencing the local moc subdirectory.

Output will resemble this example:

NAME: release LAST DEPLOYED: Tue Jun 7 08:28:01 2022 NAMESPACE: namespace STATUS: deployed REVISION: 1 TEST SUITE: None NOTES: .__ __ _ _ _____ ____ _ | \/ | ___ __| | ___| |/ ____\ _ __ / ___|___ _ __ | |_ ___ _ __ | |\/| |/ _ \ / _` |/ _ \ | / \| '_ \ | | / _ \ '_ \| __/ _ \ '__| | | | | (_) | (_| | __/ || | |_) | | |__| __/ | | | || __/ | |_| |_|\___/ \__,_|\___|_|\\____/| .__/ \____\___|_| |_|\__\___|_| |_| Version3.0 Install complete! The following services have been installed: - sccs - registry - gateway - reporting-service - model-manager - mlc-manager - runtimes - document-service - minio App name: modelop-center Namespace: namespace Profile: noauth

At this point, the instance of ModelOp Center that has been configured, has been deployed, and should be accessible directly by simply accessing the ModelOp Gateway pod's IP address, on port 8090, the default configurable installation port.

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:

Output should resemble the following as an example:

Note the IP address and the port that is allocated by default. To connect to the newly instantiated deployment of ModelOp Center, access the landing page via:

Example using the above output:

The landing page of ModelOp Center, the Dashboard, should be presented after loading. Congratulations, you have just deployed an instance of ModelOp Center! To ensure that all services are visible to the application registry, please consult the "Status" link in the bottom lefthand corner of the landing page of the ModelOp Gateway.