Skip to content

About

Instructions and examples for deploying InetSoft into Docker and Kubernetes.

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

22 Commits

Folders and files

Repository files navigation

Deploying InetSoft in Docker and Kubernetes

InetSoft provides a set of images designed for use in Docker or deployment to a Kubernetes cluster. InetSoft only supports Docker and Kubernetes using these images. Customer-developed images will not be supported as part of the standard support contract.

To be able to use the Docker images, you need to contact InetSoft support and request access to the Docker registry. You will receive an email containing a temporary password and a link. Open the link in a web browser, log in using the temporary password, and then enter a new password. Once that is complete, you will be prompted to enter a username for the Docker registry. Please use your first name and last name, all lowercase with no spaces.

Choose a username

After clicking save, open your user profile:

Open your user profile

Copy the "CLI Secret" field from this screen.

Copy CLI secret

You can then use the username and copied secret to log into the docker registry:

docker login docker.inetsoft.com -u your_username -p your_cli_secret

Clone this repository to your local machine and change to its directory:

git clone https://github.com/inetsoft-technology/docker-k8s-config.git
cd docker-k8s-config

Set the INETSOFT_LICENSE and INETSOFT_MASTER_PASSWORD environment variables:

export INETSOFT_LICENSE=your_server_license
export INETSOFT_MASTER_PASSWORD=a_strong_password

Alternatively, you can create a .env file containing these variables:

.env
INETSOFT_LICENSE=your_server_license
INETSOFT_MASTER_PASSWORD=a_strong_password

Create the directory in which the configuration will be saved:

mkdir shared

Finally, run the Docker Compose application:

docker-compose up -d

The application will be accessible at http://localhost:8080/. The shared directory in the current directory will contain the persistent configuration files.

First, create a namespace for the application. The quickstart examples use the inetsoft namespace.

kubectl create namespace inetsoft

Next, create a secret containing the credentials for the InetSoft Docker registry.

kubectl -n inetsoft create secret docker-registry inetsoft-docker-secret \
  --docker-server=docker.inetsoft.com \
  --docker-username=your_username \
  --docker-password=your_cli_secret

There are two types of example deployments: a single server deployment and a server cluster deployment.

The single server example deploys one scheduler and one server instance.

Create an overlay directory for the example deployment.

mkdir -p overlays/single

Create the Kustomize configuration for the overlay at overlays/single/kustomization.yaml with the following content:

overlays/single/kustomization.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: inetsoft
bases:
  - ../../single
secretGenerator:
  - name: inetsoft
    behavior: merge
    envs:
      - secrets.properties

Override the master password and license key secrets with a unique password and your server license key, respectively. Put these in the overlays/single/secrets.properties file.

overlays/single/secrets.properties
INETSOFT_MASTER_PASSWORD=a_strong_password
INETSOFT_LICENSE=your_server_license_key

As configured, the example uses the standard storage class for Minikube. If your cluster uses a different storage class for dynamic provisioning, you’ll need to override this in the pvc-mysql.yaml and pvc-shared.yaml files. For example, if you are using a NFS provisioner with the storage class nfs-client, create a file named overlays/single/pvc-mysql.yaml with the following content:

overlays/single/pvc-mysql.yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: inetsoft-mysql-pvc
spec:
  storageClassName: nfs-client

Then create a file named overlays/single/pvc-shared.yaml with the following content:

overlays/single/pvc-shared.yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: inetsoft-shared-pvc
spec:
  storageClassName: nfs-client

Then, append the following to overlays/single/kustomization.yaml:

overlays/single/kustomization.yaml
patchesStrategicMerge:
  - pvc-mysql.yaml
  - pvc-shared.yaml

You can verify the final configuration by running:

kubectl kustomize overlays/single

Deploy the application to Kubernetes by running:

kubectl apply -k overlays/single

If you’re running in Minikube, open a new terminal window and run:

minikube tunnel

You will see output like:

Status:
	machine: minikube
	pid: 116635
	route: 10.96.0.0/12 -> 192.168.49.2
	minikube: Running
	services: [inetsoft-server]
    errors:
		minikube: no errors
		router: no errors
		loadbalancer emulator: no errors

Make note of the address on the right-hand side of the route. In this example, it is 192.168.49.2. Get the service port by running:

kubectl -n inetsoft get service

You will see output like:

NAME              TYPE           CLUSTER-IP      EXTERNAL-IP     PORT(S)          AGE
inetsoft-mysql    ClusterIP      10.107.139.33   <none>          3306/TCP         102s
inetsoft-server   LoadBalancer   10.97.182.120   10.97.182.120   8080:31542/TCP   102s

Get the external port number for the inetsoft-server service. In this example, the port number is 31542. Use the IP address and port number to access the InetSoft server. In this example, this would be http://192.168.49.2:31542/.

Remove the application by running:

kubectl delete -k overlays/single

The cluster example deploys two server instances and a scheduler instance. This requires a pooled (concurrent session or named user license) or two CPU licenses for two cores each.

If you’re using Minikube, you’ll need to enable the ingress and ingress-dns addons.

❗
The default configuration of Minikube may be insufficient to run the cluster. You may need to increase the number CPUs and memory allocated to Minikube.

Create an overlay directory for the example deployment.

mkdir -p overlays/cluster

Create the Kustomize configuration for the overlay at overlays/cluster/kustomization.yaml with the following content:

overlays/cluster/kustomization.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: inetsoft
bases:
  - ../../cluster
secretGenerator:
  - name: inetsoft
    behavior: merge
    envs:
      - secrets.properties

Override the master password and server license key with a unique password and your server license key, respectively. Put these in the overlays/cluster/secrets.properties file.

overlays/cluster/secrets.properties
INETSOFT_MASTER_PASSWORD=a_strong_password
INETSOFT_LICENSE=your_server_license_key

As configured, the example uses the standard storage class for Minikube. If your cluster uses a different storage class for dynamic provisioning, you’ll need to override this. For example, if you are using a NFS provisioner with the storage class nfs-client, create a file named overlays/cluster/pvc-mysql.yaml with the following content:

overlays/cluster/pvc-mysql.yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: inetsoft-mysql-pvc
spec:
  storageClassName: nfs-client

Create a file named overlays/cluster/pvc-shared.yaml with the following content:

overlays/cluster/pvc-shared.yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: inetsoft-shared-pvc
spec:
  storageClassName: nfs-client

Create a file named overlays/cluster/statefulset-server.yaml with the following content:

overlays/cluster/statefulset-server.yaml
apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: inetsoft-server
spec:
  volumeClaimTemplates:
    - metadata:
        name: inetsoft-mv
      spec:
        storageClassName: nfs-client

Create a file named overlays/cluster/statefulset-scheduler.yaml with the following content:

overlays/cluster/statefulset-scheduler.yaml
apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: inetsoft-scheduler
spec:
  volumeClaimTemplates:
    - metadata:
        name: inetsoft-mv
      spec:
        storageClassName: nfs-client

Then, append the following to overlays/cluster/kustomization.yaml:

overlays/cluster/kustomization.yaml
patchesStrategicMerge:
  - pvc-mysql.yaml
  - pvc-shared.yaml
  - statefulset-server.yaml
  - statefulset-scheduler.yaml

By default, the ingress is mapped to the inetsoft.your-company.com host. If you want to change this, create a file named overlays/cluster/config.properties with the following content:

overlays/cluster/config.properties
INETSOFT_PROXY_URL=http://your_host_name

Then create a file named overlays/cluster/ingress.yaml with the following content:

overlays/cluster/ingress.yaml
- op: replace
  path: /spec/rules/0/host
  value: your_hostname

Edit the overlays/cluster/kustomization.yaml file and append the following:

overlays/cluster/kustomization.yaml
configMapGenerator:
  - name: inetsoft
    behavior: merge
    envs:
      - config.properties
patches:
  - target:
      kind: Ingress
      name: inetsoft-ingress
    path: ingress-patch.yaml

You can verify the final configuration by running:

kubectl kustomize overlays/cluster

Deploy the application to Kubernetes by running:

kubectl apply -k overlays/cluster

You can now access the InetSoft server using the ingress hostname. By default, this is http://inetsoft.your-company.com/.

Remove the application by running:

kubectl delete -k overlays/cluster

About

Instructions and examples for deploying InetSoft into Docker and Kubernetes.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors