Home Blog Page 839

Ansible: Reboot server in play-book and wait for it come back.

Ansible is a great and simple configuration management and orchestration tool. Some times we require to reboot server and do some tasks once reboot is done. Today I came across such requirement where I have to upgrade our production Ubuntu server from 10.04 to 14.04. I figured some how on unattended upgrades by using following command.

do-release-upgrade -f DistUpgradeViewNonInteractive

The above command will not ask any question when upgrade is happening. The issue is we can not upgrade directly from 10.04 to 14.04. We have to do it in two folds

Ubuntu 10.04 to 12.04

and then

Ubuntu 12.04 to 14.04

But the issue is we have to reboot the machine once upgraded to 12.04. For this Ansible have a solution withwait_for and local_action modules. Below is the snippet from my role which include three task

Task 1: Upgrading Ubuntu 10.04 to 12.04

Task 2: Restart remote machine

Task 3: Wait for the restart of remote machine to complete and continue with other tasks.

- name: Task1 Upgrading 10.04 to 12.04
  shell: do-release-upgrade -f DistUpgradeViewNonInteractive- name: Task2 restart machine after 10.04 to 12.04 upgrade
  shell: reboot
  async: 0
  poll: 0
- name: Task3 waiting for server to come back after 10.04 to 12.04
  local_action: wait_for host={{ ansible_ssh_host }} state=started

Task1 is slef explanatory which use shell module to upgrade the OS. Task two uses shell module to reboot the machine and task three use local_action which will be done one the host where Ansible is running this play book and wait_for will wait for something to happen. Here we are waiting for remote host to come on-line.

Other options you may include are

 port –On which port Ansible can check on remote machine once the “timeout” is completed

delay –Dont check it for number of seconds

timeout –Wait for something to happen on remote machine

connect_timeout — maximum number of seconds to wait for a connection to happen before closing and retrying

The third task can be written as below.

 local_action: wait_for host={{ ansible_ssh_host }}                         state=started                         port=22                         delay=30                         timeout=300                         connect_timeout=15

Wait on Ansible host for 300 seconds to check if host started or not. Once host is started wait for 30 seconds to check for 22 port is open or not and timeout that ssh connection after 15 seconds.

Some may use inventory_hostname instead of ansible_ssh_host variable to poll host identity. If you want to check on both variables you can use or operator and make one variable a default one as shown below.

Read Full Post: http://www.linuxnix.com/ansible-reboot-server-in-play-book-and-wait-for-it-come-back/

Stali Distribution Smashes Assumptions about Linux

Stali, which is built with statically linked binaries for speed and compactness, upends traditional ideas about how a Linux distribution should work. 

The first public version of Stali, a Linux distribution built to be as fast and small as possible, has been released after several years of work. This first release of the entire Stali OS fits into a 34MB ISO. Stali stands for static Linux, with “static” referring to how all binaries in the distribution are built statically against their libraries. Any routines in the library required by the binary are copied directly into the binary itself, instead of being linked to a shared copy of the library used by multiple programs. 

Read more at InfoWorld

So Your Router Is Skynet – A Layman’s Guide

By now, most of you are aware that TP-Link has decided to ban (custom) open-source firmware for their devices. So what was TP-Link thinking when they turned their backs on flashing routers with custom firmware? Some might suggest it’s the ambiguity in the new FCC rules that put a now much disliked router vendor over the edge. Unfortunately, the truth of the matter has nothing to do with TP-Link. No, the networking device company was merely a diversion for what I’m about to share with you. (Read the rest)

Get the Latest on SDN & NFV, Watch the Open Networking Summit 2016 Recap

Open Networking Summit 2016 was packed with four days of keynotes, plenary sessions, conference tracks and mini-summits covering the hottest topics facing SDN, NFV and open networking today.

https://www.youtube.com/watch?v=lpJTXg8rRwM

Couldn’t it make it to the live event? View the 20+ keynotes and plenary sessions below, or fill out the form to access ALL 175+ video recordings, including talks across the developer, business, use cases / solutions and technology tracks. Also recorded were the mini-summits for OpenDaylight, ONOS and CORD.

Watch Keynote + Plenary Videos Free Below

Launching and Managing a New MongoDB Instance in OpenStack

This article will discuss launching and managing a new MongoDB instance using the Tesora Database as a Service Platform, which is based on OpenStack Trove. It’s designed to run on OpenStack, with the goal of allowing users to quickly and easily use the native features of a database without the burden of handling complex administrative tasks. Cloud users and database administrators can provision and manage multiple database instances as needed.

Step 1: First you will need to have Guest Images for each datastore and version. These images are loaded to OpenStack Glance (where virtual machine images are stored) and registered with Trove. Some guest images for development and testing are available for download from OpenStack at http://tarballs.openstack.org/trove/images/ubuntu. If you’re looking for more information, check out this article, Building a database guest image for OpenStack Trove.

Step 2: Next, using the Tesora DBaaS platform dashboard, log in as the admin user then select the “Datastores” tab. To create a new instance, simply click on the “Launch Instance” button which triggers a screen where you name the instance, then pick the flavor (the kind of machine or the virtual machine), the database instance size and type of database. Finally, click the “Launch” button and the instance is created.

Step 3: Next, click on “Create Database”, type in the name and you have your new MongoDB database. To create a user, click on the “Users” tab and then “Create User”. Type in the user name and password, then allow the user access by clicking on the pulldown to the far right and select “Manage Access”. On the next screen, click on “Grant Access” and you’re done.

Now that the database has been created, let’s look at how to manage your MongoDB instances.

Step 4: Go to the MongoDB database instance and select “Create Backup” on the far right. Type in the name and click on the “Backup” button to complete the process.

Step 5: Finally, let’s look at how to create a new instance from an existing backup. Click on “Launch Instance” and type in a new name, the flavor and volume as you did before but this time click on the “Advanced” tab. In the bottom box, choose the “Backup Name” you just created then click the “Launch” button.

It’s also possible to set up a configuration group where you have access to all of the parameters of the database.

Step 6: Start by choosing “Configuration Groups” from the menu and then select “Create Configuration Group”. Next, name the group, for example, “mongoconfig”. Now you’ll want to select “Add Parameter” and you’ll see a list of MongoDB parameters. You can define values for each. Once done, click on “Apply Changes” to save the configuration group.

Step 7: Here is how to apply the configuration group to another database instance. Select “Instances” then use the “Actions” pulldown on one of the database instances to select [FD1] [GR2] “Attach Configuration Group”. Select the group that you just created and choose “Attach Configuration”. This adds the configuration group to that database instance. To complete this, you will be prompted to click on “Restart Instance”.

You can see how easy it is to launch new MongoDB instances and manage those with the Tesora DBaaS platform — database as a service based on OpenStack Trove. We’ve created this “Configuring & Managing MongoDB Instances: Creating Database Instances” video demonstration so you can see for yourself.

Parsix GNU/Linux 8.10 Is One of the First Distros with the GNOME 3.20 Desktop

parsix-gnu-linux-8-10We were the first to report a few of days ago that the Debian-based Parsix GNU/Linux 8.10 operating system is launching later this year with the GNOME 3.20 desktop environment and Linux kernel 4.4 LTS. And now the time has come for us to take the first test release of the upcoming Parsix GNU/Linux distro for a test drive, as its developers have just announced earlier today, the availability for download of Parsix GNU/Linux 8.10 TEST-0.

Dubbed Erik and powered by the Debian GNU/Linux 8 “Jessie” repos, Parsix GNU/Linux 8.10 ships with the recently announced, stable GNOME 3.20 desktop environment, as well as an updated kernel based on the upstream long-term supported Linux 4.1 branch, patched with TuxOnIce 3.3 and BFS.

Mageia 6 Finally Sees Its First Development Release

It’s been a while since last having anything to report on the Mandrake/Mandriva-derived Mageia Linux distribution while this weekend they finally managed to put together their first development release of Mageia 6.

Mageia 6 Development Snapshot 1, which was originally supposed to released back in 2015, has finally made it out onto the mirrors. The entire Mageia 6 release schedule has been in a hiatus due to this belated Dev1 ISO. 

Read more at Phoronix

Google Launches the Android Experiments I/O Challenge for Open-Source App Developers

Google is launching the Android Experiments I/O Challenge today in an effort to bring more interesting open-source apps to its Android Experiments showcase.

The three winners of the challenge, which will run until April 13, will get a trip to this year’s Google I/O developer conference. The five runners-up will get Nexus 6Ps (which, in turn, makes me think Google’s I/O giveaway this year will be a Nexus 6P).

In the world of mobile apps, open source isn’t quite as prevalent as in other areas of software development. Projects like this are at least partly about bringing more open-source mobile apps onto the platform so new developers can take this code and learn from it.

Read more at TechCrunch

Linus Torvalds Announces First Linux Kernel 4.6 RC Build, Introduces OrangeFS

linus-torvalds-announcesNow that everyone is enjoying Linux kernel 4.5, though the reality is that we haven’t seen any production operating system using it until today, the time has come for early adopters to take Linux kernel 4.6 for a test drive.

Yes, you’re reading it right, the merge window for Linux kernel 4.6 is now closed, and Linus Torvalds announced just a few minutes ago (March 26) the release and immediate availability for download and testing of the first Release Candidate (RC) milestone. You might have also noticed that the Release Candidate arrived a day earlier than the expected Sunday launch, but that’s only because Linus Torvalds needs to prepare for some upcoming travel, but also because the Linux kernel 4.6 merge window proves to be the biggest one in a while.

Shifter – Containers in HPC Environments [Video]

“Containers wrap up software with all its dependencies in packages that can be executed anywhere. This can be specially useful in HPC environments where, often, getting the right combination of software tools to build applications is a daunting task. However, typical container solutions such as Docker are not a perfect fit for HPC environments. Instead, Shifter is a better fit as it has been built from the ground up with HPC in mind. In this talk, we show you what Shifter is and how to leverage from the current Docker environment to run your ap- plications with Shifter.”

Shifter is a prototype implementation that NERSC is developing as a way of deploying containers in an HPC environment. 

Read more at insideHPC