After successfully running the routes script it was finally time to get to starting up vagrant – then onto BOSH Lite and Cloud Foundry.
Since both AWS and VMWare Fusion would need to be purchased for their options to work, I choose the free option (Virtual Box). To make sure that the Virtual Box option was the only option ever executed, I went into the Vagrantfile and commented out the VMWare Fusion portion of the file – leaving only Virtual Box.
Note: Vagrantfiles do not support multiline comments, so you have to comment unwanted lines out one at a time using #.
This means that for my setup, the following two lines are the same:
> vagrant up –provider virtualbox
> vagrant up
I suppose you could argue it’s not really necessary, but I don’t want to specify virtualbox every time when it’s the only provider I intend to use.
So to sync up with the directions I’m following on the repo page, thus far I have:
- Installed vagrant
- Created and booted the VM (with the “Using the Virtualbox Provider”) instructions
- Skipped restarting the director, as that wasn’t necessary in my page
So now I’m at the Stemcell portion. I worked on this with someone and, thank goodness, because this part actually went quite quickly.
My initial assumption was that I needed to get the stemcell while logged into the VM (the instructions use the wget command, which is usually indicative of Linux, and this setup is configured to use Ubuntu in the Vagrant VM); however, apparently this is incorrect: the wget is executed in terminal before you go into the VM (using some variable of “vagrant up” as needed).
Since I don’t have wget installed on my Mac, I grab the command using brew. Thankfully, unlike what happened with nokogiri, brew did not laugh in my face this time:
> brew install wget
[Bunch of output.]
> wget http://bosh-jenkins-gems-warden.s3.amazonaws.com/stemcells/latest-bosh-stemcell-warden.tgz
[Bunch more ouput.]
> bosh upload stemcell latest-bosh-stemcell-warden.tgz
[Output for a successful install]
Success! After completing all of that, I decide that I would try getting the stemcell through their other method, the public stemcells. To see the current listing:
> bosh public stemcells
Although the directions indicate that I should be looking for bosh-stemcell-24-warden-boshlite-ubuntu.tgz, I’m reasonably certain this is an older version. That said, I don’t see anything remotely similar in the output. So I try it anyway:
> bosh download public stemcell bosh-stemcell-24-warden-boshlite-ubuntu.tgz
‘bosh-stemcell-24-warden-boshlite-ubuntu.tgz’ not found.
Well… no surprises there I suppose. My mentor suggests that I look at the Bosh Artifacts page in case the output was truncated in some way. Unfortunately, there’s nothing of the format bosh-stemcell-<##>-warden-boshlite-ubuntu.tgz there either. Or anything that even says warden at all.
To see my current stemcell version, I enter the following:
bosh stemcells
Right now, I’m on version 60, so I tried this:
bosh download public stemcell bosh-stemcell-60-warden-boshlite-ubuntu.tgz
And…. this also failed (for the same reason). I think it’s safe to say that the second method they show on the instructions is no longer available, alas.
Although, I think I prefer the first method anyway. The second requires actually figuring out the current version and then manually putting that in, whereas the former method just grabs the latest release of that type.
Cloud Foundry
I have finally hit what all of this set up is for: to run Cloud Foundry locally. There appear to be two sets of instructions. One that I can actually read and the next that my Twitter-generation brain checks out of a little bit. Let’s try the “easy” one liner first and see if that will run without heartache:
./scripts/provision_cf
[Whole bunch of output that looks good]
./scripts/provision_cf: line 32: cd: /Users/ladyivangrey/Development/cf-release: No such file or directory
Ah, damn it. That’s what I get for being hopeful.
Let’s try it the manual way.
Wait a minute, looks like I need to start by cloning the CF repo. Well, maybe there’s hope for the script after all!
> git clone https://github.com/cloudfoundry/cf-release
> cd ~/cf-release
> ./update
[Shit ton of output, this may take a few minutes depending on your connection.]
My only complaint with the update is, while tons of information was filling my screen, there was no way to track how far the update had actually progressed. I mean, sure, it told me what it was doing at each second, but not (e.g.) if it was on step 7/10 or 7/100,000. This is important information!
Anyway, once all that finished I did see a nice “CF Release has been updated” message, and there weren’t any errors, so I think I should just count my blessings.
According to the cf release page, the latest release as of this writing is 173, so:
> git checkout v173
> bosh upload release releases/cf-173.yml
It may come as no surprise, but that last one is another one of those “go get a cup of coffee” commands.
Since I’m still waiting on it ~20 minutes later, I’d like to humbly suggest you may want to get dinner while you wait as well.
Now that all of that is taken care of, I will try to provision_cf again:
> ./scripts/provision_cf
[Whole bunch of output that looks good]
./scripts/provision_cf: line 32: cd: /Users/ladyivangrey/Development/cf-release: No such file or directory
Of course. Ok, spiff it is.
> brew tap xoebus/homebrew-cloudfoundry
> brew install spiff
Now if I just run “spiff” it gives me the help output – how to use the application. Good! Progress… now:
> ./scripts/make_manifest_spiff
Cannot find cf-release at /Users/ladyivangrey/workspace/cf-release; override with $CF_RELEASE_DIR variable
Right on… simple text edit (FYI: my directory is /Users/ladyivangrey/Development/bosh-lite/cf-release), so the message makes sense). And again:
> ./scripts/make_manifest_spiff
Good! Successful execution (I’ve stopped putting bracketed output placeholders for now).
Now for bosh deploy:
> bosh deploy
This is going to take awhile… meal break!
Annnnnd we’re back. Since I already have Go, I could head straight to the acceptance tests:
> go get github.com/cloudfoundry/cf-acceptance-tests
> cd $GOPATH/src/github.com/cloudfoundry/cf-acceptance-tests
Although I have successfully set that up, I don’t really have anything to test yet, so I’m going to finish actually running the tests at this point. I think it is now time for me to actually progress to using the software so I can get started on the tasks that this was all for!
Thank goodness.
