Home Blog Page 369

Setting up LVM Partition on a Linux Server

Think about this situation, you have a Ubuntu server and with your home videos or movies, books and other important files that are worth having a backup. You don’t have enough space on your laptop and also on your server the available space is almost gone. You go to a shop and buy a new HDD to make more space on your server but, when you connect it and you run lsbk you see two different discs on your system and you can’t have for examples home videos1 and home videos2 because you want to get them organized properly.

Today I will show you how to create an LVM partition and let you know some advantages and disadvantages of LVM over normal partitions.

LVM – Logical Volume Management

Logical volume management provides a higher-level view of the disk storage on a computer system than the traditional view of disks and partitions. This gives the system administrator much more flexibility in allocating storage to applications and users.

In other words, we can say that LVM allows multiple disks to show as one and help to maintain your information.

Read more at LinuxandUbuntu

Maximizing Value from Open Source Testing Frameworks

Open source-based testing acceleration is a new use case in Gartner’s Critical Capabilities for Software Test Automation, which is Gartner’s recognition that QA teams are increasingly using open source tools and frameworks. It has become evident that no industry is immune to market disruption, including the software development and testing space. In the past two decades, the software testing industry has been flooded with open source frameworks, including a few at the top such as Selenium and Appium that has popularized its adoption. In addition, organizations incorporating agile development and continuous delivery to enhance their DevOps practices are driving the acceleration of open source tools within large organizations.

There are clear differences between open source and commercial tools. Not every company, industry, and QA team is the same and how each defines, executes, and maintains tests vary. Aside from a tool’s functionality meeting your software needs, the question comes down to a few key business differentiators:

Free Sells: Demands for frequent release cycles, managing infinite combinations of devices, and creating standardization has put pressure on delivery times.

Read more at The New Stack

Cloud Foundry for Developers: Pushing Apps

After following the first four blogs in this series previewing the  Cloud Foundry for Developers training course, you should have a Cloud Foundry instance to use, have the cf CLI installed, and know how to connect to your instance and run commands. Now it’s time to push an app to your Cloud Foundry instance. You can catch up on the previous articles here:

Part 1: Introduction

Part 2: Definitions

Part 3: Architecture

Part 4: The cf Command

For more details, you can download the sample chapter here

Writing an app is beyond the scope of this series, but  you can refer to the Developer Guide for detailed help. Apps must have unique names, so don’t name it my-app, demo-app, test-app, sample-app, or any other commonly used name for testing.

Pushing Apps

Use the cf push command to deploy your app to your Cloud Foundry instance. If your app requires other services, such as a database, log management, or messaging, the services must be already provisioned, and may need to be bound to your app. See the Deploy an Application to learn more.

A lot of things happen when you push your app:

  • Cloud Foundry uploads and stores your app files
  • Reads and stores app metadata
  • Creates a droplet, the CF unit of execution
  • Assigns the droplet to a Diego cell
  • Starts the app

Writing your app is the hard part. Pushing it is easy. Change to the directory it is in and run cf push. You will see a lot of output as it is deployed. When it is finished, you can run cf apps to list all the apps in your space.

$ cf apps
name               state   instances memory disk urls
mine-fine-ruby-app started 1/1       64M    512M mine-fine-ruby-app.cfapps.io

Run cf app [appname] to see some details of your running app.

$ cf app mine-fine-ruby-app
requested state: started
instances: 1/1
usage: 64M x 1 instances
urls: mine-fine-ruby-app.cfapps.io
last uploaded: Mon Apr 9 8:49:11 UTC 2018
stack: cflinuxfs2
buildpack: ruby_buildpack

     state     since        cpu    memory         disk
#0   running   2018-04-09   0.0%   25.7M of 64M   102.4M of 512M

What is your app doing? Tail its logfile, or dump the log instead of tailing. Ctrl+c stops tailing.

$ cf logs mine-fine-ruby-app
$ cf logs --recent mine-fine-ruby-app

Apps can be stopped, started, and restarted.

$ cf stop mine-fine-ruby-app
$ cf start mine-fine-ruby-app
$ cf restart mine-fine-ruby-app

You may delete your app, force delete it, or delete your app and its mapped routes.

$ cf delete mine-fine-ruby-app
$ cf delete mine-fine-ruby-app -f
$ cf delete mine-fine-ruby-app -r

Now you know the basics of using Cloud Foundry to deploy apps. See the Cloud Foundry Documentation for thorough help and tutorials. 

The information in this series is based on the Cloud Foundry for Developers (LFD232) training course from Cloud Foundry and The Linux Foundation. You can download a sample chapter here.

Open Source AI For Everyone: Three Projects to Know

At the intersection of open source and artificial intelligence, innovation is flourishing, and companies ranging from Google to Facebook to IBM are open sourcing AI and machine learning tools.

According to research from IT Intelligence Markets, the global artificial intelligence software market is expected to reach 13.89 billion USD by the end of 2022. However, talk about AI has accelerated faster than actual deployments. According to a detailedMcKinsey report on the growing impact of AI, “only about 20 percent of AI-aware companies are currently using one or more of its technologies in a core business process or at scale.” Here, we look at three open source AI projects aimed at simplifying access to AI tools and insights….

Google has also released two new AIY kits that let individuals easily get hands-on with artificial intelligence. Focused on computer vision, and voice assistants, the two kits come as small self-assembly cardboard boxes with all the components needed for use. The kits are currently available at Target in the United States, and, notably, are both based on the open source Raspberry Pi platform—more evidence of how much is going on at the intersection of open source and AI.

Read more at The Linux Foundation

Kubernetes and CNI: What’s Next — Making It Easier to Write Networking Plugins

Linux containers have changed the way we think about application architecture and the speed at which we can deliver on business requirements. They provide consistency and portability across environments and allow developers to focus on application innovation rather than underlying execution details. One container by itself, however, is just a useful way to package an application; many containers, working together and running at scale, can transform an enterprise. That’s where Kubernetes comes in, providing the capabilities to deploy and orchestrate Linux containers at the volume needed to drive real business results and power innovation.

While containers provide the application packaging and Kubernetes delivers the ability weave large, complex applications from simpler containerized components, these two technologies by themselves lack a common way to communicate outside of their specific stack. But there is an answer to this challenge: the Container Networking Interface (CNI),…

Read more at The New Stack

Red Hat Introduces Kubernetes Operators Software Development Toolkit

At Red Hat Summit in San Francisco, Red Hat introduced Kubernetes Operators to the Red Hat OpenShift ecosystem. This provides an easy path for independent software vendors (ISVs) to deliver tested and validated Kubernetes applications on OpenShift.

Red Hat picked up Kubernetes Operators as part of its CoreOS acquisition. Kubernetes Operators are application-specific controllers that extend the Kubernetes application programming interface (API). It can create, configure, and manage instances of complex stateful applications. 

Developed with the Operator Framework open-source toolkit, an Operator helps to remove the barriers to building complex, stateful applications for Kubernetes, resulting in services designed to “just work” across any cloud where Red Hat’s OpenShift Kubernetes variant runs.

Read more at ZDNet

Blacklisting Modules on Linux

The Linux kernel is modular — composed of modules that work together but are largely independent of each other. New functionality can be added when a kernel module is loaded, but there are times when you might need to block functionality because modules interfere with each other or leave a system vulnerable. When that is the case, you can restrict what modules the kernel is able to use by blacklisting the troublemakers. This blocks them from being loaded.

Listing Kernel modules

You can list kernel modules with the lsmod command. For a taste of what you’re likely to see, the lsmod command below shows us the top of the lsmod command output on a sample system.

Read more at NetworkWorld

 

Survey Shows Linux the Top Operating System for Internet of Things Devices

The results are in from the latest IoT Developer Survey and again this year, Linux is by far the most used operating system for Internet of Things devices. Surprised? You shouldn’t be. Linux rules the roost in all areas of computing, so why should IoT be any different?

The online survey is sponsored each year by the Eclipse IoT Working Group, AGILE IoT, IEEE, and the Open Mobile Alliance for the purpose of understanding how developers are building IoT solutions. The survey was open from January 24 until March 5, with 502 participants.

This year 71.8 percent of respondents ticked “Linux” to the choose-all-that-apply question, “What operating system(s) do you use for your IoT devices?” Windows came in second with 22.9 percent, followed by FreeRTOS with 20.4 percent. The answer “No OS/Bare-metal” took fourth place with a 19.9 percent tally. No other operating system received higher than a 10 percent vote.

Read more at ITPro

Android Things 1.0 Offers Free OTA Updates — With Restrictions

A year and a half after Google announced that its stripped down, IoT-oriented Brillo version of Android was being recast as Android Things, the platform has emerged from Developer Preview as Android Things 1.0. The good news is that Google is offering customers free automated updates for three years, which should save money while improving security and reliability. The bad news is that Android Things is more proprietary than the mostly open source Android.

Google will continue to support the Raspberry Pi 3 and Technexion’s i.MX7-based Pico i.MX7D module as official Android Things development platforms. However, you can’t use them for production, as they “do not meet Google’s security requirements for key and ID attestation and verified boot, and may not receive stability and security updates,” says Google.

Significantly, Google dropped support for NXP’s low-power i.MX6 UL SoC, and has chosen higher end, quad-core, Cortex-A7, -A35, and -A64 SoCs, and an octa-core -A53 SoC for its newly announced production platforms. Customers are required to choose from NXP’s i.MX8M, MediaTek’s MT8516, and Qualcomm’s Snapdragon 212 and Snapdragon 624. (In January, Google had mentioned the Rockchip RK3229 as a platform, but it’s not included here.) Four tiny new compute modules based on these chips are “coming soon” from InnoComm (i.MX8M), Intrinsyc (Snapdragon), and MediaTek.

Android Things consumer devices should start arriving this summer with a focus on home automation and consumer devices rather than industrial IoT. Most are smart speakers that mix Android Things with Google Cast and the Google Assistant voice agent, with potential links to other Google cloud services. Unlike Android phones, Android Things devices are not likely to drive nearly as much revenues from advertising or apps, but Google may be able to profit by driving customers to its cloud services — and perhaps by selling user behavior data.

At this January’s CES show, Google previewed several of the Android Things devices that Google now says will ship this summer. These include the LG ThinQ WK7 and iHome iGV1 smart speakers, as well as the Lenovo Smart Display with Google Assistant. Two more unnamed Android Things/Assistant driven smart displays are also still on the way from JBL and LG.

Google also announced two new Android Things products due this summer. Byteflies is a docking station that securely transmits wearable health data to the cloud, and Mirego is developing a “network of large photo displays driven by public photo booths in downtown Montreal,” says Google. There was no mention of the previously announced InstaView ThinQ smart fridge.

Version 1.0 Improves Android Things Console

Android Things continues to be a stripped-down version of Android based on a Linux kernel that can run on as little as 32MB RAM. Wireless savvy and cloud connected, the platform is streamlined for single application use. Displays are optional, full-screen, and developed with standard Android UI tools. Audio is increasingly emphasized, with a focus on Google Assistant.

New Android Things features added since the latest preview include an updated Android Things Console that lets you build factory images and enable OTA updates, including OEM app updates. Analytics are available, but so far there’s no IoT aggregation platform as there is with Amazon’s more industrial focused AWS IOT and related AWS Greengrass platforms.

Other new Android Things features include the ability to automatically launch a selected application on boot. Google has added new Bluetooth device state management features and has improved support for LoWPAN networks such as Thread. Peripheral I/O APIs have been developed for GPIO, PWM, I2C, SPI, and UART, and there are new user-space drivers for location, input, sensors, and LoWPAN.

Three free years of OTA  With restrictions

Weirdly enough, Google’s Android Things could end up being less open source than Microsoft’s upcoming, Linux-based Azure Sphere IoT ecosystem. Android Things is open source to the extent that it’s posted on GitHub, and as of today, is freely downloadable for anyone. Version 1.0 has evolved with the help of feedback from 10,000 developers who have used the Developer Previews, which have been downloaded more than 100,000 times.

Yet, Google clearly states this is a “managed OS.” You need to sign a license agreement to use the Android Things SDK if you plan to deploy more than 100 devices commercially. If you have 100+ devices and want the long-term support version with the updates enabled by the cloud-connected Android Things Console software, you must sign a distribution agreement.

There will also be “additional options for extended support” after three years, and OEMs can “push OEM apps/APK updates at any time, even after updates for Android Things ends,” says Google. In addition, the Alphabet subsidiary is launching a “special limited program to partner with the Android Things team for technical guidance and support.”

With so many other IoT development platforms to choose from, it’s hard to imagine vendors investing in Android Things without licensing the long-term version. In an age of increasing IoT malware attacks, the free three-year update deal is very compelling. But you’re also giving up control and flexibility.

Like Microsoft with Azure Sphere, Google is limiting the authorized hardware platforms, but it also limits the types of devices that can run it. Google’s Android Things Program Policies page states that Android CDD Device Types “such as handhelds, watches, televisions, automotives, and any other device categories defined in the future” are prohibited. “If interested in these categories, please see Android, Wear OS, Android TV, and Android Auto.”

Ars Technica interpreted the licensing info this way: “Android Things is closed source and has a centralized update system. Google controls the operating system, and device makers can only make apps.”

A May 7 Solutions Review blog post by Nathaniel Lewis calls Android Wear a “proprietary platform” with “undocumented distribution terms,” and recommends “backing away slowly from the whole area.” Of particular concern to Lewis is a clause in the SDK agreement that states: “Except to the extent required by applicable third party licenses, you may not… combine any part of the Android Things SDK with other software.”

Lewis argues that it would be very difficult for a developer to determine whether a compileOnly dependency results in a violation of terms. A confidentiality requirement in the Android Things Console agreement is similarly problematic.

A Wear OS for IoT

Despite Google’s pivot away from open source, the response from the mainstream tech media has been enthusiastic. Indeed, with its free updates, Google has taken a welcome step toward assuming responsibility for IoT’s security vulnerabilities. The increased vigilance could also reduce fragmentation and improve software compatibility. This is less critical in the IoT world, but is growing more important in the consumer realm targeted by Android Things.

A positive report on Android Things from The Next Web argues that IoT development is increasingly driven by smaller software-driven firms that lack the skill or the money to hassle with the details of embedded development and security. Android Things solves those problems while providing a familiar app development environment closely based on the Android SDK.

Android Things does not appear to be much more restrictive than Wear OS, the new name for Google’s Android Wear smartwatch distribution. Yet Wear OS is targeted at a smaller number of mostly large vendors working with a fairly standard form factor. Android Things is designed for a far more diverse set of devices that are likely to developed by many smaller vendors.

The restrictions imposed on Wear OS vendors may be one reason the platform is lagging behind Apple Watch and Samsung’s second-place, Tizen-based Gear watches. (Blocks recently launched Project OpenWatch as a more open source alternative to Wear OS.)

Google may have been better served by either building a single Google Watch or else creating a more open platform that could evolve spontaneously like Android. In the IoT world, Google experimented with the Google Watch strategy by buying Nest, but that did not work out as planned.

There are less restrictive ways Google could encourage secure updates. In the Android world, Google’s Project Treble, which requires vendors to use modern Linux kernels, will likely help improve security and reduce fragmentation while still retaining open source flexibility.

Canonical’s Ubuntu Core and its snap mechanism for enabling securely updated IoT applications offers a more open source alternative to Android Things. Ubuntu Core enables secure, transactional updates while also offering access to a large application library. Whereas Google’s approach ensures secure updates by doing them itself, Canonical is providing a platform with the update paradigm built in, essentially accomplishing the same goal.

Join us at Open Source Summit + Embedded Linux Conference Europe in Edinburgh, UK on October 22-24, 2018, for 100+ sessions on Linux, Cloud, Containers, AI, Community, and more.

​Linux Comes to Chromebooks

Chrome OS is based on Linux, but you can’t easily run Linux applications on it. That’s about to change, with Google’s Project Crostini rolling out.

Chrome OS started as a spin off of Ubuntu Linux. It then migrated to Gentoo Linux and evolved into Google’s own take on the vanilla Linux kernel. But it’s interface remained the Chrome web browser UI to this day.

True, you could run DebianUbuntu, and Kali Linux with Chrome OS — with the open-source Crouton program in a chroot container. Or, you could run Gallium OS, a third-party, Xubuntu Chromebook-specific Linux variant. But, neither were for the faint of heart or the weak in technical skills.

According to Google, you will soon be able to run Linux inside a virtual machine (VM) that was designed from scratch for Chromebooks. That means it will start in seconds, and it integrates completely with Chromebook features.

Read more at ZDNet