Skip to content
This repository has been archived by the owner on Aug 30, 2024. It is now read-only.

Quickstart: Puppet & Eucalyptus

tomellis edited this page Oct 10, 2012 · 5 revisions

This quickstart guide will help you deploy the five main Eucalyptus components via Puppet.

You'll need a running puppet server, to get a puppet server running quickly with the required settings, check out the Eucalyptus Recipe project, which contains a script to do just that: https://github.com/eucalyptus/recipes/blob/master/bootstrap/puppet/centos/centos6_puppetmaster_apache.sh

Environment

CentOS 6.3 x86_64

Ubuntu 12.04 LTS

Puppet 2.7.18-1 or Puppet 3.0

  • PluginSync Enabled
  • StoredConfigs Enabled

Checkout the Eucalyptus module

a. cd /etc/puppet/modules && git clone https://github.com/eucalyptus/puppetlabs-eucalyptus.git .

Setup your node definitions

a. In your /etc/puppet/manifests/site.pp file:

# Import our node definitions from a separate file
import 'nodes.pp'

b. Create a /etc/puppet/manifests.nodes.pp file and define your nodes, their roles and the Eucalyptus config (see the Install guide and Administration guide for great docs on all the settings).

node default {
}

# Eucalyptus.conf Configuration (applies to all nodes as they inherit it)
node conf-frontend inherits default {
class { 'eucalyptus::conf':
    vnet_mode => 'MANAGED-NOVLAN',
    vnet_subnet => '172.20.0.0',
    vnet_netmask => '255.255.0.0',
    vnet_dns => '8.8.8.8',
    vnet_addrspernet => '32',
    vnet_publicips => '192.168.1.50-192.168.1.250',
    vnet_privinterface => 'eth1',
    vnet_pubinterface => 'eth0',
    vnet_bridge => 'br0',
    hypervisor => 'kvm',
    use_virtio_disk => '1',
    use_virtio_root => '1',
    use_virtio_net => '1',
    instance_path => '/var/lib/eucalyptus/instances',
    vnet_dhcpdaemon => '/usr/sbin/dhcpd41',
    schedpolicy => 'ROUNDROBIN',
    eucalyptus_loglevel => 'INFO',
    cloud_opts => 'none',
    }
}

# Cloud Controller (CLC)
node 'clc1.example.com' inherits conf-frontend {
  class { 'eucalyptus::clc': cloud_name => 'eucalyptus01' } 
  # Define the cluster names
  eucalyptus::cluster { '1st-cluster': cloud_name => 'eucalyptus01', cluster_name => 'cloud01' }
}
# Walrus
node 'w1.example.com' inherits conf-frontend {
  class { 'eucalyptus::walrus': cloud_name => 'eucalyptus01' }
}
# Cluster Controller (CC)
node 'cc1-premium01.example.com' inherits conf-frontend {
  class { 'eucalyptus::cc': cloud_name => 'eucalyptus01', cluster_name => 'cloud01' }
}
# Storage Controller (SC)
node 'sc1-premium01.example.com' inherits conf-frontend {
  class { 'eucalyptus::sc': cloud_name => 'eucalyptus01', cluster_name => 'cloud01' }
}
# Node Controller 1 (NC)
node 'nc1.example.com' inherits conf-frontend {
  class { 'eucalyptus::nc': cloud_name => 'eucalyptus01', cluster_name => 'cloud01' }
}
# Node Controller 2 (NC)
node 'nc2.example.com' inherits conf-frontend {
  class { 'eucalyptus::nc': cloud_name => 'eucalyptus01', cluster_name => 'cloud01' }
}

HA Support

The module supports:

  • HA CLC
  • HA CC
  • HA Walrus via DRBD
  • HA SC

HA Walrus

Change your nodes.pp file definition for walrus to inherit conf-walrus instead and add another walrus server:

# Walrus 1
node 'w1.example.com' inherits conf-walrus {
  class { 'eucalyptus::walrus': cloud_name => 'production01' }
}
# Walrus 2
node 'w2.example.com' inherits conf-walrus {
  class { 'eucalyptus::walrus': cloud_name => 'production01' }
}

node conf-walrus inherits default {
  # DRBD Disk config
  eucalyptus::drbd_resource { 'r0':
    host1      => 'w1.example.com',
    host2      => 'w2.example.com',
    ip1        => '10.0.0.1',
    ip2        => '10.0.0.2',
    disk_host1 => '/dev/sda4',
    disk_host2 => '/dev/sda4',
  }

  # Eucalyptus
  include eucalyptus
    class { 'eucalyptus::conf':
    vnet_mode => 'MANAGED-NOVLAN',
    vnet_subnet => '172.20.0.0',
    vnet_netmask => '255.255.0.0',
    vnet_dns => '8.8.8.8',
    vnet_addrspernet => '32',
    vnet_publicips => '192.168.1.50-192.168.1.250',
    vnet_privinterface => 'eth1',
    vnet_pubinterface => 'eth0',
    vnet_bridge => 'br0',
    hypervisor => 'kvm',
    use_virtio_disk => '1',
    use_virtio_root => '1',
    use_virtio_net => '1',
    instance_path => '/var/lib/eucalyptus/instances',
    vnet_dhcpdaemon => '/usr/sbin/dhcpd41',
    schedpolicy => 'ROUNDROBIN',
    eucalyptus_loglevel => 'INFO',
    cloud_opts => '-Dwalrus.storage.manager=DRBDStorageManager',
    }
}

Arbitrator Support

Eucalyptus Arbitrators are pings to external hosts, to determine service availablity. If an arbitrator fails, the component to which it is registered (e.g. CLC) will fail over to its secondary host.

You can define them inside the CLC's node definition like so:

eucalyptus::arbitrator { 'clc_arbitrator01':
  partition_name  => 'clc_arbitrator01',
  service_host    => '192.168.0.50',
  gateway_host    => '192.168.0.1',
}

Arbitrators for the Eucalyptus Cluster Controller (CC) are defined within /etc/eucalyptus.conf, to add them to puppet you can use the following syntax within the CC's eucalyptus::conf class in the node definition (maxium of three IP addresses):

$cc_arbitrators = "192.168.0.1 192.168.0.254"