# AWX 19.0 EE pain...

**URL:** <https://forum.ansible.com/t/awx-19-0-ee-pain/35019>\
**Category:** AWX Project\
**Tags:** awx, ee\
**Created:** [April 21, 2021, 1:04am UTC](https://forum.ansible.com/t/awx-19-0-ee-pain/35019 "2021-04-21T01:04:35Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Callum\_Barr](https://avatars.discourse-cdn.com/v4/letter/c/a183cd/32.png) [@Callum\_Barr](https://forum.ansible.com/u/Callum_Barr)\
**Post date:** [April 21, 2021, 1:04am UTC](https://forum.ansible.com/t/awx-19-0-ee-pain/35019/1 "2021-04-21T01:04:35Z")

</div>

Hi All,

I’m a network dude - mainly work with Juniper stuff etc, so I need an execution environment that has all of my usual collections / python libraries installed.

I’m not what you would call an expert in containers/k8/docker/? and im pretty sure im just running out of talent.

Is there a definitive guide on how to build a custom EE, push that to git, and then to [quay.io](http://quay.io), so that I can add this as an EE in AWX?

I have been down the rabbit hole of trying to create my own EE with Ansible-builder etc but I really have no idea what im doing haha

Cheers

Callum

---

<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 21, 2021, 6:48am UTC](https://forum.ansible.com/t/awx-19-0-ee-pain/35019/2 "2021-04-21T06:48:24Z")

</div>

Hey there,

this has been discussed before.

The simple steps are as follws:

- Clone the Github repo of the standard-ee from awx: [https://github.com/ansible/awx-ee](https://github.com/ansible/awx-ee)

- Customize the requirements.yml and the requirements\_combined.yml files inside of the build-folder.

- Run docker build -t your/tag/name . from inside the repo-folder.

- When the build finishes, run docker push your/tag/name, if you don’t have a docker repo already, docker will ask you for your credentials and for a repo to push to. I don’t know if you are able to push to a [quay.io](http://quay.io) account, but you can set up a repo on [docker.io](http://docker.io). I’m pretty sure people had some alternatives before.

- When your image has been pushed to your repo, nagivate to AWX and add the EE in you Execution-Environment-Tab. You just need to specify the link (in docker this is smth. like [docker.io/your/tag:latest](http://docker.io/your/tag:latest)). If you have set it to private, you might need to create a credential to pull the image.

- Now you just need to specify the EE in your templates.

→ This is not the intended way, but since AWX 19 a few ran into problems building EEs from scratch. Some modules seem to be required and as far as I know, we didn’t figure out which ones. Since the EE from the AWX-team is working fine, your best guess will be to use this as a template.

For more information, look at this thread: [https://groups.google.com/g/awx-project/c/MACNtPrGpV8](https://groups.google.com/g/awx-project/c/MACNtPrGpV8) they ssem to have found a solution without using the AWX-EE as a template.

Hope this helps.

Cheers.

---

<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 21, 2021, 6:56am UTC](https://forum.ansible.com/t/awx-19-0-ee-pain/35019/3 "2021-04-21T06:56:32Z")

</div>

Okay, my bad. The problem seems to be ansible-builder, if you install the newest version you might be able to follow the example from red-hat’s “Introduction to Ansible-Builder” here: [https://www.ansible.com/blog/introduction-to-ansible-builder](https://www.ansible.com/blog/introduction-to-ansible-builder)  
Be sure to check out the ansible-builder webpage in the process.  
Cheers.

---

<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 21, 2021, 7:57am UTC](https://forum.ansible.com/t/awx-19-0-ee-pain/35019/4 "2021-04-21T07:57:53Z")

</div>

Hi Callum. We’ve been asked this a lot recently so I wrote up a blog - [https://www.linkedin.com/pulse/creating-custom-ee-awx-phil-griffiths/](https://www.linkedin.com/pulse/creating-custom-ee-awx-phil-griffiths/)  
Hopefully that’ll get you going.

Phil.

---

<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 21, 2021, 8:00am UTC](https://forum.ansible.com/t/awx-19-0-ee-pain/35019/5 "2021-04-21T08:00:04Z")

</div>

There are a few typos in the blog and when I tried to follow example I got a bunch of errors. I have had to build a container using podman build from scratch but now getting ansible-runner errors.

---

<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 21, 2021, 8:02am UTC](https://forum.ansible.com/t/awx-19-0-ee-pain/35019/6 "2021-04-21T08:02:35Z")

</div>

Namely this part :

```auto
receptor
    - ADD run.sh /run.sh
    - CMD /run.sh
    - USE    
    - RUN git lfs installR 1000

```

```auto
    -

```

---

<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 21, 2021, 8:48am UTC](https://forum.ansible.com/t/awx-19-0-ee-pain/35019/7 "2021-04-21T08:48:02Z")

</div>

I get this error in the container:

{“status”: “error”, “job\_explanation”: “Failed to extract private data directory on worker.”, “result\_traceback”: “Traceback (most recent call last):\n File "/usr/local/lib/python3.8/site-packages/ansible\_runner/streaming.py", line 107, in run\n unstream\_dir(self.\_input, data[‘zipfile’], self.private\_data\_dir)\n File "/usr/local/lib/python3.8/site-packages/ansible\_runner/utils/streaming.py", line 52, in unstream\_dir\n with zipfile.ZipFile([tmp.name](http://tmp.name), ‘r’) as archive:\n File "/usr/lib64/python3.8/zipfile.py", line 1268, in **init** \n self.\_RealGetContents()\n File "/usr/lib64/python3.8/zipfile.py", line 1335, in \_RealGetContents\n raise BadZipFile("File is not a zip file")\nzipfile.BadZipFile: File is not a zip file\n”}  
{“eof”: true}

But I am not quite sure where i can troubleshoot it

---

<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 21, 2021, 9:37am UTC](https://forum.ansible.com/t/awx-19-0-ee-pain/35019/8 "2021-04-21T09:37:32Z")

</div>

Thanks Wei-Yen for spotting the execution-environments error. I can thank the awful LI snippet interface when cutting and pasting!  
I’ve corrected the article.

---

<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 21, 2021, 9:45am UTC](https://forum.ansible.com/t/awx-19-0-ee-pain/35019/9 "2021-04-21T09:45:35Z")

</div>

Yoy are welcome. I am very eager to give this a shot. I tried this execution environment but found that it came up with errors and still troubleshooting. isn’t the prepend activity done twice if you list it there ? As it is already in the main container file ?  
Was there anything else you did? I am not having much luck, I would be grateful for any help. When I ran with that execution environment yml I get a permission denied…

---

<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 21, 2021, 9:47am UTC](https://forum.ansible.com/t/awx-19-0-ee-pain/35019/10 "2021-04-21T09:47:06Z")

</div>

Also is the extra steps part of the main containerfile? And if so what are the implications of that? Did you run a custom 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 21, 2021, 9:47am UTC](https://forum.ansible.com/t/awx-19-0-ee-pain/35019/11 "2021-04-21T09:47:29Z")

</div>

I would start with my LinkedIn example first, to see if that works for you. That’ll rule out platform, versions etc  
Then just modify one thing at a time until you track back to the error. I’ve no idea where it’s getting the zip file from as I’ve not seen that one before.

---

<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 21, 2021, 11:27am UTC](https://forum.ansible.com/t/awx-19-0-ee-pain/35019/12 "2021-04-21T11:27:02Z")

</div>

Hi Phil,

Thank you for the reply. Thats the funny thing. I followed your instruction. Created a new directory with all the details that you mentioned. There were some extra collections but i dont think that would have an extra bearing on it.

I am using centos 8 but I have tried centos 7 too with docker.

When I run the container I get this error:

podman run [docker.io/weiyentan2/example\_ansible-ee](http://docker.io/weiyentan2/example_ansible-ee)  
/bin/sh: /run.sh: Permission denied

I feel I am missing something. I would be grateful if you could shed some light on this? ie whether you used the same image from awx-ee or you rolled your own. Many thanks.

WY

---

<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 21, 2021, 12:41pm UTC](https://forum.ansible.com/t/awx-19-0-ee-pain/35019/13 "2021-04-21T12:41:22Z")

</div>

Did you add run.sh to the right directory? I had to add it to context/run.sh

---

<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 21, 2021, 12:43pm UTC](https://forum.ansible.com/t/awx-19-0-ee-pain/35019/14 "2021-04-21T12:43:15Z")

</div>

It appears in the context directory . Ie I can see it there

---

<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 21, 2021, 12:44pm UTC](https://forum.ansible.com/t/awx-19-0-ee-pain/35019/15 "2021-04-21T12:44:16Z")

</div>

chmod +x it with it hasn’t got execute permission?

---

<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 21, 2021, 1:07pm UTC](https://forum.ansible.com/t/awx-19-0-ee-pain/35019/16 "2021-04-21T13:07:53Z")

</div>

Thank you for that I gave it execute permission (windows guy slowly getting to terms with linux) but i am now striking that error that the file is not a zip file.

{“status”: “error”, “job\_explanation”: “Failed to extract private data directory on worker.”, “result\_traceback”: “Traceback (most recent call last):\n File "/usr/local/lib/python3.8/site-packages/ansible\_runner/streaming.py", line 107, in run\n unstream\_dir(self.\_input, data[‘zipfile’], self.private\_data\_dir)\n File "/usr/local/lib/python3.8/site-packages/ansible\_runner/utils/streaming.py", line 52, in unstream\_dir\n with zipfile.ZipFile([tmp.name](http://tmp.name/), ‘r’) as archive:\n File "/usr/lib64/python3.8/zipfile.py", line 1268, in **init** \n self.\_RealGetContents()\n File "/usr/lib64/python3.8/zipfile.py", line 1335, in \_RealGetContents\n raise BadZipFile("File is not a zip file")\nzipfile.BadZipFile: File is not a zip file\n”}  
{“eof”: true}

---

<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 21, 2021, 2:26pm UTC](https://forum.ansible.com/t/awx-19-0-ee-pain/35019/17 "2021-04-21T14:26:15Z")

</div>

I can see where this is coming from in the code but don’t know how it works tbh.  
If you send me over all the config, I’ll see if I can test or emulate.

---

<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 21, 2021, 2:57pm UTC](https://forum.ansible.com/t/awx-19-0-ee-pain/35019/18 "2021-04-21T14:57:57Z")

</div>

Launching jo i’ve this error:  
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: Pod Running

Why?

---

<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 21, 2021, 2:58pm UTC](https://forum.ansible.com/t/awx-19-0-ee-pain/35019/19 "2021-04-21T14:58:20Z")

</div>

I got that as well at one point. For me I think it was the run.sh not having execute permissions. Have a look at the kubernetes logs on the pod before it terminates or spin up the container and see what it does in podman/docker. The error is most likely there.

---

<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 21, 2021, 3:19pm UTC](https://forum.ansible.com/t/awx-19-0-ee-pain/35019/20 "2021-04-21T15:19:52Z")

</div>

in “docker ps” there isn’t “my\_first\_ee\_image”

[Next page](https://forum.ansible.com/t/awx-19-0-ee-pain/35019.md?page=2)
