FastHandle - IT Operations Examples

FastHandle is fast operation tools for infrastructure configurations and tests.

User Tools

Site Tools


preparation:installing.html



Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
preparation:installing.html [2018/04/24 01:01]
kurihara
preparation:installing.html [2020/01/23 01:11] (current)
kurihara
Line 61: Line 61:
 \\ \\
 ==== Fabric ==== ==== Fabric ====
-=== Check Python Before Installing Fabric=== 
  
-Fabric requires Python version 2.5 - 2.7. +===Fabric Version === 
 +You must use Fabric or fabric3. these days, you should use fabric3. 
 +fabric2 is the different of use. 
 + 
 +|<100% 100px ->| 
 +| Fabric   Python (2.5-2.7)\\ http://www.fabfile.org/                                                                                                                                                                         | 
 +| fabric2  | Python (2.7, 3.4+)\\ http://www.fabfile.org/                                                                                                                                                                       | 
 +| fabric3  | Python (2.7, 3.4+) . \\ Fabric3 is a fork of Fabric to provide compatability with Python 3.4+. The port still works with Python 2.7.\\ https://pypi.org/project/Fabric3/\\ https://github.com/mathiasertl/fabric/ 
 + 
 + 
 +\\ 
 +=== Check Python Before Installing Fabric===
  
 <sxh text toolbar:false gutter:false> <sxh text toolbar:false gutter:false>
Line 89: Line 99:
  
 ~]# yum install epel-release ~]# yum install epel-release
 +~]# yum info fabric
 ~]# yum install fabric ~]# yum install fabric
 +~]# fab --version
 +Fabric 1.14.0
 +Paramiko 1.16.1
 </sxh> </sxh>
  
 \\ \\
 === RHEL/CentOS with pip=== === RHEL/CentOS with pip===
 +==Fabric==
 <sxh text toolbar:false gutter:false> <sxh text toolbar:false gutter:false>
 ~]# yum install gcc python-devel python-setuptools ~]# yum install gcc python-devel python-setuptools
 ~]# easy_install pip ~]# easy_install pip
-~]# pip install fabric+~]# pip search fabric 
 +~]# pip install fabric== 
 +~]# pip install fabric==1.14.0 
 +~]# fab --version 
 +Fabric 1.14.0 
 +Paramiko 1.16.1 
 +</sxh> 
 + 
 +==Fabric3== 
 +<sxh text toolbar:false gutter:false> 
 +~]# yum install gcc python-devel python-setuptools 
 +~]# easy_install pip 
 +~]# pip search fabric3 
 +~]# pip install fabric3 
 +~]# fab --version 
 +Fabric 1.14.0 
 +Paramiko 1.16.1 
 +</sxh> 
 + 
 + 
 +\\ 
 +=== RHEL/CentOS with virtualenv, pip=== 
 +<sxh text toolbar:false gutter:false> 
 +~]# yum install gcc python-devel python-setuptools 
 + 
 +~]# sudo su - fasthandle 
 +~]# pip install virtualenv 
 +~]# cd /home 
 +~]# virtualenv env_fasthandle -p python2.7 
 +~]# source env_fasthandle/bin/activate 
 +~]# pip install fabric==1.14.0 
 + 
 +~]# deactivate 
 + 
 +~]$ cat << END >> ~/.bashrc 
 + 
 +#virtualenv 
 +source env_fasthandle/bin/activate 
 + 
 +END
 </sxh> </sxh>
  
Line 109: Line 163:
 \\ \\
 === Debian/Ubuntu  with pip=== === Debian/Ubuntu  with pip===
 +==Fabric==
 <sxh text toolbar:false gutter:false> <sxh text toolbar:false gutter:false>
 ~]# apt-get install python-dev python-setuptools gcc ~]# apt-get install python-dev python-setuptools gcc
 ~]# easy_install pip ~]# easy_install pip
-~]# pip install fabric+~]# pip install fabric== 
 +~]# pip install fabric==1.x.x
 </sxh> </sxh>
 +
 +==fabric3==
 +<sxh text toolbar:false gutter:false>
 +~]# apt-get install python-dev python-setuptools gcc
 +~]# easy_install pip
 +~]# pip install fabric3
 +</sxh>
 +
  
 \\ \\
Line 145: Line 209:
 \\ \\
 ===== Installing FastHandle ===== ===== Installing FastHandle =====
 +
 +You can install FastHandle "From GitHub(Method 1 or 2)" or "Make it yourself(Method 3)".
 +
 ==== Method 1 : From GitHub ==== ==== Method 1 : From GitHub ====
  
Line 154: Line 221:
  
 ~]$ tree -a -I '.git'  fhhome ~]$ tree -a -I '.git'  fhhome
-~]$ chmod 755 fhhome/fhscripts/*+~]$ chmod 755 fhhome/bin/*
 </sxh> </sxh>
  
Line 166: Line 233:
 ~]$ mkdir fhhome ~]$ mkdir fhhome
 ~]$ cp -pr fhhome.`date +%Y%m%d`/ fhhome/ ~]$ cp -pr fhhome.`date +%Y%m%d`/ fhhome/
-~]$ chmod 755 fhhome/fhscripts/*+~]$ chmod 755 fhhome/bin/*
 </sxh> </sxh>
  
-/*+
 \\ \\
-==== Method : Make it yourself ====+==== Method : Make it yourself ====
  
-You can install "From GitHub(Method 1)" or "Make it yourself(Method 2)". 
  
 Reference **[[preparation:directory-structure.html|]]** Reference **[[preparation:directory-structure.html|]]**
Line 183: Line 249:
 ~]$ mkdir fhhome ~]$ mkdir fhhome
 ~]$ cd fhhome ~]$ cd fhhome
-~]$ mkdir -p fhscripts fabfile hosts key scripts conf/os conf/httpd conf/named  bin src rpm deb log tmp output+~]$ mkdir -p bin fabfile hosts key log target/bin target/deb target/key target/linux  target/rpm  target/scripts  target/src  tmp
 </sxh> </sxh>
  
Line 195: Line 261:
  
 == 3. Copy FastHandle Scripts == == 3. Copy FastHandle Scripts ==
-Please copy the necessary files and change permission like ''chmod 755 xxxx.sh''.+Please copy the necessary files and change permission like ''chmod 755 bin/xxxx.sh''.
   *[[:index.html#FastHandle Scripts|FastHandle Scripts]]   *[[:index.html#FastHandle Scripts|FastHandle Scripts]]
-*/+ 
 +== 4. Change mode the bash scripts == 
 +<sxh bash toolbar:false gutter:false> 
 +~]# chmod 755 $FHHOME/bin/*.sh 
 +</sxh> 
  
 \\ \\


preparation/installing.html.1524499311.txt.gz · Last modified: 2018/04/24 01:01 by kurihara