vagrant-mos 0.8.55 → 0.8.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +19 -81
- data/lib/vagrant-mos/action/connect_mos.rb +1 -1
- data/lib/vagrant-mos/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 22c5affb759d8daedcd057d2bba2ceebe0a8def3
|
4
|
+
data.tar.gz: 457b35427fe6875b6660c04a8468d519d47f2c4b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e8469fd3cf4566089894f8886aea2dc98ebc99a41e54e96cf5d68b687929518ab0b1badec98959019bb4fd2b9ac3c9523de9363985c77c3398c09cae5e0f867
|
7
|
+
data.tar.gz: 481861bc371a9ef272f10dfca4abb00407415a7236e53bca4367008815bc1e52f1299d6331e4dc0372f42193121a68b9a9d5c484d3b7bf50db17d430e3d9a1a8
|
data/README.md
CHANGED
@@ -9,25 +9,24 @@
|
|
9
9
|
[gem]: https://rubygems.org/gems/vagrant-mos
|
10
10
|
[gemnasium]: https://gemnasium.com/mitchellh/vagrant-mos
|
11
11
|
|
12
|
-
This is a [Vagrant](http://www.vagrantup.com) 1.2+ plugin that adds an [MOS](http://
|
12
|
+
This is a [Vagrant](http://www.vagrantup.com) 1.2+ plugin that adds an [MOS](http://cloud.sankuai.com/)
|
13
13
|
provider to Vagrant, allowing Vagrant to control and provision machines in
|
14
|
-
|
14
|
+
MOS.
|
15
15
|
|
16
16
|
**NOTE:** This plugin requires Vagrant 1.2+,
|
17
17
|
|
18
18
|
## Features
|
19
19
|
|
20
|
-
* Boot
|
20
|
+
* Boot MOS instances.
|
21
21
|
* SSH into the instances.
|
22
22
|
* Provision the instances with any built-in Vagrant provisioner.
|
23
23
|
* Minimal synced folder support via `rsync`.
|
24
24
|
* Define region-specific configurations so Vagrant can manage machines
|
25
|
-
in multiple regions.
|
26
|
-
|
27
|
-
|
25
|
+
in multiple regions.
|
26
|
+
|
28
27
|
## Usage
|
29
28
|
|
30
|
-
Install using standard Vagrant 1.
|
29
|
+
Install using standard Vagrant 1.2+ plugin installation methods. After
|
31
30
|
installing, `vagrant up` and specify the `mos` provider. An example is
|
32
31
|
shown below.
|
33
32
|
|
@@ -44,12 +43,12 @@ box file for Vagrant.
|
|
44
43
|
## Quick Start
|
45
44
|
|
46
45
|
After installing the plugin (instructions above), the quickest way to get
|
47
|
-
started is to actually use a
|
48
|
-
manually within a `config.vm.provider` block. So first, add the
|
46
|
+
started is to actually use a MOS box and specify all the details
|
47
|
+
manually within a `config.vm.provider` block. So first, add the
|
49
48
|
box using any name you want:
|
50
49
|
|
51
50
|
```
|
52
|
-
$ vagrant box add
|
51
|
+
$ vagrant box add mos_box https://github.com/mitchellh/vagrant-mos/raw/master/mos.box
|
53
52
|
...
|
54
53
|
```
|
55
54
|
|
@@ -66,9 +65,9 @@ Vagrant.configure("2") do |config|
|
|
66
65
|
mos.secret_access_url = "YOUR MOS ACCESS URL"
|
67
66
|
mos.keypair_name = "KEYPAIR NAME"
|
68
67
|
|
69
|
-
mos.ami = "
|
68
|
+
mos.ami = "fa1026fe-c082-4ead-8458-802bf65ca64c"
|
70
69
|
|
71
|
-
override.ssh.username = "
|
70
|
+
override.ssh.username = "root"
|
72
71
|
override.ssh.private_key_path = "PATH TO YOUR PRIVATE KEY"
|
73
72
|
end
|
74
73
|
end
|
@@ -103,37 +102,26 @@ provider-specific configuration for this provider.
|
|
103
102
|
This provider exposes quite a few provider-specific configuration options:
|
104
103
|
|
105
104
|
* `access_key_id` - The access key for accessing MOS
|
106
|
-
* `ami` - The
|
105
|
+
* `ami` - The image id to boot, such as "fa1026fe-c082-4ead-8458-802bf65ca64c"
|
107
106
|
* `availability_zone` - The availability zone within the region to launch
|
108
|
-
the instance. If nil, it will use the default set
|
107
|
+
the instance. If nil, it will use the default set.
|
109
108
|
* `instance_ready_timeout` - The number of seconds to wait for the instance
|
110
109
|
to become "ready" in MOS. Defaults to 120 seconds.
|
111
|
-
* `
|
112
|
-
|
113
|
-
* `
|
114
|
-
value of this if not specified is "m3.medium". "m1.small" has been
|
115
|
-
deprecated in "us-east-1" and "m3.medium" is the smallest instance
|
116
|
-
type to support both paravirtualization and hvm AMIs
|
117
|
-
* `keypair_name` - The name of the keypair to use to bootstrap AMIs
|
110
|
+
* `instance_type` - The type of instance, such as "C1_M1". The default
|
111
|
+
value of this if not specified is "C1_M2".
|
112
|
+
* `keypair_name` - The name of the keypair to use to bootstrap images
|
118
113
|
which support it.
|
119
114
|
* `secret_access_url` - The accee url for accessing MOS
|
120
|
-
* `private_ip_address` - The private IP address to assign to an instance
|
121
|
-
within a [VPC](http://mos.amazon.com/vpc/)
|
122
115
|
* `region` - The region to start the instance in, such as "us-east-1"
|
123
116
|
* `secret_access_key` - The secret access key for accessing MOS
|
124
|
-
* `security_groups` - An array of security groups for the instance. If this
|
125
|
-
instance will be launched in VPC, this must be a list of security group
|
126
|
-
Name. For a nondefault VPC, you must use security group IDs instead (http://docs.mos.amazon.com/cli/latest/reference/ec2/run-instances.html).
|
127
117
|
* `iam_instance_profile_arn` - The Amazon resource name (ARN) of the IAM Instance
|
128
118
|
Profile to associate with the instance
|
129
119
|
* `iam_instance_profile_name` - The name of the IAM Instance Profile to associate
|
130
120
|
with the instance
|
131
|
-
* `subnet_id` - The subnet to boot the instance into, for VPC.
|
132
121
|
* `associate_public_ip` - If true, will associate a public IP address to an instance in a VPC.
|
133
122
|
* `tags` - A hash of tags to set on the machine.
|
134
123
|
* `use_iam_profile` - If true, will use [IAM profiles](http://docs.mos.amazon.com/IAM/latest/UserGuide/instance-profiles.html)
|
135
124
|
for credentials.
|
136
|
-
* `block_device_mapping` - Amazon EC2 Block Device Mapping Property
|
137
125
|
|
138
126
|
These can be set like typical provider-specific configuration:
|
139
127
|
|
@@ -142,8 +130,9 @@ Vagrant.configure("2") do |config|
|
|
142
130
|
# ... other stuff
|
143
131
|
|
144
132
|
config.vm.provider :mos do |mos|
|
145
|
-
mos.access_key_id = "
|
146
|
-
mos.secret_access_key = "
|
133
|
+
mos.access_key_id = "your_key"
|
134
|
+
mos.secret_access_key = "your_secret"
|
135
|
+
mos.secret_access_url = "your_access_url"
|
147
136
|
end
|
148
137
|
end
|
149
138
|
```
|
@@ -195,57 +184,6 @@ the remote machine over SSH.
|
|
195
184
|
See [Vagrant Synced folders: rsync](https://docs.vagrantup.com/v2/synced-folders/rsync.html)
|
196
185
|
|
197
186
|
|
198
|
-
## Other Examples
|
199
|
-
|
200
|
-
### Tags
|
201
|
-
|
202
|
-
To use tags, simply define a hash of key/value for the tags you want to associate to your instance, like:
|
203
|
-
|
204
|
-
```ruby
|
205
|
-
Vagrant.configure("2") do |config|
|
206
|
-
# ... other stuff
|
207
|
-
|
208
|
-
config.vm.provider "mos" do |mos|
|
209
|
-
mos.tags = {
|
210
|
-
'Name' => 'Some Name',
|
211
|
-
'Some Key' => 'Some Value'
|
212
|
-
}
|
213
|
-
end
|
214
|
-
end
|
215
|
-
```
|
216
|
-
|
217
|
-
### User data
|
218
|
-
|
219
|
-
You can specify user data for the instance being booted.
|
220
|
-
|
221
|
-
```ruby
|
222
|
-
Vagrant.configure("2") do |config|
|
223
|
-
# ... other stuff
|
224
|
-
|
225
|
-
config.vm.provider "mos" do |mos|
|
226
|
-
# Option 1: a single string
|
227
|
-
mos.user_data = "#!/bin/bash\necho 'got user data' > /tmp/user_data.log\necho"
|
228
|
-
|
229
|
-
# Option 2: use a file
|
230
|
-
mos.user_data = File.read("user_data.txt")
|
231
|
-
end
|
232
|
-
end
|
233
|
-
```
|
234
|
-
|
235
|
-
### Disk size
|
236
|
-
|
237
|
-
Need more space on your instance disk? Increase the disk size.
|
238
|
-
|
239
|
-
```ruby
|
240
|
-
Vagrant.configure("2") do |config|
|
241
|
-
# ... other stuff
|
242
|
-
|
243
|
-
config.vm.provider "mos" do |mos|
|
244
|
-
mos.block_device_mapping = [{ 'DeviceName' => '/dev/sda1', 'Ebs.VolumeSize' => 50 }]
|
245
|
-
end
|
246
|
-
end
|
247
|
-
```
|
248
|
-
|
249
187
|
## Development
|
250
188
|
|
251
189
|
To work on the `vagrant-mos` plugin, clone this repository out, and use
|
data/lib/vagrant-mos/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-mos
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.56
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- yangcs2009
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-01-
|
11
|
+
date: 2015-01-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fog
|