WIP: functioning manual instruction to get docker-compose working

This commit is contained in:
Hao Liu
2023-02-21 16:40:47 -05:00
parent 7f50679e68
commit 86a4a38be6
6 changed files with 58 additions and 3 deletions

2
.gitignore vendored
View File

@@ -161,3 +161,5 @@ use_dev_supervisor.txt
/_build/ /_build/
/_build_kube_dev/ /_build_kube_dev/
/Dockerfile.kube-dev /Dockerfile.kube-dev
awx/ui-next/ansible-ui

View File

@@ -1,3 +1,5 @@
include awx/ui-next/Makefile
PYTHON ?= python3.9 PYTHON ?= python3.9
OFFICIAL ?= no OFFICIAL ?= no
NODE ?= node NODE ?= node
@@ -540,7 +542,7 @@ docker-compose-container-group-clean:
rm -rf tools/docker-compose-minikube/_sources/ rm -rf tools/docker-compose-minikube/_sources/
## Base development image build ## Base development image build
docker-compose-build: docker-compose-build:
ansible-playbook tools/ansible/dockerfile.yml -e build_dev=True -e receptor_image=$(RECEPTOR_IMAGE) ansible-playbook tools/ansible/dockerfile.yml -e build_dev=True -e receptor_image=$(RECEPTOR_IMAGE)
DOCKER_BUILDKIT=1 docker build -t $(DEVEL_IMAGE_NAME) \ DOCKER_BUILDKIT=1 docker build -t $(DEVEL_IMAGE_NAME) \
--build-arg BUILDKIT_INLINE_CACHE=1 \ --build-arg BUILDKIT_INLINE_CACHE=1 \

View File

@@ -83,7 +83,11 @@ USE_L10N = True
USE_TZ = True USE_TZ = True
STATICFILES_DIRS = [os.path.join(BASE_DIR, 'ui', 'build', 'static'), os.path.join(BASE_DIR, 'static')] STATICFILES_DIRS = [
os.path.join(BASE_DIR, 'ui', 'build', 'static'),
os.path.join(BASE_DIR, 'ui-next', 'ansible-ui', 'build'),
os.path.join(BASE_DIR, 'static'),
]
# Absolute filesystem path to the directory where static file are collected via # Absolute filesystem path to the directory where static file are collected via
# the collectstatic command. # the collectstatic command.
@@ -290,7 +294,12 @@ TEMPLATES = [
], ],
'builtins': ['awx.main.templatetags.swagger'], 'builtins': ['awx.main.templatetags.swagger'],
}, },
'DIRS': [os.path.join(BASE_DIR, 'templates'), os.path.join(BASE_DIR, 'ui', 'build'), os.path.join(BASE_DIR, 'ui', 'public')], 'DIRS': [
os.path.join(BASE_DIR, 'templates'),
os.path.join(BASE_DIR, 'ui', 'build'),
os.path.join(BASE_DIR, 'ui', 'public'),
os.path.join(BASE_DIR, 'ui-next', 'ansible-ui', 'build', 'controller'),
],
}, },
] ]

12
awx/ui-next/README.md Normal file
View File

@@ -0,0 +1,12 @@
```
git clone git@github.com:ansible/ansible-ui.git
```
```
pushd ansible-ui
npm run build:controller
popd
```

28
awx/ui-next/urls.py Normal file
View File

@@ -0,0 +1,28 @@
from django.urls import re_path
from django.utils.translation import gettext_lazy as _
from django.views.generic.base import TemplateView
from awx.main.utils.licensing import server_product_name
class IndexView(TemplateView):
template_name = 'index_controller.html'
class MigrationsNotran(TemplateView):
template_name = 'installing.html'
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
product_name = server_product_name()
context['title'] = _('%s Upgrading' % product_name)
context['image_alt'] = _('Logo')
context['aria_spinner'] = _('Loading')
context['message_upgrade'] = _('%s is currently upgrading.' % product_name)
context['message_refresh'] = _('This page will refresh when complete.')
return context
app_name = 'ui-next'
urlpatterns = [re_path(r'^$', IndexView.as_view(), name='index'), re_path(r'^migrations_notran/$', MigrationsNotran.as_view(), name='migrations_notran')]

View File

@@ -9,6 +9,8 @@ from awx.main.views import handle_400, handle_403, handle_404, handle_500, handl
urlpatterns = [ urlpatterns = [
re_path(r'', include('awx.ui.urls', namespace='ui')), re_path(r'', include('awx.ui.urls', namespace='ui')),
re_path(r'^controller/', include('awx.ui-next.urls', namespace='controller')),
# re_path(r'^ui-next/', include('awx.ui-next.urls', namespace='ui-next')),
re_path(r'^api/', include('awx.api.urls', namespace='api')), re_path(r'^api/', include('awx.api.urls', namespace='api')),
re_path(r'^sso/', include('awx.sso.urls', namespace='sso')), re_path(r'^sso/', include('awx.sso.urls', namespace='sso')),
re_path(r'^sso/', include('social_django.urls', namespace='social')), re_path(r'^sso/', include('social_django.urls', namespace='social')),