Making your own barclamp

From DTO Labs Knowledge Base
Jump to: navigation, search

Contents

How to make your own Barclamp for Crowbar

There will be some automated tools coming up shortly for some of these steps, but in the short term, here's what to do:

Start with a working, new build of Crowbar and get that running

Easiest way is to pull Rob Hirschfeld's build and run it in a VM. You can find his builds at: [1]

If you don't know how to run crowbar, look at our tutorial at: Running Crowbar under VMWare Fusion

Alternatively, you can build crowbar from scratch to get the latest build. Look at the instructions at the official Crowbar wiki on Github for that: [2]

Make your barclamp directory structure

I'm assuming you have a recent build of crowbar.

On your running crowbar server, run these commands:

sudo -s
mkdir /barclamps
chown crowbar.crowbar /barclamps
/opt/dell/bin/barclamp_create.rb newbarclampname “My Name” /barclamps

Now, the skeleton's there. You're ready to start writing your chef recipes.

Barclamp functionality is 80% chef work. The rest is wrapping the chef cookbook(s) in the barclamp descriptions and code so that Crowbar knows what to do with it.

I'd consider doing a git init on your barclamp project at this point.

General Resources and Links

Chef:

"'Crowbar:'"


ROUGH NOTES

This is my work area for serializing the steps involved. Feel free to use this information. I'll polish it as we go:

{
  "id": "bc-template-==BC-MODEL==",
  "description": "Cloud Foundry service (OpenPaaS) for the cloud",
  "attributes": {
    "==BC-MODEL==": {
      "foo": "bar"
    }
  },
  "deployment": {
    "==BC-MODEL==": {
      "crowbar-revision": 0,
      "elements": {},
      "element_order": [
        [ "your_role_here", "other_role_here" ]
      ],
      "config": {
        "environment": "==BC-MODEL==-base-config",
        "mode": "full",
        "transitions": false,
        "transition_list": [
        ]
      }
    }
  }
}


Hint: when working on gui components, flip your crowbar app into development mode:

sudo -s
cd /opt/dell/crowbar_framework
ps auxw | grep rainbows
kill first_pid
/var/lib/gems/1.8/bin/rainbows -D -E development -c rainbows.cfg
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox
Print/export