vcloud-launcher 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +13 -0
- data/README.md +76 -46
- data/lib/vcloud/launcher/version.rb +1 -1
- data/spec/integration/launcher/vcloud_launcher_spec.rb +1 -1
- data/vcloud-launcher.gemspec +1 -1
- metadata +6 -5
data/CHANGELOG.md
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
## 0.0.3 (2014-04-22)
|
2
|
+
|
3
|
+
Features:
|
4
|
+
|
5
|
+
- Allows use of FOG_VCLOUD_TOKEN via ENV to authenticate, as an alternative to a .fog file
|
6
|
+
|
7
|
+
Bugfixes:
|
8
|
+
|
9
|
+
- Requires vCloud Core v0.0.12 which fixes issue with progress bar falling over when progress is not returned
|
10
|
+
|
11
|
+
## 0.0.2 (2014-04-04)
|
12
|
+
|
13
|
+
- First release of gem
|
data/README.md
CHANGED
@@ -5,19 +5,19 @@ the vApps and VMs contained within.
|
|
5
5
|
|
6
6
|
### Supports
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
8
|
+
- Configuration of multiple vApps/VMs with:
|
9
|
+
- multiple NICs
|
10
|
+
- custom CPU and memory size
|
11
|
+
- multiple additional disks
|
12
|
+
- custom VM metadata
|
13
|
+
- Basic idempotent operation - vApps that already exist are skipped.
|
14
14
|
|
15
15
|
### Limitations
|
16
16
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
17
|
+
- Source vApp Template must contain a single VM. This is VMware's recommended 'simple' method of vApp creation. Complex multi-VM vApps are not supported.
|
18
|
+
- Org vDC Networks must be precreated.
|
19
|
+
- IP addresses are assigned manually (recommended) or via DHCP. VM IP pools are not supported.
|
20
|
+
- vCloud has some interesting ideas about the size of potential 'guest customisation scripts' (aka preambles). You may need to use an external minify tool to reduce the size, or speak to your provider to up the limit. 2048 bytes seems to be a practical default maximum.
|
21
21
|
|
22
22
|
## Installation
|
23
23
|
|
@@ -36,34 +36,64 @@ Or install it yourself as:
|
|
36
36
|
|
37
37
|
## Usage
|
38
38
|
|
39
|
-
|
39
|
+
`vcloud-launch node.yaml`
|
40
40
|
|
41
|
-
|
41
|
+
## Credentials
|
42
|
+
|
43
|
+
vCloud Launcher uses [Fog](http://fog.io/). To use it you'll need to give it credentials that allow it to talk to a VMware environment. Fog offers two ways to do this.
|
44
|
+
|
45
|
+
### 1. Create a `.fog` file containing your credentials
|
46
|
+
|
47
|
+
To use this method, you need a `.fog` file in your home directory.
|
42
48
|
|
43
49
|
For example:
|
44
50
|
|
45
|
-
test:
|
46
|
-
|
47
|
-
|
48
|
-
|
51
|
+
test:
|
52
|
+
vcloud_director_username: 'username@org_name'
|
53
|
+
vcloud_director_password: 'password'
|
54
|
+
vcloud_director_host: 'host.api.example.com'
|
49
55
|
|
50
56
|
Unfortunately current usage of fog requires the password in this file. Multiple sets of credentials can be specified in the fog file, using the following format:
|
51
57
|
|
52
|
-
test:
|
53
|
-
|
54
|
-
|
55
|
-
|
58
|
+
test:
|
59
|
+
vcloud_director_username: 'username@org_name'
|
60
|
+
vcloud_director_password: 'password'
|
61
|
+
vcloud_director_host: 'host.api.example.com'
|
62
|
+
|
63
|
+
test2:
|
64
|
+
vcloud_director_username: 'username@org_name'
|
65
|
+
vcloud_director_password: 'password'
|
66
|
+
vcloud_director_host: 'host.api.vendor.net'
|
67
|
+
|
68
|
+
You can then pass the `FOG_CREDENTIAL` environment variable at the start of your command. The value of the `FOG_CREDENTIAL` environment variable is the name of the credential set in your fog file which you wish to use. For instance:
|
69
|
+
|
70
|
+
FOG_CREDENTIAL=test2 bundle exec vcloud-launch node.yaml
|
71
|
+
|
72
|
+
To understand more about `.fog` files, visit the 'Credentials' section here => http://fog.io/about/getting_started.html.
|
73
|
+
|
74
|
+
### 2. Log on externally and supply your session token
|
75
|
+
|
76
|
+
You can choose to log on externally by interacting independently with the API and supplying your session token to the
|
77
|
+
tool by setting the `FOG_VCLOUD_TOKEN` ENV variable. This option reduces the risk footprint by allowing the user to
|
78
|
+
store their credentials in safe storage. The default token lifetime is '30 minutes idle' - any activity extends the life by another 30 mins.
|
79
|
+
|
80
|
+
A basic example of this would be the following:
|
81
|
+
|
82
|
+
curl
|
83
|
+
-D-
|
84
|
+
-d ''
|
85
|
+
-H 'Accept: application/*+xml;version=5.1' -u '<user>@<org>'
|
86
|
+
https://host.com/api/sessions
|
87
|
+
|
88
|
+
This will prompt for your password.
|
56
89
|
|
57
|
-
|
58
|
-
vcloud_director_username: 'username@org_name'
|
59
|
-
vcloud_director_password: 'password'
|
60
|
-
vcloud_director_host: 'host.api.vendor.net'
|
90
|
+
From the headers returned, select the header below
|
61
91
|
|
62
|
-
|
92
|
+
x-vcloud-authorization: AAAABBBBBCCCCCCDDDDDDEEEEEEFFFFF=
|
63
93
|
|
64
|
-
|
94
|
+
Use token as ENV var FOG_VCLOUD_TOKEN
|
65
95
|
|
66
|
-
|
96
|
+
FOG_VCLOUD_TOKEN=AAAABBBBBCCCCCCDDDDDDEEEEEEFFFFF= bundle exec ...
|
67
97
|
|
68
98
|
## Contributing
|
69
99
|
|
@@ -93,16 +123,16 @@ environment, unless care is taken with the entities being tested.
|
|
93
123
|
The easiest thing to do is create a local shell script called
|
94
124
|
`vcloud_env.sh` and set the contents:
|
95
125
|
|
96
|
-
export
|
97
|
-
export
|
98
|
-
export
|
99
|
-
export
|
100
|
-
export
|
101
|
-
export
|
102
|
-
export
|
103
|
-
export
|
104
|
-
export
|
105
|
-
export
|
126
|
+
export FOG_CREDENTIAL=test
|
127
|
+
export VCLOUD_VDC_NAME="Name of the VDC"
|
128
|
+
export VCLOUD_CATALOG_NAME="catalog-name"
|
129
|
+
export VCLOUD_TEMPLATE_NAME="name-of-template"
|
130
|
+
export VCLOUD_NETWORK1_NAME="name-of-primary-network"
|
131
|
+
export VCLOUD_NETWORK2_NAME="name-of-secondary-network"
|
132
|
+
export VCLOUD_NETWORK1_IP="ip-on-primary-network"
|
133
|
+
export VCLOUD_NETWORK2_IP="ip-on-secondary-network"
|
134
|
+
export VCLOUD_STORAGE_PROFILE_NAME="storage-profile-name"
|
135
|
+
export VCLOUD_EDGE_GATEWAY="name-of-edge-gateway-in-vdc"
|
106
136
|
|
107
137
|
Then run this before you run the integration tests.
|
108
138
|
|
@@ -114,14 +144,14 @@ There is an integration test to check storage profile behaviour, but it requires
|
|
114
144
|
|
115
145
|
You will need to set the following environment variables:
|
116
146
|
|
117
|
-
export
|
118
|
-
export
|
119
|
-
export
|
120
|
-
export
|
121
|
-
export
|
122
|
-
export
|
123
|
-
export
|
124
|
-
export
|
125
|
-
export
|
147
|
+
export VDC_NAME_1="Name of the first vDC"
|
148
|
+
export VDC_NAME_2="Name of the second vDC"
|
149
|
+
export VCLOUD_CATALOG_NAME="Catalog name" # Can be the same as above settings if appropriate
|
150
|
+
export VCLOUD_TEMPLATE_NAME="Template name" # Can be the same as above setting if appropriate
|
151
|
+
export VCLOUD_STORAGE_PROFILE_NAME="Storage profile name" # This needs to exist in both vDCs
|
152
|
+
export VDC_1_STORAGE_PROFILE_HREF="Href of the named storage profile in vDC 1"
|
153
|
+
export VDC_2_STORAGE_PROFILE_HREF="Href of the named storage profile in vDC 2"
|
154
|
+
export DEFAULT_STORAGE_PROFILE_NAME="Default storage profile name"
|
155
|
+
export DEFAULT_STORAGE_PROFILE_HREF="Href of default storage profile"
|
126
156
|
|
127
157
|
To run this test: `rspec spec/integration/launcher/storage_profile_integration_test.rb`
|
@@ -135,7 +135,7 @@ describe Vcloud::Launcher::Launch do
|
|
135
135
|
|
136
136
|
def extract_disks(vm)
|
137
137
|
vm[:'ovf:VirtualHardwareSection'][:'ovf:Item'].collect { |d|
|
138
|
-
{:name => d[:"rasd:ElementName"], :size => d[:"rasd:HostResource"][:ns12_capacity]} if d[:'rasd:ResourceType'] == '17'
|
138
|
+
{:name => d[:"rasd:ElementName"], :size => (d[:"rasd:HostResource"][:ns12_capacity] || d[:"rasd:HostResource"][:vcloud_capacity])} if d[:'rasd:ResourceType'] == '17'
|
139
139
|
}.compact
|
140
140
|
end
|
141
141
|
|
data/vcloud-launcher.gemspec
CHANGED
@@ -21,7 +21,7 @@ Gem::Specification.new do |s|
|
|
21
21
|
s.required_ruby_version = '>= 1.9.2'
|
22
22
|
|
23
23
|
s.add_runtime_dependency 'methadone'
|
24
|
-
s.add_runtime_dependency 'vcloud-core', '>= 0.0.
|
24
|
+
s.add_runtime_dependency 'vcloud-core', '>= 0.0.12'
|
25
25
|
s.add_development_dependency 'aruba', '~> 0.5.3'
|
26
26
|
s.add_development_dependency 'cucumber', '~> 1.3.10'
|
27
27
|
s.add_development_dependency 'gem_publisher', '1.2.0'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vcloud-launcher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-04-
|
12
|
+
date: 2014-04-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: methadone
|
@@ -34,7 +34,7 @@ dependencies:
|
|
34
34
|
requirements:
|
35
35
|
- - ! '>='
|
36
36
|
- !ruby/object:Gem::Version
|
37
|
-
version: 0.0.
|
37
|
+
version: 0.0.12
|
38
38
|
type: :runtime
|
39
39
|
prerelease: false
|
40
40
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -42,7 +42,7 @@ dependencies:
|
|
42
42
|
requirements:
|
43
43
|
- - ! '>='
|
44
44
|
- !ruby/object:Gem::Version
|
45
|
-
version: 0.0.
|
45
|
+
version: 0.0.12
|
46
46
|
- !ruby/object:Gem::Dependency
|
47
47
|
name: aruba
|
48
48
|
requirement: !ruby/object:Gem::Requirement
|
@@ -132,6 +132,7 @@ extensions: []
|
|
132
132
|
extra_rdoc_files: []
|
133
133
|
files:
|
134
134
|
- .gitignore
|
135
|
+
- CHANGELOG.md
|
135
136
|
- Gemfile
|
136
137
|
- LICENSE.txt
|
137
138
|
- README.md
|
@@ -189,7 +190,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
189
190
|
version: '0'
|
190
191
|
segments:
|
191
192
|
- 0
|
192
|
-
hash:
|
193
|
+
hash: 8814923118188880
|
193
194
|
requirements: []
|
194
195
|
rubyforge_project:
|
195
196
|
rubygems_version: 1.8.23
|