vagrant-hp 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -1,60 +1,60 @@
1
- # Compiled source #
2
- ###################
3
- *.com
4
- *.class
5
- *.dll
6
- *.exe
7
- *.o
8
- *.so
9
-
10
- # Packages #
11
- ############
12
- # it's better to unpack these files and commit the raw source
13
- # git has its own built in compression methods
14
- *.7z
15
- *.dmg
16
- *.gz
17
- *.iso
18
- *.jar
19
- *.rar
20
- *.tar
21
- *.zip
22
-
23
- # Logs and databases #
24
- ######################
25
- *.log
26
- *.sql
27
- *.sqlite
28
-
29
- # OS generated files #
30
- ######################
31
- .DS_Store
32
- .DS_Store?
33
- ._*
34
- .Spotlight-V100
35
- .Trashes
36
- Icon?
37
- ehthumbs.db
38
- Thumbs.db
39
-
40
- # Ruby file #
41
- #############
42
- Gemfile.lock
43
- *.gem
44
- *.rbc
45
- .bundle
46
- .config
47
- coverage
48
- InstalledFiles
49
- lib/bundler/man
50
- pkg
51
- rdoc
52
- spec/reports
53
- test/tmp
54
- test/version_tmp
55
- tmp
56
-
57
- # YARD artifacts
58
- .yardoc
59
- _yardoc
1
+ # Compiled source #
2
+ ###################
3
+ *.com
4
+ *.class
5
+ *.dll
6
+ *.exe
7
+ *.o
8
+ *.so
9
+
10
+ # Packages #
11
+ ############
12
+ # it's better to unpack these files and commit the raw source
13
+ # git has its own built in compression methods
14
+ *.7z
15
+ *.dmg
16
+ *.gz
17
+ *.iso
18
+ *.jar
19
+ *.rar
20
+ *.tar
21
+ *.zip
22
+
23
+ # Logs and databases #
24
+ ######################
25
+ *.log
26
+ *.sql
27
+ *.sqlite
28
+
29
+ # OS generated files #
30
+ ######################
31
+ .DS_Store
32
+ .DS_Store?
33
+ ._*
34
+ .Spotlight-V100
35
+ .Trashes
36
+ Icon?
37
+ ehthumbs.db
38
+ Thumbs.db
39
+
40
+ # Ruby file #
41
+ #############
42
+ Gemfile.lock
43
+ *.gem
44
+ *.rbc
45
+ .bundle
46
+ .config
47
+ coverage
48
+ InstalledFiles
49
+ lib/bundler/man
50
+ pkg
51
+ rdoc
52
+ spec/reports
53
+ test/tmp
54
+ test/version_tmp
55
+ tmp
56
+
57
+ # YARD artifacts
58
+ .yardoc
59
+ _yardoc
60
60
  doc/
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
- # 0.0.1 (March 31, 2013)
2
- * Vagrant-Hp
3
- * Initial release.
1
+ # 0.1.1 (May 22, 2013)
2
+ * Added support to specify security groups.
3
+
4
+ # 0.1.0 (March 31, 2013)
5
+ * Vagrant-Hp
6
+ * Initial release.
data/Gemfile CHANGED
@@ -1,10 +1,10 @@
1
- source "https://rubygems.org"
2
-
3
- gemspec
4
-
5
- group :development do
6
- # We depend on Vagrant for development, but we don't add it as a
7
- # gem dependency because we expect to be installed within the
8
- # Vagrant environment itself using `vagrant plugin`.
9
- gem "vagrant", :git => "git://github.com/mohitsethi/vagrant.git"
10
- end
1
+ source "https://rubygems.org"
2
+
3
+ gemspec
4
+
5
+ group :development do
6
+ # We depend on Vagrant for development, but we don't add it as a
7
+ # gem dependency because we expect to be installed within the
8
+ # Vagrant environment itself using `vagrant plugin`.
9
+ gem "vagrant", :git => "git://github.com/mohitsethi/vagrant.git"
10
+ end
data/LICENSE ADDED
@@ -0,0 +1,9 @@
1
+ The MIT License (MIT)
2
+ Copyright (c) 2013 Mitchell Hashimoto
3
+ Copyright (c) 2013 Mohit Sethi
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md CHANGED
@@ -1,167 +1,172 @@
1
- # Vagrant HP Provider
2
-
3
- This is a [Vagrant](http://www.vagrantup.com) 1.1+ plugin that adds an [HP](http://www.hpcloud.com)
4
- provider to Vagrant, allowing Vagrant to control and provision machines on HP Cloud.
5
-
6
- **NOTE:** This plugin requires Vagrant 1.1+,
7
-
8
- ## Features
9
-
10
- * Boot Servers on HP Cloud
11
- * SSH into the instances.
12
- * Provision the instances with any built-in Vagrant provisioner.
13
- * Minimal synced folder support via `rsync`.
14
-
15
- ## Usage
16
-
17
- Install using standard Vagrant 1.1+ plugin installation methods. After
18
- installing, `vagrant up` and specify the `hp` provider. An example is
19
- shown below.
20
-
21
- ```
22
- $ vagrant plugin install vagrant-hp
23
- ...
24
- $ vagrant up --provider=hp
25
- ...
26
- ```
27
-
28
- Of course prior to doing this, you'll need to obtain an HP-compatible
29
- box file for Vagrant.
30
-
31
- ## Quick Start
32
-
33
- After installing the plugin (instructions above), the quickest way to get
34
- started is to actually use a dummy HP box and specify all the details
35
- manually within a `config.vm.provider` block. So first, add the dummy
36
- box using any name you want:
37
-
38
- ```
39
- $ vagrant box add dummy https://github.com/mohitsethi/vagrant-hp/raw/master/dummy_hp.box
40
- ...
41
- ```
42
-
43
- And then make a Vagrantfile that looks like the following, filling in
44
- your information where necessary.
45
-
46
- ```
47
- Vagrant.configure("2") do |config|
48
- config.vm.box = "dummy"
49
-
50
- config.vm.provider :hp do |rs|
51
- rs.access_key = "<hp_access_key>"
52
- rs.secret_key = "<hp_secret_key>"
53
- rs.flavor = "standard.xsmall"
54
- rs.tenant_id = "<hp_tenant_id>"
55
- rs.server_name = "<server_name>"
56
- rs.image = "Ubuntu Precise 12.04 LTS Server 64-bit 20121026 (b)"
57
- rs.keypair_name = "<your_key_pair_name_on_hpcloud>"
58
- rs.ssh_private_key_path = "<private_key_location>"
59
- rs.ssh_username = "<ssh_username>"
60
- rs.availability_zone = "az1"
61
- end
62
- end
63
- ```
64
-
65
- And then run `vagrant up --provider=hp`.
66
-
67
- This will start an Ubuntu 12.04 instance in the az1 availability zone within
68
- your HP Cloud account. And assuming your SSH information was filled in properly
69
- within your Vagrantfile, SSH and provisioning will work as well.
70
-
71
- Note that normally a lot of this boilerplate is encoded within the box
72
- file, but the box file used for the quick start, the "dummy" box, has
73
- no preconfigured defaults.
74
-
75
- ## Box Format
76
-
77
- Every provider in Vagrant must introduce a custom box format. This
78
- provider introduces `hp` boxes. You can view an example box in
79
- the [example_box/ directory](https://github.com/mohitsethi/vagrant-hp/tree/master/example_box).
80
- That directory also contains instructions on how to build a box.
81
-
82
- The box format is basically just the required `metadata.json` file
83
- along with a `Vagrantfile` that does default settings for the
84
- provider-specific configuration for this provider.
85
-
86
- ## Configuration
87
-
88
- This provider exposes quite a few provider-specific configuration options:
89
-
90
- * `access_key` - The access key for accessing HP Cloud
91
- * `image` - The Image-id or Image-Name to boot, such as
92
- "Ubuntu Precise 12.04 LTS Server 64-bit 20121026 (b)"
93
- * `availability_zone` - The availability zone to launch the server.
94
- If nil, it will use 'az1'.
95
- * `flavor` - The type of flavor, such as "standard.xsmall"
96
- * `keypair_name` - The name of the keypair to use to bootstrap image
97
- which support it.
98
- * `secret_key` - The secret access key for accessing HP Cloud.
99
- * `ssh_private_key_path` - The path to the SSH private key. This overrides
100
- `config.ssh.private_key_path`.
101
- * `ssh_username` - The SSH username, which overrides `config.ssh.username`.
102
- * `server_name` - The name of the server provisioned on HP Cloud.
103
- * `tenant_id` - The tenant_id to launch the server.
104
-
105
- These can be set like typical provider-specific configuration:
106
-
107
-
108
- ```ruby
109
- Vagrant.configure("2") do |config|
110
- # ... other stuff
111
-
112
- config.vm.provider :hp do |rs|
113
- rs.access_key = "<hp_access_key>"
114
- rs.secret_key = "<hp_secret_key>"
115
- rs.flavor = "standard.xsmall"
116
- rs.tenant_id = "<hp_tenant_id>"
117
- rs.server_name = "<server_name>"
118
- rs.image = "Ubuntu Precise 12.04 LTS Server 64-bit 20121026 (b)"
119
- rs.keypair_name = "<your_key_pair_name_on_hpcloud>"
120
- rs.ssh_private_key_path = "<private_key_location>"
121
- rs.ssh_username = "<ssh_username>"
122
- rs.availability_zone = "az1"
123
- end
124
-
125
- end
126
- ```
127
-
128
- ## Networks
129
-
130
- Networking features in the form of `config.vm.network` are not
131
- supported with `vagrant-hp`, currently. If any of these are
132
- specified, Vagrant will emit a warning, but will otherwise boot
133
- the HP machine.
134
-
135
- ## Synced Folders
136
-
137
- There is minimal support for synced folders. Upon `vagrant up`,
138
- `vagrant reload`, and `vagrant provision`, the HP provider will use
139
- `rsync` (if available) to uni-directionally sync the folder to
140
- the remote machine over SSH.
141
-
142
- This is good enough for all built-in Vagrant provisioners (shell,
143
- chef, and puppet) to work!
144
-
145
- ## Development
146
-
147
- To work on the `vagrant-hp` plugin, clone this repository out, and use
148
- [Bundler](http://gembundler.com) to get the dependencies:
149
-
150
- ```
151
- $ bundle
152
- ```
153
-
154
- Once you have the dependencies, verify the unit tests pass with `rake`:
155
-
156
- ```
157
- $ bundle exec rake
158
- ```
159
-
160
- If those pass, you're ready to start developing the plugin. You can test
161
- the plugin without installing it into your Vagrant environment by just
162
- creating a `Vagrantfile` in the top level of this directory (it is gitignored)
163
- that uses it, and uses bundler to execute Vagrant:
164
-
165
- ```
166
- $ bundle exec vagrant up --provider=hp
167
- ```
1
+ # Vagrant HP Provider
2
+
3
+ This is a [Vagrant](http://www.vagrantup.com) 1.1+ plugin that adds an [HP](http://www.hpcloud.com)
4
+ provider to Vagrant, allowing Vagrant to control and provision machines on HP Cloud.
5
+
6
+ **NOTE:** This plugin requires Vagrant 1.1+,
7
+
8
+ ## Features
9
+
10
+ * Boot Servers on HP Cloud
11
+ * SSH into the instances.
12
+ * Provision the instances with any built-in Vagrant provisioner.
13
+ * Minimal synced folder support via `rsync`.
14
+
15
+ ## Usage
16
+
17
+ Install using standard Vagrant 1.1+ plugin installation methods. After
18
+ installing, `vagrant up` and specify the `hp` provider. An example is
19
+ shown below.
20
+
21
+ ```
22
+ $ vagrant plugin install vagrant-hp
23
+ ...
24
+ $ vagrant up --provider=hp
25
+ ...
26
+ ```
27
+
28
+ Of course prior to doing this, you'll need to obtain an HP-compatible
29
+ box file for Vagrant.
30
+
31
+ ## Quick Start
32
+
33
+ After installing the plugin (instructions above), the quickest way to get
34
+ started is to actually use a dummy HP box and specify all the details
35
+ manually within a `config.vm.provider` block. So first, add the dummy
36
+ box using any name you want:
37
+
38
+ ```
39
+ $ vagrant box add dummy https://github.com/mohitsethi/vagrant-hp/raw/master/dummy_hp.box
40
+ ...
41
+ ```
42
+
43
+ And then make a Vagrantfile that looks like the following, filling in
44
+ your information where necessary.
45
+
46
+ ```
47
+ Vagrant.configure("2") do |config|
48
+ config.vm.box = "dummy"
49
+
50
+ config.vm.provider :hp do |rs|
51
+ rs.access_key = "<hp_access_key>"
52
+ rs.secret_key = "<hp_secret_key>"
53
+ rs.flavor = "standard.xsmall"
54
+ rs.tenant_id = "<hp_tenant_id>"
55
+ rs.server_name = "<server_name>"
56
+ rs.image = "Ubuntu Precise 12.04 LTS Server 64-bit 20121026 (b)"
57
+ rs.keypair_name = "<your_key_pair_name_on_hpcloud>"
58
+ rs.ssh_private_key_path = "<private_key_location>"
59
+ rs.ssh_username = "<ssh_username>"
60
+ rs.availability_zone = "az1"
61
+ # Security Groups defaults to ["default"]
62
+ # rs.security_groups = ["group1", "group2"]
63
+ end
64
+ end
65
+ ```
66
+
67
+ And then run `vagrant up --provider=hp`.
68
+
69
+ This will start an Ubuntu 12.04 instance in the az1 availability zone within
70
+ your HP Cloud account. And assuming your SSH information was filled in properly
71
+ within your Vagrantfile, SSH and provisioning will work as well.
72
+
73
+ Note that normally a lot of this boilerplate is encoded within the box
74
+ file, but the box file used for the quick start, the "dummy" box, has
75
+ no preconfigured defaults.
76
+
77
+ ## Box Format
78
+
79
+ Every provider in Vagrant must introduce a custom box format. This
80
+ provider introduces `hp` boxes. You can view an example box in
81
+ the [example_box/ directory](https://github.com/mohitsethi/vagrant-hp/tree/master/example_box).
82
+ That directory also contains instructions on how to build a box.
83
+
84
+ The box format is basically just the required `metadata.json` file
85
+ along with a `Vagrantfile` that does default settings for the
86
+ provider-specific configuration for this provider.
87
+
88
+ ## Configuration
89
+
90
+ This provider exposes quite a few provider-specific configuration options:
91
+
92
+ * `access_key` - The access key for accessing HP Cloud
93
+ * `image` - The Image-id or Image-Name to boot, such as
94
+ "Ubuntu Precise 12.04 LTS Server 64-bit 20121026 (b)"
95
+ * `availability_zone` - The availability zone to launch the server.
96
+ If nil, it will use 'az1'.
97
+ * `flavor` - The type of flavor, such as "standard.xsmall"
98
+ * `keypair_name` - The name of the keypair to use to bootstrap image
99
+ which support it.
100
+ * `secret_key` - The secret access key for accessing HP Cloud.
101
+ * `ssh_private_key_path` - The path to the SSH private key. This overrides
102
+ `config.ssh.private_key_path`.
103
+ * `ssh_username` - The SSH username, which overrides `config.ssh.username`.
104
+ * `server_name` - The name of the server provisioned on HP Cloud.
105
+ * `tenant_id` - The tenant_id to launch the server.
106
+ * `security_groups` - An array of strings defining the security groups in which this VM is included.
107
+
108
+ These can be set like typical provider-specific configuration:
109
+
110
+
111
+ ```ruby
112
+ Vagrant.configure("2") do |config|
113
+ # ... other stuff
114
+
115
+ config.vm.provider :hp do |rs|
116
+ rs.access_key = "<hp_access_key>"
117
+ rs.secret_key = "<hp_secret_key>"
118
+ rs.flavor = "standard.xsmall"
119
+ rs.tenant_id = "<hp_tenant_id>"
120
+ rs.server_name = "<server_name>"
121
+ rs.image = "Ubuntu Precise 12.04 LTS Server 64-bit 20121026 (b)"
122
+ rs.keypair_name = "<your_key_pair_name_on_hpcloud>"
123
+ rs.ssh_private_key_path = "<private_key_location>"
124
+ rs.ssh_username = "<ssh_username>"
125
+ rs.availability_zone = "az1"
126
+ # Security Groups defaults to ["default"]
127
+ # rs.security_groups = ["group1", "group2"]
128
+ end
129
+
130
+ end
131
+ ```
132
+
133
+ ## Networks
134
+
135
+ Networking features in the form of `config.vm.network` are not
136
+ supported with `vagrant-hp`, currently. If any of these are
137
+ specified, Vagrant will emit a warning, but will otherwise boot
138
+ the HP machine.
139
+
140
+ ## Synced Folders
141
+
142
+ There is minimal support for synced folders. Upon `vagrant up`,
143
+ `vagrant reload`, and `vagrant provision`, the HP provider will use
144
+ `rsync` (if available) to uni-directionally sync the folder to
145
+ the remote machine over SSH.
146
+
147
+ This is good enough for all built-in Vagrant provisioners (shell,
148
+ chef, and puppet) to work!
149
+
150
+ ## Development
151
+
152
+ To work on the `vagrant-hp` plugin, clone this repository out, and use
153
+ [Bundler](http://gembundler.com) to get the dependencies:
154
+
155
+ ```
156
+ $ bundle
157
+ ```
158
+
159
+ Once you have the dependencies, verify the unit tests pass with `rake`:
160
+
161
+ ```
162
+ $ bundle exec rake
163
+ ```
164
+
165
+ If those pass, you're ready to start developing the plugin. You can test
166
+ the plugin without installing it into your Vagrant environment by just
167
+ creating a `Vagrantfile` in the top level of this directory (it is gitignored)
168
+ that uses it, and uses bundler to execute Vagrant:
169
+
170
+ ```
171
+ $ bundle exec vagrant up --provider=hp
172
+ ```