Archive

Category Archives for "Systems"

A Handy CLI Tool for Working with JSON

While I was at Kubecon this past week, one of the presenters showed off a handy CLI tool for working with JSON. It’s called jq, and in this post I’m going to show you a few ways to use jq. For the source of JSON output, I’ll use the OpenStack APIs.

If you’re not familiar with JSON, I suggest having a look at this non-programmer’s introduction to JSON. Also, refer to this article on using cURL to interact with a RESTful API for a bit more background on some of the commands I’m going to use in this post.

Let’s start by getting an authorization token for OpenStack, using the following curl command:

curl -d '{"auth":{"passwordCredentials":
{"username": "admin","password": "secret"},
"tenantName": "customer-A"}}' 
-H "Content-Type: application/json" 
http://192.168.100.100:5000/v2.0/tokens

This will return a pretty fair amount of JSON in the response, and it presents the first opportunity to use jq. Let’s say you only wanted the authorization token, and not all the other output. Simply add the following jq command to the end of your curl request:

curl -d '{"auth":{"passwordCredentials":
{"username": "admin","password": "secret"},
"tenantName": "customer-A"}}' 
-H "Content-Type: application/json" 
http://192.168.100.100:5000/v2.0/tokens | 
 Continue reading

Kubecon Liveblog: Opening Keynote

This is a liveblog of the opening keynote at the inaugural Kubernetes conference, Kubecon, taking place this week at the Palace Hotel in San Francisco. Brendan Burns, Senior Staff Software Engineer at Google, is delivering the opening keynote. Burns is a co-founder of the Kubernetes project.

Burns starts out with a quick review of a bit of Kubernetes history, and reviews the broad diversity of submitters that are participating in the development of Kubernetes. He doesn’t spend much time there, though, and quickly transitions into a “where are we going?” discussion.

He says that Kubernetes wasn’t really about containers, or scheduling; it was really about making reliable, scalable, agile distributed systems a CS101 exercise. Kubernetes is really about making it easier to build distributed systems, to scale distributed systems, to update distributed systems, and to make distributed systems more reliable. Burns demonstrates how Kubernetes makes this easier by showing a recorded demo of scaling Nginx web servers up to handle 1 million requests per second, and then updating the Nginx application while still under load.

After the demo completes, Burns takes a few minutes to break down the architecture behind the demonstration. “Loadbots,” managed by a Kubernetes replication controller, Continue reading

Changing Passwords with cloud-init

Generally speaking, when launching instances in a cloud environment (such as AWS or an OpenStack-based cloud), the preferred/default way of accessing that instance is via SSH using an injected SSH key pair. There are times, though, when—for whatever reason—this approach won’t work. (I’ll describe one such situation below.) In such instances, it’s possible to configure cloud-init, the same tool used to inject SSH keys, to change passwords for user accounts. Here’s how.

Please note that this is a total hack. (Do NOT use this for any sort of production workload!) That being said, sometimes things like this are necessary to complete preliminary evaluations of a new technology, new product, or new architecture. In my case, I had a demo environment (using DevStack) that I needed to get up and running, and the instances would not have any external connectivity. This meant I was limited to console access only—hence, SSH keys are useless. The only means of access would be via password login through the console. So, I found this snippet of cloud-init code:

#cloud-config
chpasswd:
  list: |
    user1:password1
    user2:password2
    user3:password3
  expire: False

For this particular use case, I needed to change the default user on the Ubuntu Continue reading

Docs Spotlight: Tower API Guide

blog-header-docspotlight

As you may already know, Ansible Tower 2.3.0's release offers a bundled installer for Red Hat Enterprise Linux and CentOS systems. This all-in-one installer contains everything you need to get Tower started in one bundle, including the bootstrapping of Ansible for you, if it is not already installed. If Ansible is already installed, ensure that it is the latest stable version before proceeding with your Tower installation.

In addition to other bug fixes and performance improvements, the documentation for the Tower 2.3.0 release also included a few updates.

The biggest update for the Tower Documentation Set hits the Tower API Guide

The REST API in Tower is browsable and simple to use, but you must be logged into your Tower instance to view the endpoints. Now, for the very first time, the Tower API endpoints have been included for easy review. 

For example, the Ping Endpoint, which is fairly simple as an example, includes the following information:

Ping_API_Endpoint

Another feature we are trying out for the Tower 2.3.0 Documentation Set is a new custom search.  At the bottom right of your browser screen, a new "search this site" button appears that scrolls the Continue reading

Automating a Multi-Platform World

Just because your organization has a multi-OS strategy should not automatically increase the complexity of your environment management. Each OS vendor likely drags along its own ecosystem of partners, development platforms, support and capability matrixes, and for the most part, once a system is developed on a particular OS platform, it tends to stay there.

Enter cloud. With growing abstraction of the infrastructure layer, cloud has done a great job of providing enterprise IT organizations with a level of control and flexibility once only available to the most advanced of greenfield deployments.

Even in a cloud-deployed environment, there is still a lot of potential baggage based on your particular cloud vendor, let alone your entire development suite and application platform.  In nearly all cases, once an app is written for a particular platform, it stays on that platform for the entirety of its lifecycle. If your primary cloud vendor doesn’t provide you an easy way to deploy-- in a supported manner-- your preferred application platform, customers face yet another area of complexity. Just like that, you could be stuck with few choices.

This is precisely why the joint Red Hat/Microsoft announcement today is a huge win for customers, and further Continue reading

Your Docker Agenda for November

  DockerCon EU 2015 is definitely a main highlight for Docker events in November, but there are so many other awesome events scheduled this month in Docker communities all over the world and online! From meetups to conference talks, webinars to workshops, … Continued

DockerCon EU 2015: New Innovators

After the great feedback we received from DockerCon 2015 in SF, we decided to extend our New Innovators Showcase to DockerCon EU 2015 in Barcelona! The New Innovators Showcase is designed to highlight small, young startups in the ecosystem, building cool tools … Continued

Calling All Switchers

Are you a switcher? That is, are you someone who has transitioned from one IT discipline to an entirely new IT discipline? Perhaps you were a storage gal for a long time, and now you’ve successfully transitioned into a networking career. Maybe you used to be a Windows admin, and now Linux is your thing. Or perhaps you were a networking guy, and now you’re coding like a madman. If this sounds like you, please read on!

If this describes you—or describes something you’re in the middle of doing—I’d love to talk to you. Please hit me on Twitter (I’m @scott_lowe), or drop me an e-mail (use [email protected], substituting the correct values). I promise it won’t take much of your time, and we can do this via whatever medium makes the most sense: e-mail, telephone, Skype, instant messaging, IRC…you let me know. I’m particularly interested in talking to folks to have made a really dramatic transition, not just moving from being a server administrator to being a virtualization administrator (let’s face it, those two roles are fairly similar).

Thanks, and I look forward to hearing from you soon!

Galaxy Release 1.1.1

We’re back again with a quick update to Galaxy. In the last release we did some cool things to make searching roles much easier. This release is a mini release focused on fixing a few bugs and adding minor enhancements we couldn’t squeeze into the last cycle.

Galaxy issues are tracked publicly at https://github.com/ansible/galaxy-issues. Here are the issues addressed in release 1.1.1:

#88 Role Data Should Show Last Modified Instead of Created Date

#86 `ansible-galaxy -r roles.txt` - Incorrect Example

#84 README.md Fails to Render When it Contains a Variable String Like

#82 "Sign in" Option Should Appear on Home Page Header

#81 Better Filter for RHEL/Centos -> EL in Platform Search

#53 Adding a Role Called "Ansible" Results in Un-named Role

#14 Add Galaxy support for Debian Jessie

#9 Periods in Role Names Cause Installs to Fail

Fuzzy Searching

As part of fixing issue #81, Better Filter for RHEL/Centos -> EL in Platform Search, we changed the way the new role filtering works. A lot of times you know what you’re looking for, and don’t want to wait for autocomplete suggestions. For example, you might be looking for a Platform value of ‘centos’. Typing Continue reading

OpenStack Kolla: Dependency Management Done Right With Docker and Ansible

Openstack-Tokyo

Kolla provides production-ready containers and deployment tools for operating OpenStack clouds that are scalable, fast, reliable, and upgradable, using community best practices.  Kolla entered the OpenStack Big Tent during the Liberty cycle by submitting Kolla to OpenStack technical committee oversight --  enabling the Kolla project and its contributors to have access to community resources such as marketing, technical resources, bi-yearly conference space and voting rights in the OpenStack Technical Committee election.

During the creation of the Kolla mission statement, we agreed as a community not to permit the selection of technology choices in our mission statement. Still: we knew we would choose Docker as our container runtime technology, and Ansible as our orchestration system. We made these choices not only because “that’s what all the cool kids are doing’ -- but also because they solve real technical problems for our problem domain.  Docker solves our image management process and Ansible solves our multi-node deployment process.  We could have chosen other technologies to solve these problems, but both Docker and Ansible do something orders of magnitude better than competitors: a complete and absolute focus on simplicity coupled with a high degree of capability.

Since a fundamental factor in outcome of Continue reading