FastHandle - IT Operations Examples

FastHandle is fast operation tools for infrastructure configurations and tests.

User Tools

Site Tools


Sidebar


Top     SiteMap

Manager Server

Target Server

$FHHOME/bin/xxx.sh | xxxx.exp













.

middleware:bind:index.html



This is an old revision of the document!


Top#Middleware Management

BIND (bind.py)

bind Operation

$ fab -l |grep -F bind.

$ fab  -H x.x.x.x auth.pro  bind.xxxxx

Ref. Remote Shell Commands

$ H=test-serve-01,test-server-02

$ fab -H $H auth.pro -- sudo diff /etc/vsftpd/vsftpd.conf /etc/vsftpd/vsftpd.conf.20171205
$ fab -H $H auth.pro -- sudo mv /etc/vsftpd/vsftpd.conf.20171205 /etc/vsftpd/vsftpd.conf

$ fab -H $H auth.pro -- "ps aux |grep vsftpd"
$ fab -H $H auth.pro -- "lsof -i |grep ftp"
$ fab -H $H auth.pro -- sudo systemctl status vsftpd
$ fab -H $H auth.pro -- sudo systemctl restart vsftpd


bind.py

$FHHOME/fabfile/bind.py

import sys, os
from fabric.api import *
from fabric.contrib import files

FHHOME=os.environ["FHHOME"]

#----------------------------------------------------------------------
# Installing bind
#----------------------------------------------------------------------
# vsftpd.install_rpm
@task
def install_rpm():
    '''yum install vsftpd '''
    sudo("rpm -q bind            > /dev/null 2>&1 || yum -y install bind")


#----------------------------------------------------------------------
# Configuration
#----------------------------------------------------------------------
# bind.conf
@task
def conf():
    sudo("cp -p /etc/named.conf /etc/named.conf.`date -d '1day ago' +%Y%m%d`")


#----------------------------------------------------------------------
# Service
#----------------------------------------------------------------------


BIND(named) Sample Configuration



middleware/bind/index.html.1517928841.txt.gz ยท Last modified: 2018/02/06 23:54 by kurihara