Objective:
Shell + ansible + Gateone Automated operations Management: Minimal manual intervention, combined with the use of scripts and third-party tools to ensure that the business system 24x7 efficient and stable operation;
1. Installation environment involves software
This operating system: Centos 6.5 32/64 for testing
Project installation Software |
Version |
|
Python |
2.6.6 |
|
Tornado |
2.4.1 |
|
2. Environment deployment
2.1 Installing dependent Packages
Yum install-y python python-pip gcc python-devel setuptool python-pam OpenSSL openssl-devel wget git make gcc-c++ patch p Am_radius Dtach
2.2 PIP Installation software
PIP Install tornado PYOPENSSL Kerberos
2.3 Installing Tornado
wget https://github.com/downloads/liftoff/GateOne/tornado-2.4-1.noarch.rpm
RPM-IVH tornado-2.4-1.noarch.rpm
2.4 Installing Imaging
wget//effbot.org/downloads/imaging-1.1.7.tar.gz
TAR-ZXVF imaging-1.1.7.tar.gz
CD Imaging-1.1.7
Python setup.py Install
2.5 Installing Ordereddict
wget https://pypi.python.org/packages/source/o/ordereddict/ordereddict-1.1.tar.gz#md5= A0ed854ee442051b249bfad0f638bbec--no-check-certificate
CD ordereddict-1.1
Python setup.py Install
2.6 Installing Gateone
wgethttps://github.com/downloads/liftoff/gateone/gateone-1.1-1.noarch.rpm
RPM-IVH Gateone-1.1-1.noarch.rpmgateone
3. Start
The default installation path is/opt/gateone
Run Gateone:
/opt/gateone/gateone.py
Shutdown process: Ctrl + C
The first run of Gateone will generate server.conf configuration files under/opt/gateone
#如果你想让其后台运行, please use Serveri to start
/etc/init.d/gateone start
4. Web Interface Login
Open Web Interface input: HTTPS://IP
650) this.width=650; "src=" http://s1.51cto.com/wyfs02/M02/7D/49/wKioL1blAZLAFJjTAAI3aZa4m8k512.jpg "style=" float: none; "title=" Landing Interface 01.jpg "alt=" Wkiol1blazlafjjtaai3aza4m8k512.jpg "/>
Same as CRT or Xshell landing interface
650) this.width=650; "src=" http://s5.51cto.com/wyfs02/M02/7D/49/wKioL1blAZThbCsjAAHHMs1d03M033.jpg "style=" float: none; "title=" Landing Interface 02.jpg "alt=" Wkiol1blazthbcsjaahhms1d03m033.jpg "/>
Login success: Can execute any command does not need to have Xshell or CRT and other remote tool operation;
650) this.width=650; "src=" http://s5.51cto.com/wyfs02/M00/7D/4B/wKiom1blAQ-gFTpJAAJni5uQ3nE864.jpg "style=" float: none; "title=" Landing Interface 03.jpg "alt=" Wkiom1blaq-gftpjaajni5uq3ne864.jpg "/>
Support recording function, video playback function
650) this.width=650; "src=" http://s1.51cto.com/wyfs02/M01/7D/49/wKioL1blAsOSH8BUAAZoJ34QmdE027.jpg "style=" float: none; "title=" video playback 1.jpg "alt=" Wkiol1blasosh8buaazoj34qmde027.jpg "/>
650) this.width=650; "src=" http://s4.51cto.com/wyfs02/M00/7D/49/wKioL1blAsyi8s_ZAAbTuMd3y0A127.jpg "style=" float: none; "title=" video playback 2.jpg "alt=" Wkiol1blasyi8s_zaabtumd3y0a127.jpg "/>
5, Shell+ansible realize operation and maintenance automation management
Login https://ip Add normal user, automatic login/switch User launch script
Shell script Landing Interface, the company's leaders require only for application startup and shutdown to do management, fool mode of operation;
650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M02/7D/4B/wKiom1blBE3DUDJpAAHnDNpxHNc169.jpg "style=" float: none; "title=" Automation 1.jpg "alt=" Wkiom1blbe3dudjpaahndnpxhnc169.jpg "/>
Such as: Execution process startup, click 1, require the input of a separate password (to ensure that the hand mistakenly click Error for security verification)
Auto output all applications under current business, enter serial number Select application: 2
Automatically output the current application corresponding IP address, and according to the primary and standby relationship between before and after, 2 select: one, according to the serial number (single application) two, enter 0 (all execution)
Execution: Due to personal environment, IP address is not valid for real and effective error (test environment has passed), according to the same application to start the main and standby relationship, for the system start set 10 seconds interval
650) this.width=650; "src=" http://s1.51cto.com/wyfs02/M00/7D/49/wKioL1blBNzxUYN8AARjpaEhTL4642.jpg "style=" float: none; "title=" Automation -1.jpg "alt=" Wkiol1blbnzxuyn8aarjpaehtl4642.jpg "/>
1-6 operation similar, 7: Springboard machine (is the implementation of SSH login, not deployed Ssh-keygen, through the script definition: ip,user,pass, achieve click Serial Number Login Host "No need to enter a password or yes")
650) this.width=650; "src=" http://s4.51cto.com/wyfs02/M01/7D/49/wKioL1blBN7A3FsEAAG8XGb052o531.jpg "style=" float: none; "title=" Automation -7.jpg "alt=" Wkiol1blbn7a3fseaag8xgb052o531.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/7D/4B/wKiom1blBFmzpsWHAAIugJ17FZM955.jpg "style=" float: none; "title=" Automation 7-1.jpg "alt=" Wkiom1blbfmzpswhaaiugj17fzm955.jpg "/>
650) this.width=650; "src=" http://s1.51cto.com/wyfs02/M00/7D/49/wKioL1blBOSTxLFBAAIsLdtOFdc718.jpg "style=" float: none; "title=" Automation 7-2.jpg "alt=" Wkiol1blbostxlfbaaisldtofdc718.jpg "/>
Ps:shell landing script combined with ansible currently according to the needs of the leadership, no additional features added, such as the need to add remote transmission, to specify the scheduled tasks can be achieved;
This article is from the "Zabbix" blog, make sure to keep this source http://635160051.blog.51cto.com/9865204/1750524
Shell + ansible + gateone automated operation and maintenance management