Skip to content

Install

John Stange edited this page Feb 11, 2020 · 15 revisions

The Simple Way: Install the Gem

In a Ruby 2.4 or greater environment:

gem install cloud-mu

Then, after ensuring that gem-managed executables are in your path, configure your environment and add cloud provider credentials with:

mu-configure

Non-root users installing to their own home directories

gem install --user-install cloud-mu

Integrating with a Bundler-based application

Add to your Gemfile:

gem 'cloud-mu'

Do it with Docker

There is a publicly available Docker container available with a gem-based Mu environment pre-installed.

  1. Install Docker where you will be hosting the Mu Master
  2. run docker pull egtlabs/mu to create a copy of the latest container image locally
  3. use docker run -d -p 2260:2260 egtlabs/mu to start the container
  4. Use docker ps to get the name of the container runing the egtlabs/mu container image
  5. Use the command docker exec -it <container name> /bin/bash to get a bash shell in the container
  6. Using mu-configure, ensure that your docker-based installation has been configured with credentials in order to deploy into supported cloud providers.

Gotchas

Several cloud provider SDKs (Azure, Google, and Amazon) which are integrated with Mu require gems with extensions. If these are not already available on your system, rubygems will attempt to download and install them. Since these require compiled C library interfaces, your system will need working compiler tools and appropriate headers for the system libraries on which they depend.

The gem version of Mu includes the core deployment engine and Ansible for instance grooming. If you require Chef, or other large-footprint bundled features, you may instead want to install a dedicated Mu Master host.

A Bigger Pawprint: Install a Dedicated Mu Master

Dedicating a virtual machine for managing Mu deployments has a number of advantages. We recommend it for projects that will manage long-term resources, have multiple administrators, require Chef, or benefit from integrated monitoring.

Supported platforms

  • CentOS 7/RHEL 7 (recommended)
  • Amazon Linux 2
  • CentOS 6/RHEL 6

Bundled Features

  • Pre-built Ruby and Python environments for cloud utilities
  • Chef Server
  • Automatic Nagios monitoring of Mu-managed nodes
  • 389ds LDAP directory
  • Centralized rsyslog repository

Option A: Spin off a Master from a gem-based installation

Use a Mu deployment descriptor (a "Basket of Kittens") specifically for creating Mu Masters in our supported cloud providers.

Using mu-configure, ensure that your gem-based installation has been configured with credentials for the cloud provider in question. Then:

$ curl https://raw.githubusercontent.com/cloudamatic/mu/master/install/mu-master.yaml -o mu-master.yaml
$ mu-deploy mu-master.yaml -p cloud=Google

By default this will name the VM and associated resources mu-master. You can customize this with -p name=my-name-here.

Option B: Install from scratch

  1. Create a virtual machine, typically in the cloud provider into which you'll be deploying resources. If Mu will be deploying nodes which will run Chef, ensure that these nodes will have a route to "phone home" to the Chef server, either over the public internet or (more securely) through private VPC connections. OPTIONAL: Associate machine credentials with administrative privileges with your virtual machine.
  2. Run the install shell script as root on the target host. This will install a few required packages, bootstrap a minimal Chef installation, and retrieve Mu's own code.
  3. When prompted, enter required configuration values for Public Address, Admin Email, and Local Hostname. These can also be passed to the installer with --public-address, --mu-admin-email, and --hostname options. Other configuration values may be specified now, or changed post-installation by running mu-configure. This will finish bootstrapping Chef Server and install/configure other ancillary features.
  4. Log out and back in, or source the root user's .bashrc file, to update paths and other environment variables
  5. Create non-root developer or administrator accounts with mu-user-manage or, for non-sensitive test environments, simply start using Mu

Gotchas

The installer expects to be able to reach external Git and Yum repositories, and must be run on a host with internet connectivity.

As part of the installation, you will be prompted to enter or confirm a Public Address. This should be the DNS name or IP address by which Chef client nodes should reach your Mu Master's Chef server. Typically this is the machine's IP address, but forwarded public IP addresses, proxy servers, and non-obvious DNS names can all be valid.

A typical Mu Master will manage deployments for one cloud provider, and so is usually deployed on an instance in that cloud provider with sufficient privileges to create and manage other cloud resources via an admin IAM Profile or Service Account. You can also choose to assign privileges more carefully, explicitly supplying cloud credentials via mu-configure to accounts with the exact scopes and privileges needed for your project.