Tech Growing Painshttp://techgrowingpains.com
A guide I’ve written as a personal how-tos and random notesFri, 09 Feb 2018 20:54:43 +0000en-UShourly1https://wordpress.org/?v=4.9.4139650602CoreOS and Xenserver: How to install CoreOS on to Xenserverhttp://techgrowingpains.com/coreos-and-xenserver-how-to-install-coreos-on-to-xenserver/
Sun, 14 Jan 2018 18:39:40 +0000http://techgrowingpains.com/?p=1438CoreOS is a light weight base system designed with Docker in mind. It has extra tools and Docker specific functionality. I will walk though how to install CoreOS on to a Xenserver hypervisor.

]]>I use Xenserver as my choice of home virtualization server. It is a great platform and I run many VMs that include testing Docker systems.

While I realize that I could have run something like Ubuntu bare-metal on the physical server I wanted the option to run VMs. In case you are wondering about the performance costs: Docker and XenServer: What’s Virtualization. For my purposes I do not need a ultra-high performance machine and I enjoy the flexibility that the Xenserver/VM/Docker stack can provide.

Your configurations may vary due to patches, and configuration. Please take that into account as you follow along in the guide.

Moving forward all commands on my Windows workstation will be done using the Ubuntu Linux subsystem.

Type in the following ssh-keygen -t rsa

This will generate your public/private/rsa keypair. Enter to accept the default location and file names. Enter again twice to not add a passphrase. Once this is complete you will have a hidden directory in your home directory name .ssh.

.ssh/
├── id_rsa
└── id_rsa.pub

Retrieve the public key from id_rsa.pub file using the cat .ssh/id_rsa.pub. Copy for public key starting from AAAA… to the last continuous character. Do not copy the starting ‘ssh-rsa’. Do not copy the information that is added at the end of the file in the username@workstation format. I will copy this long one line key to notepad for use later. Make sure the scratch pad program you use does not insert any extra characters.

Set-up Xenserver

I open Xencenter on my Windows workstation. On the toolbar I select ‘New VM’. Add the following required parameter. Your environment/choices may vary the other parameter for the CoreOS installation. The required choices are:

CoreOS Install

Up to this point it is important to understand that CoreOS is running, but only from the ISO file. If you stop, start, or reboot the VM at this point it will use the ISO and the existing ‘Config drive’ created from the ‘Cloud-Config Parameters’ file. Any containers added at this point will be lost during a stop, start, or reboot cycle.

To make it a persistent VM we will have to install CoreOS to the Xenserver. This makes it closer to a typical VM. SSH into the CoreOS VM run the following command sudo coreos-install -d /dev/xvda -o xen -C stable.

Using the XenCenter application stop the CoreOS VM, eject coreos_production_iso_image.iso, and start the CoreOS VM.

Moving Forward

From this point you can install Docker containers from the command line in the CoreOS VM. My favorite container to manage Docker containers is Portainer.

XenServer documentation in CONTAINER MONITORING IN LINUX VMS states you can get GUI container management tools in XenCenter using CoreOS. I didn’t see that functionality. I suspect you have to install the additional tools outlined in the ‘HOW TO MONITOR OTHER LINUX OSS’ section.

CoreOS is a light weight base system designed with Docker in mind. It has extra tools and Docker specific functionality which might be worth extra time investigating.

]]>1438MQTT: How to Install as a Docker Containerhttp://techgrowingpains.com/mqtt-how-to-install-as-a-docker-container/
Mon, 08 Jan 2018 08:08:15 +0000http://techgrowingpains.com/?p=1418MQTT... "It is a publish/subscribe, extremely simple and lightweight messaging protocol, designed for constrained devices and low-bandwidth, high-latency or unreliable networks..."

]]>MQTT… “It is a publish/subscribe, extremely simple and lightweight messaging protocol, designed for constrained devices and low-bandwidth, high-latency or unreliable networks…” (MQTT: FAQ) While there are many MQTT implementations I settled on Eclipse Mosquitto as an open source message broker. I’ll be using Docker built on top of Ubuntu Server 16.04.

Host System Set-Up:

First, create the MQTT configuration, data, and log directories on the host docker file system. For my purposes I use the /opt/containters/parent directory for organizational purposes. We will be running the Docker container using the ‘user1’ account. The the ‘user1’ account will need to own the Docker file system directories.

Docker Set-Up:

We will need to retrieve a copy of the Eclipse Mosquitto configuration file located in the container at /mosquitto/config/mosquitto.conf. To do this we will create a temporary container running Eclipse Mosquitto, copy out the mosquitto.conf from the container to the Docker host system, delete the temporary container, and finally edit the mouitto.conf to make it ready for a running Mosquitto container.

]]>1418ddclient: how to install as a Docker Containerhttp://techgrowingpains.com/ddclient-how-to-install-as-a-docker-container/
Wed, 03 Jan 2018 16:31:50 +0000http://techgrowingpains.com/?p=1397The ddclient program is used to do dynamic IP updates to a wide range of dynamic DNS servers. I like to run ddclient as a separate Docker container for easy updates, and minimal host system manipulation.

]]>The ddclient program is used to do dynamic IP updates to a wide range of dynamic DNS servers. I like to run ddclient as a separate Docker container for easy updates, and minimal host system manipulation. I’ll be using Docker built on top of Ubuntu Server 16.04.

Preparation:

For the dynamic DNS system I will be using Namecheap domain provider. Once you have configured Namecheap you will need three pieces of information:

I want to create a Dynamic DNS record of: remote.techgrowingpains.com

login:

techgrowingpains.com

password:

<Dynamic DNS password>

sub-domain(s):

remote

Note: You can add multiple sub-domains separated by commas.

Host System Set-Up:

We will need to get the user and group IDs for account creating the Docker ddclient container on the Docker host system with the id <account> command.

The ‘javier’ user ID ‘uid’ is 1000
The ‘javier’ group ID ‘gid’ is 1000

Next, create the ddclient configuration directory, and adjust folder permissions, on the host docker file system. For my purposes I use the /opt/containters/parent directory for organizational purposes.

]]>1397openHab: How to install as a Docker Container for Home Automationhttp://techgrowingpains.com/openhab-how-to-install-as-a-docker-container/
Tue, 02 Jan 2018 07:13:51 +0000http://techgrowingpains.com/?p=1300openHab is open source home automation software. I've built it using a Docker container for easy deployment and testing.

The ‘openhab’ user ID ‘uid’ is 9001
The ‘openhab’ group ID ‘gid’ is 9001

Second, lets now create the configuration directories and adjust folder permissions. They will hold the openHab configuration files on the Docker host file system. For my purposes I use the /opt/containters/ parent directory for organizational purposes.

Many of your specific configuration files will be in the /opt/containers/openhab/conf directory. The log files will be located in /opt/containers/openhab/userdata/logs directory.

In addition since the log files are on the Docker file system the running the following command can give a real-time events as you make configuration changes:tail -F /opt/containers/openhab/userdata/logs/openhab.log /opt/containers/openhab/userdata/logs/events.log

If you need to restart the openHab service the easiest thing is to stop and start the openHab container.

]]>1300Linux Command: chownhttp://techgrowingpains.com/linux-command-chown/
http://techgrowingpains.com/linux-command-chown/#commentsMon, 01 Jan 2018 23:01:01 +0000http://techgrowingpains.com/?p=1356This is a guide I’m mainly written a personal how-to guide, but I hope it can help others. System Ubuntu Server Version 16.04 Official manual Page chown This is a fairly generic Linux-based command so it work across different Ubuntu editions and versions. To change owership of single or multiple file/directory: chown -R openhab:openhab /opt/containers/openhab/ Variables: -R recursively change ownership […]

]]>http://techgrowingpains.com/linux-command-chown/feed/11356Linux Command: mkdirhttp://techgrowingpains.com/linux-command-mkdir/
http://techgrowingpains.com/linux-command-mkdir/#commentsMon, 01 Jan 2018 22:54:04 +0000http://techgrowingpains.com/?p=1355This is a guide I’m mainly written a personal how-to guide, but I hope it can help others. System Ubuntu Server Version 16.04 Official manual Page mkdir This is a fairly generic Linux-based command so it work across different Ubuntu editions and versions. To create directories: mkdir -p /opt/containers/openhab/{conf, userdata, addons} Variables: -p create parent directory as needed {dir1, dir2} […]

]]>http://techgrowingpains.com/linux-command-mkdir/feed/11355Linux command: usermodhttp://techgrowingpains.com/linux-command-usermod/
http://techgrowingpains.com/linux-command-usermod/#commentsMon, 01 Jan 2018 22:18:33 +0000http://techgrowingpains.com/?p=1343This is a guide I’m mainly written a personal how-to guide, but I hope it can help others. System Ubuntu Server Version 16.04 Official manual Page usermod This is a fairly generic Linux-based command so it work across different Ubuntu editions and versions. To add an existing account called ‘account1’ into the ‘group1’ group: sudo usermod -a -G group1 account1 […]

]]>http://techgrowingpains.com/linux-command-usermod/feed/11343Linux command: useraddhttp://techgrowingpains.com/linux-command-useradd/
http://techgrowingpains.com/linux-command-useradd/#commentsMon, 01 Jan 2018 19:26:00 +0000http://techgrowingpains.com/?p=1302This is a guide I’m mainly written a personal how-to guide, but I hope it can help others. System Ubuntu Server Version 16.04 Official manual Page useradd This is a fairly generic Linux-based command so it work across different Ubuntu editions and versions. To create a new non-root system user called ‘account1’ with no home directory: sudo useradd -r -s […]

]]>http://techgrowingpains.com/linux-command-useradd/feed/11302Using Pelican Themes on Windowshttp://techgrowingpains.com/using-pelican-themes-on-windows/
http://techgrowingpains.com/using-pelican-themes-on-windows/#respondFri, 01 May 2015 21:44:18 +0000http://www.techgrowingpains.com/?p=1282As I’m figuring out the Pelican blogging platform one of the first things I wanted to do was learn how to change the theme. The easiest way to accomplish this is to leverage the git system on the Windows workstation and then make Pelican aware that they exist. In case you don’t already have Git installed on your workstation here […]

]]>As I’m figuring out the Pelican blogging platform one of the first things I wanted to do was learn how to change the theme. The easiest way to accomplish this is to leverage the git system on the Windows workstation and then make Pelican aware that they exist.

To copy the existing themes from the central GitHub repository you would first open a command line on the Windows workstation and navigate to the main Pelican working directory. In my case that is ‘C:\project_stuff\pelican’ and run the following Git command.

git clone https://github.com/getpelican/pelican-themes.git

That will create a new folder in your working Pelican structure called ‘pelican-themes’. As the command indicates the existing themes in the GitHub repository are then cloned to this new directory.

c:-|-project_stuff\pelican|-cache|-content|-output|-pelican-themes

Next, you edit the pelicanconf.py file in the Pelican working directory and add the following entry… 'THEME = pelican-themes/bootlex' and save the file. Here I changed the theme to ‘bootlex’. As of today the following site pelican-themes-gallery.place.org had a visual rendering of most of the themes.

Finally, running the ‘pelican content' command will recompile the site using the new theme.

]]>http://techgrowingpains.com/using-pelican-themes-on-windows/feed/01282Moving Forward and Experimentinghttp://techgrowingpains.com/moving-forward-and-experimenting/
http://techgrowingpains.com/moving-forward-and-experimenting/#respondFri, 01 May 2015 19:50:45 +0000http://www.techgrowingpains.com/?p=1278I’m experimenting with the Pelican blogging platform. A natural question is why use this over a well established platform like WordPress? My answer is two-fold…. First, it is minimal and fast. While the features in WordPress are great I just don’t use any of them to any great extent. I won’t complain about the sheer number of plug-ins, because in […]

]]>I’m experimenting with the Pelican blogging platform. A natural question is why use this over a well established platform like WordPress? My answer is two-fold….

First, it is minimal and fast. While the features in WordPress are great I just don’t use any of them to any great extent. I won’t complain about the sheer number of plug-ins, because in fact I think that is an obvious advantage that WordPress has over most other platforms. Countless people are adding new plug-ins, themes, and features at a non-stop pace for WordPress. A few are fantastic, and could be showcased on the basis of technical expertise, and inventiveness. In the end, on the WordPress platform I ended up playing with to many settings and got away from the purpose of using a blogging platform. The point was to deliver a message, and I fooled myself into thinking if I could just tweak this last setting that would be better than delivering information.

Secondly, and more importantly for me, Pelican is so far away from any platform I am accustom to it forces me to exercise my rusty mental muscles. The Pelican platform engine is installed on your local workstation and leverages the Python language. For example you create your blog entry in a plaintext file using the Markdown format. Pelican then processes that file and generates flat HTML files. They can then be moved to a web server of your choice. Since the files are flat, and there is no additional processing on the server, or client side, during browsing session. The entire site is super fast and efficient.

As expected there will some hurdles I will have to overcome, but I feel that is the natural part of learning any new technology.

Here is a short list:

learning Python
using Python on a Windows workstation
installing and configuring a Linux web server (Debian and Nginx if you are curious)
learning to use SSH and SCP
learning to use Markdown

I’m exited and anticipate so problems…

now let’s go play…

In case you are interested it is over at http://Pelican.JavierBarrera.com. Since it an experimental it may or may not be there…