Repo to illustrate the "Install and deploy a Pelican blog using Fabric" series
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.provision
content
.gitignore
LICENSE
Makefile
README.md
Vagrantfile
develop_server.sh
fabfile.py
pelicanconf.py
publishconf.py
requirements.txt

README.md

#Pelican blog tutorial

Repository to illustrate the Install and deploy a Pelican blog using Fabric series.

Its aim is to quickly get a Pelican blog running locally and to provide an easy way to test the provisionning of a server and the publication of content with Fabric.

##Get it running

Clone the project:

git clone git@github.com:osteel/pelican-blog-tutorial.git

Change the origin for your own repository and push:

git remote set-url origin git@github.com:username/my-blog.git
git push -u origin --all

Open "fabfile.py" and assign your repository to the "git_repository" variable.

Download VirtualBox at https://www.virtualbox.org/wiki/Downloads ("platform packages") and install it.
Download Vagrant at https://www.vagrantup.com/downloads.html and install it.

The Vagrantfile is set up to use the Multi-Machine feature. It manages two virtual machines: one that will be the "local" one, and another that is going to be used to simulate a remote server.

From the project root, run:

vagrant up local

This will start and provision a VM with everything required to run Pelican locally.

From a new terminal, start the "server" machine:

vagrant up server

ssh the "local" machine (vagrant ssh local) and run:

cd /vagrant
fab provision
fab publish

fab provision will ssh the "server" machine to install the required packages and set up nginx so that the blog will be accessible at http://my-blog.local.com.

fab publish will pull the files from your Git repository, install the blog's dependencies and generate the HTML content.

The first time you run it, it will create a ssh key pair for you and ask you to add the private key to your repository. Do so and hit return to continue the process.

Add this line to your host machine's "hosts" file:

192.168.72.3    my-blog.local.com

Save and visit http://my-blog.local.com.

Please see the complete tutorial for a full explanation.