MrMEEE / awx-build

144 stars 39 forks source link

Issues during Installation and configuration #274

Closed techiesanjay closed 4 years ago

techiesanjay commented 4 years ago

Hi,

I am new to AWX installation.

I am faced some issues during installing and configuration.

Problems faced during Installation:

yum -y install rh-git29 rh-git29 package strangely does not exist in the software collection repo. I could only see rh-git218 out there

yum -y install --disablerepo='' --enablerepo='copr:copr.fedorainfracloud.org:mrmeee:ansible-awx, base' -x -debuginfo rh-python36* For the above i was getting transaction errors

Transaction check error: file /opt/rh/rh-python36/root/usr/lib64/python3.6/site-packages/msgpack/init.py conflicts between attempted installs of rh-python36-msgpack-python-0.5.6-1.x86_64 and rh-python36-msgpack-0.6.2-1.x86_64 file /opt/rh/rh-python36/root/usr/lib64/python3.6/site-packages/msgpack/pycache/init.cpython-36.opt-1.pyc conflicts between attempted installs of rh-python36-msgpack-python-0.5.6-1.x86_64 and rh-python36-msgpack-0.6.2-1.x86_64 file /opt/rh/rh-python36/root/usr/lib64/python3.6/site-packages/msgpack/pycache/init.cpython-36.pyc conflicts between attempted installs of rh-python36-msgpack-python-0.5.6-1.x86_64 and rh-python36-msgpack-0.6.2-1.x86_64

... Omitted the full ouput

Problems faced during Configuration

Create Postgres user and DB: scl enable rh-postgresql10 "su postgres -c \"createuser -S awx\"" could not change directory to "/root": Permission denied

scl enable rh-postgresql10 "su postgres -c \"createdb -O awx awx\"" could not change directory to "/root": Permission denied I am unsure if the above two are error or warning and if they are of consequence

Since rh-git29 was not installing i installed rh-git218 and the ran the following:

Import database data

sudo -u awx scl enable rh-python36 rh-postgresql10 rh-git218 "GIT_PYTHON_REFRESH=quiet awx-manage migrate"

Traceback (most recent call last): File "/opt/rh/rh-python36/root/usr/bin/awx-manage", line 11, in load_entry_point('awx==9.3.0', 'console_scripts', 'awx-manage')() File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/pkg_resources/init.py", line 570, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/pkg_resources/init.py", line 2751, in load_entry_point return ep.load() File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/pkg_resources/init.py", line 2405, in load return self.resolve() File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/pkg_resources/init.py", line 2411, in resolve module = import(self.module_name, fromlist=['name'], level=0) File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/awx/init.py", line 32, in from django.db.backends.base import schema File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/django/db/init.py", line 2, in from django.db.utils import ( File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/django/db/utils.py", line 5, in from asgiref.local import Local ModuleNotFoundError: No module named 'asgiref'

I stopped the installation of AWX post the above error message

Can somebody help?

psmola commented 4 years ago

Hi 1) Uninstall python36-msgpack-python-0.5.6-1.x86_64 and install rh-python36-msgpack-0.6.2-1.x86_64 2) "could not change directory to "/root": Permission denied" - ignore . Command has been executed from dir where only root has privileges. Execute this command from /tmp dir . 3) rh-python36-asgiref not installed. Many of rh-python36-*.rpm packages must be installed manually

Regards, Pawel

techiesanjay commented 4 years ago

Hi

1. Uninstall python36-msgpack-python-0.5.6-1.x86_64 and install rh-python36-msgpack-0.6.2-1.x86_64

2. "could not change directory to "/root": Permission denied" - ignore . Command has been executed from dir where only root has privileges. Execute this command from /tmp dir .

3. rh-python36-asgiref not installed. Many of rh-python36-*.rpm packages must be installed manually

Regards, Pawel

Hi Pawel,

Thanks for taking the time to reply to my post.

I could be wrong but these install instructions seem to be quite broken.

I was on the configuration part on https://awx.wiki/installation/configuration

at the Import Database data:

sudo -u awx scl enable rh-python36 rh-postgresql10 rh-git29 "GIT_PYTHON_REFRESH=quiet awx-manage migrate"

It started asking for libraries after libraries I did install a few but then i got stuck at:

Traceback (most recent call last): File "/opt/rh/rh-python36/root/usr/bin/awx-manage", line 11, in load_entry_point('awx==9.3.0', 'console_scripts', 'awx-manage')() File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/awx/init.py", line 152, in manage execute_from_command_line(sys.argv) File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/django/core/management/init.py", line 401, in execute_from_command_line utility.execute() File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/django/core/management/init.py", line 377, in execute django.setup() File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/django/init.py", line 24, in setup apps.populate(settings.INSTALLED_APPS) File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/django/apps/registry.py", line 114, in populate app_config.import_models() File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/django/apps/config.py", line 211, in import_models self.models_module = import_module(models_module_name) File "/opt/rh/rh-python36/root/usr/lib64/python3.6/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 994, in _gcd_import File "", line 971, in _find_and_load File "", line 955, in _find_and_load_unlocked File "", line 665, in _load_unlocked File "", line 678, in exec_module File "", line 219, in _call_with_frames_removed File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/oauth2_provider/models.py", line 11, in from django.utils.encoding import python_2_unicode_compatible ImportError: cannot import name 'python_2_unicode_compatible' [root@localhost ~]# yum -y install rh-python36-six Loaded plugins: fastestmirror, langpacks Loading mirror speeds from cached hostfile

To me it seems that the awx-manage appears broken. I was trying to run this on a CentOS 7.7

I dont know how to proceed.

psmola commented 4 years ago

Hi, Still some other rh-python36 packages are needed. From log I see that you install AWX 9.3. Unfortunately due to BUG in this version with Django on my servers I installed AWX 9.2 and for this version I have full list of rh-python3.6 packages needed with version . List of all packages for AWX 9.2 is here: https://github.com/psmola/awx_patching/blob/master/awx-patching/defaults/main.yml in the variable awx_required_os_packages_awx_local.v92

Rlueck commented 4 years ago

If you have a look at the AWX Wiki hosted by the same person, the build process you're trying to use is broken: https://awx.wiki/

Try the new build process posted here: https://awx.wiki/blog/new-build-server-new-installer-new-maintainers-same-project

psmola commented 4 years ago

@techiesanjay you are trying install AWX 9 and maybe it's a good idea switch to AWX 11 and new installer as @Rlueck described. I installed version 11 using new method and looks much simpler than old installation process for AWX 9

techiesanjay commented 4 years ago

Hi @psmola and @Rlueck.

Thanks a lot for helping me with that. I did stumble on that script and on running it got a successful install of AWX-RPM 11.2

Appreciate all of you spending some time to answer my queries.

Thanks and Regards, Sanjay