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