blob: dc4c6a409e986b40317cad1876d71b0da901d7bd [file] [log] [blame]
Sai Gandhamd67a9de2018-05-25 15:48:11 +00001.. This work is licensed under a Creative Commons Attribution 4.0 International License.
2.. http://creativecommons.org/licenses/by/4.0
3
4Installation
5============
Sai Gandham301509c2018-06-15 00:11:01 -05006This document will illustrates how to build and deploy all AAF components.
Sai Gandhamd67a9de2018-05-25 15:48:11 +00007
Sai Gandham301509c2018-06-15 00:11:01 -05008Clone AAF Code:
9Build AAF with settings.xml:
10Build Docker Images:
11Modify the properties file:
12Mount the sample to /opt/app/osaaf:
13Run the docker containers:
14Clone AAF Code:
15bharath@bharath:~$ git clone https://git.onap.org/aaf/authz
Sai Gandhamd67a9de2018-05-25 15:48:11 +000016
17
Sai Gandham301509c2018-06-15 00:11:01 -050018Build AAF with settings.xml:
19---------------------------
20Copy the settings.xml from here and paste in ~/.m2/settings.xml
21
22Then run the following command
23
24.. code:: bash
25
26 bharath@bharath:~$ cd authz && mvn clean install -DskipTests
27
28
29If the build is successful, then you can see a folder in "authz/auth" called "aaf_VERSION-SNAPSHOT" which contains all binaries of the components
30
31.. code:: bash
32
33 bharath@bharath:~/authz/auth$ ls
34aaf_2.1.1-SNAPSHOT auth-cass auth-cmd auth-deforg auth-gui auth-locate auth-service pom.xml target
35auth-batch auth-certman auth-core auth-fs auth-hello auth-oauth docker sample
36
37Build Docker Images:
38-------------------
39Now after building binaries, the next step is to build docker images for each aaf component.
40
41.. code:: bash
42
43 bharath@bharath:~/authz/auth/docker$ chmod +x *.sh
44 bharath@bharath:~/authz/auth/docker$ ./dbuild.sh
45
46The above command will build the following images:
47
48aaf_service
49aaf_oauth
50aaf_locate
51aaf_hello
52aaf_gui
53aaf_fs
54aaf_cm
55Modify the properties file:
56Modify the contents of the "authz/auth/docker/d.props
57
58.. code:: bash
59
60 bharath@bharath:~/authz/auth/docker$ cat d.props
61
62# Variables for building Docker entities
63ORG=onap
64PROJECT=aaf
65DOCKER_REPOSITORY=nexus3.onap.org:10003
66OLD_VERSION=2.1.0-SNAPSHOT
67VERSION=2.1.1-SNAPSHOT
68CONF_ROOT_DIR=/opt/app/osaaf
69
70
71# Local Env info
72HOSTNAME="<HOSTNAME>"
73HOST_IP="<HOST_IP>"
74CASS_HOST="cass"
75
76Replace the <HOSTNAME> with your hostname and HOST_IP with your host IP.
77
78Add the following entry to your /etc/hosts file
Sai Gandhamd67a9de2018-05-25 15:48:11 +000079
80
81
Sai Gandham301509c2018-06-15 00:11:01 -050082127.0.0.1 aaf.osaaf.org
83Mount the sample to /opt/app/osaaf:
84As 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
85
86.. code:: bash
87
88 bharath@bharath:~/authz/auth$ mkdir -p /opt/app/osaaf
89 bharath@bharath:~/authz/auth$ cp -r sample/* /opt/app/osaaf/
90
91Run the docker containers:
92--------------------------
93.. code:: bash
94
95 bharath@bharath:~/authz/auth/docker$ ls
96 dbash.sh dbuild.sh dclean.sh Dockerfile d.props dpush.sh drun.sh dstart.sh dstop.sh
97 bharath@bharath:~/authz/auth/docker$ ./drun.sh
98
99
100
101
102
Sai Gandhamd67a9de2018-05-25 15:48:11 +0000103