mirror of
https://github.com/ansible/awx.git
synced 2026-04-14 14:39:26 -02:30
Move visualization containers into docker-compose
This commit is contained in:
4
Makefile
4
Makefile
@@ -470,7 +470,9 @@ docker-compose-sources: .git/hooks/pre-commit
|
|||||||
-e minikube_container_group=$(MINIKUBE_CONTAINER_GROUP) \
|
-e minikube_container_group=$(MINIKUBE_CONTAINER_GROUP) \
|
||||||
-e enable_keycloak=$(KEYCLOAK) \
|
-e enable_keycloak=$(KEYCLOAK) \
|
||||||
-e enable_ldap=$(LDAP) \
|
-e enable_ldap=$(LDAP) \
|
||||||
-e enable_splunk=$(SPLUNK)
|
-e enable_splunk=$(SPLUNK) \
|
||||||
|
-e enable_prometheus=$(PROMETHEUS) \
|
||||||
|
-e enable_grafana=$(GRAFANA)
|
||||||
|
|
||||||
|
|
||||||
docker-compose: awx/projects docker-compose-sources
|
docker-compose: awx/projects docker-compose-sources
|
||||||
|
|||||||
@@ -464,6 +464,16 @@ Once the playbook is done running Splunk should now be setup in your development
|
|||||||
### Prometheus and Grafana integration
|
### Prometheus and Grafana integration
|
||||||
|
|
||||||
Prometheus is a metrics collecting tool, and we support prometheus formatted data at the `api/v2/metrics` endpoint.
|
Prometheus is a metrics collecting tool, and we support prometheus formatted data at the `api/v2/metrics` endpoint.
|
||||||
|
You can use this as part of the docker-compose target:
|
||||||
|
|
||||||
|
```
|
||||||
|
PROMETHEUS=true GRAFANA=true make docker-compose
|
||||||
|
```
|
||||||
|
|
||||||
|
TODO, internal, delete
|
||||||
|
PROMETHEUS=true GRAFANA=true MAIN_NODE_TYPE=hybrid EXECUTION_NODE_COUNT=0 COMPOSE_TAG=devel make docker-compose
|
||||||
|
|
||||||
|
Alternatively, you can run as separate commands (deprecated, may be deleted in future).
|
||||||
|
|
||||||
1. Change the `username` and `password` in `tools/prometheus/prometheus.yml`. You can also change the scrape interval.
|
1. Change the `username` and `password` in `tools/prometheus/prometheus.yml`. You can also change the scrape interval.
|
||||||
2. (optional) if you are in a clustered environment, you can change the target to `haproxy:8043` so that the incoming prometheus requests go through the load balancer. Leaving it set to `awx1` also works.
|
2. (optional) if you are in a clustered environment, you can change the target to `haproxy:8043` so that the incoming prometheus requests go through the load balancer. Leaving it set to `awx1` also works.
|
||||||
|
|||||||
@@ -29,3 +29,5 @@ ldap_private_key_file: '{{ ldap_cert_dir }}/{{ ldap_private_key_file_name }}'
|
|||||||
ldap_cert_subject: "/C=US/ST=NC/L=Durham/O=awx/CN="
|
ldap_cert_subject: "/C=US/ST=NC/L=Durham/O=awx/CN="
|
||||||
|
|
||||||
enable_splunk: false
|
enable_splunk: false
|
||||||
|
enable_grafana: false
|
||||||
|
enable_prometheus: false
|
||||||
|
|||||||
@@ -135,6 +135,35 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
SPLUNK_START_ARGS: --accept-license
|
SPLUNK_START_ARGS: --accept-license
|
||||||
SPLUNK_PASSWORD: splunk_admin
|
SPLUNK_PASSWORD: splunk_admin
|
||||||
|
{% endif %}
|
||||||
|
{% if enable_prometheus|bool %}
|
||||||
|
prometheus:
|
||||||
|
image: prom/prometheus:latest
|
||||||
|
container_name: tools_prometheus_1
|
||||||
|
hostname: splunk
|
||||||
|
ports:
|
||||||
|
- "9090:9090"
|
||||||
|
volumes:
|
||||||
|
- "../../prometheus:/etc/prometheus"
|
||||||
|
- "prometheus_storage:/prometheus:rw"
|
||||||
|
links:
|
||||||
|
- awx_1:awx1
|
||||||
|
{% endif %}
|
||||||
|
{% if enable_grafana|bool %}
|
||||||
|
grafana:
|
||||||
|
image: grafana/grafana-enterprise:latest
|
||||||
|
container_name: tools_grafana_1
|
||||||
|
hostname: splunk
|
||||||
|
ports:
|
||||||
|
- "3001:3000"
|
||||||
|
volumes:
|
||||||
|
- "../../grafana:/etc/grafana/provisioning"
|
||||||
|
- "grafana_storage:/var/lib/grafana:rw"
|
||||||
|
environment:
|
||||||
|
SPLUNK_START_ARGS: --accept-license
|
||||||
|
SPLUNK_PASSWORD: splunk_admin
|
||||||
|
links:
|
||||||
|
- prometheus
|
||||||
{% endif %}
|
{% endif %}
|
||||||
# A useful container that simply passes through log messages to the console
|
# A useful container that simply passes through log messages to the console
|
||||||
# helpful for testing awx/tower logging
|
# helpful for testing awx/tower logging
|
||||||
@@ -198,6 +227,14 @@ volumes:
|
|||||||
name: tools_ldap_1
|
name: tools_ldap_1
|
||||||
driver: local
|
driver: local
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if enable_prometheus|bool %}
|
||||||
|
prometheus_storage:
|
||||||
|
name: tools_prometheus_storage
|
||||||
|
{% endif %}
|
||||||
|
{% if enable_grafana|bool %}
|
||||||
|
grafana_storage:
|
||||||
|
name: tools_grafana_storage
|
||||||
|
{% endif %}
|
||||||
{% if minikube_container_group|bool %}
|
{% if minikube_container_group|bool %}
|
||||||
networks:
|
networks:
|
||||||
default:
|
default:
|
||||||
|
|||||||
Reference in New Issue
Block a user