IntroductionOver the next week or two I plan to launch a 9 part series describing the environment I've set up to manage my customer's OpenERP sites "in the cloud".
DevOps for OpenERP is an extremely concise (under 30 mins), quick start guide to installing virtual machines in a cloud, provisioning them remotely with OpenERP instances, and then managing loading them with data from Google Spreadsheets via OpenERP's XMLRPC interface.
Tools UsedYou will be introduced to the following Free and Open Source Software (FOSS) products:
- Apache CloudStack -- http://cloudstack.apache.org/ -- cloud management platform
- SaltStack -- http://docs.saltstack.com/ -- cloud machines provisioning
- OpenERP -- https://www.openerp.com/apps -- enterprise resource planning
- GSpread -- https://github.com/FleetingClouds/gspread -- Python client for Google Spreadsheets' API
- GData OpenERP Data Pump -- http://martinhbramwell.github.io/GData_OpenERP_Data_Pump/ -- manage the loading of Google Spreadsheets data directly into OpenERP.
Note that I do pay iwStack.com, by the hour, for hosting of Apache CloudStack, but CloudStack itself is a free download, if you already have a server on which to install it.
- Prepare cloud virtual machine in iwStack.com. (video)
iwStack.com rents out an Apache CloudStack implementation.
CloudStack has the excellent advantage of allowing you fine grained control over root access virtual machines without any supplier lock-in at all.
Here you will get a quick guide to creating a new virtual machine.
- Install Ubuntu 13.10 in the VM (quick review, if you need it). (video)
I've added this step in the blog just to "prove" that I use plain vanilla Ubuntu Saucy. Since I promise to show you every you every single required step, installing Ubuntu is included.
- Create template from VM and 2nd VM from template. (video)
"Template" is Apache CloudStack's term for a ready to use VM, a.k.a virtual appliance. Here I show you how to get a second server up and running quickly from a "template" created from the first server.
- Install SaltStack master and minion. (video)
SaltStack is network provisioning for Python people. OpenERP is written with Python as is much of Ubuntu's administrative stuff; the compatibility makes sense.
- Install OpenERP using a SaltStack state file. (video)
I have created a SaltStack state file that installs PostgreSQL and OpenERP.
Here, I show you how to use it.
- Install and use GateOne; the HTTP terminal server. (video)
Normally, to access machines in your cloud you have to run an SSH client somewhere. GateOne is an SSH terminal server you access via HTTP from any browser. You can authenticate yourself with your Google ID. Run from Apache CloudStack, you can start up a GateOne server, do admin tasks on other servers using Salt, and then shut it down again. It's very hard to break into a server that is switched off!
- Install And check GSpread. (video)
GSpread is a very easy to use, Python API for Google Spreadsheets. I show you how to install, test and use it.
- Install and check OpenERP data pump. (video)
My data pump wraps GSpread and the OpenERP XMLRPC channels with a high-level data handling facility. Typically you just need to get your data into correctly named columns in a Google Spreadsheet in order to be able to load it into OpenERP at high speeds.
- Demonstrate Google Spreadsheet to OpenERP data pump. (video)
I run through a few of the commands and data loading capabilities of the pump.
My quality rules
- I really hate tutorial videos that waste my time! So, each video is 2 to 4 minutes: no fluff, no dead time. You'll know in a minute or two whether the video is going to be useful to you.
- Dark, blurry videos are stupid. So, these are recorded as 1280x720 45fps H.264.
- I dislike tutorial videos with audio! So, there's no sound: you can run through at high speed, skimming text annotations and stopping where there's something you need. "Seeing is believing.", " A picture's worth a blah, blah blah"
- I get mad if a tutorial video ends with something that doesn't work! So, I start everything from original downloads and show you every installation step, complete. This ensures you have a good chance of getting the demonstrated results. Be prepared to pause playback very frequently to get the full details. (If you have the right browser version you may have a playback speed control among the buttons on the bottom right.)
- Then there're videos with a lot of typing and no where to get the text. So I provide a page with all the longer bits of text you'll need to type.
- Be prepared to pause the video frequently. Accelerating the video is a bit like Dolby noise reduction -- boost things way up above the noise level, then rein back at the point of delivery. You know what is noise for you.
- You can remove any annotation that gets in your way. Just click the little black ball at the top-right of the annotation's rectangle.
- Annotations that have an arrow in a box on the right-hand side are links to text or URL's you'll need in order to follow along completing the associated action.