Merge pull request #80 from jheinitz/proxy

Tips for adding proxy settings in the AWX containers
This commit is contained in:
kurokobo 2022-05-30 22:26:01 +09:00 committed by GitHub
commit bc7b0b83ed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 31 additions and 0 deletions

View file

@ -277,6 +277,7 @@ Refer [📁 **Back up AWX using AWX Operator**](backup) and [📁 **Restore AWX
- [📝Trust custom Certificate Authority](tips/trust-custom-ca.md) - [📝Trust custom Certificate Authority](tips/trust-custom-ca.md)
- [📝Expose `/etc/hosts` to Pods on K3s](tips/expose-hosts.md) - [📝Expose `/etc/hosts` to Pods on K3s](tips/expose-hosts.md)
- [📝Redirect HTTP to HTTPS](tips/https-redirection.md) - [📝Redirect HTTP to HTTPS](tips/https-redirection.md)
- [📝Add HTTP Proxy](tips/add-http-proxy.md)
- [📝Uninstall deployed resouces](tips/uninstall.md) - [📝Uninstall deployed resouces](tips/uninstall.md)
- [📝Deploy older version of AWX Operator](tips/deploy-older-operator.md) - [📝Deploy older version of AWX Operator](tips/deploy-older-operator.md)
- [📝Upgrade AWX Operator and AWX](tips/upgrade-operator.md) - [📝Upgrade AWX Operator and AWX](tips/upgrade-operator.md)

View file

@ -4,6 +4,7 @@
- [📝Trust custom Certificate Authority](trust-custom-ca.md) - [📝Trust custom Certificate Authority](trust-custom-ca.md)
- [📝Expose `/etc/hosts` to Pods on K3s](expose-hosts.md) - [📝Expose `/etc/hosts` to Pods on K3s](expose-hosts.md)
- [📝Redirect HTTP to HTTPS](https-redirection.md) - [📝Redirect HTTP to HTTPS](https-redirection.md)
- [📝Add HTTP Proxy](add-http-proxy.md)
- [📝Uninstall deployed resouces](uninstall.md) - [📝Uninstall deployed resouces](uninstall.md)
- [📝Deploy older version of AWX Operator](deploy-older-operator.md) - [📝Deploy older version of AWX Operator](deploy-older-operator.md)
- [📝Upgrade AWX Operator and AWX](upgrade-operator.md) - [📝Upgrade AWX Operator and AWX](upgrade-operator.md)

29
tips/add-http-proxy.md Normal file
View file

@ -0,0 +1,29 @@
# Add Proxy Settings for AWX containers
If you are deploying AWX in a corporate environment, you may have no direct access to the internet, but need to go through a proxy way to achieve this is to add a section `extra_settings:` to awx.yaml. These settings will be available in the `Settings` -> `Jobs Settings` -> `Extra Environment Variables` block in the AWX UI.
## Add Proxy Settings to base/awx.yaml
You need to specify your proxy settings in the section `extra_settings:` in `base/awx.yaml` like this:
```
extra_settings: |
- setting: AWX_TASK_ENV['HTTP_PROXY']
value: "'http://proxy.example.com:3128'"
- setting: AWX_TASK_ENV['HTTPS_PROXY']
value: "'http://proxy.example.com:3128'"
- setting: AWX_TASK_ENV['NO_PROXY']
value: "'localhost,.example.com,127.0.0.1'"
```
You may have to adjust your settings to match your environment.
## Deploy your changes
To activate your proxy settings you need to deploy your changes using `kubectl` like this:
```
kubectl apply -k base
```
Now you need to wait some time until K3S has restarted all your pods.
After logging in you can navigate to `Settings` -> `Jobs Settings` and find your proxy settings in the `Extra Environment Variables` block.