vagrant-skytap 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/1-2.diff +965 -0
- data/CHANGELOG.md +2 -84
- data/README.md +129 -244
- data/lib/vagrant-skytap/api/vm.rb +1 -0
- data/lib/vagrant-skytap/errors.rb +4 -0
- data/lib/vagrant-skytap/version.rb +1 -1
- data/locales/en.yml +3 -0
- metadata +3 -3
- data/Gemfile.lock.works +0 -149
data/CHANGELOG.md
CHANGED
@@ -1,85 +1,3 @@
|
|
1
|
-
# 0.5
|
1
|
+
# 0.1.5 (November 6, 2015)
|
2
2
|
|
3
|
-
*
|
4
|
-
[#219](https://github.com/mitchellh/vagrant-aws/pull/219), GH
|
5
|
-
[#205](https://github.com/mitchellh/vagrant-aws/issues/205))
|
6
|
-
* Bug-fix for per region configs with `associate_public_ip` (GH
|
7
|
-
[#237](https://github.com/mitchellh/vagrant-aws/pull/237))
|
8
|
-
* rsyncing folders uses `--delete` flag to better emulate "real shared folders
|
9
|
-
(GH [#194](https://github.com/mitchellh/vagrant-aws/pull/194))
|
10
|
-
* fog gem version bumped to 1.22 (GH [#253](https://github.com/mitchellh/vagrant-aws/pull/253))
|
11
|
-
|
12
|
-
# 0.4.1 (December 17, 2013)
|
13
|
-
|
14
|
-
* Update fog.io to 1.18.0
|
15
|
-
* Fix sync folder user permissions (GH #175)
|
16
|
-
* Fix vagrant < 1.3.0 provisioner compatibility (GH #173)
|
17
|
-
* Add vagrant 1.4.0 multiple SSH key support (GH #172)
|
18
|
-
* Fix EIP deallocation bug (GH #164)
|
19
|
-
* Add (per shared folder) rsync exclude flag (GH #156)
|
20
|
-
|
21
|
-
# 0.4.0 (October 11, 2013)
|
22
|
-
|
23
|
-
* Handle EIP allocation error (GH #134)
|
24
|
-
* Implement halt and reload (GH #31)
|
25
|
-
* rsync ignores Vagrantfile
|
26
|
-
* warn if none of the security groups allows incoming SSH
|
27
|
-
* bump fog.io to 1.15.0
|
28
|
-
* Fix rsync on windows (GH #77)
|
29
|
-
* Add `ssh_host_attribute` config (GH #143)
|
30
|
-
|
31
|
-
# 0.3.0 (September 2, 2013)
|
32
|
-
|
33
|
-
* Parallelize multi-machine up on Vagrant 1.2+
|
34
|
-
* Show proper configuration errors if an invalid configuration key
|
35
|
-
is used.
|
36
|
-
* Request confirmation on `vagrant destroy`, like normal VirtualBox + Vagrant.
|
37
|
-
* If user data is configured, output is shown on "vagrant up" that
|
38
|
-
it is being set.
|
39
|
-
* Add EIP support (GH #65)
|
40
|
-
* Add block device mapping support (GH #93)
|
41
|
-
* README improvements (GH #120)
|
42
|
-
* Fix missing locale message (GH #73)
|
43
|
-
* SyncFolders creates hostpath if it doesn't exist and `:create` option is set (GH #17)
|
44
|
-
* Add IAM Instance Profile support (GH #68)
|
45
|
-
* Add shutdown behavior support (GH #125,#131)
|
46
|
-
|
47
|
-
# 0.2.2 (April 18, 2013)
|
48
|
-
|
49
|
-
* Fix crashing bug with incorrect provisioner arguments.
|
50
|
-
|
51
|
-
# 0.2.1 (April 16, 2013)
|
52
|
-
|
53
|
-
* Got rid of extranneous references to old SSH settings.
|
54
|
-
|
55
|
-
# 0.2.0 (April 16, 2013)
|
56
|
-
|
57
|
-
* Add support for `vagrant ssh -c` [GH-42]
|
58
|
-
* Ability to specify a timeout for waiting for instances to become ready. [GH-44]
|
59
|
-
* Better error message if instance didn't become ready in time.
|
60
|
-
* Connection can now be done using IAM profiles. [GH-41]
|
61
|
-
|
62
|
-
# 0.1.3 (April 9, 2013)
|
63
|
-
|
64
|
-
* The `AWS_ACCESS_KEY` and `AWS_SECRET_KEY` will be used if available
|
65
|
-
and no specific keys are set in the Vagrantfile. [GH-33]
|
66
|
-
* Fix issues with SSH on VPCs, the correct IP is used. [GH-30]
|
67
|
-
* Exclude the ".vagrant" directory from rsync.
|
68
|
-
* Implement `:disabled` flag support for shared folders. [GH-29]
|
69
|
-
* `aws.user_data` to specify user data on the instance. [GH-26]
|
70
|
-
|
71
|
-
# 0.1.2 (March 22, 2013)
|
72
|
-
|
73
|
-
* Choose the proper region when connecting to AWS. [GH-9]
|
74
|
-
* Configurable SSH port. [GH-13]
|
75
|
-
* Support other AWS-compatible API endpoints with `config.endpoint`
|
76
|
-
and `config.version`. [GH-6]
|
77
|
-
* Disable strict host key checking on rsync so known hosts aren't an issue. [GH-7]
|
78
|
-
|
79
|
-
# 0.1.1 (March 18, 2013)
|
80
|
-
|
81
|
-
* Up fog dependency for Vagrant 1.1.1
|
82
|
-
|
83
|
-
# 0.1.0 (March 14, 2013)
|
84
|
-
|
85
|
-
* Initial release.
|
3
|
+
* Initial beta release.
|
data/README.md
CHANGED
@@ -1,292 +1,177 @@
|
|
1
|
-
# Vagrant AWS Provider
|
2
1
|
|
3
|
-
|
4
|
-
[
|
5
|
-
[![Dependency Status](https://gemnasium.com/mitchellh/vagrant-aws.png)][gemnasium]
|
6
|
-
</span>
|
2
|
+
# Skytap Provider for Vagrant (Beta)
|
3
|
+
The Skytap Vagrant provider is a [Vagrant](http://vagrantup.com) plugin for creating, provisioning, and controlling VMs on the [Skytap](http://www.skytap.com) cloud computing platform. It allows you to:
|
7
4
|
|
8
|
-
|
9
|
-
|
5
|
+
* Create multi-VM environments using source VMs from one or more Skytap templates
|
6
|
+
* SSH into the instances
|
7
|
+
* Customize hardware settings via the Vagrantfile
|
8
|
+
* Sync folders between your local machine and Skytap VMs via NFS
|
10
9
|
|
11
|
-
This
|
12
|
-
provider to Vagrant, allowing Vagrant to control and provision machines in
|
13
|
-
EC2 and VPC.
|
10
|
+
**NOTE:** This plugin requires Vagrant 1.2+ and Ruby 2.0 or greater.
|
14
11
|
|
15
|
-
|
12
|
+
## Concepts
|
16
13
|
|
17
|
-
|
14
|
+
Skytap [environments](http://help.skytap.com/#Getting_Started_with_Environments.html) map neatly onto Vagrant multi-machine environments. An environment contains one or more VMs, and may also contain networks for the VMs to connect to. Environments may be snapshotted as [templates](http://help.skytap.com/#Templates.html), which can then be used to create new environments. The Skytap [public template library](http://help.skytap.com/#Public_Templates.html) is a collection of templates containing a variety of pre-configured VMs.
|
18
15
|
|
19
|
-
* Boot EC2 or VPC instances.
|
20
|
-
* SSH into the instances.
|
21
|
-
* Provision the instances with any built-in Vagrant provisioner.
|
22
|
-
* Minimal synced folder support via `rsync`.
|
23
|
-
* Define region-specifc configurations so Vagrant can manage machines
|
24
|
-
in multiple regions.
|
25
16
|
|
26
|
-
## Usage
|
27
17
|
|
28
|
-
|
29
|
-
installing, `vagrant up` and specify the `aws` provider. An example is
|
30
|
-
shown below.
|
18
|
+
## Before You Begin
|
31
19
|
|
32
|
-
|
33
|
-
$ vagrant plugin install vagrant-aws
|
34
|
-
...
|
35
|
-
$ vagrant up --provider=aws
|
36
|
-
...
|
37
|
-
```
|
20
|
+
Before you begin, make sure you have:
|
38
21
|
|
39
|
-
|
40
|
-
|
22
|
+
* Ruby 2.0 or higher installed on your local machine
|
23
|
+
* The latest version of Vagrant installed on your local machine (available from [https://www.vagrantup.com/](https://www.vagrantup.com/))
|
24
|
+
* A Skytap username and API token from the "My Account" page
|
25
|
+
* A Skytap VPN in the region where you'll be creating environments; a NAT-enabled VPN is recommended.
|
41
26
|
|
42
|
-
|
27
|
+
To check if a VPN is available, navigate to a Skytap environment in the region and open the network settings. If the **VPN** section is visible in the network settings, a VPN is available. If you do not have a Skytap VPN, work with your Skytap administrator to create one. For instructions, see [Creating a VPN Connection to an External Network](Vpns.html).
|
43
28
|
|
44
|
-
|
45
|
-
started is to actually use a dummy AWS box and specify all the details
|
46
|
-
manually within a `config.vm.provider` block. So first, add the dummy
|
47
|
-
box using any name you want:
|
29
|
+
## Installing the Skytap Provider and Starting Your First Environment
|
48
30
|
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
31
|
+
1. Ensure that your local machine is on one of your Skytap VPN's remote subnets.
|
32
|
+
1. To install the provider, type the following at the command line:
|
33
|
+
`vagrant plugin install vagrant-skytap`
|
34
|
+
1. Create a new directory.
|
35
|
+
1. Create a file called Vagrantfile (with no file extension) containing the following. This Vagrantfile describes a Skytap environment containing a single VM, using the source VM indicated by the `vm_url` setting (a generic Ubuntu 14.04 server in the US-West region) and upgrading it to 2 CPUs.
|
36
|
+
```
|
37
|
+
Vagrant.configure(2) do |config|
|
38
|
+
config.vm.box = "skytap/empty"
|
53
39
|
|
54
|
-
|
55
|
-
|
40
|
+
config.vm.provider :skytap do |skytap, override|
|
41
|
+
skytap.username = "<username>"
|
42
|
+
skytap.api_token = "<api_token>"
|
43
|
+
end
|
56
44
|
|
57
|
-
|
58
|
-
|
59
|
-
|
45
|
+
config.vm.define "web" do |server|
|
46
|
+
server.vm.provider :skytap do |box|
|
47
|
+
box.vm_url = "https://cloud.skytap.com/vms/3157858"
|
48
|
+
box.cpus = 2
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
```
|
53
|
+
1. Update the `username` and `api_token` settings and save the file.
|
54
|
+
If you don't want to store your username and API token in the Vagrantfile, you can set them in the environment variables `VAGRANT_SKYTAP_USERNAME` and `VAGRANT_SKYTAP_API_TOKEN`.
|
55
|
+
1. Navigate to the directory containing the Vagrantfile and enter the following at the command line:
|
56
|
+
`vagrant up --provider skytap`
|
57
|
+
Vagrant will create a new Skytap environment containing the VM,.
|
58
|
+
1. When prompted by Vagrant, select the VPN for the region you want to connect to.
|
59
|
+
1. Choose "skytap" as the user login for the VM.
|
60
|
+
1. Wait for `vagrant up` to complete, then do `vagrant ssh` to verify that you can access the new VM.
|
60
61
|
|
61
|
-
config.vm.provider :aws do |aws, override|
|
62
|
-
aws.access_key_id = "YOUR KEY"
|
63
|
-
aws.secret_access_key = "YOUR SECRET KEY"
|
64
|
-
aws.keypair_name = "KEYPAIR NAME"
|
65
62
|
|
66
|
-
aws.ami = "ami-7747d01e"
|
67
63
|
|
68
|
-
|
69
|
-
override.ssh.private_key_path = "PATH TO YOUR PRIVATE KEY"
|
70
|
-
end
|
71
|
-
end
|
72
|
-
```
|
64
|
+
## Supported Commands
|
73
65
|
|
74
|
-
|
75
|
-
|
76
|
-
This will start an Ubuntu 12.04 instance in the us-east-1 region within
|
77
|
-
your account. And assuming your SSH information was filled in properly
|
78
|
-
within your Vagrantfile, SSH and provisioning will work as well.
|
79
|
-
|
80
|
-
Note that normally a lot of this boilerplate is encoded within the box
|
81
|
-
file, but the box file used for the quick start, the "dummy" box, has
|
82
|
-
no preconfigured defaults.
|
83
|
-
|
84
|
-
If you have issues with SSH connecting, make sure that the instances
|
85
|
-
are being launched with a security group that allows SSH access.
|
86
|
-
|
87
|
-
## Box Format
|
88
|
-
|
89
|
-
Every provider in Vagrant must introduce a custom box format. This
|
90
|
-
provider introduces `aws` boxes. You can view an example box in
|
91
|
-
the [example_box/ directory](https://github.com/mitchellh/vagrant-aws/tree/master/example_box).
|
92
|
-
That directory also contains instructions on how to build a box.
|
93
|
-
|
94
|
-
The box format is basically just the required `metadata.json` file
|
95
|
-
along with a `Vagrantfile` that does default settings for the
|
96
|
-
provider-specific configuration for this provider.
|
97
|
-
|
98
|
-
## Configuration
|
99
|
-
|
100
|
-
This provider exposes quite a few provider-specific configuration options:
|
101
|
-
|
102
|
-
* `access_key_id` - The access key for accessing AWS
|
103
|
-
* `ami` - The AMI id to boot, such as "ami-12345678"
|
104
|
-
* `availability_zone` - The availability zone within the region to launch
|
105
|
-
the instance. If nil, it will use the default set by Amazon.
|
106
|
-
* `instance_ready_timeout` - The number of seconds to wait for the instance
|
107
|
-
to become "ready" in AWS. Defaults to 120 seconds.
|
108
|
-
* `instance_type` - The type of instance, such as "m3.medium". The default
|
109
|
-
value of this if not specified is "m3.medium". "m1.small" has been
|
110
|
-
deprecated in "us-east-1" and "m3.medium" is the smallest instance
|
111
|
-
type to support both paravirtualization and hvm AMIs
|
112
|
-
* `keypair_name` - The name of the keypair to use to bootstrap AMIs
|
113
|
-
which support it.
|
114
|
-
* `private_ip_address` - The private IP address to assign to an instance
|
115
|
-
within a [VPC](http://aws.amazon.com/vpc/)
|
116
|
-
* `region` - The region to start the instance in, such as "us-east-1"
|
117
|
-
* `secret_access_key` - The secret access key for accessing AWS
|
118
|
-
* `security_groups` - An array of security groups for the instance. If this
|
119
|
-
instance will be launched in VPC, this must be a list of security group
|
120
|
-
Name.
|
121
|
-
* `iam_instance_profile_arn` - The Amazon resource name (ARN) of the IAM Instance
|
122
|
-
Profile to associate with the instance
|
123
|
-
* `iam_instance_profile_name` - The name of the IAM Instance Profile to associate
|
124
|
-
with the instance
|
125
|
-
* `subnet_id` - The subnet to boot the instance into, for VPC.
|
126
|
-
* `associate_public_ip` - If true, will associate a public IP address to an instance in a VPC.
|
127
|
-
* `tags` - A hash of tags to set on the machine.
|
128
|
-
* `use_iam_profile` - If true, will use [IAM profiles](http://docs.aws.amazon.com/IAM/latest/UserGuide/instance-profiles.html)
|
129
|
-
for credentials.
|
130
|
-
* `block_device_mapping` - Amazon EC2 Block Device Mapping Property
|
131
|
-
|
132
|
-
These can be set like typical provider-specific configuration:
|
133
|
-
|
134
|
-
```ruby
|
135
|
-
Vagrant.configure("2") do |config|
|
136
|
-
# ... other stuff
|
137
|
-
|
138
|
-
config.vm.provider :aws do |aws|
|
139
|
-
aws.access_key_id = "foo"
|
140
|
-
aws.secret_access_key = "bar"
|
141
|
-
end
|
142
|
-
end
|
143
|
-
```
|
66
|
+
For the most part these behave identically to the builtin Vagrant commands.
|
144
67
|
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
68
|
+
| Vagrant Command | Skytap Action |
|
69
|
+
|:----------------------------------------------|----------------|
|
70
|
+
| `vagrant destroy [<vm_name>, <vm_name>]` | Delete an environment or VM(s)|
|
71
|
+
| `vagrant global-status` | Show the status of all Vagrant-managed VMs on the host machine; this includes VMs from other Vagrant providers|
|
72
|
+
| `vagrant halt [<vm_name>, <vm_name>]` | Shut down an environment or VM(s). Any VMs which do not shut down gracefully will be powered off.|
|
73
|
+
| `vagrant halt [<vm_name>, <vm_name>] --force` | Power off an environment or VM(s) without performing a graceful shutdown|
|
74
|
+
| `vagrant help` | Display the standard help information|
|
75
|
+
| `vagrant reload [<vm_name>, <vm_name>]` | Shut down and then run an environment or VM(s); this is equivalent to `vagrant halt` followed by `vagrant up.`|
|
76
|
+
| `vagrant resume [<vm_name>, <vm_name>]` | Runs one or more suspended VM(s)|
|
77
|
+
| `vagrant ssh [<vm_name>]` | Begin an SSH session with a VM|
|
78
|
+
| `vagrant ssh-config [<vm_name>, <vm_name>]` | Generate an OpenSSH configuration file based on the VM settings |
|
79
|
+
| `vagrant status [<vm_name>, <vm_name>]` | Show the runstate of one or more VM(s)|
|
80
|
+
| `vagrant suspend [<vm_name>, <vm_name>]` | Suspend an environment or VM(s)|
|
81
|
+
| `vagrant up [<vm_name>, <vm_name>]` | Run an environment or VM(s), creating them from settings in the Vagrantfile if they do not already exist.|
|
149
82
|
|
150
|
-
|
151
|
-
|
152
|
-
|
83
|
+
Notes:
|
84
|
+
* When the first VM is created, a Skytap environment will be created; when all VMs are deleted, the containing environment will also be deleted.
|
85
|
+
* The timeout for graceful shutdown is currently set to 5 minutes.
|
86
|
+
* Changes to hardware settings of an existing VM will take effect when the VM is being powered on; that is, when doing `vagrant reload`, or `vagrant up` when the machine is halted.
|
153
87
|
|
154
|
-
config.vm.provider :aws do |aws|
|
155
|
-
aws.access_key_id = "foo"
|
156
|
-
aws.secret_access_key = "bar"
|
157
|
-
aws.region = "us-east-1"
|
158
88
|
|
159
|
-
|
160
|
-
aws.region_config "us-east-1", :ami => "ami-12345678"
|
89
|
+
## Additional Supported Actions
|
161
90
|
|
162
|
-
|
163
|
-
aws.region_config "us-west-2" do |region|
|
164
|
-
region.ami = "ami-87654321"
|
165
|
-
region.keypair_name = "company-west"
|
166
|
-
end
|
167
|
-
end
|
168
|
-
end
|
169
|
-
```
|
170
|
-
|
171
|
-
The region-specific configurations will override the top-level
|
172
|
-
configurations when that region is used. They otherwise inherit
|
173
|
-
the top-level configurations, as you would probably expect.
|
91
|
+
### Edit the VM Settings
|
174
92
|
|
175
|
-
|
93
|
+
1. Edit the VM definitions in the Vagrantfile.
|
94
|
+
2. Use `vagrant up` (if the VMs are halted) or `vagrant reload` to apply updates.
|
176
95
|
|
177
|
-
|
178
|
-
supported with `vagrant-aws`, currently. If any of these are
|
179
|
-
specified, Vagrant will emit a warning, but will otherwise boot
|
180
|
-
the AWS machine.
|
96
|
+
### Add VM(s) to an Environment
|
181
97
|
|
182
|
-
|
98
|
+
1. Add new definitions for the VMs to the Vagrantfile.
|
99
|
+
2. Use `vagrant up` to create the new VMs
|
183
100
|
|
184
|
-
|
185
|
-
`vagrant reload`, and `vagrant provision`, the AWS provider will use
|
186
|
-
`rsync` (if available) to uni-directionally sync the folder to
|
187
|
-
the remote machine over SSH.
|
101
|
+
### Remove VM(s) from an Environment
|
188
102
|
|
189
|
-
|
190
|
-
|
103
|
+
1. Use `vagrant destroy` to delete the Skytap VM.
|
104
|
+
2. Remove the VM definition from the Vagrantfile. See [Creating a Vagrantfile](Vagrantfile.html).
|
191
105
|
|
192
|
-
|
106
|
+
### Sync Local Folders with the VM's Folders using NFS
|
193
107
|
|
194
|
-
|
195
|
-
Vagrant.configure("2") do |config|
|
196
|
-
# ... other stuff
|
197
|
-
|
198
|
-
config.vm.synced_folder ".", "/vagrant", type: "rsync", :rsync_excludes => ['bar/', 'foo/']
|
199
|
-
end
|
108
|
+
The Skytap Vagrant provider supports Vagrant's built-in NFS sharing facility. In the following example, a local directory `~/web_files` will be visible on the VM at the path `/synced`.
|
200
109
|
```
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
```ruby
|
209
|
-
Vagrant.configure("2") do |config|
|
210
|
-
# ... other stuff
|
211
|
-
|
212
|
-
config.vm.provider "aws" do |aws|
|
213
|
-
aws.tags = {
|
214
|
-
'Name' => 'Some Name',
|
215
|
-
'Some Key' => 'Some Value'
|
216
|
-
}
|
110
|
+
config.vm.define "web" do |server|
|
111
|
+
server.vm.provider :skytap do |box|
|
112
|
+
box.vm_url = "https://cloud.skytap.com/vms/3157858"
|
113
|
+
# ...
|
114
|
+
end
|
115
|
+
server.vm.synced_folder "~/web_files", "/synced", type: :nfs
|
217
116
|
end
|
218
|
-
end
|
219
117
|
```
|
118
|
+
For more information, see Vagrant's documentation at [https://docs.vagrantup.com/v2/synced-folders/index.html](https://docs.vagrantup.com/v2/synced-folders/index.html).
|
220
119
|
|
221
|
-
|
222
|
-
|
223
|
-
You can specify user data for the instance being booted.
|
224
|
-
|
225
|
-
```ruby
|
226
|
-
Vagrant.configure("2") do |config|
|
227
|
-
# ... other stuff
|
228
|
-
|
229
|
-
config.vm.provider "aws" do |aws|
|
230
|
-
# Option 1: a single string
|
231
|
-
aws.user_data = "#!/bin/bash\necho 'got user data' > /tmp/user_data.log\necho"
|
232
|
-
|
233
|
-
# Option 2: use a file
|
234
|
-
aws.user_data = File.read("user_data.txt")
|
235
|
-
end
|
236
|
-
end
|
120
|
+
## Multi-machine Example
|
121
|
+
The following defines two VMs in a single environment. Both are based on the same Ubuntu template as above, but have different hardware settings. Since the source VM in the public library template is connected to a network, both of the VMs in the new environment will be connected to a single network.
|
237
122
|
```
|
123
|
+
config.vm.define "web" do |server|
|
124
|
+
server.vm.provider :skytap do |box|
|
125
|
+
box.vm_url = "https://cloud.skytap.com/vms/3157858"
|
126
|
+
box.cpus = 2
|
127
|
+
box.cpuspersocket = 1
|
128
|
+
box.ram = 1024
|
129
|
+
end
|
130
|
+
server.vm.synced_folder "~/web_files", "/synced", type: :nfs
|
131
|
+
end
|
238
132
|
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
config.vm.provider "aws" do |aws|
|
248
|
-
aws.block_device_mapping = [{ 'DeviceName' => '/dev/sda1', 'Ebs.VolumeSize' => 50 }]
|
133
|
+
config.vm.define "db" do |server|
|
134
|
+
server.vm.provider :skytap do |box|
|
135
|
+
box.vm_url = "https://cloud.skytap.com/vms/3157858"
|
136
|
+
box.cpus = 8
|
137
|
+
box.cpuspersocket = 4
|
138
|
+
box.ram = 8192
|
139
|
+
end
|
140
|
+
server.vm.synced_folder "~/db_files", "/synced", type: :nfs
|
249
141
|
end
|
250
|
-
end
|
251
142
|
```
|
252
143
|
|
253
|
-
|
144
|
+
## Skytap-specific Vagrantfile Settings
|
254
145
|
|
255
|
-
|
146
|
+
|Setting |Required?|Description|
|
147
|
+
|----------------------|:-------:|-----------|
|
148
|
+
|vm_url | yes | The URL of the source VM to use when creating a new VM.|
|
149
|
+
|cpus | no | Number of CPUs (more specifically, the number of virtual cores).|
|
150
|
+
|cpuspersocket | no | Number of virtual cores per processor.|
|
151
|
+
|ram | no | RAM (megabytes).|
|
152
|
+
|guestos | no | The VMware guest OS for the virtual machine.|
|
256
153
|
|
257
|
-
|
258
|
-
|
259
|
-
|
154
|
+
Notes:
|
155
|
+
* Source VMs must come from a template, not an environment, and they must be saved in the powered off state.
|
156
|
+
* Multi-machine environments may use source VMs from multiple templates, from your customer account and/or the public template library, as long as all are in the same region. Your user account must have permissions to see the templates containing the source VMs.
|
157
|
+
* `cpus` must be evenly divisible by `cpuspersocket`. Two quad-core processors have a total of 8 virtual cores, so the `cpus` value would be 8. (Most VMs in the public template library are single-core.)
|
158
|
+
* The `guestos` setting is distinct from from Vagrant's `config.vm.guest` setting.
|
260
159
|
|
261
|
-
|
262
|
-
|
263
|
-
end
|
264
|
-
end
|
265
|
-
```
|
266
|
-
|
267
|
-
## Development
|
160
|
+
## Login Credentials
|
161
|
+
In addition to setting username and password in the Vagrantfile with `config.ssh.username` and `config.ssh.password`, the Skytap Vagrant provider also supports [VM Credentials](http://help.skytap.com/#VM_Settings_Credentials.html) stored with the Skytap VM. Credentials are a free-form field; if formatted as "username / password", the Skytap provider will parse the credentials and present them to the user when the VM is first created.
|
268
162
|
|
269
|
-
|
270
|
-
[Bundler](http://gembundler.com) to get the dependencies:
|
163
|
+
**NOTE:** Regardless of how the login is obtained, it will be stored in cleartext in the environment's data directory (`.vagrant`).
|
271
164
|
|
272
|
-
|
273
|
-
$ bundle
|
274
|
-
```
|
165
|
+
## Troubleshooting and Known Issues
|
275
166
|
|
276
|
-
|
167
|
+
To enable logging while troubleshooting, see [https://docs.vagrantup.com/v2/other/debugging.html](https://docs.vagrantup.com/v2/other/debugging.html). When reporting issues with the Skytap Vagrant provider, please include the output when using `VAGRANT_LOG=debug` . **NOTE:** make sure to *edit out your API token* before sending or posting the log output!
|
277
168
|
|
278
|
-
|
279
|
-
$ bundle exec rake
|
280
|
-
```
|
169
|
+
### Known issues
|
281
170
|
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
Use bundler to execute Vagrant:
|
290
|
-
```
|
291
|
-
$ bundle exec vagrant up --provider=aws
|
292
|
-
```
|
171
|
+
* Vagrant must be able to connect to the new VM over the selected Skytap VPN.
|
172
|
+
* The source VM must have an SSH service configured to run on startup, or (for Windows VMs) be configured for WinRM access. For more information about WinRM configuration, see [https://docs.vagrantup.com/v2/boxes/base.html](https://docs.vagrantup.com/v2/boxes/base.html), under "Windows Boxes".
|
173
|
+
* At this time, WinRM credentials stored in Skytap VMs will be ignored. The username and password for WinRM connections must be stored in the Vagrantfile (`config.winrm.username` and `config.winrm.password`).
|
174
|
+
* Running, reloading, or destroying a Skytap VM can result in "stale NFS file handle" errors on other providers' VMs. This is a known issue when using multiple providers on the same host machine. The workaround is to use `vagrant reload` on the affected VM to refresh that VM's NFS mount(s).
|
175
|
+
* At this time, `vagrant share` is not supported.
|
176
|
+
* Private networks are currently unsupported.
|
177
|
+
* Although several Skytap public library VMs include credentials for the `root` login, its use is not recommended.
|