bosh-bootstrap 0.11.4 → 0.11.5

Sign up to get free protection for your applications and to get access to all the features.
data/ChangeLog.md CHANGED
@@ -5,6 +5,9 @@
5
5
  gem install bosh-bootstrap
6
6
  bosh-bootstrap deploy
7
7
 
8
+ ## Next
9
+
10
+
8
11
  ## v0.11
9
12
 
10
13
  * Complete rewrite of bosh-bootstrap in orphan branch
@@ -21,6 +24,9 @@
21
24
  * Specify which AWS AZ to use via `provider.az` in settings.yml (v0.11.2)
22
25
  * Support for OpenStack (also in cyoi 0.4.3) thanks to Ferdy! (v0.11.3)
23
26
  * Ensure CLI loads bundler (v0.11.4)
27
+ * rubygem users should be able to install & run from rubygems instead of source workaround (v0.11.5)
28
+ * microbosh volume is smaller 4G and automatically fits on devstack/openstack (v0.11.5; thx @ryfow)
29
+ * security group `bosh_agent_http` renamed to `bosh_agent_https`, with same 6868 port for talking to bosh_agent running in https mode (`bosh_agent_http` can then be deleted) (v0.11.5)
24
30
 
25
31
  ## v0.10
26
32
 
data/README.md CHANGED
@@ -109,7 +109,7 @@ Created security group ssh
109
109
  -> opened ports ports TCP 22..22 from IP range 0.0.0.0/0
110
110
  Created security group bosh_nats_server
111
111
  -> opened ports ports TCP 4222..4222 from IP range 0.0.0.0/0
112
- Created security group bosh_agent_http
112
+ Created security group bosh_agent_https
113
113
  -> opened ports ports TCP 6868..6868 from IP range 0.0.0.0/0
114
114
  Created security group bosh_blobstore
115
115
  -> opened ports ports TCP 25250..25250 from IP range 0.0.0.0/0
data/bin/bosh-bootstrap CHANGED
@@ -3,6 +3,8 @@ $:.push File.dirname(__FILE__) + '/../lib'
3
3
 
4
4
  require "rubygems"
5
5
  require "bundler"
6
+
7
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
6
8
  Bundler.setup(:default)
7
9
 
8
10
  require "bosh-bootstrap"
@@ -2,7 +2,6 @@ module Bosh; module Bootstrap; module Cli; module Commands; end; end; end; end
2
2
 
3
3
  require "cyoi/cli/provider"
4
4
  require "cyoi/cli/address"
5
- require "cyoi/cli/key_pair"
6
5
  require "bosh-bootstrap/cli/helpers"
7
6
  require "bosh-bootstrap/microbosh"
8
7
 
@@ -47,17 +46,6 @@ class Bosh::Bootstrap::Cli::Commands::Deploy
47
46
  network.deploy
48
47
  end
49
48
 
50
- def setup_keypair
51
- key_pair_name = settings.exists?("key_pair.name") || settings.bosh.name
52
- cli = Cyoi::Cli::KeyPair.new([key_pair_name, settings_dir])
53
- cli.execute!
54
- reload_settings!
55
-
56
- key_pair = Bosh::Bootstrap::KeyPair.new(settings_dir, settings.key_pair.name, settings.key_pair.private_key)
57
- key_pair.execute!
58
- settings.set("key_pair.path", key_pair.path)
59
- end
60
-
61
49
  # TODO should this go inside Microbosh, like NetworkProvider is to Network?
62
50
  def microbosh_provider
63
51
  @microbosh_provider ||= begin
@@ -82,7 +70,7 @@ class Bosh::Bootstrap::Cli::Commands::Deploy
82
70
  end
83
71
 
84
72
  def perform_microbosh_deploy
85
- settings.set("bosh.persistent_disk", 16384)
73
+ settings.set("bosh.persistent_disk", 4 * 1024)
86
74
  @microbosh ||= Bosh::Bootstrap::Microbosh.new(settings_dir, microbosh_provider)
87
75
  @microbosh.deploy(settings)
88
76
  end
@@ -14,6 +14,7 @@ class Bosh::Bootstrap::Cli::Commands::SSH
14
14
  include FileUtils
15
15
 
16
16
  def perform
17
+ setup_keypair
17
18
  sh "ssh -i #{private_key_path} #{user}@#{host}"
18
19
  end
19
20
 
@@ -2,10 +2,12 @@ module Bosh; module Bootstrap; module Cli; module Helpers; end; end; end; end
2
2
 
3
3
  require "bosh-bootstrap/cli/helpers/bundle"
4
4
  require "bosh-bootstrap/cli/helpers/interactions"
5
+ require "bosh-bootstrap/cli/helpers/key_pair"
5
6
  require "bosh-bootstrap/cli/helpers/settings"
6
7
 
7
8
  module Bosh::Bootstrap::Cli::Helpers
8
9
  include Bosh::Bootstrap::Cli::Helpers::Bundle
9
10
  include Bosh::Bootstrap::Cli::Helpers::Interactions
11
+ include Bosh::Bootstrap::Cli::Helpers::KeyPair
10
12
  include Bosh::Bootstrap::Cli::Helpers::Settings
11
13
  end
@@ -0,0 +1,19 @@
1
+ require "cyoi/cli/key_pair"
2
+ require "readwritesettings"
3
+ require "fileutils"
4
+
5
+ module Bosh::Bootstrap::Cli::Helpers::KeyPair
6
+ include FileUtils
7
+
8
+ def setup_keypair
9
+ key_pair_name = settings.exists?("key_pair.name") || settings.bosh.name
10
+ cli = Cyoi::Cli::KeyPair.new([key_pair_name, settings_dir])
11
+ cli.execute!
12
+ reload_settings!
13
+
14
+ key_pair = Bosh::Bootstrap::KeyPair.new(settings_dir, settings.key_pair.name, settings.key_pair.private_key)
15
+ key_pair.execute!
16
+ settings.set("key_pair.path", key_pair.path)
17
+ end
18
+
19
+ end
@@ -56,7 +56,7 @@ module Bosh::Bootstrap::MicroboshProviders
56
56
 
57
57
  def security_groups
58
58
  ["ssh",
59
- "bosh_agent_http",
59
+ "bosh_agent_https",
60
60
  "bosh_nats_server",
61
61
  "bosh_blobstore",
62
62
  "bosh_director",
@@ -38,8 +38,11 @@ module Bosh::Bootstrap::MicroboshProviders
38
38
  settings.bosh.persistent_disk
39
39
  end
40
40
 
41
+ # TODO discover m1.microbosh via cyoi (a VM with ephemeral volume)
42
+ # Create m1.microboh with:
43
+ # nova flavor-create m1.microbosh 6 2048 20 2 --ephemeral 20 --rxtx-factor 1 --is-public true
41
44
  def resources_cloud_properties
42
- {"instance_type"=>"m1.medium"}
45
+ {"instance_type"=>"m1.microbosh"}
43
46
  end
44
47
 
45
48
  def cloud_properties
@@ -63,7 +66,7 @@ module Bosh::Bootstrap::MicroboshProviders
63
66
 
64
67
  def security_groups
65
68
  ["ssh",
66
- "bosh_agent_http",
69
+ "bosh_agent_https",
67
70
  "bosh_nats_server",
68
71
  "bosh_blobstore",
69
72
  "bosh_director",
@@ -17,7 +17,7 @@ module Bosh::Bootstrap::NetworkProviders
17
17
  {
18
18
  ssh: 22,
19
19
  bosh_nats_server: 4222,
20
- bosh_agent_http: 6868,
20
+ bosh_agent_https: 6868,
21
21
  bosh_blobstore: 25250,
22
22
  bosh_director: 25555,
23
23
  bosh_registry: 25777
@@ -17,7 +17,7 @@ module Bosh::Bootstrap::NetworkProviders
17
17
  {
18
18
  ssh: 22,
19
19
  bosh_nats_server: 4222,
20
- bosh_agent_http: 6868,
20
+ bosh_agent_https: 6868,
21
21
  bosh_blobstore: 25250,
22
22
  bosh_director: 25555,
23
23
  bosh_registry: 25777
@@ -1,5 +1,5 @@
1
1
  module Bosh
2
2
  module Bootstrap
3
- VERSION = "0.11.4"
3
+ VERSION = "0.11.5"
4
4
  end
5
5
  end
@@ -6,7 +6,7 @@ network:
6
6
  type: dynamic
7
7
  vip: 1.2.3.4
8
8
  resources:
9
- persistent_disk: 16384
9
+ persistent_disk: 4096
10
10
  cloud_properties:
11
11
  instance_type: m1.medium
12
12
  availability_zone: us-west-2a
@@ -20,7 +20,7 @@ cloud:
20
20
  ec2_endpoint: ec2.us-west-2.amazonaws.com
21
21
  default_security_groups:
22
22
  - ssh
23
- - bosh_agent_http
23
+ - bosh_agent_https
24
24
  - bosh_nats_server
25
25
  - bosh_blobstore
26
26
  - bosh_director
@@ -6,7 +6,7 @@ network:
6
6
  type: dynamic
7
7
  vip: 1.2.3.4
8
8
  resources:
9
- persistent_disk: 16384
9
+ persistent_disk: 4096
10
10
  cloud_properties:
11
11
  instance_type: m1.medium
12
12
  cloud:
@@ -19,7 +19,7 @@ cloud:
19
19
  ec2_endpoint: ec2.us-west-2.amazonaws.com
20
20
  default_security_groups:
21
21
  - ssh
22
- - bosh_agent_http
22
+ - bosh_agent_https
23
23
  - bosh_nats_server
24
24
  - bosh_blobstore
25
25
  - bosh_director
@@ -8,7 +8,7 @@ network:
8
8
  cloud_properties:
9
9
  subnet: $SUBNET_ID$
10
10
  resources:
11
- persistent_disk: 16384
11
+ persistent_disk: 4096
12
12
  cloud_properties:
13
13
  instance_type: m1.medium
14
14
  cloud:
@@ -21,7 +21,7 @@ cloud:
21
21
  ec2_endpoint: ec2.us-west-2.amazonaws.com
22
22
  default_security_groups:
23
23
  - ssh
24
- - bosh_agent_http
24
+ - bosh_agent_https
25
25
  - bosh_nats_server
26
26
  - bosh_blobstore
27
27
  - bosh_director
@@ -8,7 +8,7 @@ network:
8
8
  resources:
9
9
  persistent_disk: 4096
10
10
  cloud_properties:
11
- instance_type: m1.medium
11
+ instance_type: m1.microbosh
12
12
  cloud:
13
13
  plugin: openstack
14
14
  properties:
@@ -20,7 +20,7 @@ cloud:
20
20
  region: REGION
21
21
  default_security_groups:
22
22
  - ssh
23
- - bosh_agent_http
23
+ - bosh_agent_https
24
24
  - bosh_nats_server
25
25
  - bosh_blobstore
26
26
  - bosh_director
@@ -13,6 +13,7 @@ describe Bosh::Bootstrap::Cli::Commands::SSH do
13
13
  it "runs ssh" do
14
14
  setting "address.ip", "1.2.3.4"
15
15
  setting "key_pair.path", "/path/to/private/key"
16
+ subject.should_receive(:setup_keypair)
16
17
  subject.should_receive(:sh).with("ssh -i /path/to/private/key vcap@1.2.3.4")
17
18
  subject.perform
18
19
  end
@@ -19,7 +19,7 @@ describe Bosh::Bootstrap::MicroboshProviders::AWS do
19
19
  setting "key_pair.path", "~/.microbosh/ssh/test-bosh"
20
20
  setting "bosh.name", "test-bosh"
21
21
  setting "bosh.salted_password", "salted_password"
22
- setting "bosh.persistent_disk", 16384
22
+ setting "bosh.persistent_disk", 4096
23
23
 
24
24
  subject = Bosh::Bootstrap::MicroboshProviders::AWS.new(microbosh_yml, settings)
25
25
 
@@ -38,7 +38,7 @@ describe Bosh::Bootstrap::MicroboshProviders::AWS do
38
38
  setting "key_pair.path", "~/.microbosh/ssh/test-bosh"
39
39
  setting "bosh.name", "test-bosh"
40
40
  setting "bosh.salted_password", "salted_password"
41
- setting "bosh.persistent_disk", 16384
41
+ setting "bosh.persistent_disk", 4096
42
42
 
43
43
  subject = Bosh::Bootstrap::MicroboshProviders::AWS.new(microbosh_yml, settings)
44
44
 
@@ -17,7 +17,7 @@ describe Bosh::Bootstrap::NetworkProviders::AWS do
17
17
  expected_groups = [
18
18
  ["ssh", "ssh", ports: 22],
19
19
  ["bosh_nats_server", "bosh_nats_server", ports: 4222],
20
- ["bosh_agent_http", "bosh_agent_http", ports: 6868],
20
+ ["bosh_agent_https", "bosh_agent_https", ports: 6868],
21
21
  ["bosh_blobstore", "bosh_blobstore", ports: 25250],
22
22
  ["bosh_director", "bosh_director", ports: 25555],
23
23
  ["bosh_registry", "bosh_registry", ports: 25777],
@@ -16,7 +16,7 @@ describe Bosh::Bootstrap::NetworkProviders::OpenStack do
16
16
  expected_groups = [
17
17
  ["ssh", "ssh", ports: 22],
18
18
  ["bosh_nats_server", "bosh_nats_server", ports: 4222],
19
- ["bosh_agent_http", "bosh_agent_http", ports: 6868],
19
+ ["bosh_agent_https", "bosh_agent_https", ports: 6868],
20
20
  ["bosh_blobstore", "bosh_blobstore", ports: 25250],
21
21
  ["bosh_director", "bosh_director", ports: 25555],
22
22
  ["bosh_registry", "bosh_registry", ports: 25777],
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bosh-bootstrap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.4
4
+ version: 0.11.5
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: 2013-05-24 00:00:00.000000000 Z
12
+ date: 2013-06-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: cyoi
@@ -166,6 +166,7 @@ files:
166
166
  - lib/bosh-bootstrap/cli/helpers.rb
167
167
  - lib/bosh-bootstrap/cli/helpers/bundle.rb
168
168
  - lib/bosh-bootstrap/cli/helpers/interactions.rb
169
+ - lib/bosh-bootstrap/cli/helpers/key_pair.rb
169
170
  - lib/bosh-bootstrap/cli/helpers/settings.rb
170
171
  - lib/bosh-bootstrap/key_pair.rb
171
172
  - lib/bosh-bootstrap/microbosh.rb
@@ -226,7 +227,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
226
227
  version: '0'
227
228
  segments:
228
229
  - 0
229
- hash: 1816725739124051396
230
+ hash: 1342872360376581564
230
231
  requirements: []
231
232
  rubyforge_project:
232
233
  rubygems_version: 1.8.25