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