salt-cloud.1 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397
  1. .\" Man page generated from reStructuredText.
  2. .
  3. .TH "SALT-CLOUD" "1" "Jan 08, 2019" "2019.2.0" "Salt"
  4. .SH NAME
  5. salt-cloud \- Salt Cloud Command
  6. .
  7. .nr rst2man-indent-level 0
  8. .
  9. .de1 rstReportMargin
  10. \\$1 \\n[an-margin]
  11. level \\n[rst2man-indent-level]
  12. level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
  13. -
  14. \\n[rst2man-indent0]
  15. \\n[rst2man-indent1]
  16. \\n[rst2man-indent2]
  17. ..
  18. .de1 INDENT
  19. .\" .rstReportMargin pre:
  20. . RS \\$1
  21. . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
  22. . nr rst2man-indent-level +1
  23. .\" .rstReportMargin post:
  24. ..
  25. .de UNINDENT
  26. . RE
  27. .\" indent \\n[an-margin]
  28. .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
  29. .nr rst2man-indent-level -1
  30. .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
  31. .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
  32. ..
  33. .sp
  34. Provision virtual machines in the cloud with Salt
  35. .SH SYNOPSIS
  36. .INDENT 0.0
  37. .INDENT 3.5
  38. .sp
  39. .nf
  40. .ft C
  41. salt\-cloud \-m /etc/salt/cloud.map
  42. salt\-cloud \-m /etc/salt/cloud.map NAME
  43. salt\-cloud \-m /etc/salt/cloud.map NAME1 NAME2
  44. salt\-cloud \-p PROFILE NAME
  45. salt\-cloud \-p PROFILE NAME1 NAME2 NAME3 NAME4 NAME5 NAME6
  46. .ft P
  47. .fi
  48. .UNINDENT
  49. .UNINDENT
  50. .SH DESCRIPTION
  51. .sp
  52. Salt Cloud is the system used to provision virtual machines on various public
  53. clouds via a cleanly controlled profile and mapping system.
  54. .SH OPTIONS
  55. .INDENT 0.0
  56. .TP
  57. .B \-\-version
  58. Print the version of Salt that is running.
  59. .UNINDENT
  60. .INDENT 0.0
  61. .TP
  62. .B \-\-versions\-report
  63. Show program\(aqs dependencies and version number, and then exit
  64. .UNINDENT
  65. .INDENT 0.0
  66. .TP
  67. .B \-h, \-\-help
  68. Show the help message and exit
  69. .UNINDENT
  70. .INDENT 0.0
  71. .TP
  72. .B \-c CONFIG_DIR, \-\-config\-dir=CONFIG_dir
  73. The location of the Salt configuration directory. This directory contains
  74. the configuration files for Salt master and minions. The default location
  75. on most systems is \fB/etc/salt\fP\&.
  76. .UNINDENT
  77. .SS Execution Options
  78. .INDENT 0.0
  79. .TP
  80. .B \-L LOCATION, \-\-location=LOCATION
  81. Specify which region to connect to.
  82. .UNINDENT
  83. .INDENT 0.0
  84. .TP
  85. .B \-a ACTION, \-\-action=ACTION
  86. Perform an action that may be specific to this cloud provider. This
  87. argument requires one or more instance names to be specified.
  88. .UNINDENT
  89. .INDENT 0.0
  90. .TP
  91. .B \-f <FUNC\-NAME> <PROVIDER>, \-\-function=<FUNC\-NAME> <PROVIDER>
  92. Perform an function that may be specific to this cloud provider, that does
  93. not apply to an instance. This argument requires a provider to be specified
  94. (i.e.: nova).
  95. .UNINDENT
  96. .INDENT 0.0
  97. .TP
  98. .B \-p PROFILE, \-\-profile=PROFILE
  99. Select a single profile to build the named cloud VMs from. The profile must
  100. be defined in the specified profiles file.
  101. .UNINDENT
  102. .INDENT 0.0
  103. .TP
  104. .B \-m MAP, \-\-map=MAP
  105. Specify a map file to use. If used without any other options, this option
  106. will ensure that all of the mapped VMs are created. If the named VM already
  107. exists then it will be skipped.
  108. .UNINDENT
  109. .INDENT 0.0
  110. .TP
  111. .B \-H, \-\-hard
  112. When specifying a map file, the default behavior is to ensure that all of
  113. the VMs specified in the map file are created. If the \-\-hard option is
  114. set, then any VMs that exist on configured cloud providers that are
  115. not specified in the map file will be destroyed. Be advised that this can
  116. be a destructive operation and should be used with care.
  117. .UNINDENT
  118. .INDENT 0.0
  119. .TP
  120. .B \-d, \-\-destroy
  121. Pass in the name(s) of VMs to destroy, salt\-cloud will search the
  122. configured cloud providers for the specified names and destroy the
  123. VMs. Be advised that this is a destructive operation and should be used
  124. with care. Can be used in conjunction with the \-m option to specify a map
  125. of VMs to be deleted.
  126. .UNINDENT
  127. .INDENT 0.0
  128. .TP
  129. .B \-P, \-\-parallel
  130. Normally when building many cloud VMs they are executed serially. The \-P
  131. option will run each cloud vm build in a separate process allowing for
  132. large groups of VMs to be build at once.
  133. .sp
  134. Be advised that some cloud provider\(aqs systems don\(aqt seem to be well suited
  135. for this influx of vm creation. When creating large groups of VMs watch the
  136. cloud provider carefully.
  137. .UNINDENT
  138. .INDENT 0.0
  139. .TP
  140. .B \-u, \-\-update\-bootstrap
  141. Update salt\-bootstrap to the latest stable bootstrap release.
  142. .UNINDENT
  143. .INDENT 0.0
  144. .TP
  145. .B \-y, \-\-assume\-yes
  146. Default yes in answer to all confirmation questions.
  147. .UNINDENT
  148. .INDENT 0.0
  149. .TP
  150. .B \-k, \-\-keep\-tmp
  151. Do not remove files from /tmp/ after deploy.sh finishes.
  152. .UNINDENT
  153. .INDENT 0.0
  154. .TP
  155. .B \-\-show\-deploy\-args
  156. Include the options used to deploy the minion in the data returned.
  157. .UNINDENT
  158. .INDENT 0.0
  159. .TP
  160. .B \-\-script\-args=SCRIPT_ARGS
  161. Script arguments to be fed to the bootstrap script when deploying the VM.
  162. .UNINDENT
  163. .SS Query Options
  164. .INDENT 0.0
  165. .TP
  166. .B \-Q, \-\-query
  167. Execute a query and return some information about the nodes running on
  168. configured cloud providers
  169. .UNINDENT
  170. .INDENT 0.0
  171. .TP
  172. .B \-F, \-\-full\-query
  173. Execute a query and print out all available information about all cloud VMs.
  174. Can be used in conjunction with \-m to display only information about the
  175. specified map.
  176. .UNINDENT
  177. .INDENT 0.0
  178. .TP
  179. .B \-S, \-\-select\-query
  180. Execute a query and print out selected information about all cloud VMs.
  181. Can be used in conjunction with \-m to display only information about the
  182. specified map.
  183. .UNINDENT
  184. .INDENT 0.0
  185. .TP
  186. .B \-\-list\-providers
  187. Display a list of configured providers.
  188. .UNINDENT
  189. .INDENT 0.0
  190. .TP
  191. .B \-\-list\-profiles
  192. New in version 2014.7.0.
  193. .sp
  194. Display a list of configured profiles. Pass in a cloud provider to view
  195. the provider\(aqs associated profiles, such as \fBdigitalocean\fP, or pass in
  196. \fBall\fP to list all the configured profiles.
  197. .UNINDENT
  198. .SS Cloud Providers Listings
  199. .INDENT 0.0
  200. .TP
  201. .B \-\-list\-locations=LIST_LOCATIONS
  202. Display a list of locations available in configured cloud providers. Pass
  203. the cloud provider that available locations are desired on, aka "linode",
  204. or pass "all" to list locations for all configured cloud providers
  205. .UNINDENT
  206. .INDENT 0.0
  207. .TP
  208. .B \-\-list\-images=LIST_IMAGES
  209. Display a list of images available in configured cloud providers. Pass the
  210. cloud provider that available images are desired on, aka "linode", or pass
  211. "all" to list images for all configured cloud providers
  212. .UNINDENT
  213. .INDENT 0.0
  214. .TP
  215. .B \-\-list\-sizes=LIST_SIZES
  216. Display a list of sizes available in configured cloud providers. Pass the
  217. cloud provider that available sizes are desired on, aka "AWS", or pass
  218. "all" to list sizes for all configured cloud providers
  219. .UNINDENT
  220. .SS Cloud Credentials
  221. .INDENT 0.0
  222. .TP
  223. .B \-\-set\-password=<USERNAME> <PROVIDER>
  224. Configure password for a cloud provider and save it to the keyring.
  225. PROVIDER can be specified with or without a driver, for example:
  226. "\-\-set\-password bob rackspace" or more specific "\-\-set\-password bob
  227. rackspace:openstack" DEPRECATED!
  228. .UNINDENT
  229. .SS Output Options
  230. .INDENT 0.0
  231. .TP
  232. .B \-\-out
  233. Pass in an alternative outputter to display the return of data. This
  234. outputter can be any of the available outputters:
  235. .INDENT 7.0
  236. .INDENT 3.5
  237. \fBgrains\fP, \fBhighstate\fP, \fBjson\fP, \fBkey\fP, \fBoverstatestage\fP, \fBpprint\fP, \fBraw\fP, \fBtxt\fP, \fByaml\fP
  238. .UNINDENT
  239. .UNINDENT
  240. .sp
  241. Some outputters are formatted only for data returned from specific
  242. functions; for instance, the \fBgrains\fP outputter will not work for non\-grains
  243. data.
  244. .sp
  245. If an outputter is used that does not support the data passed into it, then
  246. Salt will fall back on the \fBpprint\fP outputter and display the return data
  247. using the Python \fBpprint\fP standard library module.
  248. .sp
  249. \fBNOTE:\fP
  250. .INDENT 7.0
  251. .INDENT 3.5
  252. If using \fB\-\-out=json\fP, you will probably want \fB\-\-static\fP as well.
  253. Without the static option, you will get a separate JSON string per minion
  254. which makes JSON output invalid as a whole.
  255. This is due to using an iterative outputter. So if you want to feed it
  256. to a JSON parser, use \fB\-\-static\fP as well.
  257. .UNINDENT
  258. .UNINDENT
  259. .UNINDENT
  260. .INDENT 0.0
  261. .TP
  262. .B \-\-out\-indent OUTPUT_INDENT, \-\-output\-indent OUTPUT_INDENT
  263. Print the output indented by the provided value in spaces. Negative values
  264. disable indentation. Only applicable in outputters that support
  265. indentation.
  266. .UNINDENT
  267. .INDENT 0.0
  268. .TP
  269. .B \-\-out\-file=OUTPUT_FILE, \-\-output\-file=OUTPUT_FILE
  270. Write the output to the specified file.
  271. .UNINDENT
  272. .INDENT 0.0
  273. .TP
  274. .B \-\-out\-file\-append, \-\-output\-file\-append
  275. Append the output to the specified file.
  276. .UNINDENT
  277. .INDENT 0.0
  278. .TP
  279. .B \-\-no\-color
  280. Disable all colored output
  281. .UNINDENT
  282. .INDENT 0.0
  283. .TP
  284. .B \-\-force\-color
  285. Force colored output
  286. .sp
  287. \fBNOTE:\fP
  288. .INDENT 7.0
  289. .INDENT 3.5
  290. When using colored output the color codes are as follows:
  291. .sp
  292. \fBgreen\fP denotes success, \fBred\fP denotes failure, \fBblue\fP denotes
  293. changes and success and \fByellow\fP denotes a expected future change in configuration.
  294. .UNINDENT
  295. .UNINDENT
  296. .UNINDENT
  297. .INDENT 0.0
  298. .TP
  299. .B \-\-state\-output=STATE_OUTPUT, \-\-state_output=STATE_OUTPUT
  300. Override the configured state_output value for minion
  301. output. One of \(aqfull\(aq, \(aqterse\(aq, \(aqmixed\(aq, \(aqchanges\(aq or
  302. \(aqfilter\(aq. Default: \(aqnone\(aq.
  303. .UNINDENT
  304. .INDENT 0.0
  305. .TP
  306. .B \-\-state\-verbose=STATE_VERBOSE, \-\-state_verbose=STATE_VERBOSE
  307. Override the configured state_verbose value for minion
  308. output. Set to True or False. Default: none.
  309. .UNINDENT
  310. .SH EXAMPLES
  311. .sp
  312. To create 4 VMs named web1, web2, db1, and db2 from specified profiles:
  313. .INDENT 0.0
  314. .INDENT 3.5
  315. .sp
  316. .nf
  317. .ft C
  318. salt\-cloud \-p fedora_rackspace web1 web2 db1 db2
  319. .ft P
  320. .fi
  321. .UNINDENT
  322. .UNINDENT
  323. .sp
  324. To read in a map file and create all VMs specified therein:
  325. .INDENT 0.0
  326. .INDENT 3.5
  327. .sp
  328. .nf
  329. .ft C
  330. salt\-cloud \-m /path/to/cloud.map
  331. .ft P
  332. .fi
  333. .UNINDENT
  334. .UNINDENT
  335. .sp
  336. To read in a map file and create all VMs specified therein in parallel:
  337. .INDENT 0.0
  338. .INDENT 3.5
  339. .sp
  340. .nf
  341. .ft C
  342. salt\-cloud \-m /path/to/cloud.map \-P
  343. .ft P
  344. .fi
  345. .UNINDENT
  346. .UNINDENT
  347. .sp
  348. To delete any VMs specified in the map file:
  349. .INDENT 0.0
  350. .INDENT 3.5
  351. .sp
  352. .nf
  353. .ft C
  354. salt\-cloud \-m /path/to/cloud.map \-d
  355. .ft P
  356. .fi
  357. .UNINDENT
  358. .UNINDENT
  359. .sp
  360. To delete any VMs NOT specified in the map file:
  361. .INDENT 0.0
  362. .INDENT 3.5
  363. .sp
  364. .nf
  365. .ft C
  366. salt\-cloud \-m /path/to/cloud.map \-H
  367. .ft P
  368. .fi
  369. .UNINDENT
  370. .UNINDENT
  371. .sp
  372. To display the status of all VMs specified in the map file:
  373. .INDENT 0.0
  374. .INDENT 3.5
  375. .sp
  376. .nf
  377. .ft C
  378. salt\-cloud \-m /path/to/cloud.map \-Q
  379. .ft P
  380. .fi
  381. .UNINDENT
  382. .UNINDENT
  383. .SH SEE ALSO
  384. .sp
  385. \fBsalt\-cloud(7)\fP
  386. \fBsalt(7)\fP
  387. \fBsalt\-master(1)\fP
  388. \fBsalt\-minion(1)\fP
  389. .SH AUTHOR
  390. Thomas S. Hatch <thatch45@gmail.com> and many others, please see the Authors file
  391. .\" Generated by docutils manpage writer.
  392. .