blob: 95f2ac1c1bb6414ba533ad966139701929349cd8 [file] [log] [blame]
Pawel Wieczorek83040df2019-11-29 14:56:56 +01001=====================================================
2 ONAP Integration > Bootstrap > Vagrant Minimal ONAP
3=====================================================
4
5This directory contains a set of Vagrant scripts that will automatically set up:
6
7- Devstack,
Pawel Wieczorek60e24052020-01-13 17:20:15 +01008- RKE-based Kubernetes cluster (single control plane node and single worker plane node),
Pawel Wieczorek83040df2019-11-29 14:56:56 +01009- Operator's machine with configured tools (kubectl, helm).
10
11This is intended to show a beginning ONAP operator how to set up and configure an environment that
12can successfully deploy minimal ONAP instance from scratch. Its main purpose are ONAP demos and
13proofs of concepts. It is not intended to be used as a production ONAP environment.
14
15NOTE: the Devstack instance is NOT SECURED, with default credentials:
16
17+-------+----------------+
18| User | Password |
19+-------+----------------+
20| admin | default123456! |
21+-------+----------------+
22| demo | default123456! |
23+-------+----------------+
Pawel Wieczorek8df0be52019-12-10 17:36:14 +010024
25
26Requirements
27------------
28
29+-------------+-----+-------+
30| Machine | CPU | RAM |
31+-------------+-----+-------+
32| Operator | 1 | 1GiB |
33+-------------+-----+-------+
34| Devstack | 2 | 6GiB |
35+-------------+-----+-------+
36| K8s Control | 1 | 1GiB |
37+-------------+-----+-------+
38| K8s Worker | 2 | 12GiB |
39+-------------+-----+-------+
40| TOTAL | 6 | 20GiB |
41+-------------+-----+-------+
42
43Table above is based on current experience and may be subject to change.
44
45
46Prerequisites
47-------------
48
49Virtualisation provider
50~~~~~~~~~~~~~~~~~~~~~~~
51
52Environment has been tested using libvirt_ provider with vagrant-libvirt_ plugin. Plugin
53documentation provides detailed `installation instructions`_ that will guide through the process.
54
55.. note::
56 Remember to uncomment `deb-src` repositories for `apt-get build-dep` step on Debian/Ubuntu.
57
58.. _libvirt: https://libvirt.org
59.. _vagrant-libvirt: https://github.com/vagrant-libvirt/vagrant-libvirt
60.. _`installation instructions`: https://github.com/vagrant-libvirt/vagrant-libvirt#installation
61
62Virtual machine manager
63~~~~~~~~~~~~~~~~~~~~~~~
64
65Environment has been tested using latest Vagrant_ as of writing this documentation (`v2.2.6`_). Some
66features (e.g. triggers_) might not be supported on older versions.
67
68.. _Vagrant: https://www.vagrantup.com/downloads.html
69.. _`v2.2.6`: https://github.com/hashicorp/vagrant/blob/v2.2.6/CHANGELOG.md#226-october-14-2019
70.. _triggers: https://www.vagrantup.com/docs/triggers/
71
Pawel Wieczorek228c62e2020-01-23 17:20:49 +010072Synced Folders
73~~~~~~~~~~~~~~
74
75Environment uses reverse-SSHFS-based file synchronization for applying non-upstream changes. This
76requires installing vagrant-sshfs_ plugin and presence of `sshfs` package on the host system.
77
78.. _vagrant-sshfs: https://github.com/dustymabe/vagrant-sshfs#install-plugin
79
Pawel Wieczorek8df0be52019-12-10 17:36:14 +010080
81Running
82-------
83
84Additional `--provider` flag or setting `VAGRANT_DEFAULT_PROVIDER` environmental variable might be
85useful in case there are multiple providers available.
86
87.. note::
88 Following command should be executed within the directory where `Vagrantfile` is stored
89 (`integration/bootstrap/vagrant-minimal-onap`).
90
91.. code-block:: sh
92 vagrant up --provider=libvirt
Pawel Wieczorek60e24052020-01-13 17:20:15 +010093
94
95Usage
96-----
97
98Once ready (bringing up machines might initially take some time), tools for cluster management will
99be available on Operator's machine. It can be accessed by executing:
100
101.. code-block:: sh
102 vagrant ssh operator
103
104Although appropriate context is set for `kubectl` on login, when interacting with the cluster the
105`onap` namespace has to be explicitly specified.