THIS PAGE DRAFT IS IN PROGRESS
This document will illustrates how to build and deploy all AAF components.
Clone AAF Code:
bharath@bharath:~$ git clone https://git.onap.org/aaf/authz
Build AAF with settings.xml:
Copy the settings.xml from here and paste in ~/.m2/settings.xml
Then run the following command
bharath@bharath:~$ cd authz && mvn clean install -DskipTests
If the build is successful, then you can see a folder in "authz/auth" called "aaf_VERSION-SNAPSHOT" which contains all binaries of the components
bharath@bharath:~/authz/auth$ ls aaf_2.1.1-SNAPSHOT auth-cass auth-cmd auth-deforg auth-gui auth-locate auth-service pom.xml target auth-batch auth-certman auth-core auth-fs auth-hello auth-oauth docker sample
Build Docker Images:
Now after building binaries, the next step is to build docker images for each aaf component.
bharath@bharath:~/authz/auth/docker$ chmod +x *.sh bharath@bharath:~/authz/auth/docker$ ./dbuild.sh
The above command will build the following images:
- aaf_service
- aaf_oauth
- aaf_locate
- aaf_hello
- aaf_gui
- aaf_fs
- aaf_cm
Modify the properties file:
Modify the contents of the "authz/auth/docker/d.props
bharath@bharath:~/authz/auth/docker$ cat d.props # Variables for building Docker entities ORG=onap PROJECT=aaf DOCKER_REPOSITORY=nexus3.onap.org:10003 OLD_VERSION=2.1.0-SNAPSHOT VERSION=2.1.1-SNAPSHOT CONF_ROOT_DIR=/opt/app/osaaf # Local Env info HOSTNAME="<HOSTNAME>" HOST_IP="<HOST_IP>" #Cassandra Database information CASS_HOST="<HOSTNAME>:<HOST_IP>"
Replace the <HOSTNAME> with your hostname and HOST_IP with your host IP.
Add the following entry to your /etc/hosts file
127.0.0.1 aaf.osaaf.org
Mount the sample to /opt/app/osaaf:
As you can see there is a parameter "CONF_ROOT_DIR" which is set to "/opt/app/osaaf". So we have to create a folder "/opt/app/osaaf" and copy the contents of authz/auth/sample to /opt/app/osaaf
bharath@bharath:~/authz/auth$ mkdir -p /opt/app/osaaf bharath@bharath:~/authz/auth$ cp -r sample/* /opt/app/osaaf/
Bring up the cassandra docker container:
As drun.sh script needs a link to the container in which the cassandra is running. So have the cassandra container installed before running the script.
prakash@verizon:~/authz$ cd auth/auth-cass/docker prakash@verizon:~/authz/auth/auth-cass/docker$ ls backup dbash.sh dinstall.sh prakash@verizon:~/authz/auth/auth-cass/docker$ chmod +x dinstall.sh prakash@verizon:~/authz/auth/auth-cass/docker$ ./dinstall.sh Running DInstall starting Cass from 'run' Unable to find image 'cassandra:3.11' locally 3.11: Pulling from library/cassandra 683abbb4ea60: Pull complete acfbefadae23: Pull complete abd305f8ee0d: Pull complete 14d836521a71: Pull complete fb8cdeea37d8: Pull complete c50ebe138311: Pull complete a3b44ff80256: Pull complete c39c3f5c4464: Pull complete 138ba6f9dc60: Pull complete 0df431e1105f: Pull complete Digest: sha256:c8c1a190423473b1051fb767db1399ea0b6132c05b29f07c25e5f60b0b05ca23 Status: Downloaded newer image for cassandra:3.11 4af38a3fd3965734371fae00f1c2ed66c6023d586a22d01b92777f14668df759 aaf_cass Starting Sleep 10 Sleep 10 Sleep 10 Running Phase 2 DInstall CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 4af38a3fd396 cassandra:3.11 "docker-entrypoint.s…" 31 seconds ago Up 30 seconds 7000-7001/tcp, 7199/tcp, 9042/tcp, 9160/tcp aaf_cass
Run the docker containers:
bharath@bharath:~/authz/auth/docker$ ls dbash.sh dbuild.sh dclean.sh Dockerfile d.props dpush.sh drun.sh dstart.sh dstop.sh bharath@bharath:~/authz/auth/docker$ ./drun.sh
6 Comments
Pavel Paroulek
What is the difference between this guide and the guide above ? Are these separate initiatives?
Bharath Thiruveedula
Pavel Paroulek the above guide is kind of old and this guide is mostly for developer building the docker images from the code
Pavel Paroulek
What is the "
CASS_HOST
"? What does it represent, what should be the value? I am getting "invalid argument "X"" where X = {cass, localhost, 127.0.0.1, aaf.osaaf.org}Bharath Thiruveedula
CASS_HOST is the name of the hostname where you are running cassandra containers
Rahul Yadav
I am running into issues after trying out the above steps.The docker instances for cassandra and other aaf services are running inside the ubuntu vm and i have provided CASS_HOST = ip of the ubuntu vm inside which all docker instances are running,but when i start aaf services i keep getting the below exceptions and services fail.
WARN [init] 2019-01-24T13:39:07.817+0000 INIT [init] Cass ResetExceptions = com.datastax.driver.core.exceptions.NoHostAvailableException:"no host was tried":"Connection has been closed"
java.lang.NumberFormatException: empty String
at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1842)
at sun.misc.FloatingDecimal.parseDouble(FloatingDecimal.java:110)
at java.lang.Double.parseDouble(Double.java:538)
at org.onap.aaf.auth.dao.CassAccess.cluster(CassAccess.java:105)
at org.onap.aaf.auth.service.AAF_Service.<init>(AAF_Service.java:95)
at org.onap.aaf.auth.service.AAF_Service.main(AAF_Service.java:229)
Rahul Yadav
I am running into issues after trying out the above steps.The docker instances for cassandra and other aaf services are running inside the ubuntu vm and i have provided CASS_HOST = ip of the ubuntu vm inside which all docker instances are running,but when i start aaf services i keep getting the below exceptions and services fail.
WARN [init] 2019-01-24T13:39:07.817+0000 INIT [init] Cass ResetExceptions = com.datastax.driver.core.exceptions.NoHostAvailableException:"no host was tried":"Connection has been closed"
java.lang.NumberFormatException: empty String
at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1842)
at sun.misc.FloatingDecimal.parseDouble(FloatingDecimal.java:110)
at java.lang.Double.parseDouble(Double.java:538)
at org.onap.aaf.auth.dao.CassAccess.cluster(CassAccess.java:105)
at org.onap.aaf.auth.service.AAF_Service.<init>(AAF_Service.java:95)
at org.onap.aaf.auth.service.AAF_Service.main(AAF_Service.java:229)
Any help would be appreciated