Linux (Page 2)

RancherOS

Containers in general and Docker Containers in particular are becoming popular everyday mainly because they allow us to have a componentized environment to run the applications and host them on premises or in cloud seamlessly. Containers are portable and simple; vendors are adding new features to allow us to create scalable container environments. Containerizing a simple application following Micro-Service Architecture and then making it scalable and high available; things become complex very quickly; managing and running these application becomes daunting. “Container Orchestration Tools” becomes necessity for Production Environments. These tools provide multi-host / cluster aware container manageability, assist in mitigating security and networking issues and provide services that are needed to scale the applications.

Read more...

Visual C++ for Linux Development

Visual C++ for Linux Development is the Visual Studio 2015’s extension by Microsoft that lets us write C++ code in Visual Studio for Linux machines and devices. It connects to the machine or device over SSH and uses machine / device’ g++, gdb and gdbserver to provide compilation and debugging experience from within Visual Studio. After installing the extension; it adds Linux Connection Manager into Visual Studio’s Options dialog through which we manage the SSH connections to Linux machines or devices (ARM also supported). It also adds the project types; currently there are three; Blink (Raspberry), Console Application (Linux) and Empty Project (Linux). You can write the C++ code using Unix headers and libraries. For intellisence / removing red squiggles; you will need to download the header files (using PUTTY’s PSCP) to the development machine and add that folder in the project properties’ VC++ Directories section

Read more...

GlusterFS Volume as Samba Share

We made Docker Container using a Dockerfile in the GlusterFS post that can mount a GlusterFS volume (running on Raspberry Pis); lets extend our Dockerfile and add Samba Server to expose the mounted directory as Samba Share so it can be accessed from Windows. For this we need to add these additional lines into the Dockerfile

Read more...

GlusterFS

GlusterFS is a scale-out network-attached storage file system that has found applications in cloud computing, streaming media services, and content delivery networks. GlusterFS was developed originally by Gluster, Inc. and then by Red Hat, Inc., as a result of Red Hat acquiring Gluster in 2011, says the Wikipedia. Its a distributed file system that we run on multiple hosts having “bricks” that hosts the data physically (on storage); the nodes communicate with other (peers) and we can create a volume across these nodes with different strategies; replication in one of them if chosen data will get stored in bricks of all contributing nodes acting like RAID 1

Read more...

Dockerfile

Docker can build images automatically by reading the instructions from a Dockerfile. Its a text file that contains the commands how to assemble the required image. This can be used as a replacement of manually creating an image from scratch installing required software etc and then exporting and loading it someplace else; the technique we discussed in the first Docker post here. We can simply handover the Dockerfile instead. Lets create a Node Container using the Dockerfile for that simple Hello World thing! Create a Dockerfile; and punch in the following

Read more...

Running Node Application in Docker Container on Raspberry Pi

Read more...

Docker on Raspberry Pi

Docker allow us to package our application with all its dependencies into a standardized unit; the application run in the Container that has everything it needs to run and this is kept in isolation from the other Container running on the Server. Its architecturally different from Virtual Machine and are more portable and efficient; they share the kernel and run as an isolated process in user space on the host operating system.

Read more...

Monitoring Raspberry Pi

Before commissioning the Raspberry Pi; it would be nice if we setup some monitoring; so we can correlate any issue in the field with device status. This becomes important especially for devices like Raspberry Pi that has limited resources. The simplest and easiest way is to setup SNMP; its the protocol to collect and organize information about the managed devices on IP networks. Given Raspbian is a just another Linux; we can easily setup SNMPD; a SNMP daemon; and can monitor the device remotely or even from within the device. To install SNMPD; issue the following commands; and once installed backup the /etc/snmp/snmpd.conf

Read more...

Staging Node Application on Raspberry Pi

To make things interesting; lets test our Node application on Raspberry Pi running Raspbian. Raspbian; just like Ubuntu; is based on Debian, so the learnings we did in first part can be applied. Raspberry Pi is interesting due to its low cost, credit card sized and Raspbian OS, it can provide PC like computing in the field or workplace needing very little power and this enables lots of new interesting possibilities. PS Raspbian OS is one option; we can try/use other OSes on this little thing!

Read more...

Dockerizing Mongo and Express

Now that we are familiar with the Docker and how it helps us in high isolation and compartmentalization; lets expand and try out deploying some real world application. I will be using the application that we built for MongoDB and Mongoose; its an Express JS / MongoDB application and we will try deploying it across two Docker containers; one for MongoDB and the other for Express in spirit of Microservice Architecture. As per wikipedia; Microservices are a more concrete and modern interpretation of service-oriented architectures (SOA) used to build distributed software systems. Like in SOA, services in a microservice architecture are processes that communicate with each other over the network in order to fulfill a goal. Also, like in SOA, these services use technology agnostic protocols. Using separate Container for each microservice; we get fine control and can monitor and distribute components of our application at each microservice level.

Read more...