diff --git a/docs/user-guide/advanced-configuration/custom-volume-and-volume-mount-options.md b/docs/user-guide/advanced-configuration/custom-volume-and-volume-mount-options.md index af6025c44..95eb81772 100644 --- a/docs/user-guide/advanced-configuration/custom-volume-and-volume-mount-options.md +++ b/docs/user-guide/advanced-configuration/custom-volume-and-volume-mount-options.md @@ -13,7 +13,8 @@ In a scenario where custom volumes and volume mounts are required to either over | init_container_extra_commands | Specify additional commands for Init container | '' | -> :warning: The `ee_extra_volume_mounts` and `extra_volumes` will only take effect to the globally available Execution Environments. For custom `ee`, please [customize the Pod spec](https://docs.ansible.com/ansible-tower/latest/html/administration/external_execution_envs.html#customize-the-pod-spec). +!!! warning + The `ee_extra_volume_mounts` and `extra_volumes` will only take effect to the globally available Execution Environments. For custom `ee`, please [customize the Pod spec](https://docs.ansible.com/ansible-tower/latest/html/administration/external_execution_envs.html#customize-the-pod-spec). Example configuration for ConfigMap @@ -26,62 +27,68 @@ metadata: namespace: data: ansible.cfg: | - [defaults] - remote_tmp = /tmp - [ssh_connection] - ssh_args = -C -o ControlMaster=auto -o ControlPersist=60s + [defaults] + remote_tmp = /tmp + [ssh_connection] + ssh_args = -C -o ControlMaster=auto -o ControlPersist=60s custom.py: | - INSIGHTS_URL_BASE = "example.org" - AWX_CLEANUP_PATHS = True + INSIGHTS_URL_BASE = "example.org" + AWX_CLEANUP_PATHS = True ``` Example spec file for volumes and volume mounts ```yaml --- - spec: - ... - extra_volumes: | - - name: ansible-cfg - configMap: - defaultMode: 420 - items: - - key: ansible.cfg - path: ansible.cfg - name: -extra-config - - name: custom-py - configMap: - defaultMode: 420 - items: - - key: custom.py - path: custom.py - name: -extra-config - - name: shared-volume - persistentVolumeClaim: - claimName: my-external-volume-claim - - init_container_extra_volume_mounts: | - - name: shared-volume - mountPath: /shared - - init_container_extra_commands: | - # set proper permissions (rwx) for the awx user - chmod 775 /shared - chgrp 1000 /shared - - ee_extra_volume_mounts: | - - name: ansible-cfg - mountPath: /etc/ansible/ansible.cfg - subPath: ansible.cfg - - task_extra_volume_mounts: | - - name: custom-py - mountPath: /etc/tower/conf.d/custom.py - subPath: custom.py - - name: shared-volume - mountPath: /shared +spec: + ... + extra_volumes: | + - name: ansible-cfg + configMap: + defaultMode: 420 + items: + - key: ansible.cfg + path: ansible.cfg + name: -extra-config + - name: custom-py + configMap: + defaultMode: 420 + items: + - key: custom.py + path: custom.py + name: -extra-config + - name: shared-volume + persistentVolumeClaim: + claimName: my-external-volume-claim + + init_container_extra_volume_mounts: | + - name: shared-volume + mountPath: /shared + + init_container_extra_commands: | + # set proper permissions (rwx) for the awx user + chmod 775 /shared + chgrp 1000 /shared + + ee_extra_volume_mounts: | + - name: ansible-cfg + mountPath: /etc/ansible/ansible.cfg + subPath: ansible.cfg + + web_extra_volume_mounts: | + - name: custom-py + mountPath: /etc/tower/conf.d/custom.py + subPath: custom.py + + task_extra_volume_mounts: | + - name: custom-py + mountPath: /etc/tower/conf.d/custom.py + subPath: custom.py + - name: shared-volume + mountPath: /shared ``` -> :warning: **Volume and VolumeMount names cannot contain underscores(_)** +!!! warning + **Volume and VolumeMount names cannot contain underscores(_)** ##### Custom UWSGI Configuration We allow the customization of two UWSGI parameters: @@ -143,7 +150,9 @@ $ oc create configmap favicon-configmap --from-file favicon.ico Then specify the extra_volume and web_extra_volume_mounts on your AWX CR spec ```yaml +--- spec: + ... extra_volumes: | - name: favicon configMap: diff --git a/docs/user-guide/advanced-configuration/extra-settings.md b/docs/user-guide/advanced-configuration/extra-settings.md index f798cb967..319cdfd28 100644 --- a/docs/user-guide/advanced-configuration/extra-settings.md +++ b/docs/user-guide/advanced-configuration/extra-settings.md @@ -24,3 +24,7 @@ Example configuration of `extra_settings` parameter ``` Note for some settings, such as `LOG_AGGREGATOR_LEVEL`, the value may need double quotes. + +!!! tip + Alternatively, you can pass any additional settings by mounting ConfigMaps or Secrets of the python files (`*.py`) that contain custom settings to under `/etc/tower/conf.d/` in the web and task pods. + See the example of `custom.py` in the [Custom Volume and Volume Mount Options](custom-volume-and-volume-mount-options.md) section.