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:httpd:index.html



This is an old revision of the document!


Top#Middleware Management

Apache httpd (httpd.py)

Operation

$ echo a |fab -l |grep httpd

$ echo xx.xx.xx.xx | fab  pro  httpd.install_yum


httpd.py Fabric Recipes

import sys
from fabric.api import *
from fabric.contrib import files
 
#----------------------------------------------------------------------
# Installing Apache httpd
#----------------------------------------------------------------------
#yum
@task
def install_yum():
    sudo("rpm -q httpd        > /dev/null 2>&1 || yum -y install httpd")


#----------------------------------------------------------------------
# Check Files
#----------------------------------------------------------------------
#RHEL/CentOS
@task
def check_files_etc_httpd():
    '''tree -Dpuga  /etc/httpd'''
    run("tree -Dpuga  /etc/httpd")

#Debian/Ubuntu
@task
def check_files_etc_httpd():
    '''tree -Dpuga  /etc/apache2'''
    run("tree -Dpuga  /etc/apache2")



#----------------------------------------------------------------------
# Check Header
#----------------------------------------------------------------------
@task
def check_header():
    '''curl -I http://localhost/'''
    run("curl -I http://localhost/")



Configuration



middleware/httpd/index.html.1513522062.txt.gz ยท Last modified: 2017/12/17 23:47 by kurihara