Code Monkey home page Code Monkey logo

Comments (7)

MartinTerp avatar MartinTerp commented on May 25, 2024 4

you need the same folder on the awx_task container.
you can add this to your compose file for _task and _web:

volumes:
  - /mnt/awx:/var/lib/awx/projects

This will map /mnt/awx (or replace with something else) on the host server running the container, to the /var/lib/awx/projects folder on the container.
This way you can have a shared directory for your playbooks

from awx-container.

 avatar commented on May 25, 2024

Hi,

Thanks for the suggestion.

I am novice in dockers so i have tried manually mount the volume for running below command:

[root@ansible ~]# docker run -v /media/sf_ansible_cookbooks:/var/lib/awx/projects -i -t awx_web:1.0.0.331
WARNING: IPv4 forwarding is disabled. Networking will not work.

Traceback (most recent call last):
File "/usr/bin/awx-manage", line 9, in
load_entry_point('awx==1.0.0.331', 'console_scripts', 'awx-manage')()
File "/usr/lib/python2.7/site-packages/awx/init.py", line 107, in manage
execute_from_command_line(sys.argv)
File "/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/core/management/init.py", line 354, in execute_from_command_line
utility.execute()
File "/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/core/management/init.py", line 328, in execute
django.setup()
File "/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/init.py", line 18, in setup
apps.populate(settings.INSTALLED_APPS)
File "/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/apps/registry.py", line 115, in populate
app_config.ready()
File "/usr/lib/python2.7/site-packages/awx/conf/apps.py", line 18, in ready
configure_external_logger(settings)
File "/usr/lib/python2.7/site-packages/awx/main/utils/handlers.py", line 342, in configure_external_logger
is_enabled = settings_module.LOG_AGGREGATOR_ENABLED
File "/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/conf/init.py", line 49, in getattr
return getattr(self._wrapped, name)
File "/usr/lib/python2.7/site-packages/awx/conf/settings.py", line 386, in getattr
value = self._get_local(name)
File "/usr/lib64/python2.7/contextlib.py", line 35, in exit
self.gen.throw(type, value, traceback)
File "/usr/lib/python2.7/site-packages/awx/conf/settings.py", line 64, in _log_database_error
if get_tower_migration_version() < '310':
File "/usr/lib/python2.7/site-packages/awx/main/utils/db.py", line 13, in get_tower_migration_version
loader = MigrationLoader(connection, ignore_no_migrations=True)
File "/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/db/migrations/loader.py", line 47, in init
self.build_graph()
File "/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/db/migrations/loader.py", line 191, in build_graph
self.applied_migrations = recorder.applied_migrations()
File "/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/db/migrations/recorder.py", line 59, in applied_migrations
self.ensure_schema()
File "/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/db/migrations/recorder.py", line 49, in ensure_schema
if self.Migration._meta.db_table in self.connection.introspection.table_names(self.connection.cursor()):
File "/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/db/backends/base/base.py", line 164, in cursor
cursor = self.make_cursor(self._cursor())
File "/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/db/backends/base/base.py", line 135, in _cursor
self.ensure_connection()
File "/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/db/backends/base/base.py", line 130, in ensure_connection
self.connect()
File "/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/db/utils.py", line 98, in exit
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/db/backends/base/base.py", line 130, in ensure_connection
self.connect()
File "/var/lib/awx/venv/awx/lib/python2.7/site-packages/transaction_hooks/mixin.py", line 75, in connect
super(TransactionHooksDatabaseWrapperMixin, self).connect(*a, **kw)
File "/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/db/backends/base/base.py", line 119, in connect
self.connection = self.get_new_connection(conn_params)
File "/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 176, in get_new_connection
connection = Database.connect(**conn_params)
File "/var/lib/awx/venv/awx/lib/python2.7/site-packages/psycopg2/init.py", line 130, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
django.db.utils.OperationalError: local user with ID 1000 does not exist

2017-09-12 16:48:47,009 INFO RPC interface 'supervisor' initialized
2017-09-12 16:48:47,009 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2017-09-12 16:48:47,009 INFO supervisord started with pid 18
2017-09-12 16:48:48,014 INFO spawned: 'daphne' with pid 21
2017-09-12 16:48:48,029 INFO spawned: 'nginx' with pid 22
2017-09-12 16:48:48,039 INFO spawned: 'uwsgi' with pid 23
*** Starting uWSGI 2.0.14 (64bit) on [Tue Sep 12 16:48:48 2017] ***
compiled with version: 4.8.5 20150623 (Red Hat 4.8.5-11) on 11 September 2017 20:23:42
os: Linux-3.10.0-514.26.2.el7.x86_64 #1 SMP Tue Jul 4 15:04:05 UTC 2017
nodename: 442909efc9cc
machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 2
current working directory: /var/lib/awx
detected binary path: /var/lib/awx/venv/awx/bin/uwsgi
your memory page size is 4096 bytes
*** WARNING: you have enabled harakiri without post buffering. Slow upload could be rejected on post-unbuffered webservers ***
detected max file descriptor number: 65536
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
uwsgi socket 0 bound to TCP address 127.0.0.1:8050 fd 3

from awx-container.

 avatar commented on May 25, 2024

Hi,

I am able to resolve the issue by syncing up both containers directory "/var/lib/awx/projects" on awx_web and awx_tasks container but sharing a directory from source server to containers giving me issues :(

from awx-container.

MartinTerp avatar MartinTerp commented on May 25, 2024

@rahulansible how do you start the containers without the folder mount?

from awx-container.

 avatar commented on May 25, 2024

@MartinTerp containers are already running. Once ansible-awx role has completed, status of containers were running or i will start them with docker container start. I have edited the docker-compose.yml file come up with awx role and tried re-running the playbook but no luck.

from awx-container.

shgonzalez avatar shgonzalez commented on May 25, 2024

Try this secuence:

  • stop containers
  • edit docker-compose.yml, adding volumes to _web and _task containers.
  • docker-compose -f docker-compose.yml create
  • docker-compose -f docker-compose.yml start

from awx-container.

geerlingguy avatar geerlingguy commented on May 25, 2024

I'm closing all issues on this repository as it has been deprecated; please see: #49

from awx-container.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.