Topics

How to build aai-resources and aai-traversal docker images and push to local docker repository? #aai #docker

Keong Lim
 

Hi Jimmy,

I have anUbuntu VM with builds of aai/resources and aai/traversal components.
I also have a local Docker repository for testing.
I found Dockerfiles for example:

./aai-traversal/src/main/docker/Dockerfile
./aai-traversal/target/aai-traversal-1.3.0-SNAPSHOT-build/Dockerfile
./aai-resources/src/main/docker/Dockerfile
./aai-resources/target/aai-resources-1.3.0-SNAPSHOT-build/Dockerfile

but when using the "docker build" command on these, it gives an error for a directory not found for a COPY command.

What commands and configuration do I need to build new Docker images and push it only to my local Docker repository?

Thanks,
Keong

Venkata Harish K Kajur
 

Hi Keong,

Please run the following command to build the docker image.

mvn -Pdocker clean install -DskipTests

docker.push.registry value is set to localhost:5000
aai.docker.namespace value is set to onap
You can override them by runtime setting those properties.

Thanks,
Harish

-----Original Message-----
From: onap-discuss@... <onap-discuss@...> On Behalf Of Keong Lim
Sent: Monday, August 20, 2018 9:35 AM
To: onap-discuss@...
Subject: [onap-discuss] How to build aai-resources and aai-traversal docker images and push to local docker repository? #aai #docker

Hi Jimmy,

I have anUbuntu VM with builds of aai/resources and aai/traversal components.
I also have a local Docker repository for testing.
I found Dockerfiles for example:

./aai-traversal/src/main/docker/Dockerfile
./aai-traversal/target/aai-traversal-1.3.0-SNAPSHOT-build/Dockerfile
./aai-resources/src/main/docker/Dockerfile
./aai-resources/target/aai-resources-1.3.0-SNAPSHOT-build/Dockerfile

but when using the "docker build" command on these, it gives an error for a directory not found for a COPY command.

What commands and configuration do I need to build new Docker images and push it only to my local Docker repository?

Thanks,
Keong

Keong Lim
 

Hi Harish,

I ran that mvn command to build the docker images in aai/resources and aai/traversal and both seemed to give BUILD SUCCESS.
However, when I run those containers, there are errors in the logs. Both containers give:

===
chown: cannot access '/var/chef': No such file or directory
===

The aai-traversal container has lots of these logs:

===
tee: /opt/app/aai-traversal/logs/misc/updateQueryData.sh.log.2018-08-20: No such file or directory
Begin putTool for widget action-1.0.json
/opt/app/aai-traversal/bin/install/updateQueryData.sh[52]: /opt/app/aai-traversal/logs/misc/updateQueryData.sh.log.2018-08-20: cannot create [No such file or directory]
updateQueryData.sh: failed for service-design-and-creation/models/model/af593b4b-490e-4665-ad74-2f6351c0a7ce /opt/app/aai-traversal/resources/etc/scriptdata/widget-model-json/action-1.0.json on cmd 1
===

Do I need to build more components? Or install more software?

Thanks,
Keong

Venkata Harish K Kajur
 

Hi Keong,

When you are running the traversal image, can you add this flag -e DISABLE_UPDATE_QUERY=true and then run the container.
Then you shouldn't see any issues with trying to run the built docker images.
The updateQueryData shell script is responsible for creating widgets in AAI but it needs the haproxy to be up in order to successfully work.
The code was changed to handle this scenario a little differently in heat and oom so that’s why this code was there.
Later, we had this script disabled in both oom and heat and ensured but left it out.

Here is a jira task for cleaning it up.

https://jira.onap.org/browse/AAI-1529

Also, are you just trying to start the traversal microservice locally or planning to deploy all of AAI locally?
If you are planning to just do a simple test, then in resources, you will need to run this command to start locally.

mvn -pl aai-resources -PrunAjsc

Traversal:

mvn -pl aai-traversal -PrunAjsc

If you are planning to deploy all of AAI locally, then please follow this tutorial.

https://wiki.onap.org/display/DW/How+to+Docker+setup+on+Single+VM


Thanks,
Harish

-----Original Message-----
From: onap-discuss@... <onap-discuss@...> On Behalf Of Keong Lim
Sent: Tuesday, August 21, 2018 12:38 AM
To: onap-discuss@...
Subject: Re: [onap-discuss] How to build aai-resources and aai-traversal docker images and push to local docker repository? #aai #docker

Hi Harish,

I ran that mvn command to build the docker images in aai/resources and aai/traversal and both seemed to give BUILD SUCCESS.
However, when I run those containers, there are errors in the logs. Both containers give:

===
chown: cannot access '/var/chef': No such file or directory ===

The aai-traversal container has lots of these logs:

===
tee: /opt/app/aai-traversal/logs/misc/updateQueryData.sh.log.2018-08-20: No such file or directory Begin putTool for widget action-1.0.json
/opt/app/aai-traversal/bin/install/updateQueryData.sh[52]: /opt/app/aai-traversal/logs/misc/updateQueryData.sh.log.2018-08-20: cannot create [No such file or directory]
updateQueryData.sh: failed for service-design-and-creation/models/model/af593b4b-490e-4665-ad74-2f6351c0a7ce /opt/app/aai-traversal/resources/etc/scriptdata/widget-model-json/action-1.0.json on cmd 1 ===

Do I need to build more components? Or install more software?

Thanks,
Keong