bosh-deployer 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: eadb9f4dcfb25be44c96f555c1ac0e6084bc8a3b
4
+ data.tar.gz: 878293e1af97b8592a803153e38db7a6259ef186
5
+ SHA512:
6
+ metadata.gz: 0115808b031dbc765b7c9726fab1d10030f3a57643032fce3a1b2f74af93ace1acf8547efcc86525c4ae1d74de6b9bc7ee59db44297ce362f37c16cfdec8cbe8
7
+ data.tar.gz: f8e0d8448928dc04a493c9cbe5c2f8a5b03499591b12b36351d08eee823d5d1ae4277655d92be5552f1a9a2201f5659b9e3707746a15b4413af5b8915ae29894
data/.gitignore CHANGED
@@ -1 +1,2 @@
1
1
  pkg
2
+ bin
@@ -19,11 +19,15 @@ class Bosh::Deployer::Cli::Commands::ProvisionStemcells
19
19
  end
20
20
 
21
21
  def stemcell_name
22
- manifest['meta']['stemcell']['name']
22
+ stemcell_conf['name']
23
23
  end
24
24
 
25
25
  def stemcell_version
26
- manifest['meta']['stemcell']['version']
26
+ stemcell_conf['version']
27
+ end
28
+
29
+ def stemcell_conf
30
+ manifest['resource_pools'][0]['stemcell']
27
31
  end
28
32
 
29
33
  def manifest
@@ -33,5 +37,4 @@ class Bosh::Deployer::Cli::Commands::ProvisionStemcells
33
37
  def default_manifest_path
34
38
  `bosh deployment`.scan(/.*`(.*)'/).first.first
35
39
  end
36
-
37
40
  end
@@ -1,5 +1,5 @@
1
1
  module Bosh
2
2
  module Deployer
3
- VERSION = '0.0.1'
3
+ VERSION = '0.0.2'
4
4
  end
5
5
  end
@@ -7,34 +7,50 @@ describe Bosh::Deployer::Cli::Commands::ProvisionStemcells do
7
7
 
8
8
  before do
9
9
  allow(Bosh::Deployer::Stemcell).to receive(:new)
10
- .with('bosh-openstack-kvm-ubuntu-lucid-go_agent', 'latest')
10
+ .with(stemcell_name, stemcell_version)
11
11
  .and_return(stemcell)
12
12
  end
13
13
 
14
14
  describe '#perform' do
15
15
  let(:perform_provision_stemcells){ cmd.perform(manifest_path) }
16
- let(:manifest_path){ 'spec/fixtures/manifests/cf.yml' }
17
16
 
18
17
  describe 'when filename is provided' do
19
- # meta:
20
- # stemcell:
21
- # name: bosh-openstack-kvm-ubuntu-lucid-go_agent
22
- # version: latest
23
-
24
- it 'download the stemcell' do
25
- expect(stemcell).to receive(:download)
26
- perform_provision_stemcells
27
- end
18
+ [{
19
+ manifest: 'spec/fixtures/manifests/cf.yml',
20
+ name: 'bosh-openstack-kvm-ubuntu-lucid' ,
21
+ version: 'latest'
22
+ },
23
+ {
24
+ manifest: 'spec/fixtures/manifests/bosh.yml',
25
+ name: 'bosh-openstack-kvm-ubuntu-trusty-go_agent' ,
26
+ version: 'latest'
27
+ }
28
+ ].each do |n|
29
+ describe "when manifest #{n[:manifest]}" do
30
+ let(:manifest_path){ n[:manifest] }
31
+ let(:stemcell_name){ n[:name] }
32
+ let(:stemcell_version){ n[:version] }
33
+
34
+ it 'download the stemcell' do
35
+ expect(stemcell).to receive(:download)
36
+ perform_provision_stemcells
37
+ end
28
38
 
29
- it 'should upload stemcell to targeted bosh' do
30
- expect(stemcell).to receive(:upload)
31
- perform_provision_stemcells
39
+ it 'should upload stemcell to targeted bosh' do
40
+ expect(stemcell).to receive(:upload)
41
+ perform_provision_stemcells
42
+ end
43
+ end
32
44
  end
33
45
  end
34
46
 
35
47
 
36
48
  describe 'when when filename is not provided' do
49
+ let(:manifest_path){ 'spec/fixtures/manifests/cf.yml' }
50
+ let(:stemcell_name){ 'bosh-openstack-kvm-ubuntu-lucid' }
51
+ let(:stemcell_version){ 'latest' }
37
52
  let(:perform_provision_stemcells){ cmd.perform }
53
+
38
54
  before do
39
55
  allow(cmd).to receive(:`)
40
56
  .with('bosh deployment')
@@ -0,0 +1,158 @@
1
+ # Change the following below:
2
+ # CHANGE: Director UUID
3
+ # CHANGE: Elastic IP 1
4
+ # CHANGE: microBOSH IP address
5
+ # CHANGE: OpenStack Auth URL
6
+ # CHANGE: OpenStack Username
7
+ # CHANGE: OpenStack Password
8
+ # CHANGE: OpenStack Tenant
9
+ # CHANGE: OpenStack Region (optional)
10
+ ---
11
+ name: bosh
12
+ director_uuid:
13
+
14
+ release:
15
+ name: bosh
16
+ version: latest
17
+
18
+ compilation:
19
+ workers: 5
20
+ network: dynamic
21
+ reuse_compilation_vms: true
22
+ cloud_properties:
23
+ instance_type: m1.large
24
+
25
+ update:
26
+ canaries: 1
27
+ canary_watch_time: 3000-120000
28
+ update_watch_time: 3000-120000
29
+ max_in_flight: 4
30
+
31
+ networks:
32
+ - name: dynamic
33
+ type: dynamic
34
+ cloud_properties:
35
+ net_id:
36
+ security_groups:
37
+ - bosh
38
+ - ssh
39
+ - name: default
40
+ type: manual
41
+ subnets:
42
+ - name: seattle
43
+ range: 10.230.12.0/23
44
+ gateway: 10.230.12.1
45
+ static:
46
+ - 10.230.12.11 - 10.230.12.12
47
+ cloud_properties:
48
+ net_id: 2a88d3d9-bda5-47ef-ab04-2a3465fae898
49
+ security_groups:
50
+ - bosh
51
+ - ssh
52
+
53
+ resource_pools:
54
+ - name: large
55
+ network: default
56
+ size: 1
57
+ stemcell:
58
+ name: bosh-openstack-kvm-ubuntu-trusty-go_agent
59
+ version: latest
60
+ cloud_properties:
61
+ instance_type: m1.large
62
+
63
+ jobs:
64
+ - name: core
65
+ template:
66
+ - powerdns
67
+ - nats
68
+ - postgres
69
+ - redis
70
+ - director
71
+ - blobstore
72
+ - registry
73
+ - health_monitor
74
+ instances: 1
75
+ resource_pool: large
76
+ persistent_disk: 60000
77
+ networks:
78
+ - name: default
79
+ default: [dns, gateway]
80
+ static_ips: []
81
+
82
+ properties:
83
+ env:
84
+
85
+ postgres: &bosh_db
86
+ user: postgres
87
+ password: postges
88
+ host: localhost
89
+ listen_address: 0.0.0.0
90
+ database: bosh
91
+
92
+ dns:
93
+ address: localhost # CHANGE: Elastic IP 1
94
+ db: *bosh_db
95
+ user: powerdns
96
+ password: powerdns
97
+ database:
98
+ name: powerdns
99
+ webserver:
100
+ password: powerdns
101
+ replication:
102
+ basic_auth: replication:zxKDUBeCfKYXk
103
+ user: replication
104
+ password: powerdns
105
+ recursor: 10.230.12.50 # CHANGE: microBOSH IP address
106
+
107
+ nats:
108
+ address: localhost
109
+ user: nats
110
+ password: nats
111
+
112
+ redis:
113
+ address: localhost
114
+ password: redis
115
+
116
+ director:
117
+ name: bosh
118
+ address: localhost
119
+ db: *bosh_db
120
+
121
+ blobstore:
122
+ address: localhost
123
+ agent:
124
+ user: agent
125
+ password: agent
126
+ director:
127
+ user: director
128
+ password: director
129
+
130
+ registry:
131
+ address: localhost
132
+ db: *bosh_db
133
+ http:
134
+ port: 25777
135
+ user: registry
136
+ password: registry
137
+
138
+ hm:
139
+ http:
140
+ user: hm
141
+ password: hm
142
+ director_account:
143
+ user: admin
144
+ password: admin
145
+ event_nats_enabled: false
146
+ email_notifications: false
147
+ tsdb_enabled: false
148
+ pagerduty_enabled: false
149
+ varz_enabled: true
150
+
151
+ openstack:
152
+ auth_url: https://openstack.example.com:5001/v2.0
153
+ username: bosh
154
+ api_key: bosh
155
+ tenant: production
156
+ default_security_groups: ["bosh"]
157
+ default_key_name: microbosh
158
+ private_key: microbosh.pem