From Zero to Cloud Foundry on vSphere: Part 1 - How to install MicroBOSH
It seems that the teams over at Cloud Foundry give us too much credit. I spent days trying to get Cloud Foundry up and running because of minor snags and glitches. In addition, the documentation to make this all work doesn't exist in a single place, it's all outdated, or isn't descriptive enough. Hopefully this spoon feeding series tutorial will help get you there.
This tutorial will go over the steps it takes to deploy Cloud Foundry on vSphere. Here are the proper steps:
Over the past week, I started learning Chef. There are a few different configuration management toolsets out there such as Puppet, SaltStack, and Ansible. But Puppet and Chef have majority amount of market share and use Ruby as its code base so it made sense for me to start there. There's no point in starting a project unless you have a goal to accomplish so after I read more about Chef cookbooks, recipes, attributes, etc it seemed like making a JumpSquares cookbook would be a good place to start.
Skip the blah blah and see the code at chef-jumpsquares or read on for the complete back story.
The setup of Chef is simple and only takes about an hour or two to complete. After the server is up and a node has been added, that's where the fun begins. I began my involvement with looking around for cookbooks that use the same components that are needed in the JumpSquares appliance model. Cookbooks such as postgres for database, rvm for ruby, and nginx for web/application servers were already available and made my job starting out much easier.
Chef Cookbook and Recipe for Thin + Nginx with Rails
For simplicity, I deploy thin + nginx for most of my rails applications. Thin is lighter weight than Passenger and the combo makes it more favorable than running Apache. I began learning Chef and saw nothing for thin existed so I attempted to make a cookbook.
If you don't want to read any more about this, then jump over to the code on github chef-thin_nginx.
This cookbook will install thin as a gem and complete a configuration. While 'nginx' will be installed from package and installed as a normal service.
To make the 'thin' installation from gem work properly, 'rvm' is required. rvm has a shell interface that is used to install the service from the gem. I previously tried to install thin from source and it wouldn't work correctly because 'rake' tasks are necessary gems that aren't loaded into the internal 'chef' gemset. In addition, I tried to install the thin gem to chef's internal gemset, but I received lots of errors when it came to postgresql gems. That is why rvm is necessary. rvmwill install version 1.6.1 of thin unless you change the parameters. This was tested with 1.6.1 so it will work.
I had a problem where my vCAC environment could no longer talk to my vCO APIs. I constantly have to turn off vCAC and bring it back up because of resource constraints in my home lab. For some reason I just thought the services weren't coming up and I realized no amount of reboots were going to fix it.
The error was:
You cannot perform that action because the system cannot connect to the provider at https://vcac-appliance.kendrickcoleman.c0m:8281/vco/api/.
Automating vCloud Director Organization VDCs with Ruby
I filed this under rails projects, but it's really just some ruby code...
I set a goal for myself to become familiar with the vCloud Director APIs using REST. Mainly to see how long it would take me to automate my first task and prove to myself I can do it. Well, I'm pleased to say that it's alot easier than I thought. I had a new vCloud Director instance installed on Monday, and by Wednesday morning I was just finishing up my code. So within 2 days I was doing some automation tasks and it really wasn't that hard. It gave me a chance to work directly with the API using the rest-client and nokogiri gems. A total of 200+ lines of ruby code all together
1st: NewOrg.rb This will create a new Organization based on the parameters specified in the XML. Relies on the new_org.xml.
2nd. NewOrgVDCandServices.rb (not completely working) This will create a new Organization VDC based on parameters specified at the beginning of the Script. It also uses 3 XML files for the POST input parameters. After the Organization vDC is created, then deploy a vShield Edge Gateway appliance to the newly created OrgVDC. Wait 120 seconds after deployment, then configure 2 new services are created on the Gateway appliance:
A default firewall rule to allow all internal traffic to pass to anything external
A SNAT rule to allow internal traffic to speak on a NATed address externally.
A lot of talk about heartbleed lately with OpenSSL. Plenty of blogs talk about it, but I wanted to see what can actually be scraped.
This morning I talked a friend of mine I grew up and went to University of Kentucky with that graduated from DePaul with a masters in network security, Austin Diener (@diener) I figured he would be the best place to start for this fact finding mission. He led me to this script located on github OpenSSL heartbeat PoC with STARTTLS support.
It's a pretty simple script, point it at your ESXi server with port 443 and watch the magic happen.
NOTE: this server is on my LOCAL LAN in a test environment. I don't care if you try to reverse engineer this garbage. (proceed to the bottom for more information)
It's been really long overdue. How overdue you ask? Well, kendrickcoleman.com was originally built on Joomla 1.5. Joomla 1.6 was released in January of 2011 and the effort to upgrade would have been just as tough as this move to Joomla 3.2. Joomla 1.5 went completely EOL in April of 2013 so no new patches or security releases were going to come out.
So why make the jump? Joomla 3 has really good responsive templates based on Twitter Bootstrap so it works well on any device. In addition, Joomla 1.5 had some major security flaws but I was lucky enough to never get attacked. It was also a good time to give the website a fresh new look that conforms to some modern design.
The toughest piece of this migration is that there is no "in-place" upgrade. I have tried to upgrade my site a few times over the past year but it came with sub-par results. All the free tools just never seemed to work good enough. So I finally opened up my wallet and paid for the MigrateMe plug-in. It wasn't cheap, but in the end it was worth every penny. It kept literally everything in tact. Articles, sections, banners, components, stats, etc all migrated over. There were a few anticipated hiccups but it went fairly well.
2 weeks ago, Brian Gracely (@bgracely) shared some information with me talking about the changing landscape of DevOps and it hit spot on. Brian showed a picture of a book titled The New Kingmakers, How Developers Conquered The World. I had never heard of it before so I wanted to explore, and to not spoil it completely, it did not disappoint. The book is pretty short at 57 total pages and has a whopping cost of only $3 on Amazon. There's no reason why anyone can't read this book because I was able to finish it on a 3 hour flight (and I'm a slow reader).