mirror of
https://github.com/ansible/awx.git
synced 2026-05-08 18:07:36 -02:30
Disable color logs in CI (#15719)
* Disable color logs in CI * Disable management command color
This commit is contained in:
4
.github/actions/run_awx_devel/action.yml
vendored
4
.github/actions/run_awx_devel/action.yml
vendored
@@ -34,7 +34,9 @@ runs:
|
|||||||
run: |
|
run: |
|
||||||
DEV_DOCKER_OWNER=${{ github.repository_owner }} \
|
DEV_DOCKER_OWNER=${{ github.repository_owner }} \
|
||||||
COMPOSE_TAG=${{ github.base_ref || github.ref_name }} \
|
COMPOSE_TAG=${{ github.base_ref || github.ref_name }} \
|
||||||
COMPOSE_UP_OPTS="-d" \
|
DJANGO_COLORS=nocolor \
|
||||||
|
SUPERVISOR_ARGS="-n -t" \
|
||||||
|
COMPOSE_UP_OPTS="-d --no-color" \
|
||||||
make docker-compose
|
make docker-compose
|
||||||
|
|
||||||
- name: Update default AWX password
|
- name: Update default AWX password
|
||||||
|
|||||||
6
Makefile
6
Makefile
@@ -222,12 +222,6 @@ migrate:
|
|||||||
dbchange:
|
dbchange:
|
||||||
$(MANAGEMENT_COMMAND) makemigrations
|
$(MANAGEMENT_COMMAND) makemigrations
|
||||||
|
|
||||||
supervisor:
|
|
||||||
@if [ "$(VENV_BASE)" ]; then \
|
|
||||||
. $(VENV_BASE)/awx/bin/activate; \
|
|
||||||
fi; \
|
|
||||||
supervisord --pidfile=/tmp/supervisor_pid -n
|
|
||||||
|
|
||||||
collectstatic:
|
collectstatic:
|
||||||
@if [ "$(VENV_BASE)" ]; then \
|
@if [ "$(VENV_BASE)" ]; then \
|
||||||
. $(VENV_BASE)/awx/bin/activate; \
|
. $(VENV_BASE)/awx/bin/activate; \
|
||||||
|
|||||||
@@ -48,13 +48,21 @@ The docker-compose development environment is regularly used and should work on
|
|||||||
|
|
||||||
Use on other platforms is untested, and may require local changes.
|
Use on other platforms is untested, and may require local changes.
|
||||||
|
|
||||||
## Configuration
|
### How to Disable Color?
|
||||||
|
|
||||||
In the [`inventory` file](./inventory), set your `pg_password`, `broadcast_websocket_secret`, `secret_key`, and any other settings you need for your deployment.
|
There are several layers that might apply color:
|
||||||
|
- docker compose coloring based on what container log comes from
|
||||||
|
- supervisord coloring based on what server it comes from
|
||||||
|
- general coloration from Django management commands
|
||||||
|
|
||||||
AWX requires access to a PostgreSQL database, and by default, one will be created and deployed in a container, and data will be persisted to a docker volume. When the container is stopped, the database files will still exist in the docker volume. An external database can be used by setting the `pg_host`, `pg_hostname`, and `pg_username`.
|
These can have color turned off by adding things to the
|
||||||
|
environment variable to modify the call options.
|
||||||
|
|
||||||
> If you are coming from a Local Docker installation of AWX, consider migrating your data first, see the [data migration section](#migrating-data-from-local-docker) below.
|
```
|
||||||
|
DJANGO_COLORS=nocolor COMPOSE_UP_OPTS="--no-color" SUPERVISOR_ARGS="-n -t" make docker-compose
|
||||||
|
```
|
||||||
|
|
||||||
|
This can be useful if this is ran in CI in any context.
|
||||||
|
|
||||||
## Starting the Development Environment
|
## Starting the Development Environment
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ services:
|
|||||||
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 supervisord --pidfile=/tmp/supervisor_pid ${SUPERVISOR_ARGS:--n}
|
||||||
environment:
|
environment:
|
||||||
OS: "{{ os_info.stdout }}"
|
OS: "{{ os_info.stdout }}"
|
||||||
SDB_HOST: 0.0.0.0
|
SDB_HOST: 0.0.0.0
|
||||||
@@ -41,6 +41,7 @@ services:
|
|||||||
AWX_LOGGING_MODE: stdout
|
AWX_LOGGING_MODE: stdout
|
||||||
DJANGO_SUPERUSER_PASSWORD: {{ admin_password }}
|
DJANGO_SUPERUSER_PASSWORD: {{ admin_password }}
|
||||||
UWSGI_MOUNT_PATH: {{ ingress_path }}
|
UWSGI_MOUNT_PATH: {{ ingress_path }}
|
||||||
|
DJANGO_COLORS: "${DJANGO_COLORS:-}"
|
||||||
{% if loop.index == 1 %}
|
{% if loop.index == 1 %}
|
||||||
RUN_MIGRATIONS: 1
|
RUN_MIGRATIONS: 1
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
@@ -4,5 +4,6 @@ set +x
|
|||||||
bootstrap_development.sh
|
bootstrap_development.sh
|
||||||
|
|
||||||
cd /awx_devel
|
cd /awx_devel
|
||||||
# Start the services
|
|
||||||
exec make supervisor
|
# Run the given command, usually supervisord
|
||||||
|
exec "$@"
|
||||||
|
|||||||
Reference in New Issue
Block a user