1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-01 08:21:15 +03:00
awx/tools/docker-compose
Shane McDonald c0af3c537b Configure rsyslog to listen over a unix domain socket instead of a port
- Add a placeholder rsyslog.conf so it doesn't fail on start
 - Create access restricted directory for unix socket to be created in
 - Create RSyslogHandler to exit early when logging socket doesn't exist
 - Write updated logging settings when dispatcher comes up and restart rsyslog so they  take effect
 - Move rsyslogd to the web container and create rpc supervisor.sock
 - Add env var for supervisor.conf path
2020-04-13 11:43:59 -04:00
..
awx.egg-info add plugin for cyberark aim 2019-04-02 11:23:20 -04:00
ansible_nightly.repo Update dev env to centos:8 2019-10-29 17:09:45 -04:00
awx-manage Upgrade to postgres 10.6 2019-09-12 12:52:43 -04:00
awx.egg-link Mass rename from ansible_(awx|tower) -> (awx|tower) 2017-07-26 13:33:26 -04:00
bootstrap_development.sh switch memcached from tcp to unix domain socket 2020-04-06 08:35:12 -04:00
Dockerfile Configure rsyslog to listen over a unix domain socket instead of a port 2020-04-13 11:43:59 -04:00
Dockerfile-haproxy Initial Docker Compose workflow for Tower cluster 2016-09-08 10:18:14 -04:00
Dockerfile-logstash output logs to /logstash.conf in our default compose file 2017-03-16 13:20:33 -04:00
Dockerfile-sync Updating docker dev workflow 2016-06-08 12:25:14 -04:00
entrypoint.sh Stop using PG SCL in dev env 2019-09-16 11:41:13 -04:00
google-cloud-sdk.repo Tidy up the dev environment a bit 2020-04-06 11:13:51 -04:00
haproxy.cfg POC channels 2 2020-03-18 16:10:12 -04:00
launch_awx.sh Update dev container to be consistent with other installation methods 2020-03-11 16:23:31 -04:00
logstash.conf Refactor log handler and support TCP/UDP communications 2017-04-25 11:07:57 -04:00
nginx.conf hide nginx server version headers 2019-08-20 14:34:04 -04:00
nginx.vh.default.conf allow *.pendo.io as an img-src in our Content Security Policy 2019-09-26 13:12:54 -04:00
proot.repo Initial qpid development work 2016-08-24 16:23:47 -04:00
README.md Update ELK Stack container files 2020-03-19 09:35:08 -04:00
rsyslog.repo POC: replace our external log aggregation feature with rsyslog 2020-04-13 11:43:59 -04:00
start_tests.sh Consolidate scl enable calls 2019-09-12 15:43:09 -04:00
supervisor.conf Configure rsyslog to listen over a unix domain socket instead of a port 2020-04-13 11:43:59 -04:00

Docker Compose for Dev container

How to start the Dev container

In the root directory of your awx clone, run the following to build your docker image.
This step takes a while, but once your image is built, you don't need to do this again unless you make changes to the Dockerfile or any of the files used by the Dockerfile.

make docker-compose-build

Note: By default, this image will be tagged with your branch name.

Copy over your local settings

cp awx/settings/local_settings.py.docker_compose awx/settings/local_settings.py

Build the UI

make ui-devel

Run the container

make docker-compose

Note: You may need to add COMPOSE_TAG=<yourbranch> at the end of this to use the correct image for your branch.

The app should now be accessible in your browser at https://localhost:8043/#/home

How to use the logstash container

Modify the docker-compose.yml

Uncomment the following lines in the docker-compose.yml

#- logstash
...

#logstash:
#  build:
#    context: ./docker-compose
#    dockerfile: Dockerfile-logstash

POST the following content to /api/v2/settings/logging/ (this uses authentication set up inside of the logstash configuration file).

{
    "LOG_AGGREGATOR_HOST": "http://logstash",
    "LOG_AGGREGATOR_PORT": 8085,
    "LOG_AGGREGATOR_TYPE": "logstash",
    "LOG_AGGREGATOR_USERNAME": "awx_logger",
    "LOG_AGGREGATOR_PASSWORD": "workflows",
    "LOG_AGGREGATOR_LOGGERS": [
        "awx",
        "activity_stream",
        "job_events",
        "system_tracking"
    ],
    "LOG_AGGREGATOR_INDIVIDUAL_FACTS": false,
    "LOG_AGGREGATOR_TOWER_UUID": "991ac7e9-6d68-48c8-bbde-7ca1096653c6",
    "LOG_AGGREGATOR_ENABLED": true
}

Note: HTTP must be specified in the LOG_AGGREGATOR_HOST if you are using the docker development environment.

An example of how to view the most recent logs from the container:

docker exec -i -t $(docker ps -aqf "name=tools_logstash_1") tail -n 50 /logstash.log

How to add logstash plugins

Add any plugins you need in tools/elastic/logstash/Dockerfile before running the container.