Home Blog Page 646

Are you a Dragon Slayer? Take the Developer Nation Survey to Find Out

The Linux Foundation is proud to support this year’s State of the Developer Nation Survey run by our friends at VisionMobile. This is the 12th developer survey, focusing on a 360 view of developer tools, skills, and salaries.

Take the survey now!

The survey features questions on topics like programming languages, platforms, app categories, new technologies, revenue models, IoT verticals — and of course — tools. It’s a survey made by developers, so the questions will be relevant, plus you will get to learn something new. It only takes 15 minutes!

Once you complete the survey, you’ll get to find out what kind of character you’d be in a fantasy world, based on your responses: A mage? A fighter? A dragon slayer? Take the survey and find out!

Participants can win prizes including a MeccaNoid G15 KS, an Apple Watch Series 2, an Oculus Rift headset, a Pixel Phone, Udemy courses, and more.

VisionMobile will show you how your responses compare to other developers’ in your country. You’ll also be the first to receive the State of the Developer Nation report (due out February 2017) based on key survey findings.

Key findings from last year’s survey include:

  • 47 percent of professional developers now consider Android their primary platform.

  • Developers that primarily target Linux or Mac OS on the desktop are extremely unlikely to use C# on the server. Just 2 percent of Linux-first developers and 3 percent of those who prefer macOS are primarily using C# for their backend.

  • Smart Home is not just the biggest IoT vertical in terms of developer interest, with 48% targeting it, but also the fastest growing – up 6 percentage points in the last year.

Take the survey now! The last day to submit your response is Dec. 23, 2016.

Kubernetes 1.5 Brings Container Management to Windows

New release of open-source Kubernetes container orchestration system adds initial support for Microsoft Windows Server and previews beta stateful application capabilities.
The open-source Kubernetes container management system is moving forward with the release of Kubernetes 1.5 on December 15, bringing the platform to Microsoft Windows Server for the first time. The Kubernetes 1.5 milestone is the last major release of Kubernetes in 2016 and follows the 1.4 release that debuted on September 26.

The Kubernetes project is part of the Linux Foundation’s Cloud Native Computing Foundation (CNCF), and is supported by multiple vendors that are building and contributing code.

Read more at eWeek

Three Serious Linux Kernel Security Holes Patched

It’s time to patch your Linux servers and PCs again. The good news is developers are looking very closely at Linux’s core code for possible security holes. The bad news is they’re finding them.

At least the best news is that they’re fixing them as soon as they’re uncovered.

The latest three kernel vulnerabilities are designated CVE-2016-8655CVE-2016-6480, and CVE-2016-6828. Of these, CVE-2016-8655 is the worst of the bunch. It enables local users, which can include remote users with virtual and cloud-based Linux instances, to crash the system or run arbitrary code as root.

Read more at ZDNet

The Wrong Tool for the Job Ruins DevOps on Cloud Plans

Selecting DevOps tools to support cloud applications requires planning and expertise around the app architecture and the deployment model — one provider, hybrid or multicloud — supporting it.

Complexity created during application deployment translates into increased costs and disruptive errors in production operations. The primary goal of the modern DevOps model has always been to automate deployment and operations lifecycle management for applications, thereby shrinking complexity and its ill effects….

DevOps tools unite very different constituencies, a change which creates technical divergence and organizational tension. Many development personnel think DevOps hinders control of applications; many operations staffers think DevOps gives developers too much influence over live production IT.

Read more at TechTarget

SELinux, Seccomp, Falco, and You: A Technical Discussion

One of the questions we often get when we talk about Sysdig Falco is “How does it compare to other tools like SELinux, AppArmor, Auditd, etc. that also have security policies?” To help answer some of those questions, we thought we’d present a summary of other related security products and how they compare to Sysdig Falco.

Specifically, we’ll look at the following tools:

  • Basic sandboxing: seccomp
  • Sandboxing with policies: seccomp-bpf
  • Mandatory access control systems: SELinux, AppArmor
  • System auditing: Auditd
  • Behavioral monitoring: Falco

Read more at Sysdig

Containers in Production – Is Security a Barrier? A Dataset from Anchore

Over the last week we have had the opportunity to work with an interesting set of data collected by Anchore (full disclosure: Anchore is a RedMonk client). Anchore collected this data by means of a user survey ran in conjunction with DevOps.com. While the number of respondents is relatively small, at 338, there are some interesting questions asked, and a number of data points which support wider trends we are seeing around container usage. With any data set of this nature, it is important to state that survey results strictly reflect the members of the DevOps.com community.

The data set covered a number areas including container usage and plans, orchestration tools, operating system choices, CI tools and security. For this post we will be focusing on the data around containers and CI.

Read more at RedMonk

Ask John Willis Your DevOps Questions in this Free Webinar Series

One of the core tenets of DevOps is learning and sharing, said John Willis, co-author of the DevOps Handbook in an interview on Linux.com. “Individuals who are passionate about the health and performance of their organization find these patterns personally fulfilling,” he said.

Willis, who has been a leader in the DevOps movement from the beginning, will share his insights in an upcoming “Introduction to DevOps” webinar series hosted by The Linux Foundation. According to Willis, a primary advantage of DevOps is that it can help organizations go faster while being more reliable. And organizations that deploy faster and deliver services more quickly are better at resolving issues.

In this multi-webinar series which starts next week, Willis will help guide participants through the free Introduction to DevOps: Transforming and Improving Operations training course, which is available from edX.org. In each webinar, Willis — the course author — will provide a quick chapter summary, leaving plenty of time to answer your questions.

Join us Tuesday, December 13, 2016 at 10:00 a.m. Pacific for the first webinar session in which Willis provides a brief overview of the complete course, explaining the topics to be covered and describing the rationale for the course.

Sign up for the webinar now!

This Week in Open Source News: Hyperledger’s Growth Surges, OSS Networking Pro Joins The Linux Foundation & More

This week in Linux and OSS news, The Linux Foundation’s Hyperledger Project continues to grow rapidly as its membership hits 100, Arpit Joshipura comes aboard The Linux Foundation’s staff as an OSS networking specialist, and more! Read up on the latest industry news with this weekly digest

1) The blockchain project continues to grow at an unprecedented speed.

Linux Foundation’s Blockchain Collective Hyperledger Hits 100 Members– Blockchain News

2) Arpit Joshipura, veteran tech exec who has worked at Dell, Ericsson and Nortel joins The Linux Foundation.

Linux Foundation Adds an Open Source Networking Specialist to the Team– NetworkWorld

3) A new Google program aimed at continuously fuzzing open source software has already detected over 150 bugs.

Google Debuts Continuous Fuzzer for Open Source Software– ThreatPost

4) AMD is bringing FreeSync support to Linux

AMD strengthens gaming and VR on Linux with graphics improvements– PC World

5) Bryan Lunduke makes his annual open source predictions for the upcoming year.

7 Linux Predictions for 2017– NetworkWorld

Create a Fully Automated Light and Music Show for the Holidays: Part 3

This tutorial series shows how to build  a fully automated holiday music and light show using a Raspberry Pi, a Micro SD card, and a few other inexpensive parts. Previously, we covered the basics of what you need for this project and showed how to set up your Raspberry Pi. In Part 2, I showed how to connect the components for the light show, and in this final part, we’ll put it all together with music.

Create your holiday playlist

Lightshow Pi supports a text based playlist to play a list of songs automatically. Let’s create a folder called ‘christmas’ inside /home/pi/lightshowpi/music:

cd lightshowpi/music

mkdir christmas

On your local music, move all the music that you want to copy to Raspberry Pi in a directory so that you can keep it synced with Pi and manage it easily. On my system, I created a local directory called ‘best_christmas’ where I kept all my Christmas music. Then, you can rsync all songs from the local directory to the christmas directory of your Pi. Open a new terminal window on the local machine and run the rsync command.

Here is an example where I am syncing music from the ‘best_christmas’ folder on my local machine with ‘christmas’ folder on the Pi.

rsync -avzP --delete /home/swapnil/Music/best_christmas/* pi@10.0.0.33:/home/pi/lightshowpi/music/christmas/

Once the command has run successfully, check on the Pi that music has been transferred:

ls /home/pi/lightshowpi/music/christmas

You will see all the songs there. Now we need to create a playlist of all these songs so that we can automate the playback.

python lightshowpi/tools/playlist_generator.py

The command will ask you to provide it with path of the music folder. In my case it was:

/home/pi/lightshowpi/music/christmas/

Once the playlist is successfully created, verify it:

cat /home/pi/lightshowpi/music/christmas/.playlist

Now it’s time to edit the config file to inform it about the new playlist:

nano /home/pi/lightshowpi/config/defaults.cfg

Scroll down to the [lightshow] section, comment the default playlist path and add a new one to reflect our music directory. It should look like this:

#playlist_path = $SYNCHRONIZED_LIGHTS_HOME/music/sample/.playlist

playlist_path = $SYNCHRONIZED_LIGHTS_HOME/music/christmas/.playlist

Save and close the file with Ctrl+x.

Now test if the new playlist is working:


sudo python /home/pi/lightshowpi/py/synchronized_lights.py --playlist=/home/pi/lightshowpi/music/christmas/.playlist 

You should hear music synced with lights. If yes, congrats. You have working lights. Now let’s automate it.

Plug and play

We are going to use cron jobs to start the playback script at system boot so that it becomes a plug and play device, no need to log into ssh to start the show.

crontab -e

And add following lines at the end:


SYNCHRONIZED_LIGHTS_HOME=/home/pi/lightshowpi

@reboot  $SYNCHRONIZED_LIGHTS_HOME/bin/start_music_and_lights >> $SYNCHRONIZED_LIGHTS_HOME/logs/music_and_lights.play 2>&1 &

Now reboot your Pi to see if it’s working:

sudo reboot

Music and lights should start automatically.

Optional: Add shutdown switch

Raspberry Pi doesn’t come with an on/off switch. Unplugging the power cable will corrupt the SD card and it’s a painful process to open a terminal on PC, ssh into it and then shut it down. Since we will be installing this setup outside, I wanted the ability to to shut down the Pi from the device itself. I found a neat script by Inderpreet Singh that uses a GPIO pin to send a shutdown command to Raspbian.

Create a directory called ‘myscript’ in the home folder of the Pi (of course, you have to ssh into Pi)

mkdir myscript

Then cd to this directory:

cd myscript

And create a file:

nano shutpi.py

Copy the following lines into that empty file:

#!/bin/python
# Simple script for shutting down the raspberry Pi at the press of a button. 
# by Inderpreet Singh 
import RPi.GPIO as GPIO 
import time 
import os  
# Use the Broadcom SOC Pin numbers 
# Setup the Pin with Internal pullups enabled and PIN in reading mode. 
GPIO.setmode(GPIO.BCM) 
GPIO.setup(21, GPIO.IN, pull_up_down = GPIO.PUD_UP)  
# Our function on what to do when the button is pressed 
def Shutdown(channel): 
  os.system("sudo shutdown -h now") 
# Add our function to execute when the button pressed event happens 
GPIO.add_event_detect(21, GPIO.FALLING, callback = Shutdown, bouncetime = 2000)  
# Now wait! 
while 1: 
  time.sleep(1)

Save and close the file. Stay inside the ‘myscript’ directory and set this script to run as root:

sudo python shutpi.py

We now need to set the script to run as system boot:

sudo nano /etc/rc.local

There add the following line between ‘fi’ and ‘exit 0’ line:

sudo python /home/pi/myscript/shutpi.py &

So it looks like this:

# Print the IP address
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
printf "My IP address is %sn" "$_IP"
fi
sudo python /home/pi/myscript/shutpi.py &
exit 0

Shut down your system and connect a push button to GPIO pin 21 and GND using male-female breadboard cable.

uiK4t8N43_Z149NL253LerCF8squ-n8e1poMcfUE

Reboot your system and once music is up and running, push the button; your system should shut down.

Electrical connections

Finally it’s time to connect the relay to the receptacles. In my case I used duplex receptacles to keep the size of the set-up small so that I can house it in a waterproof container.

The receptacles that I linked about have a hot side and are neutral bridged. We need to cut the bridge of hot side so that we can use it independently to plug 8 separate christmas lights. The hot side of the duplex has golder screws whereas neutral side has silver screws. Use a cutter plier to break the bridge on the golden side (you can also check this video ). It should look like this after breaking the bridge:

qBC5_GGUrDUtxPfEl963rSZ7qkJmuYaa4c3GbAGZ

Now we will connect the hot side of the receptacles to output of the relay and neutral to the neutral cable. I have created a diagram to help you with shorting relay and connecting it to receptacles. Please note that in the US, white is hot wire, black is neutral, and green is ground.

9elO0dwW6FGtBHTKykRVJXNgUSqXZoCs0ovaJo_m

You can use a Four Gang Device Box to pack receptacles in it and use a the receptacle wall plate to cover it. I screwed the entire set-up on a wooden sheet and placed it inside waterproof SOCKit box.

You have eight receptacles so you can plug in up to eight 110v lights to the Pi. Just keep in mind that these SSD relays can’t handle too much load so, don’t plug a heavy load into the receptacle. Now you can either put lights on your Christmas tree or decorate your house with those lights.

Credit where due: This tutorial is a result of immense work done by many individuals. Many thanks to Lightshowpi team that created this amazingly cool open source project. I said it earlier and I will say it again, this project would not have been possible without the incredible work of Google software engineer Todd Giles and many others around the the LightShowPi project. That’s the greatness of open source: you learn and benefit from each other. So, special thanks to Tom Enos, Stephen Burning, Benjamin Ellis, and many more. I also want to thank KnC Mc for suggesting how to generate a playlist and thanks to Eric Higdon who actually created the Python script and Ken B for his tips on the automation script. The Lightshowpi community on Google+ is extremely helpful, and if you have any questions, you can freely ask there.

That’s the true open source spirit.

For 5 more fun projects for the Raspberry Pi 3, including a holiday light display and Minecraft Server, download the free E-book today!

Read about other Raspberry Pi projects:

5 Fun Raspberry Pi Projects: Getting Started

How to Build a Minecraft Server with Raspberry Pi 3

Build Your Own Netflix and Pandora With Raspberry Pi 3

Turn Raspberry Pi 3 Into a Powerful Media Player With RasPlex

Create a Fully Automated Light and Music Show for the Holidays: Part 2

This tutorial shows how to build  a fully automated holiday music and light show using a Raspberry Pi, a Micro SD card, and a few other inexpensive parts. Previously, we covered the basics of what you need for this project and showed how to set up your Raspberry Pi. Here, we’ll focus on the components and connections for the light show, and in part 3, we’ll put it all together with the music.

Install LightShowPi Software

From here on, we will run all the commands remotely. Just ssh into your Pi, as we explained previously.

First, we need to clone the Lightshowpi repository in the home directory of our Pi:

git clone https://bitbucket.org/togiles/lightshowpi.git

Then, change directory to the “lightshowpi” folder:

cd lightshowpi

We will be using the master branch as it has newer features:

git fetch && git checkout master

Now run the install script:

sudo ./install.sh

Reboot the system:

sudo reboot

Connect relay

Now it’s time to connect the Relay to the Raspberry Pi. To do this, shut down the Pi and unplug the power supply. Use the ‘male-female-breadboard wires’ to connect the GPIO pins with the corresponding channels of the relay (I am assuming that you ordered the same relay that I linked above).

To make things easier for you, I have created the following diagrams:

NJvAsWtqs2ZHX_23AJxNVY5p2elixM5PIux7-buc

JgKW4605DBejyH_aUyq1flbOfcjH3Ytf7_DVNvEJ

So this is what it looked like:

S9ixL___lTTvEo7GYE5XxFm3h37Kp3HPjia_oV9o

cTH6aT5NSemVrDQfMseFgtVR9tBRTmtV1OJ2oj3y

Now it’s time to test our connections. Power up the Raspberry Pi, SSH into it from your laptop, and then cd into the lightshowpi directory:

cd lightshowpi

Run the following command that will trigger each connected GPIO pin.

sudo python py/hardware_controller.py --state=flash

You will notice that LED on each channel flashing as you will see corresponding GPIO pins being triggered in the Terminal output. Once you confirm that all 8 channels flashed, stop the test with ‘Ctrl+x’.

Now, let’s test some music. Lightshowpi comes with two sample files stored in the music directory. Connect a speaker to the 3.5mm jack of the Pi, cd to lightshowpi directory

cd lightshowpi

And run this command:


sudo python py/synchronized_lights.py --file=/home/pi/lightshowpi/music/sample/ovenrake_deck-the-halls.mp3

You will hear some music from the speakers and see the LEDs on relay flashing with it. Awesome.

In part 3, we’ll set our display to music with a custom playlist and finish up the electrical connections.

For 5 more fun projects for the Raspberry Pi 3, including a holiday light display and Minecraft Server, download the free E-book today!

Read about other Raspberry Pi projects:

5 Fun Raspberry Pi Projects: Getting Started

How to Build a Minecraft Server with Raspberry Pi 3

Build Your Own Netflix and Pandora With Raspberry Pi 3

Turn Raspberry Pi 3 Into a Powerful Media Player With RasPlex