Use prebuilt images for provisioning

This change makes it possible to use prebuilt images during
provisioning with bifrost. Here are the details:

- a new var, use_prebuilt_deployment_image, is introduced to
control the use of prebuilt deployment image. It is set to
false by default to ensure when the engine is run manually,
deployment image gets built with the user's ssh public key.
- The var use_prebuilt_deployment_image can be overriden by
setting the env var USE_PREBUILT_DEPLOYMENT_IMAGE if it is
run within CI so the build of the deployment image can be
skipped.
- Since the deployment image contains ssh public key, if
USE_PREBUILT_DEPLOYMENT_IMAGE is set to true on a different
CI system, arm_url needs to be overriden to get the right
image for the systems other than Nordix one.
- IPA images are downloaded from artifactory by default and
the var use_prebuilt_deployment_image doesn't take effect.
- The folder /httpboot is not touched except removal of
the deployment and IPA images appropriately so if one doesn't
want to use prebuilt deployment image, the existing one will
be left as is. If it doesn't exist, it gets built. IPA images
are always removed and redownloaded.

Change-Id: Ice16bc3ec0fbb134573ed696d7d8e5ec6cd86d49
3 files changed
tree: 4c1af280a73ce999a78daf39d24ae204dd20a83a
  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.

References

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