awx

by NOVUM-RGI

Helm chartv0.1.6App 15.0.0

Helm chart for AWX 15.0.0

About this chart

AWX Helm chart

AWX provides a web-based user interface, REST API, and task engine built on top of Ansible. It is the upstream project for Tower, a commercial derivative of AWX.

This chart supports AWX version 12.0.0 and above and currently defaults to 14.0.0

The chart is based on the original AWX ansible repository: https://github.com/ansible/awx

Installation

  helm repo add novum-rgi-helm https://novumrgi.github.io/helm/
  helm install gitea novum-rgi-helm/awx

Dependencies

AWX can be run with external database. This chart provides a database (postgresql from bitnami) as dependency, which can be enabled via configuration

Prerequisites

  • Kubernetes 1.12+
  • Helm 3.0+

Examples

LDAP

To configure LDAP for AWX a list of ldap configurations is required. AWX supports up to 6 LDAP configurations. The passed list with LDAP configurations goes from 0: default to 6. (LDAP Optional 1-5)

Complete documentation can be found in the AWX API <your_url>/api/v2/settings/ldap/

awx:
  ldap:
  - enabled: true
    subTree: false
    tls: false
    host: ldap://ldap.example.com:389
    bindDn: CN=ldap read,OU=Spezial,DC=example,DC=com
    bindPassword: awxPassword123
    userSearch: 
      - "OU=Users,DC=northamerica,DC=acme,DC=com"
      - "SCOPE_SUBTREE"
      - "(sAMAccountName=%(user)s)"
    groupSearch: 
      - "dc=example,dc=com"
      - "SCOPE_SUBTREE"
      - "(objectClass=group)"
    userDnTemplate: uid=%(user)s,OU=Users,DC=example,DC=com
    denyGroup: CN=Disabled Users,OU=Users,DC=example,DC=com
    requireGroup: CN=Tower Users,OU=Users,DC=example,DC=com
    userAttributeMap: |
      {
        "first_name": "givenName",
        "last_name": "sn",
        "email": "mail"
      }
    groupTypeParams: |
      {
        "name_attr": "cn",
        "member_attr": "member"
      }
    flagsByGroup: |
      {
        "is_superuser": ["n=superusers,ou=groups,dc=website,dc=com"],
        "is_system_auditor": ["cn=auditors,ou=groups,dc=website,dc=com"]
      }
    orgMap: |
      {
        "LDAP Organization": {
          "admins": "cn=engineering_admins,ou=groups,dc=example,dc=com",
          "remove_admins": False,
          "users": [
            "cn=engineering,ou=groups,dc=example,dc=com",
            "cn=sales,ou=groups,dc=example,dc=com",
            "cn=it,ou=groups,dc=example,dc=com"
          ],
          "remove_users": False
        }
      }
    teamMap: |
      {
        "LDAP Engineering": {
          "organization": "LDAP Organization",
          "users": "cn=engineering,ou=groups,dc=example,dc=com",
          "remove": True
        }
      }

Configuration

Image

ParameterDescriptionDefault
image.repositorySet the repo from where to get the awx image.ansible/awx
image.tagImage Tag to download14.0.0
image.pullPolicyImage pull policyAlways

Ingress

ParameterDescriptionDefault
ingress.enabledenable ingressfalse
ingress.annotationsadd ingress annotations
ingress.hostsadd hosts for ingress as string listgit.example.com
ingress.tlsadd ingress tls settings[]

Service

ParameterDescriptionDefault
service.typeKubernetes service typeClusterIP
service.portPort for web traffic8052
service.annotationsAdditional ssh annotations for the ssh service

Resources

ParameterDescriptionDefault
resources.web.limits.cpucpu limit for web container
resources.web.limits.memorymemory limit for web container
resources.web.requests.cpucpu request for web container
resources.web.requests.memorymemory request for web container
resources.task.limits.cpucpu limit for task container
resources.task.limits.memorymemory limit for task container
resources.task.requests.cpucpu request for task container1500m
resources.task.requests.memorymemory request for task container, only use Mi here since it is parsed in the task configmap2048Mi
resources.redis.limits.cpucpu limit for redis container
resources.redis.limits.memorymemory limit for redis container
resources.redis.requests.cpucpu request for redis container
resources.redis.requests.memorymemory request for redis container

AWX

ParameterDescriptionDefault
awx.adminUserUsername for awx admin accountadmin
awx.adminPasswordUserpassword for awx admin accountawxPassword123
awx.adminMailMail address for awx admin account[email protected]
awx.secretKeySecret key for AWX, change this to be secureqQoYusTYgMLThyQH
awx.ldaplist of ldap settings, described in[]
awx.metrics.enabledenable metricsfalse
awx.metrics.annotationsannotations for prometheus metricsprometheus.io/scrape: "true"prometheus.io/port: "9090"
awx.metrics.serviceMonitor.enabledEnable serviceMonitor for Prometheus operatorfalse
awx.metrics.serviceMonitor.scrapeTimeoutScrape timeout for serviceMonitor30s
awx.metrics.serviceMonitor.intervalinterval time for serviceMonitor30s
awx.metrics.serviceMonitor.relabellingsRelabellings for serviceMonitor
awx.metrics.serviceMonitor.honorLabelsEnabled or disable Honor Labels for service Monitorfalse
awx.metrics.serviceMonitor.additionalLabelsAdd additional labels to serviceMonitor{}
awx.redis.imageSelect image to load for redis containerredis
awx.redis.tagSelect redis image tag to load for redis containerlatest
awx.database.builtIn.enabledUse postgresql dependency database, no need to configure anymoretrue
awx.database.usernameUsername for external database, only used if builtIn is false
awx.database.nameDatabase name for external database, only used if builtIn is false
awx.database.passwordPassword for external database, only used if builtIn is false
awx.database.hostAddress for external database, only used if builtIn is false
awx.database.portPort for external database, only used if builtIn is false
awx.insights.urlBaseTBDhttps://awx.example.com
awx.insights.agentMimeTBDapplication/example
awx.insights.automationAnalyticsUrlTBDhttps://awx.example.com
awx.containerGroupDefaultImageTBDansible/ansible-runner
awx.candlePin.hostTBD
awx.candlePin.verifyTBD

Postgresql

Postgresql is loaded as a dependency from bitnami. Configuration can be found from this Bitnami

The following parameters are the defaults set by this chart

ParameterDescriptionDefault
postgresql.global.postgresql.postgresqlDatabasePostgreSQL database (overrides postgresqlDatabase)awx
postgresql.global.postgresql.postgresqlUsernamePostgreSQL username (overrides postgresqlUsername)awx
postgresql.global.postgresql.postgresqlPasswordPostgreSQL admin password (overrides postgresqlPassword)awx
postgresql.global.postgresql.servicePortPostgreSQL port (overrides service.port)5432
postgresql.persistence.sizePVC Storage Request for PostgreSQL volume20Gi

Deploy awx with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has awx on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartawx is pinned at v0.1.6 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply