1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
3 .. Copyright © 2017 AT&T Intellectual Property. All rights reserved.
5 Installing from Source Code
6 ============================
8 *Note: this document assumes UNIX Bash Shell. Being AAF works in Windows, but you will have to create your own script/instruction conversions.*
14 AAF can be run in various ways
15 * Standalone (on your O/S)
19 * HEAT (Docker Container Based Initilization)
20 * OOM (a Helm Chart based Kubernetes Environment)
26 You need the following tools to build and run AAF
29 * Java (JDK 1.8+, openjdk is fine)
31 * a separate installation is fine
32 * these instructions will start off with a Docker based Cassandra instance
33 * Machine - one of the following
34 * Standalone Java Processes - no additional running environments necessary
35 * docker - typically available via packages for O/S
42 Choose the directory you wish to start in... This process will create an "authz" subdirectory::
47 Use 'git' to 'clone' the master code::
49 $ git clone https://gerrit.onap.org/r/aaf/authz
51 Change to that directory::
57 << TODO, get ONAP Settings.xml>>
68 After you have successfully run maven, you will need a Cassandra. If you don't have one, here are instructions for a Docker Standalone Cassandra. For a *serious* endeavor, you need a multi-node Cassandra.
72 $ cd auth/auth-cass/src/main/cql
79 AAF Casablanca has added a table. If you have an existing AAF Cassandra, do the following::
81 ### If Container Cassandra, add these steps, otherwise, skip
82 $ docker container cp init2_1.cql aaf_cass:/tmp
83 $ docker exec -it aaf_cass bash
86 $ cqlsh -f 'init2_1.cql'
92 Assuming you are in your src/authz directory::
94 $ cd auth/auth-cass/docker
101 Assuming you are in your src/authz directory::
104 ### If you have not done so before (don't overwrite your work!)
105 $ cp d.props.init d.props
107 You will need to edit and fill out the information in your d.props file. Here is info to help
109 **Local Env info** - These are used to load the /etc/hosts file in the Containers, so AAF is available internally and externally
111 =============== =============
113 =============== =============
114 HOSTNAME This must be the EXTERNAL FQDN of your host. Must be in DNS or /etc/hosts
115 HOST_IP This must be the EXTERNAL IP of your host. Must be accessible from "anywhere"
116 CASS_HOST If Docker Cass, this is the INTERNAL FQDN/IP. If external Cass, then DNS|/etc/hosts entry
117 aaf_env This shows up in GUI and certs, to differentiate environments
118 aaf_register_as As pre-set, it is the same external hostname.
119 cadi_latitude Use "https://bing.com/maps", if needed, to locate your current Global Coords
121 =============== =============
123 ==============================
124 "Bleeding Edge" Source install
125 ==============================
127 AAF can be built, and local Docker Images built with the following::
131 Otherwise, just let it pull from Nexus
133 ==============================
135 ==============================
137 AAF uses a Persistent Volume to store data longer term, such as CADI configs, Organization info, etc, so that data is not lost when changing out a container.
139 This volume is created automatically, as necessary, and linked into the container when starting. ::
141 ## Be sure to have your 'd.props' file filled out before running.
144 ==============================
145 Bootstrapping with Keystores
146 ==============================
148 Start the container in bash mode, so it stays up. ::
153 In another shell, find out your Container name. ::
155 $ docker container ls | grep aaf_config
157 CD to directory with CA p12 files
160 * org.osaaf.aaf.signer.p12 (if using Certman to sign certificates)
162 Copy keystores for this AAF Env ::
164 $ docker container cp -L org.osaaf.aaf.p12 aaf_agent_<Your ID>:/opt/app/osaaf/local
165 ### IF using local CA Signer
166 $ docker container cp -L org.osaaf.aaf.signer.p12 aaf_agent_<Your ID>:/opt/app/osaaf/local
170 id@77777: agent encrypt cadi_keystore_password
171 ### IF using local CA Signer
172 id@77777: agent encrypt cm_ca.local
174 Check to make sure all passwords are set ::
176 id@77777: grep "enc:" *.props
178 When good, exit from Container Shell and run AAF ::
183 Check the Container logs for correct Keystore passwords, other issues ::
185 $ docker container logs aaf_<service>
193 You can find an ONAP Root certificate, and pre-built trustores for ONAP Test systems at:
194 | authz/auth/sample/public/AAF_RootCA.cert
195 | authz/auth/sample/public/truststoreONAPall.jks
201 ## assumes you have DNS or /etc/hosts entry for aaf-onap-test.osaaf.org
203 $ curl --cacert ../sample/public/AAF_RootCA.cer -u demo@people.osaaf.org:demo123456! https://aaf-onap-test.osaaf.org:8100/authz/perms/user/demo@people.osaaf.org
204 $ openssl s_client -connect aaf-onap-test.osaaf.org:8100