Add documentation to deploy Kuberef on VM's 95/72895/5
authorRihab Banday <rihab.banday@ericsson.com>
Wed, 8 Sep 2021 10:25:00 +0000 (12:25 +0200)
committerMichael Pedersen <michaelx.pedersen@intel.com>
Wed, 15 Sep 2021 13:58:18 +0000 (13:58 +0000)
This change adds the steps to deploy Kuberef on
VM's and minor changes in functions.sh.

Signed-off-by: Rihab Banday <rihab.banday@ericsson.com>
Change-Id: I9a0a2df6f452a456935cd119c5d78ffd147369ab
Reviewed-on: https://gerrit.opnfv.org/gerrit/c/kuberef/+/72895
Tested-by: jenkins-ci <jenkins-opnfv-ci@opnfv.org>
Reviewed-by: Georg Kunz <georg.kunz@ericsson.com>
Reviewed-by: Michael Pedersen <michaelx.pedersen@intel.com>
docs/release/installation/deployment-guide.rst
functions.sh

index 0390589..3123598 100644 (file)
@@ -35,7 +35,7 @@ Additionally, please make note of the following:
 
 3. Add user to the sudo and libvirt group and have passwordless sudo enabled.
 
-4. Install Ansible (tested with 2.9.14) and yq.
+4. Install Ansible (tested with 2.9.14), yq (v3.4.1), jq and virtual-env.
 
 Installing and configuring the prerequisites will depend on the operating system installed on the jump server. Below are additional details for setting up some of the more popular distributions.
 
@@ -104,13 +104,26 @@ Generate SSH keypair
 
 * ``ssh-keygen -t rsa -b 4096``
 
-Deployment
-=============================
+Deployment on Baremetal and Provider Infrastructure
+===================================================
 
 Please refer to Chapter 4 of `CNTT RI-2 Documentation <https://github.com/cntt-n/CNTT/blob/master/doc/ref_impl/cntt-ri2/chapters/chapter04.md>`_
 for instructions to get started with the deployment.
 
-Once the deployment is successful, you will have a fully functional RI-2 setup!
+Deployment on Virtualized Infrastructure
+========================================
+
+Following are the steps to spin up a minimalistic Kuberef deployment on VMs aimed for development and testing use-cases:
+
+* Set ``VENDOR=libvirt-vms``, ``DISTRO=ubuntu1804`` in ``deploy.env``. Additionally, ensure that other environmental variables defined in this file match your setup.
+* The hardware and network configurations for the VMs are defined under ``hw_config/libvirt-vms``. Currently, the configuration for one master and one worker VM is defined, but additional VM's can be added as desired. Additionally, the default values of hardware storage, CPU information, etc. can be adapted as per need.
+* Once ready, initiate the deployment by running ``dev/deploy_on_vms.sh`.
+
+After the successful completion of the deployment, you can do ``virsh list`` to list the provisioned VM's and connect to them over SSH using user ``root``. The SSH public key of the user is already added by the installer in the VM's. The IP of the VMs can be found under ``hw_config/libvirt-vms/pdf.yaml``.
+
+Verify that all services in the VM's are running by ``kubectl get all --all-namespaces``.
+
+Note that this feature is currently only supported on Ubuntu 18.04. For other OS, additional configuration might be needed.
 
 Validation of the Reference Implementation
 ===========================================
index f10f2e5..69a3de7 100755 (executable)
@@ -163,7 +163,7 @@ provision_hosts_baremetal() {
     # shellcheck disable=SC2087
     ssh -o StrictHostKeyChecking=no -tT "$USERNAME"@"$(get_vm_ip)" << EOF
 # Install and run cloud-infra
-if [ ! -d "${PROJECT_ROOT}"/engine" ]; then
+if [ ! -d "${PROJECT_ROOT}/engine" ]; then
     ssh-keygen -t rsa -N "" -f "${PROJECT_ROOT}"/.ssh/id_rsa
     git clone https://gerrit.nordix.org/infra/engine.git
     cp "${PROJECT_ROOT}"/"${VENDOR}"/{pdf.yaml,idf.yaml} \
@@ -226,7 +226,7 @@ if ! command -v docker; then
         sleep 2
     done
 fi
-if [ ! -d "${PROJECT_ROOT}"/container-experience-kits" ]; then
+if [ ! -d "${PROJECT_ROOT}/container-experience-kits" ]; then
     git clone --recurse-submodules --depth 1 https://github.com/intel/container-experience-kits.git -b v21.03 "${PROJECT_ROOT}"/container-experience-kits/
     cp -r "${PROJECT_ROOT}"/container-experience-kits/examples/"${BMRA_PROFILE}"/group_vars "${PROJECT_ROOT}"/container-experience-kits/
 fi