Home Blog Page 458

Secrets of Writing Good Documentation

Taylor Barnett, a Community Engineer at Keen IO, says practice and constant iteration are key to writing good documentation.  At the upcoming API Strategy & Practice Conference 2017, Oct. 31 -Nov. 2 in Portland, OR, Barnett will explain the different types of docs and describe some best practices.

In her talk — Things I Wish People Told Me About Writing Docs — Barnett will look at how people consume documentation and discuss tools and tactics to enable other team members to write documentation.  Barnett explains more in this edited interview.

The Linux Foundation: What led you to this talk? Have you encountered projects with bad documentation?

Taylor Barnett: For the last year, my teammate, Maggie Jan, and I have been leading work to improve the developer content and documentation experience at Keen IO. It’s no secret that developers love excellent documentation, but many API companies aren’t always equipped with the resources to make that happen. 

Read more at The Linux Foundation

How to Rethink Project Management for DevOps

As DevOps boosts your organization’s agility, how does the project manager role need to change? Explore this expert advice.

As DevOps culture spreads, however, so does its impact on other areas of the organization. Take project management: DevOps fundamentally changes how IT teams approach projects, shifting away from monolithic, multi-month (or multi-year, in some cases) initiatives in pursuit of greater speed and agility in the software development lifecycle. That means changes for project managers, too.

But make no mistake: Project managers can still be valuable in the DevOps age.

“A need for speed and velocity – and cutting-edge DevOps technologies and processes – does not replace the need for knowing what you’re going to do with them,” says Josh Collins, technology architect at Janeiro Digital. “A strong project management practice is required in order to keep projects moving on schedule with a clear focus on dependencies.”

Read more at Enterprisers Project

Microsoft Launches Brigade: An Event-Driven Scripting Tool for Kubernetes

To this end, Microsoft has been populating the container space with open source tools that make containerized workloads faster to adopt, easier to use — and, increasingly, reliably automated. So far, 2017 has seen Microsoft acquire Deis, which developed Helm. Helm is a package manager to install and manage the lifecycle of Kubernetes applications, as well as an efficient tool for finding, using and sharing K8s tools and software. The company also introduced Draft, a tool for streamlining application development and deployment by monitoring the live-code, pre-commit “inner loop” of the developer’s workflow to detect the application language and write a simple Dockerfile and Helm chart into the source tree.

Now the same team has introduced Brigade, a framework for scripting together workflow tasks to be executed inside of containers. The Kubernetes-native tool allows devs to build an ordered workflow of K8s containers in any magnitude, from one to multitudes, that then idles while listening for arbitrary trigger events. When triggered, Brigade comes charging in.  …

Containers to the left of them, Containers to the right of them, boldly they ride and well…

Read more at The New Stack

Calculating IPv6 Subnets in Linux

We’re going to look at some IPv6 calculators, sipcalc and subnetcalc, and some tricks for subnetting without breaking our brains. Let’s start with reviewing IPv6 address types. There are three types: unicast, multicast, and anycast.

IPv6 Unicast

The unicast address is a single address identifying a single interface. In other words, what we usually think of as our host address. There are three types of unicast addresses:

  • Global unicast are unique publicly routable addresses. These are controlled by the Internet Assigned Numbers Authority (IANA), just like IPv4 addresses. These are the address blocks you get from your Internet service provider. These are in the 2000::/3 range, minus a few exceptions listed in the table at the above link.
  • Link-local addresses use the fe80::/10 address block and are similar to the private address classes in IPv4 (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16). Some major differences are link-local addresses are not routable, but are confined to a single network segment. They are automatically derived from the MAC address of the network interface; this is not a guarantee that all of them are unique, but your odds are pretty good that they are. The IPv6 protocol requires that every network interface is automatically assigned a link-local address.
  • Special addresses are loopback addresses, IPv4-address mapped spaces, and 6-to-4 addresses for crossing from an IPv4 network to an IPv6 network.

Multicast

Multicast in IPv6 is similar to the old IPv4 broadcast: a packet sent to a multicast address is delivered to every interface in a group. The IPv6 difference is that only hosts who are members of the multicast group receive the multicast packets, rather than all reachable hosts. IPv6 multicast is routable, and routers will not forward multicast packets unless there are members of the multicast groups to forward the packets to. Remember IPv4 broadcast storms? They’re much less likely to occur with IPv6. Multicast relies on UDP rather than TCP, so it is used for multimedia streaming, such as efficiently streaming the video feed from a single IP camera to multiple hosts. See IPv6 Multicast Address Space Registry for complete information.

Anycast

An anycast address is a single unicast address assigned to multiple nodes, and packets are received by the first available node. It is a cool mechanism to provide both load-balancing and automatic failover without a lot of hassle. There is no special anycast addressing scheme; all you do is assign the same address to multiple nodes. The root name servers use anycast addressing.

IPv6 Subnet Calculators

What I really really want is an IPv6 equivalent for ipcalc, which calculates multiple IPv4 subnets with ease. I have not found one.

There are other helpful tools for IPv6. ipv6calc performs all manner of useful queries and address manipulation. It does not include a subnet calculator, but it does tell you the subnet and host portions of an address:

$ ipv6calc -qi 2001:0db8:0000:0055:0000:0000:0000:0100
Address type: unicast, global-unicast, productive, iid, iid-local
Registry for address: reserved(RFC3849#4)
Address type has SLA: 0055
Interface identifier: 0000:0000:0000:0100

SLA stands for Site Level Aggregation, which means subnet. If you change 0055 to 0056 then you have a new subnet. The interface identifier is the portion that identifies a single network interface. Think of an IPv6 address as having three parts: the network address, which is the same for every node on your network, and the subnet and host addresses, which you control. (Network nerds use all kinds of cool terminology to say these things, but I prefer the simplified version.)

|---network---|  |subnet|  |---------host-------|
2001:0db8:0000    :0055     :0000:0000:0000:0100

IPv6 addresses are in hexadecimal, which is the 16 characters 0-9 and a-f. So, within the subnet and host blocks, you can use any numbers from 0000 to ffff. So even if you count on your fingers this isn’t too hard to figure out.

Having calculators helps check your work. (Free tip to documentation writers and anyone who wants to be helpful: examples of both correct and incorrect output are fabulously useful.) There are two IPv6 calculators that I use. subnetcalc is actively maintained, while sipcalc is not, though the maintainers accept patches and bugfixes. They work similarly, and present information in slightly different ways. Sometimes all you need is a different viewpoint.

Let’s say your ISP gives you 2001:db8:abcd::0/64. How many addresses is that?

$ subnetcalc 2001:db8:abcd::0/64
Address       = 2001:db8:abcd::
                   2001 = 00100000 00000001
                   0db8 = 00001101 10111000
                   abcd = 10101011 11001101
                   0000 = 00000000 00000000
                   0000 = 00000000 00000000
                   0000 = 00000000 00000000
                   0000 = 00000000 00000000
                   0000 = 00000000 00000000
Network       = 2001:db8:abcd:: / 64
Netmask       = ffff:ffff:ffff:ffff::
Wildcard Mask = ::ffff:ffff:ffff:ffff
Hosts Bits    = 64
Max. Hosts    = 18446744073709551616   (2^64 - 1)
Host Range    = { 2001:db8:abcd::1 - 2001:db8:abcd:0:ffff:ffff:ffff:ffff }
Properties    =
   - 2001:db8:abcd:: is a NETWORK address
[...]

18,446,744,073,709,551,616 addresses is probably enough. The Wildcard Mask shows the bits that define your host addresses. But maybe you want to divide this up a bit. There are 128 bits in an IPv6 address (8 quads x 16 bits), so let’s plug that into subnetcalc and see what happens:

$ subnetcalc 2001:db8:abcd::0/128
[...]
Network       = 2001:db8:abcd:: / 128
Netmask       = ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff
Wildcard Mask = ::
Hosts Bits    = 0
Max. Hosts    = 0   (2^0 - 1)
Host Range    = { 2001:db8:abcd::1 - 2001:db8:abcd:: }

Zero hosts? That doesn’t sound good. sipcalc shows the same thing in a different way:

$ sipcalc 2001:db8:abcd::0/128
-[ipv6 : 2001:db8:abcd::0/128] - 0

[IPV6 INFO]
Expanded Address        - 2001:0db8:abcd:0000:0000:0000:0000:0000
Compressed address      - 2001:db8:abcd::
Subnet prefix (masked)  - 2001:db8:abcd:0:0:0:0:0/128
Address ID (masked)     - 0:0:0:0:0:0:0:0/128
Prefix address          - ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff
Prefix length           - 128
Address type            - Aggregatable Global Unicast Addresses
Network range           - 2001:0db8:abcd:0000:0000:0000:0000:0000 -
                          2001:0db8:abcd:0000:0000:0000:0000:0000

So we want something between /64 and /128.

$ subnetcalc 2001:db8:abcd::0/86 -n
Address       = 2001:db8:abcd::
                   2001 = 00100000 00000001
                   0db8 = 00001101 10111000
                   abcd = 10101011 11001101
                   0000 = 00000000 00000000
                   0000 = 00000000 00000000
                   0000 = 00000000 00000000
                   0000 = 00000000 00000000
                   0000 = 00000000 00000000
Network       = 2001:db8:abcd:: / 86
Netmask       = ffff:ffff:ffff:ffff:ffff:fc00::
Wildcard Mask = ::3ff:ffff:ffff
Hosts Bits    = 42
Max. Hosts    = 4398046511103   (2^42 - 1)
Host Range    = { 2001:db8:abcd::1 - 2001:db8:abcd::3ff:ffff:ffff }
Properties    =
   - 2001:db8:abcd:: is a NETWORK address

The -n option disables DNS lookups. We’re getting closer:

$ subnetcalc 2001:db8:abcd::0/120 -n
Address       = 2001:db8:abcd::
                   2001 = 00100000 00000001
                   0db8 = 00001101 10111000
                   abcd = 10101011 11001101
                   0000 = 00000000 00000000
                   0000 = 00000000 00000000
                   0000 = 00000000 00000000
                   0000 = 00000000 00000000
                   0000 = 00000000 00000000
Network       = 2001:db8:abcd:: / 120
Netmask       = ffff:ffff:ffff:ffff:ffff:ffff:ffff:ff00
Wildcard Mask = ::ff
Hosts Bits    = 8
Max. Hosts    = 255   (2^8 - 1)
Host Range    = { 2001:db8:abcd::1 - 2001:db8:abcd::ff }
Properties    =
   - 2001:db8:abcd:: is a NETWORK address

255 hosts works for me. So, while this isn’t quite as easy as ipcalc spelling out multiple subnets at once, it’s still useful. You might want to copy the Range blocks/IPv6 table and keep it close as a handy reference. It prints out the complete 2000::/3 range in a nice table, and also explains the math.

Next week, we’ll learn about networking in KVM, and using virtual machines to quickly and easily test various networking scenarios.

Learn more about Linux through the free “Introduction to Linux” course from The Linux Foundation and edX.

Linus Torvalds Announces the Sixth Release Candidate of Linux Kernel 4.14 LTS

With a one-day delay, the sixth Release Candidate (RC) of the upcoming Linux 4.14 LTS kernel arrived for public testers, announced by Linus Torvalds himself.

The delay happened because Linus Torvalds had some Internet problems, and this made the Linux kernel 4.14 RC6 milestone a bit bigger than expected. This translates to the fact that it’s no longer clear if the next long-term supported kernel series will arrive on time, on November 5, 2017, or if it will get delayed with one week.

Read more at Softpedia

Running Linux on a Chromebook

Although Chrome OS is competent at handling web-based workloads, by design it’s light on features compared to a full desktop operating system, which is presumably where many of its users are coming from. Fortunately, if you’re on Google’s operating system and wish it was a little more flexible, it’s possible to install a fully functional copy of Linux on many Chrome devices.

Options range from running a Live USB drive outside of Chrome OS to installing a firmware mod for a traditional dual-boot configuration. And of course, you can also overwrite Google’s OS in favor of Linux. However, these routes are less practical than simply running Linux in the background of Chrome OS on a separate USB drive/SD card, which is what we’ll be focusing on here.

Read more at TechSpot

But I Don’t Know What a Container Is

What, then, is a container? Well, I come from a virtualization—hypervisor and virtual machine (VM)—background, and, in my mind, containers are both very much like and very much unlike VMs. I realize that this may not sound very helpful, but let me explain.

How is a container like a VM?

The main way in which a container is like a VM is that it’s a unit of execution. You bundle something up—an image—which you can then run on a suitably equipped host platform. Like a VM, it’s a workload on a host, and like a VM, it runs at the mercy of that host. Beyond providing workloads with the resources they need to do their job (CPU cycles, networking, storage access, etc.), the host has a couple of jobs that it needs to do:

  1. Protect workloads from each other, and make sure that a malicious, compromised, or poorly written workload cannot affect the operation of any others.
  2. Protect itself (the host) from workloads, and make sure that a malicious, compromised, or poorly written workload cannot affect the operation of the host.

Read more at OpenSource.com

Should You Open Source Your Product? That’s the Wrong Question

I often get called in to help companies make decisions about their open source strategy. They want to release key parts of their software as open source, but they need some help figuring out the best way to make it happen. I always ask them the same question:

Why? Why are you planning to open any of your code?

They rarely have a good answer. They’ve already decided that this is the right decision, because a board member, founder, or customer has said it’s necessary, and they are just trying to figure out how to do it. But it’s impossible to build a strategy to accomplish your goals if you’re unsure what they are.

Read more at Medium

Kubernetes: A Pod’s Life

As you might have guessed, the title of this blog is a reference to the 1998 Pixar movie A Bug’s Life and indeed, there are many parallels between a worker ant and a pod in Kubernetes. In the following, we’ll have a closer look at the entire pod lifecycle here from a practitioners point-of-view, including ways how you can influence the start-up and shut-down behavior and good practices around application health-checking.

No matter if you create a pod manually or, preferably through a supervisor such as a deployment, a daemon set or a stateful set, the pod can be in one of the following phases:

  • Pending: The API Server has created a pod resource and stored it in etcd, but the pod has not been scheduled yet, nor have container images been pulled from the registry.

Read more at OpenShift

Platform-as-a-Service: The Key to Running a Continuous Deployment Pipeline

“As developers, we want to be spending time creating and pushing features, we do not want to have to worry about platforms and talking to operations. [It’s all about] getting feedback and getting those features in the hands of users,” he said.

“We want to deploy apps down a pipeline [and we] need PaaS to build a platform to deploy microservices,” he said. “The only way to effectively manage high-risk platforms is continuous deployment.”

Reasons Not to Build Your Own PaaS

Dodd offered a lot of excuses that teams make up to build their own PaaS that, in the end, really slow down business and that tie releases to the few “superheroes” on a team. All this collapses as soon as there are changes on your team or infrastructure. Building your own customized PaaS creates the following challenges:

Read more at The New Stack