Category Archives: Uncategorized

Back to Basics

The purpose of this post is to provide an overview of the fundamentals necessary to create a plugin in Foreman.
The first thing to understand is that a Foreman plugin is really just a Rails engine.

Rails Engines
http://guides.rubyonrails.org/engines.html
– What are engines? Think about a car: a car is a machine and the engine is a smaller machine inside that is the core of what makes the car run. In the same way, a Rails engine is a mini application that provides functionality to its host application.

Live blogging of Devstack/Foreman setup on Ubuntu 14

1:00 a.m. – Acquiring server
Ground zero: I’ve rented a server from Digital Ocean, which has pretty inexpensive server space. I selected the 2GB/2 Core/40GB model, because I want to make sure that I had enough room to spin up multiple virtual machines.

1:30 a.m. – Installing Devstack
I’ve got my machine all set up with a non-root user running the show. Cloning the github repo:
git clone https://github.com/openstack-dev/devstack.git
and now kicking it off…
cd devstack && ./stack.sh

1:45 a.m.
Devstack installation went really smoothly, no hiccups. Only took 17 minutes, which is a big improvement over what I’ve seen in the VM on my memory-starved laptop. Now then, time to create some instances! I should probably create a proper user and tenant, but for this test run I’m going to stick with the ‘demo’ user and tenant. (If you’re following along at home, make sure to change the tenant from ‘invisible_to_admin’ to ‘demo’… the tenant switcher is in the top left beside the OpenStack logo.

1:55 a.m.
So I’ve realized/remembered that none of the default flavors are going to work for me.
m1.tiny doesn’t have enough disk, and m1.small (the next one down) needs too much RAM.
I’m going to go back to my terminal and create my own flavor. First I’m going to check out the IDs for the current flavors so I’ll know a good number to pick:
nova flavor-list

2:00 a.m.
ERROR (CommandError): You must provide a username or user id via --os-username, --os-user-id, env[OS_USERNAME] or env[OS_USER_ID]
Whoops! Looks like I forgot to set up my creds file. I’m going to follow this guide. The guide doesn’t mention it but it would be a good idea to copy the line
source ~/creds/openrc
to ~/.profile or ~/.bash_profile.

2:15 a.m.
Alright, now I’m ready to create a flavor. I’ve just read that you can auto-assign an ID, so I’m going to go with that option:
nova flavor-create --is-public true flavorful auto 512 4 1

2:20 a.m.
Okay, got my flavor going, now back to creating instances. I’m going to use with the Fedora image that’s shipped with Devstack by default.

2:30 a.m. – ABORT
So there was some kind of problem with memory allocation for my instance (according to a Django error). I’ll have to take a break in order to dig deeper into the root cause. Stay tuned!

Transition between week 1 and week 2

So week one was kinda blah. Mostly wrestling with server configurations trying to get Foreman, Openstack and Nagios all playing nicely together so I can spin up VMs quickly and get a better understanding of a distributed network. I think I’m almost there! Hopefully I can get things working early tomorrow morning so I have the whole week to play around with creating minions. If I have too much more trouble I think I’m going to go with Openstack Havana rather than Icehouse.

TECHNICAL POST TODO: How to set up Foreman and OpenStack on TBD Linux distro

Goals for OPW

So I think that before undertaking any major project it’s important to think about exactly what it is that you want to achieve, remembering too that there are multiple dimensions to success.

In the case of the OPW internship , I’m hoping to not only gain/reinforce certain technical skills, but also to build personal and professional relationships, and to get exposure to the inner workings of a well run organization (which I believe The Foreman to be).