6bb4874990c5987a61c74408768492fd0d1ff0c6
[aaf/authz.git] / docs / sections / configuration / AAF_4.1_config.rst
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.
4
5 ========================================
6 Automated 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
11 --------
12 Strategy
13 --------
14
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)
16
17 Given that all ONAP entities are also in Docker Containers, they all can access Persistent Volumes.
18
19 This tool creates all the Configurations, including Certificates, onto a declared Volume on the directories starting with "/opt/app/osaaf"
20
21 ------------------
22 Prerequisites
23 ------------------
24   * Docker
25     * Note: it does NOT have to be the SAME Docker that AAF is deployed on...
26     | but it DOES have be accessible to the AAF Instance.  
27   * For ONAP, this means
28     
29     * Windriver VPN
30     * include "10.12.6.214 aaf-onap-test.osaaf.org" in your /etc/hosts or DNS
31
32 -----------------------
33 Obtain the Agent Script
34 -----------------------
35 Choose the directory you wish to start in... 
36
37 If you don't want to clone all of AAF, just get the "agent.sh" from a Browser:
38
39   https://gerrit.onap.org/r/gitweb?p=aaf/authz.git;a=blob_plain;f=auth/docker/agent.sh;hb=HEAD
40   
41   rename file "auth-docker-agent.sh" to "agent.sh" (named because of subdirectory in which it is found) 
42
43 Note: curl/wget returns an  html, instead of text.  This cannot be used!
44   | You have to mv, and rename it to "agent.sh", but avoids full clone...
45
46 -------------------------
47 Run Script
48 -------------------------
49
50 In your chosen directory ::
51  
52   $ bash agent.sh
53
54 The Agent will look for "aaf.props", and if it doesn't exist, or is missing information, it will ask for it.
55
56 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)
57
58 ---------------------
59 'aaf.prop' Properties
60 ---------------------
61
62 ==================== ================= ============
63 Query                Tag               Description
64 ==================== ================= ============
65 DOCKER REPOSITORY    DOCKER_REPOSITORY Defaults to current ONAP Repository
66 CADI Version         VERSION           Defaults to current CADI (AAF) version
67 AAF's FQDN           AAF_FQDN          PUBLIC Name for AAF. For ONAP Test, it is 'aaf-onap-test.osaaf.org'
68 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'
69 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'
70 Deployer's PASSWORD  DEPLOY_PASSWORD   OPTIONAL!! REAL systems should not store passwords in clear text. For ONAP Testing, the password is 'demo123456!'
71 App's Root FQDN      APP_FQDN          This will show up in the Cert Subject, make it the App Acronym. i.e 'clamp'
72 App's FQI            APP_FQI           Fully Qualified ID given by Organization and with AAF NS/domain.  ex: 'clamp@clamp.onap.org'
73 App's Volume         VOLUME            Volume to put the data, see above. ex: 'clamp_config'
74 DRIVER               DRIVER            Docker Volume type... See Docker Volume documentation. Default is 'local'
75 LATITUDE of Node     LATITUDE          Global latitude coordinate of Node (best guess in Kubernetes)
76 LONGITUDE of Node    LONGITUDE         Global longitude coordinate of Node (best guess in Kubernetes)
77 ==================== ================= ============
78
79 -------------------------------
80 Typical ONAP Entity Info in AAF
81 -------------------------------
82 *This is not intended to be a comprehensive list, but a short list of main entities*
83
84 ============================= ===========================  ======================= ==============================================
85 ONAP Namespaces               APP FQI                      APP FQDN OOM            APP FQDN HEAT
86 ============================= ===========================  ======================= ==============================================
87 org.osaaf.aaf                 aaf@aaf.osaaf.org            aaf.onap                aaf.api.simpledemo.onap.org
88 org.onap.aaf-sms              aaf-sms@aaf-sms.onap.org     aaf-sms.onap            aaf-sms.api.simpledemo.onap.org
89 org.onap.aai                  aai@aai.onap.org             aai.onap                aai.api.simpledemo.onap.org
90 org.onap.appc                 appc@appc.onap.org           appc.onap               appc.api.simpledemo.onap.org
91 org.onap.clamp                clamp@clamp.onap.org         clamp.onap              clamp.api.simpledemo.onap.org
92 org.onap.dcae                 dcae@dcae.onap.org           dcae.onap               dcae.api.simpledemo.onap.org
93 org.onap.dmaap                dmaap@dmaap.onap.org         dmaap.onap              dmaap.api.simpledemo.onap.org                                         
94 org.onap.dmaap-bc             dmaap-bc@dmaap-bc.onap.org   dmaap-bc.onap           dmaap-bc.api.simpledemo.onap.org
95 org.onap.dmaap-dr             dmaap-bc@dmaap-dr.onap.org   dmaap-dr.onap           dmaap-dr.api.simpledemo.onap.org                                           
96 org.onap.dmaap-mr             dmaap-mr@dmaap-mr.onap.org   dmaap-mr.onap           dmaap-mr.api.simpledemo.onap.org
97 org.onap.oof                  oof@oof.onap.org             oof.onap                oof.api.simpledemo.onap.org
98 org.onap.policy               policy@policy.onap.org       policy.onap             policy.api.simpledemo.onap.org
99 org.onap.pomba                pomba@pomba.onap.org         pomba.onap              pomba.api.simpledemo.onap.org
100 org.onap.portal               portal@portal.onap.org       portal.onap             portal.api.simpledemo.onap.org
101 org.onap.sdc                  sdc@sdc.onap.org             sdc.onap                sdc.api.simpledemo.onap.org
102 org.onap.sdnc                 sdnc@sdnc.onap.org           sdnc.onap               sdnc.api.simpledemo.onap.org
103 org.onap.so                   so@so.onap.org               so.onap                 so.api.simpledemo.onap.org
104 org.onap.vfc                  vfc@vfc.onap.org             vfc.onap                vfc.api.simpledemo.onap.org
105 org.onap.vid                  vid@vid.onap.org             vid.onap                vid.api.simpledemo.onap.org
106 ============================= ===========================  ======================= ==============================================
107
108 *Note 1: FQDNs are set in AAF's Credential Artifact data, accessible in "Cred Details" from Namespace Page*
109
110 *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.*
111
112 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. ::
113
114   root@77777:/opt/app/osaaf/local# rm *
115   root@77777:/opt/app/osaaf/local# exit
116   $ bash agent.sh bash
117
118 -------------
119 Informational
120 -------------
121
122 There are two sets of Credentials at play here.  The ability to create the Certificate belongs to one of
123   
124   * The person responsible for the ID in the Organization 
125   * A delegated deployer
126
127 It is expected in large organizations that Individual Employees are given the responsibility of an ID for an APP they are responsible for.
128
129   In ONAP test, to simplify create/tear-down environment... 
130      | The **Owner** is always "mmanager@people.osaaf.org". 
131      | The **Sponsor** is always "aaf_admin@people.osaaf.org".
132
133 In a large org, there are probably many Operations teams to support many different apps.
134
135   In ONAP test, 
136      The **Deployer** is always set to "deployer@people.osaaf.org" for all Apps.
137
138
139
140
141
142
143
144
145
146
147
148