# Custom EE in Ansible 19 fails

**URL:** <https://forum.ansible.com/t/custom-ee-in-ansible-19-fails/34941>\
**Category:** AWX Project\
**Tags:** awx, ee\
**Created:** [April 8, 2021, 3:18pm UTC](https://forum.ansible.com/t/custom-ee-in-ansible-19-fails/34941 "2021-04-08T15:18:54Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![Banshee091](https://avatars.discourse-cdn.com/v4/letter/b/43a26b/32.png) [@Banshee091](https://forum.ansible.com/u/Banshee091)\
**Post date:** [April 8, 2021, 3:18pm UTC](https://forum.ansible.com/t/custom-ee-in-ansible-19-fails/34941/1 "2021-04-08T15:18:54Z")

</div>

Hey there,  
I wanted to make sure I don’t overlook something, before I open a bug report.

I created a custom EE for AWX 18, since installing collections didn’t work properly there.  
It worked absolutely fine, when I set it as an image in the instance group → customize pod settings.  
Now, with a brand new awx 19 installation, installing collections and roles workes absolutely fine, but when I try to use the same EE (with and without setting it in the instance group) the playbook fails instantly with the following error:

2021-04-08 15:00:15,229 ERROR [4a0369353c4f4fdbb45f873938b5f6a3] awx.main.tasks job 27 (running) Exception occurred while running task  
Traceback (most recent call last):  
File “/var/lib/awx/venv/awx/lib64/python3.8/site-packages/awx/main/tasks.py”, line 1397, in run  
res = receptor\_job.run()  
File “/var/lib/awx/venv/awx/lib64/python3.8/site-packages/awx/main/tasks.py”, line 2957, in run  
return self.\_run\_internal(receptor\_ctl)  
File “/var/lib/awx/venv/awx/lib64/python3.8/site-packages/awx/main/tasks.py”, line 3008, in \_run\_internal  
raise RuntimeError(detail)  
RuntimeError: Error creating pod: container failed with exit code 1:

Anyone any ideas?

---

<div class="post-metadata">

**Author:** ![Shane\_McDonald](https://avatars.discourse-cdn.com/v4/letter/s/7cd45c/32.png) [@Shane\_McDonald](https://forum.ansible.com/u/Shane_McDonald)\
**Post date:** [April 8, 2021, 4:49pm UTC](https://forum.ansible.com/t/custom-ee-in-ansible-19-fails/34941/2 "2021-04-08T16:49:14Z")

</div>

Did you customize your pod definition when you were on AWX 18? We made a small tweak. You’ll need to reset to the default value and build on top of that. Sorry for the confusion.

---

<div class="post-metadata">

**Author:** ![Banshee091](https://avatars.discourse-cdn.com/v4/letter/b/43a26b/32.png) [@Banshee091](https://forum.ansible.com/u/Banshee091)\
**Post date:** [April 8, 2021, 4:55pm UTC](https://forum.ansible.com/t/custom-ee-in-ansible-19-fails/34941/3 "2021-04-08T16:55:19Z")

</div>

Unfortunately, I was not able to upgrade from AWX 18 (Tbh, I still don’t know why, but I might messed up the minikube enviroment). The setup in question is completely new. Is it neccessary to add the custom ee as specs while deploying?

Thanks for the answer 🙂

---

<div class="post-metadata">

**Author:** ![Banshee091](https://avatars.discourse-cdn.com/v4/letter/b/43a26b/32.png) [@Banshee091](https://forum.ansible.com/u/Banshee091)\
**Post date:** [April 9, 2021, 2:37pm UTC](https://forum.ansible.com/t/custom-ee-in-ansible-19-fails/34941/4 "2021-04-09T14:37:20Z")

</div>

Okay, I don’t know if anybody has the same problem, but I was able to find a workaround. Though I really would love if someone more capable than me, would be able to explain to me what I was missing while building the custom ee.  
The problem is propably, that I’m missing some crucial dependencies while building my own ee, though I don’t know which.  
If some should be struggeling with the same error: I cloned the github repo of the awx-ee project and appended the python modules which weren’t included in the already deployed ee.

Anyway: Thanks to the maintainers of the awx-ee-repo, I hope it is okay for me to take your code and build on it…and if someone knows where I might missed something… feel free to contact me.

Happy hacking

---

<div class="post-metadata">

**Author:** ![Pluppo](https://avatars.discourse-cdn.com/v4/letter/p/c0e974/32.png) [@Pluppo](https://forum.ansible.com/u/Pluppo)\
**Post date:** [April 15, 2021, 1:48pm UTC](https://forum.ansible.com/t/custom-ee-in-ansible-19-fails/34941/5 "2021-04-15T13:48:59Z")

</div>

I’m having exactly the same problem in AWX 19.0.0 (running with minikube) when trying to use an execution environment that I made using ansible-builder.

Traceback (most recent call last):  
File “/var/lib/awx/venv/awx/lib64/python3.8/site-packages/awx/main/tasks.py”, line 1397, in run res = receptor\_job.run()  
File “/var/lib/awx/venv/awx/lib64/python3.8/site-packages/awx/main/tasks.py”, line 2957, in run return self.\_run\_internal(receptor\_ctl)  
File “/var/lib/awx/venv/awx/lib64/python3.8/site-packages/awx/main/tasks.py”, line 3008, in \_run\_internal raise RuntimeError(detail) RuntimeError: Error creating pod: container failed with exit code 1:

Cloning the awx-ee repo and adding the collections and python modules I needed worked, but now I have much more stuff in the image than what I wanted. I had no experience with Docker or Kubernetes before having to install AWX, so this is a really steep learning curve for me.

I wish someone could do an example installation of an execution environment with custom collections and Python modules that works with AWX 19.0.0 and write a blog about it.

---

<div class="post-metadata">

**Author:** ![Andrea\_Lenarduzzi](https://avatars.discourse-cdn.com/v4/letter/a/c77e96/32.png) [@Andrea\_Lenarduzzi](https://forum.ansible.com/u/Andrea_Lenarduzzi)\
**Post date:** [April 15, 2021, 1:51pm UTC](https://forum.ansible.com/t/custom-ee-in-ansible-19-fails/34941/6 "2021-04-15T13:51:18Z")

</div>

Hi, me too!!!  
“I wish someone could do an example installation of an execution environment with custom collections and Python modules that works with AWX 19.0.0 and write a blog about it.”

---

<div class="post-metadata">

**Author:** ![Christopher\_Meyers](https://avatars.discourse-cdn.com/v4/letter/c/3e96dc/32.png) [@Christopher\_Meyers](https://forum.ansible.com/u/Christopher_Meyers)\
**Post date:** [April 15, 2021, 1:53pm UTC](https://forum.ansible.com/t/custom-ee-in-ansible-19-fails/34941/7 "2021-04-15T13:53:01Z")

</div>

[https://www.ansible.com/blog/introduction-to-ansible-builder](https://www.ansible.com/blog/introduction-to-ansible-builder)

---

<div class="post-metadata">

**Author:** ![Pluppo](https://avatars.discourse-cdn.com/v4/letter/p/c0e974/32.png) [@Pluppo](https://forum.ansible.com/u/Pluppo)\
**Post date:** [April 15, 2021, 2:18pm UTC](https://forum.ansible.com/t/custom-ee-in-ansible-19-fails/34941/8 "2021-04-15T14:18:53Z")

</div>

That’s a nice blog, I had already studied it when trying to understand how ansible-builder works. But it’s missing a working example of how to get the execution environment working in AWX 19 without getting the “RuntimeError: Error creating pod: container failed with exit code 1:” error.

The only way I was able to use an execution environment in AWX 19 was to clone the [https://github.com/ansible/awx-ee](https://github.com/ansible/awx-ee) repo and add the collections and Python modules that I needed. But this adds a lot of unneeded collections and Python modules to the environment.

---

<div class="post-metadata">

**Author:** ![Andrea\_Lenarduzzi](https://avatars.discourse-cdn.com/v4/letter/a/c77e96/32.png) [@Andrea\_Lenarduzzi](https://forum.ansible.com/u/Andrea_Lenarduzzi)\
**Post date:** [April 15, 2021, 2:46pm UTC](https://forum.ansible.com/t/custom-ee-in-ansible-19-fails/34941/9 "2021-04-15T14:46:24Z")

</div>

Hi, Please can you tell me details about how “The only way I was able to use an execution environment in AWX 19 was to clone the [https://github.com/ansible/awx-ee](https://github.com/ansible/awx-ee) repo and add the collections and Python modules that I needed. But this adds a lot of unneeded collections and Python modules to the environment.” ?

Thank you

---

<div class="post-metadata">

**Author:** ![Pluppo](https://avatars.discourse-cdn.com/v4/letter/p/c0e974/32.png) [@Pluppo](https://forum.ansible.com/u/Pluppo)\
**Post date:** [April 15, 2021, 3:00pm UTC](https://forum.ansible.com/t/custom-ee-in-ansible-19-fails/34941/10 "2021-04-15T15:00:26Z")

</div>

Sure, here are the steps:  
git clone [https://github.com/ansible/awx-ee.git](https://github.com/ansible/awx-ee.git)  
cd awx-ee  
vim \_build/requirements.yml # I just added the collections I needed at the bottom of this file  
vim \_build/requirements.txt # This file is new, contains the Python modules I need  
vim execution-environment.yml # I added “python: \_build/requirements.txt” under dependencies  
cp run.sh \_build/run.sh  
cp run.sh context/run.sh # ansible-builder was complaining about run.sh missing, so I copied it to both the \_build and the context folders (not sure which one is needed)  
ansible-builder build --tag myuser/mytag --verbosity 3

I was then able to push the image to Docker Hub and specify that an Execution Environment in AWX 19.

---

<div class="post-metadata">

**Author:** ![ffirg](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/ffirg/32/10029_2.png) [@ffirg](https://forum.ansible.com/u/ffirg)\
**Post date:** [April 16, 2021, 2:53pm UTC](https://forum.ansible.com/t/custom-ee-in-ansible-19-fails/34941/11 "2021-04-16T14:53:44Z")

</div>

“I wish someone could do an example installation of an execution environment with custom collections and Python modules that works with AWX 19.0.0 and write a blog about it.”  
[https://www.linkedin.com/pulse/ansible-execution-environments-phil-griffiths/](https://www.linkedin.com/pulse/ansible-execution-environments-phil-griffiths/)  
^^^ That a starter for ten!

---

<div class="post-metadata">

**Author:** ![Andrea\_Lenarduzzi](https://avatars.discourse-cdn.com/v4/letter/a/c77e96/32.png) [@Andrea\_Lenarduzzi](https://forum.ansible.com/u/Andrea_Lenarduzzi)\
**Post date:** [April 16, 2021, 4:45pm UTC](https://forum.ansible.com/t/custom-ee-in-ansible-19-fails/34941/12 "2021-04-16T16:45:57Z")

</div>

Ok, than How can I add my\_first\_ee\_image in AWX 19?  
Thank you

---

<div class="post-metadata">

**Author:** ![Wei-Yen\_Tan](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/wei-yen_tan/32/4111_2.png) [@Wei-Yen\_Tan](https://forum.ansible.com/u/Wei-Yen_Tan)\
**Post date:** [April 16, 2021, 5:24pm UTC](https://forum.ansible.com/t/custom-ee-in-ansible-19-fails/34941/13 "2021-04-16T17:24:10Z")

</div>

It is a container at this point so you would push that into a repository like nexus /artifactory and then in awx there is an option under administration execution environments to add in the image

---

<div class="post-metadata">

**Author:** ![ffirg](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/ffirg/32/10029_2.png) [@ffirg](https://forum.ansible.com/u/ffirg)\
**Post date:** [April 16, 2021, 6:08pm UTC](https://forum.ansible.com/t/custom-ee-in-ansible-19-fails/34941/14 "2021-04-16T18:08:02Z")

</div>

Ok, I’ve got something working but I need to track back exactly what I did!  
Check you are running the latest devel release of ansible-builder which at time of writing is 1.0.0.0a1  
If you just pip install ansible-runner you only get 0.6.0 which appears broken.

I’ll try to recreate a working example and post something either here or LinkedIn

---

<div class="post-metadata">

**Author:** ![Andrea\_Lenarduzzi](https://avatars.discourse-cdn.com/v4/letter/a/c77e96/32.png) [@Andrea\_Lenarduzzi](https://forum.ansible.com/u/Andrea_Lenarduzzi)\
**Post date:** [April 16, 2021, 7:23pm UTC](https://forum.ansible.com/t/custom-ee-in-ansible-19-fails/34941/15 "2021-04-16T19:23:45Z")

</div>

Ok, can you suggeat me a free on premise repository solution?

Thank you

---

<div class="post-metadata">

**Author:** ![Wei-Yen\_Tan](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/wei-yen_tan/32/4111_2.png) [@Wei-Yen\_Tan](https://forum.ansible.com/u/Wei-Yen_Tan)\
**Post date:** [April 16, 2021, 7:30pm UTC](https://forum.ansible.com/t/custom-ee-in-ansible-19-fails/34941/16 "2021-04-16T19:30:56Z")

</div>

OS’s Nexus is free and fully featured

---

<div class="post-metadata">

**Author:** ![ffirg](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/ffirg/32/10029_2.png) [@ffirg](https://forum.ansible.com/u/ffirg)\
**Post date:** [April 16, 2021, 8:48pm UTC](https://forum.ansible.com/t/custom-ee-in-ansible-19-fails/34941/17 "2021-04-16T20:48:07Z")

</div>

Checkout: [https://www.linkedin.com/pulse/creating-custom-ee-awx-phil-griffiths](https://www.linkedin.com/pulse/creating-custom-ee-awx-phil-griffiths)  
It’s still early days for EE’s in AWX but it does work 🙂

---

<div class="post-metadata">

**Author:** ![Mathias\_Homann](https://avatars.discourse-cdn.com/v4/letter/m/f05b48/32.png) [@Mathias\_Homann](https://forum.ansible.com/u/Mathias_Homann)\
**Post date:** [April 16, 2021, 9:42pm UTC](https://forum.ansible.com/t/custom-ee-in-ansible-19-fails/34941/18 "2021-04-16T21:42:11Z")

</div>

this did it for me:  
pip3 install ansible-builder==1.0.0.0a1

Cheers  
MH
