Home Blog Page 284

Ditching Out-of-Date Documentation Infrastructure

Long ago, the Linux kernel started using 00-Index files to list the contents of each documentation directory. This was intended to explain what each of those files documented. Henrik Austad recently pointed out that those files have been out of date for a very long time and were probably not used by anyone anymore. 

He posted a patch to rip them all unceremoniously out of the kernel.

Jonathan Corbet was more reserved. He felt Henrik should distribute the patch among a wider audience and see if it got any resistance. He added:

I’ve not yet decided whether I think this is a good idea or not. We certainly don’t need those files for stuff that’s in the RST doctree, that’s what the index.rst files are for. But I suspect some people might complain about losing them for the rest of the content. I do get patches from people updating them, so some folks do indeed look at them.

Read more at Linux Journal

How Men and Women Approach Open Source Differently

With open source software becoming more and more a requirement for job searchers, job seekers are finding that it is critical to becoming a part of this community. Many would rather see a GitHub profile than a CV.

But currently, only about 10 percent of open source contributors are women.

For this episode of The New Stack Makers podcast, Dr. Anita Sarma, associate professor of computer science in the Department of Electrical Engineering and Computer Science at Oregon State University, joins us to talk about her recent research on how to increase gender inclusivity in open source.

Her recent research focuses on problem-solving facets in which men and women differ statistically. In her research, she has focused on five ways in which men and women statistically differ in how they problem solve.

Read more at The New Stack

Your First Machine Learning Project in R Step-By-Step

Do you want to do machine learning using R, but you’re having trouble getting started?

In this post you will complete your first machine learning project using R.

In this step-by-step tutorial you will:

  1. Download and install R and get the most useful package for machine learning in R.
  2. Load a dataset and understand it’s structure using statistical summaries and data visualization.
  3. Create 5 machine learning models, pick the best and build confidence that the accuracy is reliable.

If you are a machine learning beginner and looking to finally get started using R, this tutorial was designed for you.

Let’s get started!

The best way to learn machine learning is by designing and completing small projects.

R Can Be Intimidating When Getting Started

R provides a scripting language with an odd syntax. There are also hundreds of packages and thousands of functions to choose from, providing multiple ways to do each task. It can feel overwhelming.

The best way to get started using R for machine learning is to complete a project.

  • It will force you to install and start R (at the very least).
  • It will given you a bird’s eye view of how to step through a small project.
  • It will give you confidence, maybe to go on to your own small projects.

Read more at Machine Learning Mastery

LF Edge: Bringing Complementary Initiatives Together to Advance Emerging Applications at the Edge

Earlier today, we announced the launch of LF Edge, a new umbrella organization designed to establish an open, interoperable framework for edge computing independent of hardware, silicon, cloud, or operating system. The goal is to foster a unified, open framework that brings complementary projects under one central umbrella to create collaborative solutions that are compatible and support the ecosystem.

LF Edge is comprised of five anchor projects, which includes the existing Akraino Edge Stack, EdgeX Foundry, and Open Glossary of Edge Computing, as well as two new projects – Home Edge Project, and Project EVE, with seed code and initial architecture donated by Samsung and ZEDEDA, respectively. (More details on these projects are available on the new LF Edge website.)

Everyone is talking about Edge computing, but what does it really mean?

That is the million dollar question. Here’s how I like to define “Edge computing”: it’s a distributed computing paradigm in which computation is largely or completely performed on distributed device nodes known as “smart devices” or “edge devices,”  with between five and 20 milliseconds of latency (as opposed to primarily taking place in a centralized cloud environment). Edge represents a convergence of technologies that have recently matured or are coming to market, including: 5G, Artificial Intelligence, Deep Learning, Analytics, and Hardware. Related, emerging edge applications and convergence of these technologies are also demanding and fueling lower latency and accelerated processing.

Another way to answer the “what is edge” question is: anything that is non-traditional video,or  anything that is not connected that moves (e.g., drones, cars etc). These emerging technologies are really driving the market.  

All that said, there is a strong market opportunity for edge applications, and this spans industrial, enterprise and consumer use cases in complex environments across multiple edges and domains. Primary examples include industrial manufacturing, energy (oil and gas), retail, homes (including B2B2C use cases), automotive, with interest also from sectors such as  fleet/transportation, logistics, building automation, cities and governments, healthcare, and more.

Another leading use case for edge applications is video. Several months ago, IHS Markit interviewed edge computing thought leaders to discover which applications run on edge, deployment timing, revenue potential and the existing and expected barriers and difficulties of deployment. The survey found that 92 percent of the respondents cited video as the top edge application for edge computing, and that 82 percent of edge traffic will be occupied by video applications by 2020. (More details on this research are available in my blog post from September, 2018.)

LF Edge – Why Now?

The current edge market is heavily fragmented, with multiple proprietary stacks for each public cloud. Every application and hardware manufacturer has to certify for individual cloud platforms such as AWS and Microsoft Azure. The open source market for edge is also currently fragmented, with a proliferation of groups working in silos towards similar goals. By adopting the umbrella formula utilized by other existing LF projects such as CNCF and LF Networking, LF Edge will provide an open framework to address market needs for edge and IoT by combining new and existing stacks and consolidating them into one singular, customizable framework.

Additional benefits LF Edge brings to the ecosystem include the establishment of an edge framework that is independent of hardware, silicon, cloud, or operating system protocol and introduces location and latency differentiation to edge applications. LF Edge is well-positioned to collaborate across standards bodies and consortiums (e.g., IIC, AECC, OEC, TIP) by developing code that complements existing industry specifications. The project will also complement existing ecosystems such as AWS and Azure by introducing standard APIs.  

In sum, LF Edge was established to create a common framework for hardware and software specifications and best practices critical to sustaining current and future generations of IoT and edge devices. This new community-forged organization will will help ensure greater harmonization to accelerate deployment among the rapidly growing number of edge devices slated to exceed 20 billion by 2020.

To learn more about LF Edge, read the press release and visit the new website, www.lfedge.org. You can also follow the project on Twitter at @lf_edge.

Understanding Angle Brackets in Bash

Bash provides many important built-in commands, like ls, cd, and mv, as well as regular tools such as grep, awk, and sed. But, it is equally important to know the punctuation marks — the glue in the shape of dots, commas, brackets. and quotes — that allow you to transform and push data from one place to another. Take angle brackets (< >), for example.

Pushing Around

If you are familiar with other programming and scripting languages, you may have used < and > as logical operators to check in a condition whether one value is larger or smaller than another. If you have ever written HTML, you have used angle brackets to enclose tags.

In shell scripting, you can also use brackets to push data from place to place, for example, to a file:

ls > dir_content.txt

In this example, instead of showing the contents of the directory on the command line, > tells the shell to copy it into a file called dir_content.txt. If dir_content.txt doesn’t exist, Bash will create it for you, but if dir_content.txt already exists and is not empty, you will overwrite whatever it contained, so be careful!

You can avoid overwriting existing content by tacking the new stuff onto the end of the old stuff. For that you use >> (instead of >):

ls $HOME > dir_content.txt; wc -l dir_content.txt >> dir_content.txt

This line stores the list of contents of your home directory into dir_content.txt. You then count the number of lines in dir_content.txt (which gives you the number of items in the directory) with wc -l and you tack that value onto the end of the file.

After running the command line on my machine, this is what my dir_content.txt file looks like:

Applications 
bin 
cloud 
Desktop 
Documents 
Downloads 
Games 
ISOs 
lib 
logs 
Music 
OpenSCAD 
Pictures 
Public 
Templates 
test_dir 
Videos 
17 dir_content.txt

The mnemonic here is to look at > and >> as arrows. In fact, the arrows can point the other way, too. Say you have a file called CBActors containing some names of actors and the number of films by the Coen brothers they have been in. Something like this:

John Goodman 5
John Turturro 3
George Clooney 2
Frances McDormand 6
Steve Buscemi 5
Jon Polito 4
Tony Shalhoub 3
James Gandolfini 1

Something like

sort < CBActors # Do this
Frances McDormand 6 # And you get this
George Clooney 2 
James Gandolfini 1 
John Goodman 5 
John Turturro 3 
Jon Polito 4 
Steve Buscemi 5 
Tony Shalhoub 3

Will sort the list alphabetically. But then again, you don’t need < here since sort already expects a file anyway, so sort CBActors will work just as well.

However, if you need to see who is the Coens’ favorite actor, you can check with :

while read name surname films; do echo $films $name $surname > filmsfirst.txt; done < CBActors

Or, to make that a bit more readable:

while read name surname films; 
 do 
   echo $films $name $surname >> filmsfirst; 
 done < CBActors

Let’s break this down, shall we?

  • the while ...; do ... done structure is a loop. The instructions between do and done are repeatedly executed while a condition is met, in this case…
  • … the read instruction has lines to read. read reads from the standard input and will continue reading until there is nothing more to read…
  • … And as standard input is fed in via < and comes from CBActors, that means the while loop will loop until the last line of CBActors is piped into the loop.
  • Getting back to read for a sec, the tool is clever enough to see that there are three distinct fields separated by spaces on each line of the file. That allows you to put the first field from each line in the name variable, the second in surname and the third in films. This comes in handy later, on the line that says echo $films $name $surname >> filmsfirst;, allowing you to reorder the fields and push them into a file called filmsfirst.

At the end of all that, you have a file called filmsfirst that looks like this:

5 John Goodman 
3 John Turturro 
2 George Clooney 
6 Frances McDormand 
5 Steve Buscemi 
4 Jon Polito 
3 Tony Shalhoub 
1 James Gandolfini

which you can now use with sort:

sort -r filmsfirst

to see who is the Coens’ favorite actor. Yes, it is Frances McDormand. (The -r option reverses the sort, so McDormand ends up on top).

We’ll look at more angles on this topic next time!

Working with the Container Storage Library and Tools in Red Hat Enterprise Linux

How containers are stored on disk is often a mystery to users working with the containers. In this post, we’re going to look at how containers images are stored and some of the tools that you can use to work with those images directly –PodmanSkopeo, and Buildah.

Evolution of Container Image Storage

When I first started working with containers, one of the things I did not like about Docker’s architecture was that the daemon hid the information about the image store within itself. The only realistic way someone could use the images was through the daemon. We were working on theatomic tool and wanted a way to mount the container images so that we could scan them. After all a container image was just a mount point under devicemapper or overlay.

The container runtime team at Red Hat created the atomic mountcommand to mount images under Docker and this was used within atomic scan. The issue here was that the daemon did not know about this so if someone attempted to remove the image while we mounted it, the daemon would get confused. The locking and manipulation had to be done within the daemon. …

Container storage configuration is defined in the storage.conf file. For containers engines that run as root, the storage.conf file is stored in /etc/containers/storage.conf. If you are running rootless with a tool like Podman, then the storage.conf file is stored in $HOME/.config/containers/storage.conf.

Read more at Red Hat blog

High Reliability Infrastructure Migrations

On Tuesday I gave a talk at KubeCon called High Reliability Infrastructure Migrations. The abstract was:

For companies with high availability requirements (99.99% uptime or higher), running new software in production comes with a lot of risks. But it’s possible to make significant infrastructure changes while maintaining the availability your customers expect! I’ll give you a toolbox for derisking migrations and making infrastructure changes with confidence, with examples from our Kubernetes & Envoy experience at Stripe.

Here are a few links & notes about things I mentioned in the talk.

skycfg: write functions, not YAML

I talked about how my team is working on non-YAML interfaces for configuring Kubernetes. The demo is at skycfg.fun, and it’s on GitHub here. It’s based on Starlark, a configuration language that’s a subset of Python.

My coworker John has promised that he’ll write a blog post about it at some point, and I’m hoping that’s coming soon 🙂

no haunted forests

I mentioned a deploy system rewrite we did. John has a great blog post about when rewrites are a good idea and how he approached that rewrite called no haunted forests.

Read more at Julia Evans

Watch all the presentations from KubeCon +CloudNativeCon, including Kelsey Hightower’s keynote.

CoreDNS Joins the Ranks of CNCF Graduates

Created just three years ago and admitted to the Cloud Native Computing Foundation (CNCF) as an incubating project a year later, DNS server CoreDNS has come a long way. Last month, CoreDNS was named the default DNS for Kubernetes and now the CNCF has announced that the project will join the ranks of KubernetesPrometheus, and Envoy as a CNCF graduate — the first of 2019. CoreDNS will graduate just a year shy of its anniversary of becoming an incubating project with CNCF.

The CNCF incubates projects according to a three tier progression of maturity, starting first at the sandbox, then moving on to incubation, and finally graduation. The criteria for graduation include a number of qualifications, such as “committers from at least two organizations,” which signals that a project will not fail if a single individual or company pulls out, but also several more meant to help ensure the future success of the project.

A CNCF statement details the project’s further qualifications, which include not only the basic requirements such as the adoption of the CNCF Code of Conduct, but also various other signals of maturity. 

Read more at The New Stack

Ubuntu Core Slims Down, Offers 10-Year LTS Support

Canonical released Ubuntu Core 18, based on Ubuntu 18.04 LTS, bringing 10-year support to the embedded Linux platform. Other enhancements include a reduced attack surface and easier porting of Ubuntu apps.



Canonical’s stripped-down, container-like Ubuntu Core version of Ubuntu for embedded IoT has reached version 18. The most significant benefit is that the distro is based on Ubuntu 18.04 LTS (Bionic Beaver), which was released in early 2018. The release’s long-term support (LTS) status means Canonical promises to support it for 10 years, improving the chance of warding off malware attacks throughout the product lifespan.

Ubuntu Core, which runs on a variety of devices including Lime SDR boards such as the LimeNET Micro board, is already notable for being one of the more secure embedded Linux distros around. Its “snap” apps are containerized, and it offers transactional updates, among other security features.

In addition to the LTS status, the new release should be even more secure because the already minimalist distro has the smallest footprint yet, fitting into 260MB, according to the ZDNet story that alerted us to the release.

Read more at LinuxGizmos

DHS Issues Security Alert About Recent DNS Hijacking Attacks

The US Department of Homeland Security (DHS) has published today an “emergency directive” that contains guidance in regards to a recent report detailing a wave of DNS hijacking incidents perpetrated out of Iran.

The emergency directive [12] orders government agencies to audit DNS records for unauthorized edits, change passwords, and enable multi-factor authentication for all accounts through which DNS records can be managed.

The DHS documents also urges government IT personnel to monitor Certificate Transparency (CT) logs for newly-issued TLS certificates that have been issued for government domains, but which have not been requested by government workers (a sign that a malicious actor has hijacked a government domain’s DNS records, and is now requesting TLS certificates in its).

Read more at ZDNet