Home Blog Page 694

Legends of Linux Part 1: Linus Torvalds

BERLIN: AS PART of our visit to LinuxCon this week we’re going to ask five key players in the Linux story the same 10 questions to get an idea of where Linux has been, where it is and where it’s going.

And who better to start with than Linus Torvalds, the often outspoken creator of Linux itself. Torvalds isn’t actually attending the celebrations this year, but was kind enough to chat to the INQUIRER by email.

What’s your first memory of Linux?
It’s really hard to say, mainly because it’s hard to pinpoint when the project became ‘Linux’. Trying to just figure out how the boot sequence worked took me ages. OK, realistically several weeks.

Read more at Inquirer

Kubernetes 1.4 Improves Container Security

The latest release of the open-source container orchestration technology adds new security features, including TLS bootstrap.

The open-source Kubernetes 1.4 release, which debuted Sept. 26, provides users with a host of enhanced security capabilities for container deployment and orchestration.

Kubernetes originated at Google and is now part of the Cloud Native Computing Foundation, benefiting from the contributions of multiple vendors.

Among the new features in Kubernetes 1.4 is TLS bootstrap, which is designed to improve the use of encryption for data in motion across a cluster. TLS (Transport Layer Security) is widely used on the internet today for encryption.

Read more at eWeek

 

Reinforcement Learning in R: An Introduction to Dynamic Programming

Reinforcement Learning is an approach to learning that attempts to maximize a cumulative reward based on a set of actions and states. The techniques are very popular within operations research and control theory. It does not fall under the traditional paradigms of supervised or unsupervised learning because correct inputs/outputs are never provided. The algorithm is instead presented with some notion of doing well or poorly at each step.

There are several different methods for optimizing a reinforcement learning problem; I will be focusing on Dynamic Programming. Dynamic programming (or DP) is a powerful optimization technique that consists of breaking a problem down into smaller sub-problems, where the sub-problems are not independent . This is useful both in mathematics (especially fields like economics and operations research) and computer science …

Read more at 126Kr.com

Linux Kernel 4.8 Officially Released, Merge Window for Kernel 4.9 Now Open

Today, October 2, 2016, Linus Torvalds proudly announced the release and availability for download of the Linux 4.8 kernel branch, which is now the latest stable and most advanced one.

Linux kernel 4.8 has been in development for the past two months, during which it received no less than eight Release Candidate (RC) testing versions that early adopters were able to compile and install on their GNU/Linux operating system to test various hardware components or simply report bugs. That’s right, the Linux 4.8 kernel series was one of those special ones that received that eighth Release Candidate.

A lot of things have been fixes since last week’s RC8 milestone, among which we can mention lots of updated drivers, in particular for GPU, networking, and Non-Volatile Dual In-line Memory Module (NVDIMM),…

Read more at Softpedia

 

Systemd Bug Allows Ordinary User to Crash Linux Systems

The systemd project is yet to release a fix for a bug that was disclosed on 28 September but at least one GNU/Linux distribution has patched the same.

The bug, allowing a user to crash a system by using a short command as an ordinary user, was disclosed by a developer named Andrew Ayer.

After running this command, according to Ayer, “You can no longer start and stop daemons. inetd-style services no longer accept connections. You cannot cleanly reboot the system. The system feels generally unstable (e.g. ssh and su hang for 30 seconds since systemd is now integrated with the login system).”

Read more at ITWire

Cloudera, Hortonworks, and Uber to Keynote at Apache Big Data and ApacheCon Europe

Leading open source technologists from Cloudera, Hortonworks, Uber, Red Hat, and more are set to speak at Apache: Big Data and ApacheCon Europe, taking place Nov. 14-18 in Seville, Spain. The Linux Foundation today announced keynote speakers and sessions for the co-located events.

Apache: Big Data Europe, Nov. 14-16, gathers the Apache projects, people, and technologies working in Big Data, ubiquitous computing and data engineering, and science to educate, collaborate, and connect in a completely project-neutral environment; it is the only event that brings together the full suite of Big Data open source projects including Apache Hadoop, Cassandra, CouchDB, Spark, and more.

The event will feature more than 100 sessions covering the issues, technologies, techniques, and best practices that are shaping the data ecosystem across a wide range of industries including finance, business, manufacturing, government and academia, media, energy, and retail.

Keynote speakers at Apache: Big Data include:

  • Mayank Bansal, Senior Engineer, Big Data, Uber

  • Stephan Ewan, CTO, Data Artisans

  • Alan Gates, Co-Founder, Hortonworks

  • John Mertic, Director, Program Management, ODPi

  • Sean Owen, Director of Data Science, Cloudera

View the full Apache Big Data schedule.

Registration for Apache: Big Data Europe is discounted to $499 through October 3. Register Now! Those interested in also attending ApacheCon can add that to their Apache: Big Data registration for only $399. Diversity and needs-based scholarship applications are also being accepted. Apply now for a scholarship.

ApacheCon

ApacheCon, Nov. 16-18, is the annual conference of The Apache Software Foundation and brings together the Apache and open source community to learn about and collaborate on the technologies and projects driving the future of open source, web technologies and cloud computing.

The event will contain tracks and mini-summits dedicated to specific Apache projects organized by their respective communities. In addition, ApacheCon Europe will host complimentary tracks, including Apache Incubator/Innovation, Future of Web, and Community, as well as hackathons, lightning talks, and BarCampApache.

Session highlights include:

  • Building a Container Solution on Top of Apache CloudStack – Paul Angus, VP Technology & Cloud Architect, ShapeBlue

  • Practical Trademark Law For FOSS Projects – Shane Curcuru, VP Brand Management, The Apache Software Foundation

  • Building Inclusive Communities – Jan Lehnardt, Vice President, Apache CouchDB

  • Building Apache HTTP Server; from Development to Deployment – William Rowe, Jr., Staff Engineer, Pivotal

  • If You Build It, They Won’t Come – Ruth Suehle, Community Marketing Manager, Red Hat

View the full lineup of ApacheCon sessions.

Registration for ApacheCon is discounted to $499 through Oct. 3. Register Now! Or Apply for diversity and needs-based scholarships. Those interested in also attending Apache: Big Data can add on that event for an additional $399.
 

This Week in Open Source News: Hyperledger Plays Key Role in IBM Revenue, Open Source Industry Standards Debate, & More

This week in open source and Linux news, IBM’s CEO explains the importance of blockchain at SWIFT’s Sibos conference, and more! Get up to speed with this handy, weekly digest: 

1) IBM CEO says blockchain initiatives, like The Linux Foundation’s Hyperledger Project, play a “key role” in the company’s revenue.

IBM’s Ginni Rometty Tells Bankers Not To Rest On Their Digital Laurels– Forbes

2) “The problem with open source standards aren’t that they’re boring; it’s that they’re largely the same as the proprietary standards that preceded them.” writes Matt Asay.

Open source is Not to Blame For a Lack of Industry Standards– TechRepublic

3) The Linux Foundation’s new OpenStack MOOC is offered for free via edX.

The Linux Foundation and edX Roll Out a Free OpenStack Course– OStatic

4) “The Linux Foundation’s OPNFV project claims its third platform release targets accelerating development of NFV apps and services.”

OPNFV Colorado Platform Bolsters Open Source NFV Efforts– RCRWireless

5) Linux Foundation sysadmin weighs in on why the system needs a “total rethink.”

Unsafe at Any Clock Speed: Linux Kernel Security Needs a Rethink

How to Effectively and Efficiently Edit Configuration Files in Linux

Every Linux administrator has to eventually (and manually) edit a configuration file. Whether you are setting up a web server, configuring a service to connect to a database, tweaking a bash script, or troubleshooting a network connection, you cannot avoid a dive deep into the heart of one or more configuration files. To some, the prospect of manually editing configuration files is akin to a nightmare. Wading through what seems like countless lines of options and comments can put you on the fast track for hair and sanity loss.

Which, of course, isn’t true. In fact, most Linux administrators enjoy a good debugging or configuration challenge. Sifting through the minutiae of how a server or software functions is a great way to pass time. But this process doesn’t have to be an exercise in ineffective inefficiency. In fact, tools are available to you that go a very long way to make the editing of config files much, much easier. I’m going to introduce you to a few such tools, to ease some of the burden of your Linux admin duties. I’ll first discuss the command-line tools that are invaluable to the task of making configuration more efficient.

Let’s begin.

diff

If you’ve never used the diff command, you don’t know what you’re missing. The gist of diff is simple: It compares one file against another and displays the differences. Let me explain.
Say you have two files. File1 has the contents:

<Directory “/var/www”>

     AllowOverride None

     Require all granted

</Directory>

File2 has the contents:

<Directory “/var/www/html”>

     AllowOverride None

    Require all granted

</Directory>

If that’s all those two files contained, it would really simple to open them up and see the diff. But what if those lines of code were buried within thousands of other lines and interspersed with comments and other options? All of a sudden, that task becomes a bit more daunting.

Thanks to diff, we can find these differences easily. If we open up a terminal and issue the command diff File1 File2, we’ll see the output clearly displaying the differences (Figure 1).

Figure 1: The diff command outputting the variances between File1 and File2.

What you want to look for are the letters a, c, and d, where:

  • a means something was added

  • c means something was changed

  • d means something was deleted

In this example, you see 1c1, which means line 1 was changed in the second file.

The diff output is a bit cumbersome because it was actually intended to be read by the system, not humans. The intention of diff is to show what would need to be done to the files to put them in sync with one another. What is important in the output, however, is that it will only output the lines which are different. In our example, everything in the file is identical except for the first lines, where you have /var/www in one and /var/www/html in the other. Using diff makes it incredibly easy to find out the differences between two configuration files. Of course, diff is much more complex than that, but understanding this very fundamental usage of the tool will help you tremendously when comparing two files.

If we change File2 to reflect:

<Directory “/var/www/html”>
    AllowOverride all
</Directory>

The output of diff would then a bit more complex. For that, we might want to run diff -c File1 File2. The c option prints the output in context format, which makes it much easier to read (Figure 2).

Figure 2: More complex diff output which has been made easier to understand with the c option.

Here we see diff reporting that lines 1 and 4 in File1 and lines 1 and 3 in File2 do not match. You can now make those changes.

grep

The grep command should be one of the first tools you learn as a Linux administrator. Without it, you will find yourself searching for the proverbial needle in a haystack, especially when digging around more extensive configuration files. Say, for instance, you want to disable the EnableSendfile in your CentOS Apache configuration. You could open up the /etc/httpd/httpd.conf and then scroll through until you see the entry, or you could issue the command grep -n EnableSendfile /etc/httpd/conf/httpd.conf.

What grep does is print lines matching a pattern. It’s that simple. However, if you add the -n option, grep will also print the line number for which the pattern can be found. In our example, grep outputs that EnableSendfile is found on lines 340, 346, and 349 (Figure 3).

Figure 3: Using grep to locate an option in a configuration file.

 

If you happen to use a text editor, such as nano, you can open up the /etc/httpd/conf/httpd.conf file, scroll down a bit and hit Ctrl-c to report what line number the cursor is on. Keep scrolling until you find the line you need to edit. You can also open up the file with nano, using the -c option, to display the current line number (without having to hit the key combination — Figure 4).

Figure 4: Nano displaying the line number.

The grep command is incredibly powerful. Make sure to view the man page (man grep) to learn everything you can about this helpful tool.

Find a good GUI

Some people would rather spend their time with a GUI tool than the command line. Although I highly recommend you fully understand how to work with the command line, there are instances where a GUI can go a long way to make this process easier. Take, for instance, the Gedit text editor. With this GNOME-friendly editor, you can set syntax highlighting on the fly to easily suit the configuration file you’re working with.

Suppose you open up /etc/httpd/conf/httpd.conf in Gedit. Because this particular file is just a basic text file, Gedit will open it set on Plain Text (in other words, no syntax highlighting). You can switch that from the drop-down in the bottom toolbar and select the type of syntax highlighting you want. If you switch it to PHP, anything that could be viewed as a PHP element will be highlighted (Figure 5).

Figure 5: Adding syntax highlighting for easier configuration.

There are plenty of solid editors out there that will aid you in making cumbersome configurations a bit easier. Start with the tool included with your desktop and see if it will do the trick. If not, open up your package manager and see if you can find one that might fit your needs (such as Sublime Text, Geany, or Leafpad).

Don’t let it overwhelm you

With just a few simple tools, you can make the process of editing Linux configuration files quite easy. Start out with these three tools and build from there. Eventually you’ll have a toolkit so powerful, you’ll be editing config files like a pro. And don’t forget to RTFM!

Want to learn more about managing your configuration files? Check out the Essentials of System Administration course from The Linux Foundation.

 

Why Good Linux Sysadmins Use Markdown

The Markdown markup language is perfect for writing system administrator documentation: it is lightweight, versatile, and easy to learn, so you spend your time writing instead of fighting with formatting.

The life of a Linux system administrator is complex and varied, and you know that documenting your work is a big time-saver. A documentation web server shared by you and your colleagues is a wonderful productivity tool. Most of us know simple HTML, and can whack up a web page as easily as writing plain text. But using Markdown is better.

Markdown is designed for writing text articles for the web, a writing tool rather than a publishing tool. Markdown files are designed to be easy to read, with a minimum of tag clutter, and with tags that flow naturally with your text. Blockquotes look like quotes, lists look like lists, and I think everyone is familiar with using *asterisks* for emphasis.

My favorite Markdown feature is its handling of special characters: there aren’t any. You don’t have to worry about using HTML special character codes for left angle braces and ampersands, which exist to make life difficult for people who write for the web, and a special nightmare when you’re trying to write a web document to teach HTML.

If Markdown is missing some HTML formatting that you want, no worries, just use the HTML tags right in your Markdown document.

Markdown Quickstart

Check out this example Markdown document:

# A Nice H1 Heading

## A Nice H2 Heading

### H3… Get it? This goes up to H6.

Paragraphs are easy! Just start typing, then separate them with a blank line. No muss, no fuss.

Who uses Markdown? Students, teachers, scientists, GitHub, Stackoverflow, Drupal, WordPress, Doxygen… It is supported in many programming languages, including Python, Perl, JavaScript, Haskell, Awk, C, C++, and many more.

Several Markdown extensions support advanced formatting, so if you want all kinds of fancy tables, image management, math equations, and multiple output document formats check out [PHP Markdown Extra](https://michelf.ca/projects/php-markdown/extra/) and [MultiMarkdown](http://fletcherpenney.net/multimarkdown/). See the nice way of creating hyperlinks? No hassling with wrapping multiple tags for a single link.

> Blockquotes are paragraphs that start with an angle brace.
>
>> Go wild and make nested blockquotes.
>
> Then return to your first level.

> You can create a multiple-line blockquote with a single angle brace, and then load it up with as much text as you want, being all verbose and windy and everything.

> Or, use hard line breaks and
> start every line with an angle
> brace for more formatting
> control in your Markdown file.
> This won’t affect your HTML conversion.

Making bulleted lists is so easy you will weep with happiness. Unordered bulleted lists use hyphens, plus signs, or asterisks, whatever your whim desires. After conversion to HTML you get nice bullets no matter which one you used:

* You can
– even mix
+ them up.

Numbered lists use numbers followed by periods:

1. Like this
2. Numbered
3. List

List items can span multiple lines. The easy way is to not worry about identation:

* If you’re still reading this and thinking “Oh gosh, I know that keeping a sysadmin notebook is a good idea, but I never have time! And nobody will ever use it anyway, not even me!”

* I fear you are sadly mistaken. Tis true that many bosses are sadly impressed by drama and emergencies, rather than calm, smoothly running systems. It is also true that keeping everything in your head is faster than consulting documentation.

Or you can use indentation and line breaks, although when you convert to HTML it looks the same as without indentation and line breaks. But it’s more readable in your source Markdown file:

* But relying on memory becomes chancier
  as your systems become more complicated,
  and your memory is no good to anyone else
  if you’re not there.

* I think that being indispensable is a
  bad idea if you ever want any time off.

Wrapping words with *single asterisks* make italics, and **double asterisks** make bold. My favorite Markdown feature is not having to hassle with pairs of tags as much as in HTML. Mostly you just tag ’em once and move on. Paragraphs need no tags at all, which is glorious.

Easily Test It Yourself

You can quickly test an HTML conversion by copying the above example document into a plain text editor, and name it with an .md extension, for example “testmarkdown.md”. Then convert it to HTML with Python:

$ python -m markdown testmarkdown.md > testmarkdown.html

Open it in a web browser and behold! A simple, nicely formatted web page.

There are many converters and Markdown extensions. Start with John Gruber’s Markdown documentation, because as one of the inventors of Markdown he ought to know a thing or two about it. Then to find information about extensions and Markdown implementations with expanded features, try a Wikipedia search.

Then be a good sysadmin and start writing things down.

To learn more, check out the Essentials of System Administration course from The Linux Foundation.

The Rise of the Helpful Operational Bots: ChatOps

Over the last number of years, the idea of a conversational interface to technology has entered the mainstream conscience. As is often the case, many of the ideas that get neatly packaged up into consumer facing technology have been knocking around for a long time, and conversational interfaces are no different. For the rise of conversational bots, we need to step back a little and think about bots in general, and in particular their most common manifestation in technology teams – that of ChatOps.

While some of the concepts surrounding ChatOps has been around for a long time, it is fair to say that the idea only really began to get traction within technical communities when Jesse Newland gave a talk on ChatOps at Github during  PuppetConf 2012. Since 2012 we have seen a growth in interest in the new use of bots within operations.

Read more at Red Monk