blob: bac0331732864a278b71c1cda422bd507993b3cc [file] [log] [blame]
Instrumental5ecadc62018-11-19 13:39:24 -06001.. 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.
4
5========================================
6Automated Configuration and Certificates
7========================================
8
9*Note: this document assumes UNIX Bash Shell. Being Java, AAF works in Windows, but you will have to create your own script/instruction conversions.*
10
Instrumentalf54a4aa2019-02-22 01:18:51 -060011=================
12Optimal Strategy
13=================
Instrumental5ecadc62018-11-19 13:39:24 -060014
15ONAP is deployed in Docker Containers or Kubernetes managed Docker Containers. Therefore, this instruction utilizes a Docker Container as a standalone Utility... (This means that this container will stop as soon as it is done with its work... it is not a long running daemon)
16
17Given that all ONAP entities are also in Docker Containers, they all can access Persistent Volumes.
18
19This tool creates all the Configurations, including Certificates, onto a declared Volume on the directories starting with "/opt/app/osaaf"
20
Instrumentalf54a4aa2019-02-22 01:18:51 -060021==================
Instrumental5ecadc62018-11-19 13:39:24 -060022Prerequisites
Instrumentalf54a4aa2019-02-22 01:18:51 -060023==================
24 * Access to a RUNNING AAF System
25
26 * For ONAP TEST, this means
27
28 * Windriver VPN
29 * include "10.12.6.214 aaf-onap-test.osaaf.org" in your /etc/hosts or DNS
30 * For Writing to Volumes for Docker or K8s
31
32 * Docker
33
34 * Note: it does NOT have to be the SAME Docker that AAF is deployed on...
35
36 * but it DOES have be accessible to the AAF Instance.
37
38 * For creating Configurations on Local Disk
39
40 * For Development purposes
41 * For running AAF on Bare Metal (or VM)
42 * A Truststore that includes your CA
43
44 * for ONAP TEST, you can obtain truststoreONAPall.jks from the `AAF FileServer`_.
45
46 * (You can also get the ONAP TEST Root CA there)
47
48 * the latest aaf-auth-cmd-<VERSION>-full.jar from `ONAP Nexus`_.
49 * you can still use the same "agent.sh" script below
50
51.. _AAF FileServer: http://aaf-onap-test.osaaf.org/-
52.. _ONAP Nexus: https://nexus.onap.org/#nexus-search;quick~aaf-auth-cmd
Instrumental5ecadc62018-11-19 13:39:24 -060053
54-----------------------
55Obtain the Agent Script
56-----------------------
57Choose the directory you wish to start in...
58
59If you don't want to clone all of AAF, just get the "agent.sh" from a Browser:
60
61 https://gerrit.onap.org/r/gitweb?p=aaf/authz.git;a=blob_plain;f=auth/docker/agent.sh;hb=HEAD
62
63 rename file "auth-docker-agent.sh" to "agent.sh" (named because of subdirectory in which it is found)
64
65Note: curl/wget returns an html, instead of text. This cannot be used!
66 | You have to mv, and rename it to "agent.sh", but avoids full clone...
67
Instrumentalf54a4aa2019-02-22 01:18:51 -060068=============
Instrumental5ecadc62018-11-19 13:39:24 -060069Run Script
Instrumentalf54a4aa2019-02-22 01:18:51 -060070=============
71----------------
72For Docker/K8s
73----------------
Instrumental5ecadc62018-11-19 13:39:24 -060074In your chosen directory ::
75
76 $ bash agent.sh
77
78The Agent will look for "aaf.props", and if it doesn't exist, or is missing information, it will ask for it.
79
80This file is available to reuse for multiple calls. More importantly, you should use it as a template for auto-configuration. (In ONAP, these are HEAT templates and OOM Helm Charts)
81
Instrumentalf54a4aa2019-02-22 01:18:51 -060082--------------------------
83For Local/BareMetal (VM)
84--------------------------
85In your chosen directory ::
86
87 $ bash agent.sh local <instructions>
88
89The Agent will look for "aaf.props", and if it doesn't exist, or is missing information, it will ask for it.
90
91=======================
Instrumental5ecadc62018-11-19 13:39:24 -060092'aaf.prop' Properties
Instrumentalf54a4aa2019-02-22 01:18:51 -060093=======================
94
95These properties will be created when you run "agent.sh". Many of the values will be defaulted, or allow you to change. It will be placed into an "aaf.props" file for you to save, edit or otherwise modify/utilize.
Instrumental5ecadc62018-11-19 13:39:24 -060096
Instrumental7f1e2c02019-02-18 10:06:21 -060097==================== ================= ============
98Query Tag Description
99==================== ================= ============
100DOCKER REPOSITORY DOCKER_REPOSITORY Defaults to current ONAP Repository
101CADI Version VERSION Defaults to current CADI (AAF) version
102AAF's FQDN AAF_FQDN PUBLIC Name for AAF. For ONAP Test, it is 'aaf-onap-test.osaaf.org'
103AAF FQDN IP AAF_FQDN_IP If FQDN isn't actually found with DNS, you will have to enter the IP. For 'aaf-onap-test.osaaf.org', it is '10.12.6.214'
104Deployer's FQI DEPLOY_FQI In a REAL system, this would be a person or process. For ONAP Testing, the id is 'deployer@people.osaaf.org'
105Deployer's PASSWORD DEPLOY_PASSWORD OPTIONAL!! REAL systems should not store passwords in clear text. For ONAP Testing, the password is 'demo123456!'
106App's Root FQDN APP_FQDN This will show up in the Cert Subject, make it the App Acronym. i.e 'clamp'
107App's FQI APP_FQI Fully Qualified ID given by Organization and with AAF NS/domain. ex: 'clamp@clamp.onap.org'
108App's Volume VOLUME Volume to put the data, see above. ex: 'clamp_config'
109DRIVER DRIVER Docker Volume type... See Docker Volume documentation. Default is 'local'
110LATITUDE of Node LATITUDE Global latitude coordinate of Node (best guess in Kubernetes)
111LONGITUDE of Node LONGITUDE Global longitude coordinate of Node (best guess in Kubernetes)
Instrumentalf54a4aa2019-02-22 01:18:51 -0600112HOSTNAME HOSTNAME Defaults to SYSTEM provided "hostname". Use when System doesn't report what is actually needed, such as vanity urls, multi-NIC cards, short names, i.e. htydb77 reported instead of htydb77.some.company.org, etc.
113Docker User DUSER User needed inside the Docker Container. Without, this will be root
114Container NS CONTAINER_NS The Namespace for the container. Provided for Multi-NS support, this would be "onap" for Test OOM, etc.
Instrumental7f1e2c02019-02-18 10:06:21 -0600115==================== ================= ============
Instrumental5ecadc62018-11-19 13:39:24 -0600116
Instrumentalf54a4aa2019-02-22 01:18:51 -0600117=================================
Instrumental5ecadc62018-11-19 13:39:24 -0600118Typical ONAP Entity Info in AAF
Instrumentalf54a4aa2019-02-22 01:18:51 -0600119=================================
Instrumental5ecadc62018-11-19 13:39:24 -0600120*This is not intended to be a comprehensive list, but a short list of main entities*
121
122============================= =========================== ======================= ==============================================
123ONAP Namespaces APP FQI APP FQDN OOM APP FQDN HEAT
124============================= =========================== ======================= ==============================================
125org.osaaf.aaf aaf@aaf.osaaf.org aaf.onap aaf.api.simpledemo.onap.org
126org.onap.aaf-sms aaf-sms@aaf-sms.onap.org aaf-sms.onap aaf-sms.api.simpledemo.onap.org
127org.onap.aai aai@aai.onap.org aai.onap aai.api.simpledemo.onap.org
128org.onap.appc appc@appc.onap.org appc.onap appc.api.simpledemo.onap.org
129org.onap.clamp clamp@clamp.onap.org clamp.onap clamp.api.simpledemo.onap.org
130org.onap.dcae dcae@dcae.onap.org dcae.onap dcae.api.simpledemo.onap.org
131org.onap.dmaap dmaap@dmaap.onap.org dmaap.onap dmaap.api.simpledemo.onap.org
132org.onap.dmaap-bc dmaap-bc@dmaap-bc.onap.org dmaap-bc.onap dmaap-bc.api.simpledemo.onap.org
133org.onap.dmaap-dr dmaap-bc@dmaap-dr.onap.org dmaap-dr.onap dmaap-dr.api.simpledemo.onap.org
134org.onap.dmaap-mr dmaap-mr@dmaap-mr.onap.org dmaap-mr.onap dmaap-mr.api.simpledemo.onap.org
135org.onap.oof oof@oof.onap.org oof.onap oof.api.simpledemo.onap.org
136org.onap.policy policy@policy.onap.org policy.onap policy.api.simpledemo.onap.org
137org.onap.pomba pomba@pomba.onap.org pomba.onap pomba.api.simpledemo.onap.org
138org.onap.portal portal@portal.onap.org portal.onap portal.api.simpledemo.onap.org
139org.onap.sdc sdc@sdc.onap.org sdc.onap sdc.api.simpledemo.onap.org
140org.onap.sdnc sdnc@sdnc.onap.org sdnc.onap sdnc.api.simpledemo.onap.org
141org.onap.so so@so.onap.org so.onap so.api.simpledemo.onap.org
142org.onap.vfc vfc@vfc.onap.org vfc.onap vfc.api.simpledemo.onap.org
143org.onap.vid vid@vid.onap.org vid.onap vid.api.simpledemo.onap.org
144============================= =========================== ======================= ==============================================
145
146*Note 1: FQDNs are set in AAF's Credential Artifact data, accessible in "Cred Details" from Namespace Page*
147
148*Note 2: Also, AAF itself is different, as it is not an ONAP only component... It is also expected to be used outside of ONAP.*
149
150If something goes wrong, and Certificate is not created, you can adjust the data, remove the data from the Container's /opt/app/osaaf/local dir, and it will generate again. ::
151
152 root@77777:/opt/app/osaaf/local# rm *
153 root@77777:/opt/app/osaaf/local# exit
154 $ bash agent.sh bash
155
Instrumentalf54a4aa2019-02-22 01:18:51 -0600156===============
Instrumental5ecadc62018-11-19 13:39:24 -0600157Informational
Instrumentalf54a4aa2019-02-22 01:18:51 -0600158===============
Instrumental5ecadc62018-11-19 13:39:24 -0600159
160There are two sets of Credentials at play here. The ability to create the Certificate belongs to one of
161
162 * The person responsible for the ID in the Organization
163 * A delegated deployer
164
165It is expected in large organizations that Individual Employees are given the responsibility of an ID for an APP they are responsible for.
166
167 In ONAP test, to simplify create/tear-down environment...
168 | The **Owner** is always "mmanager@people.osaaf.org".
169 | The **Sponsor** is always "aaf_admin@people.osaaf.org".
170
171In a large org, there are probably many Operations teams to support many different apps.
172
173 In ONAP test,
174 The **Deployer** is always set to "deployer@people.osaaf.org" for all Apps.
175
176
177
178
179
180
181
182
183
184
185
186