virtual maas #8

Description

MAAS providers cloud like provisioning capabilities
for physical server hardware.
.
It also has an unsupported virsh mode which allows it
to manage KVM virtual machines.
.
This charm installs MAAS and configures it to work
in the mode providing a fully virtualized testing
environment.


Overview

MaaS (Metal-as-a-Service) provides a cloud-like way to manage physical servers.

This charm deploys MaaS within a single server to allow simulation of a full
MaaS environment using KVM machines + virsh for power control rather than
actual physical servers.

Using chunky hardware allows for simulation of large environments.

Usage

Deploy

To deploy::

juju deploy virtual-maas

MaaS will be installed and configured to manage KVM instances on an internal
bridge.

Access to MaaS through the web interfaces is provided at http:///MAAS.

The username and password are ubuntu/ubuntu.

NOTE: Currently the default domain and name for the zone file are not
configured automatically; please login and set both to 'virtual-maas.com'.

A Juju environments file with the correct credentials is created for the ubuntu
user.

Machine creation

~ubuntu/tools/maas-libvirt-utils contains some helper scripts for creating the
KVM instances that MaaS will manage.

The 'register-node' script creates a new KVM instance and registers it into
MaaS; MaaS will then boot the machine and commission it read for use

To create multiple new ‘machines’ run::

for((i=0;i<20;i++)); do
  sudo ./register-node maaslocal
done

To delete all machines run::

sudo ./delete-all

Note that machines are created with the cache=unsafe option for speed; however
this does mean that a failure of the physical server running this charm will
probably result in corruption of KVM disk files. Just delete them and re-create.

Consoles for each machine can be access through the machine name::

virsh console inst-001

Juju

Juju will be installed in the deployed service; run::

juju bootstrap

to bootstrap a new environment. Environment configurations for quantal (default)
and precise are currently pre-configured.

Juju deployer

~ubuntu/tools/juju-deployer contains a deployment tool used to deploy charms
in a specific, ordered way. See the deployments.cfg file for examples.

Openstack Ubuntu Testing

~ubuntu/tools/openstack-ubuntu-testing contains the tooling used in the
OpenStack QA Lab. Specifically::

./bin/inspect_environment.sh

Will create a envrc file which can be sourced for use with the openstack
client tools for nova, cinder, glance, swift etc.

Configuration

SSH public keys can be added from Launchpad to the ubuntu account on the deployed
services::

juju set virtual-maas ssh-keys="usera userb"

Block devices attached to the server can be configured to provide storage for
virtual machines; devices are built into a LVM volume which is mounted under
/var/lib/virtual-maas::

juju set virtual-maas block-devies="sdb sdc sdd sde sdf"

A forwarding dns-server can also be specified::

juju set virtual-maas dns-server="192.168.77.23"

This will configured the bind instance on the deployed services to forward
dns queries to the outside world rather than directly querying root servers.

Configuration

ephemeral_stream
(string) The stream to import ephemerals from ("daily" or "released")
released
block-mntpoint
(string) Path from root where block-devices LVM will be mounted.
/var/lib/virtual-maas
bridge-mode
(string) mode for bridging. ("auto", "linux", or "openvswitch")
auto
maas_iface
(string) network interface for running maas dhcp/dns
eth1
releases
(string) Space seperated list of releases to import MAAS pxe files for.
precise
dns-server
(string) dns-server to use for external resolution.
10.98.191.1
maas_bc
(string) ip broadcast for maas_iface
10.23.23.255
maas_nm
(string) ip netmask for maas_iface
255.255.255.0
ssh-keys
(string) Space delimited list of launchpad usernames to import SSH public keys for. . Keys are imported to the ubuntu account.
block-devices
(string) List of block devices to use for virtual machine storage. . These will be aggregated into a LVM volume and mounted at block-mntpoint
source
(string) Alternative source for packages. By default all packages will be pulled from the Ubuntu archive; this allows ppa's to be used: . ppa:maas/testing
maas_range
(string) ip address range for maas_iface network
10.23.23.100,10.23.23.200
user
(string) the unprividged user to set up
ubuntu
ext-int
(string) external interface to use for outbound routing
eth0
maas_gw
(string) ip address for maas_iface when running dhcp/dns
10.23.23.2