ManageIQ / manageiq-pods

ManageIQ on Kubernetes and OpenShift
Apache License 2.0
51 stars 100 forks source link
hacktoberfest

Deploy ManageIQ on OpenShift

CI Join the chat at https://gitter.im/ManageIQ/manageiq-pods

Build history for master branch

This guide will demo deploying ManageIQ in OpenShift as its example use-case but this method could actually be used in a different container cluster environment

Purpose

This example gives a base template to deploy a multi-pod ManageIQ appliance with the DB stored in a persistent volume on OpenShift. It provides a step-by-step setup including cluster administrative tasks as well as basic user information and commands. The ultimate goal of the project is to be able to decompose the ManageIQ appliance into several containers.

Prerequisites:

Cluster Sizing

In order to avoid random deployment failures due to resource starvation, we recommend a minimum cluster size for a test environment.

Other sizing considerations:

Installing

$ git clone https://github.com/ManageIQ/manageiq-pods.git

Follow the Operator deployment instructions

Production Deployment: https://www.manageiq.org/docs/reference/latest/installing_on_kubernetes/index.html#preparing-the-kubernetes-namespace

Development Deployment: README

Building Images

The bin/build script will build the entire chain of images.

The script requires at a minimum the -d option to specify the location of the images directory, (./images if run from the repo root) and the -r option to specify the resulting image repo and namespace.

For example, if you wanted to build all the images tagged as manageiq/<image-name>:latest, you would run the following command from the repo root.

./bin/build -d . -r manageiq

Additional options are also available:

Building RPMs locally

If you want to build images containing your fork or different branches of ManageIQ source code, the -b option can be used, which will build RPMs locally before building the images. RPMs are built in manageiq/rpm_build container image but a different image can be used if needed.

For example, if you want to build RPMs using test/rpm_build image and override rpm_build options using my_options/options.yml, you would run:

RPM_BUILD_IMAGE=test/rpm_build RPM_BUILD_OPTIONS=my_options bin/build -d . -r manageiq -b

An example options.yml to use "feature" branch on the "example" fork of ManageIQ/manageiq:

repos:
  manageiq:
    url:  https://github.com/example/manageiq.git
    ref:  feature  (<-- must be tag or branch)

Note: RPM_BUILD_OPTIONS is a relative path to the directory where options.yml is.

Refer to https://github.com/ManageIQ/manageiq-rpm_build for rpm build details.

Using locally built RPMs

If you already have locally built RPMs and want to use them instead of using RPMs from manageiq yum repo, copy <arch> directory to images/manageiq-rpms/rpms:

images/manageiq-rpms/rpms/x86_64/manageiq-*.rpm

Then, run:

bin/build -d . -r manageiq

Including the VMware VDDK in the image build

Download the VMware VDDK library and move or copy it into the images/manageiq-base-worker/container-assets/ directory before starting the image build. If found, the image build will copy the files into the desired location and link the shared objects for you.