ke4qqq / puppetlabs-razor

Puppet module to install Razor.

Home Page:http://forge.puppetlabs.com/puppetlabs/razor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Razor Module

Puppet Razor module will perform the installation of Razor on Ubuntu Precise system. See blog post.

It is considered part of the overall Project Razor infrastructure, so you can get help using the module or enhancing it over at the main Project Razor site on GitHub.

Dependencies

The puppet module tool in Puppet Enterprise 2.5.0+ and Puppet 2.7.14+ resolves dependencies automatically.

Puppet module dependencies for razor module:

Installation

Install puppetlabs-razor module and dependencies into module_path:

$ puppet module install puppetlabs-razor
Preparing to install into /etc/puppet/modules ...
Downloading from http://forge.puppetlabs.com ...
Installing -- do not interrupt ...
/etc/puppet/modules
└─┬ puppetlabs-razor (v0.1.4)
  ├─┬ puppetlabs-mongodb (v0.0.1)
  │ └── puppetlabs-apt (v0.0.3)
  ├── puppetlabs-nodejs (v0.2.0)
  ├── puppetlabs-stdlib (v2.3.2)
  ├── puppetlabs-tftp (v0.1.1)
  ├── puppetlabs-vcsrepo (v0.0.4)
  └── saz-sudo (v2.0.0)

Puppet apply, apply test manifests:

puppet apply razor/tests/init.pp

Puppet master, add razor class to target node:

node razor_system {
  class { 'sudo':
    config_file_replace => false,
  }
  include razor
}

Parameters

  • source: git, or package; default: git
    • this selects what installation method is used for getting Razor on the system
    • WARNING: the default will change from git to package before the 1.0.0 release of the overall project.
  • username: razor daemon username, default: razor.
  • directory; installation target directory, default: /opt/razor.
  • address: razor.ipxe chain address, and razor service listen address, default: facter ipaddress.
  • persist_host: ip address of the mongodb server, default: 127.0.0.1.
  • mk_checkin_interval: mk checkin interval, default: 60 seconds.
  • mk_name: razor tiny core linux mk name.
  • mk_source: razor mk iso source, default: Razor-Microkernel project production iso.
  • git_source: razor git repo source, default: Puppet Labs Razor.
    • DEPRECATED: this feature is deprecated in favour of package installation.
  • git_revision: razor git repo revision, default: master.
    • DEPRECATED: this feature is deprecated in favour of package installation.

      file { 'custom_mk.iso':
        path   => '/var/tmp/custom_mk.iso',
        source => 'puppet:///acme_co/files/custom_mk.iso',
      }
      
      class { 'razor':
        directory => '/usr/local/razor',
        mk_name   => 'rz_mk_custom-image.0.9.0.4.iso',
        mk_source => '/var/tmp/custom_mk.iso',
        require   => File['custom_mk.iso'],
      }
      

Resources

rz_image allows management of images available for razor:

rz_image { 'VMware-VMvisor-Installer-5.0.0-469512.x86_64.iso':
  ensure  => 'present',
  type    => 'esxi',
  source  => '/opt/image/VMware-VMvisor-Installer-5.0.0-469512.x86_64.iso',
}

rz_image { 'Precise':
  ensure  => 'present',
  type    => 'os',
  version => '12.04',
  source  => '/opt/image/ubuntu-12.04-server-amd64.iso',
}
  • Although we can query uuid, it can not be specified.

rz_model, rz_tag, rz_policy supports deployment of operating systems:

rz_model { 'precise_model':
  ensure      => present,
  description => 'Ubuntu Precise Model',
  image       => 'precise_image',
  metadata    => {
    'domainname'      => 'puppetlabs.lan',
    'hostname_prefix' => 'openstack',
    'rootpassword'    => 'puppet',
  },
  template    => 'ubuntu_precise',
}

rz_tag { 'virtual':
  tag_label   => 'virtual',
  tag_matcher => [
    { 'key'     => 'is_virtual',
      'compare' => 'equal',
      'value'   => 'true',
      'inverse' => false, }
  ],
}

rz_policy { 'precise_policy':
  ensure   => 'present',
  broker   => 'none',
  model    => 'precise_model',
  enabled  => 'true',
  tags     => ['virtual'],
  template => 'linux_deploy',
  maximum  => 1,
}

rz_broker { 'demo':
  plugin  => 'puppet',
  metadata => {
    version => '3.0.2',
    server  => 'puppet.dmz25.lab',
  }
}

Additional examples can be found in the tests directory. Currently rz_* resources only creates/delete configuration, and does not manage(maintain) razor configuration.

Usage

See Razor and Razor wiki pages

Contributors

A wide array of folks have contributed to the Razor module, including a pile of hugely valuable external contributions. The list was getting too long to maintain inline, but you can see the full list of contributors in the CONTRIBUTORS file.

About

Puppet module to install Razor.

http://forge.puppetlabs.com/puppetlabs/razor

License:Other


Languages

Language:Ruby 72.8%Language:Puppet 27.2%