Production Mode

This section provides step-by-step instructions for a production mode setup to deploy Eggplant DAI in Kubernetes containers using Helm. Before progressing, make sure you've followed the Before you Begin section.

Prepare Helm Configuration

You must define values for the required settings in the Helm chart by using a configuration file. Use any text editor to create a file with the following content, replacing each <placeholder> with its appropriate value. The sample file is named as dai.yaml in these instructions, but you can choose a name of your preference. If you're upgrading an existing Eggplant DAI installation, then you should generate this file from your existing installation as described in the Upgrade section.

Note: The file is in YAML format and its .yaml suffix follows the convention for YAML-formatted files.

global:

license: 'license'

serviceToken: '<token>'

jwtSecret: '<secret>'

postgresql:

enabled: false

externalDatabase:

host: '<database hostname>'

user: '<database username>'

password: '<database password>'

port: <database port>

image:

tag: '5.1.0'

ingress:

enabled: true

hostnames:

- '<ingress hostname>'

rabbitmq:

password: '<rabbitmq password>'

erlangCookie: '<rabbitmq cookie>'

persistence:

enabled: true

minio:

persistence:

enabled: true

Where,

  • license is your DAI license key string supplied by Eggplant.
  • <database hostname> <database username> <database password> <database port> are parameters required to access your PostgreSQL database.
  • tag is the version of Eggplant DAI to install. Don’t change this value unless advised to do so by Eggplant.
  • <ingress hostname> is the ingress hostname for your Kubernetes DAI namespace. You must supply this value as appropriate for your Kubernetes cluster.
  • <token> is your DAI service token, as supplied by Eggplant.
  • <secret> is your DAI JWT secret, as supplied by Eggplant.
  • <rabbitmq password> is the password of your choice to use for RabbitMQ.
  • <rabbitmq cookie> is the 30-byte cookie (base-64 encoded) you need to supply for RabbitMQ to use (e.g., to generate: head -c30 /dev/urandom | base64).

For a complete list of values and their defaults see the Values page.

Autoscaling

We recommend using Keda for engine autoscaling. To enable this, add the following setting in your values file:

keda:
enabled: true

You must install Keda V1 before installing the DAI chart.

The default configuration provides two engine replicas, which is configurable using the ai_engine.replicaCount parameter. See the Values table below for more information.

Note: KEDA version 2 is not supported at this time.

Installation

Before installing, ensure that you can access the PostgreSQL database using, for example, the following psql command line:

$ psql -h <database hostname> -U <database username>

Note: Ensure that the database is named the same as <database username>. Please use a password that contains alphanumeric (digits 0 through 9 and letters A through Z, upper and/or lower-case) characters only.

Install the DAI Helm chart using the prepared configuration file, like this:

$ helm install dai eggplant/dai --version 0.7.2 -f dai.yaml --namespace dai

The eggplant/dai chart is installed as a Helm release called (the first parameter) into the Kubernetes namespace, also called dai (the --namespace parameter), using the parameters supplied in the dai.yaml file is used as an example in these instructions, but you can use any name you prefer.

To watch the cluster building, use the following command.

$ watch kubectl get pods

All the items will display as Running after the cluster is built.

After Eggplant DAI is installed, you should use a web browser to access the ingress hostname specified in the configuration file.

 

This topic was last updated on August 19, 2021, at 03:30:47 PM.

Eggplant icon Eggplantsoftware.com | Documentation Home | User Forums | Support | Copyright © 2021 Eggplant