Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Deploy your octopress blogs to Cloud Foundry

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.md
Octocat-spinner-32 Rakefile
Octocat-spinner-32 app.js
Octocat-spinner-32 manifest.yml
Octocat-spinner-32 npm-shrinkwrap.json
Octocat-spinner-32 vmcignore
README.md

cloudfoundry-octopress

This project eases the deployment of Octopress blogs to Cloud Foundry.

See a sample blog here: http://octofoundry.cloudfoundry.com.

Requirements

  • A Cloud Foundry account. Get one here.
  • Octopress installed. Follow the setup steps from the Octopress website.
  • vmc installed: gem install vmc
  • Some ideas to blog about.

Instructions

We assume that you cloned the Octopress git repository in a folder called octopress and that you followed steps explained in their setup instructions.

So - before continuing - you should already have a folder called octopress and you should also have edited the _config.yml file to provide some useful configuration for your blog such as a sensible title, authorship information, etc.. You may also wish to choose and install one of the many available Octopress themes.

cd /path/to/octopress
git clone git://github.com/videlalvaro/cloudfoundry-octopress.git

Now we are going to generate the basic files for our Cloud Foundry application. Let's call this one myblog.

rake --rakefile cloudfoundry-octopress/Rakefile new_app["myblog"]

if you see an error whilst running this command, it is possible you are using zsh as your chosen shell. There is a problem with the way in which zsh uses globbing when using rake commands. See Octopress issue #117 for several workarounds, or simply use a different shell such as bash.

At this point we have a basic app to serve our blog. Let's add our first blog post using rake:

rake new_post["Hello Octopress"]

Then write the blog post inside the source/_posts/YYYY-MM-DD-hello-octopress.markdown file.

Once you finished writing your blog post, run the following rake task to generate the static blog files:

rake generate

Before deploying, you should also double-check the _config.yml file to ensure that the url value matches the expected final URL that you are deploying to.

Now we are ready to push our blog to Cloud Foundry

vmc push
Using manifest file manifest.yml
Creating myblog... OK
Updating myblog... OK
Uploading myblog... OK
Starting myblog... OK
Checking myblog... OK

Now the next time you add a new blog post, simply repeat the vmc push command.

License

Copyright © 2012 Alvaro Videla avidela@vmware.com

See the LICENSE file.

Something went wrong with that request. Please try again.