Archive

Category Archives for "Dave Tucker"

Migrating from WordPress to Pelican on PaaS – Part 2

Part 2 of a this 3 part series examines how I created my Pelican blog and migrated my Wordpress content with me.

Part 2: The Wordpress to Pelican Migration

The Plan

If you haven't read Part 1 already, it will give you some background as to what I'm doing and why I'm doing it.

Starting the Pelican Project

Assuming you already have a working Python, starting a new blog is as easy as installing a few dependencies and using the pelican-quickstart

pip install pelican Markdown
mkdir blog
cd blog
pelican-quickstart
Welcome to pelican-quickstart v3.3.0.

This script will help you create a new Pelican-based website.

Please answer the following questions so this script can generate the files
needed by Pelican.


> Where do you want to create your new web site? [.]
> What will be the title of this web site? Dave's Blog
> Who will be the author of this web site? Dave Tucker
> What will be the default language of this web site? [en]
> Do you want to specify a URL prefix? e.g., http://example.com   (Y/n) Y
> What is your URL prefix? (see  Continue reading

Migrating from WordPress to Pelican on PaaS – Part 1

I've been blogging with Wordpress for the last 5 years on and off. It has some great features and is very easy to use, but it's not for me. This series of posts documents my transition from Wordpress to Pelican.

Part 1: Motivation and Decisions

What's Wrong With Wordpress?

There are a few things about Wordpress that have been bothering me lately

  • Performance
  • Backup/Restore
  • Comment Bots
  • Portability

As with anything that relies on server-side scripting, there is performance hit when loading pages. I've been running my blog on a Linode 1024 VPS ($20 per month) and had found that I had to move from Apache to Nginx to get decent performance with Wordpress. Adding Caching to the equation with one of the many caching plugins available has also helped, but this is a rather complex solution. Another performance bottleneck is the database...

Wordpress requires a MySQL database in the back end. I am not a big MySQL fan and would prefer to run Postgres or MariaDB but this isn't officially supported in Wordpress right now. Not only is a performance bottleneck, but it is also another thing that needs to be backed up.

The Backup/Restore capabilities of Wordpress are decent, Continue reading

Remote Debugging OpenDaylight with IntelliJ

Remote Debugging OpenDaylight with IntelliJ is as easy as 1, 2, 3

​1) Go to Run > Edit Configurations

​2) Add a new Remote Configuration

​3) Configure it as follows:

  • Host = Your Controller IP
  • Port = 8000
  • Sources = Whichever project/module you want to debug

ODL Remote Debugging

Using the latest Open vSwitch with Devstack and OpenDaylight

While setting up my OpenDaylight OVSDB and Devstack following the awesome instructions from Kyle Mestery, I thought it would be fun to run the latest OVS from source on my compute nodes...

To do this, execute the following commands on one of your compute nodes before running stack.sh

sudo apt-get -y --force-yes install build-essential devscripts

gcc dkms make automake autoconf debhelper libssl-dev
pkg-config python-all python-qt4 python-zopeinterface
python-twisted-conch gdebi-core dh-autoreconf hardening-wrapper
libtool graphviz ipsec-tools module-assistant python-twisted-web
racoon git

git clone git://git.openvswitch.org/openvswitch
cd openvswitch
./boot.sh
dpkg-buildpackage -b -us -uc -nc
cd ..

Once you’ve built the .deb’s you can copy these to your other compute nodes using scp:

scp *.deb ubuntu@devstack-compute2:

Replace ubuntu with your username and devstack-compute2 with the name or IP address of your other compute nodes.

Finally we can install the packages as follows:

sudo dpkg -i *.deb

At the time of writing this will build Open vSwitch 2.1.90. You can check the version as follows:

sudo ovs-vsctl --version

Which will give the following output

ovs-vsctl (Open vSwitch) 2.1.90
Compiled Jan 16 2014 15:18:45

Huge thanks to @FlorianOtel for his help with Devstack!

@dave_tucker

Installing Pyenv on Mac OSX

When I’m writing code, I’m usually in OSX. When I want to try things out, or check for compatibility between certain versions of Python, it’s handy to have them all accessible… enter Pyenv. Pyenv is based on Rbenv, which for you non-Rubyists is a tools that allows you to set up Ruby environments that are scoped either globally, per-shell or per-folder!

If you aren’t using Homebrew already, which I highly recommend you should, then install it.

ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go/install)"

Before you start brewing you should run “brew doctor”. This will check that everything is ok with your installation.

brew doctor

Hopefully you will get a message “Your system is ready to brew”, otherwise doctor brew will oftentimes tell you what to do.

brew install python
brew install pyenv

The above commands will, install homebrew’s Python 2.7 (to replace the system pyhton) and install pyenv. Replacing the system Pyhton fixes issues with needing “sudo” for easy_install and others documented here

Now Pyenv is installed, you should edit your “~/.bash_profile” and add the following:

export PYENV_ROOT=/usr/local/opt/pyenv  
eval "$(pyenv init -)"

This changes the Pyenv root path and makes sure pyenv is initialized.

$SHELL -l

Continue reading

Installing Pyenv on Mac OSX

When I’m writing code, I’m usually in OSX. When I want to try things out, or check for compatibility between certain versions of Python, it’s handy to have them all accessible… enter Pyenv. Pyenv is based on Rbenv, which for you non-Rubyists is a tools that allows you to set up Ruby environments that are scoped either globally, per-shell or per-folder!