This repository has been archived by the owner on Mar 24, 2022. It is now read-only.
/
salt-cloud.7
1573 lines (1562 loc) · 47.3 KB
/
salt-cloud.7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
.TH "SALT-CLOUD" "7" "January 21, 2013" "0.8.4" "salt-cloud"
.SH NAME
salt-cloud \- Salt Cloud Documentation
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.\" Man page generated from reStructuredText.
.
.SH VM PROFILES
.sp
Salt cloud designates virtual machines inside the profile configuration file.
The profile configuration file defaults to \fB/etc/salt/cloud.profiles\fP and is a
yaml configuration. The syntax for declaring profiles is simple:
.sp
.nf
.ft C
fedora_rackspace:
provider: rackspace
image: Fedora 17
size: 256 server
script: Fedora
.ft P
.fi
.sp
A few key peices of information need to be declared and can change based on the
public cloud provider. A number of additional parameters can also be inserted:
.sp
.nf
.ft C
centos_rackspace:
provider: rackspace
image: CentOS 6.2
size: 1024 server
script: RHEL6
minion:
master: salt.example.com
grains:
role: webserver
.ft P
.fi
.sp
Some parameters can be specified in the main Salt cloud config file and then
are applied to all cloud profiles. For instance if only a single cloud provider
is being used then the provider option can be declared in the Salt cloud config
file.
.SS Larger Example
.sp
.nf
.ft C
rhel_aws:
provider: aws
image: ami\-e565ba8c
size: Micro Instance
script: RHEL6
minion:
cheese: edam
ubuntu_aws:
provider: aws
image: ami\-7e2da54e
size: Micro Instance
script: Ubuntu
minion:
cheese: edam
ubuntu_rackspace:
provider: rackspace
image: Ubuntu 12.04 LTS
size: 256 server
script: Ubuntu
minion:
cheese: edam
fedora_rackspace:
provider: rackspace
image: Fedora 17
size: 256 server
script: Fedora
minion:
cheese: edam
cent_linode:
provider: linode
image: CentOS 6.2 64bit
size: Linode 512
script: RHEL6
cent_gogrid:
provider: gogrid
image: 12834
size: 512MB
script: RHEL6
cent_joyent:
provider: joyent
image: centos\-6
script: RHEL6
size: Small 1GB
.ft P
.fi
.SH CLOUD MAP FILE
.sp
A number of options exist when creating virtual machines. They can be managed
directly from profiles and the command line execution, or a more complex map
file can be created. The map file allows for a number of virtual machines to
be created and associated with specific profiles.
.sp
Map files have a simple format, specify a profile and then a list of virtual
machines to make from said profile:
.sp
.nf
.ft C
fedora_small:
\- web1
\- web2
\- web3
fedora_high:
\- redis1
\- redis2
\- redis3
cent_high:
\- riak1
\- riak2
\- riak3
.ft P
.fi
.sp
This map file can then be called to roll out all of these virtual machines. Map
files are called from the salt\-cloud command with the \-m option:
.sp
.nf
.ft C
$ salt\-cloud \-m /path/to/mapfile
.ft P
.fi
.sp
Remember, that as with direct profile provisioning the \-P option can be passed
to create the virtual machines in parallel:
.sp
.nf
.ft C
$ salt\-cloud \-m /path/to/mapfile \-P
.ft P
.fi
.sp
A map file can also be enforced to represent the total state of a cloud
deployment by using the \fB\-\-hard\fP option. When using the hard option any vms
that exist but are not specified in the map file will be destroyed:
.sp
.nf
.ft C
$ salt\-cloud \-m /path/to/mapfile \-P \-H
.ft P
.fi
.sp
A map file can include grains:
.sp
.nf
.ft C
fedora_small:
\- web1:
minion:
log_level: debug
grains:
cheese: tasty
omelet: du fromage
\- web2:
minion:
log_level: warn
grains:
cheese: more tasty
omelet: with peppers
.ft P
.fi
.sp
A map file may also be used with the various query options:
.sp
.nf
.ft C
$ salt\-cloud \-m /path/to/mapfile \-Q
{\(aqaws\(aq: {\(aqweb1\(aq: {\(aqid\(aq: \(aqi\-e6aqfegb\(aq,
\(aqimage\(aq: None,
\(aqprivate_ips\(aq: [],
\(aqpublic_ips\(aq: [],
\(aqsize\(aq: None,
\(aqstate\(aq: 0}},
\(aqweb2\(aq: {\(aqAbsent\(aq}}
.ft P
.fi
.sp
...or with the delete option:
.sp
.nf
.ft C
$ salt\-cloud \-m /path/to/mapfile \-d
The following virtual machines are set to be destroyed:
web1
web2
Proceed? [N/y]
.ft P
.fi
.SH WRITING CLOUD PROVIDER MODULES
.sp
Salt cloud runs on a module system similar to the main Salt project. The
modules inside saltcloud exist in the \fBsaltcloud/clouds\fP directory of
the salt\-cloud source.
.sp
Adding a provider requires that a cloud module is created. The cloud module
needs to only impliment a single function \fBcreate\fP, which will accept a
single virtual machine data structure. Whatever functions need to be called
to execute the create function can and should be included in the provider
module.
.sp
A good example to follow for writing a cloud provider module is the module
provided for Linode:
.sp
\fI\%https://github.com/saltstack/salt-cloud/blob/master/saltcloud/clouds/linode.py\fP
.sp
If possible it is prefered that libcloud is used to connect to public cloud
systems, but if libcloud support is not available or another system makes more
sense then by all means, use the other system to connect to the cloud provider.
.SH OS SUPPORT FOR CLOUD VMS
.sp
Salt Cloud works primarily by executing a script on the virtual machines as
soon as they become available. The script that is executed is referenced in
the cloud profile as the \fBscript\fP. In older versions, this was the \fBos\fP
argument. This was changed in 0.8.2.
.sp
A number of legacy scripts exist in the deploy directory in the saltcloud
source tree. The preferred method is currently to use the salt\-bootstrap
script. A stable version is included with each release tarball starting with
0.8.4. The most updated version can be found at:
.sp
\fI\%https://github.com/saltstack/salt-bootstrap\fP
.sp
If you do not specify a script argument, this script will be used at the
default.
.sp
If the Salt Bootstrap script does not meet your needs, you may write your own.
The script should be written in bash and is a Jinja template. Deploy scripts
need to execute a number of functions to do a complete salt setup. These
functions include:
.INDENT 0.0
.IP 1. 3
Install the salt minion. If this can be done via system packages this method
is HIGHLY preferred.
.IP 2. 3
Add the salt minion keys before the minion is started for the first time.
The minion keys are available as strings that can be copied into place in
the Jinja template under the dict named "vm".
.IP 3. 3
Start the salt\-minion daemon and enable it at startup time.
.IP 4. 3
Set up the minion configuration file from the "minion" data available in
the Jinja template.
.UNINDENT
.sp
A good, well commented, example of this process is the Fedora deployment
script:
.sp
\fI\%https://github.com/saltstack/salt-cloud/blob/master/saltcloud/deploy/Fedora.sh\fP
.sp
A number of legacy deploy scripts are included with the release tarball. None
of them are as functional or complete as Salt Bootstrap, and are still included
for academic purposes.
.SS Other Generic Deploy Scripts
.sp
If you want to be assured of always using the latest Salt Bootstrap script,
there are a few generic templates available in the deploy directory of your
saltcloud source tree:
.sp
These are example scripts which were designed to be customized, adapted, and
refit to meet your needs. One important use of them is to pass options to
the salt\-bootstrap script, such as updating to specific git tags.
.SS Post\-Deploy Commands
.sp
Once a minion has been deployed, it has the option to run a salt command. Normally, this would be the state.highstate command, which would finish provisioning the VM. Another common option is state.sls, or for just testing, test.ping. This is configured in the main cloud config file:
.sp
.nf
.ft C
start_action: state.highstate
.ft P
.fi
.sp
This is currently considered to be experimental functionality, and may not work well with all providers. If you experience problems with Salt Cloud hanging after Salt is deployed, consider using Startup States instead:
.sp
\fI\%http://docs.saltstack.org/en/latest/ref/states/startup.html\fP
.SS Skipping the Deploy Script
.sp
For whatever reason, you may want to skip the deploy script altogether. This results in a VM being spun up much faster, with absolutely no configuration. This can be set from the command line:
.sp
.nf
.ft C
salt\-cloud \-\-no\-deploy \-p micro_aws my_instance
.ft P
.fi
.sp
Or it can be set from the main cloud config file:
.sp
.nf
.ft C
deploy: False
.ft P
.fi
.sp
The default for deploy is True.
.sp
In the profile, you may also set the script option to None:
.sp
.nf
.ft C
script: None
.ft P
.fi
.sp
This is the slowest option, since it still uploads the None deploy script and executes it.
.SH CORE CONFIGURATION
.sp
A number of core configuration options and some options that are global to
the vm profiles can be set in the cloud config file. By default this file is
located at \fB/etc/salt/cloud\fP.
.SS Minion Configuration
.sp
The default minion configuration is set up in this file. This is where the
minions that are created derive their configuration.
.sp
.nf
.ft C
minion:
master: saltmaster.example.com
.ft P
.fi
.sp
This is the location in particular to specify the location of the salt master.
.SS Cloud Configurations
.sp
The data specific to interacting with public clouds is set up here.
.SS Rackspace
.sp
Rackspace cloud requires two configuration options:
.sp
.nf
.ft C
RACKSPACE.user: example_user
RACKSPACE.apikey: 123984bjjas87034
.ft P
.fi
.SS Amazon AWS
.sp
A number of configuration options are required for Amazon AWS:
.sp
.nf
.ft C
AWS.id: HJGRYCILJLKJYG
AWS.key: \(aqkdjgfsgm;woormgl/aserigjksjdhasdfgn\(aq
AWS.keyname: test
AWS.securitygroup: quick\-start
AWS.private_key: /root/test.pem
.ft P
.fi
.SS Linode
.sp
Linode requires a single api key, but the default root password also needs
to be set:
.sp
.nf
.ft C
LINODE.apikey: asldkgfakl;sdfjsjaslfjaklsdjf;askldjfaaklsjdfhasldsadfghdkf
LINODE.password: F00barbaz
.ft P
.fi
.sp
The password needs to be 8 characters and contain lowercase, uppercase and
numbers.
.SS Joyent Cloud
.sp
The Joyent cloud requires three configuration paramaters. The user name and
password that are used to log into the Joyent system, and the location of
the private ssh key associated with the Joyent account. The ssh key is needed
to send the provisioning commands up to the freshly created virtual machine,
.sp
.nf
.ft C
JOYENT.user: fred
JOYENT.password: saltybacon
JOYENT.private_key: /root/joyent.pem
.ft P
.fi
.SS GoGrid
.sp
To use Salt Cloud with GoGrid log into the GoGrid web interface and
create an api key. Do this by clicking on "My Account" and then going to the
API Keys tab.
.sp
The GOGRID.apikey and the GOGRID.sharedsecret configuration paramaters need to
be set in the config file to enable interfacing with GoGrid:
.sp
.nf
.ft C
GOGRID.apikey: asdff7896asdh789
GOGRID.sharedsecret: saltybacon
.ft P
.fi
.SS OpenStack
.sp
OpenStack configuration differs between providers, and at the moment several
options need to be specified. This module has been officially tested against
the HP and the Rackspace implementations, and some examples are provided for
both.
.sp
.nf
.ft C
# For HP
OPENSTACK.identity_url: \(aqhttps://region\-a.geo\-1.identity.hpcloudsvc.com:35357/v2.0/\(aq
OPENSTACK.compute_name: Compute
OPENSTACK.compute_region: \(aqaz\-1.region\-a.geo\-1\(aq
OPENSTACK.tenant: myuser\-tenant1
OPENSTACK.user: myuser
OPENSTACK.ssh_key_name: mykey
OPENSTACK.ssh_key_file: \(aq/etc/salt/hpcloud/mykey.pem\(aq
OPENSTACK.password: mypass
# For Rackspace
OPENSTACK.identity_url: \(aqhttps://identity.api.rackspacecloud.com/v2.0/tokens\(aq
OPENSTACK.compute_name: cloudServersOpenStack
OPENSTACK.compute_region: DFW
OPENSTACK.tenant: 5555555
OPENSTACK.user: myuser
OPENSTACK.password: mypass
OPENSTACK.protocol: ipv4
.ft P
.fi
.sp
If you have an API key for your provider, it may be specified instead of a
password:
.sp
.nf
.ft C
OPENSTACK.apikey: 901d3f579h23c8v73q9
.ft P
.fi
.SS IBM SmartCloud Enterprise
.sp
In addition to a username and password, the IBM SCE module requires an SSH key,
which is currently configured inside IBM\(aqs web interface. A location is also
required to create instances, but not to query their cloud. This is important,
because you need to use salt\-cloud \-\-list\-locations (with the other options
already set) in order to find the name of the location that you want to use.
.sp
.nf
.ft C
IBMSCE.user: myuser@mycorp.com
IBMSCE.password: mypass
IBMSCE.ssh_key_name: mykey
IBMSCE.ssh_key_file: \(aq/etc/salt/ibm/mykey.pem\(aq
IBMSCE.location: Raleigh
.ft P
.fi
.SH RELEASE NOTES AND UPGRADE INSTRUCTIONS
.SS Salt Cloud 0.6.0 Release Notes
.sp
The new Salt project, Salt Cloud, is introduced with version 0.6.0. Salt Cloud
has been developed to ease the automation and integration of Salt with public
cloud providers by allowing cloud vms to be cleanly defined, created and
automatically hooked back into a Salt Master.
.sp
While Salt Cloud is primarily made to build cloud vms to tie into a Salt Mater,
it has been created in a generic way, so that it can be used to provision and
hook systems of any type via the familiar Salt modules system.
.sp
This release supports three public cloud providers (all via libcloud),
Amazon EC2, Rackspace Cloud and Linode.
.SS Documentation
.sp
The documentation for Salt Cloud can be found on Read the Docs:
\fI\%http://salt-cloud.readthedocs.org\fP
.SS Download
.sp
Salt Cloud can be downloaded and install via pypi or github:
.sp
\fI\%http://pypi.python.org/packages/source/s/salt-cloud/salt-cloud-0.6.0.tar.gz\fP
.sp
\fI\%https://github.com/downloads/saltstack/salt-cloud/salt-cloud-0.6.0.tar.gz\fP
.sp
Packages are not yet available, Salt Cloud requires three dependencies, the
salt libs, libcloud, and paramiko.
.SS Extensible With Cloud Modules
.sp
The Salt loader system has been employed to make adding support for additional
public cloud systems just as modular and simple as adding support for new
package managers in Salt.
.sp
Adding support for a new cloud provider is extremely simple, just add a cloud
module and everything cleanly links together.
.SS Define VM Profiles
.sp
The way a vms is created is done via profiles. Profiles are used to define what
properties a vm will have, the cloud provider, the size and the image.
.sp
.nf
.ft C
centos_rackspace:
provider: rackspace
image: CentOS 6.2
size: 1024 server
os: RHEL6
minion:
grains:
role: webserver
master: salt.example.com
.ft P
.fi
.sp
This profile will be used to create vms on Rackspace cloud with the CentOS 6.2
image and the Rackspace 1024 vm size. Particulars of the minion config can
also be specified.
.sp
Individual vms can be created from profiles:
.sp
.nf
.ft C
# salt\-cloud \-p centos_rackspace web1
.ft P
.fi
.sp
This command creates a vms with the name web1 on the Rackspace cloud and
connects the new vm to a Salt Master located at salt.example.com. The new VM
has the Salt id of web1.
.SS Define Maps of Profiles
.sp
When it is desired to have a predefined mapping of many, or a specific group
of vms then a cloud map can be defined:
.sp
.nf
.ft C
centos_rackspace:
web1
web2
web3
web4
centos_linode:
redis1
riak1
riak2
riak3
ubuntu_ec2:
dev1
dev2
cassandra1
cassandra2
cassandra3
.ft P
.fi
.sp
This map file will create vms named web 1\-4 using the centos_rackspace profile
on rackspace, the redis and riak vms on linode and the dev and Cassandra vms on
ec2. It can be run with salt\-cloud:
.sp
.nf
.ft C
# salt\-cloud \-m mapfile
.ft P
.fi
.sp
When creating more than one vm the \-P option can be passed, to make the vms
provision in parallel, greatly speeding up large scale expansions of vms.
.SS Salt Cloud 0.7.0 Release Notes
.sp
Salt Cloud marches forward with the 0.7.0 release. As is customary for Salt
Stack projects the 0.7.0 release is intended to be much more robust and
deliver a more complete core feature set. Salt Cloud 0.7.0 is just that.
.sp
With new tools to help look into what is available on cloud providers,
new additions to make cloud management more stateful and the addition of
more supported cloud platforms 0.7.0 has greatly enhanced the capabilities
of the overall Salt platform.
.SS Documentation
.sp
The documentation for Salt Cloud can be found on Read the Docs:
\fI\%http://salt-cloud.readthedocs.org\fP
.SS Download
.sp
Salt Cloud can be downloaded and install via pypi or github:
.sp
\fI\%http://pypi.python.org/packages/source/s/salt-cloud/salt-cloud-0.7.0.tar.gz\fP
.sp
\fI\%https://github.com/downloads/saltstack/salt-cloud/salt-cloud-0.7.0.tar.gz\fP
.sp
Some packages have been made available for salt\-cloud and more on on their
way. Packages for Arch, and FreeBSD are being made available thanks to the
work of Christer Edwards, and packages for RHEL and Fedora are being created
by Clint Savage. Package availability will be announced on the salt mailing list.
.SS New Cloud Provider Support
.sp
The following cloud providers are now supported:
.INDENT 0.0
.TP
.B Amazon AWS
\fI\%http://aws.amazon.com/ec2/\fP
.TP
.B Rackspace Cloud
\fI\%http://www.rackspace.com/cloud/\fP
.TP
.B Linode
\fI\%http://www.linode.com/\fP
.TP
.B Joyent
\fI\%http://joyent.com/\fP
.TP
.B GoGrid
\fI\%http://www.gogrid.com/\fP
.UNINDENT
.SS List Available Resources
.sp
Setting up Salt Cloud requires knowlege of the available sizes and images on
cloud providers. Listing the available images and sizes can now be done with
the salt\-cloud command:
.sp
.nf
.ft C
[root@saltmaster]# salt\-cloud \-\-list\-sizes linode
linode
Linode 1024
bandwidth: 400
disk: 40960
id: 3
name: Linode 1024
ram: 1024
uuid: 56e6f495190cb2ed1a343f7159ad447cf27d906d
Linode 12GB
bandwidth: 2000
disk: 491520
id: 8
name: Linode 12GB
ram: 12288
uuid: 3d1731ebefdbcb4c283957b43d45f89a01f67c5f
Linode 1536
bandwidth: 600
disk: 61440
id: 4
name: Linode 1536
ram: 1536
uuid: f0f28628cc70c5f2656aa3f313588d8509ee3787
Linode 16GB
bandwidth: 2000
disk: 655360
id: 9
name: Linode 16GB
ram: 16384
uuid: 208cc3c0a60c4eab6ed6861344fef0311c13ffd2
Linode 2048
bandwidth: 800
disk: 81920
id: 5
name: Linode 2048
ram: 2048
uuid: 0c9ee69dc7ef7a4cdce71963f8d18e76c61dd57f
Linode 20GB
bandwidth: 2000
disk: 819200
id: 10
name: Linode 20GB
ram: 20480
uuid: e0a7b61e3830a120eec94459c9fc34ef7c9e0e36
Linode 4GB
bandwidth: 1600
disk: 163840
id: 6
name: Linode 4GB
ram: 4096
uuid: 09585e0f1d4ef4aad486cfa3d53f9d8960f575e7
Linode 512
bandwidth: 200
disk: 20480
id: 1
name: Linode 512
ram: 512
uuid: 3497f7def3d6081e6f65ac6e577296bc6b810c05
Linode 768
bandwidth: 300
disk: 30720
id: 2
name: Linode 768
ram: 768
uuid: da9f0dbc144aaa234aa5d555426863c8068a8c70
Linode 8GB
bandwidth: 2000
disk: 327680
id: 7
name: Linode 8GB
ram: 8192
uuid: e08f8a57551297b9310545430c67667f59120606
.ft P
.fi
.SS Destroy!
.sp
Salt Cloud can now destroy cloud vms as easily as it can create them. The new
\fB\-\-destroy\fP option can be passed to end the life of a vm:
.sp
.nf
.ft C
$ salt\-cloud \-d web1
.ft P
.fi
.sp
The map operation can now also destroy vms, the new \fBhard\fP option can be
passed which makes vm maps much more stateful. With the \fBhard\fP option the
vm maps are viewed as the absolute source of information for the state of
cloud resources, and any vm that is not specified in the map file will be
destroyed:
.sp
.nf
.ft C
[root@saltmaster]# salt\-cloud \-m /etc/salt/cloud.map \-H
The following virtual machines are set to be created:
web1
riak4
The following virtual machines are set to be destroyed:
app7
devtest4
Proceed? [N/y]
.ft P
.fi
.SS Salt Cloud 0.8.0 Release Notes
.sp
Salt Cloud has reached another milestone, with the 0.8.0 release. This
release includes many improvements to usability, error handling and general
stability of the product.
.SS Documentation
.sp
The documentation for Salt Cloud can be found on Read the Docs:
\fI\%http://salt-cloud.readthedocs.org\fP
.SS Download
.sp
Salt Cloud can be downloaded and install via pypi or github:
.sp
\fI\%http://pypi.python.org/packages/source/s/salt-cloud/salt-cloud-0.8.0.tar.gz\fP
.sp
\fI\%https://github.com/downloads/saltstack/salt-cloud/salt-cloud-0.8.0.tar.gz\fP
.sp
Some packages have been made available for salt\-cloud and more on on their
way. Packages for Arch, and FreeBSD are being made available thanks to the
work of Christer Edwards, and packages for RHEL and Fedora are being created
by Clint Savage. Package availability will be announced on the salt mailing list.
.SS Increased Formatting Options
.sp
Additional options have been added to salt\-cloud \-Q, to support the same kinds
of formatting already available in Salt:
.sp
.nf
.ft C
\-\-raw\-out
\-\-text\-out
\-\-yaml\-out
\-\-json\-out
\-\-no\-color
.ft P
.fi
.SS More Helpful Error Messages
.sp
As an ongoing effort, we have been cleaning up and adding error messages in an
attempt to make salt\-cloud more helpful when something goes wrong. This
includes displaying messages as they are received from libcloud.
.SS Specify Grains in Map Files
.sp
Previously, map files only had the ability to specify a profile name, and the
node names that would be associated with it. Now you can also specify grains
that will be laid down in each individual node:
.sp
.nf
.ft C
vm_profile:
\- mynodename:
minion:
master: salt\-master
grains:
fromage: tasty
.ft P
.fi
.sp
These grains can also be specified in the profile itself. When this happens,
the grains in map files will override grains in the profile. For example:
.sp
.nf
.ft C
vm_profile:
provider: gogrid
size: 512MB
image: CentOS 6.2 (64\-bit) w/ None
os: RHEL6
minion:
master: salt.mycompany.com
grains:
french: fries
.ft P
.fi
.sp
In this example, mynodename will include grains for both fromage and french,
but the master will be salt\-master, not salt\-mycompany.com.
.SS AWS Improvements
.sp
AWS is much more complex to work with than any of the other supported cloud
providers. As such, additional configuration has been added in order to
accomodate their usage:
.INDENT 0.0
.TP
.B AWS.ssh_username:
Because AWS images can include a variety of different usernames for the
initial login, this option allows you to specify which one(s) to use to
install salt upon firstboot.
.TP
.B AWS.ssh_interface:
AWS instances include both private and public IP addresses. By default,
salt\-cloud will use the public IP to login. In situations where the
salt\-master is also located within AWS, the private IP can be used instead.
.TP
.B AWS.location and AWS.availability_zone:
These options allow you to specify from within salt\-cloud, which AWS
locations your machines spin up in.
.UNINDENT
.SS Ubuntu Fixes
.sp
Ubuntu packages automatically start the service upon installation, and needed
to be handled differently in the deploy script. Configuration is now laid down
before the package is installed, so that the minion can make its initial start
happen with the correct configuration.
.SS Salt Cloud 0.8.1 Release Notes
.sp
In a somewhat quicker timeline than usual, Salt Cloud 0.8.1 has been released!
While many of the updates in this release focus on stability, users of map
files and AWS also have some new features to look forward to.
.SS Documentation
.sp
The documentation for Salt Cloud can be found on Read the Docs:
\fI\%http://salt-cloud.readthedocs.org\fP
.SS Download
.sp
Salt Cloud can be downloaded and install via pypi or github:
.sp
\fI\%http://pypi.python.org/packages/source/s/salt-cloud/salt-cloud-0.8.1.tar.gz\fP
.sp
\fI\%https://github.com/downloads/saltstack/salt-cloud/salt-cloud-0.8.1.tar.gz\fP
.sp
Some packages have been made available for salt\-cloud and more on on their
way. Packages for Arch, and FreeBSD are being made available thanks to the
work of Christer Edwards, and packages for RHEL and Fedora are being created
by Clint Savage. Package availability will be announced on the salt mailing list.
.SS Full Query Option
.sp
The \-Q or \-\-query option only displays a small amount of information about
each virtual machine. This is to keep command\-line reports small and
manageable. Now the \-F or \-\-full\-query option can be used to display all
of the information about a VM that salt\-cloud knows about. The amount of
information returned varies between providers, depending on the kinds of
functionality available through them.
.SS Increased Map Functionality
.sp
Previously, map files were only used for creating VMs. Now they can also be
used to query and delete VMs. The \-Q, \-F and \-d options can all be used in
conjunction with \-m, to display map\-specific data. If a VM that is specified
in the map does not exist, it will still show up under \-Q and \-F as "Absent".
If a VM specified in the map does not exist when a \-d is specified, it will
of course be ignored.
.SS Multiple Security Groups in AWS
.sp
AWS allows for multiple security groups to be applied to any given VM, but
until this release, Salt Cloud only supported managing one. This update allows
a list of security groups to be specified. In the main configuration file, an
example of multiple security groups would look like:
.sp
.nf
.ft C
AWS.securitygroup:
\- default
\- extra
.ft P
.fi
.sp
In a profile, an example would be:
.sp
.nf
.ft C
micro_amazon:
provider: aws
image: ami\-e565ba8c
size: Micro Instance
os: RHEL6
securitygroup:
\- default
\- extra
.ft P
.fi
.SS Bug Fixes
.sp
A number of bugs have been fixed in this release. Most of these were internal
fixes related to authentication and deployment across various providers. Bug
fixes in this release include:
.sp
Ubuntu users may notice that deploying an instance has become significantly
noisier. A change was made to make Ubuntu display information returned as
packages are installed, which is more aligned with how yum\-based machines
already behaved. This also forced these VMs to deploy salt in a much more
reliable manner.
.sp
Requirements listed in requirements.txt are also pulled into setup.py, to make
it easy to use the easy_install tool.
.sp
Most cloud providers default to root as the initial user, but AWS typically
providers a different user (ec2\-user, ubuntu, bitnami, etc). Deployment on
such images must be handled using sudo. Previously, sudo was used to issue
all deployment commands, but this failed on images where sudo was not installed
by default (such as FreeBSD). Now sudo will only be used with non\-root logins.
.SS Salt Cloud 0.8.2 Release Notes
.sp
This is a great release for Salt Cloud! New cloud providers have been added,
and the deploy functionality has been embiggened! Read on to see the cromulent
new features.
.SS Documentation
.sp
The documentation for Salt Cloud can be found on Read the Docs:
\fI\%http://salt-cloud.readthedocs.org\fP
.SS Download
.sp
Salt Cloud can be downloaded and install via pypi or github:
.sp
\fI\%http://pypi.python.org/packages/source/s/salt-cloud/salt-cloud-0.8.2.tar.gz\fP
.sp
\fI\%https://github.com/downloads/saltstack/salt-cloud/salt-cloud-0.8.2.tar.gz\fP
.sp
Some packages have been made available for salt\-cloud and more on on their
way. Packages for Arch, and FreeBSD are being made available thanks to the
work of Christer Edwards, and packages for RHEL and Fedora are being created
by Clint Savage. Package availability will be announced on the salt mailing list.
.SS Select Query Option
.sp
The last release of Salt Cloud added the \-F/\-\-full query option, to display
all information available for a particular instance. We now also have the \-S
or \-\-select\-query option, which lets you specify which fields to display. Any
fields not specified will not be displayed, and if you specify a field that
doesn\(aqt exist on a particular provider, it will be ignored for them. Just
add a query.selection option to /etc/salt/cloud like such:
.sp
.nf
.ft C
query.selection:
\- id
\- state
\- public_ips
\- keyname
\- TOTALXFER
.ft P
.fi
.SS os vs script
.sp
In a cloud profile, you need to specify which deploy script to use to install
Salt on the newly\-provisioned VM. The option for this has always been \(aqos\(aq,
which has been confusing to some. As of this release, you may now specify
\(aqscript\(aq instead of \(aqos\(aq. If you specify both, the value for \(aqscript\(aq will be
used. See the SmartOS Deploy Script below for an example.
.SS SmartOS Deploy Script
.sp
Of particular interest to Joyent users may be the new SmartOS deploy script.
Salt itself is not fully\-supported on SmartOS just yet, in part because ZeroMQ
is also not yet supported. When this script is used for deployment, it will
automatically install the required libraries and build ZeroMQ, and then use
easy_install to install the latest versions of PyZMQ and Salt. To use this,
just specify SmartOS as the \(aqos\(aq or \(aqscript\(aq option in your cloud.profiles:
.sp
.nf
.ft C
joyent_smartos:
provider: joyent
size: Extra Small 512 MB
image: smartos