Ashish Jaiswal Blog

A blog dedicated to community

Docker Inside LXC

Install lxc

Terminal
1
apt-get update && apt-get install lxc

Change lxc default.conf Add these line

Terminal
1
2
3
lxc.aa_profile = unconfined
lxc.cgroup.devices.allow = a
lxc.cap.drop =

DRBD Automatic Failover Without Cluster

I have written a script to do a failover of DRBD resources. This script will get the drbd start mount the partition, and start the nfsserver and samba server and the get virtual IP setup.

This script won’t be useful for many, which are having a mix envrionment. such as node having some resource as primary and some as secondary. Reason behind this, that we where not able to use pacemaker in our current enviornment. Though we are not using this in production enviornment.

Put this in your systemd bootup process. check this

Please use it and let me know.

Ruby subcene.com Subtitle Downloader

I have written a ruby script in which it will download the subtitle as you need. To demonstrate more in this, I would like to share why I did this. Because I was tried of going onto subscene.com and searching for a movie and then download the subtitle and then unzip it. which was very painful for me.

This let me write a small ruby wrapper to do all this thing automatically. This basically takes 4 arguments, like --movie_name --year --resolution and if you want any specific ripper subtitle then you can pass --author. Just copy this script under $PATH and run subscene like this

Convert CentOS/Scientific Linux to RHEL Server

We have ran into scenario where we wanted to convert a CentOS box to RHEL box. So sharing my experience out here.

There are some pre-requisite

Terminal
1
2
3
rpm -qa centos\*
centos-indexhtml-6-1.el6.centos.noarch
centos-release-6-5.el6.centos.11.2.x86_64

Bind DNS With Puppet on Opensuse

This blog is about setting up a DNS server with puppet module. I have written a manifesto to get the job done. You can add more if you like.

Requirements

  1. OpenSuse OS.
  2. Puppet Server

You can install bind manually like this and then configure it. But if you have multiple DNS server, then puppet can be handy. Currently my manifest only manage configuration file. Will add support to manage the zone files too.

How to Setup Vagrant

What is Vagrant ?

The big question, which I was thinking, when I first heard of it. So today finally got a chance to do some hands on. Basically it is a tools which gives you running VM, whenever you need it with all your environment set in place. So what was that huh? Consider that you are creating a VM or clonning a VM and starting it up and running some script to get the environment set in place. So why not automate this whole thing by vagrant.

Vagrant allows you to launch VMs with provisioning on top of it.

Ruby Song Downloader

Since I’m working on puppet DSL language from past year, so always wanted to take on ruby. Finally got the chances to do some task. I have had lost many of my songs library. So wanted to keep track of everything and needed to start from scratch. As I love Hindi/Bollywood songs, the only site comes to my mind is songspk.name and I had some trouble accessing it, due to Indian goverment blocking or either my ISP.

To get out of this, I found a site allmp3song.com, which is truly simple and fast. The only problem was, I can’t download the whole movie songs at a time.