Sai Gandham | d67a9de | 2018-05-25 15:48:11 +0000 | [diff] [blame] | 1 | .. This work is licensed under a Creative Commons Attribution 4.0 International License.
|
| 2 | .. http://creativecommons.org/licenses/by/4.0
|
Instrumental | 7a1817b | 2018-11-05 11:11:15 -0600 | [diff] [blame] | 3 | .. Copyright © 2017 AT&T Intellectual Property. All rights reserved.
|
Sai Gandham | d67a9de | 2018-05-25 15:48:11 +0000 | [diff] [blame] | 4 |
|
| 5 | Installation
|
| 6 | ============
|
Sai Gandham | 301509c | 2018-06-15 00:11:01 -0500 | [diff] [blame] | 7 | This document will illustrates how to build and deploy all AAF components.
|
Sai Gandham | d67a9de | 2018-05-25 15:48:11 +0000 | [diff] [blame] | 8 |
|
Sai Gandham | 301509c | 2018-06-15 00:11:01 -0500 | [diff] [blame] | 9 | Clone AAF Code:
|
| 10 | Build AAF with settings.xml:
|
| 11 | Build Docker Images:
|
| 12 | Modify the properties file:
|
| 13 | Mount the sample to /opt/app/osaaf:
|
| 14 | Run the docker containers:
|
| 15 | Clone AAF Code:
|
| 16 | bharath@bharath:~$ git clone https://git.onap.org/aaf/authz
|
Sai Gandham | d67a9de | 2018-05-25 15:48:11 +0000 | [diff] [blame] | 17 |
|
| 18 |
|
Sai Gandham | 301509c | 2018-06-15 00:11:01 -0500 | [diff] [blame] | 19 | Build AAF with settings.xml:
|
| 20 | ---------------------------
|
| 21 | Copy the settings.xml from here and paste in ~/.m2/settings.xml
|
| 22 |
|
| 23 | Then run the following command
|
| 24 |
|
| 25 | .. code:: bash
|
| 26 |
|
| 27 | bharath@bharath:~$ cd authz && mvn clean install -DskipTests
|
| 28 |
|
| 29 |
|
| 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
|
| 31 |
|
| 32 | .. code:: bash
|
| 33 |
|
| 34 | bharath@bharath:~/authz/auth$ ls
|
| 35 | aaf_2.1.1-SNAPSHOT auth-cass auth-cmd auth-deforg auth-gui auth-locate auth-service pom.xml target
|
| 36 | auth-batch auth-certman auth-core auth-fs auth-hello auth-oauth docker sample
|
| 37 |
|
| 38 | Build Docker Images:
|
| 39 | -------------------
|
| 40 | Now 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 |
|
| 47 | The above command will build the following images:
|
| 48 |
|
| 49 | aaf_service
|
| 50 | aaf_oauth
|
| 51 | aaf_locate
|
| 52 | aaf_hello
|
| 53 | aaf_gui
|
| 54 | aaf_fs
|
| 55 | aaf_cm
|
| 56 | Modify the properties file:
|
| 57 | Modify 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
|
| 64 | ORG=onap
|
| 65 | PROJECT=aaf
|
| 66 | DOCKER_REPOSITORY=nexus3.onap.org:10003
|
| 67 | OLD_VERSION=2.1.0-SNAPSHOT
|
| 68 | VERSION=2.1.1-SNAPSHOT
|
| 69 | CONF_ROOT_DIR=/opt/app/osaaf
|
| 70 |
|
| 71 |
|
| 72 | # Local Env info
|
| 73 | HOSTNAME="<HOSTNAME>"
|
| 74 | HOST_IP="<HOST_IP>"
|
| 75 | CASS_HOST="cass"
|
| 76 |
|
| 77 | Replace the <HOSTNAME> with your hostname and HOST_IP with your host IP.
|
| 78 |
|
| 79 | Add the following entry to your /etc/hosts file
|
Sai Gandham | d67a9de | 2018-05-25 15:48:11 +0000 | [diff] [blame] | 80 |
|
| 81 |
|
| 82 |
|
Sai Gandham | 301509c | 2018-06-15 00:11:01 -0500 | [diff] [blame] | 83 | 127.0.0.1 aaf.osaaf.org
|
| 84 | Mount the sample to /opt/app/osaaf:
|
| 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
|
| 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 |
|
| 92 | Run 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 Gandham | d67a9de | 2018-05-25 15:48:11 +0000 | [diff] [blame] | 104 |
|