bosh-cloudfoundry 0.2.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.
Files changed (47) hide show
  1. data/.gitignore +18 -0
  2. data/.rspec +2 -0
  3. data/.travis.yml +6 -0
  4. data/Gemfile +6 -0
  5. data/Guardfile +10 -0
  6. data/LICENSE.txt +22 -0
  7. data/README.md +242 -0
  8. data/Rakefile +33 -0
  9. data/bosh-cloudfoundry.gemspec +29 -0
  10. data/config/defaults.yml +6 -0
  11. data/lib/bosh-cloudfoundry.rb +34 -0
  12. data/lib/bosh-cloudfoundry/bosh_release_manager.rb +141 -0
  13. data/lib/bosh-cloudfoundry/config.rb +6 -0
  14. data/lib/bosh-cloudfoundry/config/common_config.rb +27 -0
  15. data/lib/bosh-cloudfoundry/config/dea_config.rb +150 -0
  16. data/lib/bosh-cloudfoundry/config/microbosh_config.rb +106 -0
  17. data/lib/bosh-cloudfoundry/config/postgresql_service_config.rb +185 -0
  18. data/lib/bosh-cloudfoundry/config/redis_service_config.rb +179 -0
  19. data/lib/bosh-cloudfoundry/config/system_config.rb +60 -0
  20. data/lib/bosh-cloudfoundry/config_options.rb +362 -0
  21. data/lib/bosh-cloudfoundry/gerrit_patches_helper.rb +47 -0
  22. data/lib/bosh-cloudfoundry/providers.rb +19 -0
  23. data/lib/bosh-cloudfoundry/providers/aws.rb +75 -0
  24. data/lib/bosh-cloudfoundry/system_deployment_manifest_renderer.rb +286 -0
  25. data/lib/bosh-cloudfoundry/version.rb +5 -0
  26. data/lib/bosh/cli/commands/cf.rb +668 -0
  27. data/spec/assets/.gitkeep +0 -0
  28. data/spec/assets/cf-release/jobs/cloud_controller/templates/runtimes.yml +150 -0
  29. data/spec/assets/deployments/aws-core-1-m1.small-free-redis.yml +221 -0
  30. data/spec/assets/deployments/aws-core-1-m1.xlarge-free-postgresql-2-m1.small-free-postgresql.yml +248 -0
  31. data/spec/assets/deployments/aws-core-2-m1.xlarge-dea.yml +195 -0
  32. data/spec/assets/deployments/aws-core-only.yml +178 -0
  33. data/spec/assets/deployments/aws-core-with-nfs.yml +192 -0
  34. data/spec/functional/.gitkeep +0 -0
  35. data/spec/spec_helper.rb +41 -0
  36. data/spec/unit/.gitkeep +0 -0
  37. data/spec/unit/bosh_release_manager_spec.rb +36 -0
  38. data/spec/unit/cf_command_spec.rb +280 -0
  39. data/spec/unit/config/common_config_spec.rb +21 -0
  40. data/spec/unit/config/dea_config_spec.rb +92 -0
  41. data/spec/unit/config/microbosh_config_spec.rb +11 -0
  42. data/spec/unit/config/postgresql_service_config_spec.rb +103 -0
  43. data/spec/unit/config/redis_service_config_spec.rb +103 -0
  44. data/spec/unit/config/system_config_spec.rb +29 -0
  45. data/spec/unit/config_options_spec.rb +64 -0
  46. data/spec/unit/system_deployment_manifest_renderer_spec.rb +93 -0
  47. metadata +246 -0
@@ -0,0 +1,195 @@
1
+ ---
2
+ name: production-core
3
+ director_uuid: DIRECTOR_UUID
4
+ release:
5
+ name: appcloud
6
+ version: 124
7
+ compilation:
8
+ workers: 10
9
+ network: default
10
+ reuse_compilation_vms: true
11
+ cloud_properties:
12
+ instance_type: m1.medium
13
+ update:
14
+ canaries: 1
15
+ canary_watch_time: 30000-150000
16
+ update_watch_time: 30000-150000
17
+ max_in_flight: 4
18
+ max_errors: 1
19
+ networks:
20
+ - name: default
21
+ type: dynamic
22
+ cloud_properties:
23
+ security_groups:
24
+ - cloudfoundry-production
25
+ - name: vip_network
26
+ type: vip
27
+ cloud_properties:
28
+ security_groups:
29
+ - cloudfoundry-production
30
+ resource_pools:
31
+ - name: core
32
+ network: default
33
+ size: 1
34
+ stemcell:
35
+ name: bosh-stemcell
36
+ version: 0.6.4
37
+ cloud_properties:
38
+ instance_type: m1.small
39
+ persistent_disk: 16192
40
+ - name: dea
41
+ network: default
42
+ size: 2
43
+ stemcell:
44
+ name: bosh-stemcell
45
+ version: 0.6.4
46
+ cloud_properties:
47
+ instance_type: m1.xlarge
48
+ jobs:
49
+ - name: core
50
+ template:
51
+ - postgres
52
+ - nats
53
+ - router
54
+ - health_manager
55
+ - cloud_controller
56
+ - stager
57
+ - uaa
58
+ - vcap_redis
59
+ instances: 1
60
+ resource_pool: core
61
+ networks:
62
+ - name: default
63
+ default:
64
+ - dns
65
+ - gateway
66
+ - name: vip_network
67
+ static_ips:
68
+ - 1.2.3.4
69
+ persistent_disk: 16192
70
+ - name: dea
71
+ template:
72
+ - dea
73
+ instances: 2
74
+ resource_pool: dea
75
+ networks:
76
+ - name: default
77
+ default:
78
+ - dns
79
+ - gateway
80
+ properties:
81
+ domain: mycompany.com
82
+ env:
83
+ networks:
84
+ apps: default
85
+ management: default
86
+ router:
87
+ client_inactivity_timeout: 600
88
+ app_inactivity_timeout: 600
89
+ local_route: 1.2.3.4
90
+ status:
91
+ port: 8080
92
+ user: router
93
+ password: c1oudc0wc1oudc0w
94
+ nats:
95
+ user: nats
96
+ password: c1oudc0wc1oudc0w
97
+ address: 1.2.3.4
98
+ port: 4222
99
+ db: ccdb
100
+ ccdb:
101
+ template: postgres
102
+ address: 1.2.3.4
103
+ port: 2544
104
+ databases:
105
+ - tag: cc
106
+ name: appcloud
107
+ - tag: uaa
108
+ name: uaa
109
+ roles:
110
+ - name: root
111
+ password: c1oudc0wc1oudc0w
112
+ tag: admin
113
+ - name: uaa
114
+ password: c1oudc0wc1oudc0w
115
+ tag: uaa
116
+ cc:
117
+ description: Cloud Foundry
118
+ srv_api_uri: http://api.mycompany.com
119
+ password: c1oudc0wc1oudc0w
120
+ token: TOKEN
121
+ allow_debug: true
122
+ allow_registration: true
123
+ admins:
124
+ - drnic@starkandwayne.com
125
+ admin_account_capacity:
126
+ memory: 2048
127
+ app_uris: 32
128
+ services: 16
129
+ apps: 16
130
+ default_account_capacity:
131
+ memory: 2048
132
+ app_uris: 32
133
+ services: 16
134
+ apps: 16
135
+ new_stager_percent: 100
136
+ staging_upload_user: vcap
137
+ staging_upload_password: c1oudc0wc1oudc0w
138
+ uaa:
139
+ enabled: true
140
+ resource_id: cloud_controller
141
+ token_creation_email_filter:
142
+ - ""
143
+ service_extension:
144
+ service_lifecycle:
145
+ max_upload_size: 5
146
+ use_nginx: false
147
+ postgresql_server:
148
+ max_connections: 30
149
+ listen_address: 0.0.0.0
150
+ service_lifecycle:
151
+ download_url: 1.2.3.4
152
+ mount_point: /var/vcap/service_lifecycle
153
+ tmp_dir: /var/vcap/service_lifecycle/tmp_dir
154
+ resque:
155
+ host: 1.2.3.4
156
+ port: 3456
157
+ password: c1oudc0wc1oudc0w
158
+ stager:
159
+ max_staging_duration: 120
160
+ max_active_tasks: 20
161
+ queues:
162
+ - staging
163
+ uaa:
164
+ cc:
165
+ token_secret: TOKEN_SECRET
166
+ client_secret: CLIENT_SECRET
167
+ admin:
168
+ client_secret: CLIENT_SECRET
169
+ login:
170
+ client_secret: CLIENT_SECRET
171
+ batch:
172
+ username: uaa
173
+ password: c1oudc0wc1oudc0w
174
+ port: 8100
175
+ catalina_opts: -Xmx128m -Xms30m -XX:MaxPermSize=128m
176
+ no_ssl: true
177
+ uaadb:
178
+ address: 1.2.3.4
179
+ port: 2544
180
+ roles:
181
+ - tag: admin
182
+ name: uaa
183
+ password: c1oudc0wc1oudc0w
184
+ databases:
185
+ - tag: uaa
186
+ name: uaa
187
+ vcap_redis:
188
+ address: 1.2.3.4
189
+ port: 3456
190
+ password: c1oudc0wc1oudc0w
191
+ maxmemory: 500000000
192
+ service_plans: {}
193
+
194
+ dea:
195
+ max_memory: 15060
@@ -0,0 +1,178 @@
1
+ ---
2
+ name: production-core
3
+ director_uuid: DIRECTOR_UUID
4
+ release:
5
+ name: appcloud
6
+ version: 124
7
+ compilation:
8
+ workers: 10
9
+ network: default
10
+ reuse_compilation_vms: true
11
+ cloud_properties:
12
+ instance_type: m1.medium
13
+ update:
14
+ canaries: 1
15
+ canary_watch_time: 30000-150000
16
+ update_watch_time: 30000-150000
17
+ max_in_flight: 4
18
+ max_errors: 1
19
+ networks:
20
+ - name: default
21
+ type: dynamic
22
+ cloud_properties:
23
+ security_groups:
24
+ - cloudfoundry-production
25
+ - name: vip_network
26
+ type: vip
27
+ cloud_properties:
28
+ security_groups:
29
+ - cloudfoundry-production
30
+ resource_pools:
31
+ - name: core
32
+ network: default
33
+ size: 1
34
+ stemcell:
35
+ name: bosh-stemcell
36
+ version: 0.6.4
37
+ cloud_properties:
38
+ instance_type: m1.small
39
+ persistent_disk: 16192
40
+ jobs:
41
+ - name: core
42
+ template:
43
+ - postgres
44
+ - nats
45
+ - router
46
+ - health_manager
47
+ - cloud_controller
48
+ - stager
49
+ - uaa
50
+ - vcap_redis
51
+ - dea
52
+ instances: 1
53
+ resource_pool: core
54
+ networks:
55
+ - name: default
56
+ default:
57
+ - dns
58
+ - gateway
59
+ - name: vip_network
60
+ static_ips:
61
+ - 1.2.3.4
62
+ persistent_disk: 16192
63
+ properties:
64
+ domain: mycompany.com
65
+ env:
66
+ networks:
67
+ apps: default
68
+ management: default
69
+ router:
70
+ client_inactivity_timeout: 600
71
+ app_inactivity_timeout: 600
72
+ local_route: 1.2.3.4
73
+ status:
74
+ port: 8080
75
+ user: router
76
+ password: c1oudc0wc1oudc0w
77
+ nats:
78
+ user: nats
79
+ password: c1oudc0wc1oudc0w
80
+ address: 1.2.3.4
81
+ port: 4222
82
+ db: ccdb
83
+ ccdb:
84
+ template: postgres
85
+ address: 1.2.3.4
86
+ port: 2544
87
+ databases:
88
+ - tag: cc
89
+ name: appcloud
90
+ - tag: uaa
91
+ name: uaa
92
+ roles:
93
+ - name: root
94
+ password: c1oudc0wc1oudc0w
95
+ tag: admin
96
+ - name: uaa
97
+ password: c1oudc0wc1oudc0w
98
+ tag: uaa
99
+ cc:
100
+ description: Cloud Foundry
101
+ srv_api_uri: http://api.mycompany.com
102
+ password: c1oudc0wc1oudc0w
103
+ token: TOKEN
104
+ allow_debug: true
105
+ allow_registration: true
106
+ admins:
107
+ - drnic@starkandwayne.com
108
+ admin_account_capacity:
109
+ memory: 2048
110
+ app_uris: 32
111
+ services: 16
112
+ apps: 16
113
+ default_account_capacity:
114
+ memory: 2048
115
+ app_uris: 32
116
+ services: 16
117
+ apps: 16
118
+ new_stager_percent: 100
119
+ staging_upload_user: vcap
120
+ staging_upload_password: c1oudc0wc1oudc0w
121
+ uaa:
122
+ enabled: true
123
+ resource_id: cloud_controller
124
+ token_creation_email_filter:
125
+ - ""
126
+ service_extension:
127
+ service_lifecycle:
128
+ max_upload_size: 5
129
+ use_nginx: false
130
+ postgresql_server:
131
+ max_connections: 30
132
+ listen_address: 0.0.0.0
133
+ service_lifecycle:
134
+ download_url: 1.2.3.4
135
+ mount_point: /var/vcap/service_lifecycle
136
+ tmp_dir: /var/vcap/service_lifecycle/tmp_dir
137
+ resque:
138
+ host: 1.2.3.4
139
+ port: 3456
140
+ password: c1oudc0wc1oudc0w
141
+ stager:
142
+ max_staging_duration: 120
143
+ max_active_tasks: 20
144
+ queues:
145
+ - staging
146
+ uaa:
147
+ cc:
148
+ token_secret: TOKEN_SECRET
149
+ client_secret: CLIENT_SECRET
150
+ admin:
151
+ client_secret: CLIENT_SECRET
152
+ login:
153
+ client_secret: CLIENT_SECRET
154
+ batch:
155
+ username: uaa
156
+ password: c1oudc0wc1oudc0w
157
+ port: 8100
158
+ catalina_opts: -Xmx128m -Xms30m -XX:MaxPermSize=128m
159
+ no_ssl: true
160
+ uaadb:
161
+ address: 1.2.3.4
162
+ port: 2544
163
+ roles:
164
+ - tag: admin
165
+ name: uaa
166
+ password: c1oudc0wc1oudc0w
167
+ databases:
168
+ - tag: uaa
169
+ name: uaa
170
+ vcap_redis:
171
+ address: 1.2.3.4
172
+ port: 3456
173
+ password: c1oudc0wc1oudc0w
174
+ maxmemory: 500000000
175
+ service_plans: {}
176
+
177
+ dea:
178
+ max_memory: 512
@@ -0,0 +1,192 @@
1
+ ---
2
+ name: production-core
3
+ director_uuid: DIRECTOR_UUID
4
+ release:
5
+ name: appcloud
6
+ version: latest
7
+ compilation:
8
+ workers: 10
9
+ network: default
10
+ reuse_compilation_vms: true
11
+ cloud_properties:
12
+ instance_type: m1.medium
13
+ update:
14
+ canaries: 1
15
+ canary_watch_time: 30000-150000
16
+ update_watch_time: 30000-150000
17
+ max_in_flight: 4
18
+ max_errors: 1
19
+ networks:
20
+ - name: default
21
+ type: dynamic
22
+ cloud_properties:
23
+ security_groups:
24
+ - cloudfoundry-production
25
+ - name: vip_network
26
+ type: vip
27
+ cloud_properties:
28
+ security_groups:
29
+ - cloudfoundry-production
30
+ resource_pools:
31
+ - name: core
32
+ network: default
33
+ size: 1
34
+ stemcell:
35
+ name: bosh-stemcell
36
+ version: 0.6.4
37
+ cloud_properties:
38
+ instance_type: m1.small
39
+ persistent_disk: 16192
40
+ jobs:
41
+ - name: core
42
+ template:
43
+ - postgres
44
+ - nats
45
+ - router
46
+ - health_manager
47
+ - cloud_controller
48
+ - debian_nfs_server
49
+ - serialization_data_server
50
+ - stager
51
+ - uaa
52
+ - vcap_redis
53
+ - dea
54
+ instances: 1
55
+ resource_pool: core
56
+ networks:
57
+ - name: default
58
+ default:
59
+ - dns
60
+ - gateway
61
+ - name: vip_network
62
+ static_ips:
63
+ - 1.2.3.4
64
+ persistent_disk: 16192
65
+ properties:
66
+ domain: mycompany.com
67
+ env:
68
+ networks:
69
+ apps: default
70
+ management: default
71
+ router:
72
+ client_inactivity_timeout: 600
73
+ app_inactivity_timeout: 600
74
+ local_route: 1.2.3.4
75
+ status:
76
+ port: 8080
77
+ user: router
78
+ password: c1oudc0wc1oudc0w
79
+ nats:
80
+ user: nats
81
+ password: c1oudc0wc1oudc0w
82
+ address: 1.2.3.4
83
+ port: 4222
84
+ db: ccdb
85
+ ccdb:
86
+ template: postgres
87
+ address: 1.2.3.4
88
+ port: 2544
89
+ databases:
90
+ - tag: cc
91
+ name: appcloud
92
+ - tag: uaa
93
+ name: uaa
94
+ roles:
95
+ - name: root
96
+ password: c1oudc0wc1oudc0w
97
+ tag: admin
98
+ - name: uaa
99
+ password: c1oudc0wc1oudc0w
100
+ tag: uaa
101
+ cc:
102
+ description: Cloud Foundry
103
+ srv_api_uri: http://api.mycompany.com
104
+ password: c1oudc0wc1oudc0w
105
+ token: TOKEN
106
+ allow_debug: true
107
+ allow_registration: true
108
+ admins:
109
+ - drnic@starkandwayne.com
110
+ admin_account_capacity:
111
+ memory: 2048
112
+ app_uris: 32
113
+ services: 16
114
+ apps: 16
115
+ default_account_capacity:
116
+ memory: 2048
117
+ app_uris: 32
118
+ services: 16
119
+ apps: 16
120
+ new_stager_percent: 100
121
+ staging_upload_user: vcap
122
+ staging_upload_password: c1oudc0wc1oudc0w
123
+ uaa:
124
+ enabled: true
125
+ resource_id: cloud_controller
126
+ token_creation_email_filter:
127
+ - ""
128
+ service_extension:
129
+ service_lifecycle:
130
+ max_upload_size: 5
131
+ use_nginx: false
132
+ postgresql_server:
133
+ max_connections: 30
134
+ listen_address: 0.0.0.0
135
+ serialization_data_server:
136
+ upload_token: TOKEN
137
+ use_nginx: false
138
+ upload_timeout: 10
139
+ port: 8090
140
+ upload_file_expire_time: 600
141
+ purge_expired_interval: 30
142
+ service_lifecycle:
143
+ download_url: 1.2.3.4
144
+ mount_point: /var/vcap/service_lifecycle
145
+ tmp_dir: /var/vcap/service_lifecycle/tmp_dir
146
+ resque:
147
+ host: 1.2.3.4
148
+ port: 3456
149
+ password: c1oudc0wc1oudc0w
150
+ nfs_server:
151
+ address: 1.2.3.4
152
+ export_dir: /cfsnapshot
153
+ serialization_data_server:
154
+ - 1.2.3.4
155
+ stager:
156
+ max_staging_duration: 120
157
+ max_active_tasks: 20
158
+ queues:
159
+ - staging
160
+ uaa:
161
+ cc:
162
+ token_secret: TOKEN_SECRET
163
+ client_secret: CLIENT_SECRET
164
+ admin:
165
+ client_secret: CLIENT_SECRET
166
+ login:
167
+ client_secret: CLIENT_SECRET
168
+ batch:
169
+ username: uaa
170
+ password: c1oudc0wc1oudc0w
171
+ port: 8100
172
+ catalina_opts: -Xmx128m -Xms30m -XX:MaxPermSize=128m
173
+ no_ssl: true
174
+ uaadb:
175
+ address: 1.2.3.4
176
+ port: 2544
177
+ roles:
178
+ - tag: admin
179
+ name: uaa
180
+ password: c1oudc0wc1oudc0w
181
+ databases:
182
+ - tag: uaa
183
+ name: uaa
184
+ vcap_redis:
185
+ address: 1.2.3.4
186
+ port: 3456
187
+ password: c1oudc0wc1oudc0w
188
+ maxmemory: 500000000
189
+ service_plans: {}
190
+
191
+ dea:
192
+ max_memory: 512