mirror of
https://github.com/ansible/awx.git
synced 2026-05-08 01:47:35 -02:30
Rename container hostname from awx_1 to awx-1
* Django and other webservers that care about proper hostnames don't like underscores in them.
This commit is contained in:
committed by
Chris Meyers
parent
c061f59f1c
commit
ae1235b223
@@ -27,7 +27,7 @@ services:
|
|||||||
user: "{{ ansible_user_uid }}"
|
user: "{{ ansible_user_uid }}"
|
||||||
image: "{{ awx_image }}:{{ awx_image_tag }}"
|
image: "{{ awx_image }}:{{ awx_image_tag }}"
|
||||||
container_name: tools_awx_{{ container_postfix }}
|
container_name: tools_awx_{{ container_postfix }}
|
||||||
hostname: awx_{{ container_postfix }}
|
hostname: awx-{{ container_postfix }}
|
||||||
command: launch_awx.sh
|
command: launch_awx.sh
|
||||||
environment:
|
environment:
|
||||||
OS: "{{ os_info.stdout }}"
|
OS: "{{ os_info.stdout }}"
|
||||||
|
|||||||
@@ -4,12 +4,10 @@ global:
|
|||||||
scrape_interval: {{ scrape_interval }} # Set the scrape interval to something faster. Default is every 1 minute.
|
scrape_interval: {{ scrape_interval }} # Set the scrape interval to something faster. Default is every 1 minute.
|
||||||
|
|
||||||
scrape_configs:
|
scrape_configs:
|
||||||
- job_name: 'awx'
|
- job_name: 'awx-metrics'
|
||||||
static_configs:
|
static_configs:
|
||||||
- targets:
|
- targets:
|
||||||
# metrics are broadcast to all nodes in the cluster,
|
- awx-1:8013
|
||||||
# so no need to track nodes individually.
|
|
||||||
- awx1:8013
|
|
||||||
metrics_path: /api/v2/metrics
|
metrics_path: /api/v2/metrics
|
||||||
scrape_interval: {{ scrape_interval }}
|
scrape_interval: {{ scrape_interval }}
|
||||||
scheme: http
|
scheme: http
|
||||||
@@ -18,3 +16,16 @@ scrape_configs:
|
|||||||
basic_auth:
|
basic_auth:
|
||||||
username: admin
|
username: admin
|
||||||
password: {{ admin_password }}
|
password: {{ admin_password }}
|
||||||
|
|
||||||
|
- job_name: 'awx-wsrelay'
|
||||||
|
static_configs:
|
||||||
|
- targets:
|
||||||
|
{% for i in range(control_plane_node_count|int) %}
|
||||||
|
{% set container_postfix = loop.index %}
|
||||||
|
- awx-{{ container_postfix }}:8016
|
||||||
|
{% endfor %}
|
||||||
|
metrics_path: /
|
||||||
|
scrape_interval: {{ scrape_interval }}
|
||||||
|
scheme: http
|
||||||
|
params:
|
||||||
|
format: ['txt']
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
---
|
---
|
||||||
- node:
|
- node:
|
||||||
id: awx_{{ item }}
|
id: awx-{{ item }}
|
||||||
firewallrules:
|
firewallrules:
|
||||||
- action: "reject"
|
- action: "reject"
|
||||||
tonode: awx_{{ item }}
|
tonode: awx-{{ item }}
|
||||||
toservice: "control"
|
toservice: "control"
|
||||||
|
|
||||||
- log-level: info
|
- log-level: info
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
{% for i in range(item | int + 1, control_plane_node_count | int + 1) %}
|
{% for i in range(item | int + 1, control_plane_node_count | int + 1) %}
|
||||||
- tcp-peer:
|
- tcp-peer:
|
||||||
address: awx_{{ i }}:2222
|
address: awx-{{ i }}:2222
|
||||||
redial: true
|
redial: true
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
|||||||
@@ -49,14 +49,14 @@ awx-manage register_queue --queuename=default --instance_percent=100
|
|||||||
if [[ -n "$RUN_MIGRATIONS" ]]; then
|
if [[ -n "$RUN_MIGRATIONS" ]]; then
|
||||||
for (( i=1; i<$CONTROL_PLANE_NODE_COUNT; i++ )); do
|
for (( i=1; i<$CONTROL_PLANE_NODE_COUNT; i++ )); do
|
||||||
for (( j=i + 1; j<=$CONTROL_PLANE_NODE_COUNT; j++ )); do
|
for (( j=i + 1; j<=$CONTROL_PLANE_NODE_COUNT; j++ )); do
|
||||||
awx-manage register_peers "awx_$i" --peers "awx_$j"
|
awx-manage register_peers "awx-$i" --peers "awx-$j"
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
if [[ $EXECUTION_NODE_COUNT > 0 ]]; then
|
if [[ $EXECUTION_NODE_COUNT > 0 ]]; then
|
||||||
awx-manage provision_instance --hostname="receptor-hop" --node_type="hop"
|
awx-manage provision_instance --hostname="receptor-hop" --node_type="hop"
|
||||||
awx-manage add_receptor_address --instance="receptor-hop" --address="receptor-hop" --port=5555 --canonical
|
awx-manage add_receptor_address --instance="receptor-hop" --address="receptor-hop" --port=5555 --canonical
|
||||||
awx-manage register_peers "receptor-hop" --peers "awx_1"
|
awx-manage register_peers "receptor-hop" --peers "awx-1"
|
||||||
for (( e=1; e<=$EXECUTION_NODE_COUNT; e++ )); do
|
for (( e=1; e<=$EXECUTION_NODE_COUNT; e++ )); do
|
||||||
awx-manage provision_instance --hostname="receptor-$e" --node_type="execution"
|
awx-manage provision_instance --hostname="receptor-$e" --node_type="execution"
|
||||||
awx-manage register_peers "receptor-$e" --peers "receptor-hop"
|
awx-manage register_peers "receptor-$e" --peers "receptor-hop"
|
||||||
|
|||||||
@@ -179,7 +179,7 @@ groups:
|
|||||||
datasourceUid: awx_prometheus
|
datasourceUid: awx_prometheus
|
||||||
model:
|
model:
|
||||||
editorMode: code
|
editorMode: code
|
||||||
expr: irate(callback_receiver_events_insert_db{node='awx_1'}[1m])
|
expr: irate(callback_receiver_events_insert_db{node='awx-1'}[1m])
|
||||||
hide: false
|
hide: false
|
||||||
intervalMs: 1000
|
intervalMs: 1000
|
||||||
legendFormat: __auto
|
legendFormat: __auto
|
||||||
@@ -228,7 +228,7 @@ groups:
|
|||||||
type: prometheus
|
type: prometheus
|
||||||
uid: awx_prometheus
|
uid: awx_prometheus
|
||||||
editorMode: code
|
editorMode: code
|
||||||
expr: callback_receiver_events_queue_size_redis{node='awx_1'}
|
expr: callback_receiver_events_queue_size_redis{node='awx-1'}
|
||||||
hide: false
|
hide: false
|
||||||
intervalMs: 1000
|
intervalMs: 1000
|
||||||
legendFormat: __auto
|
legendFormat: __auto
|
||||||
|
|||||||
Reference in New Issue
Block a user