Take infra/swconfig repo into use

This change makes it possible to decouple scenarios themselves
from the engine by adding mechanism to bring the scenario specific
roles from infra/swconfig repo.

The way the mechanism works is
- a scenario is created in infra/swconfig repo, following the directory
structure scenarios/<scenario name>/<installer type>/role/<scenario name>
- the created scenario is declared in engine/engine/var/sdf.yml
- engine copies sdf.yml into engine/.cache/config/sdf.yml
- engine verifies the scenario to be deployed to see if it is supported
by the selected installer and on the distro
- engine clones the scenario from the source repository into engine/.cache/repos,
checks out specified version
- engine bootstrap-scenario.yml playbook uses the scenario role so
scenario specific stuff can be done before the execution of actual install
command

One can use refspec to deploy a scenario that is still open on Gerrit like how
it is done in this change for the scenario k8-calico-nofeature. Once the
corresponding change gets merged, the version to use for the scenario will be
switched to master.

A more detailed guide, listing step by step instructions for scenario development
and testing either locally or on Gerrit will be made available once the implementation
is done..

Change-Id: I8d080ec3891fe27ed2cf595e5d8f81b12fa090d8
10 files changed
tree: 27636521e9a9fbeca2af92e0af33c818f4c2e656
  1. engine/
  2. .gitignore
  3. .gitreview
  4. README.md
README.md

Cloud Infra Engine

The Cloud Infra Engine is created based on OPNFV Cross Community CI (XCI) project in order to automate deployment of various cloud infra scenarios. [1]

Prerequisites

Cloud Infra Engine lets users to deploy the scenario of their choosing on to their workstations. Minimum requirements for the host where the Cloud Infra Engine is executed are

  • 8 CPUs
  • 16 GB of RAM
  • 200 GB of disk space
  • nested virtualization support
  • internet connection

Recommended requirements are

  • 10 CPUs
  • 20 GB RAM

The engine currently only supports Ubuntu16.04.

Apart from having sufficient performance and capacity on the host, few packages need to be installed on the host before executing the engine

  • git
  • python
  • libvirt

The user that is executing the engine should also have passwordless sudo enabled.

Usage Instructions

Cloud Infra Engine is version controlled on Nordix Gerrit so its repository needs to be cloned.

git clone https://gerrit.nordix.org/infra/engine.git

Cloud Infra Engine expects the ssh keys to be created in advance. If you don't have ssh keypair already, you can do that by executing below command.

ssh-keygen -t rsa

Once the keypair is generated, the main script deploy.sh can be executed in order to start deployment of the default scenario on virtual machines that are created by the engine.

cd engine/engine
./deploy.sh -h # get help
./deploy.sh -c

Once the script execution starts, it will prepare the environment, create libvirt resources, provision libvirt vms and install the selected scenario on them. The overall process takes about 40 minutes to complete if ramdisk and deployment images are created in advance.

Please note, in the default / embeded pdf / idf files, we have specified two disks for each vms we are going to create. If you are going to provide pdf / idf files yourself with mulitple disks, please note the current deployment script will not work when the disks have the same size as we specify the bootable disk based on size.

References

[1] https://opnfv-releng-xci.readthedocs.io/en/latest/