Build an operations tool based on Jenkins SALT-API

Source: Internet
Author: User
Tags saltstack

1. Installing Salt-master and Salt-minion

The installation process is not mentioned, please refer to http://docs.saltstack.com/en/latest/topics/installation/index.html

2. Installing Salt-api,cherrypy

Used to communicate with Jenkins and salt

Enable Salt-api

In the Salt master configuration file, add

Rest_cherrypy:  port:8010  host:master ipaddress  disable_ssl:true  external_auth:  Pam:    Saltuser:        -. *        -' @runner '        -' @wheel '

This uses the Linux system account to do the verification, add the account Saltuser

3. Deploying Jenkins

Download Http://mirrors.jenkins-ci.org/war/latest/jenkins.war

Configuring the Java Environment

Download tomcat, rename the Jenkins.war to Root.war, and put it in the Tomcat WebApps directory

Add a Salt API extension to Jenkins

wget HTTP://UPDATES.JENKINS-CI.ORG/LATEST/SALTSTACK.HPI

Place the downloaded HPI file in the Tomcat's Jenkins directory

Tomcat/webapps/root/web-inf/plugins

Start Tomcat

4. Configure Jenkins

Login Verification Configuration: System Management-configure Global Security

Please refer to the official instructions to execute the command https://wiki.jenkins-ci.org/display/JENKINS/saltstack-plugin

Next, execute the script.

New--item name here to customize

Select " Build a free-style software project "

Select "Parametric build process" Here you can pass parameters to the shell script

Build Select "Salt"

This demonstrates the method of passing arguments to the script, which can be used to get the parameters in the script $1,$2

Build an operations tool based on Jenkins SALT-API

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.