mirror of
https://github.com/ansible/awx.git
synced 2026-02-01 17:48:10 -03:30
- this change adds rsyslog (https://github.com/rsyslog/rsyslog) as a new service that runs on every AWX node (managed by supervisord) in particular, this feature requires a recent version (v8.38+) of rsyslog that supports the omhttp module (https://github.com/rsyslog/rsyslog-doc/pull/750) - the "external_logger" handler in AWX is now a SysLogHandler that ships logs to the local UDP port where rsyslog is configured to listen (by default, 51414) - every time a LOG_AGGREGATOR_* setting is changed, every AWX node reconfigures and restarts its local instance of rsyslog so that its fowarding settings match what has been configured in AWX - unlike the prior implementation, if the external logging aggregator (splunk/logstash) goes temporarily offline, rsyslog will retain the messages and ship them when the log aggregator is back online - 4xx or 5xx level errors are recorded at /var/log/tower/external.err
AWX UI
Requirements
- node.js 10.x LTS
- npm >=6.x
- bzip2, gcc-c++, git, make
Development
The API development server will need to be running. See CONTRIBUTING.md.
# Build ui for the devel environment - reachable at https://localhost:8043
make ui-devel
# Alternatively, start the ui development server. While running, the ui will be reachable
# at https://localhost:3000 and updated automatically when code changes.
make ui-docker
# When using docker machine, use this command to start the ui development server instead.
DOCKER_MACHINE_NAME=default make ui-docker-machine
Development with an external server
If you normally run awx on an external host/server (in this example, awx.local),
you'll need to reconfigure the webpack proxy slightly for make ui-docker to
work:
/awx/settings/development.py
+
+CSRF_TRUSTED_ORIGINS = ['awx.local:8043']
awx/ui/build/webpack.watch.js
- host: '127.0.0.1',
+ host: '0.0.0.0',
+ disableHostCheck: true,
/awx/ui/package.json
@@ -7,7 +7,7 @@
"config": {
...
+ "django_host": "awx.local"
},
Testing
# run linters
make jshint
# run unit tests
make ui-test-ci
# run e2e tests - see awx/ui/test/e2e for more information
npm --prefix awx/ui run e2e
Note: Unit tests are run on your host machine and not in the development containers.
Adding dependencies
# add an exact development or build dependency
npm install --prefix awx/ui --save-dev --save-exact dev-package@1.2.3
# add an exact production dependency
npm install --prefix awx/ui --save --save-exact prod-package@1.23
# add the updated package.json and package-lock.json files to scm
git add awx/ui/package.json awx/ui/package-lock.json
Removing dependencies
# remove a development or build dependency
npm uninstall --prefix awx/ui --save-dev dev-package
# remove a production dependency
npm uninstall --prefix awx/ui --save prod-package
Building for Production
# built files are placed in awx/ui/static
make ui-release
Internationalization
Application strings marked for translation are extracted and used to generate .pot files using the following command:
# extract strings and generate .pot files
make pot
To include the translations in the development environment, we compile them prior to building the ui:
# remove any prior ui builds
make clean-ui
# compile the .pot files to javascript files usable by the application
make languages
# build the ui with translations included
make ui-devel
Note: Python 3.6 is required to compile the .pot files.