Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ctrliq/ascender
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 23.6.0
Choose a base ref
...
head repository: ctrliq/ascender
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Loading
Showing with 5,720 additions and 3,589 deletions.
  1. +8 −2 .github/actions/awx_devel_image/action.yml
  2. +29 −11 .github/workflows/devel_images.yml
  3. +2 −1 .github/workflows/promote.yml
  4. +3 −7 .github/workflows/stage.yml
  5. +3 −0 .gitignore
  6. +0 −1 MANIFEST.in
  7. +60 −25 Makefile
  8. +1 −0 NOTICE.txt
  9. +4 −2 awx/__init__.py
  10. +10 −7 awx/api/generics.py
  11. +166 −68 awx/api/serializers.py
  12. +5 −6 awx/api/templates/instance_install_bundle/group_vars/all.yml
  13. +1 −1 awx/api/templates/instance_install_bundle/requirements.yml
  14. +2 −0 awx/api/urls/instance.py
  15. +17 −0 awx/api/urls/receptor_address.py
  16. +2 −0 awx/api/urls/urls.py
  17. +2 −1 awx/api/urls/webhooks.py
  18. +65 −5 awx/api/views/__init__.py
  19. +12 −3 awx/api/views/instance_install_bundle.py
  20. +1 −1 awx/api/views/mesh_visualizer.py
  21. +16 −0 awx/api/views/mixin.py
  22. +2 −2 awx/api/views/organization.py
  23. +1 −0 awx/api/views/root.py
  24. +88 −9 awx/api/views/webhooks.py
  25. +1 −1 awx/conf/models.py
  26. +21 −12 awx/conf/settings.py
  27. +25 −1 awx/main/access.py
  28. +3 −2 awx/main/analytics/analytics_tasks.py
  29. +1 −1 awx/main/analytics/collectors.py
  30. +168 −60 awx/main/analytics/subsystem_metrics.py
  31. +1 −1 awx/main/conf.py
  32. +1 −1 awx/main/constants.py
  33. +1 −1 awx/main/consumers.py
  34. +6 −2 awx/main/credential_plugins/aim.py
  35. +26 −3 awx/main/credential_plugins/hashivault.py
  36. +21 −6 awx/main/dispatch/__init__.py
  37. +18 −3 awx/main/dispatch/worker/base.py
  38. +1 −1 awx/main/dispatch/worker/callback.py
  39. +8 −5 awx/main/fields.py
  40. +53 −0 awx/main/management/commands/add_receptor_address.py
  41. +11 −2 awx/main/management/commands/create_preload_data.py
  42. +1 −1 awx/main/management/commands/list_instances.py
  43. +5 −7 awx/main/management/commands/provision_instance.py
  44. +23 −12 awx/main/management/commands/register_peers.py
  45. +26 −0 awx/main/management/commands/remove_receptor_address.py
  46. +4 −0 awx/main/management/commands/run_callback_receiver.py
  47. +3 −0 awx/main/management/commands/run_dispatcher.py
  48. +11 −5 awx/main/management/commands/run_wsrelay.py
  49. +11 −5 awx/main/managers.py
  50. +20 −4 awx/main/middleware.py
  51. +52 −0 awx/main/migrations/0188_add_bitbucket_dc_webhook.py
  52. +150 −0 awx/main/migrations/0189_inbound_hop_nodes.py
  53. +53 −0 awx/main/migrations/0190_alter_inventorysource_source_and_more.py
  54. +51 −0 awx/main/migrations/0191_alter_inventorysource_source_and_more.py
  55. +19 −0 awx/main/migrations/0191a_add_depot_credential.py
  56. +1 −1 awx/main/migrations/_inventory_source_vars.py
  57. +2 −1 awx/main/models/__init__.py
  58. +1 −0 awx/main/models/activity_stream.py
  59. +1 −1 awx/main/models/ad_hoc_commands.py
  60. +78 −0 awx/main/models/credential/__init__.py
  61. +8 −0 awx/main/models/credential/injectors.py
  62. +1 −3 awx/main/models/events.py
  63. +76 −35 awx/main/models/ha.py
  64. +16 −1 awx/main/models/inventory.py
  65. +1 −1 awx/main/models/jobs.py
  66. +23 −7 awx/main/models/mixins.py
  67. +21 −5 awx/main/models/notifications.py
  68. +67 −0 awx/main/models/receptor_address.py
  69. +1 −1 awx/main/models/unified_jobs.py
  70. +1 −1 awx/main/models/workflow.py
  71. +1 −0 awx/main/notifications/custom_notification_base.py
  72. +86 −6 awx/main/routing.py
  73. +3 −3 awx/main/scheduler/task_manager.py
  74. +12 −12 awx/main/tasks/callback.py
  75. +1 −1 awx/main/tasks/jobs.py
  76. +25 −18 awx/main/tasks/receptor.py
  77. +29 −11 awx/main/tasks/system.py
  78. +3 −0 awx/main/tests/data/inventory/plugins/terraform/env.json
  79. +5 −10 awx/main/tests/docs/conftest.py
  80. +357 −91 awx/main/tests/functional/api/test_instance_peers.py
  81. +1 −1 awx/main/tests/functional/api/test_survey_spec.py
  82. +23 −0 awx/main/tests/functional/api/test_user.py
  83. +13 −0 awx/main/tests/functional/conftest.py
  84. +1 −0 awx/main/tests/functional/models/test_inventory.py
  85. +2 −0 awx/main/tests/functional/test_credential.py
  86. +7 −0 awx/main/tests/functional/test_credential_plugins.py
  87. +7 −1 awx/main/tests/functional/test_inventory_source_injectors.py
  88. +30 −0 awx/main/tests/functional/test_linkstate.py
  89. +26 −0 awx/main/tests/functional/test_migrations.py
  90. +7 −8 awx/main/tests/functional/test_projects.py
  91. +90 −0 awx/main/tests/functional/test_routing.py
  92. +0 −5 awx/main/tests/settings_for_test.py
  93. +1 −1 awx/main/tests/unit/api/test_filters.py
  94. +32 −0 awx/main/tests/unit/models/test_receptor_address.py
  95. +64 −0 awx/main/tests/unit/tasks/test_system.py
  96. +21 −0 awx/main/tests/unit/test_tasks.py
  97. +5 −1 awx/main/tests/unit/utils/test_common.py
  98. +1 −1 awx/main/tests/unit/utils/test_filters.py
  99. +22 −6 awx/main/utils/common.py
  100. +22 −1 awx/main/utils/execution_environments.py
  101. +4 −2 awx/main/utils/filters.py
  102. +24 −15 awx/main/wsrelay.py
  103. +25 −13 awx/playbooks/project_update.yml
  104. +22 −0 awx/resource_api.py
  105. +64 −10 awx/settings/defaults.py
  106. +3 −1 awx/settings/development.py
  107. +8 −2 awx/sso/backends.py
  108. +1 −1 awx/sso/views.py
  109. +1,694 −1,774 awx/ui/package-lock.json
  110. +3 −3 awx/ui/package.json
  111. +2 −1 awx/ui/public/installing.html
  112. BIN awx/ui/public/static/media/AscenderAuto_logo_h_rev_S_side_black.png
  113. +3 −0 awx/ui/src/api/index.js
  114. +12 −0 awx/ui/src/api/models/Instances.js
  115. +14 −0 awx/ui/src/api/models/Receptor.js
  116. +1 −1 awx/ui/src/components/AppContainer/PageHeaderToolbar.test.js
  117. +14 −4 awx/ui/src/components/PromptDetail/PromptDetail.js
  118. +6 −6 awx/ui/src/components/TemplateList/TemplateListItem.test.js
  119. +4 −1 awx/ui/src/contexts/Session.js
  120. +10 −10 awx/ui/src/locales/fr/messages.po
  121. +1 −1 awx/ui/src/screens/Dashboard/Dashboard.js
  122. +1 −1 awx/ui/src/screens/Dashboard/DashboardGraph.js
  123. +2 −9 awx/ui/src/screens/Host/HostList/HostList.js
  124. +4 −33 awx/ui/src/screens/Host/HostList/HostListItem.js
  125. +15 −1 awx/ui/src/screens/Instances/Instance.js
  126. +4 −0 awx/ui/src/screens/Instances/InstanceAdd/InstanceAdd.js
  127. +1 −0 awx/ui/src/screens/Instances/InstanceAdd/InstanceAdd.test.js
  128. +51 −48 awx/ui/src/screens/Instances/InstanceDetail/InstanceDetail.js
  129. +1 −0 awx/ui/src/screens/Instances/InstanceDetail/InstanceDetail.test.js
  130. +3 −2 awx/ui/src/screens/Instances/InstanceList/InstanceListItem.js
  131. +154 −0 awx/ui/src/screens/Instances/InstanceListenerAddressList/InstanceListenerAddressList.js
  132. +46 −0 awx/ui/src/screens/Instances/InstanceListenerAddressList/InstanceListenerAddressListItem.js
  133. +1 −0 awx/ui/src/screens/Instances/InstanceListenerAddressList/index.js
  134. +108 −29 awx/ui/src/screens/Instances/InstancePeers/InstancePeerList.js
  135. +12 −17 awx/ui/src/screens/Instances/InstancePeers/InstancePeerListItem.js
  136. +1 −0 awx/ui/src/screens/Instances/Instances.js
  137. +2 −27 awx/ui/src/screens/Instances/Shared/InstanceForm.js
  138. +8 −0 awx/ui/src/screens/Inventory/InventoryHosts/InventoryHostItem.js
  139. +1 −0 awx/ui/src/screens/Inventory/InventoryHosts/InventoryHostList.js
  140. +7 −5 awx/ui/src/screens/Inventory/shared/Inventory.helptext.js
  141. +9 −0 awx/ui/src/screens/Inventory/shared/InventorySourceForm.js
  142. +1 −0 awx/ui/src/screens/Inventory/shared/InventorySourceForm.test.js
  143. +59 −0 awx/ui/src/screens/Inventory/shared/InventorySourceSubForms/TerraformSubForm.js
  144. +70 −0 awx/ui/src/screens/Inventory/shared/InventorySourceSubForms/TerraformSubForm.test.js
  145. +1 −0 awx/ui/src/screens/Inventory/shared/InventorySourceSubForms/index.js
  146. +22 −2 awx/ui/src/screens/Job/JobOutput/HostEventModal.js
  147. +28 −10 awx/ui/src/screens/Job/JobOutput/HostEventModal.test.js
  148. +0 −99 awx/ui/src/screens/Project/shared/ProjectForm.test.js
  149. +0 −30 awx/ui/src/screens/Setting/MiscSystem/MiscSystemDetail/MiscSystemDetail.test.js
  150. +0 −9 awx/ui/src/screens/Setting/MiscSystem/MiscSystemEdit/MiscSystemEdit.test.js
  151. +8 −155 awx/ui/src/screens/Setting/shared/data.allSettingOptions.json
  152. +0 −9 awx/ui/src/screens/Setting/shared/data.allSettings.json
  153. +1 −1 awx/ui/src/screens/SubscriptionUsage/SubscriptionUsage.js
  154. +3 −4 awx/ui/src/screens/SubscriptionUsage/SubscriptionUsageChart.js
  155. +5 −1 awx/ui/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeViewModal.js
  156. +6 −0 awx/ui/src/screens/Template/shared/WebhookSubForm.js
  157. +3 −3 awx/ui/urls.py
  158. +1 −1 awx/ui_next/Makefile
  159. +4 −1 awx/urls.py
  160. +1 −1 awx_collection/galaxy.yml
  161. +0 −119 awx_collection/plugins/module_utils/tower_legacy.py
  162. +27 −2 awx_collection/plugins/modules/instance.py
  163. +1 −3 awx_collection/test/awx/conftest.py
  164. +2 −2 awx_collection/test/awx/test_completeness.py
  165. +10 −14 awx_collection/test/awx/test_export.py
  166. +8 −15 awx_collection/test/awx/test_instance.py
  167. +1 −1 awx_collection/test/awx/test_notification_template.py
  168. +17 −13 awx_collection/tests/integration/targets/instance/tasks/main.yml
  169. +1 −1 awx_collection/tests/integration/targets/inventory_source_update/tasks/main.yml
  170. +10 −10 awx_collection/tests/integration/targets/project/tasks/main.yml
  171. +1 −1 awx_collection/tests/integration/targets/project_update/tasks/main.yml
  172. +0 −2 awx_collection/tools/roles/template_galaxy/templates/galaxy.yml.j2
  173. +3 −3 awxkit/awxkit/api/client.py
  174. +2 −1 awxkit/awxkit/api/mixins/has_status.py
  175. +2 −2 awxkit/awxkit/api/pages/api.py
  176. +6 −4 awxkit/awxkit/api/pages/base.py
  177. +1 −0 awxkit/awxkit/api/pages/credentials.py
  178. +4 −1 awxkit/awxkit/api/resources.py
  179. +6 −1 awxkit/awxkit/api/utils.py
  180. +1 −1 awxkit/awxkit/awx/utils.py
  181. +2 −1 awxkit/awxkit/cli/custom.py
  182. +1 −1 awxkit/awxkit/cli/docs/source/conf.py
  183. +2 −1 awxkit/awxkit/cli/stdout.py
  184. +1 −0 awxkit/awxkit/config.py
  185. +0 −2 awxkit/awxkit/utils/__init__.py
  186. +12 −2 awxkit/awxkit/ws.py
  187. +1 −0 awxkit/setup.py
  188. +5 −0 awxkit/test/test_ws.py
  189. +0 −22 licenses/aioredis.txt
  190. +0 −24 licenses/django-filter.txt
  191. +0 −30 licenses/drf-spectacular.txt
  192. +0 −20 licenses/tabulate.txt
  193. +20 −0 licenses/ui/proxy-from-env.txt
  194. +0 −202 licenses/uritemplate.txt
  195. +1 −0 manage.py
  196. +0 −18 requirements/README.md
  197. +20 −20 requirements/requirements.in
  198. +69 −100 requirements/requirements.txt
  199. +7 −3 requirements/requirements_dev.txt
  200. +1 −1 requirements/requirements_git.txt
  201. +22 −9 requirements/updater.sh
  202. +1 −1 tools/ansible/roles/dockerfile/defaults/main.yml
  203. +6 −6 tools/ansible/roles/dockerfile/templates/Dockerfile.j2
  204. +1 −1 tools/ansible/roles/dockerfile/templates/supervisor_rsyslog.conf.j2
  205. +1 −1 tools/ansible/roles/dockerfile/templates/supervisor_task.conf.j2
  206. +1 −1 tools/ansible/roles/dockerfile/templates/supervisor_web.conf.j2
  207. +1 −3 tools/data_generators/rbac_dummy_data_generator.py
  208. +44 −3 tools/docker-compose/README.md
  209. +1 −0 tools/docker-compose/ansible/roles/sources/defaults/main.yml
  210. +5 −2 tools/docker-compose/ansible/roles/sources/tasks/ldap.yml
  211. +1 −1 tools/docker-compose/ansible/roles/sources/tasks/main.yml
  212. +44 −12 tools/docker-compose/ansible/roles/sources/templates/docker-compose.yml.j2
  213. +13 −0 tools/docker-compose/ansible/roles/sources/{files/ldap.ldif → templates/ldap.ldif.j2}
  214. +4 −0 tools/docker-compose/ansible/roles/sources/templates/nginx.conf.j2
  215. +11 −2 tools/docker-compose/ansible/roles/sources/templates/nginx.locations.conf.j2
  216. +6 −1 tools/docker-compose/ansible/roles/vault/defaults/main.yml
  217. +124 −2 tools/docker-compose/ansible/roles/vault/tasks/initialize.yml
  218. +102 −8 tools/docker-compose/ansible/roles/vault/tasks/plumb.yml
  219. +4 −0 tools/docker-compose/ansible/roles/vault/tasks/unseal.yml
  220. +10 −4 tools/docker-compose/awx-autoreload
  221. +5 −2 tools/docker-compose/bootstrap_development.sh
  222. +1 −0 tools/docker-compose/supervisor.conf
  223. +15 −14 tools/scripts/compilemessages.py
  224. +1 −1 tools/scripts/firehose.py
  225. +1 −5 tools/scripts/list_fields.py
  226. +1 −2 tools/sosreport/controller.py
10 changes: 8 additions & 2 deletions .github/actions/awx_devel_image/action.yml
Original file line number Diff line number Diff line change
@@ -11,18 +11,24 @@ runs:
shell: bash
run: echo py_version=`make PYTHON_VERSION` >> $GITHUB_ENV

- name: Set lower case owner name
shell: bash
run: echo "OWNER_LC=${OWNER,,}" >> $GITHUB_ENV
env:
OWNER: '${{ github.repository_owner }}'

- name: Log in to registry
shell: bash
run: |
echo "${{ inputs.github-token }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Pre-pull latest devel image to warm cache
shell: bash
run: docker pull ghcr.io/${{ github.repository_owner }}/awx_devel:${{ github.base_ref }}
run: docker pull ghcr.io/${OWNER_LC}/awx_devel:${{ github.base_ref }}

- name: Build image for current source checkout
shell: bash
run: |
DEV_DOCKER_TAG_BASE=ghcr.io/${{ github.repository_owner }} \
DEV_DOCKER_TAG_BASE=ghcr.io/${OWNER_LC} \
COMPOSE_TAG=${{ github.base_ref }} \
make docker-compose-build
40 changes: 29 additions & 11 deletions .github/workflows/devel_images.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,45 @@
---
# Modifications Copyright (c) 2023 Ctrl IQ, Inc.
name: Build/Push Development Images
env:
LC_ALL: "C.UTF-8" # prevent ERROR: Ansible could not initialize the preferred locale: unsupported locale setting
on:
workflow_dispatch:
push:
branches:
- devel
- release_*
- feature_*
- jc_devel
# - release_*
# - feature_*
jobs:
push:
if: endsWith(github.repository, '/ascender') || startsWith(github.ref, 'refs/heads/release_')
push-development-images:
runs-on: ubuntu-latest
timeout-minutes: 60
timeout-minutes: 120
permissions:
packages: write
contents: read
strategy:
fail-fast: false
matrix:
build-targets:
- image-name: awx_devel
make-target: docker-compose-buildx
#- image-name: awx_kube_devel
# make-target: awx-kube-dev-buildx
#- image-name: awx
# make-target: awx-kube-buildx
steps:
- name: Skipping build of awx image for non-awx repository
run: |
echo "Skipping build of awx image for non-awx repository"
exit 0
if: matrix.build-targets.image-name == 'awx' && !endsWith(github.repository, '/ascender')

- name: Checkout ascender
uses: actions/checkout@v3
with:
path: ascender
ref: devel

- name: Get python version from Makefile
run: echo py_version=`make PYTHON_VERSION` >> $GITHUB_ENV
@@ -30,21 +49,20 @@ jobs:
with:
python-version: ${{ env.py_version }}

# Downgrade requests to fix https://github.com/docker/docker-py/issues/3256
- name: Install playbook dependencies
run: python3 -m pip install docker

- name: Get latest Ascender tag
run: echo "ASCENDER_TAG=`git -c 'versionsort.suffix=-' ls-remote --tags --refs --sort='v:refname' https://github.com/${{ github.repository }}.git | tail --lines=1 | cut --delimiter='/' --fields=3`" >> $GITHUB_ENV
run: |
python3 -m pip install docker==6.1.3 requests==2.31.0 --force-reinstall
- name: Build and stage Ascender
- name: Build Ascender Devel Image
working-directory: ascender
run: |
ansible-playbook -v tools/ansible/build.yml \
-e registry=ghcr.io \
-e registry_username=${{ github.actor }} \
-e registry_password=${{ secrets.GITHUB_TOKEN }} \
-e awx_image=${{ github.repository }}_devel \
-e awx_version=${{ env.ASCENDER_TAG }} \
-e awx_version=24 \
-e ansible_python_interpreter=$(which python3) \
-e push=yes \
-e awx_official=no
3 changes: 2 additions & 1 deletion .github/workflows/promote.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
# Modifications Copyright (c) 2023 Ctrl IQ, Inc.
name: Promote Release

env:
@@ -69,7 +70,7 @@ jobs:
# - name: Build awxkit and upload to pypi
# run: |
# git reset --hard
# cd awxkit && python3 setup.py bdist_wheel
# cd awxkit && python3 setup.py sdist bdist_wheel
# twine upload \
# -r ${{ env.pypi_repo }} \
# -u ${{ secrets.PYPI_USERNAME }} \
10 changes: 3 additions & 7 deletions .github/workflows/stage.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
# Modifications Copyright (c) 2023 Ctrl IQ, Inc.
name: Stage Release

env:
@@ -54,9 +55,10 @@ jobs:
with:
python-version: ${{ env.py_version }}

# Downgrade requests to fix https://github.com/docker/docker-py/issues/3256
- name: Install playbook dependencies
run: |
python3 -m pip install docker
python3 -m pip install docker==6.1.3 requests==2.31.0 --force-reinstall
- name: Build and stage Ascender
working-directory: ascender
@@ -75,12 +77,6 @@ jobs:
run: |
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: tag awx-ee:latest with version input
run: |
docker pull quay.io/ansible/awx-ee:latest
docker tag quay.io/ansible/awx-ee:latest ghcr.io/${{ github.repository_owner }}/awx-ee:${{ github.event.inputs.version }}
docker push ghcr.io/${{ github.repository_owner }}/awx-ee:${{ github.event.inputs.version }}
- name: Create draft release for Ascender
working-directory: ascender
run: |
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -169,3 +169,6 @@ awx/ui_next/build
# Docs build stuff
docs/docsite/build/
_readthedocs/

# Pyenv
.python-version
1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -6,7 +6,6 @@ recursive-include awx/templates *.html
recursive-include awx/api/templates *.md *.html *.yml
recursive-include awx/ui/build *.html
recursive-include awx/ui/build *
recursive-include awx/ui_next/build *
recursive-include awx/playbooks *.yml
recursive-include awx/lib/site-packages *
recursive-include awx/plugins *.ps1
85 changes: 60 additions & 25 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-include awx/ui_next/Makefile
# Modifications Copyright (c) 2023 Ctrl IQ, Inc.

PYTHON := $(notdir $(shell for i in python3.9 python3; do command -v $$i; done|sed 1q))
SHELL := bash
@@ -10,7 +10,7 @@ KIND_BIN ?= $(shell which kind)
CHROMIUM_BIN=/tmp/chrome-linux/chrome
GIT_BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD)
MANAGEMENT_COMMAND ?= awx-manage
VERSION ?= $(shell $(PYTHON) tools/scripts/scm_version.py)
VERSION ?= $(shell $(PYTHON) tools/scripts/scm_version.py 2> /dev/null)

# ansible-test requires semver compatable version, so we allow overrides to hack it
COLLECTION_VERSION ?= $(shell $(PYTHON) tools/scripts/scm_version.py | cut -d . -f 1-3)
@@ -63,7 +63,7 @@ RECEPTOR_IMAGE ?= quay.io/ansible/receptor:devel
SRC_ONLY_PKGS ?= cffi,pycparser,psycopg,twilio
# These should be upgraded in the AWX and Ansible venv before attempting
# to install the actual requirements
VENV_BOOTSTRAP ?= pip==21.2.4 setuptools==65.6.3 setuptools_scm[toml]==8.0.4 wheel==0.38.4
VENV_BOOTSTRAP ?= pip==23.3 setuptools==70.0.0 setuptools_scm[toml]==8.0.4 wheel==0.38.4

NAME ?= awx

@@ -75,6 +75,9 @@ SDIST_TAR_FILE ?= $(SDIST_TAR_NAME).tar.gz

I18N_FLAG_FILE = .i18n_built

## PLATFORMS defines the target platforms for the manager image be build to provide support to multiple
PLATFORMS ?= linux/amd64 #,linux/arm64 # linux/ppc64le,linux/s390x

.PHONY: awx-link clean clean-tmp clean-venv requirements requirements_dev \
develop refresh adduser migrate dbchange \
receiver test test_unit test_coverage coverage_html \
@@ -213,16 +216,14 @@ collectstatic:
fi; \
$(PYTHON) manage.py collectstatic --clear --noinput > /dev/null 2>&1

DEV_RELOAD_COMMAND ?= supervisorctl restart tower-processes:*

uwsgi: collectstatic
@if [ "$(VENV_BASE)" ]; then \
. $(VENV_BASE)/awx/bin/activate; \
fi; \
uwsgi /etc/tower/uwsgi.ini

awx-autoreload:
@/awx_devel/tools/docker-compose/awx-autoreload /awx_devel/awx "$(DEV_RELOAD_COMMAND)"
@/awx_devel/tools/docker-compose/awx-autoreload /awx_devel/awx

daphne:
@if [ "$(VENV_BASE)" ]; then \
@@ -302,7 +303,7 @@ swagger: reports
@if [ "$(VENV_BASE)" ]; then \
. $(VENV_BASE)/awx/bin/activate; \
fi; \
(set -o pipefail && py.test $(PYTEST_ARGS) awx/conf/tests/functional awx/main/tests/functional/api awx/main/tests/docs --release=$(VERSION_TARGET) | tee reports/$@.report)
(set -o pipefail && py.test $(PYTEST_ARGS) awx/conf/tests/functional awx/main/tests/functional/api awx/main/tests/docs | tee reports/$@.report)

check: black

@@ -476,12 +477,11 @@ ui-test-general:
$(NPM_BIN) run --prefix awx/ui pretest
$(NPM_BIN) run --prefix awx/ui/ test-general --runInBand

# NOTE: The make target ui-next is imported from awx/ui_next/Makefile
HEADLESS ?= no
ifeq ($(HEADLESS), yes)
dist/$(SDIST_TAR_FILE):
else
dist/$(SDIST_TAR_FILE): $(UI_BUILD_FLAG_FILE) ui-next
dist/$(SDIST_TAR_FILE): $(UI_BUILD_FLAG_FILE)
endif
$(PYTHON) -m build -s
ln -sf $(SDIST_TAR_FILE) dist/awx.tar.gz
@@ -532,13 +532,14 @@ docker-compose-sources: .git/hooks/pre-commit
-e enable_vault=$(VAULT) \
-e vault_tls=$(VAULT_TLS) \
-e enable_tacacs=$(TACACS) \
$(EXTRA_SOURCES_ANSIBLE_OPTS)
$(EXTRA_SOURCES_ANSIBLE_OPTS)

docker-compose: awx/projects docker-compose-sources
ansible-galaxy install --ignore-certs -r tools/docker-compose/ansible/requirements.yml;
ansible-playbook -i tools/docker-compose/inventory tools/docker-compose/ansible/initialize_containers.yml \
-e enable_vault=$(VAULT) \
-e vault_tls=$(VAULT_TLS);
-e vault_tls=$(VAULT_TLS) \
-e enable_ldap=$(LDAP);
$(DOCKER_COMPOSE) -f tools/docker-compose/_sources/docker-compose.yml $(COMPOSE_OPTS) up $(COMPOSE_UP_OPTS) --remove-orphans

docker-compose-credential-plugins: awx/projects docker-compose-sources
@@ -585,12 +586,27 @@ docker-compose-build: Dockerfile.dev
--build-arg BUILDKIT_INLINE_CACHE=1 \
--cache-from=$(DEV_DOCKER_TAG_BASE)/ascender_devel:$(COMPOSE_TAG) .


.PHONY: docker-compose-buildx
## Build awx_devel image for docker compose development environment for multiple architectures
docker-compose-buildx: Dockerfile.dev
- docker buildx create --name docker-compose-buildx
docker buildx use docker-compose-buildx
- docker buildx build \
--push \
--build-arg BUILDKIT_INLINE_CACHE=1 \
--cache-from=$(DEV_DOCKER_TAG_BASE)/ascender_devel:$(COMPOSE_TAG) \
--platform=$(PLATFORMS) \
--tag $(DEVEL_IMAGE_NAME) \
-f Dockerfile.dev .
- docker buildx rm docker-compose-buildx

docker-clean:
-$(foreach container_id,$(shell docker ps -f name=tools_awx -aq && docker ps -f name=tools_receptor -aq),docker stop $(container_id); docker rm -f $(container_id);)
-$(foreach image_id,$(shell docker images --filter=reference='*/*/*ascender_devel*' --filter=reference='*/*ascender_devel*' --filter=reference='*ascender_devel*' -aq),docker rmi --force $(image_id);)

docker-clean-volumes: docker-compose-clean docker-compose-container-group-clean
docker volume rm -f tools_awx_db tools_vault_1 tools_grafana_storage tools_prometheus_storage $(docker volume ls --filter name=tools_redis_socket_ -q)
docker volume rm -f tools_awx_db tools_vault_1 tools_ldap_1 tools_grafana_storage tools_prometheus_storage $(docker volume ls --filter name=tools_redis_socket_ -q)

docker-refresh: docker-clean docker-compose

@@ -612,9 +628,6 @@ clean-elk:
docker rm tools_elasticsearch_1
docker rm tools_kibana_1

psql-container:
docker run -it --net tools_default --rm postgres:12 sh -c 'exec psql -h "postgres" -p "5432" -U postgres'

VERSION:
@echo "awx: $(VERSION)"

@@ -645,7 +658,22 @@ awx-kube-build: Dockerfile
--build-arg VERSION=$(VERSION) \
--build-arg SETUPTOOLS_SCM_PRETEND_VERSION=$(VERSION) \
--build-arg HEADLESS=$(HEADLESS) \
-t $(DEV_DOCKER_TAG_BASE)/awx:$(COMPOSE_TAG) .
-t $(DEV_DOCKER_TAG_BASE)/ascender:$(COMPOSE_TAG) .

## Build multi-arch awx image for deployment on Kubernetes environment.
awx-kube-buildx: Dockerfile
- docker buildx create --name awx-kube-buildx
docker buildx use awx-kube-buildx
- docker buildx build \
--push \
--build-arg VERSION=$(VERSION) \
--build-arg SETUPTOOLS_SCM_PRETEND_VERSION=$(VERSION) \
--build-arg HEADLESS=$(HEADLESS) \
--platform=$(PLATFORMS) \
--tag $(DEV_DOCKER_TAG_BASE)/ascender:$(COMPOSE_TAG) \
-f Dockerfile .
- docker buildx rm awx-kube-buildx


.PHONY: Dockerfile.kube-dev
## Generate Docker.kube-dev for awx_kube_devel image
@@ -660,25 +688,35 @@ Dockerfile.kube-dev: tools/ansible/roles/dockerfile/templates/Dockerfile.j2
awx-kube-dev-build: Dockerfile.kube-dev
DOCKER_BUILDKIT=1 docker build -f Dockerfile.kube-dev \
--build-arg BUILDKIT_INLINE_CACHE=1 \
--cache-from=$(DEV_DOCKER_TAG_BASE)/awx_kube_devel:$(COMPOSE_TAG) \
-t $(DEV_DOCKER_TAG_BASE)/awx_kube_devel:$(COMPOSE_TAG) .

--cache-from=$(DEV_DOCKER_TAG_BASE)/ascender_kube_devel:$(COMPOSE_TAG) \
-t $(DEV_DOCKER_TAG_BASE)/ascender_kube_devel:$(COMPOSE_TAG) .

## Build and push multi-arch awx_kube_devel image for development on local Kubernetes environment.
awx-kube-dev-buildx: Dockerfile.kube-dev
- docker buildx create --name awx-kube-dev-buildx
docker buildx use awx-kube-dev-buildx
- docker buildx build \
--push \
--build-arg BUILDKIT_INLINE_CACHE=1 \
--cache-from=$(DEV_DOCKER_TAG_BASE)/ascender_kube_devel:$(COMPOSE_TAG) \
--platform=$(PLATFORMS) \
--tag $(DEV_DOCKER_TAG_BASE)/ascender_kube_devel:$(COMPOSE_TAG) \
-f Dockerfile.kube-dev .
- docker buildx rm awx-kube-dev-buildx

kind-dev-load: awx-kube-dev-build
$(KIND_BIN) load docker-image $(DEV_DOCKER_TAG_BASE)/awx_kube_devel:$(COMPOSE_TAG)
$(KIND_BIN) load docker-image $(DEV_DOCKER_TAG_BASE)/ascender_kube_devel:$(COMPOSE_TAG)

# Translation TASKS
# --------------------------------------

## generate UI .pot file, an empty template of strings yet to be translated
pot: $(UI_BUILD_FLAG_FILE)
$(NPM_BIN) --prefix awx/ui --loglevel warn run extract-template --clean
$(NPM_BIN) --prefix awx/ui_next --loglevel warn run extract-template --clean

## generate UI .po files for each locale (will update translated strings for `en`)
po: $(UI_BUILD_FLAG_FILE)
$(NPM_BIN) --prefix awx/ui --loglevel warn run extract-strings -- --clean
$(NPM_BIN) --prefix awx/ui_next --loglevel warn run extract-strings -- --clean

## generate API django .pot .po
messages:
@@ -726,6 +764,3 @@ help/generate:
{ lastLine = $$0 }' $(MAKEFILE_LIST) | sort -u
@printf "\n"

## Display help for ui-next targets
help/ui-next:
@$(MAKE) -s help MAKEFILE_LIST="awx/ui_next/Makefile"
1 change: 1 addition & 0 deletions NOTICE.txt
Original file line number Diff line number Diff line change
@@ -10,6 +10,7 @@ Any and all changes are being distributed under the original License
Apache 2.0 License (see /LICENSE.md)

Data Files modified by Ctrl IQ, Inc
/MANIFEST.in
/ui/package-lock.json
/ui/package.json
/ui/public/static/media/default.strings.json
6 changes: 4 additions & 2 deletions awx/__init__.py
Original file line number Diff line number Diff line change
@@ -154,10 +154,12 @@ def manage():
from django.conf import settings
from django.core.management import execute_from_command_line

# enforce the postgres version is equal to 12. if not, then terminate program with exit code of 1
# enforce the postgres version is a minimum of 12 (we need this for partitioning); if not, then terminate program with exit code of 1
# In the future if we require a feature of a version of postgres > 12 this should be updated to reflect that.
# The return of connection.pg_version is something like 12013
if not os.getenv('SKIP_PG_VERSION_CHECK', False) and not MODE == 'development':
if (connection.pg_version // 10000) < 12:
sys.stderr.write("Postgres version 12 is required\n")
sys.stderr.write("At a minimum, postgres version 12 is required\n")
sys.exit(1)

if len(sys.argv) >= 2 and sys.argv[1] in ('version', '--version'): # pragma: no cover
Loading