1. Compile to compile machine
/export/deploy/vm-agent
Execute script
./vm-agent. SH develop-alpha
2. Check that the RPM package is packaged successfully
http://172.18.138.56/x86_64/
3. Check the project configuration file
/export/data/salt/xeniumd/vm-agent/alpha
4. Deploy with salt
Deployment, time-out 30 seconds
Salt-n kvm-alpha-node
Use a command to start a program after deployment is complete
Salt-n kvm-alpha-node "systemctl restart Vm-agent-alpha"
Detects if the status is started after boot is complete
Salt-n kvm-alpha-node "systemctl status Vm-agent-alpha" grep Running
5. Salt other commands
// Push File cp. Get_file Salt://init/win2008.img/etc/aaa// Batch execution command " ls-al"
"Md5sum win2008.img" // batch installation, subject to modification accordingly/export/data/salt/top.slsSalt-N Docker state.highstate/// batch installation good, To check the status of the process "systemctl status Vm-api"grepWC
Salt Automation Deployment