Fun with Docker and Drupal on CentOS | RHEL

So if you have been following my other posts, you should have your own VM with Docker installed on it.  Well, I wanted to actually do something with Docker and test some of it’s capabilities.  I have created a GitHub repo with a Dockerfile and some scripts to get Drupal up and running on CentOS.  This is valuable for people learning Drupal as the container is transient.  If you mess something up, just restart the container.  You will need to go back through the setup screens, but you are at a clean state.  If you want to check mark your work, you could commit the container at specific intervals.  This is really great if you are a drupal developer.  If you have your repository, you could work on different client’s drupal setups over different timelines by just instantiating the correct commit.

Here are the directions for setting things up:

Docker Drupal 101

Here is what you should have after following the directions.


I’ll follow up later with some potential workflows!

Tagged ,

Docker Private Registry on [CentOS | RHEL] 6.5

If you followed my first post and have Docker 0.7 running locally, you will want to start creating filesystems to distribute to your other machines.  Here are the steps I used to create a local registry.  I recommend you use a different machine (VM) to set this up to test how it would work in production.

  1. Download the CentOS 6.5 Minimal Release
  2. Install CentOS 6.5 with all of the defaults
  3. Install the EPEL Repository
    rpm -Uvh
  4. Install the required RPMs
    yum install python-setuptools python-gevent python-gunicorn python-flask \ 
     python-werkzeug python-urllib3 python-six python-ordereddict python-chardet \
     python-backports-ssl_match_hostname python-backports python-requests \
     python-redis python-blinker python-yaml python-simplejson pyliblzma \
  5. Install Python Eggs with Easy Install
    easy_install rsa
    easy_install pyasn1
  6. Install git RPM
    yum install git
  7. Change our working directory
    cd /var/opt
  8. Clone the docker-registry git repository
    git clone Continue reading 

Docker 0.7 & [RedHat | CentOS] 6.5

So I have been playing Docker on Ubuntu for about 6 weeks and fell in love with the technology and the potential it has to simplify some deployment environments I have for some clients running at both Amazon and Rackspace. It has not been until this week that I have been able to test this technology with some of my corporate clients that are running private clouds because they are using RHEL/CentOS that used to require a special kernel that would break their SLA with RedHat if we went down this path.

So today I am happy to provide directions on running Docker 0.7 with RHEL/CentOS 6.5. Run all of these commands as root or sudo.

  1. Download the CentOS 6.5 Minimal Release
  2. Install CentOS 6.5 with all of the defaults
  3. Install the EPEL Repository
    rpm -Uvh
  4. Install Docker from RPM
    yum install docker-io wget
  5. Start Docker
    /etc/init.d/docker start
  6. Let’s create a new base filesystem
    cd /tmp
  7. Install some dependencies
    yum install perl rpm rpm2cpio perl-libwww-perl
  8. Install rinse
    tar xvfz rinse-2.0.1.tar.gz
    cd rinse-2.0.1
    make install Continue reading 

PaaS and future of software development

Platform as a Service is getting a lot of buzz. But in a meeting recently I got a couple of great questions. 1) When will we stop virtualizing? We have a Java virtual machine, within a container within a virtual machine. 2) What is the business driver? 3) How am I going to manage this environment?

These are all great questions. After discussions with different sales reps I have posed the question of what is the selling point of PaaS to the CIO other than selling some hype curve that “this is the future of IT”. I don’t see companies like SAP and Oracle Financials running in a container or being deployed through something like Cloud Foundry. But this is also not the use case for these solutions. We need to start thinking differently. We need to start treating IT like a bunch of services. There are already applications like ESBs that provide this functionality as a stitching mechanism to the different services. But what happens when you are asked to build a custom dashboard or a new UI that allows users to interact with different existing services.

Traditionally we are asked to follow and ALM or SDLC to build and deploy these custom applications. In a traditional development shop, these applications require custom profiles to connect to different services in different environments and require an operations staff to give you access to the services you need to fulfill things like audit and governance requirements. The second component is around promotion of applications. Currently we use custom deployment tools like Maven, Jenkins and others to try to automate the build and release of our applications through the different environments. What if we could use agile techniques in accordance to a release train mentality that what we release is a container, not code that is already connected to services on the back end. This is where the business value comes in. Think of a development factory where you are prototyping in your development space, but once you hit QA, PreProd and Production, these filesystems are immutable and when you are performance testing, the goal is to scale to horizontally not vertically. That, to me, is the business advantage of PaaS. Forcing a waterfall driven business mentality to act and think like and agile one.

Spring Bootloader: Part 1

On a recent project, I was asked to write a wrapper for GemFire to make it Spring enabled. We did this so we could deploy custom applications using Spring Data GemFire as an extension to GemFire proper. We could also use other Spring conventions when talking to a database as a typical L2 cache using POJOs to map the data into GemFire. So I went down the path of doing a typical Java application that loads Spring in the main method.

Continue reading

Tagged , , , ,

The Cloud: a training platform for reshoring jobs in the US

In the last month or so, I have received a lot of inquiries about why I am a consultant/contractor through my own company. After a discussion this weekend with a very good friend, I thought I would try and get it down on paper for those of you possibly considering making the same move I did.
It started back when I graduated from college and moved to NC. I got what I thought was my dream job teaching Math and Computer Science at Athens Drive High School. My salary was 20k per year with a cost of living adjustment of $1340 per year for living in Wake County. At the time, I thought this was a great deal for only working 10 months of the year. Unfortunately, being a Math teacher and Computer Science made me analyze everything. So I wrote a simple Turbo Pascal program that allowed me to enter all of time I gave to teaching and divided it by the amount of money I was making. So to break it down:

  1. daily teaching activities – 7:15 to 2:15 or 7 hours
  2. pre-teaching activities (student makeup exams and stuff) – 1 hour
  3. post-teaching activities (student makeup exams and clubs) – 2 hours
  4. nightly planning – 2 hours
  5. nightly exam and homework grading – 1 hour
  6. coaching baseball – 3 hours for 4 months of the year

So when I wasn’t coaching I was working 13 hour days and when I was coaching, I was working 16 hours a day. There are approximately 200 hundred days in a school year to make the math easy. So if I was making 20k per year, I was making $100 per day. This comes out to roughly $7.50 per hour when I wasn’t coaching. This would have been fine because I could work over the summer and make the money up doing some side work. Well, I found out that I needed to take continuing education courses if I wanted to keep teaching. So this was $1500 per 3 credits and I needed 8 credits per year. So now my salary is $15500 and my hourly is just over $5 and hour. So after doing this self appraisal, I asked one of my students how much she got paid to babysit. She responded “$10 an hour for 2 kids and $3 dollars for every extra kid.” WHAT! So for 30 kids, I should be making $91 an hour. And I actually do lesson plans and provide activities for them to do. So I have always been looking at an hourly cost for my time probably back to when I mowed lawns for $5 an hour.

Continue reading

The software enabled data center.

The software enabled data center starts with a virtualized environment. Currently there are three major hypervisors at play: VMware ESXi, Xen, and KVM. A hypervisor allows the operations team to take a large physical infrastructure and chunk it into smaller consumable bits. This allows the hardware to be better utilized. There is a set of products on the market that allows us to create resource pools for teams which you can think of as resource quotas. Teams then use virtual machine templates that they can start, stop, and restart on their own. We refer to this as IaaS or infrastructure as a service. There are two types of templates, platform and base. A base template will give you just the VM and the operating system. A platform template will include the VM, the operating system, and a set of software required to run an application. Examples of a platform template are Sharepoint, Exchange, tcServer, or Oracle. The images managed only through a web UI by end users and consumable by an enterprise or team are usually called SaaS images, or software as a service. Those vms that still require configuration at a filesystem level or require additional deployment packages or code, would be called PaaS images, or platform as a service. The issues with PaaS based infrastructures comes from repeatability and consistency back through the development and dev-ops teams.

Continue reading

PROXMOX: A vCenter/ESXi Alternative?

One of my New Year’s resolutions is to be more social through blogging and tweets.  This is my first one about virtualization and the cloud potential with open source.  I had some extra cash left over from Christmas and decided to upgrade my 27″ iMac which meant my youngest got my old 27″ iMac.  This left us with an extra Mac Mini that I upgraded to 8G of memory and a 128G SSD drive.  I decided to use it to play with some different bare metal hypervisors.  Since I get my fill of vCloud Director and vCenter at work, I thought I would google and do some research over the holidays.  I tried to get XenServer and XCP running with a lot of struggles.  I decided to try PROXMOX.  Once I gave in on trying to create a bootable USB stick from my new Mac, I booted up a Win7 VM using VMware Fusion and followed their instructions on their wiki.  Could not have been easier.  Booted automatically to my Mac Mini using the OPTION on boot up to choose the USB stick.  The only downside is it took over the entire Mac Mini, so my Snow Leopard partition is toast.  And look at my new Mac Mini:

PROXMOX and the Console to CentOS

I am going to be playing with PROXMOX and some new tools for our Cloud Nine Partners Architecture discussions.  Please check back and if you have any questions about how I enabled my Mac Mini with PROXMOX, leave a comment and I can try to help.