Docs for Install
[aaf/authz.git] / docs / sections / installation / client_vol.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 Setting up Certs and CADI Configurations
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   Note: curl/wget get html, instead of text
42   | You might have to mv, and rename it to "agent.sh", but avoids full clone
43
44 -------------------------
45 Run Script
46 -------------------------
47
48 In your chosen directory ::
49  
50   $ bash agent.sh
51
52 The Agent will look for "aaf.props", and if it doesn't exist, or is missing information, it will ask for it.
53
54 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)
55
56 ---------------------
57 'aaf.prop' Properties
58 ---------------------
59
60 =================== =============== ============
61 Query               Tag             Description
62 =================== =============== ============
63 CADI Version        VERSION         Defaults to CADI version of this
64 AAF's FQDN          AAF_FQDN        PUBLIC Name for AAF. For ONAP Test, it is 'aaf-onap-test.osaaf.org'
65 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, password (see Dynamic Properties) is 'demo123456!'
66 App's Root FQDN     APP_FQDN        This will show up in the Cert Subject, and should be the name given by Docker. i.e. clamp.onap
67 App's FQI           APP_FQI         Fully Qualified ID given by Organization and with AAF NS/domain.  ex: clamp@clamp.onap.org 
68 App's Volume        VOLUME          Volume to put the data, see above. ex: clamp_aaf
69 DRIVER              DRIVER          Docker Volume type... See Docker Volume documentation
70 LATITUDE of Node    LATITUDE        Global latitude coordinate of Node (best guess in Kubernetes)
71 LONGITUDE of Node   LONGITUDE       Global longitude coordinate of Node (best guess in Kubernetes)
72 =================== =============== ============
73
74 ---------------------
75 Dynamic Properties
76 ---------------------
77
78 These Properties do not automatically save in 'aaf.props', because...
79
80   | Passwords should not be stored clear text, with the possible exception of constant Environment Recreation, where it is impractical.
81   | The IP of the AAF's FQDN is looked up, if possible.  It can be set, however, when lookup isn't available.
82
83 =================== =============== ============
84 Query               Tag             Description
85 =================== =============== ============
86 Deployer's Password DEPLOY_PASSWORD Password for the Deployer. Avoids storing, except where impossible otherwise. 
87 IP of <AAF_FQDN>    AAF_FQDN_IP     IP for Name of AAF FQDN, if not available by normal lookup means
88 =================== =============== ============
89
90 -------------------------------
91 Typical ONAP Entity Info in AAF
92 -------------------------------
93 *This is not intended to be a comprehensive list, but a short list of main entities*
94
95 ============================= ===========================  ======================= ==============================================
96 ONAP Namespaces               APP FQI                      APP FQDN OOM            APP FQDN HEAT
97 ============================= ===========================  ======================= ==============================================
98 org.osaaf.aaf                 aaf@aaf.osaaf.org            aaf                     aaf.api.simpledemo.onap.org
99 org.onap.aaf-sms              aaf-sms@aaf-sms.onap.org     aaf-sms                 aaf-sms.api.simpledemo.onap.org
100 org.onap.aai                  aai@aai.onap.org             aai                     aai.api.simpledemo.onap.org
101 org.onap.appc                 appc@appc.onap.org           appc                    appc.api.simpledemo.onap.org
102 org.onap.clamp                clamp@clamp.onap.org         clamp                   clamp.api.simpledemo.onap.org
103 org.onap.dcae                 dcae@dcae.onap.org           dcae                    dcae.api.simpledemo.onap.org
104 org.onap.dmaap-bc             dmaap-bc@dmaap-bc.onap.org   dmaap-bc                dmaap-bc.api.simpledemo.onap.org
105 org.onap.dmaap-mr             dmaap-mr@dmaap-mr.onap.org   dmaap-mr                dmaap-mr.api.simpledemo.onap.org
106 org.onap.oof                  oof@oof.onap.org             oof                     oof.api.simpledemo.onap.org
107 org.onap.policy               policy@policy.onap.org       policy                  policy.api.simpledemo.onap.org
108 org.onap.pomba                pomba@pomba.onap.org         pomba                   pomba.api.simpledemo.onap.org
109 org.onap.portal               portal@portal.onap.org       portal                  portal.api.simpledemo.onap.org
110 org.onap.sdc                  sdc@sdc.onap.org             sdc                     sdc.api.simpledemo.onap.org
111 org.onap.so                   so@so.onap.org               so                      so.api.simpledemo.onap.org
112 org.onap.sdnc                 sdnc@sdnc.onap.org           sdnc                    sdnc.api.simpledemo.onap.org
113 org.onap.vfc                  vfc@vfc.onap.org             vfc                     vfc.api.simpledemo.onap.org
114 org.onap.vid                  vid@vid.onap.org             vid                     vid.api.simpledemo.onap.org
115 ============================= ===========================  ======================= ==============================================
116
117 *Note 1: FQDNs are set in AAF's Credential Artifact data, accessible in "Cred Details" from Namespace Page*
118
119 *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.*
120
121 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. ::
122
123   root@77777:/opt/app/osaaf/local# rm *
124   root@77777:/opt/app/osaaf/local# exit
125   $ bash agent.sh bash
126
127 -------------
128 Informational
129 -------------
130
131 There are two sets of Credentials at play here.  The ability to create the Certificate belongs to one of
132   
133   * The person responsible for the ID in the Organization 
134   * A delegated deployer
135
136 It is expected in large organizations that Individual Employees are given the responsibility of an ID for an APP they are responsible for.
137
138   In ONAP test, to simplify create/tear-down environment... 
139      | The **Owner** is always "mmanager@people.osaaf.org". 
140      | The **Sponsor** is always "aaf_admin@people.osaaf.org".
141
142 In a large org, there are probably many Operations teams to support many different apps.
143
144   In ONAP test, 
145      The **Deployer** is always set to "deployer@people.osaaf.org" for all Apps.
146
147