# AWX Development Environment Setup

**URL:** <https://forum.ansible.com/t/awx-development-environment-setup/34162>\
**Category:** AWX Project\
**Tags:** ubuntu, aws, awx\
**Created:** [November 6, 2020, 6:24am UTC](https://forum.ansible.com/t/awx-development-environment-setup/34162 "2020-11-06T06:24:54Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Prem\_Kumar](https://avatars.discourse-cdn.com/v4/letter/p/ecccb3/32.png) [@Prem\_Kumar](https://forum.ansible.com/u/Prem_Kumar)\
**Post date:** [November 6, 2020, 6:24am UTC](https://forum.ansible.com/t/awx-development-environment-setup/34162/1 "2020-11-06T06:24:54Z")

</div>

Hi Team,

I’m a newbie in the group. First, Sorry if it’s not the right place to post this content. Please guide me to the right place.

We are trying to build some customization in Ansible AWX. Hence, trying to setup Ansible AWX in an AWS EC2 Ubuntu 16.04 environment. I’m following the page ([https://github.com/ansible/awx/blob/devel/CONTRIBUTING.md#build-the-environment](https://github.com/ansible/awx/blob/devel/CONTRIBUTING.md#build-the-environment)) and had installed pre-requisites as mentioned. My goal here is to provide a team of devs a sandbox environment where they can make some customizations to the code and try the changes out. In that regard, while executing the step “Build Base Image” (using cmd: make docker-compose-build) works fine and produces an image as mentioned in the documentation. But the step “Build the user interface” (make ui-devel) fails with below error message:  
npm WARN prepare removing existing node\_modules/ before installation  
npm ERR! code 128  
npm ERR! Command failed: git clone --mirror -q git://github.com/ansible/timezone-js.git /root/.npm/\_cacache/tmp/git-clone-ae588562/.git  
npm ERR! fatal: could not create leading directories of ‘/root/.npm/\_cacache/tmp/git-clone-ae588562/.git’  
npm ERR!

npm ERR! A complete log of this run can be found in:  
npm ERR! /root/.npm/\_logs/2020-11-06T06\_23\_03\_341Z-debug.log  
Makefile:526: recipe for target ‘awx/ui/.deps\_built’ failed  
make: \*\*\* [awx/ui/.deps\_built] Error 1

My request here is where can I get a list of make commands that I can run to get A to Z of Ansible AWX with a development base running containers. Any help is much appreciated.

Regards,  
Prem

---

<div class="post-metadata">

**Author:** ![Prem\_Kumar](https://avatars.discourse-cdn.com/v4/letter/p/ecccb3/32.png) [@Prem\_Kumar](https://forum.ansible.com/u/Prem_Kumar)\
**Post date:** [November 6, 2020, 6:47am UTC](https://forum.ansible.com/t/awx-development-environment-setup/34162/2 "2020-11-06T06:47:51Z")

</div>

Forgot to mention additional details above. Hence adding some additional details here.

After following the UI contribution guide, I ran the command . I’m getting the following error:  
npm WARN prepare removing existing node\_modules/ before installation  
npm ERR! code 128  
npm ERR! Command failed: git clone --mirror -q git://github.com/ansible/timezone-js.git /root/.npm/\_cacache/tmp/git-clone-d443f7ba/.git  
npm ERR! fatal: could not create leading directories of ‘/root/.npm/\_cacache/tmp/git-clone-d443f7ba/.git’  
npm ERR!

npm ERR! A complete log of this run can be found in:  
npm ERR! /root/.npm/\_logs/2020-11-06T06\_37\_40\_801Z-debug.log  
Makefile:526: recipe for target ‘awx/ui/.deps\_built’ failed  
make: \*\*\* [awx/ui/.deps\_built] Error 1

Additionally I’d tried with other targets in the Makefile like (requirements\_dev, requirements\_ansible, requirements\_ansible\_dev, requirements\_awx\_dev, develop), but the above error still persists.

---

<div class="post-metadata">

**Author:** ![mabashia](https://avatars.discourse-cdn.com/v4/letter/m/e9a140/32.png) [@mabashia](https://forum.ansible.com/u/mabashia)\
**Post date:** [November 6, 2020, 2:25pm UTC](https://forum.ansible.com/t/awx-development-environment-setup/34162/3 "2020-11-06T14:25:01Z")

</div>

> where can I get a list of make commands

All the make targets are found here: [https://github.com/ansible/awx/blob/devel/Makefile](https://github.com/ansible/awx/blob/devel/Makefile)

> npm ERR! fatal: could not create leading directories of ‘/root/.npm/\_cacache/tmp/git-clone-d443f7ba/.git’

What version of npm are you using?

---

<div class="post-metadata">

**Author:** ![mabashia](https://avatars.discourse-cdn.com/v4/letter/m/e9a140/32.png) [@mabashia](https://forum.ansible.com/u/mabashia)\
**Post date:** [November 6, 2020, 2:32pm UTC](https://forum.ansible.com/t/awx-development-environment-setup/34162/4 "2020-11-06T14:32:02Z")

</div>

I think I saw you posted in another thread that you were using npm v3.

Here are the requirements for running the AWX UI currently: [https://github.com/ansible/awx/blob/devel/awx/ui/README.md#requirements](https://github.com/ansible/awx/blob/devel/awx/ui/README.md#requirements)

---

<div class="post-metadata">

**Author:** ![Prem\_Kumar](https://avatars.discourse-cdn.com/v4/letter/p/ecccb3/32.png) [@Prem\_Kumar](https://forum.ansible.com/u/Prem_Kumar)\
**Post date:** [November 9, 2020, 5:56pm UTC](https://forum.ansible.com/t/awx-development-environment-setup/34162/5 "2020-11-09T17:56:15Z")

</div>

Hi,

Hi,

Thanks for the insights on the requirements. I’d followed the the links ([https://github.com/ansible/awx/blob/devel/CONTRIBUTING.md](https://github.com/ansible/awx/blob/devel/CONTRIBUTING.md) & [https://github.com/ansible/awx/blob/devel/awx/ui/README.md](https://github.com/ansible/awx/blob/devel/awx/ui/README.md)) as pointed out earlier. To assist with Setup of the Code & Pre-requisites, I’d followed the link ([https://www.centlinux.com/2019/09/install-ansible-awx-with-docker-compose-on-centos-7.html](https://www.centlinux.com/2019/09/install-ansible-awx-with-docker-compose-on-centos-7.html)) for setup as well.

Let me give an insight into the updated environment now.

- AWS EC2 - Centos 7.7
- Python 2.7.5 – Also Installed 3.6.8
- ansible 2.9.14
- Docker version 19.03.13
- docker-compose version 1.27.4
- node v6.17.1 – Removed & Installed to v12.19.0
- npm v3.10.10 – Removed & Installed to 6.14.8
- bzip2, gcc-c++, git, make

In addition to the above, I’d also installed the following softwares (git gcc gcc-c++ nodejs gettext device-mapper-persistent-data lvm2 bzip2 python-pip).

I’m able to run the “make docker-compose-build” for building the base image, I’m also able to see the docker images mentioned in the CONTRIBUTING.md. While I’m trying to build the AWX UI using “make ui-devel”. I’m gone past the following errors:

1. Delta RPMs disabled because /usr/bin/applydeltarpm not installed. — Solved by using “yum install deltarpm”
2. No Presto metadata available for nodesource — Solved by using “yum --enablerepo=base clean metadata”
3. [webpack-cli] Error: Cannot find module ‘clean-webpack-plugin’, ‘copy-webpack-plugin’, ‘webpack’, ‘html-webpack-plugin’ — Solved it by running the command “npm install” from the folder where the package.json was available.

But ran into below issue, after trying a “make ui-devel” post the above changes:  
[root@ip-172-20-8-107 awx]# make ui-devel  
npm WARN prepare removing existing node\_modules/ before installation  
npm ERR! code 128  
npm ERR! Command failed: git clone --mirror -q git://github.com/ansible/timezone-js.git /root/.npm/\_cacache/tmp/git-clone-ba0f82a1/.git  
npm ERR! fatal: could not create leading directories of ‘/root/.npm/\_cacache/tmp/git-clone-ba0f82a1/.git’

The git clone command fails everytime & it creates a new folder everytime. My intention is to create a development environment for Ansible AWX to help with customization and to enable developers to build customized code.

Pls help here…

Regards,  
PremKumar
