FastHandle - IT Operations Examples

FastHandle is fast operation tools for infrastructure configurations and tests.

User Tools

Site Tools


middleware:nginx:index.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
Last revision Both sides next revision
middleware:nginx:index.html [2017/12/30 00:38]
kurihara
middleware:nginx:index.html [2018/03/14 00:33]
kurihara
Line 3: Line 3:
 ====== Nginx (nginx.py) ====== ====== Nginx (nginx.py) ======
  
-\\+$FHHOME/fabfile/nginx.py 
 {{INLINETOC}} {{INLINETOC}}
 \\ \\
Line 11: Line 12:
 <sxh bash toolbar:false gutter:false> <sxh bash toolbar:false gutter:false>
 $ fab -l |grep nginx $ fab -l |grep nginx
 +</sxh>
  
 +<sxh bash toolbar:false gutter:false>
 $ H=test-server-1,test-server-2 $ H=test-server-1,test-server-2
 $ fab  -H $H auth.pro  nginx.install_yum $ fab  -H $H auth.pro  nginx.install_yum
 +</sxh>
 +
 +\\
 +==== Fabric Temporary Run Call Examples ====
 +<sxh bash toolbar:false gutter:false>
 +$ H=test-server-1,test-server-2
 +
 +$ fab  -H $H auth.pro  -- sudo systemctl status nginx
 +$ fab  -H $H auth.pro  -- sudo systemctl restart nginx
 +
 +$ fab  -H $H auth.pro  -- "nginx -t"
 +$ fab  -H $H auth.pro  -- "nginx -t -c /etc/nginx/nginx.conf"
 +
 +$ fab  -H $H auth.pro  -- "ps aux |grep nginx"
 +$ fab  -H $H auth.pro  -- "netstat -an |grep 80"
 </sxh> </sxh>
  
Line 26: Line 44:
 from fabric.api import * from fabric.api import *
 from fabric.contrib import files from fabric.contrib import files
 +from datetime import datetime
    
 #---------------------------------------------------------------------- #----------------------------------------------------------------------
Line 45: Line 64:
 # Check Configuration Files # Check Configuration Files
 #---------------------------------------------------------------------- #----------------------------------------------------------------------
 +# nginx.check_files_etc_nginx
 +@task
 +def check_nginx.conf():
 +    '''nginx -t'''
 +    sudo("nginx -t")
 +
 # nginx.check_files_etc_nginx # nginx.check_files_etc_nginx
 @task @task
Line 50: Line 75:
     '''tree -Dpuga  /etc/nginx'''     '''tree -Dpuga  /etc/nginx'''
     run("tree -Dpuga  /etc/nginx")     run("tree -Dpuga  /etc/nginx")
 +
  
  
Line 65: Line 91:
  
 \\ \\
-===== Configuration ===== +===== Nginx Configuration Examples===== 
-  *[[middleware:nginx:nginx.html]]+  *[[middleware:nginx:nginx.conf.html]] 
 +  *[[middleware:nginx:dokuwiki.html]] 
 +  *[[middleware:nginx:https.html]]
  
  
Line 72: Line 100:
 \\ \\
 <WRAP box 90%> <WRAP box 90%>
-<catlist ..: -noAddPageButton -smallHead -sortAscending>+<catlist .: -noAddPageButton -smallHead -sortAscending>
 </WRAP> </WRAP>
 \\ \\
 [[:index.html#Middleware Management|Top#Middleware Management]] [[:index.html#Middleware Management|Top#Middleware Management]]


middleware/nginx/index.html.txt · Last modified: 2019/02/11 00:45 by kurihara