1 =====================================================
2 ONAP Integration > Bootstrap > Vagrant Minimal ONAP
3 =====================================================
5 This directory contains a set of Vagrant scripts that will automatically set up:
8 - RKE-based Kubernetes cluster (single control plane node and single worker plane node),
9 - Operator's machine with configured tools (kubectl, helm).
11 This is intended to show a beginning ONAP operator how to set up and configure an environment that
12 can successfully deploy minimal ONAP instance from scratch. Its main purpose are ONAP demos and
13 proofs of concepts. It is not intended to be used as a production ONAP environment.
15 NOTE: the Devstack instance is NOT SECURED, with default credentials:
17 +-------+----------------+
19 +-------+----------------+
20 | admin | default123456! |
21 +-------+----------------+
22 | demo | default123456! |
23 +-------+----------------+
29 Following set of commands can be used to prepare a machine running Ubuntu 18.04 for this setup:
33 sudo sed -i'.bak' 's/^#.*deb-src/deb-src/' /etc/apt/sources.list
35 sudo apt-get build-dep vagrant ruby-libvirt
36 sudo apt-get install qemu libvirt-bin ebtables dnsmasq-base
37 sudo apt-get install libxslt-dev libxml2-dev libvirt-dev zlib1g-dev ruby-dev
39 sudo apt-get install sshfs
41 wget https://releases.hashicorp.com/vagrant/2.2.7/vagrant_2.2.7_x86_64.deb
42 sudo dpkg -i vagrant_2.2.7_x86_64.deb
44 vagrant plugin install vagrant-libvirt
45 vagrant plugin install vagrant-sshfs
47 sudo mv /etc/apt/sources.list{.bak,}
48 rm vagrant_2.2.7_x86_64.deb
54 +-------------+-----+-------+---------+
55 | Machine | CPU | RAM | Storage |
56 +-------------+-----+-------+---------+
57 | Operator | 1 | 1GiB | 32GiB |
58 +-------------+-----+-------+---------+
59 | Devstack | 1 | 4GiB | 32GiB |
60 +-------------+-----+-------+---------+
61 | K8s Control | 1 | 1GiB | 32GiB |
62 +-------------+-----+-------+---------+
63 | K8s Worker | 8 | 64GiB | 64GiB |
64 +-------------+-----+-------+---------+
65 | TOTAL | 11 | 70GiB | 160GiB |
66 +-------------+-----+-------+---------+
68 Table above is based on current experience and may be subject to change.
74 Virtualisation provider
75 ~~~~~~~~~~~~~~~~~~~~~~~
77 Environment has been tested using libvirt_ provider with vagrant-libvirt_ plugin. Plugin
78 documentation provides detailed `installation instructions`_ that will guide through the process.
81 Remember to uncomment `deb-src` repositories for `apt-get build-dep` step on Debian/Ubuntu.
83 .. _libvirt: https://libvirt.org
84 .. _vagrant-libvirt: https://github.com/vagrant-libvirt/vagrant-libvirt
85 .. _`installation instructions`: https://github.com/vagrant-libvirt/vagrant-libvirt#installation
87 Virtual machine manager
88 ~~~~~~~~~~~~~~~~~~~~~~~
90 Environment has been tested using latest Vagrant_ as of writing this documentation (`v2.2.6`_). Some
91 features (e.g. triggers_) might not be supported on older versions.
93 .. _Vagrant: https://www.vagrantup.com/downloads.html
94 .. _`v2.2.6`: https://github.com/hashicorp/vagrant/blob/v2.2.6/CHANGELOG.md#226-october-14-2019
95 .. _triggers: https://www.vagrantup.com/docs/triggers/
100 Environment uses reverse-SSHFS-based file synchronization for applying non-upstream changes. This
101 requires installing vagrant-sshfs_ plugin and presence of `sshfs` package on the host system.
103 .. _vagrant-sshfs: https://github.com/dustymabe/vagrant-sshfs#install-plugin
109 Additional `--provider` flag or setting `VAGRANT_DEFAULT_PROVIDER` environmental variable might be
110 useful in case there are multiple providers available.
113 Following command should be executed within the directory where `Vagrantfile` is stored
114 (`integration/bootstrap/vagrant-minimal-onap`).
118 vagrant up --provider=libvirt
124 Once ready (bringing up machines might initially take some time), tools for cluster management will
125 be available on Operator's machine. It can be accessed by executing:
131 Although appropriate context is set for `kubectl` on login, when interacting with the cluster the
132 `onap` namespace has to be explicitly specified. Example:
136 # Operator's machine shell
137 kubectl -nonap get pods