blob: dd4f14ba7beb56a53e55d39e9e70be47851302e0 [file] [log] [blame]
Victor Morales14613122017-08-22 19:51:35 -05001==============================
2Using the provisioning scripts
3==============================
4
5Vagrant is a platform that uses prebaked images called
6*vagrant boxes* to guarranty that running multiple times a
7provisioning script will result in an expected output. This
8mechanism is crucial for reducing the number of external factors
9during the creation, development and testing of provisioning scripts.
10However, it's possible to provide an ONAP development enviroment
11without having to install Vagrant tool. This document explains how to
12consume the provisioning scripts localed in **./lib** folder to
13provision a development environment and the environment variables
14that modifies their behavior.
15
16This project was built on an Ubuntu 14.04 ("Trusty") Operating System,
17therefore it's necessary to have an user who has *sudo* permissions to
18access to a Bare Metal or Virtual Machine.
19
20The following instructions retrieve the provisioning scripts and place
21them into the */var/onap/* folder.
22
23.. code-block:: console
24
25 $ sudo su -
26 # apt-get install git -y
27 # git clone https://git.onap.org/integration
28 # mv integration/bootstrap/vagrant-onap/lib/ /var/onap/
29
30.. end
31
32Loading a provisioning script will be based on the desired ONAP
33service, for example to setup the development environment for Active
34and Available Inventory (AAI) service will be required to load the
35*/var/onap/aai* script.
36
37.. note::
38
39 The **git_src_folder** environment variable specifies the
40 source code destination folder, it's default value is */opt/*
41 but it can be changed only after is loaded the provisioning
42 scripts.
43
44.. end
45
46.. code-block:: console
47
48 # source /var/onap/aai
49
50.. end
51
52Lastly, every script has defined a initialization function with
53*init_* as prefix. This function is the starting point to provision
54the chosen ONAP service. This example uses the *init_aai* function
55to provision a AAI Developement environment.
56
57.. note::
58
59 The **compile_repo** environment variable defines whether or not
60 the source code located on the repositories of the service.
61 Enabling this value can impact the provisioning time of the
62 service.
63
64.. end
65.. note::
66
67 **nexus_docker_repo**, **nexus_username** and **nexus_password**
68 environment variables specify the connectivity to a private Docker
69 Hub.
70
71.. end
72.. note::
73
74 **build_image** environment variable allows the Docker images
75 from source code. Enabling this value can impact the
76 provisioning time of the service.
77
78.. end
79
80.. code-block:: console
81
82 # export nexus_docker_repo="nexus3.onap.org:10001"
83 # export nexus_username="docker"
84 # export nexus_password="docker"
85 # init_aai
86
87.. end
88
89As result, the source code is pulled into */opt/aai/* folder and the
90AAI services are up and running with the proper connection to the
91Titan Distributed Graph Database.