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













.

appendix:fabric-vs-others.html



This is an old revision of the document!


Top#Appendix

FastHandle(Fabric) vs Other Tools

Fasthandle(Fabric) vs Only ssh

  • FastHandle can easily deploy many servers.
  • FastHandle keep Password and PublicKey and Passphrase
  • FastHandle can use ' and “ like local server.

$ fab -H x.x.x.x auth.pro -- hostname
$ fab -H x.x.x.x auth.stg -- hostname
vs
$ ssh x.x.x.x hostname
$ ssh -i ~/.ssh/id_rsa.pro x.x.x.x hostname
$ ssh -i ~/.ssh/id_rsa.stg x.x.x.x hostname

$ fab -H x.x.x.x auth.pro -- "echo "any host 192.168.100.1 gw 192.168.0.5" >> /etc/sysconfig/static-routes"
$ fab -H x.x.x.x auth.pro -- "echo 'any host 192.168.100.1 gw 192.168.0.5' >> /etc/sysconfig/static-routes"
vs
$ ssh -t x.x.x.x sudo "bash -c 'echo \"any host 192.168.100.1 gw 192.168.0.5\" >> /etc/sysconfig/static-routes'"

$ fab  -H x.x.x.x auth.pro -- "sed s/192.168.100.10/192.168.50.10/g /etc/hosts > /etc/hosts.`date '+%Y%m%d'`"
vs
$ ssh x.x.x.x  sudo "bash -c 'sed s/192.168.100.10/192.168.50.10/g /etc/hosts > /etc/hosts.`date '+%Y%m%d'`' "

$ H="192.168.0.1,192.168.0.2"
$ fab -H $H  auth.pro -- hostname

vs

$ H="192.168.0.1 192.168.0.2"
$ for i in $H ; do ssh -n $i "hostname" ; done


Ansible

$ vi hosts
[test-web]
192.168.0.10
192.168.0.11

$ ansible test-web -i hosts -a 'hostname'

$ ansible -i hosts  -u user01 -k --ask-su-pass -a "sudo cat /etc/shadow"




Top#Appendix



appendix/fabric-vs-others.html.1514126614.txt.gz · Last modified: 2017/12/24 23:43 by kurihara