vagrant-mos 0.9.42 → 0.9.50

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0a55b5d146c0fd19249f11f008fc10427db68f06
4
- data.tar.gz: 444c50f70865970221693a1514b5325a04a2fb5c
3
+ metadata.gz: 160df994ad0657f338b42e23d228648e835b85ff
4
+ data.tar.gz: 804c5c811b81130259bc7dd0ae8041ff490c91ce
5
5
  SHA512:
6
- metadata.gz: 829278f5df50a0bb7791e16e9daa86fecfdc2c767286f709b5d017bfea6659ab1f6987dba25d096af9b91dad0af93abfc26a2686f8d384958d5face2b6984443
7
- data.tar.gz: 82e2d0144abe9fa10ddcabf968123351dfdea3e44fe7fcd488a77b951ab52b194acfe82e4ac12435adf3427e133adaf728e4bc52187459227a0178ef335d9d40
6
+ metadata.gz: 83fbcffd6227d8effa6b690c7d8073dfe919337ff4d1d3a581428cf55f141facac33a51ea5fb4fbcb6b4960112f74e80393cd4e283c77d93ddec6d45d9e764ce
7
+ data.tar.gz: 5b8d3516f644a95a8c1c2c9e635d2c58d47a8047cd18dbe197e56d036a771aea1b118eaec529a125be6e2db7346e4ad094bd49cd50103c53ea913fd38ac757a1
data/README.md CHANGED
@@ -22,6 +22,7 @@ provider,从而使得Vagrant可以像管理VirtualBox那样管理美团云主
22
22
  * 通过`vagrant status`命令管理已创建的MOS主机
23
23
  * 通过`vagrant package`命令创建MOS实例模板
24
24
  * 通过`vagrant mos-templates`查看可使用的模板
25
+ * 通过`vagrant mos-flavors`查看可创建的实例类型,例如"C1_M2"代表1核CPU,2G内存,以此类推
25
26
 
26
27
  ## 安装使用
27
28
 
@@ -55,7 +56,6 @@ $ vagrant init
55
56
  ```
56
57
  Vagrant.configure("2") do |config|
57
58
  config.vm.box = "mos_box"
58
-
59
59
  config.vm.provider :mos do |mos, override|
60
60
  mos.access_key = "YOUR KEY"
61
61
  mos.access_secret = "YOUR SECRET KEY"
@@ -21,6 +21,7 @@ module VagrantPlugins
21
21
  return :not_created if machine.id.nil?
22
22
 
23
23
  # Find the machine
24
+ puts server = (mos.describe_instances([machine.id]))
24
25
  server = (mos.describe_instances([machine.id]))["Instance"]
25
26
  if server.nil? || [:"deleting"].include?(server["status"])
26
27
  # The machine can't be found
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module MOS
3
- VERSION = '0.9.42'
3
+ VERSION = '0.9.50'
4
4
  end
5
5
  end
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.9.42
4
+ version: 0.9.50
5
5
  platform: ruby
6
6
  authors:
7
7
  - yangcs2009
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-11 00:00:00.000000000 Z
11
+ date: 2015-05-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mos-sdk
@@ -90,7 +90,6 @@ files:
90
90
  - CHANGELOG.md
91
91
  - Gemfile
92
92
  - README.md
93
- - README_en.md
94
93
  - Vagrantfile
95
94
  - example_box/README.md
96
95
  - example_box/Vagrantfile
data/README_en.md DELETED
@@ -1,202 +0,0 @@
1
- # Vagrant MOS Provider
2
-
3
- <span class="badges">
4
- [![Gem Version](https://badge.fury.io/rb/vagrant-mos.png)][gem]
5
- [![Dependency Status](https://gemnasium.com/mitchellh/vagrant-mos.png)][gemnasium]
6
- </span>
7
-
8
- [gem]: https://rubygems.org/gems/vagrant-mos
9
- [gemnasium]: https://gemnasium.com/mitchellh/vagrant-mos
10
-
11
- This is a [Vagrant](http://www.vagrantup.com) 1.2+ plugin that adds an [MOS](http://cloud.sankuai.com/)
12
- provider to Vagrant, allowing Vagrant to control and provision machines in
13
- MOS.
14
-
15
- **NOTE:** This plugin requires Vagrant 1.2+,
16
-
17
- ## Features
18
-
19
- * Support for Vagrant's `up`, `status`, `destroy`, `halt`, `reload` and `ssh` commands
20
- * Boot MOS instances.
21
- * SSH into the instances.
22
- * Provision the instances with any built-in Vagrant provisioner.
23
- * Minimal synced folder support via `rsync`.
24
- * Manage MOS machine's status through `vagrant status`.
25
-
26
- ## Usage
27
-
28
- Install using standard Vagrant 1.2+ plugin installation methods. After
29
- installing, `vagrant up` and specify the `mos` provider. An example is
30
- shown below.
31
-
32
- ```
33
- $ vagrant plugin install vagrant-mos
34
- ...
35
- $ vagrant up --provider=mos
36
- ...
37
- ```
38
-
39
- Of course prior to doing this, you'll need to obtain an MOS-compatible
40
- box file for Vagrant.
41
-
42
- ## Quick Start
43
-
44
- After installing the plugin (instructions above), the quickest way to get
45
- started is to actually use a MOS box and specify all the details
46
- manually within a `config.vm.provider` block. So first, add the
47
- box using any name you want:
48
-
49
- ```
50
- $ vagrant box add mos_box https://github.com/yangcs2009/vagrant-mos/raw/master/mos.box
51
- ...
52
- ```
53
-
54
- And then make a Vagrantfile that looks like the following, filling in
55
- your information where necessary.
56
-
57
- ```
58
- Vagrant.configure("2") do |config|
59
- config.vm.box = "mos_box"
60
- config.vm.provider :mos do |mos, override|
61
- mos.access_key = "YOUR KEY"
62
- mos.access_secret = "YOUR SECRET KEY"
63
- mos.access_url = "YOUR MOS ACCESS URL"
64
- mos.keypair_name = "KEYPAIR NAME"
65
- mos.template_id = "fa1026fe-c082-4ead-8458-802bf65ca64c"
66
- override.ssh.username = "root"
67
- override.ssh.private_key_path = "PATH TO YOUR PRIVATE KEY"
68
- end
69
- end
70
- ```
71
-
72
- And then run `vagrant up --provider=mos`.
73
-
74
- This will start an Ubuntu 12.04 instance in the us-east-1 region within
75
- your account. And assuming your SSH information was filled in properly
76
- within your Vagrantfile, SSH and provisioning will work as well.
77
-
78
- Note that normally a lot of this boilerplate is encoded within the box
79
- file, but the box file used for the quick start, the "dummy" box, has
80
- no preconfigured defaults.
81
-
82
- If you have issues with SSH connecting, make sure that the instances
83
- are being launched with a security group that allows SSH access.
84
-
85
- ## Box Format
86
-
87
- Every provider in Vagrant must introduce a custom box format. This
88
- provider introduces `mos` boxes. You can view an example box in
89
- the [example_box/ directory](https://github.com/mitchellh/vagrant-mos/tree/master/example_box).
90
- That directory also contains instructions on how to build a box.
91
-
92
- The box format is basically just the required `metadata.json` file
93
- along with a `Vagrantfile` that does default settings for the
94
- provider-specific configuration for this provider.
95
-
96
- ## Configuration
97
-
98
- This provider exposes quite a few provider-specific configuration options:
99
-
100
- * `access_key` - The access key for accessing MOS
101
- * `template_id` - The image id to boot, such as "fa1026fe-c082-4ead-8458-802bf65ca64c"
102
- * `instance_ready_timeout` - The number of seconds to wait for the instance
103
- to become "ready" in MOS. Defaults to 120 seconds.
104
- * `instance_name` - The name of instance to be created, such as "ubuntu01". The default
105
- value of this if not specified is 'default'.
106
- * `instance_type` - The type of instance, such as "C1_M1". The default
107
- value of this if not specified is "C1_M2".
108
- * `keypair_name` - The name of the keypair to use to bootstrap images.
109
- which support it.
110
- * `access_url` - The accee url for accessing MOS
111
- * `region` - The region to start the instance in, such as "us-east-1"
112
- * `access_secret` - The secret access key for accessing MOS
113
- * `use_iam_profile` - If true, will use [IAM profiles](http://docs.mos.amazon.com/IAM/latest/UserGuide/instance-profiles.html)
114
- for credentials.
115
-
116
- These can be set like typical provider-specific configuration:
117
-
118
- ```ruby
119
- Vagrant.configure("2") do |config|
120
- # ... other stuff
121
-
122
- config.vm.provider :mos do |mos|
123
- mos.access_key = "your_key"
124
- mos.access_secret = "your_secret"
125
- mos.access_url = "your_access_urll"
126
- end
127
- end
128
- ```
129
-
130
- In addition to the above top-level configs, you can use the `region_config`
131
- method to specify region-specific overrides within your Vagrantfile. Note
132
- that the top-level `region` config must always be specified to choose which
133
- region you want to actually use, however. This looks like this:
134
-
135
- ```ruby
136
- Vagrant.configure("2") do |config|
137
- # ... other stuff
138
-
139
- config.vm.provider :mos do |mos|
140
- mos.access_key = "foo"
141
- mos.access_secret = "bar"
142
- mos.region = "us-east-1"
143
-
144
- # Simple region config
145
- mos.region_config "us-east-1", :template_id => "template_id-12345678"
146
-
147
- # More comprehensive region config
148
- mos.region_config "us-west-2" do |region|
149
- region.template_id = "template_id-87654321"
150
- region.keypair_name = "company-west"
151
- end
152
- end
153
- end
154
- ```
155
-
156
- The region-specific configurations will override the top-level
157
- configurations when that region is used. They otherwise inherit
158
- the top-level configurations, as you would probably expect.
159
-
160
- ## Networks
161
-
162
- Networking features in the form of `config.vm.network` are not
163
- supported with `vagrant-mos`, currently. If any of these are
164
- specified, Vagrant will emit a warning, but will otherwise boot
165
- the MOS machine.
166
-
167
- ## Synced Folders
168
-
169
- There is minimal support for synced folders. Upon `vagrant up`,
170
- `vagrant reload`, and `vagrant provision`, the MOS provider will use
171
- `rsync` (if available) to uni-directionally sync the folder to
172
- the remote machine over SSH.
173
-
174
- See [Vagrant Synced folders: rsync](https://docs.vagrantup.com/v2/synced-folders/rsync.html)
175
-
176
-
177
- ## Development
178
-
179
- To work on the `vagrant-mos` plugin, clone this repository out, and use
180
- [Bundler](http://gembundler.com) to get the dependencies:
181
-
182
- ```
183
- $ bundle
184
- ```
185
-
186
- Once you have the dependencies, verify the unit tests pass with `rake`:
187
-
188
- ```
189
- $ bundle exec rake
190
- ```
191
-
192
- If those pass, you're ready to start developing the plugin. You can test
193
- the plugin without installing it into your Vagrant environment by just
194
- creating a `Vagrantfile` in the top level of this directory (it is gitignored)
195
- and add the following line to your `Vagrantfile`
196
- ```ruby
197
- Vagrant.require_plugin "vagrant-mos"
198
- ```
199
- Use bundler to execute Vagrant:
200
- ```
201
- $ bundle exec vagrant up --provider=mos
202
- ```