Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

Request for Ansible AWX to charts (fix PR #6106) #8085

Closed
wants to merge 33 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
7fbaa23
Add incubator/awx
Najeongho Jun 14, 2018
bff0b3e
AWX deleted
Najeongho Jun 14, 2018
70a12b1
New updated.
Najeongho Jun 14, 2018
ed67aa6
Update pull request Chart (#6106)
Najeongho Jun 15, 2018
4bd9ef5
Update pull request Chart and values (#6106)
Najeongho Jun 15, 2018
87969ae
Update AWX Chart (#6106)
Jun 19, 2018
d688385
Update AWX Chart (#6106)
Jun 19, 2018
52fa3af
Update AWX Chart (#6106)
Jun 19, 2018
ca8541b
Update AWX Chart (#6106)
Jun 19, 2018
776b664
Update AWX Chart (#6106)
Jun 19, 2018
32e82be
Update AWX Chart (#6106)
Jun 19, 2018
4cf4cc6
Update AWX Chart (#6106)
Jun 19, 2018
01e13a3
Update AWX Chart (#6106)
Jun 26, 2018
3528577
Update AWX Chart (#6106)
Jun 29, 2018
2dabd06
Update AWX Chart (#6106)
Jul 18, 2018
08bbfd1
Modify billingType Attribute
Jul 18, 2018
411a182
Update AWX Chart (#6106)
Jul 18, 2018
7bea045
Update AWX Chart (#6106)
Jul 18, 2018
fa1d386
Update AWX Chart (#6106)
Jul 18, 2018
ebf3c6e
Update AWX Chart (#6106)
Jul 18, 2018
8a147fd
Update AWX Chart (#6106)
Jul 18, 2018
0e23d94
Update AWX Chart (#6106)
Jul 18, 2018
d1dafa8
Update AWX Chart (#6106)
Jul 18, 2018
c273cc1
Update AWX Chart (#6106)
Jul 18, 2018
59ec47a
Update AWX Chart (#6106)
Jul 18, 2018
f2912ef
Update AWX Chart (#6106)
Aug 4, 2018
259b8d2
Update AWX Chart (#6106)
Aug 4, 2018
c426f24
Update AWX Chart (#6106)
Aug 4, 2018
e56bef8
Update AWX Chart (#6106)
Aug 4, 2018
f5cab9f
Update AWX Chart (#6106)
Aug 4, 2018
4b8b55e
Update values.yaml
Najeongho Aug 16, 2018
fa5f9ce
Updata values.yaml
Aug 20, 2018
1e17d5a
adding stable image tags
joaocc Oct 1, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions incubator/awx/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea
.idea/
*.tmproj
18 changes: 18 additions & 0 deletions incubator/awx/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: awx
version: 0.0.6
appVersion: 0.0.6
apiVersion: v1
description: AWX provides a web-based user interface, REST API, and task engine built on top of Ansible.
keywords:
- Ansible AWX
- Automation configuration deployment
- Devops
- Web-based GUI
home: https://github.com/ansible/awx
icon: https://www.ansible.com/hubfs/2017_Images/BrandPage/Brand-Assets/Tower/Ansible_RH_AnsibleTower_RGB_RedWhite.svg?t=1528996684045
sources:
- https://github.com/Najeongho/charts/tree/master/incubator/awx
maintainers:
- name: Najeongho
email: skwjdgh1@gmail.com
engine: gotpl
91 changes: 91 additions & 0 deletions incubator/awx/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# AWX

AWX provides a web-based user interface, REST API, and task engine built on top of Ansible.


## TL;DR

```console
$ helm repo add incubator http://storage.googleapis.com/kubernetes-charts-incubator
$ helm install -n awx incubator/awx
```


## Introduction

This chart bootstraps a [AWX](https://github.com/ansible/awx) Deployment on a [Kubernetes](https://kubernetes.io) cluster
using the [Helm](https://helm.sh) package manager. It provisions a fully featured AWX installation.
For more information on AWX and its capabilities, see its [documentation](https://docs.ansible.com/ansible-tower/index.html) and [Docker Hub repository](https://hub.docker.com/u/ansible/).


## Installing the Chart

To install the chart with the release name `awx`:

```console
$ helm install -n awx incubator/awx
```


## Uninstalling the Chart

To uninstall/delete the `awx` deployment:

```console
$ helm delete awx
```


## Configuration

The following table lists the configurable parameters of the AWX chart and their default values.

Parameter | Description | Default
--- | --- | ---
`dbComponent` | DB component label | `database`
`dbImage.repository` | DB image repository | `postgres`
`dbImage.tag` | DB image version | `9.6.2`
`dbUser` | DB username | `awx`
`dbPassword` | DB user password | `awxpass`
`dbDatabaseName` | DB name | `awx`
`dbService.port` | DB service port | `5432`
`persistence.claimName` | DB claim name | `awx-db`
`persistence.mountPath` | DB PV mount path | `/var/lib/postgresql/data`
`persistence.subPath` | DB PV sub-path (with DB file) | `/pgdata`
`persistence.name` | DB persistence volume name | `data`
`queueComponent` | Queue component label | `queue`
`queueImage.repository` | Queue image repository | `rabbitmq`
`queueImage.tag` | Queue image version | `3`
`queueUser` | Queue username | `guest`
`queuePassword` | Queue user password | `guest`
`queueVhost` | Queue application vhost | `awx`
`queueService.port` | Queue service port | `5672`
`cacheComponent` | Cache component label | `cache`
`cacheImage.repository` | Cache image repository | `memcached`
`cacheImage.tag` | Cache image version | `alpine`
`cacheService.port` | Cache service port | `11211`
`taskComponent` | Awx-task component label | `task`
`taskImage.repository` | AWX-task image repository | `ansible/awx_task`
`taskImage.tag` | AWX-task image version | `latest`
`secretKey` | AWX secret key | `aabbcc`
`webComponent` | Web component label | `web`
`webImage.repository` | Web image repository | `ansible/awx_web`
`webImage.tag` | Web image version | `latest`
`webService.type` | Set it to "NodePort". To change to "LoadBalancer" and "Ingress", you can set it after "Portable IP" is preassigned. It is based on IBM Cloud. | `NodePort`
`webService.internalPort` | Set internal port | `80`
`webService.externalPort` | Set external port | `8052`
`ingress.enabled` | If true, an ingress is be created | `false`
`ingress.annotations` | Annotations for the ingress | `{}`
`ingress.path` | Path for backend | `/`
`ingress.hosts` | A list of hosts for the ingresss | `[]`
`ingress.tls.secretName` | If tls is enabled, uses an existing secret with this name | `""`
`ingress.tls.hosts` | A list of hosts for | `""`


Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`.

Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,

```bash
$ helm install --name awx -f values.yaml awx
```
19 changes: 19 additions & 0 deletions incubator/awx/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
1. Get the application URL by running these commands:
{{- if .Values.ingress.enabled }}
{{- range .Values.ingress.hosts }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }}
{{- end }}
{{- else if contains "NodePort" .Values.webService.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "awx.fullname" . }}-{{ .Values.webName }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.webService.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running "kubectl get svc -w {{ template "awx.fullname" . }}-{{ .Values.webName }}"
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "awx.fullname" . }}-{{ .Values.webName }} -o jsonpath="{.status.loadBalancer.ingress[0].ip}")
echo http://$SERVICE_IP:{{ .Values.webService.port }}
{{- else if contains "ClusterIP" .Values.webService.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l app={{ template "awx.name" . }}-{{ .Values.webName }},release={{ .Release.Name }} -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward --namespace {{ .Release.Namespace }} $POD_NAME 8080
{{- end }}
32 changes: 32 additions & 0 deletions incubator/awx/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "awx.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "awx.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}

{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "awx.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
64 changes: 64 additions & 0 deletions incubator/awx/templates/awx-task_deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: {{ template "awx.fullname" . }}-{{ .Values.taskName }}
labels:
app: {{ template "awx.name" . }}
chart: {{ template "awx.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
component: {{ .Values.taskComponent }}
spec:
replicas: {{ .Values.taskReplicaCount }}
selector:
matchLabels:
app: {{ template "awx.name" . }}
release: {{ .Release.Name }}
component: {{ .Values.taskComponent }}
template:
metadata:
labels:
app: {{ template "awx.name" . }}
release: {{ .Release.Name }}
component: {{ .Values.taskComponent }}
spec:
hostname: {{ template "awx.fullname" . }}
containers:
- name: {{ .Values.taskName }}
image: {{ .Values.taskImage.repository }}:{{ .Values.taskImage.tag }}
imagePullPolicy: {{ .Values.taskImage.pullPolicy }}
env:
- name: DATABASE_HOST
value: {{ template "awx.fullname" . }}-{{ .Values.dbName }}
- name: DATABASE_USER
value: {{ .Values.dbUser }}
- name: DATABASE_PASSWORD
value: {{ .Values.dbPassword }}
- name: DATABASE_NAME
value: {{ .Values.dbDatabaseName }}
- name: RABBITMQ_HOST
value: {{ template "awx.fullname" . }}-{{ .Values.queueName }}
- name: RABBITMQ_USER
value: {{ .Values.queueUser }}
- name: RABBITMQ_PASSWORD
value: {{ .Values.queuePassword }}
- name: RABBITMQ_VHOST
value: {{ .Values.queueVhost }}
- name: MEMCACHED_HOST
value: {{ template "awx.fullname" . }}-{{ .Values.cacheName }}
- name: SECRET_KEY
value: {{ .Values.secretKey }}
resources:
{{ toYaml .Values.taskResources | indent 12 }}
{{- with .Values.taskNodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.taskAffinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.taskTolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
45 changes: 45 additions & 0 deletions incubator/awx/templates/cache_deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: {{ template "awx.fullname" . }}-{{ .Values.cacheName}}
labels:
app: {{ template "awx.name" . }}
chart: {{ template "awx.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
component: {{ .Values.cacheComponent }}
spec:
replicas: {{ .Values.cacheReplicaCount }}
selector:
matchLabels:
app: {{ template "awx.name" . }}
release: {{ .Release.Name }}
component: {{ .Values.cacheComponent }}
template:
metadata:
labels:
app: {{ template "awx.name" . }}
release: {{ .Release.Name }}
component: {{ .Values.cacheComponent }}
spec:
containers:
- name: {{ .Values.cacheName }}
image: {{ .Values.cacheImage.repository }}:{{ .Values.cacheImage.tag }}
imagePullPolicy: {{ .Values.cacheImage.pullPolicy }}
ports:
- name: {{ .Values.cacheName }}
containerPort: {{ .Values.cacheService.port }}
resources:
{{ toYaml .Values.cacheResources | indent 10 }}
{{- with .Values.cacheNodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.cacheAffinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.cacheTolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
22 changes: 22 additions & 0 deletions incubator/awx/templates/cache_svc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: v1
kind: Service
metadata:
name: {{ template "awx.fullname" . }}-{{ .Values.cacheName }}
labels:
app: {{ template "awx.name" . }}
chart: {{ template "awx.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
type: {{ .Values.cacheService.type }}
ports:
- name: {{ .Values.cacheName }}
port: {{ .Values.cacheService.port }}
targetPort: {{ .Values.cacheService.port }}
{{- if and (eq "NodePort" .Values.cacheService.type) .Values.cacheService.nodePort }}
nodePort: {{ .Values.cacheService.nodePort }}
{{- end }}
selector:
app: {{ template "awx.name" . }}
release: {{ .Release.Name }}
component: {{ .Values.cacheComponent }}
65 changes: 65 additions & 0 deletions incubator/awx/templates/db_deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: {{ template "awx.fullname" . }}-{{ .Values.dbName }}
labels:
app: {{ template "awx.name" . }}
chart: {{ template "awx.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
component: {{ .Values.dbComponent }}
spec:
replicas: {{ .Values.dbReplicaCount }}
selector:
matchLabels:
app: {{ template "awx.name" . }}
release: {{ .Release.Name }}
component: {{ .Values.dbComponent }}
template:
metadata:
labels:
app: {{ template "awx.name" . }}
release: {{ .Release.Name }}
component: {{ .Values.dbComponent }}
spec:
containers:
- name: {{ .Values.dbName }}
image: {{ .Values.dbImage.repository }}:{{ .Values.dbImage.tag }}
imagePullPolicy: {{ .Values.dbImage.pullPolicy }}
ports:
- name: {{ .Values.dbName }}
containerPort: {{ .Values.dbService.port }}
env:
- name: POSTGRES_USER
value: {{ .Values.dbUser }}
- name: POSTGRES_PASSWORD
value: {{ .Values.dbPassword }}
- name: POSTGRES_DB
value: {{ .Values.dbDatabaseName }}
- name: PGDATA
value: {{ .Values.persistence.mountPath }}{{ .Values.persistence.subPath }}
resources:
{{ toYaml .Values.dbResources | indent 10 }}
volumeMounts:
- name: {{ .Values.persistence.name }}
mountPath: {{ .Values.persistence.mountPath }}
volumes:
- name: {{ .Values.persistence.name }}
{{- if .Values.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ .Values.persistence.claimName | default (include "awx.fullname" .) }}
{{- else }}
emptyDir: {}
{{- end -}}
{{- with .Values.dbNodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.dbAffinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.dbTolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
Loading