Christian M. Adams 9672e72834
Consolidate the Local Docker installer and the dev env
- removes local_docker installer and points community users to our development environment (make docker-compose)
  - provides a migration path from Local Docker Compose installations --> the dev environment
  - the dev env can now be configured to use an external database
  - consolidated the Local Docker and dev env docker-compose.yml files into one template file, used by the dockerfile role
  - added a 'sources' role to template out config files
  - the postgres data dir is no longer a bind-mount, it is a docker volume
  - the redis socket is not longer a bind-mount, it is a docker volume
  - the local_settings.py.docker-compose file no longer needs to be copied over in the dev env
  - Create tmp rsyslog.conf in rsyslog volume to avoid cross-linking. Previously, the tmp code-generated rsyslog.conf was being written to /tmp (by default).  As a result, we were attempting to shutil.move() across volumes.
  - move k8s image build and push roles under tools/ansible
  - See tools/docker-compose/README.md for usage of these changes
2021-02-22 13:44:19 -05:00

1.3 KiB

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.