fitbeard / awx-without-k8s Goto Github PK
View Code? Open in Web Editor NEWAWX clustering using Ansible and Docker
AWX clustering using Ansible and Docker
Hello,
Do you plan to support AWX version 12.0.0 and higher ?
Hi,
I build my custom EE using your dockerfile, but when i integrate a mitogen strategy in my ansible.cfg i get error running a playbook.
ansible.cfg
[defaults]
strategy_plugins = /path_to_mitogen/ansible_mitogen/plugins/strategy
strategy = mitogen_linear
ansible version:
bash-4.4# ansible --version
ansible [core 2.12.5.post0]
config file = /etc/ansible/ansible.cfg
configured module search path = ['/home/runner/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python3.8/site-packages/ansible
ansible collection location = /home/runner/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/local/bin/ansible
python version = 3.8.13 (default, Jun 24 2022, 15:27:57) [GCC 8.5.0 20210514 (Red Hat 8.5.0-13)]
jinja version = 2.11.3
libyaml = True
I also add ENV inside my EE container when a build it with your dockerfile
ANSIBLE_STRATEGY_PLUGINS=/path_to_mitogen/ansible_mitogen/plugins/strategy
ANSIBLE_STRATEGY=mitogen_linear
Dockerfile:
FROM quay.io/ansible/awx-ee:21.11.0
USER root
ENV http_proxy http://proxy:port
ENV https_proxy http://proxy:port
ENV HTTP_PROXY http://proxy:port
ENV HTTPS_PROXY http://proxy:port
RUN dnf -y update &&
yum -y install podman crun procps &&
rm -rf /var/cache /var/log/dnf* /var/log/yum.*
RUN useradd runner -u 1000 -g 0
ADD https://raw.githubusercontent.com/containers/libpod/master/contrib/podmanimage/stable/containers.conf /etc/containers/containers.conf
ADD https://raw.githubusercontent.com/containers/libpod/master/contrib/podmanimage/stable/podman-containers.conf /home/runner/.config/containers/containers.conf
RUN chmod 644 /etc/containers/containers.conf && sed -i -e 's|^#mount_program|mount_program|g' -e '/additionalimage./a "/var/lib/shared",' -e 's|^mountopt[[:space:]]=.*$|mountopt = "nodev,fsync=0"|g' /etc/containers/storage.conf
RUN mkdir -p /var/lib/shared/overlay-images /var/lib/shared/overlay-layers /var/lib/shared/vfs-images /var/lib/shared/vfs-layers;
touch /var/lib/shared/overlay-images/images.lock; touch /var/lib/shared/overlay-layers/layers.lock; touch /var/lib/shared/vfs-images/images.lock;
touch /var/lib/shared/vfs-layers/layers.lock
RUN chown -R 1000:0 /home/runner/.config
COPY ansible.cfg /etc/ansible/ansible.cfg
RUN mkdir -p /usr/local/mitogen
ENV ANSIBLE_STRATEGY_PLUGINS=/path_to_mitogen/ansible_mitogen/plugins/strategy
ENV ANSIBLE_STRATEGY=mitogen_linear
RUN mkdir -p /etc/containers/registries.conf.d/ && echo "unqualified-search-registries = []" >> /etc/containers/registries.conf.d/force-fully-qualified-images.conf &&
chmod 644 /etc/containers/registries.conf.d/force-fully-qualified-images.conf
RUN chmod 4755 /usr/bin/newgidmap /usr/bin/newuidmap
ENV _CONTAINERS_USERNS_CONFIGURED=""
USER 1000
ERROR! Invalid play strategy specified: mitogen_linear
The error appears to be in '/runner/project/test-ping.yml': line 2, column 3, but may
be elsewhere in the file depending on the exact syntax problem.
Any ideas about this ?
Thanks
[root@master1 awx-ha-cluster]# cat inventory/demo
[all:vars]
[postgres]
master1.otl.lab
[awx_instance_group_web]
master1.otl.lab node=primary
master2.otl.lab
[awx_instance_group_task]
master1.otl.lab node=primary
master2.otl.lab
[awx_instance_group_isolated_one]
[awx_instance_group_isolated_two]
[root@master1 awx-ha-cluster]#
I am getting output as
TASK [postgres : Template Docker compose config] ***********************************************************************************
failed: [master1.otl.lab] (item={u'src': u'docker-compose.yml.j2', u'dst': u'docker-compose.yml'}) => {"ansible_loop_var": "item", "changed": false, "item": {"dst": "docker-compose.yml", "src": "docker-compose.yml.j2"}, "msg": "AnsibleError: An unhandled exception occurred while templating '{{ lookup('hashi_vault', 'secret=secret/test/data/lab/ansible/awx:data').pg_username }}'. Error was a <class 'ansible.errors.AnsibleError'>, original message: An unhandled exception occurred while running the lookup plugin 'hashi_vault'. Error was a <class 'ansible.errors.AnsibleError'>, original message: No Vault Token specified"}
PLAY RECAP *************************************************************************************************************************
master1.otl.lab : ok=9 changed=0 unreachable=0 failed=1 skipped=1 rescued=0 ignored=0
master2.otl.lab : ok=6 changed=0 unreachable=0 failed=0 skipped=1 rescued=0 ignored=0
AWX currently is on version 19.5.0 and I was wondering if there are plans to update the awx-ha-cluster project to a newer release of AWX. Thanks
Please note that isolated nodes are not supported anymore:
ansible/awx@e56c5db
i have this issue when a update the inventory
I use only one server with hybride node
Traceback (most recent call last):
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/main/tasks/receptor.py", line 435, in _run_internal
lines = resultfile.readlines()
OSError: read() should have returned a bytes object, not 'NoneType'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/main/tasks/jobs.py", line 593, in run
res = receptor_job.run()
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/main/tasks/receptor.py", line 317, in run
res = self._run_internal(receptor_ctl)
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/main/tasks/receptor.py", line 444, in _run_internal
raise RuntimeError(detail)
RuntimeError: exit status 1
Hello,
I get error running a refresh inventory only on the execution nodes, i works in hybride node.
Error: creating runtime static files directory: mkdir /var/lib/awx/.local: permission denied
I used your Dockerfile to build custom ee image with a specific ansible version, i cannot used the latest.
FROM quay.io/ansible/awx-ee:21.11.0
Any ideas ?
OS: Red Hat Enterprise Linux release 8.6
Docker version 23.0.1, build a5ee5b1
AWX: v22
Am having i issue when i refresh the awx project using my custom EE.
I build the custom EE with this execution execution-environment.yml and a specific ansible version (2.12)
version: 1
dependencies:
galaxy: requirements.yml
python: requirements.txt
build_arg_defaults:
EE_BASE_IMAGE: 'quay.io/ansible/ansible-runner:stable-2.12-latest'
ANSIBLE_GALAXY_CLI_COLLECTION_OPTS: "-c"
ansible_config: 'ansible.cfg'
additional_build_steps:
prepend:
...
Traceback (most recent call last):
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/main/tasks/receptor.py", line 438, in _run_internal
lines = resultfile.readlines()
OSError: read() should have returned a bytes object, not 'NoneType'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/main/tasks/jobs.py", line 604, in run
res = receptor_job.run()
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/main/tasks/receptor.py", line 320, in run
res = self._run_internal(receptor_ctl)
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/main/tasks/receptor.py", line 447, in _run_internal
raise RuntimeError(detail)
RuntimeError: exit status 1
I looked for a post on this in the repo but unfortunately I couldn't find one. I only use the DEMO data so I didn't create the secrets
folder either, I was just wondering how this installation works.
Everything is installed except the awx-ee
container writes this error:
awx-ee | Error: MainInstance.nodeID=awx not found in certificate name(s); names found=[awx-receptor-1.demo.io]; cfg section=tls_server; server cert=/etc/receptor/tls/receptor.crt
Has anyone encountered this problem?
Thanks in advance!
Hello Firbeard.
Thanks for your work. I try to install your AWX Cluster version, but it's not so easy because we haven't lot of information about ansible defaults vars to use.
I don't understand how your installation works.
for example: We need
docker_registry: "dockerhost"
docker_registry_namespace: "docker-repo / awx"
But what is it?
After 2h, i can't run my cluster. So hard to configure :)
If I do not set variables like ssl_key or ssl_certificate I have an issue too. What is ssl_key and ssl_cert? path? my .pem ??
If you have the time to run your script on an empty environment (4 centos 7 servers) and complete your README and / or update group_vars with good variables. I have the time to work on this this week so I will try to successfully install AWX Cluster.
Regards,
Hi,
I have this error in awx-task container when i upgrade my AWX to 22 version.
config: one server in Hybride mode
ERROR [-] awx.main.dispatch Encountered unhandled error in dispatcher main loop
Traceback (most recent call last):
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/main/dispatch/worker/base.py", line 180, in run
self.worker.on_start()
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/main/dispatch/worker/task.py", line 141, in on_start
dispatch_startup()
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/main/tasks/system.py", line 111, in dispatch_startup
cluster_node_heartbeat()
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/main/tasks/system.py", line 507, in cluster_node_heartbeat
inspect_execution_nodes(instance_list)
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/main/tasks/system.py", line 448, in inspect_execution_nodes
mesh_status = ctl.simple_command('status')
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/receptorctl/socket_interface.py", line 81, in simple_command
self.connect()
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/receptorctl/socket_interface.py", line 101, in connect
self._socket.connect(path)
ConnectionRefusedError: [Errno 111] Connection refused
Traceback (most recent call last):
File "/usr/bin/awx-manage", line 8, in
sys.exit(manage())
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/init.py", line 200, in manage
execute_from_command_line(sys.argv)
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/core/management/init.py", line 419, in execute_from_command_line
utility.execute()
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/core/management/init.py", line 413, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/core/management/base.py", line 354, in run_from_argv
self.execute(*args, **cmd_options)
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/core/management/base.py", line 398, in execute
output = self.handle(*args, **options)
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/main/management/commands/run_dispatcher.py", line 81, in handle
consumer.run()
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/main/dispatch/worker/base.py", line 180, in run
self.worker.on_start()
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/main/dispatch/worker/task.py", line 141, in on_start
dispatch_startup()
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/main/tasks/system.py", line 111, in dispatch_startup
cluster_node_heartbeat()
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/main/tasks/system.py", line 507, in cluster_node_heartbeat
inspect_execution_nodes(instance_list)
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/main/tasks/system.py", line 448, in inspect_execution_nodes
mesh_status = ctl.simple_command('status')
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/receptorctl/socket_interface.py", line 81, in simple_command
self.connect()
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/receptorctl/socket_interface.py", line 101, in connect
self._socket.connect(path)
ConnectionRefusedError: [Errno 111] Connection refused
Thank's
I am coming from this https://github.com/sujiar37/AWX-HA-InstanceGroup
Is it just a case of following the upgrade section on this to upgrade my awx HA cluster?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.