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 ========================================
6 Automated Configuration and Certificates
7 ========================================
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.*
15 ONAP 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)
17 Given that all ONAP entities are also in Docker Containers, they all can access Persistent Volumes.
19 This tool creates all the Configurations, including Certificates, onto a declared Volume on the directories starting with "/opt/app/osaaf"
24 * Access to a RUNNING AAF System
26 * For ONAP TEST, this means
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
34 * Note: it does NOT have to be the SAME Docker that AAF is deployed on...
36 * but it DOES have be accessible to the AAF Instance.
38 * For creating Configurations on Local Disk
40 * For Development purposes
41 * For running AAF on Bare Metal (or VM)
42 * A Truststore that includes your CA
44 * for ONAP TEST, you can obtain truststoreONAPall.jks from the `AAF FileServer`_.
46 * (You can also get the ONAP TEST Root CA there)
48 * the latest aaf-auth-cmd-<VERSION>-full.jar from `ONAP Nexus`_.
49 * you can still use the same "agent.sh" script below
51 .. _AAF FileServer: http://aaf-onap-test.osaaf.org/-
52 .. _ONAP Nexus: https://nexus.onap.org/#nexus-search;quick~aaf-auth-cmd
54 -----------------------
55 Obtain the Agent Script
56 -----------------------
57 Choose the directory you wish to start in...
59 If you don't want to clone all of AAF, just get the "agent.sh" from a Browser:
61 https://gerrit.onap.org/r/gitweb?p=aaf/authz.git;a=blob_plain;f=auth/docker/agent.sh;hb=HEAD
63 rename file "auth-docker-agent.sh" to "agent.sh" (named because of subdirectory in which it is found)
65 Note: 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...
74 In your chosen directory ::
78 The Agent will look for "aaf.props", and if it doesn't exist, or is missing information, it will ask for it.
80 This 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)
82 --------------------------
83 For Local/BareMetal (VM)
84 --------------------------
85 In your chosen directory ::
87 $ bash agent.sh local <instructions>
89 The Agent will look for "aaf.props", and if it doesn't exist, or is missing information, it will ask for it.
91 =======================
93 =======================
95 These 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.
97 ==================== ================= ============
99 ==================== ================= ============
100 DOCKER REPOSITORY DOCKER_REPOSITORY Defaults to current ONAP Repository
101 CADI Version VERSION Defaults to current CADI (AAF) version
102 AAF's FQDN AAF_FQDN PUBLIC Name for AAF. For ONAP Test, it is 'aaf-onap-test.osaaf.org'
103 AAF 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'
104 Deployer'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'
105 Deployer's PASSWORD DEPLOY_PASSWORD OPTIONAL!! REAL systems should not store passwords in clear text. For ONAP Testing, the password is 'demo123456!'
106 App's Root FQDN APP_FQDN This will show up in the Cert Subject, make it the App Acronym. i.e 'clamp'
107 App's FQI APP_FQI Fully Qualified ID given by Organization and with AAF NS/domain. ex: 'clamp@clamp.onap.org'
108 App's Volume VOLUME Volume to put the data, see above. ex: 'clamp_config'
109 DRIVER DRIVER Docker Volume type... See Docker Volume documentation. Default is 'local'
110 LATITUDE of Node LATITUDE Global latitude coordinate of Node (best guess in Kubernetes)
111 LONGITUDE of Node LONGITUDE Global longitude coordinate of Node (best guess in Kubernetes)
112 HOSTNAME 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.
113 Docker User DUSER User needed inside the Docker Container. Without, this will be root
114 Container NS CONTAINER_NS The Namespace for the container. Provided for Multi-NS support, this would be "onap" for Test OOM, etc.
115 ==================== ================= ============
117 =================================
118 Typical ONAP Entity Info in AAF
119 =================================
120 *This is not intended to be a comprehensive list, but a short list of main entities*
122 ============================= =========================== ======================= ==============================================
123 ONAP Namespaces APP FQI APP FQDN OOM APP FQDN HEAT
124 ============================= =========================== ======================= ==============================================
125 org.osaaf.aaf aaf@aaf.osaaf.org aaf.onap aaf.api.simpledemo.onap.org
126 org.onap.aaf-sms aaf-sms@aaf-sms.onap.org aaf-sms.onap aaf-sms.api.simpledemo.onap.org
127 org.onap.aai aai@aai.onap.org aai.onap aai.api.simpledemo.onap.org
128 org.onap.appc appc@appc.onap.org appc.onap appc.api.simpledemo.onap.org
129 org.onap.clamp clamp@clamp.onap.org clamp.onap clamp.api.simpledemo.onap.org
130 org.onap.dcae dcae@dcae.onap.org dcae.onap dcae.api.simpledemo.onap.org
131 org.onap.dmaap dmaap@dmaap.onap.org dmaap.onap dmaap.api.simpledemo.onap.org
132 org.onap.dmaap-bc dmaap-bc@dmaap-bc.onap.org dmaap-bc.onap dmaap-bc.api.simpledemo.onap.org
133 org.onap.dmaap-dr dmaap-bc@dmaap-dr.onap.org dmaap-dr.onap dmaap-dr.api.simpledemo.onap.org
134 org.onap.dmaap-mr dmaap-mr@dmaap-mr.onap.org dmaap-mr.onap dmaap-mr.api.simpledemo.onap.org
135 org.onap.oof oof@oof.onap.org oof.onap oof.api.simpledemo.onap.org
136 org.onap.policy policy@policy.onap.org policy.onap policy.api.simpledemo.onap.org
137 org.onap.pomba pomba@pomba.onap.org pomba.onap pomba.api.simpledemo.onap.org
138 org.onap.portal portal@portal.onap.org portal.onap portal.api.simpledemo.onap.org
139 org.onap.sdc sdc@sdc.onap.org sdc.onap sdc.api.simpledemo.onap.org
140 org.onap.sdnc sdnc@sdnc.onap.org sdnc.onap sdnc.api.simpledemo.onap.org
141 org.onap.so so@so.onap.org so.onap so.api.simpledemo.onap.org
142 org.onap.vfc vfc@vfc.onap.org vfc.onap vfc.api.simpledemo.onap.org
143 org.onap.vid vid@vid.onap.org vid.onap vid.api.simpledemo.onap.org
144 ============================= =========================== ======================= ==============================================
146 *Note 1: FQDNs are set in AAF's Credential Artifact data, accessible in "Cred Details" from Namespace Page*
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.*
150 If 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. ::
152 root@77777:/opt/app/osaaf/local# rm *
153 root@77777:/opt/app/osaaf/local# exit
160 There are two sets of Credentials at play here. The ability to create the Certificate belongs to one of
162 * The person responsible for the ID in the Organization
163 * A delegated deployer
165 It is expected in large organizations that Individual Employees are given the responsibility of an ID for an APP they are responsible for.
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".
171 In a large org, there are probably many Operations teams to support many different apps.
174 The **Deployer** is always set to "deployer@people.osaaf.org" for all Apps.