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













.

os:linux:pkg:index.html



This is an old revision of the document!


Top#OS Management

Package Management (pkg.py)

$FHHOME/fabfile/pkg.py


Operation

$ fab -l |grep pkg

$ fab  -H $H auth.pro  pkg.check_cmd
$ fab  -H $H auth.pro  pkg.install_rpm_centos7


pkg.py

$FHHOME/fabfile/pkg.py

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

FHHOME=os.environ["FHHOME"]

#===============================================================================
# Installing Package
#===============================================================================
#----------------------------------------------------------------------
# CentOS7 RPM
#----------------------------------------------------------------------
@task
def install_rpm_centos7():
    put("%s/scripts/rpm.sh", "scripts/rpm.sh, mode=0755 % FHHOME)
    sudo("scripts/rpm.sh centos7", pty=False)

#----------------------------------------------------------------------
#CentOS6 Common
#----------------------------------------------------------------------




#===============================================================================
#Check Commands
#===============================================================================
@task
def check_cmd():
    put("%s/scripts/check_cmd.sh", "scripts/check_cmd.sh, mode=0755 % FHHOME)
    sudo("scripts/check_cmd.sh")


$FHHOME/scripts



os/linux/pkg/index.html.1514825068.txt.gz ยท Last modified: 2018/01/02 01:44 by kurihara