mirror of
https://github.com/ansible/awx.git
synced 2026-05-20 07:17:40 -02:30
wip
This commit is contained in:
12
Makefile
12
Makefile
@@ -539,25 +539,23 @@ docker-compose-sources:
|
|||||||
ansible-playbook -i tools/docker-compose/inventory tools/docker-compose/ansible/sources.yml \
|
ansible-playbook -i tools/docker-compose/inventory tools/docker-compose/ansible/sources.yml \
|
||||||
-e awx_image=$(DEV_DOCKER_TAG_BASE)/awx_devel \
|
-e awx_image=$(DEV_DOCKER_TAG_BASE)/awx_devel \
|
||||||
-e awx_image_tag=$(COMPOSE_TAG)
|
-e awx_image_tag=$(COMPOSE_TAG)
|
||||||
|
-e cluster_node_count=$(CLUSER_NODE_COUNT)
|
||||||
|
|
||||||
docker-compose: docker-auth awx/projects docker-compose-sources
|
docker-compose: docker-auth awx/projects docker-compose-sources
|
||||||
docker-compose -f tools/docker-compose/_sources/docker-compose.yml $(COMPOSE_UP_OPTS) up --no-recreate awx
|
docker-compose -f tools/docker-compose/_sources/docker-compose.yml $(COMPOSE_UP_OPTS) up --no-recreate awx_1
|
||||||
|
|
||||||
docker-compose-cluster: docker-auth awx/projects
|
|
||||||
docker-compose -f tools/docker-compose-cluster.yml up
|
|
||||||
|
|
||||||
docker-compose-credential-plugins: docker-auth awx/projects docker-compose-sources
|
docker-compose-credential-plugins: docker-auth awx/projects docker-compose-sources
|
||||||
echo -e "\033[0;31mTo generate a CyberArk Conjur API key: docker exec -it tools_conjur_1 conjurctl account create quick-start\033[0m"
|
echo -e "\033[0;31mTo generate a CyberArk Conjur API key: docker exec -it tools_conjur_1 conjurctl account create quick-start\033[0m"
|
||||||
docker-compose -f tools/docker-compose/_sources/docker-compose.yml -f tools/docker-credential-plugins-override.yml up --no-recreate awx
|
docker-compose -f tools/docker-compose/_sources/docker-compose.yml -f tools/docker-credential-plugins-override.yml up --no-recreate awx
|
||||||
|
|
||||||
docker-compose-test: docker-auth awx/projects docker-compose-sources
|
docker-compose-test: docker-auth awx/projects docker-compose-sources
|
||||||
docker-compose -f tools/docker-compose/_sources/docker-compose.yml run --rm --service-ports awx /bin/bash
|
docker-compose -f tools/docker-compose/_sources/docker-compose.yml run --rm --service-ports awx_1 /bin/bash
|
||||||
|
|
||||||
docker-compose-runtest: awx/projects docker-compose-sources
|
docker-compose-runtest: awx/projects docker-compose-sources
|
||||||
docker-compose -f tools/docker-compose/_sources/docker-compose.yml run --rm --service-ports awx /start_tests.sh
|
docker-compose -f tools/docker-compose/_sources/docker-compose.yml run --rm --service-ports awx_1 /start_tests.sh
|
||||||
|
|
||||||
docker-compose-build-swagger: awx/projects docker-compose-sources
|
docker-compose-build-swagger: awx/projects docker-compose-sources
|
||||||
docker-compose -f tools/docker-compose/_sources/docker-compose.yml run --rm --service-ports --no-deps awx /start_tests.sh swagger
|
docker-compose -f tools/docker-compose/_sources/docker-compose.yml run --rm --service-ports --no-deps awx_1 /start_tests.sh swagger
|
||||||
|
|
||||||
detect-schema-change: genschema
|
detect-schema-change: genschema
|
||||||
curl https://s3.amazonaws.com/awx-public-ci-files/schema.json -o reference-schema.json
|
curl https://s3.amazonaws.com/awx-public-ci-files/schema.json -o reference-schema.json
|
||||||
|
|||||||
@@ -1,2 +0,0 @@
|
|||||||
FROM haproxy:1.6-alpine
|
|
||||||
COPY haproxy.cfg /usr/local/etc/haproxy/haproxy.cfg
|
|
||||||
@@ -5,3 +5,4 @@ awx_image: 'quay.io/ansible/awx_devel'
|
|||||||
pg_port: 5432
|
pg_port: 5432
|
||||||
pg_username: 'awx'
|
pg_username: 'awx'
|
||||||
pg_database: 'awx'
|
pg_database: 'awx'
|
||||||
|
cluster_node_count: "{{ lookup('env', 'CLUSTER_COUNT') | default(1, True) }}"
|
||||||
|
|||||||
@@ -1,30 +1,34 @@
|
|||||||
---
|
---
|
||||||
version: '2'
|
version: '2'
|
||||||
services:
|
services:
|
||||||
|
{% for i in range(cluster_node_count|int) %}
|
||||||
|
{% set container_postfix = loop.index %}
|
||||||
|
{% set awx_sdb_port_start = 7899 + (loop.index0*100) | int %}
|
||||||
|
{% set awx_sdb_port_end = 7999 + (loop.index0*100) | int %}
|
||||||
# Primary AWX Development Container
|
# Primary AWX Development Container
|
||||||
awx:
|
awx_{{ container_postfix }}:
|
||||||
user: "{{ ansible_user_uid }}"
|
user: "{{ ansible_user_uid }}"
|
||||||
image: "{{ awx_image }}:{{ awx_image_tag }}"
|
image: "{{ awx_image }}:{{ awx_image_tag }}"
|
||||||
container_name: tools_awx_1
|
container_name: tools_awx_{{ container_postfix }}
|
||||||
hostname: awx
|
hostname: awx_{{ container_postfix }}
|
||||||
command: launch_awx.sh
|
command: launch_awx.sh
|
||||||
environment:
|
environment:
|
||||||
OS: "{{ os_info.stdout }}"
|
OS: "{{ os_info.stdout }}"
|
||||||
SDB_HOST: 0.0.0.0
|
SDB_HOST: 0.0.0.0
|
||||||
SDB_PORT: 7899
|
SDB_PORT: {{ awx_sdb_port_start }}
|
||||||
AWX_GROUP_QUEUES: tower
|
AWX_GROUP_QUEUES: tower
|
||||||
RECEPTORCTL_SOCKET: /var/run/receptor/receptor.sock
|
RECEPTORCTL_SOCKET: /var/run/receptor/receptor.sock
|
||||||
ports:
|
ports:
|
||||||
- "2222:2222"
|
{% if cluster_node_count|int == 1 %}
|
||||||
- "8888:8888"
|
- "8080:8080" # unused but mapped for debugging
|
||||||
- "8080:8080"
|
- "8888:8888" # jupyter notebook
|
||||||
- "8013:8013"
|
- "8013:8013" # http
|
||||||
- "8043:8043"
|
- "8043:8043" # https
|
||||||
- "6899:6899" # default port range for sdb-listen
|
{% endif %}
|
||||||
- "7899-7999:7899-7999" # default port range for sdb-listen
|
- "{{ awx_sdb_port_start }}:{{ awx_sdb_port_end }}" # sdb-listen
|
||||||
links:
|
links:
|
||||||
- postgres
|
- postgres
|
||||||
- redis
|
- redis_{{ container_postfix }}
|
||||||
working_dir: "/awx_devel"
|
working_dir: "/awx_devel"
|
||||||
volumes:
|
volumes:
|
||||||
- "../../../:/awx_devel"
|
- "../../../:/awx_devel"
|
||||||
@@ -34,12 +38,21 @@ services:
|
|||||||
- "../../docker-compose/_sources/local_settings.py:/etc/tower/conf.d/local_settings.py"
|
- "../../docker-compose/_sources/local_settings.py:/etc/tower/conf.d/local_settings.py"
|
||||||
- "../../docker-compose/_sources/SECRET_KEY:/etc/tower/SECRET_KEY"
|
- "../../docker-compose/_sources/SECRET_KEY:/etc/tower/SECRET_KEY"
|
||||||
- "../../docker-compose/receptor.conf:/etc/receptor/receptor.conf"
|
- "../../docker-compose/receptor.conf:/etc/receptor/receptor.conf"
|
||||||
- "redis_socket:/var/run/redis/:rw"
|
|
||||||
- "receptor:/var/run/receptor/"
|
- "receptor:/var/run/receptor/"
|
||||||
- "/sys/fs/cgroup:/sys/fs/cgroup"
|
- "/sys/fs/cgroup:/sys/fs/cgroup"
|
||||||
- "~/.kube/config:/var/lib/awx/.kube/config"
|
- "~/.kube/config:/var/lib/awx/.kube/config"
|
||||||
|
- "redis_socket_{{ container_postfix }}:/var/run/redis/:rw"
|
||||||
privileged: true
|
privileged: true
|
||||||
tty: true
|
tty: true
|
||||||
|
redis_{{ container_postfix }}:
|
||||||
|
image: redis:latest
|
||||||
|
container_name: tools_redis_{{ container_postfix }}
|
||||||
|
volumes:
|
||||||
|
- "../../redis/redis.conf:/usr/local/etc/redis/redis.conf"
|
||||||
|
- "redis_socket_{{ container_postfix }}:/var/run/redis/:rw"
|
||||||
|
entrypoint: ["redis-server"]
|
||||||
|
command: ["/usr/local/etc/redis/redis.conf"]
|
||||||
|
{% endfor %}
|
||||||
# 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
|
||||||
# logstash:
|
# logstash:
|
||||||
@@ -56,16 +69,26 @@ services:
|
|||||||
POSTGRES_PASSWORD: {{ pg_password }}
|
POSTGRES_PASSWORD: {{ pg_password }}
|
||||||
volumes:
|
volumes:
|
||||||
- "awx_db:/var/lib/postgresql/data"
|
- "awx_db:/var/lib/postgresql/data"
|
||||||
redis:
|
{% if cluster_node_count|int > 1 %}
|
||||||
image: redis:latest
|
haproxy:
|
||||||
container_name: tools_redis_1
|
image: haproxy
|
||||||
volumes:
|
volumes:
|
||||||
- "../../redis/redis.conf:/usr/local/etc/redis/redis.conf"
|
- "../ha.conf:/usr/local/etc/haproxy/haproxy.cfg"
|
||||||
- "redis_socket:/var/run/redis/:rw"
|
depends_on:
|
||||||
entrypoint: ["redis-server"]
|
{% for i in range(cluster_node_count|int) -%}
|
||||||
command: ["/usr/local/etc/redis/redis.conf"]
|
{% set container_postfix = loop.index %}
|
||||||
|
- "awx_{{ container_postfix }}"
|
||||||
|
{% endfor %}
|
||||||
|
ports:
|
||||||
|
- "8013:8013"
|
||||||
|
- "8043:8043"
|
||||||
|
- "1936:1936"
|
||||||
|
{% endif -%} {# haproxy #}
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
awx_db:
|
awx_db:
|
||||||
redis_socket:
|
|
||||||
receptor:
|
receptor:
|
||||||
|
{% for i in range(cluster_node_count|int) -%}
|
||||||
|
{% set container_postfix = loop.index %}
|
||||||
|
redis_socket_{{ container_postfix }}:
|
||||||
|
{% endfor -%}
|
||||||
|
|||||||
Reference in New Issue
Block a user