Openstack Magnum DevStack Deployment

Unless you've been living in a cave for the past year, then you've probably heard some of the buzz around microservices, clustering, and how they're going to change computing as we know it. Well, they're absolutely right, but how can you get your hands on it? It seems to be a moving target with so many projects pouring in nearly every day!

Cloud-Init

If you couldn't tell already, Cloud-Init is an Openstack administrator's best friend, and it's what we're using below. So let's cut to the chase and I'll give you the Cloud-Init file. Be sure to check out my GitHub Repository for other examples which you can run either locally or within your own Openstack architecture. I have examples of Atomic, CoreOS, Flannel, Weave, Kubernetes, and now Magnum. I'll keep posting more as I work through each in my own personal time.

And that's it! Again, make sure to follow the instructions in my previous DevStack post.

Full Disclaimer:for those of you who know cloud-init really well, you'll notice [fairly quickly] this isn't exactly the cleanest approach, but this is a work in progress as I learn it. It definitely works as expected, even if I am updating Ubuntu twice!

Results

So now that cloud-init has worked through its process, it's time to get started. Keep in mind, it will take a very long time to complete the entire process. Always look at the logs before logging in to your newly created DevStack host.

IMPORTANT: Let the cloud-init process complete fully before logging in. Check the status of your build-out by going to the log console of your host, as shown below.

You'll want to learn a little bit about Openstack Magnum bay types. We'll be creating a Kubernetes bay type as our first bay type example. Most of this information (nearly all), I am going to take from the great development work and GitHub documentation provided by the Openstack team.

Create a stackrc File
First, log into your newly created DevStack host. Create a file called stackrc in your home directory, and include the following lines:

Removing the Bay
After you're done testing, and you want to remove the bay, use the following command:

[ubuntu@devstack ~(keystone_admin)]$ magnum bay-delete k8sbay

Openstack Console (Horizon)
The best part is reviewing the console. Since this is a heat orchestration stack, that's where we'll find our cluster being built in real-time:

And there you have it! Hopefully that made creating a Magnum cluster a little easier (if you were trying to find something easy, and straight forward). If you're a developer and you see a flaw or have a comment about my article, please feel free to leave comments so I can make this better and more useful to everyone!

This should get you started with The Magnum Openstack project. Have fun stacking!

Credits and References

Please head over to the documentation provided by the Openstack Team for any updates or changes. This project is still heavy in development cycles at the moment and could change at any point, completely making my documentation void (although I'll try to keep up)!

Future Article

Next, I'll document how to use Magnum, as part of my "operations" series. I'm already familiar with some of the underlying components (Bay-Types like Swarm, Kubernetes and Mesos), but Openstack does have their own methods for including each of these.