vagrant-softlayer 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (90) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +37 -24
  3. data/QUICKSTART.md +377 -0
  4. data/README.md +25 -20
  5. data/contrib/README.md +8 -1
  6. data/contrib/vagrant-softlayer-boxes +416 -408
  7. data/contrib/vagrant-softlayer-vlans +329 -0
  8. data/contrib/vagrantcloud/CENTOS_5_32.box +0 -0
  9. data/contrib/vagrantcloud/CENTOS_5_64.box +0 -0
  10. data/contrib/vagrantcloud/CENTOS_6_32.box +0 -0
  11. data/contrib/vagrantcloud/CENTOS_6_64.box +0 -0
  12. data/contrib/vagrantcloud/CENTOS_LATEST.box +0 -0
  13. data/contrib/vagrantcloud/CENTOS_LATEST_32.box +0 -0
  14. data/contrib/vagrantcloud/CENTOS_LATEST_64.box +0 -0
  15. data/contrib/vagrantcloud/CLOUDLINUX_5_32.box +0 -0
  16. data/contrib/vagrantcloud/CLOUDLINUX_5_64.box +0 -0
  17. data/contrib/vagrantcloud/CLOUDLINUX_6_32.box +0 -0
  18. data/contrib/vagrantcloud/CLOUDLINUX_6_64.box +0 -0
  19. data/contrib/vagrantcloud/CLOUDLINUX_LATEST.box +0 -0
  20. data/contrib/vagrantcloud/CLOUDLINUX_LATEST_32.box +0 -0
  21. data/contrib/vagrantcloud/CLOUDLINUX_LATEST_64.box +0 -0
  22. data/contrib/vagrantcloud/DEBIAN_5_32.box +0 -0
  23. data/contrib/vagrantcloud/DEBIAN_5_64.box +0 -0
  24. data/contrib/vagrantcloud/DEBIAN_6_32.box +0 -0
  25. data/contrib/vagrantcloud/DEBIAN_6_64.box +0 -0
  26. data/contrib/vagrantcloud/DEBIAN_7_32.box +0 -0
  27. data/contrib/vagrantcloud/DEBIAN_7_64.box +0 -0
  28. data/contrib/vagrantcloud/DEBIAN_LATEST.box +0 -0
  29. data/contrib/vagrantcloud/DEBIAN_LATEST_32.box +0 -0
  30. data/contrib/vagrantcloud/DEBIAN_LATEST_64.box +0 -0
  31. data/contrib/vagrantcloud/REDHAT_5_32.box +0 -0
  32. data/contrib/vagrantcloud/REDHAT_5_64.box +0 -0
  33. data/contrib/vagrantcloud/REDHAT_6_32.box +0 -0
  34. data/contrib/vagrantcloud/REDHAT_6_64.box +0 -0
  35. data/contrib/vagrantcloud/REDHAT_LATEST.box +0 -0
  36. data/contrib/vagrantcloud/REDHAT_LATEST_32.box +0 -0
  37. data/contrib/vagrantcloud/REDHAT_LATEST_64.box +0 -0
  38. data/contrib/vagrantcloud/SL_GENERIC.box +0 -0
  39. data/contrib/vagrantcloud/UBUNTU_10_32.box +0 -0
  40. data/contrib/vagrantcloud/UBUNTU_10_64.box +0 -0
  41. data/contrib/vagrantcloud/UBUNTU_12_32.box +0 -0
  42. data/contrib/vagrantcloud/UBUNTU_12_64.box +0 -0
  43. data/contrib/vagrantcloud/UBUNTU_14_32.box +0 -0
  44. data/contrib/vagrantcloud/UBUNTU_14_64.box +0 -0
  45. data/contrib/vagrantcloud/UBUNTU_8_32.box +0 -0
  46. data/contrib/vagrantcloud/UBUNTU_8_64.box +0 -0
  47. data/contrib/vagrantcloud/UBUNTU_LATEST.box +0 -0
  48. data/contrib/vagrantcloud/UBUNTU_LATEST_32.box +0 -0
  49. data/contrib/vagrantcloud/UBUNTU_LATEST_64.box +0 -0
  50. data/contrib/vagrantcloud/VYATTACE_6.5_64.box +0 -0
  51. data/contrib/vagrantcloud/VYATTACE_6.6_64.box +0 -0
  52. data/contrib/vagrantcloud/VYATTACE_LATEST.box +0 -0
  53. data/contrib/vagrantcloud/VYATTACE_LATEST_64.box +0 -0
  54. data/contrib/vagrantcloud/WIN_2003-DC-SP2-1_32.box +0 -0
  55. data/contrib/vagrantcloud/WIN_2003-DC-SP2-1_64.box +0 -0
  56. data/contrib/vagrantcloud/WIN_2003-ENT-SP2-5_32.box +0 -0
  57. data/contrib/vagrantcloud/WIN_2003-ENT-SP2-5_64.box +0 -0
  58. data/contrib/vagrantcloud/WIN_2003-STD-SP2-5_32.box +0 -0
  59. data/contrib/vagrantcloud/WIN_2003-STD-SP2-5_64.box +0 -0
  60. data/contrib/vagrantcloud/WIN_2008-DC-R2_64.box +0 -0
  61. data/contrib/vagrantcloud/WIN_2008-DC-SP2_32.box +0 -0
  62. data/contrib/vagrantcloud/WIN_2008-DC-SP2_64.box +0 -0
  63. data/contrib/vagrantcloud/WIN_2008-ENT-R2_64.box +0 -0
  64. data/contrib/vagrantcloud/WIN_2008-ENT-SP2_32.box +0 -0
  65. data/contrib/vagrantcloud/WIN_2008-ENT-SP2_64.box +0 -0
  66. data/contrib/vagrantcloud/WIN_2008-STD-R2-SP1_64.box +0 -0
  67. data/contrib/vagrantcloud/WIN_2008-STD-R2_64.box +0 -0
  68. data/contrib/vagrantcloud/WIN_2008-STD-SP2_32.box +0 -0
  69. data/contrib/vagrantcloud/WIN_2008-STD-SP2_64.box +0 -0
  70. data/contrib/vagrantcloud/WIN_2012-DC_64.box +0 -0
  71. data/contrib/vagrantcloud/WIN_2012-STD_64.box +0 -0
  72. data/contrib/vagrantcloud/WIN_LATEST.box +0 -0
  73. data/contrib/vagrantcloud/WIN_LATEST_32.box +0 -0
  74. data/contrib/vagrantcloud/WIN_LATEST_64.box +0 -0
  75. data/lib/vagrant-softlayer/action.rb +20 -16
  76. data/lib/vagrant-softlayer/action/create_instance.rb +24 -8
  77. data/lib/vagrant-softlayer/action/setup_softlayer.rb +2 -1
  78. data/lib/vagrant-softlayer/action/sync_folders.rb +99 -99
  79. data/lib/vagrant-softlayer/action/wait_for_rebuild.rb +36 -36
  80. data/lib/vagrant-softlayer/config.rb +10 -2
  81. data/lib/vagrant-softlayer/errors.rb +33 -29
  82. data/lib/vagrant-softlayer/plugin.rb +77 -77
  83. data/lib/vagrant-softlayer/util/load_balancer.rb +103 -103
  84. data/lib/vagrant-softlayer/util/network.rb +75 -73
  85. data/lib/vagrant-softlayer/util/warden.rb +38 -38
  86. data/lib/vagrant-softlayer/version.rb +5 -5
  87. data/locales/en.yml +6 -0
  88. data/spec/vagrant-softlayer/config_spec.rb +4 -2
  89. data/vagrant-softlayer.gemspec +55 -55
  90. metadata +71 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c83ddb9a29062febbf2842df28099cc1dbe4f708
4
- data.tar.gz: e92ccfbc1c644e357bfb034e49154508dcfe6afa
3
+ metadata.gz: e2bcf85c294e1277c3f0735037d725a097c80573
4
+ data.tar.gz: 55d0ede2bc1d93190be3d4a0b5b6cc3ab7a93907
5
5
  SHA512:
6
- metadata.gz: 899bc21e9166f70a44fc2cf2bf86ad2c3b735660c3f3ca2f47fef903f995d0cd7a174aa59802886ceca8536d8c70d8ec44825a068c60d5f0707fb087d29f7e41
7
- data.tar.gz: d0eb519fa911df1162317b8ae08b63933901ceb92a12589b91edb96bb1abbe1cf1fb61f57b32ddf881f64cbdae0930d7a77c492f8aa640b30413780fd502f205
6
+ metadata.gz: b6c90c5309edcbe1ec5d29b22628a058c715a4b2557654b6df6f2ca7cb8e6b426de4a45aef6e501302bc8effa30a4a002ba696e59d66550ec958996ceb7341b2
7
+ data.tar.gz: cb6f940ee32c41fb277b460fae31e2d2ff40d5dcd6596baf6946a55a0057332c2266f0aba6f6cc61e25973aa50f049e62f54da12ed776f1a9088b5f114c84895
data/CHANGELOG.md CHANGED
@@ -1,24 +1,37 @@
1
- ## 0.3.1 (June 3, 2014)
2
-
3
- BUG FIXES:
4
-
5
- - Lock down softlayer_api gem to 1.0.x
6
-
7
- ## 0.3.0 (April 15, 2014)
8
-
9
- NEW FEATURES:
10
-
11
- - Add selection of disk sizes for templates.
12
- - Add selection of block devices by id.
13
- - Add vagrant-softlayer-boxes contrib tool for creating boxes.
14
- - Add suspend/resume commands.
15
-
16
- ## 0.2.0 (December 5, 2013)
17
-
18
- NEW FEATURES:
19
-
20
- - Automatic joining of local load balancers.
21
-
22
- ## 0.1.0 (November 18, 2013)
23
-
24
- - Initial release.
1
+ ## 0.3.2 (August 1, 2014)
2
+
3
+ ENHANCEMENTS:
4
+
5
+ - Add ability to specify vlans by name or qualified name.
6
+ - Add vagrant-softlayer-vlans contrib tool.
7
+ - Add ability to force private IP address usage.
8
+ - Add quick start guide and Vagrant Cloud boxes.
9
+
10
+ BUG FIXES:
11
+
12
+ - Fix crash on destroy/rebuild when the instance don't exist.
13
+
14
+ ## 0.3.1 (June 3, 2014)
15
+
16
+ BUG FIXES:
17
+
18
+ - Lock down softlayer_api gem to 1.0.x
19
+
20
+ ## 0.3.0 (April 15, 2014)
21
+
22
+ NEW FEATURES:
23
+
24
+ - Add selection of disk sizes for templates.
25
+ - Add selection of block devices by id.
26
+ - Add vagrant-softlayer-boxes contrib tool for creating boxes.
27
+ - Add suspend/resume commands.
28
+
29
+ ## 0.2.0 (December 5, 2013)
30
+
31
+ NEW FEATURES:
32
+
33
+ - Automatic joining of local load balancers.
34
+
35
+ ## 0.1.0 (November 18, 2013)
36
+
37
+ - Initial release.
data/QUICKSTART.md ADDED
@@ -0,0 +1,377 @@
1
+ # vagrant-softlayer Quick Start Guide
2
+
3
+ This is quick start guide to setting up [Vagrant](http://www.vagrantup.com) and the `vagrant-softlayer`
4
+ plugin to build your first Cloud Computing Instance (CCI). While this guide will explain the process,
5
+ it is not intended as a replacement for existing documentation and you should always review the latest
6
+ documentation resources for more in depth coverage or updates as functionality changes quickly:
7
+
8
+ Resource | Description
9
+ ------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
10
+ [Ruby](https://www.ruby-lang.org/en/) | Obligatory Ruby language documentation.
11
+ [Ruby Quick Start](https://www.ruby-lang.org/en/documentation/quickstart/) | Ruby in 20 minutes quick start guide, as its essential to understand some Ruby basics to have a proper grasp for how [Vagrant](http://www.vagrantup.com) and `Vagrantfile`s work.
12
+ [SoftLayer Developer Network](http://sldn.softlayer.com/) | SoftLayer API documentation.
13
+ [Vagrant](http://docs.vagrantup.com/v2/) | [Vagrant](http://www.vagrantup.com) documentation has a lot of sections but its worth a full read to understand what configuration options are available.
14
+ [Vagrant Cloud](https://vagrantcloud.com/) | Source for Vagrant boxes.
15
+ [Vagrant GitHub Issues](https://github.com/mitchellh/vagrant/issues) | A lot of common issues and question are opened and answered here, this is more active than the Vagrant Google Group forum.
16
+ [Vagrant Google Group Forum](https://groups.google.com/forum/#!forum/vagrant-up) | Like `Vagrant GitHub Issues`, this is another good location for finding common pitfalls, bugs, or getting help.
17
+ [Vagrant: Up and Running](http://www.amazon.com/Vagrant-Up-Running-Mitchell-Hashimoto/dp/1449335837) | [Vagrant](http://www.vagrantup.com) book by original dev released by O'Reilly.
18
+ [vagrant-softlayer](https://github.com/audiolize/vagrant-softlayer/) | Provides full documentation on available vagrant-softlayer settings.
19
+ [vagrant-softlayer Contrib Tools](https://github.com/audiolize/vagrant-softlayer/tree/master/contrib) | Provides overview of available tools to assist you with configuring and using `vagrant-softlayer`
20
+ [vagrant-softlayer Load Balancers Configuration](https://github.com/audiolize/vagrant-softlayer/wiki/Join-load-balancers) | `vagrant-softlayer` wiki page describing configuration for adding CCI to a SoftLayer Load Balancer.
21
+ [vagrantbox.es](http://www.vagrantbox.es/) | Source for [Vagrant](http://www.vagrantup.com) boxes.
22
+ [veewee](https://github.com/jedi4ever/veewee) | Veewe is a tool used to create non cloud [Vagrant](http://www.vagrantup.com) boxes.
23
+
24
+ ## Vagrant History and Overiew
25
+
26
+ [Vagrant](http://www.vagrantup.com) is a wrapper around virtualization hypervisors (KVM, VirtualBox, VMWare, etc),
27
+ infrastructure as a server (IaaS) cloud providers/technology (OpenStack, SoftLayer,
28
+ DigitalOcean, Amazon AWS, etc), and configuration management tools (Ansible, Chef,
29
+ Puppet, Salt, etc). While [Vagrant](http://www.vagrantup.com) was originally only designed to support VirtualBox,
30
+ through the use of extensive plugins its feature set has grown and continues to expand.
31
+
32
+ [Vagrant](http://www.vagrantup.com) configuration revolves around 3 major components that are used to define a CCI or
33
+ vm in general on any hypervisor:
34
+
35
+ ### Providers:
36
+
37
+ Provider plugins allow [Vagrant](http://www.vagrantup.com) to abstract away the automation required
38
+ to create a virtual machine on a hypervisor in a way that allows you to specify both the resource
39
+ requirements of the virtual machine (such as memory, cpu, disk, networking, peripherals) but also
40
+ allow the use of hypervisor specific settings to be used for extra configuration.
41
+
42
+ ### Provisioners:
43
+
44
+ Provisioner plugins allow [Vagrant](http://www.vagrantup.com) to abstract away the automation required
45
+ to perform tasks on the virtual machine once its created. Normally this would consist of either triggering
46
+ a configuration management tool, script, or action that then modifies the virtual machine.
47
+
48
+ ### Boxes:
49
+
50
+ [Vagrant](http://www.vagrantup.com) uses boxes as means to provide a pre-configured base from which to create
51
+ virtual machine instances. A box is just a zip or tar archive which contains:
52
+
53
+ * JSON metadata file describing what provider the box supports, what version the box is and other details.
54
+ * `Vagrantfile` which preconfigures the virtual machine instance or provider with specific settings (all of which
55
+ can later be overriden).
56
+ * Virtual disk image files (vmdk, img, vdi, etc) for non cloud providers (such as VirtualBox, VMWare). Since
57
+ [Vagrant](http://www.vagrantup.com) doesnt actually build an OS from scratch using typical install media as is
58
+ done with a manual install, it uses the virtual disk image to effectively clone a machine starting point on the
59
+ hypervisor.
60
+
61
+ ## Install Vagrant
62
+
63
+ [Download](http://www.vagrantup.com/downloads.html) the appropriate [Vagrant](http://www.vagrantup.com)
64
+ installer for your platform and install.
65
+
66
+ ## Install vagrant-softlayer
67
+
68
+ Open a terminal and run the following:
69
+
70
+ `vagrant plugin install vagrant-softlayer`
71
+
72
+ Alternatively you can also do a manual gem install if you manually download it from the RubyGems.org [vagrant-softlayer](http://rubygems.org/gems/vagrant-softlayer)
73
+ gem page:
74
+
75
+ `vagrant plugin install vagrant-softlayer-<version>.gem`
76
+
77
+ For developers wishing to extend and test `vagrant-softlayer`, a gem for manual install with your included changes
78
+ can built by running the following in the main `vagrant-softlayer` project directory:
79
+
80
+ `gem build vagrant-softlayer.gemspec`
81
+
82
+ ## Install Vagrant Boxes
83
+
84
+ [Vagrant](http://www.vagrantup.com) boxes can be installed using a URI (file or web URL) for a box or a [Vagrant Cloud](https://vagrantcloud.com/)
85
+ box label used to download a box from that service.
86
+
87
+ Boxes can be created using the `vagrant-softlayer-boxes` tool located in the `contrib/` folder which is available at
88
+ `~/.vagrant.d/gems/gems/vagrant-softlayer-<version>/contrib/vagrant-softlayer-boxes` or Windows equivalent once you have
89
+ installed `vagrant-softlayer`.
90
+
91
+ If you would like to create boxes for non cloud providers, we recommend taking a look at [veewee](https://github.com/jedi4ever/veewee).
92
+
93
+ To simplify this guide and make manual box install optional, we have added boxes for SoftLayer OS templates to [Vagrant Cloud](https://vagrantcloud.com/):
94
+
95
+ Vagrant Cloud URI | Description
96
+ ----------------------------------- | -----------------------------------------------------------------------------------------------------------------------------------------------------
97
+ ju2wheels/SL_CENTOS_5_32 | CentOS 5 32bit/i386
98
+ ju2wheels/SL_CENTOS_5_64 | CentOS 5 64bit/x86_64
99
+ ju2wheels/SL_CENTOS_6_32 | CentOS 6 32bit/i386
100
+ ju2wheels/SL_CENTOS_6_64 | CentOS 6 64bit/x86_64
101
+ ju2wheels/SL_CENTOS_LATEST_32 | Latest available CentOS 32bit/i386
102
+ ju2wheels/SL_CENTOS_LATEST_64 | Latest available CentOS 64bit/x86_64
103
+ ju2wheels/SL_CENTOS_LATEST | Latest available CentOS
104
+ ju2wheels/SL_CLOUDLINUX_5_32 | CloudLinux 5 32bit/i386
105
+ ju2wheels/SL_CLOUDLINUX_5_64 | CloudLinux 5 64bit/x86_64
106
+ ju2wheels/SL_CLOUDLINUX_6_32 | CloudLinux 6 32bit/i386
107
+ ju2wheels/SL_CLOUDLINUX_6_64 | CloudLinux 6 64bit/x86_64
108
+ ju2wheels/SL_CLOUDLINUX_LATEST_32 | Latest available CloudLinux 32bit/i386
109
+ ju2wheels/SL_CLOUDLINUX_LATEST_64 | Latest available CloudLinux 64bit/x86_64
110
+ ju2wheels/SL_CLOUDLINUX_LATEST | Latest available CloudLinux
111
+ ju2wheels/SL_DEBIAN_5_32 | Debian 5 32bit/i386
112
+ ju2wheels/SL_DEBIAN_5_64 | Debian 5 64bit/x86_64
113
+ ju2wheels/SL_DEBIAN_6_32 | Debian 6 32bit/i386
114
+ ju2wheels/SL_DEBIAN_6_64 | Debian 6 64bit/x86_64
115
+ ju2wheels/SL_DEBIAN_7_32 | Debian 7 32bit/i386
116
+ ju2wheels/SL_DEBIAN_7_64 | Debian 7 64bit/x86_64
117
+ ju2wheels/SL_DEBIAN_LATEST_32 | Latest available Debian 32bit/i386
118
+ ju2wheels/SL_DEBIAN_LATEST_64 | Latest available Debian 64bit/x86_64
119
+ ju2wheels/SL_DEBIAN_LATEST | Latest available Debian
120
+ ju2wheels/SL_REDHAT_5_32 | Red Hat Enterprise Linux 5 32bit/i386
121
+ ju2wheels/SL_REDHAT_5_64 | Red Hat Enterprise Linux 5 64bit/x86_64
122
+ ju2wheels/SL_REDHAT_6_32 | Red Hat Enterprise Linux 6 32bit/i386
123
+ ju2wheels/SL_REDHAT_6_64 | Red Hat Enterprise Linux 6 64bit/x86_64
124
+ ju2wheels/SL_REDHAT_LATEST_32 | Latest available Red Hat Enterprise Linux 32bit/i386
125
+ ju2wheels/SL_REDHAT_LATEST_64 | Latest available Red Hat Enterprise Linux 64bit/x86_64
126
+ ju2wheels/SL_REDHAT_LATEST | Latest available Red Hat Enterprise Linux
127
+ ju2wheels/SL_GENERIC | Generic SoftLayer box with no OS template defined, you will have to explicity set `operating_system`/`disk_capacity` or `image_guid` in your provider
128
+ ju2wheels/SL_UBUNTU_10_32 | Ubuntu 10.04 LTS 32bit/i386
129
+ ju2wheels/SL_UBUNTU_10_64 | Ubuntu 10.04 LTS 64bit/x86_64
130
+ ju2wheels/SL_UBUNTU_12_32 | Ubuntu 12.04 LTS 32bit/i386
131
+ ju2wheels/SL_UBUNTU_12_64 | Ubuntu 12.04 LTS 64bit/x86_64
132
+ ju2wheels/SL_UBUNTU_14_32 | Ubuntu 14.04 LTS 32bit/i386
133
+ ju2wheels/SL_UBUNTU_14_64 | Ubuntu 14.04 LTS 64bit/x86_64
134
+ ju2wheels/SL_UBUNTU_8_32 | Ubuntu 8.04 LTS 32bit/i386
135
+ ju2wheels/SL_UBUNTU_8_64 | Ubuntu 8.04 LTS 64bit/x86_64
136
+ ju2wheels/SL_UBUNTU_LATEST_32 | Latest available Ubuntu 32bit/i386
137
+ ju2wheels/SL_UBUNTU_LATEST_64 | Latest available Ubuntu 64bit/x86_64
138
+ ju2wheels/SL_UBUNTU_LATEST | Latest available Ubuntu
139
+ ju2wheels/SL_VYATTACE_6.5_64 | Vyatta Community Edition 6.5 64bit/x86_64
140
+ ju2wheels/SL_VYATTACE_6.6_64 | Vyatta Community Edition 6.6 64bit/x86_64
141
+ ju2wheels/SL_VYATTACE_LATEST_64 | Latest available Vyatta Community Edition 64bit/x86_64
142
+ ju2wheels/SL_VYATTACE_LATEST | Latest available Vyatta Community Edition
143
+ ju2wheels/SL_WIN_2003-DC-SP2-1_32 | Windows 2003 Datacenter Edition SP2 32bit
144
+ ju2wheels/SL_WIN_2003-DC-SP2-1_64 | Windows 2003 Datacenter Edition SP2 64bit
145
+ ju2wheels/SL_WIN_2003-ENT-SP2-5_32 | Windows 2003 Enterprise Edition SP2 32bit
146
+ ju2wheels/SL_WIN_2003-ENT-SP2-5_64 | Windows 2003 Enterprise Edition SP2 64bit
147
+ ju2wheels/SL_WIN_2003-STD-SP2-5_32 | Windows 2003 Standard Edition SP2 32bit
148
+ ju2wheels/SL_WIN_2003-STD-SP2-5_64 | Windows 2003 Standard Edition SP2 64bit
149
+ ju2wheels/SL_WIN_2008-DC-R2_64 | Windows 2008 R2 Datacenter Edition 64bit
150
+ ju2wheels/SL_WIN_2008-DC-SP2_32 | Windows 2008 Datacenter Edition SP2 32bit
151
+ ju2wheels/SL_WIN_2008-DC-SP2_64 | Windows 2008 Datacenter Edition SP2 64bit
152
+ ju2wheels/SL_WIN_2008-ENT-R2_64 | Windows 2008 R2 Enterprise Edition 64bit
153
+ ju2wheels/SL_WIN_2008-ENT-SP2_32 | Windows 2008 Enterprise Edition SP2 32bit
154
+ ju2wheels/SL_WIN_2008-ENT-SP2_64 | Windows 2008 Enterprise Edition SP2 64bit
155
+ ju2wheels/SL_WIN_2008-STD-R2_64 | Windows 2008 R2 Standard Edition 64bit
156
+ ju2wheels/SL_WIN_2008-STD-R2-SP1_64 | Windows 2008 R2 Standard Edition SP1 64bit
157
+ ju2wheels/SL_WIN_2008-STD-SP2_32 | Windows 2008 Standard Edition SP2 32bit
158
+ ju2wheels/SL_WIN_2008-STD-SP2_64 | Windows 2008 Standard Edition SP2 64bit
159
+ ju2wheels/SL_WIN_2012-DC_64 | Windows 2012 Datacenter Edition 64bit
160
+ ju2wheels/SL_WIN_2012-STD_64 | Windows 2012 Standard Edition 64bit
161
+ ju2wheels/SL_WIN_LATEST_32 | Latest available Windows 32bit
162
+ ju2wheels/SL_WIN_LATEST_64 | Latest available Windows 64bit
163
+ ju2wheels/SL_WIN_LATEST | Latest available Windows
164
+
165
+ Install box from URI:
166
+ `vagrant box add BOXNAME URI`
167
+
168
+ Install box from [Vagrant Cloud](https://vagrantcloud.com/):
169
+ `vagrant box add 'USERNAME/BOXNAME'`
170
+
171
+ ## Vagrant Box Standards vs SoftLayer Standards
172
+
173
+ When creating or using [Vagrant](http://www.vagrantup.com), the accepted community standard is that
174
+ the image be built with a default of having a `vagrant` user, with `vagrant` as the password, and
175
+ the [Vagrant insecure public key](https://github.com/mitchellh/vagrant/blob/master/keys/vagrant.pub)
176
+ applied to the `vagrant` user for ssh (the private key is always available to vagrant under
177
+ `~/.vagrant.d/insecure_private_key`).
178
+
179
+ Since SoftLayer doesnt really use [Vagrant](http://www.vagrantup.com), their image standards are bit
180
+ different. As shown in example template below, it is necessary to change the default user for the OS
181
+ you are using from `vagrant` to `root` (in the case of Linux).
182
+
183
+ If you do not want to use password based logins, you will also have to set your public ssh keys in
184
+ your SoftLayer portal, assign the name labels you set to `sl.ssh_keys`, and the path to their equivalent
185
+ private key half in `cci.ssh.private_key_path`.
186
+
187
+ ## Working with a Vagrantfile to define CCI(s)
188
+
189
+ A `Vagrantfile` is the "configuration" file used by [Vagrant](http://www.vagrantup.com) when performing
190
+ actions against a virtual machine. Although its used as a configuration file, it is really a standard
191
+ Ruby file and anything that can be done in a normal Ruby script can also be accomplished in the
192
+ `Vagrantfile`.
193
+
194
+ A `Vagrantfile` supports two styles of virtual machine definitions, one supports a single virtual machine
195
+ and the other supports specifiying the definition of multiple virtual machines in a single file.
196
+
197
+ Single Virtual Machine:
198
+ ```
199
+ Vagrant.configure("2") do |config|
200
+ # ... vm settings
201
+
202
+ config.vm.provider :softlayer do |sl|
203
+ sl.api_key = "foo"
204
+ sl.username = "bar"
205
+ sl.ssh_key = "Vagrant insecure key"
206
+ end
207
+ end
208
+ ```
209
+
210
+ Multiple Virtual Machines:
211
+ ```
212
+ Vagrant.configure("2") do |config|
213
+ # ... shared vm settings
214
+
215
+ config.vm.define "sl_cci_shorthostname" do |cci|
216
+ cci.vm.provider :softlayer do |sl|
217
+ sl.api_key = "foo"
218
+ sl.username = "bar"
219
+ sl.ssh_key = "Vagrant insecure key"
220
+ end
221
+ end
222
+
223
+ config.vm.define "sl_cci2_shorthostname" do |cci2|
224
+ cci2.vm.provider :softlayer do |sl|
225
+ sl.api_key = "foo"
226
+ sl.username = "bar"
227
+ sl.ssh_key = "Vagrant insecure key"
228
+ end
229
+ end
230
+ end
231
+ ```
232
+
233
+ Lastly, we provide what a more complete template of what a Vagrantfile might contain when creating a CCI:
234
+
235
+ ```
236
+ Vagrant.require_version ">= 1.5.2"
237
+
238
+ Vagrant.configure(2) do |config|
239
+ #See http://docs.vagrantup.com/v2/vagrantfile/vagrant_settings.html
240
+ config.vagrant.host = :detect
241
+
242
+ config.vm.define "sl_cci_shortname" do |cci|
243
+ #See http://docs.vagrantup.com/v2/vagrantfile/index.html
244
+ cci.vm.box = "ju2wheels/SL_GENERIC"
245
+ cci.vm.hostname = "sl-vagrant-cci"
246
+ #cci.vm.boot_timeout = 300
247
+ #cci.vm.box_check_update = false
248
+ #cci.vm.box_download_checksum = nil
249
+ #cci.vm.box_download_checksum_type = nil
250
+ #cci.vm.box_download_client_cert = nil
251
+ #cci.vm.box_download_insecure = false
252
+ #cci.vm.box_url = "https://vagrantcloud.com/ju2wheels/SL_GENERIC/version/1/provider/softlayer.box"
253
+ #cci.vm.box_version = ">=0"
254
+ #cci.vm.graceful_halt_timeout = 300
255
+ #cci.vm.guest = :linux
256
+ #cci.vm.usable_port_range = 2200..2250
257
+
258
+ #See http://docs.vagrantup.com/v2/vagrantfile/ssh_settings.html
259
+ cci.ssh.forward_agent = true
260
+ cci.ssh.forward_x11 = false
261
+ #cci.ssh.guest_port = 22
262
+ #cci.ssh.host = nil #Normally determined by provider
263
+ #cci.ssh.insert_key = true
264
+ #cci.ssh.password = nil
265
+ #cci.ssh.port = 22
266
+ #cci.ssh.private_key_path = [ File.expand_path("~/.ssh/id_rsa") ]
267
+ #cci.ssh.pty = false #Warning this setting is not recommended and can break things, recommended to create flex image with sudoers fixed for problematic distros
268
+ #See https://github.com/audiolize/vagrant-softlayer/issues/11
269
+ #cci.ssh.shell = "bash -l"
270
+ #cci.ssh.username = "vagrant"
271
+
272
+ #Windows specific config options for vagrant-windows plugin
273
+ #cci.windows.halt_check_interval = 1 if Vagrant.has_plugin?("vagrant-windows")
274
+ #cci.windows.halt_timeout = 30 if Vagrant.has_plugin?("vagrant-windows")
275
+ cci.windows.set_work_network = true if Vagrant.has_plugin?("vagrant-windows")
276
+ #cci.winrm.guest_port = 5985 if Vagrant.has_plugin?("vagrant-windows")
277
+ #cci.winrm.host = "localhost" if Vagrant.has_plugin?("vagrant-windows")
278
+ #cci.winrm.max_tries = 20 if Vagrant.has_plugin?("vagrant-windows")
279
+ #cci.winrm.password = "vagrant" if Vagrant.has_plugin?("vagrant-windows")
280
+ #cci.winrm.port = 5985 if Vagrant.has_plugin?("vagrant-windows")
281
+ #cci.winrm.timeout = 1800 if Vagrant.has_plugin?("vagrant-windows")
282
+ cci.winrm.username = "vagrant" if Vagrant.has_plugin?("vagrant-windows")
283
+
284
+ #See http://docs.vagrantup.com/v2/networking/index.html
285
+ #cci.vm.network :forwarded_port, guest: 22, guest_ip: nil, host:2222, host_ip: nil, protocol: "tcp", auto_correct: true
286
+
287
+ #Always put the private network before the public so it matches SoftLayer (when using VirtualBox or other hypervisor), eth0 is private and eth1 public, they are created in order provided
288
+ #cci.vm.network :private_network, type: "dhcp", ip: nil, auto_config: true, virtualbox__intnet: true
289
+ #cci.vm.network :private_network, type: "static", ip: "192.168.10.5", auto_config: true, virtualbox__intnet: "internalnetname"
290
+ #cci.vm.network :public_network, type: "dhcp", ip: nil, auto_config: true, virtualbox__intnet: false, bridge: "wlan0"
291
+ #cci.vm.network :public_network, type: "static", ip: '192.168.1.20', auto_config: true, virtualbox__intnet: false, bridge: "wlan0"
292
+
293
+ #See http://docs.vagrantup.com/v2/synced-folders/basic_usage.html
294
+ #Guest must have NFS, if using VirtualBox there must be a private network with static IP present, may require root privs (it will prompt)
295
+ #cci.vm.synced_folder ".", "/vagrant", disabled: false, create: false, group: "root", owner: "root", type: "nfs", nfs_udp: true, nfs_version: 3, mount_options: []
296
+ #cci.vm.synced_folder ".", "/vagrant", disabled: false, create: false, group: "root", owner: "root", type: "rsync", rsync__args: ["--verbose", "--archive", "--delete", "-z"],
297
+ # rsync__auto: true, rsync__exclude: [ ".vagrant", ".git"], mount_options: []
298
+ #cci.vm.synced_folder ".", "/vagrant", disabled: false, create: false, group: "root", owner: "root", type: "smb", smb_host: nil, smb_username: nil, smb_password: nil, mount_options: []
299
+
300
+ cci.vm.provider :softlayer do |sl, cci_override|
301
+ #Override the default setting only if using this provider
302
+ cci_override.vm.box = "ju2wheels/SL_CENTOS_6_64"
303
+ cci_override.ssh.username = "root"
304
+
305
+ #Note: If you use SL_GENERIC box you must set sl.image_guid or sl.operating_system/sl.dis_capacity, otherwise it is pre-set for you by the box
306
+
307
+ sl.api_key = ENV["SL_API_KEY"]
308
+ #sl.datacenter = nil #Use first available
309
+ #sl.dedicated = false
310
+ #sl.disk_capacity = { 0 => 25 } # { disk_num => capacity_gb }, disk 1 reserved for swap by SoftLayer dont use
311
+ sl.domain = ENV["SL_DOMAIN"]
312
+ #sl.endpoint_url = SoftLayer::API_PUBLIC_ENDPOINT
313
+ #sl.force_private_ip = false
314
+ sl.hostname = cci.vm.hostname
315
+ #sl.hourly_billing = true
316
+ #sl.image_guid = "AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEE" #Dont use this with sl.operating_system/sl.disk_capacity, they are mutually exclusive
317
+ sl.local_disk = false
318
+ #sl.manage_dns = false
319
+ #sl.max_memory = 1024
320
+ #sl.network_speed = 10
321
+ #sl.operating_system = "SL_CENTOS_6_64" #Set in box, here for override or if you used SL_GENERIC, see contrib/vagrant-softlayer-boxes of vagrant-softlayer plugin for box generator
322
+ #sl.post_install = nil #URL for post install script
323
+ #sl.private_only = false
324
+ sl.ssh_keys = [ "SL-root-pk" ]
325
+ #sl.start_cpus = 1
326
+ #sl.user_data = nil
327
+ sl.username = ENV["SL_API_USERNAME"] || ENV['USER'] || ENV['USERNAME']
328
+ #sl.vlan_private = nil #Automatically generated, override to vlan number string otherwise, see contrib/vagrant-softlayer-vlans tool for list of acceptable vlan values
329
+ #sl.vlan_public = nil #Automatically generated, override to vlan number string otherwise
330
+
331
+ #Join a load balancer, see https://github.com/audiolize/vagrant-softlayer/wiki/Join-load-balancers for more options
332
+ #sl.join_load_balancer vip: "1.1.1.1", port: 443, method: "Round Robin", type: "TCP" do |service|
333
+ #service.destination_port = 443
334
+ #service.health_check = "Ping"
335
+ #service.weight = 2
336
+ #end
337
+ end if Vagrant.has_plugin?("SoftLayer")
338
+
339
+ #cci.vm.provision :file do |fileupload|
340
+ # fileupload.source = "/tmp/local_example.txt"
341
+ # fileupload.destination = "/tmp/uploaded_vm_example.txt"
342
+ #end
343
+
344
+ #cci.vm.provision :shell do |shellscript|
345
+ #Use the id to override it somewhere else, and preserve_order ensures it gets executed at the point
346
+ #where it was originally defined instead of where it was overriden.
347
+ # shellscript.inline = "/bin/echo -n 'hello_world' > /dev/null", id: "helloworld", preserve_order: true
348
+ #end
349
+ end
350
+ end
351
+ ```
352
+
353
+ ## Building the CCI using the Vagrantfile
354
+
355
+ Once you have a `Vagrantfile` built up the last step is building your CCI. However, before running the build command,
356
+ there are few important environment variables that [Vagrant](http://www.vagrantup.com) uses which you should be
357
+ aware of:
358
+
359
+ Environment Variable | Recommended Value | Description
360
+ --------------------------- | --------------------------------------------------------- | -----------
361
+ VAGRANT_CWD | UNSET, set as needed | Changes the default CWD where [Vagrant](http://www.vagrantup.com) looks for a `Vagrantfile`
362
+ VAGRANT_DEFAULT_PROVIDER | "softlayer" | Sets the default provider so you dont have to manually specify it as a CLI option to [Vagrant](http://www.vagrantup.com).
363
+ VAGRANT_DEFAULT_PROVISIONER | UNSET, set as needed | Sets the default provisioner so you dont have to manually specify it as a CLI option to [Vagrant](http://www.vagrantup.com).
364
+ VAGRANT_DOTFILE_PATH | "~/.vagrant.d/state/" (Must make this directory manually) | [Vagrant](http://www.vagrantup.com) will normally create a `.vagrant` directory in the CWD to maintain state, to avoid this as we move through different directories with different `Vagrantfile`s, we pin it to the user [Vagrant](http://www.vagrantup.com) directory.
365
+ VAGRANT_HOME | "~/.vagrant.d/" | The default directory where [Vagrant](http://www.vagrantup.com) will install plugins on a per user basis and maintain any related files.
366
+ VAGRANT_LOG | UNSET, set as needed | Sets the default [Vagrant](http://www.vagrantup.com) log level
367
+ VAGRANT_VAGRANTFILE | UNSET, set as needed | Sets the name of the `Vagrantfile` [Vagrant](http://www.vagrantup.com) will use as a configuration file. Can be changed with each execution of [Vagrant](http://www.vagrantup.com) to allow you to maintain multiple `Vagrantfile`s of different names in the same directory.
368
+
369
+ When you run your CCI build command, a few things will happen internally in [Vagrant](http://www.vagrantup.com) (see [Load Order and Merging](http://docs.vagrantup.com/v2/vagrantfile/index.html) ):
370
+
371
+ 1. [Vagrant](http://www.vagrantup.com) will load the `Vagrantfile` associated with the box you specified (if any exists).
372
+ 2. [Vagrant](http://www.vagrantup.com) will load a `Vagrantfile` from your `VAGRANT_HOME` and merge it ontop of the last (if any esits).
373
+ 3. [Vagrant](http://www.vagrantup.com) will load a `Vagrantfile` from `VAGRANT_CWD` and merge it ontop of last (if any exists).
374
+ 4. [Vagrant](http://www.vagrantup.com) then executes the requested command using the merged configuration.
375
+
376
+ Now finally to build your CCI:
377
+ `vagrant up`