mirror of
https://github.com/ansible/awx-operator.git
synced 2026-03-26 21:33:14 +00:00
Add development mode for AWX
This commit is contained in:
@@ -46,11 +46,10 @@ After a few minutes, your new AWX instance will be accessible at `http://awx.myc
|
||||
|
||||
### Deploying a specific version of AWX
|
||||
|
||||
You can pass AWX Task and Web Container images to control which version of AWX is to be deployed. To achieve this, please add following to variables under spec within your CR (Custom Resource) file:
|
||||
To achieve this, please add the following variable under spec within your CR (Custom Resource) file:
|
||||
|
||||
```yaml
|
||||
tower_task_image: ansible/awx:15.0.0 # replace this with desired image
|
||||
tower_web_image: ansible/awx:15.0.0 # replace this with desired image
|
||||
tower_image: ansible/awx:15.0.0 # replace this with desired image
|
||||
```
|
||||
You may also override any default variables from `roles/awx/defaults/main.yml` using the same process, i.e. by adding those variables within your CR spec.
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
- name: Deploy AWX
|
||||
k8s:
|
||||
state: "{{ state | default('present') }}"
|
||||
namespace: awx
|
||||
namespace: default
|
||||
apply: yes
|
||||
wait: yes
|
||||
definition:
|
||||
@@ -22,4 +22,7 @@
|
||||
tower_admin_email: test@example.com
|
||||
tower_admin_password: changeme
|
||||
tower_broadcast_websocket_secret: changeme
|
||||
tower_ingress_type: Route
|
||||
tower_ingress_type: "{{ tower_ingress_type | default(omit) }}" # Either Route or Ingress
|
||||
tower_image: "{{ tower_image | default(omit) }}"
|
||||
development_mode: "{{ development_mode | default(omit) }}"
|
||||
tower_image_pull_policy: "{{ tower_image_pull_policy | default(omit) }}"
|
||||
|
||||
@@ -15,8 +15,7 @@ spec:
|
||||
tower_admin_email: test@example.com
|
||||
tower_admin_password: changeme
|
||||
|
||||
tower_task_image: ansible/awx:15.0.0
|
||||
tower_web_image: ansible/awx:15.0.0
|
||||
tower_image: ansible/awx:15.0.0
|
||||
|
||||
tower_task_mem_request: 1Gi
|
||||
tower_task_cpu_request: 500m
|
||||
|
||||
@@ -15,8 +15,7 @@ spec:
|
||||
tower_admin_email: test@example.com
|
||||
tower_admin_password: changeme
|
||||
|
||||
tower_task_image: ansible/awx:15.0.0
|
||||
tower_web_image: ansible/awx:15.0.0
|
||||
tower_image: ansible/awx:15.0.0
|
||||
|
||||
tower_task_mem_request: 128M
|
||||
tower_task_cpu_request: 500m
|
||||
|
||||
@@ -25,11 +25,10 @@ metadata:
|
||||
"tower_postgres_storage_request": "8Gi",
|
||||
"tower_redis_image": "redis:latest",
|
||||
"tower_task_cpu_request": "500m",
|
||||
"tower_task_image": "ansible/awx:15.0.0",
|
||||
"tower_image": "ansible/awx:15.0.0",
|
||||
"tower_task_mem_request": "1Gi",
|
||||
"tower_task_privileged": false,
|
||||
"tower_web_cpu_request": "1000m",
|
||||
"tower_web_image": "ansible/awx:15.0.0",
|
||||
"tower_web_cpu_request": "1000m"
|
||||
"tower_web_mem_request": "2Gi"
|
||||
}
|
||||
},
|
||||
@@ -55,11 +54,10 @@ metadata:
|
||||
"tower_postgres_storage_request": "8Gi",
|
||||
"tower_redis_image": "redis:latest",
|
||||
"tower_task_cpu_request": "500m",
|
||||
"tower_task_image": "ansible/awx:15.0.0",
|
||||
"tower_image": "ansible/awx:15.0.0",
|
||||
"tower_task_mem_request": "128M",
|
||||
"tower_task_privileged": false,
|
||||
"tower_web_cpu_request": "500m",
|
||||
"tower_web_image": "ansible/awx:15.0.0",
|
||||
"tower_web_mem_request": "128M"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,14 +27,9 @@ tower_broadcast_websocket_secret: changeme
|
||||
# emptyDir: {}
|
||||
tower_extra_volumes: ''
|
||||
|
||||
# Use these image versions for Ansible Tower.
|
||||
# tower_task_image: registry.redhat.io/ansible-tower-37/ansible-tower-rhel7:3.7.0
|
||||
# tower_web_image: registry.redhat.io/ansible-tower-37/ansible-tower-rhel7:3.7.0
|
||||
|
||||
# Use these image versions for Ansible AWX.
|
||||
|
||||
tower_task_image: ansible/awx:15.0.0
|
||||
tower_web_image: ansible/awx:15.0.0
|
||||
tower_image: ansible/awx:15.0.0
|
||||
tower_image_pull_policy: IfNotPresent
|
||||
|
||||
tower_create_preload_data: true
|
||||
@@ -83,3 +78,5 @@ tower_postgres_data_path: '/var/lib/postgresql/data/pgdata'
|
||||
tower_postgres_port: 5432
|
||||
|
||||
ca_trust_bundle: "/etc/pki/tls/certs/ca-bundle.crt"
|
||||
|
||||
development_mode: false
|
||||
|
||||
@@ -39,7 +39,7 @@ spec:
|
||||
readOnly: true
|
||||
- name: {{ meta.name }}-redis-socket
|
||||
mountPath: "/var/run/redis"
|
||||
- image: '{{ tower_web_image }}'
|
||||
- image: '{{ tower_image }}'
|
||||
name: '{{ meta.name }}-web'
|
||||
{% if tower_web_command %}
|
||||
command: {{ tower_web_command }}
|
||||
@@ -74,18 +74,28 @@ spec:
|
||||
mountPath: "/var/run/awx-rsyslog"
|
||||
- name: rsyslog-dir
|
||||
mountPath: "/var/lib/awx/rsyslog"
|
||||
{% if development_mode | bool %}
|
||||
- name: awx-devel
|
||||
mountPath: "/awx_devel"
|
||||
{% endif %}
|
||||
{% if tower_web_extra_volume_mounts -%}
|
||||
{{ tower_web_extra_volume_mounts | indent(width=12, indentfirst=True) }}
|
||||
{% endif %}
|
||||
{% if tower_task_extra_env %}
|
||||
{% if (development_mode | bool) or (tower_task_extra_env | bool) %}
|
||||
env:
|
||||
{% endif %}
|
||||
{% if development_mode | bool %}
|
||||
- name: AWX_KUBE_DEVEL
|
||||
value: "1"
|
||||
{% endif %}
|
||||
{% if tower_task_extra_env %}
|
||||
{{ tower_web_extra_env | indent(width=12, indentfirst=True) }}
|
||||
{% endif %}
|
||||
resources:
|
||||
requests:
|
||||
memory: '{{ tower_web_mem_request }}'
|
||||
cpu: '{{ tower_web_cpu_request }}'
|
||||
- image: '{{ tower_task_image }}'
|
||||
- image: '{{ tower_image }}'
|
||||
name: '{{ meta.name }}-task'
|
||||
imagePullPolicy: '{{ tower_image_pull_policy }}'
|
||||
{% if tower_task_privileged == true %}
|
||||
@@ -118,6 +128,10 @@ spec:
|
||||
mountPath: "/var/run/awx-rsyslog"
|
||||
- name: rsyslog-dir
|
||||
mountPath: "/var/lib/awx/rsyslog"
|
||||
{% if development_mode | bool %}
|
||||
- name: awx-devel
|
||||
mountPath: "/awx_devel"
|
||||
{% endif %}
|
||||
{% if tower_task_extra_volume_mounts -%}
|
||||
{{ tower_task_extra_volume_mounts | indent(width=12, indentfirst=True) }}
|
||||
{% endif %}
|
||||
@@ -134,6 +148,10 @@ spec:
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: status.podIP
|
||||
{% if development_mode | bool %}
|
||||
- name: AWX_KUBE_DEVEL
|
||||
value: "1"
|
||||
{% endif %}
|
||||
{% if tower_task_extra_env -%}
|
||||
{{ tower_task_extra_env | indent(width=12, indentfirst=True) }}
|
||||
{% endif %}
|
||||
@@ -182,6 +200,11 @@ spec:
|
||||
emptyDir: {}
|
||||
- name: rsyslog-dir
|
||||
emptyDir: {}
|
||||
{% if development_mode | bool %}
|
||||
- name: awx-devel
|
||||
hostPath:
|
||||
path: /awx_devel
|
||||
{% endif %}
|
||||
{% if tower_extra_volumes -%}
|
||||
{{ tower_extra_volumes | indent(width=8, indentfirst=True) }}
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user