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