I wanted to learn about writing custom Puppet types and providers. The official documentation is a little sparse, but I finally stumbled upon the following series of articles by Gary Larizza that provide a great deal of insight into the process and a bunch of example code:
Multinode OpenStack with Packstack
I was the presenter for this morning’s RDO hangout, where I ran through a simple demonstration of setting up a multinode OpenStack deployment using packstack.
The slides are online here.
Here’s the video (also available on the event page):
Show OVS external-ids
This is just here as a reminder for me:
An OVS interface has a variety of attributes associated with it, including an
external-id field that can be used to associate resources outside of
OpenVSwitch with the interface. You can view this field with the following
command:
$ ovs-vsctl --columns=name,external-ids list Interface
Which on my system, with a single virtual instance, looks like this:
# ovs-vsctl --columns=name,external-ids list Interface
.
.
.
name : "qvo519d7cc4-75"
external_ids : {attached-mac="fa:16:3e:f7:75:b0", iface-id="519d7cc4-7593-4944-af7b-4056436f2d66", iface-status=active, vm-uuid="0330b084-03db-4d42-a231-2cd6ad89515b"}
.
.
.
Note the information contained here:
Stupid OpenStack Tricks
I work with several different OpenStack installations. I usually work
on the command line, sourcing in an appropriate stackrc with
credentials as necessary, but occasionally I want to use the dashboard
for something.
For all of the deployments with which I work, the keystone endpoint is on the same host as the dashboard. So rather than trying to remember which dashboard url I want for the environment I’m currently using on the command line, I put together this shell script:
Direct access to Nova metadata
When you boot a virtual instance under OpenStack, your instance has access to certain instance metadata via the Nova metadata service, which is canonically available at http://169.254.169.254/.
In an environment running Neutron, a request from your instance must traverse a number of steps:
- From the instance to a router,
- Through a NAT rule in the router namespace,
- To an instance of the neutron-ns-metadata-proxy,
- To the actual Nova metadata service
When there are problem accessing the metadata, it can be helpful to verify that the metadata service itself is configured correctly and returning meaningful information.
RDO Bug Triage
This Wednesday, January 15, at 14:00 UTC (that’s 9AM US/Eastern, or
date -d "14:00 UTC" in your local timezone) I will be helping out
with the
RDO bug triage day. We’ll be trying to validate all the
untriaged bugs opened against RDO.
Feel free to drop by on #rdo and help out or ask questions.
Visualizing Neutron Networking with GraphViz
I’ve put together a few tools to help gather information about your Neutron and network configuration and visualize it in different ways. All of these tools are available as part of my neutron-diag repository on GitHub.
In this post I’m going to look at a tool that will help you visualize the connectivity of network devices on your system.
mk-network-dot
There are a lot of devices involved in your Neutron network configuration. Information originating in one of your instances has two traverse at least seven network devices before seeing the light of day. Understanding how everything connects is critical if you’re trying to debug problems in your envionment.
An introduction to OpenStack Heat
Heat is a template-based orchestration mechanism for use with OpenStack. With Heat, you can deploy collections of resources – networks, servers, storage, and more – all from a single, parameterized template.
In this article I will introduce Heat templates and the heat command
line client.
Writing templates
Because Heat began life as an analog of AWS CloudFormation, it supports the template formats used by the CloudFormation (CFN) tools. It also supports its own native template format, called HOT (“Heat Orchestration Templates”). In this article I will be using the HOT template syntax, which is fully specified on the OpenStack website.
A Python interface to signalfd() using FFI
I just recently learned about the signalfd(2) system call, which was
introduced to the Linux kernel back in 2007:
signalfd() creates a file descriptor that can be used to accept signals targeted at the caller. This provides an alternative to the use of a signal handler or sigwaitinfo(2), and has the advantage that the file descriptor may be monitored by select(2), poll(2), and epoll(7).
The traditional asynchronous delivery mechanism can be tricky to get right, whereas this provides a convenient fd interface that integrates nicely with your existing event-based code.
Long polling with Javascript and Python
In this post I’m going to step through an example web chat system implemented in Python (with Bottle and gevent) that uses long polling to implement a simple publish/subscribe mechanism for efficiently updating connected clients.
My pubsub_example repository on GitHub has a complete project that implements the ideas discussed in this article. This project can be deployed directly on OpenShift if you want to try things out on your own. You can also try it out online at http://pubsub.example.oddbit.com/.