02 November, 2017

Setup production ready Kubernetes cluster using Kubespray and Vagrant running on the libvirt KVMs

If you are creating some Docker containers - sooner or later you will work with Kubernetes to automate deploying, scaling, and operating application containers. If you need simply run Kuberenetes only there is is project called Minikube which can help you to setup single VM with Kubernetes. This is probably the best way how you can start with it.

Sometimes it's handy to have "production ready" Kubernetes cluster running on your laptop contains multiple VMs (like in real production environment) - that's where you need to look around and search for another solution.

After trying few tools I decided to use Kubespray. It's a tool for deploying a production ready Kubernetes cluster on AWS, GCE, Azure, OpenStack or Baremetal.

I'm fine to create few virtual machines (using Vagrant) on my laptop and install Kubernetes there.

I'll use 3 VMs, all 3 have etcd installed, all 3 are nodes (running pods), 2 of them run master components:

(you can use more VMs with more advanced setup: https://github.com/kubespray/kubespray-cli)

Let's see how you can do it in Fedora 26 using Vagrant + libvirt + Kubespray + Kubespray-cli.

24 October, 2017

Create Windows image using Packer and Ansible and then run it in Vagrant (libvirt)

I saw many Packer templates which are used to build the Windows images on Github. Almost all of them are using PowerShell scripts or DOS-style batch files. Ansible can use WinRM to manage Windows for some time - therefore I decided to use it also with Packer when building the images. Because of the bug it was not possible to use Ansible 2.3 (or older) with Packer + WinRM.

The latest Ansible 2.4 is working fine with Packer + Qemu + WinRM when you want to create the Windows images: https://www.packer.io/docs/provisioners/ansible.html#winrm-communicator

16 July, 2017

How-to build PXE Fedora 26 live image

Sometimes it may be handy to PXE boot live image (running only in memory) over the network.

On this page https://lukas.zapletalovi.com/2016/08/hidden-feature-of-fedora-24-live-pxe-boot.html I found a easy way how to boot Fedora Live CD over the network.

In my case I prefer to build my own image to reduce the size, because I do not need GUI and many other applications located on Fedora Live CD.

Here are few steps how to do it using Lorax project.

16 February, 2017

Use Ansible to create and tag Instances in AWS (EC2)

It may be handy to quickly create few instances for testing in AWS.

For such case I'm using simple Ansible playbook which can deploy few CenOS 7 instances, configure disks, tags volumes and instances and install public ssh key to root for example.

AWS Console

13 February, 2017

Provision Windows Server 2016 in AWS using Ansible via CloudFormation

For some testing I had to provision the Windows Servers 2016 in AWS. I'm using ansible for "linux" server provisioning and managing the AWS I tried it for the Windows server as well.

Because I'm not a windows user it was quite complicated for me so here is the way how I did it.
I'm not sure if it's the right one, but maybe those snippets may help somebody...

Here is the file/directory structure:

├── group_vars
│   └── all
├── tasks
│   ├── create_cf_stack.yml
│   └── win.yml
├── templates
│   └── aws_cf_stack.yml.j2
├── run_aws.sh
└── site_aws.yml

24 December, 2015

Atom editor (atom.io)

I tried to learn more about the Atom editor, because it has few nice features. It is also using some "common" shortcuts which will help you in the beginning.

Anyway I tried to made a short screencast showing the most used shortcuts:

Maybe you can also use this "Atom Cheatsheet" to help you learn the shortcuts:

You can download the available formats from GitHub: https://github.com/ruzickap/linux.xvx.cz/tree/gh-pages/files/atom_cheatsheet

Enjoy :-)

21 July, 2015

IPA (CentOS7) integration with Active Directory (W2K8)

I have been working with IPA in past few months and I would like to share my notes about the IPA and AD integration.

Network diagram:

I created the trust between the Active Directory and IPA server. There is one windows client connected to the AD and one CentOS7 client connected to the IPA. Both clients are "registered" into the AD/IPA.

23 December, 2014

Installtion F5 BIGIP Virtual Edition to RHEL7

The physical hardware running the F5 BIG-IP Local Traffic Manager loadblancing software is powerfull, but also quite expensive. For a lab environment you do not need to buy a new hardware, but you can get the F5 BIG-IP Local Traffic Manager Virtual Edition and install it as virtual machine.

That is the way I would like to describe here. I had one spare HP ProLiant DL380p Gen8 so RHEL7 virtualization (KVM) was the first choice.

In short I have to deal with bonding (two cables going to the 2 separate switches), trunk containing 3 vlans, bridges and finally with the F5 configuration itself.

25 October, 2014

Loadbalancing of PostgreSQL databases using pgpool-II and repmgr

I have to solve the PostgreSQL HA and Redundancy few weeks ago. It has been written a lot about this topic, but I was not able to find some guide describing pgpool-II and repmgr. After reading some documents I build the solution which I'm going to describe.

In short it contains the Master/Slave DB Streaming replication and pgpool load distribution and HA. The replication "part" is managed by repmgr.

Here is the network diagram:

27 September, 2014

VMware vCenter Server 5.x Appliance instalation and configuration using ssh command line

Here you can find some notes about installing VMware vCenter Appliance from command line directly form ESXi using OVF Tool.

03 September, 2014

Cacti 0.8.8b non-interactive installation and configuration

It may happen, you need to install Cacti without any user interaction. Usually after you install Cacti you need to finish the installation using Web installation wizard where you need to specify some details.

I would like to share the details how to install the Cacti 0.8.8b the automated way without user interaction.

16 June, 2014

Systemd Cheatsheet

Recently I started to use the new init system called systemd. I decided to write a simple "pdf" cheatsheet which helps me to print it and learn it.

See the (svg) example:

Here is the PDF: systemd_cheatsheet.pdf
Here is the SVG: systemd_cheatsheet.svg
Here is the DVI: systemd_cheatsheet.dvi
Here is the TeX: systemd_cheatsheet.tex

All source files can be found here: GitHub - systemd_cheatsheet

I used the following sources: Arch Linux Wiki - systemd, SysVinit_to_Systemd_Cheatsheet, RHEL7 - System_Administrators_Guide.

Enjoy ;-)

08 May, 2014

Turris - OpenWRT and guest access

In my previous blog post I described the way how to configure the Turris router for my home network. I decided to extend the configuration and create the Guest WiFi for other people who want's to access the "Internet". In my solution I'm using the nodogsplash captive portal solution which offers simple way to provide restricted access to an Internet connection. Here is the extended network diagram:

22 April, 2014

Turris - OpenWRT and thermometers

I would like to put here some notes about the thermometers in OpenWrt and Turris.

Turris internal thermometers

Turris has it's own thermometers which are monitoring the temperature of CPU and board. The how-to expects the previous lighttpd configuration described in my previous post. Here is the way how you can create graps wrom the data using RRDtool.

16 April, 2014

Turris - OpenWrt configuration

You can find out some details about Turris wifi router, lot of photos and some command outputs in my previous blog post. Now I would like to describe the way how I configured it according the network diagram:

I will also need my own web pages, transmission torrent client, microsd card, Dynamic DNS and extend the luci interface to add some more stats + graphs. Here are the steps how I did it. There is no guarantee it will work for another Turris router.