Quantcast
Channel: VMware Communities : All Content - All Communities
Viewing all articles
Browse latest Browse all 179681

Puppet Labs Razor workflows

$
0
0
Description

This package of workflows will assist in the usage of Puppet Labs Razor. This is the first release, there maybe bugs.  I would appreciate any feedback and suggestions.  It will install Razor and a Node.js project - razorimage.  Razor is currently missing a REST interface for the Image slice, razorimage implements this.  It also provides a web interface to upload an ISO image, which is available at http://IP_ADDRESS:3000/.  Note: Web programming is not my expertise, I used multiple examples to implement the web portion of this, sources below.

 

Requirements
vCenter Orchestrator 5.x
REST Plug-in
SSH Plug-in

Ubuntu 12.04 LTS (tested with this distro only)

 

WorkflowDescription
Installation

This workflow uses SSH to connect to your Ubuntu server.  It will perform the following actions:

  • Retrieve APT key
  • Add Puppet Labs repository
  • Run "apt-get update"
  • Run "apt-get install git make puppet rubygems"
  • Run "gem install net-scp"
  • Run "puppet module install puppetlabs-razor"
  • Run "puppet apply /etc/puppet/modules/razor/tests/init.pp --verbose"
  • If DHCP is needed, run "apt-get -y install isc-dhcp-server" and configure DHCP service
  • Start DHCPd and tftp services
  • Copy and extract razorimage.tar to Ubuntu instance
  • Start the Node.js razorimage app.js (running under screen named nodejs)
  • Add the REST hosts for Razor and razorimage

Security Warning - I used "echo password |sudo -S" in order to execute the commands that require root.  If anyone has a better suggestion please let me know.

Get ImagesRetrieves the Images UUID from razorimage http CRUD interface, stores in Configuration Element (razor, images)
Add ModelRetrieves the model template, creates the presentation and adds the model to razor
Add PolicyRetrieves the tags from the nodes, retrieves the models, adds the policy

 

 

ActionsDescription
waitForRazorPostInstallWait for the active_models to state to be postinstall.  The idea here was once the active_models were in postinstall I would create another action to monitor the status of a ESXi available port using Telnet.  Once it was available add the host into vCenter or even add to vCO to configure (with vCO 5.1 U1) further.

 

 

Sources

Razor Wiki

virtuallyGhetto - How to deploy ESXi 5 using Razor and Puppet

Asynchronous file uploading using Express and Node.js

Creating a form with labels inside text fields using jQuery

http://eeharbor.com/members/register


Viewing all articles
Browse latest Browse all 179681

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>