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