Kubernetes
Deploy AMPS in Kubernetes
Last updated
Deploy AMPS in Kubernetes
Last updated
AMPS can be deployed in a Kubernetes Cluster using the AMPS helm chart. All the tutorials under the Kubernetes section use the following tools:
- A CLI tool for managing and installing Helm charts.
or - CLI tools that manage your Kubernetes Cluster. oc is used in the OpenShift environment, all other environments use kubectl.
After installing helm, add the mftlabs repository by running the following command.
Within the MFTLabs Helm Chart Repository is the AMPS Helm chart. The AMPS Helm chart brings together AMPS and its dependencies, MongoDB and Nats, into a single chart and provides a number of values parameters that can be easily manipulated to configure AMPS. Below is a sample values.yaml file detailing all the configurable options along with their default values. Feel free to copy it and edit the values as you desire. These values parameters are outlined in more detail further below the sample file.
timezone
The fullname of the timezone to set on the AMPS container.
America/Chicago
ui.adminhost
The hostname to route to the admin portal.
admin.localhost
ui.userhost
The hostname to route to the user portal.
localhost
ui.http_port
The port at which to serve the admin and user portals via HTTP.
80
ui.ssl.enabled
Whether to enable SSL for the AMPS UIs.
false
ui.ssl.force
Whether to force and redirect the AMPS UIs to SSL.
false
ui.ssl.port
The port at which to serve the admin and user portals via HTTPS.
443
ui.ssl.gen_certs
Whether AMPS should generate certificates using the configured admin host, user host, and additional domains.
false
ui.ssl.domains
A comma separated list of additional domains to include in the certificate.
ui.ssl.emails
A comma separated list of emails to use when performing SSL certification.
info@agiledatainc.com
certmode
The certificate generation mode to use. “local” generates self-signed certificates for use in development. “production” generates certificates using certbot.
local
ui.ssl.key
A string path to the location of the SSL key on the container used when not using ui.ssl.gen_certs.
ui.ssl.cert
A string path to the location of the SSL certificate on the container used when not using ui.ssl.gen_certs.
ports[]
A list of ports to expose via the “amps-svc-ui” load balancer.
ports[].name
A label for a port configuration.
ports[].protocol
The protocol to use for a port configuration. Should be TCP, UDP, HTTP, or HTTPS
ports[].port
The container port to expose.
ports[].targetPort
The port on which the load balancer should serve the service running on the specified container port.
modules.size
Specifies the size of the modules volume claim.
1Gi
modules.storageClassName
Specifies the storage class to use for modules.
cfg.size
Specifies the size of config volume claim.
1Gi
cfg.storageClassName
Specifies the storage class to use for config.
misc.size
Specifies the size of the miscellaneous directory
1Gi
misc.storageClassName
Specifies the storage class to use for miscellaneous.
db.default
Whether to use the default mongodb chart (true) or instead start a simple single container mongodb deployment (useful in more restrictive environments).
true
db.size
When default is false, specifies the size of the db directory.
20Gi
db.storageClassName
Specifies the storage class to use for the db directory.
defaultStorageClass
Specifies the storage class to default to if a specific storageclass is not set under a particular volume’s configuration. If neither this configuration nor a volume specific storageclass is set, the default cluster storageclass is used.
replicas
The number of replicas of AMPS to create. (Currently only supports 1)
1
archiving.enabled
Whether to also spin up a MinIO cluster to use for S3 archiving. By default creates a bucket named archive. Must be set on chart installation.
existingSecret
By default the chart creates a Kubernetes Secret with the Erlang Cookie and Phoenix Secret Key Base to use for AMPS. Alternatively you can use this configuration to give the name of an existing secret that has a cookie key set to a cryptographically secure, random 32 digit string and a keybase key set to a random cryptographically secure 64 digit string.