A declarative host provisioning system.
Go to file
Phil Sphicas 611e98de3f Use OOB driver creds for MAAS
During MAAS enlistment (and commissioning), an IPMI account (named
"maas" by default) is created on each node, which MAAS then uses for
power management.

This change allows MAAS to use the same credentials as the ones used by
the OOB driver, by overwriting the power parameters for the discovered
nodes. This includes the power type, so if the node is configured to use
Redfish, then Drydock will update a MAAS node discovered as IPMI to use
Redfish instead.

It also provides an option to instruct MAAS not to recreate IPMI
credentials during commissioning, which is passed through to the MAAS
API. Setting this to true is only supported in MAAS 2.7 or later [0].

The two maasdriver configuration options are introduced in drydock.conf,
along with their default values:

    [maasdriver]
    use_node_oob_params = false
    skip_bmc_config = false

These options do not prevent MAAS from creating the IPMI account during
enlistment - this would require addition MAAS customization.

0: 8842d0bfd3

Change-Id: I24d3bc3b1cc94907d73bc247de3fc06dd4750ab1
2021-07-30 16:39:06 +00:00
.github Update Airship vulnerability link 2020-05-18 21:24:48 +00:00
alembic (format): yapf reformat 2018-07-27 20:16:25 -05:00
charts/drydock Add "labels" to Drydock deployment 2021-04-30 16:43:05 -04:00
doc Use OOB driver creds for MAAS 2021-07-30 16:39:06 +00:00
etc/drydock Use OOB driver creds for MAAS 2021-07-30 16:39:06 +00:00
go/src/baclient Bootaction client initial implementation 2018-09-06 16:33:15 -05:00
images/drydock Gate Fixes for Drydock 2021-05-17 17:43:00 -07:00
python Use OOB driver creds for MAAS 2021-07-30 16:39:06 +00:00
tools Update HTK stable commit 2020-07-28 16:32:11 +00:00
.dockerignore Refactor build to include Go 2018-09-04 13:13:21 -05:00
.gitignore Refactor build to include Go 2018-09-04 13:13:21 -05:00
.gitreview OpenDev Migration Patch 2019-04-19 19:52:21 +00:00
.readthedocs.yaml Change RTD config to use Python requirements 2019-09-10 17:26:59 +02:00
.style.yapf Fix issues failing CI pipeline 2017-08-24 10:18:11 -05:00
.zuul.yaml Add Docker default AppArmor profile to drydock 2020-02-13 10:42:28 -06:00
LICENSE Initial commit 2017-02-14 17:23:35 -05:00
Makefile Add support for ubuntu bionic base image 2020-01-17 11:38:56 -06:00
README.md Fix: various documentation and URL fixes 2018-09-26 08:21:14 +00:00
alembic.ini DRYD47 - Task persistance and refactor 2017-10-26 14:54:25 -05:00
entrypoint.sh uWSGI http-timeout option 2018-02-07 13:38:13 -06:00
hostdeps.sh Update image build script to run in a docker 2020-01-14 17:39:27 -06:00
requirements-host-test.txt (zuul) Improve image building 2018-08-10 21:09:50 +00:00
requirements-host.txt Upgrade LibYAML version in container builds 2020-09-25 08:02:04 +00:00
tox.ini Fix: Drydock Exceptions docs rendering on RTD 2019-08-27 22:56:32 +02:00

README.md

drydock_provisioner

A python REST orchestrator to translate a YAML host topology to a provisioned set of hosts and provide a set of post-provisioning instructions.

See full documentation at https://airship-drydock.readthedocs.io/.

Required

  • Python 3.5+
  • A running instance of Postgres v9.5+
  • A running instance of Openstack Keystone w/ the v3 API enabled
  • A running instance of Canonical MaaS v2.3+
  • A running Kubernetes cluster with Helm initialized
  • Familiarity with the Airship platform suite of services

Building

This service is intended to be built as a Docker container, not as a standalone Python package. That being said, instructions are included below for building as a package and as an image.

Virtualenv

To build and install Drydock locally in a virtualenv first generate configuration and policy file templates to be customized

$ tox -e genconfig
$ tox -e genpolicy
$ virtualenv -p python3.5 /var/tmp/drydock
$ . /var/tmp/drydock/bin/activate
$ pip install -r requirements-lock.txt
$ pip install .
$ cp -r etc/drydock /etc/drydock

Docker image

$ docker build . -t drydock

Running

The preferred deployment pattern of Drydock is via a Helm chart to deploy Drydock into a Kubernetes cluster. Additionally use of the rest of the Airship services provides additional functionality for deploying (Armada) and using (Promenade, Deckhand) Drydock.

You can see an example of a full Airship deployment in the Airship in a Bottle repository.

Stand up Kubernetes

Use the Airship Promenade tool for starting a self-hosted Kubernetes cluster with Kubernetes Helm deployed.

Deploy Drydock Dependencies

There are Helm charts for deploying all the dependencies of Dryodck. Use them for preparing your Kuberentes cluster to host Drydock.

Deploy Drydock

Ideally you will use the Airship Armada tool for deploying the Drydock chart with proper overrides, but if not you can use the helm CLI tool. The below are overrides needed during deployment

  • values.labels.node_selector_key: This is the kubernetes label assigned to the node you expect to host Drydock
  • values.conf.dryodck.maasdriver: This is URL Drydock will use to access the MAAS API (including the URL path)
  • values.images.drydock: The Drydock docker image to use
  • values.images.drydock_db_sync: The Drydock docker image to use