vcloud-edge_gateway 1.0.2 → 1.1.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.
data/.gitignore CHANGED
@@ -1,17 +1,9 @@
1
1
  *.gem
2
2
  *.rbc
3
- *.swp
4
- *.un~
5
- vcloud_env.sh
6
- replace_variables.sh
7
3
  /.bundle/
8
4
  /.ruby-version
9
5
  /Gemfile.lock
10
- /bundle/
11
6
  /pkg/
12
- vendor/
13
7
  coverage/
14
8
  spec/integration/vcloud_tools_testing_config.yaml
15
- results.html
16
9
  fog_integration_test.config
17
- .idea
data/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ ## 1.1.0 (2014-08-11)
2
+
3
+ Update to vCloud Core 0.10.0 for the following:
4
+
5
+ - New vcloud-login tool for fetching session tokens without the need to
6
+ store your password in a plaintext FOG_RC file.
7
+ - Deprecate the use of :vcloud_director_password in a plaintext FOG_RC
8
+ file. A warning will be printed to STDERR at load time. Please use
9
+ vcloud-login instead.
10
+
1
11
  ## 1.0.2 (2014-07-14)
2
12
 
3
13
  Update the dependency on vCloud Core to version 0.6.0 to avoid dependency issues._
data/README.md CHANGED
@@ -32,41 +32,7 @@ be re-used between environments:
32
32
 
33
33
  ## Credentials
34
34
 
35
- vCloud Edge Gateway is based around [fog](http://fog.io/). To use it you'll need to give it
36
- credentials that allow it to talk to a vCloud Director environment.
37
-
38
- 1. Create a '.fog' file in your home directory.
39
-
40
- For example:
41
-
42
- test_credentials:
43
- vcloud_director_host: 'host.api.example.com'
44
- vcloud_director_username: 'username@org_name'
45
- vcloud_director_password: ''
46
-
47
- 2. Obtain a session token. First, curl the API:
48
-
49
- curl -D- -d '' \
50
- -H 'Accept: application/*+xml;version=5.1' -u '<username>@<org_name>' \
51
- https://<host.api.example.com>/api/sessions
52
-
53
- This will prompt for your password.
54
-
55
- From the headers returned, the value of the `x-vcloud-authorization` header is your
56
- session token, and this will be valid for 30 minutes idle - any activity will extend
57
- its life by another 30 minutes.
58
-
59
- 3. Specify your credentials and session token at the beginning of the command. For example:
60
-
61
- FOG_CREDENTIAL=test_credentials \
62
- FOG_VCLOUD_TOKEN=AAAABBBBBCCCCCCDDDDDDEEEEEEFFFFF= \
63
- vcloud-edge-configure input.yaml
64
-
65
- You may find it easier to export one or both of the values as environment variables.
66
-
67
- **NB** It is also possible to sidestep the need for the session token by saving your
68
- password in the fog file. This is **not recommended**.
69
-
35
+ Please see the [vcloud-tools usage documentation](http://gds-operations.github.io/vcloud-tools/usage/).
70
36
 
71
37
  ### Configure edge gateway services
72
38
 
data/jenkins.sh CHANGED
@@ -1,15 +1,5 @@
1
- #!/bin/bash -x
1
+ #!/bin/bash
2
2
  set -e
3
3
 
4
- git clean -ffdx
5
- bundle install --path "${HOME}/bundles/${JOB_NAME}"
6
- bundle exec rake
7
-
8
- # Obtain the integration test parameters
9
- git clone git@github.gds:gds/vcloud-tools-testing-config.git
10
- mv vcloud-tools-testing-config/vcloud_tools_testing_config.yaml spec/integration/
11
- rm -rf vcloud-tools-testing-config
12
-
13
- RUBYOPT="-r ./tools/fog_credentials" bundle exec rake integration
14
-
4
+ ./jenkins_tests.sh
15
5
  bundle exec rake publish_gem
data/jenkins_tests.sh ADDED
@@ -0,0 +1,32 @@
1
+ #!/bin/bash
2
+ set -eu
3
+
4
+ function cleanup {
5
+ rm $FOG_RC
6
+ }
7
+
8
+ # Override default of ~/.fog and delete afterwards.
9
+ export FOG_RC=$(mktemp /tmp/vcloud_fog_rc.XXXXXXXXXX)
10
+ trap cleanup EXIT
11
+
12
+ cat <<EOF >${FOG_RC}
13
+ ${FOG_CREDENTIAL}:
14
+ vcloud_director_host: '${API_HOST}'
15
+ vcloud_director_username: '${API_USERNAME}'
16
+ vcloud_director_password: ''
17
+ EOF
18
+
19
+ git clean -ffdx
20
+ bundle install --path "${HOME}/bundles/${JOB_NAME}"
21
+ bundle exec rake
22
+
23
+ # Obtain the integration test parameters
24
+ git clone git@github.gds:gds/vcloud-tools-testing-config.git
25
+ mv vcloud-tools-testing-config/vcloud_tools_testing_config.yaml spec/integration/
26
+ rm -rf vcloud-tools-testing-config
27
+
28
+ # Never log token to STDOUT.
29
+ set +x
30
+ eval $(printenv API_PASSWORD | bundle exec vcloud-login)
31
+
32
+ bundle exec rake integration
@@ -1,6 +1,6 @@
1
1
  module Vcloud
2
2
  module EdgeGateway
3
- VERSION = '1.0.2'
3
+ VERSION = '1.1.0'
4
4
  end
5
5
  end
6
6
 
@@ -1,7 +1,6 @@
1
1
  require 'vcloud/edge_gateway/version'
2
2
 
3
3
  require 'vcloud/core'
4
- require 'vcloud/fog'
5
4
 
6
5
  require 'vcloud/edge_gateway/schema/nat_service'
7
6
  require 'vcloud/edge_gateway/schema/firewall_service'
@@ -21,8 +21,7 @@ Gem::Specification.new do |s|
21
21
 
22
22
  s.required_ruby_version = '>= 1.9.3'
23
23
 
24
- s.add_runtime_dependency 'fog', '>= 1.21.0'
25
- s.add_runtime_dependency 'vcloud-core', '~> 0.6.0'
24
+ s.add_runtime_dependency 'vcloud-core', '~> 0.10.0'
26
25
  s.add_runtime_dependency 'hashdiff'
27
26
  s.add_development_dependency 'pry'
28
27
  s.add_development_dependency 'rake'
@@ -30,6 +29,6 @@ Gem::Specification.new do |s|
30
29
  s.add_development_dependency 'rubocop', '~> 0.23.0'
31
30
  s.add_development_dependency 'simplecov', '~> 0.7.1'
32
31
  s.add_development_dependency 'gem_publisher', '1.2.0'
33
- s.add_development_dependency 'vcloud-tools-tester', '~> 0.1.0'
32
+ s.add_development_dependency 'vcloud-tools-tester', '~> 0.2.0'
34
33
  end
35
34
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vcloud-edge_gateway
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,24 +9,8 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-07-15 00:00:00.000000000 Z
12
+ date: 2014-08-11 00:00:00.000000000 Z
13
13
  dependencies:
14
- - !ruby/object:Gem::Dependency
15
- name: fog
16
- requirement: !ruby/object:Gem::Requirement
17
- none: false
18
- requirements:
19
- - - ! '>='
20
- - !ruby/object:Gem::Version
21
- version: 1.21.0
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: 1.21.0
30
14
  - !ruby/object:Gem::Dependency
31
15
  name: vcloud-core
32
16
  requirement: !ruby/object:Gem::Requirement
@@ -34,7 +18,7 @@ dependencies:
34
18
  requirements:
35
19
  - - ~>
36
20
  - !ruby/object:Gem::Version
37
- version: 0.6.0
21
+ version: 0.10.0
38
22
  type: :runtime
39
23
  prerelease: false
40
24
  version_requirements: !ruby/object:Gem::Requirement
@@ -42,7 +26,7 @@ dependencies:
42
26
  requirements:
43
27
  - - ~>
44
28
  - !ruby/object:Gem::Version
45
- version: 0.6.0
29
+ version: 0.10.0
46
30
  - !ruby/object:Gem::Dependency
47
31
  name: hashdiff
48
32
  requirement: !ruby/object:Gem::Requirement
@@ -162,7 +146,7 @@ dependencies:
162
146
  requirements:
163
147
  - - ~>
164
148
  - !ruby/object:Gem::Version
165
- version: 0.1.0
149
+ version: 0.2.0
166
150
  type: :development
167
151
  prerelease: false
168
152
  version_requirements: !ruby/object:Gem::Requirement
@@ -170,7 +154,7 @@ dependencies:
170
154
  requirements:
171
155
  - - ~>
172
156
  - !ruby/object:Gem::Version
173
- version: 0.1.0
157
+ version: 0.2.0
174
158
  description: Tool to configure a VMware vCloud Edge Gateway. Uses vcloud-core.
175
159
  email:
176
160
  - anna.shipman@digital.cabinet-office.gov.uk
@@ -197,7 +181,7 @@ files:
197
181
  - examples/vcloud-configure-edge/template-vars-env1.yaml
198
182
  - examples/vcloud-configure-edge/template-vars-env2.yaml
199
183
  - jenkins.sh
200
- - jenkins_integration_tests.sh
184
+ - jenkins_tests.sh
201
185
  - lib/vcloud/edge_gateway.rb
202
186
  - lib/vcloud/edge_gateway/cli.rb
203
187
  - lib/vcloud/edge_gateway/configuration_differ.rb
@@ -259,7 +243,6 @@ files:
259
243
  - spec/vcloud/edge_gateway/load_balancer_schema_validation_spec.rb
260
244
  - spec/vcloud/edge_gateway/nat_configuration_differ_spec.rb
261
245
  - spec/vcloud/edge_gateway/nat_schema_validation_spec.rb
262
- - tools/fog_credentials.rb
263
246
  - vcloud-edge_gateway.gemspec
264
247
  homepage: http://github.com/gds-operations/vcloud-edge_gateway
265
248
  licenses:
@@ -282,7 +265,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
282
265
  version: '0'
283
266
  segments:
284
267
  - 0
285
- hash: -1968196497655824518
268
+ hash: 4211150760564323959
286
269
  requirements: []
287
270
  rubyforge_project:
288
271
  rubygems_version: 1.8.23
@@ -1,12 +0,0 @@
1
- #!/bin/bash -x
2
- set -e
3
-
4
- git clean -ffdx
5
- bundle install --path "${HOME}/bundles/${JOB_NAME}"
6
-
7
- # Obtain the integration test parameters
8
- git clone git@github.gds:gds/vcloud-tools-testing-config.git
9
- mv vcloud-tools-testing-config/vcloud_tools_testing_config.yaml spec/integration/
10
- rm -rf vcloud-tools-testing-config
11
-
12
- RUBYOPT="-r ./tools/fog_credentials" bundle exec rake integration
@@ -1,17 +0,0 @@
1
- # Initialiser for getting vCloud credentials into Fog from Jenkins build
2
- # parameters, without needing to write them to disk. To be used with:
3
- #
4
- # RUBYOPT="-r ./tools/fog_credentials" bundle exec integration
5
- #
6
- # Replace with FOG_VCLOUD_TOKEN support when we have a tool:
7
- #
8
- # https://www.pivotaltracker.com/story/show/68989754
9
- #
10
- require 'bundler/setup'
11
- require 'fog'
12
-
13
- Fog.credentials = {
14
- :vcloud_director_host => ENV['API_HOST'],
15
- :vcloud_director_username => ENV['API_USERNAME'],
16
- :vcloud_director_password => ENV['API_PASSWORD'],
17
- }