Index ¦ Archives ¦ Atom

Testing cloud-init with Vagrant

cloud-init is a standard tool in most cloud computing environments as it's an easy way to provide configuration for provisioning server instances. You provide a YAML config file and it'll use the data to configure the server as needed.

Testing cloud-init in a public can be a bit ...


Automating Ansible groups with Vagrant

Vagrant is a great tool for creating development environments and testing deployment scripts, especially with Ansible. Testing an Ansible playbook is can be as simple as vagrant up.

The problem

Ansible uses an inventory file to define the SSH details for each server, what groups a server belongs to - which ...


Upgrading packages in all Python virtual environments

If you're working with a lot of Python virtual environments in a wide variety of projects, over time you'll end up with outdated packages in some of the older ones - potentially missing out on new features.

For most of the packages you'll want to keep them at ...


Speed up Django static files

For a fairly easy performance win, and for something which makes dealing with old cached CSS something a thing of the past - enable ManifestStaticFilesStorage.

First of all you'll need to edit settings.py:

# Use manifest static storage
STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.ManifestStaticFilesStorage'

Then you'll need to edit ...


Be careful with Django's .create_or_update()!

Although using Model.objects.create_or_update() with a Django model is extremely convenient, sometimes you might want to consider using it carefully with certain usage patterns.

Excessive Postgres WAL files

To allow point-in-time recovery (PITR), I usually setup Barman. Set it up on a remote server, get your Postgres instance to ...

© Alex Tomkins.