mirror of
https://github.com/ansible/awx.git
synced 2026-01-10 15:32:07 -03:30
Include the Tower venv in the isolated bubblewrapped arguments.
This moves the container-based code location and venvs. The goal here is that the paths of Tower source for isolated vs normal nodes matches (both in prod and local development) so that we don't have to add a bunch of additional bwrap argument logic for <location-of-isolated-tower-venv>.
This commit is contained in:
parent
ba22b3426d
commit
2ba9e56033
12
Makefile
12
Makefile
@ -302,13 +302,13 @@ requirements_ansible_dev:
|
||||
fi
|
||||
|
||||
requirements_isolated:
|
||||
if [ ! -d "$(VENV_BASE)/tower_isolated" ]; then \
|
||||
virtualenv --system-site-packages $(VENV_BASE)/tower_isolated && \
|
||||
$(VENV_BASE)/tower_isolated/bin/pip install $(PIP_OPTIONS) --ignore-installed six packaging appdirs && \
|
||||
$(VENV_BASE)/tower_isolated/bin/pip install $(PIP_OPTIONS) --ignore-installed setuptools==35.0.2 && \
|
||||
$(VENV_BASE)/tower_isolated/bin/pip install $(PIP_OPTIONS) --ignore-installed pip==9.0.1; \
|
||||
if [ ! -d "$(VENV_BASE)/tower" ]; then \
|
||||
virtualenv --system-site-packages $(VENV_BASE)/tower && \
|
||||
$(VENV_BASE)/tower/bin/pip install $(PIP_OPTIONS) --ignore-installed six packaging appdirs && \
|
||||
$(VENV_BASE)/tower/bin/pip install $(PIP_OPTIONS) --ignore-installed setuptools==35.0.2 && \
|
||||
$(VENV_BASE)/tower/bin/pip install $(PIP_OPTIONS) --ignore-installed pip==9.0.1; \
|
||||
fi;
|
||||
$(VENV_BASE)/tower_isolated/bin/pip install -r requirements/requirements_isolated.txt
|
||||
$(VENV_BASE)/tower/bin/pip install -r requirements/requirements_isolated.txt
|
||||
|
||||
# Install third-party requirements needed for Tower's environment.
|
||||
requirements_tower: virtualenv_tower
|
||||
|
||||
@ -643,7 +643,7 @@ def wrap_args_with_proot(args, cwd, **kwargs):
|
||||
show_paths = [cwd]
|
||||
if settings.ANSIBLE_USE_VENV:
|
||||
show_paths.append(settings.ANSIBLE_VENV_PATH)
|
||||
if settings.TOWER_USE_VENV and not kwargs.get('isolated'):
|
||||
if settings.TOWER_USE_VENV:
|
||||
show_paths.append(settings.TOWER_VENV_PATH)
|
||||
show_paths.extend(getattr(settings, 'AWX_PROOT_SHOW_PATHS', None) or [])
|
||||
for path in sorted(set(show_paths)):
|
||||
|
||||
@ -11,7 +11,7 @@ services:
|
||||
image: gcr.io/ansible-tower-engineering/tower_isolated:${TAG}
|
||||
hostname: isolated
|
||||
volumes:
|
||||
- "../awx/main/isolated:/tower_isolated"
|
||||
- "../awx/main/isolated:/tower_devel"
|
||||
- "../awx/lib:/tower_lib"
|
||||
- "/sys/fs/cgroup:/sys/fs/cgroup:ro"
|
||||
privileged: true
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
#!/bin/bash
|
||||
. /venv/tower_isolated/bin/activate
|
||||
exec env TOWER_LIB_DIRECTORY=/tower_lib /tower_isolated/run.py "$@"
|
||||
. /venv/tower/bin/activate
|
||||
exec env TOWER_LIB_DIRECTORY=/tower_lib /tower_devel/run.py "$@"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user