FastHandle - IT Operations Examples

FastHandle is fast operation tools for infrastructure configurations and tests.

User Tools

Site Tools


operation:specify.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
operation:specify.html [2017/12/04 23:47]
kurihara
operation:specify.html [2019/02/11 00:32] (current)
kurihara
Line 1: Line 1:
 [[:index.html#How to use FastHandle|Top#How to use FastHandle]] [[:index.html#How to use FastHandle|Top#How to use FastHandle]]
-====== How to Specify the server ======+====== How to Specify the server with FastHandle ======
  
 \\ \\
 {{INLINETOC}} {{INLINETOC}}
 +\\
 +
 +I extended Fabric to make it easier to specify the servers.
 +I call the modified Fabric FastHandle.
 +
 \\ \\
  
 ===== One Server ===== ===== One Server =====
 +<sxh bash toolbar:false gutter:false>
 +$ H=192.168.0.10
 +$ fab -H $H  -- hostname
 +</sxh>
  
 <sxh bash toolbar:false gutter:false> <sxh bash toolbar:false gutter:false>
-echo 192.168.0.10 | fab auth.pro -- hostname +fab -H 192.168.0.10  -- hostname 
-echo 192.168.0.10 | fab auth.pro test.test+fab -H 192.168.0.10  test.test
 </sxh> </sxh>
  
 <sxh bash toolbar:false gutter:false> <sxh bash toolbar:false gutter:false>
-fab -H 192.168.0.10 auth.pro -- hostname +echo 192.168.0.10 | fab  -- hostname 
-fab -H 192.168.0.10 auth.pro test.test+echo 192.168.0.10 | fab  test.test
 </sxh> </sxh>
 +
  
 \\ \\
 ===== Two Servers ===== ===== Two Servers =====
 +
 <sxh bash toolbar:false gutter:false> <sxh bash toolbar:false gutter:false>
-echo "192.168.0.10\n192.168.0.11" | fab auth.pro -- hostname +H=192.168.0.10,192.168.0.11 
-$ echo "192.168.0.10\n192.168.0.11" | fab auth.pro test.test+fab -H $H  -- hostname 
 +</sxh>
  
-echo 192.168.0.10\\n192.168.0.11 | fab auth.pro -- hostname+ 
 +<sxh bash toolbar:false gutter:false> 
 +fab -H 192.168.0.10,192.168.0.11  -- hostname 
 +$ fab -H 192.168.0.10,192.168.0.11  test.test
 </sxh> </sxh>
  
 <sxh bash toolbar:false gutter:false> <sxh bash toolbar:false gutter:false>
-fab -H 192.168.0.10,192.168.0.11 auth.pro -- hostname +echo "192.168.0.10\n192.168.0.11" | fab  -- hostname 
-fab -H 192.168.0.10,192.168.0.11 auth.pro test.test+echo "192.168.0.10\n192.168.0.11" | fab  test.test 
 + 
 +$ echo 192.168.0.10\\n192.168.0.11 | fab  -- hostname
 </sxh> </sxh>
 +
  
 <sxh bash toolbar:false gutter:false> <sxh bash toolbar:false gutter:false>
Line 36: Line 54:
 192.168.0.1 test-web-01 192.168.0.1 test-web-01
 192.168.0.1 test-web-02 192.168.0.1 test-web-02
-$ cat tmp | fab auth.pro test.test+$ cat tmp | fab  test.test
 </sxh> </sxh>
  
 \\ \\
 ===== Many Servers ===== ===== Many Servers =====
 +
 <sxh bash toolbar:false gutter:false> <sxh bash toolbar:false gutter:false>
 $ cat hosts/test $ cat hosts/test
 192.168.0.1 test-web-01 192.168.0.1 test-web-01
-192.168.0.test-web-02+192.168.0.test-web-02
 192.168.0.3 test-web-03 192.168.0.3 test-web-03
 +192.168.0.4 test-web-04
 +192.168.0.5 test-web-05
 +.....
 +192.168.0.98 test-web-98
 +192.168.0.99 test-web-99
 $ $
-$ fhghost.sh test-server hosts/test | fab auth.pro test.test+$ fhghost.sh test-web hosts/test | fab  test.test
  
-$ fhghost.sh "*" hosts/test | fab auth.pro test.test+$ fhghost.sh  hosts/test | fab  test.test
 </sxh> </sxh>
 +
 +Check [[preparation:fhhome:fhghost.html|]] 
 +
 +
 +
 +\\
 +<WRAP box 90%>
 +<catlist -noAddPageButton -smallHead -sortAscending>
 +</WRAP>
  
  


operation/specify.html.1512398871.txt.gz · Last modified: 2017/12/04 23:47 by kurihara