ec49c72b44e3ab263e4b97f4ae3db5001bd38e57
[aaf/authz.git] / docs / sections / installation / AAF_3.1_build.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 Building 
7 ============================
8 *Note: this document assumes UNIX Bash Shell.  Being Java, AAF works in Windows, but you will have to create your own script/instruction conversions.*
9
10 ---------------------
11 Building from Source 
12 ---------------------
13 Choose the directory you wish to start in... This process will create an "authz" subdirectory::
14
15   $ mkdir -p ~/src
16   $ cd ~/src
17
18 Use 'git' to 'clone' the master code::
19  
20   $ git clone https://gerrit.onap.org/r/aaf/authz
21
22 Change to that directory::
23
24   $ cd authz
25
26 Use Maven to build::
27
28   << TODO, get ONAP Settings.xml>>
29   $ mvn install
30
31 .. -----------------
32 .. Standalone
33 .. -----------------
34
35 -----------------
36 Docker Mode
37 -----------------
38
39 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.
40
41 From "authz"::
42
43   $ cd auth/auth-cass/src/main/cql
44   $ vi config.dat
45
46 ------------------
47 Existing Cassandra
48 ------------------
49
50 AAF Casablanca has added a table.  If you have an existing AAF Cassandra, do the following *ONCE* :
51
52 ### If Container Cassandra, add these steps, otherwise, skip
53 $ docker container cp init2_1.cql aaf_cass:/tmp
54 $ docker exec -it aaf_cass bash
55 (docker) $ cd /tmp
56 ###
57 $ cqlsh -f 'init2_1.cql'
58
59 --------------------
60 New Docker Cassandra
61 --------------------
62
63 Assuming you are in your src/authz directory::
64 $ cd auth/auth-cass/docker
65 $ bash dinstall.sh
66
67 ---------------------
68 AAF Itself
69 ---------------------
70
71 Assuming you are in your src/authz directory::
72
73 | $ cd auth/docker
74 | ### If you have not done so before (don't overwrite your work!)
75 | $ cp d.props.init d.props
76
77 You will need to edit and fill out the information in your d.props file.  Here is info to help
78
79 **Local Env info** - These are used to load the /etc/hosts file in the Containers, so AAF is available internally and externally
80
81   =============== =============
82   Variable        Explanation
83   =============== =============
84   HOSTNAME        This must be the EXTERNAL FQDN of your host.  Must be in DNS or /etc/hosts
85   HOST_IP         This must be the EXTERNAL IP of your host. Must be accessible from "anywhere"
86   CASS_HOST       If Docker Cass, this is the INTERNAL FQDN/IP.  If external Cass, then DNS|/etc/hosts entry
87   aaf_env         This shows up in GUI and certs, to differentiate environments
88   aaf_register_as As pre-set, it is the same external hostname.
89   cadi_latitude   Use "https://bing.com/maps", if needed, to locate your current Global Coords
90   cadi_longitude  ditto
91   =============== =============
92
93 ------------------------------
94 "Bleeding Edge" Source install
95 ------------------------------
96
97 AAF can be built, and local Docker Images built with the following::
98
99   $ bash dbuild.sh
100
101 Otherwise, just let it pull from Nexus
102