Skip to main content

How to configure Grain with AS400

Grain is deployed through the data-smeup Helm chart. In Argo CD, select this chart and enter your configuration in Helm > Values.

The chart values are grouped by application:

  • kokos configures the Grain runtime and its dispatcher.
  • webup configures the Webup interface.
  • restapi installs the separate legacy RestAPI component. The current Grain APIs are provided by Kokos.

With data-smeup, Kokos is enabled by default, while Webup and the legacy RestAPI component are disabled. The current Grain APIs are therefore already available through Kokos; you do not need to enable restapi to use them. To change which components are installed, set their enabled field:

kokos:
enabled: true

webup:
enabled: false

restapi:
enabled: false

Configure a Grain application​

Dispatcher applications are declared under kokos.dispatcher.apps.apps. The application key (for example, my-app) is the name shown on the WebupJS login screen and is also used in the API path exposed by Kokos.

kokos:
dispatcher:
apps:
apps:
my-app:
libs:
- kokos-dsl-smeup
authentication:
customAuthentication:
enabled: true
serviceName: WE_110_04
serviceParams: ENVIRONMENT(XXX) CCSID(1144)
description: "My Grain environment"

Replace XXX with the IBM i environment to use. The libs entry above uses the kokos-dsl-smeup library configured by the chart.

Optional components​

Webup and the legacy RestAPI are optional components. Enable webup to install the Webup interface, or enable restapi only if your deployment specifically needs the legacy RestAPI component. Their settings belong under webup.webup and restapi.restapi, respectively:

webup:
enabled: true
webup:
cfg:
context: WebUP

restapi:
enabled: true
# Add RestAPI settings under restapi.restapi.

See How to configure Data for more about the values structure, and the Grain installation guide for the Argo CD deployment steps.

Do not store passwords, API keys, or other credentials in a values file committed to a repository. Supply secrets through your deployment's approved secret-management mechanism.