Home Blog Page 303

Linux IoT Landscape: Distributions

Linux is an Operating System: the program at the heart of controlling a computer. It decides how to partition the available resources (CPU, memory, disk, network) between all of the other programs vying for it. The operating system, while very important, isn’t useful on its own. Its purpose is to manage the  compute  resources for other programs. Without these other programs, the Operating System doesn’t serve much of a purpose.

A distribution provides a large number of other programs that, together with Linux, can be assembled into working sets for a vast number of purposes. These programs can range from basic program writing tools such as compilers and linkers to communications libraries to spreadsheets and editors to pretty much everything in between. A distribution tends to have a superset of what’s actually used for each individual computer or solution. It also provides many choices for each category of software components that users or companies can assemble into what they consider a working set. A rough analogy can be made to a supermarket in which there are many options for many items on the shelves, and each user picks and chooses what makes sense to them in their cart.

Read more at IoTForAll

Got a Screwdriver? GalliumOS Can Turn Chromebooks Into Linux Boxes

GalliumOS is a Chromebook-specific Linux variant. It lets you put a real Linux distro on a Chromebook.

My recent review of a new Chromebook feature — the ability to run Linux apps on some Chromebook models — sparked my interest in other technologies that run complete Linux distros on some Chromebooks without using ChromeOS.

GalliumOS is not a perfect solution. It requires making a physical adjustment inside the hardware and flashing new firmware before the GalliumOS installation ISO will boot. However, it can be a handy workaround if your Chromebook does not support Linux apps and/or Android apps.

If you follow directions explicitly and can wield a screwdriver to remove the bottom panel, GalliumOS is an ingenious Linux distro that can give you the best of two computing worlds.

Read more at LinuxInsider

Must-Have Tools for Writers on the Linux Platform

I’ve been a writer for more than 20 years. I’ve written thousands of articles and how-tos on various technical topics and have penned more than 40 works of fiction. So, the written word is not only important to me, it’s familiar to the point of being second nature. And through those two decades (and counting) I’ve done nearly all my work on the Linux platform. I must confess, during those early years it wasn’t always easy. Formats didn’t always mesh with what an editor required and, in some cases, the open source platform simply didn’t have the necessary tools required to get the job done.

That was then, this is now.

A perfect storm of Linux evolution and web-based tools have made it such that any writer can get the job done (and done well) on Linux. But what tools will you need? You might be surprised to find out that, in some instances, the job cannot be efficiently done with 100% open source tools. Even with that caveat, the job can be done. Let’s take a look at the tools I’ve been using as both a tech writer and author of fiction. I’m going to outline this by way of my writing process for both nonfiction and fiction (as the process is different and requires specific tools).

A word of warning to seriously hard-core Linux users. A long time ago, I gave up on using tools like LaTeX and DocBook for my writing. Why? Because, for me, the focus must be on the content, not the process. When you’re facing deadlines, efficiency must take precedent.

Nonfiction

We’ll start with nonfiction, as that process is the simpler of the two. For writing technical how-tos, I collaborate with different editors and, in some cases, have to copy/paste content into a CMS. But like with my fiction, the process always starts with Google Drive. This is the point at which many open source purists will check out. Fear not, you can always opt to either keep all of your files locally, or use a more open-friendly cloud service (such as Zoho or nextCloud).

Why start on the cloud? Over the years, I’ve found I need to be able to access that content from anywhere at any time. The simplest solution was to migrate the cloud. I’ve also become paranoid about losing work. To that end, I make use of a tool like Insync to keep my Google Drive in sync with my desktop. With that desktop sync in place, I know there’s always a backup of my work, in case something should go awry with Google Drive.

For those clients with whom I must enter content into a Content Management System (CMS), the process ends there. I can copy/paste directly from a Google Doc into the CMS and be done with it. Of course, with technical content, there are always screenshots involved. For that, I use Gimp, which makes taking screenshots simple:

Figure 1: Taking a screenshot with Gimp.

  1. Open Gimp.

  2. Click File > Create > Screenshot.

  3. Select from a single window, the entire screen, or a region to grab (Figure 1).

  4. Click Snap.

The majority of my clients tend to prefer I work with Google Docs, because I can share folders so that they have reliable access to the content. There are a few clients I have that do not work with Google Docs, and so I must download the files into a format that can be used. What I do for this is download in .odt format, open the document in LibreOffice (Figure 2), format as needed, save in a format required by the client, and send the document on.

Figure 2: My Google Doc download opened in LibreOffice.

And that, is the end of the line for nonfiction.

Fiction

This is where it gets a bit more complicated. The beginning steps are the same, as I always write every first draft of a novel in Google Docs. Once that is complete, I then download the file to my Linux desktop, open the file in LibreOffice, format as necessary, and then save as a file type supported by my editor (unfortunately, that means .docx).

The next step in the process gets a bit dicey. My editor prefers to use comments over track changes (as it makes it easier for both of us to read the document as we make changes). Because of this, a 60k word doc can include hundreds upon hundreds of comments, which slows LibreOffice to a useless crawl. Once upon a time, you could up the memory used for documents, but as of LibreOffice 6, that is no longer possible. This means any larger, novel-length, document with numerous comments will become unusable. Because of that, I’ve had to take drastic measures and use WPS Office (Figure 3). Although this isn’t an open source solution, WPS Office does a fine job with numerous comments in a document, so there’s no need to deal with the frustration that is LibreOffice (when working with these large files with hundreds of comments).

Figure 3: WPS handles numerous comments with ease.

Once my editor and I finish up the edits for the book (and all comments have been removed), I can then open the file in LibreOffice for final formatting. When the formatting is complete, I save the file in .html format and then open the file in Calibre for exporting the file to .mobi and .epub formats.

Calibre is a must-have for anyone looking to publish on Amazon, Barnes & Noble, Smashwords, or other platforms. One thing Calibre does better than other, similar, solutions is enable you to directly edit the .epub files (Figure 4). For the likes of Smashword, this is an absolute necessity (as the export process will add elements not accepted on the Smashwords conversion tool).

Figure 4: Editing an epub file directly in Calibre.

After the writing process is over (or sometimes while waiting for an editor to complete a pass), I’ll start working on the cover for the book. That task is handled completely in Gimp (Figure 5).

Figure 5: Creating the cover of POTUS in Gimp.

And that finishes up the process of creating a work of fiction on the Linux platform. Because of the length of the documents, and how some editors work, it can get a bit more complicated than the process of creating nonfiction, but it’s far from challenging. In fact, creating fiction on Linux is just as simple (and more reliable) than other platforms.

HTH

I hope this helps aspiring writers to have the confidence to write on the Linux platform. There are plenty of other tools available to use, but the ones I have listed here have served me quite well over the years. And although I do make use of a couple of proprietary tools, as long as they keep working well on Linux, I’m okay with that.

Learn more about Linux in the Introduction to Open Source Development, Git, and Linux (LFD201) training course from The Linux Foundation, and sign up now to start your open source journey.

Who Is Running My Kubernetes Pod? The Past, Present, and Future of Container Runtimes

In the Linux operating system world, container technology has existed for quite some time, reaching back over a decade to the initial ideas around separate namespaces for file systems and processes. At some point in the more recent past, LXC was born and became the common way for users on Linux to access this powerful isolation technology hidden within the Linux kernel. 

Even with LXC masking some of the complexity of assembling the various technology underpinnings of what we now commonly call a “container”, containers still seemed like a bit of wizardry, and other than niche uses for those versed in this art of containers, it was not broadly used by the masses. 

Docker changed all this in 2014 with the arrival of new, developer-friendly packaging of this same Linux kernel technology that powered LXC—in fact, early versions of Docker used LXC behind the scenes – and containers truly came to the masses as developers were drawn to the simplicity and re-use of Docker’s container images and simple runtime commands.

Read more at InfoQ

How to Partition and Format a Drive on Linux

On most computer systems, Linux or otherwise, when you plug a USB thumb drive in, you’re alerted that the drive exists. If the drive is already partitioned and formatted to your liking, you just need your computer to list the drive somewhere in your file manager window or on your desktop. It’s a simple requirement and one that the computer generally fulfills.

Sometimes, however, a drive isn’t set up the way you want. For those times, you need to know how to find and prepare a storage device connected to your machine.

What are block devices?

A hard drive is generically referred to as a “block device” because hard drives read and write data in fixed-size blocks. This differentiates a hard drive from anything else you might plug into your computer, like a printer, gamepad, microphone, or camera. The easy way to list the block devices attached to your Linux system is to use the lsblk (list block devices) command:

Read more at OpenSource.com

How to Move Files Using Linux Commands or File Managers

Learn how to move files with Linux commands in this tutorial from our archives.

There are certain tasks that are done so often, users take for granted just how simple they are. But then, you migrate to a new platform and those same simple tasks begin to require a small portion of your brain’s power to complete. One such task is moving files from one location to another. Sure, it’s most often considered one of the more rudimentary actions to be done on a computer. When you move to the Linux platform, however, you may find yourself asking “Now, how do I move files?”

If you’re familiar with Linux, you know there are always many routes to the same success. Moving files is no exception. You can opt for the power of the command line or the simplicity of the GUI – either way, you will get those files moved.

Let’s examine just how you can move those files about. First we’ll examine the command line.

Command line moving

One of the issues so many users, new to Linux, face is the idea of having to use the command line. It can be somewhat daunting at first. Although modern Linux interfaces can help to ensure you rarely have to use this “old school” tool, there is a great deal of power you would be missing if you ignored it all together. The command for moving files is a perfect illustration of this.

The command to move files is mv. It’s very simple and one of the first commands you will learn on the platform. Instead of just listing out the syntax and the usual switches for the command – and then allowing you to do the rest – let’s walk through how you can make use of this tool.

The mv command does one thing – it moves a file from one location to another. This can be somewhat misleading, because mv is also used to rename files. How? Simple. Here’s an example. Say you have the file testfile in /home/jack/ and you want to rename it to testfile2 (while keeping it in the same location). To do this, you would use the mv command like so:

mv /home/jack/testfile /home/jack/testfile2

or, if you’re already within /home/jack:

mv testfile testfile2

The above commands would move /home/jack/testfile to /home/jack/testfile2 – effectively renaming the file. But what if you simply wanted to move the file? Say you want to keep your home directory (in this case /home/jack) free from stray files. You could move that testfile into /home/jack/Documents with the command:

mv /home/jack/testfile /home/jack/Documents/

With the above command, you have relocated the file into a new location, while retaining the original file name.

What if you have a number of files you want to move? Luckily, you don’t have to issue the mv command for every file. You can use wildcards to help you out. Here’s an example:

You have a number of .mp3 files in your ~/Downloads directory (~/ – is an easy way to represent your home directory – in our earlier example, that would be /home/jack/) and you want them in ~/Music. You could quickly move them with a single command, like so:

mv ~/Downloads/*.mp3 ~/Music/

That command would move every file that ended in .mp3 from the Downloads directory, and move them into the Music directory.

Should you want to move a file into the parent directory of the current working directory, there’s an easy way to do that. Say you have the file testfile located in ~/Downloads and you want it in your home directory. If you are currently in the ~/Downloads directory, you can move it up one folder (to ~/) like so:

mv testfile ../

The “../” means to move the folder up one level. If you’re buried deeper, say ~/Downloads/today/, you can still easily move that file with:

mv testfile ../../

Just remember, each “../” represents one level up.

As you can see, moving files from the command line, isn’t difficult at all.

GUI

There are a lot of GUIs available for the Linux platform. On top of that, there are a lot of file managers you can use. The most popular file managers are Nautilus (GNOME) and Dolphin (KDE). Both are very powerful and flexible. I want to illustrate how files are moved using the Nautilus file manager (on the Ubuntu 13.10 distribution, with Unity as the interface).

Nautilus has probably the most efficient means of moving files about. Here’s how it’s done:

  1. Open up the Nautilus file manager.

  2. Locate the file you want to move and right-click said file.

  3. From the pop-up menu (Figure 1) select the “Move To” option.

  4. When the Select Destination window opens, navigate to the new location for the file.

  5. Once you’ve located the destination folder, click Select.

Nautilus screenshot

This context menu also allows you to copy the file to a new location, move the file to the Trash, and more.

If you’re more of a drag and drop kind of person, fear not – Nautilus is ready to serve. Let’s say you have a file in your home directory and you want to drag it to Documents. By default, Nautilus will have a few bookmarks in the left pane of the window. You can drag the file into the Document bookmark without having to open a second Nautilus window. Simply click, hold, and drag the file from the main viewing pane to the Documents bookmark.

If, however, the destination for that file is not listed in your bookmarks (or doesn’t appear in the current main viewing pane), you’ll need to open up a second Nautilus window. Side by side, you can then drag the file from the source folder in the original window to the the destination folder in the second window.

If you need to move multiple files, you’re still in luck. Similar to nearly every modern user interface, you can do multi-select of files by holding down the Ctrl button as you click each file. After you have selected each file (Figure 2), you can either right-click one of the selected files and the choose the Move To option, or just drag and drop them into a new location.

nautilus

The selected files (in this case, folders) will each be highlighted.

Moving files on the Linux desktop is incredibly easy. Either with the command line or your desktop of choice, you have numerous routes to success – all of which are user-friendly and quick to master.

Blockchain as a Catalyst for Good

Blockchain and its ability to “embed trust” can help elevate trust, which right now, is low, according to Sally Eaves, a chief technology officer and strategic advisor to the Forbes Technology Council, speaking at The Linux Foundation’s Open FinTech Forum in New York City.

People’s trust in business, media, government and non-government organizations (NGOs) is at a 17-year low, and businesses are suffering as a result, Eaves said.

Additionally, Eaves said, 87 percent of millennials believe business success should be measured in more than just financial performance. People want jobs with real meaning and purpose, she added.

To provide further context, Eaves noted the following urgent global challenges:

  • 1.5 billion people cannot prove their identity (which has massive implications in not just banking but education as well)
  • 2 billion people worldwide do not have a bank account or access to a financial institution
  • Identity fraud is estimated to cost the UK millions of euros annually.

Read more at The Linux Foundation

Slurm Job Scheduling System

In previous articles, I examined some fundamental tools for HPC systems, including pdsh (parallel shells), Lmod environment modules, and shared storage with NFS and SSHFS. One remaining, virtually indispensable tool is a job scheduler.

One of the most critical pieces of software on a shared cluster is the resource manager, commonly called a job scheduler, which allows users to share the system in a very efficient and cost-effective way. The idea is fairly simple: Users write small scripts, commonly called “jobs,” that define what they want to run and the required resources, which they then submit to the resource manager. When the resources are available, the resource manager executes the job script on behalf of the user. Typically this approach is for batch jobs (i.e., jobs that are not interactive), but it can also be used for interactive jobs, for which the resource manager gives you a shell prompt to the node that is running your job.

Some resource managers are commercially supported and some are open source, either with or without a support option. The list of candidates is fairly long, but the one I talk about in this article is Slurm. …The SLUM architecture is very similar to other job schedulers. Each node in the cluster has a daemon running, which in this case is named slurmd. The resources are referred to as nodes. The daemons can communicate in a hierarchical fashion that accommodates fault tolerance. On the Slurm master node, the daemon is slurmctld, which also has failover capability.

Read more at ADMIN magazine

gRPC Load Balancing on Kubernetes without Tears

Many new gRPC users are surprised to find that Kubernetes’s default load balancing often doesn’t work out of the box with gRPC. For example, here’s what happens when you take a simple gRPC Node.js microservices app and deploy it on Kubernetes:

While the voting service displayed here has several pods, it’s clear from Kubernetes’s CPU graphs that only one of the pods is actually doing any work—because only one of the pods is receiving any traffic. Why?

In this blog post, we describe why this happens, and how you can easily fix it by adding gRPC load balancing to any Kubernetes app with Linkerd, a CNCF service mesh and service sidecar.

Read more at Kubernetes Blog

How LF Energy Plans to Open Source Energy

We’re running out of time to tackle climate change. Could an open source, distributed approach build the necessary momentum? Executive director of LF Energy tells Techworld about the new initiative which already has some enterprises on board.

The prospects from the UN’s most recent climate report are bleak. There are less than two decades until the point of no return for the planet’s climate, and the leaders of major countries seem to be retracting political willingness to fix the existential threat.

But, the roadblocks might not be as daunting as they first appear. Shuli Goodman, executive director of the newly created LF Energy group, hopes to fundamentally transform the way energy is distributed, reduce waste, and build new models that could be scaled out with an open source framework.

Read more at TechWorld