vcloud-tools 0.8.0

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.
@@ -0,0 +1,2 @@
1
+ vcloud_env.sh
2
+ /Gemfile.lock
@@ -0,0 +1,18 @@
1
+ ## 0.8.0 (2014-04-23)
2
+
3
+ Features:
4
+
5
+ - First release of vCloud Tools as a gem
6
+ - vCloud Tools is now a meta-gem incorporating:
7
+ - vCloud Core
8
+ - vCloud Edge Gateway
9
+ - vCloud Launcher
10
+ - vCloud Net Launcher
11
+ - vCloud Walker
12
+
13
+ ## 0.7.0 (2014-01-07)
14
+
15
+ - Storage profile can be provisioned using name only. Structure of yaml input has changed: d7a69e3
16
+ - orgVdcNetwork can be provisioned using the tool
17
+ - Integration test variable names have changed: 2f97634
18
+ - Better error messages are raised when link is not found: 26a04f4
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'http://rubygems.org'
2
+
3
+ gemspec
@@ -0,0 +1,20 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2014 HM Government (Government Digital Service)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ this software and associated documentation files (the "Software"), to deal in
7
+ the Software without restriction, including without limitation the rights to
8
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
+ the Software, and to permit persons to whom the Software is furnished to do so,
10
+ subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,104 @@
1
+ vCloud Tools
2
+ ============
3
+ A collection of tools for provisioning in vCloud Director.
4
+
5
+ vCloud Tools is a meta-gem that depends on the tools listed below.
6
+
7
+ You can install the individual gems you require, or you can include or install vcloud-tools which will give you all of the below.
8
+
9
+ ## vCloud Launcher
10
+
11
+ A tool that takes a YAML configuration file describing a vDC, and provisions
12
+ the vApps and VMs contained within.
13
+
14
+ ( [gem in RubyGems](http://rubygems.org/gems/vcloud-launcher) | [code on GitHub](https://github.com/alphagov/vcloud-launcher) )
15
+
16
+
17
+ ## vCloud Net Launcher
18
+
19
+ A tool that takes a YAML configuration file describing vCloud networks and configures each of them.
20
+
21
+ ( [gem in RubyGems](http://rubygems.org/gems/vcloud-net_launcher) | [code on GitHub](https://github.com/alphagov/vcloud-net_launcher) )
22
+
23
+ ## vCloud Walker
24
+ A gem that reports on the current state of an environment.
25
+
26
+ ( [gem in RubyGems](http://rubygems.org/gems/vcloud-walker) | [code on GitHub](https://github.com/alphagov/vcloud-walker) )
27
+
28
+ ## vCloud Edge Gateway
29
+ A gem to configure a VMware vCloud Edge Gateway.
30
+
31
+ ( [gem in RubyGems](http://rubygems.org/gems/vcloud-edge_gateway) | [code on GitHub](https://github.com/alphagov/vcloud-edge_gateway) )
32
+
33
+ ## vCloud Core
34
+
35
+ The gem that handles the interaction with the vCloud API, via [Fog](http://fog.io/).
36
+
37
+ vCloud Core also comes with command line tool, vCloud Query, which exposes the vCloud Query API.
38
+
39
+ ( [gem in RubyGems](http://rubygems.org/gems/vcloud-core) | [code on GitHub](https://github.com/alphagov/vcloud-core) )
40
+
41
+ Required set-up
42
+ ===============
43
+
44
+ ## Credentials
45
+
46
+ vCloud Tools is based around [fog]. To use it you'll need to give it credentials that allow it to talk to a VMware
47
+ environment. Fog offers two ways to do this.
48
+
49
+ ### 1. Create a `.fog` file containing your credentials
50
+
51
+ To use this method, you need a `.fog` file in your home directory.
52
+
53
+ For example:
54
+
55
+ test:
56
+ vcloud_director_username: 'username@org_name'
57
+ vcloud_director_password: 'password'
58
+ vcloud_director_host: 'host.api.example.com'
59
+
60
+ 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:
61
+
62
+ test:
63
+ vcloud_director_username: 'username@org_name'
64
+ vcloud_director_password: 'password'
65
+ vcloud_director_host: 'host.api.example.com'
66
+
67
+ test2:
68
+ vcloud_director_username: 'username@org_name'
69
+ vcloud_director_password: 'password'
70
+ vcloud_director_host: 'host.api.vendor.net'
71
+
72
+ 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:
73
+
74
+ FOG_CREDENTIAL=test2 bundle exec vcloud-launch node.yaml
75
+
76
+ To understand more about `.fog` files, visit the 'Credentials' section here => http://fog.io/about/getting_started.html.
77
+
78
+ ### 2. Log on externally and supply your session token
79
+
80
+ You can choose to log on externally by interacting independently with the API and supplying your session token to the
81
+ tool by setting the `FOG_VCLOUD_TOKEN` ENV variable. This option reduces the risk footprint by allowing the user to
82
+ store their credentials in safe storage. The default token lifetime is '30 minutes idle' - any activity extends the life by another 30 mins.
83
+
84
+ A basic example of this would be the following:
85
+
86
+ curl
87
+ -D-
88
+ -d ''
89
+ -H 'Accept: application/*+xml;version=5.1' -u '<user>@<org>'
90
+ https://host.com/api/sessions
91
+
92
+ This will prompt for your password.
93
+
94
+ From the headers returned, select the header below
95
+
96
+ x-vcloud-authorization: AAAABBBBBCCCCCCDDDDDDEEEEEEFFFFF=
97
+
98
+ Use token as ENV var FOG_VCLOUD_TOKEN
99
+
100
+ FOG_VCLOUD_TOKEN=AAAABBBBBCCCCCCDDDDDDEEEEEEFFFFF= bundle exec ...
101
+
102
+ ## Contributing
103
+
104
+ Contributions are very welcome. Please see the individual tools for contributing guidelines.
@@ -0,0 +1,6 @@
1
+ require 'gem_publisher'
2
+
3
+ task :publish_gem do |t|
4
+ gem = GemPublisher.publish_if_updated("vcloud-tools.gemspec", :rubygems)
5
+ puts "Published #{gem}" if gem
6
+ end
@@ -0,0 +1,4 @@
1
+ #!/bin/bash -x
2
+ set -e
3
+ bundle install --path "${HOME}/bundles/${JOB_NAME}"
4
+ bundle exec rake publish_gem
@@ -0,0 +1 @@
1
+ require 'vcloud/tools/version'
@@ -0,0 +1,5 @@
1
+ module Vcloud
2
+ module Tools
3
+ VERSION = '0.8.0'
4
+ end
5
+ end
@@ -0,0 +1,27 @@
1
+ # coding: utf-8
2
+
3
+ lib = File.expand_path('../lib', __FILE__)
4
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
+ require 'vcloud/tools/version'
6
+
7
+ Gem::Specification.new do |s|
8
+ s.name = 'vcloud-tools'
9
+ s.version = Vcloud::Tools::VERSION
10
+ s.authors = ['Government Digital Service']
11
+ s.summary = %q{Tools for VMware vCloud}
12
+ s.homepage = 'https://github.com/alphagov/vcloud-tools'
13
+ s.license = 'MIT'
14
+
15
+ s.files = `git ls-files`.split($/)
16
+ s.executables = s.files.grep(%r{^bin/}) {|f| File.basename(f)}
17
+ s.test_files = s.files.grep(%r{^(test|spec|features)/})
18
+ s.require_paths = ['lib']
19
+
20
+ s.add_runtime_dependency 'vcloud-core', '>= 0.0.12'
21
+ s.add_runtime_dependency 'vcloud-edge_gateway', '>= 0.2.3'
22
+ s.add_runtime_dependency 'vcloud-launcher', '>= 0.0.3'
23
+ s.add_runtime_dependency 'vcloud-net_launcher', '>=0.0.2'
24
+ s.add_runtime_dependency 'vcloud-walker', '>= 3.2.1'
25
+ s.add_development_dependency 'gem_publisher', '1.2.0'
26
+ s.add_development_dependency 'rake'
27
+ end
metadata ADDED
@@ -0,0 +1,173 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: vcloud-tools
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.8.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Government Digital Service
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2014-04-23 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: vcloud-core
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: 0.0.12
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: 0.0.12
30
+ - !ruby/object:Gem::Dependency
31
+ name: vcloud-edge_gateway
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: 0.2.3
38
+ type: :runtime
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: 0.2.3
46
+ - !ruby/object:Gem::Dependency
47
+ name: vcloud-launcher
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: 0.0.3
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: 0.0.3
62
+ - !ruby/object:Gem::Dependency
63
+ name: vcloud-net_launcher
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: 0.0.2
70
+ type: :runtime
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: 0.0.2
78
+ - !ruby/object:Gem::Dependency
79
+ name: vcloud-walker
80
+ requirement: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ! '>='
84
+ - !ruby/object:Gem::Version
85
+ version: 3.2.1
86
+ type: :runtime
87
+ prerelease: false
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ! '>='
92
+ - !ruby/object:Gem::Version
93
+ version: 3.2.1
94
+ - !ruby/object:Gem::Dependency
95
+ name: gem_publisher
96
+ requirement: !ruby/object:Gem::Requirement
97
+ none: false
98
+ requirements:
99
+ - - '='
100
+ - !ruby/object:Gem::Version
101
+ version: 1.2.0
102
+ type: :development
103
+ prerelease: false
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - '='
108
+ - !ruby/object:Gem::Version
109
+ version: 1.2.0
110
+ - !ruby/object:Gem::Dependency
111
+ name: rake
112
+ requirement: !ruby/object:Gem::Requirement
113
+ none: false
114
+ requirements:
115
+ - - ! '>='
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
122
+ requirements:
123
+ - - ! '>='
124
+ - !ruby/object:Gem::Version
125
+ version: '0'
126
+ description:
127
+ email:
128
+ executables: []
129
+ extensions: []
130
+ extra_rdoc_files: []
131
+ files:
132
+ - .gitignore
133
+ - CHANGELOG.md
134
+ - Gemfile
135
+ - LICENSE.txt
136
+ - README.md
137
+ - Rakefile
138
+ - jenkins.sh
139
+ - lib/vcloud/tools.rb
140
+ - lib/vcloud/tools/version.rb
141
+ - vcloud-tools.gemspec
142
+ homepage: https://github.com/alphagov/vcloud-tools
143
+ licenses:
144
+ - MIT
145
+ post_install_message:
146
+ rdoc_options: []
147
+ require_paths:
148
+ - lib
149
+ required_ruby_version: !ruby/object:Gem::Requirement
150
+ none: false
151
+ requirements:
152
+ - - ! '>='
153
+ - !ruby/object:Gem::Version
154
+ version: '0'
155
+ segments:
156
+ - 0
157
+ hash: 3739846069195511202
158
+ required_rubygems_version: !ruby/object:Gem::Requirement
159
+ none: false
160
+ requirements:
161
+ - - ! '>='
162
+ - !ruby/object:Gem::Version
163
+ version: '0'
164
+ segments:
165
+ - 0
166
+ hash: 3739846069195511202
167
+ requirements: []
168
+ rubyforge_project:
169
+ rubygems_version: 1.8.23
170
+ signing_key:
171
+ specification_version: 3
172
+ summary: Tools for VMware vCloud
173
+ test_files: []