You may (or may not) have noticed that there has not been much activity here over the past couple months. There are a number of reasons for that, but I’ll spare you the excuses. I’m here to tell you that things are about to change.
Married 12 years to a loving and patient woman.
Father to 3 very energetic boys.
Addicted to cycling.
I do geeky stuff with machines, electronics, and computers.
You may (or may not) have noticed that there has not been much activity here over the past couple months. There are a number of reasons for that, but I’ll spare you the excuses. I’m here to tell you that things are about to change.
Moving on up! Ok, not really. My youngest little man is mobile and moving at ridiculous speeds. When I went to his four month appointment his physician mentioned that I should have the baby gates up and prepared to keep baby boy from any and all possible dangerous incidents, well all that wouldn’t involve my toddler, his amazing big brother. I realized the child safety latches on cabinets and doors and outlet covers that we keep in place for our toddler isn’t enough for our newly mobile baby.
My son like all the men in my life is drawn to the dangerous and shiny. I also learned that my toddler and baby will be a force to be reckoned and yet they will tell on each other often. Example: Toddler opened the gate to, as he puts it, check on the baby. Upon leaving the gated area he was in a hurry due to being an out of control airplane and it didn’t occur to him to close the gate. Baby gets free while I am peeing and when I come out of the bathroom I find the baby drumming on the torch in the living room while the toddler is screaming, “Baby no touch that!!!”. They totally ratted each other out, but now we have to make it abundantly clear toddler isn’t allowed to open and close the gate unless supervised.
So now when I sit in the living room, otherwise known as mom’s room according to the toddler I am surrounded by a giant play yard. When I do laundry my kids watch from the other side of a gate. This is my personal gated community and frankly the view is lovely. ;–)
You’ve heard the colloquialism that “Time is Money” right? Perhaps you agree, or perhaps you just scoff at the sentiment.
I, for one, have given this particular little proverb a good amount of though. So much so, that I usually work out how much something will “cost” me for my time before I get serious about diving into it.
If you’re looking to start a blog to promote your business, or boost your presence on the internet, you’ve probably heard of Wordpress.
You may also have heard about the benefits of hosting your own instance of Wordpress, but you’re intimidated by the idea of setting up and maintaining your own server, or trusting your business to a shared hosting solution.
What if I told you that I’ve got a solution that’ll let you run your Wordpress blog, on your very own server, with automated backups and disaster recover, completely free?
Wait wait! I know it sounds too good to be true, but don’t leave just yet, hear me out…
Both my boys seem to have interest in music, singing, drumming, and dancing. Due to the chance meeting of my beloved and I being an affair he was DJing this is very dear to my heart. We are a music loving household.
I have noticed there is a difference between the boys preferences in that baby boy is quick to join in my silliness happily and willingly. The toddler on the other hand isn’t a fan of my singing, my voice is pretty but nothing to write home about. He can’t stand my dancing unless I’m spinning him. Oh and he’s not sure about my music choices when it involves me singing along. Now that means rap is fine as I can’t rap to save my life.
I had no idea that these little beings would be such critics so early on. I am noticing that the toddler has deemed music with daddy is fine as long as he doesn’t act too much like me when listening.
I can’t wait to explain to my eldest boy that if it wasn’t for mommy and her dancing ways he might not be here. :-P
If you’re like me, every time you get an invitation for one of the RightScale webinars you’re super excited and sign up right away, anxious to see what they have prepared. Perhaps like me you also manage to forget, and the reminder from your calendar application of choice doesn’t pop up.
It’s been a bit over a year since I dropped my Nikon SB600, rendering it useless. When it happened I was able to disassemble the flash and identify the part which was damaged, but being a relative layman when it comes to circuit board components I didn’t know what to replace it with.
Apparently though, I wasn’t the only person to damage their SB600. Nor was I the only one who popped out the jewelers screwdriver and did a post mortem. David identified the part as a small inductor, and even provided the digikey part number that was the best fit to replace it.
We all mark good days on different scales. My good day may be different from yours, and I know my husband’s good day is different from others (geeks have different definitions of most things in life).
Now that I am a new stay at home mom, it’s only been six months, and have health issues and am constantly trying to keep by boys happy and healthy my definition of a good day may be different from yours.
My definition of a good day is only waking up twice during the night to burp and feed my baby while waking up for the day around eight. Then both boys get cleaned, dressed and fed first thing in the morning.
It means getting breakfast before nine am, and drinking all my coffee by eleven am.
It means the dishwasher gets emptied and filled and run before lunch time.
It means getting some quality play time with both my boys together and separately.
It means a hot shower, hair styled and dressed cute. (Oh and deodorant and lotion are a must for cute.)
It means we all get lunch before one pm and the mess is cleaned up shortly after we eat.
A good day means I get to make dinner with little interruptions and if it is from scratch that is an excellent day.
My good day ends with cuddles and kisses with both of my sons and some quality time with my man. Right now, the way things went from chaotic to sweet, I’m counting today as a good day. I hope yours was good too.
You just finished adding a shiny new plugin to your Grails project, and build some functionality around it. You excitedly push it out to your deployment site and you’re greeted with a NoClassDefException. If this has happened to you, the complex and murky plugin dependency handling of Grails may be to blame.
For the past few weeks I have been getting down and dirty writing Chef recipes for use in RightScale.
With Chef support still in beta on RightScale, and me being a complete Chef newbie it’s I’m still on the front side of the learning curve.
If you’re just getting started with Chef for RightScale, you might benefit from this quick start and some of the lessons I learned while getting started.
While you could just open up Notepad or TextEdit and start writing your Chef recipes, there are a few resources that will make the experience much more enjoyable.
The first thing you’re going to want to do is install the Chef Ruby Gem. This will add all of the libraries and binaries for Chef.
While we’re writing our recipes for use with RightScale we won’t need to worry about using the Chef Server, Chef Solo, or Chef Client, so don’t bother configuring any of those.
I’m developing on a Mac and the only suitable installation method seems to be using Ruby Gems to install. This mechanism should also work for most Linux and Debian machines which already have Ruby installed.
1
|
|
Be sure that you run this as root, or with sudo or Chef will get installed at ~/.gem and won’t be in your $PATH or consequently accessible to other users.
Now that you have all of the Chef goodies installed, you’ll have a binary named “knife”. The knife is a utility which we’ll be using as we develop our cookbooks and recipes which you’ll see later.
First though, we need to configure knife. Since we’ll only be using knife to act locally on our recipes and cookbooks we don’t need to give it legit values for a Chef server, but we do need to complete the configuration step to satisfy knife and prevent it from crashing when we use it.
To create a simple configuration file for knife, just run knife config, and accept all of the defaults.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
|
You’re safe to ignore the warnings since they only pertain to actually connecting to a Chef server, which we won’t be doing.
That’s it for installing and configuring Chef if you’re using it with RightScale!
Once you get going with Chef you’re going to need to store your cookbooks somewhere for RightScale to find them and run them.
RightScale will use svn or git repositories, as well as simply downloading a tar or zip file, but my personal preference is to use a git repository.
The quickest and easiest way to get started with git is to head over to github and sign up for a free account.
Once you’re setup, go ahead and create the repository we’ll be using for our Chef cookbooks, and note the SSH URL to your new repository. It should look something like git@github.com:<github_username>/<repo_name>.git. Write it down or keep the browser window open so you can reference it later.
Now that you’ve got your mise en place it’s time to get cooking for RightScale with Chef.
The first step is to get the file structure of your Chef repository setup. You could just take a look at an existing repository like the opscode cookbooks, or RightScale’s public repository and replicate it manually, but there is a better way.
OpsCode, (the folks behind Chef) have conveniently provided a public github repository that represents the skeleton of a fully operational Chef repository. You can clone this repository to get you started.
1
|
|
Once you’ve cloned the skeleton repository, you’ll want to configure git to use the new github repository we created earlier. Here’s where you’ll use the SSH URL I told you to take note of. Substitute that URL where you find <ssh_url> below.
1 2 3 4 5 |
|
With the repository skeleton all ready, we’re going to want to create our first cookbook and add a recipe to it.
Creating a cookbook is our first chance to use our freshly sharpened knife, like so.
1
|
|
This should create a nice new cookbook skeleton directory at <path_to_your_repo>/cookbooks/my-first-cookbook.
With that done, let’s put our first recipe in the cookbook. Using your favorite IDE, create and save a file named helloworld.rb inside the new cookbook directory.
EDIT: Many have correctly pointed out that the hello world file should actually go in <path_to_your_repo>/cookbooks/my-first-cookbook/recipes. Thanks all for the feedback!
1
|
|
With the recipe created, we need to add it to our metadata file so that Chef and RightScale can know it’s there. Here’s a copy of our default metadata.rb file. The highlighted line is added to define the recipe we’ve added.
1 2 3 4 5 6 7 8 |
|
We only have one more step before we’re ready to commit our new cookbook and recipe to our new git repository.
RightScale reads the metadata to determine which recipes are available in the repository, and which inputs are available for those recipes. The file that RightScale evaluates though is a json file named metadata.json.
The contents of metadata.json are effectively the same as metadata.rb, but take heart, you only need maintain the metadata.rb file, then convert it using another Chef command. To generate metadata.json from metadata.rb just run the following command.
1
|
|
You can run this command either right at the root of your repository, or inside each cookbook. If you run it from the root directory of your repository, it will convert all the metadata files in all of the cookbooks.
Now we’re ready to commit our repository and try out our new cookbook.
1 2 3 |
|
I’m going to assume that you already have some familiarity with the RightScale dashboard, and creating things like ServerTemplates and RightScripts.
What I’m going to cover here are steps are necessary to start using Chef with your ServerTemplates.
The first thing you need to start using your cookbooks in RightScale is to tell the RightScale dashboard where to find your repo. To do that, you need to create a new RepoPath in the designer.
When you’re adding the RepoPath, for the URL field, supply the “Git Read-Only URL” for your repository, and make sure to specify the path to your cookbooks as cookbooks.
Now that you’ve added your repo to the RightScale dashboard, you need to add that RepoPath to a ServerTemplate. To do that, open the ServerTemplate you want to run Chef cookbooks on, and click the edit pencil on the Repos tab.
Then select the RepoPath we just made, and click OK.
Our very last step is to add our helloworld recipe to a our ServerTemplate so that we can run it on one of our instances. Go back to the Scripts tab, and in the script category of your choosing, click Add Recipe and select the helloworld recipe.
From an instance running with the ServerTemplate we just modified, we can run the recipe, and see “Hello World” appear in the RightScale dashboard.
As stated before, Chef support in RightScale is still in Beta. Because of this there are some gotchas to watch out for.
If there are any syntax errors or anything else amiss in your repository, you’ll find that not just the cookbook or recipe which you’re working on is failing, but absolutely every recipe in your repo (or any other repo that’s part of your RepoPath) will fail with this super informative error message.
1
|
|
Of course, you can also get that error message if you have some other problem in the recipe you’re working on.
Because of this I find it useful to keep a “smoke test” recipe in my repo, and assigned to the operational scripts on my ServerTemplate when I’m doing Chef development. This recipe should be something simple that you know will always succeed, assuming that everything else is in order.
The helloworld recipe that we created in this exercise is actually a perfect choice for this purpose.
So there it is, everything you need to know to get started using Chef on RightScale condensed from my few weeks of experience. I hope it helps you get started configuring your server instances with Chef, which brings a whole new dimension of power and flexibility to the RightScale ServerTemplates.
I’m excited to see how Chef support progresses and makes it to production status.
If you’re hungry for more info, check out some of the early documentation available about using Chef in RightScale here.