bosh-cloudfoundry 0.7.0.alpha.11 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog.md +3 -4
- data/README.md +2 -2
- data/bosh-cloudfoundry.gemspec +1 -1
- data/spec/assets/v133/aws/large.yml +1 -0
- data/spec/assets/v133/aws/medium.yml +5 -0
- data/templates/v133/aws/large/deployment_file.yml.erb +1 -0
- data/templates/v133/aws/medium/deployment_file.yml.erb +5 -0
- data/templates/v133/openstack/large/deployment_file.yml.erb +1 -0
- data/templates/v133/openstack/medium/deployment_file.yml.erb +5 -0
- data/templates/v134/aws/large/deployment_file.yml.erb +1 -0
- data/templates/v134/aws/medium/deployment_file.yml.erb +5 -0
- data/templates/v134/openstack/large/deployment_file.yml.erb +1 -0
- data/templates/v134/openstack/medium/deployment_file.yml.erb +5 -0
- data/tutorials/README.md +11 -1
- data/tutorials/activities/add-more-deas.md +178 -0
- data/tutorials/activities/move-cc-into-own-job-and-scale.md +111 -0
- data/tutorials/activities/view-system-health.md +30 -0
- data/tutorials/activities/which-bits-are-running-where.md +43 -0
- data/tutorials/build-your-own-heroku-with-cloudfoundry.md +29 -2
- metadata +12 -5
data/ChangeLog.md
CHANGED
@@ -5,17 +5,16 @@
|
|
5
5
|
`bosh-cloudfoundry` is back, rewritten, and supporting Cloud Foundry v2.
|
6
6
|
|
7
7
|
```
|
8
|
-
$ gem install bosh-cloudfoundry
|
8
|
+
$ gem install bosh-cloudfoundry
|
9
9
|
$ bosh prepare cf
|
10
10
|
$ bosh create cf --dns mycloud.com --public-ip 1.2.3.4
|
11
11
|
```
|
12
12
|
|
13
|
-
As a rewrite, v0.7 initially implements fewer features than were in v0.6. It takes advantage of the long-awaited first final release of [cf-release](https://github.com/cloudfoundry/cf-release) for Cloud Foundry v2 (v132).
|
14
|
-
|
15
13
|
The rewrite introduces some new implementation/feature concepts:
|
16
14
|
|
17
|
-
*
|
15
|
+
* takes advantage of the long-awaited first final release of [cf-release](https://github.com/cloudfoundry/cf-release) for Cloud Foundry v2 (v132).
|
18
16
|
* bundles all final releases into the project & distributed rubygem/plugin (no runtime dependency on cf-release git repository; only the public blobstore)
|
17
|
+
* using `bosh diff` (aka biff) to generate the deployment file
|
19
18
|
* templates are versioned for each final release (unless new templates not required for new release)
|
20
19
|
* different sizes of deployments (orders of magnitude), such as small, medium & large: `bosh create cf --deployment-size large`
|
21
20
|
* mutable/changable properties (and immutable properties) for each template version: `bosh change cf attributes persistent_disk=8192`
|
data/README.md
CHANGED
@@ -15,7 +15,7 @@ $ bosh delete cf
|
|
15
15
|
|
16
16
|
The deployed Cloud Foundry does not include any data or messaging services for the user applications. These are available as add-ons coming soon.
|
17
17
|
|
18
|
-
[![Build Status](https://travis-ci.org/cloudfoundry-community/bosh-cloudfoundry.png?branch=v0.7)](https://travis-ci.org/cloudfoundry-community/bosh-cloudfoundry) [![Stories in Ready](http://badge.waffle.io/cloudfoundry-community/bosh-cloudfoundry.png)](http://waffle.io/cloudfoundry-community/bosh-cloudfoundry)
|
18
|
+
[![Build Status](https://travis-ci.org/cloudfoundry-community/bosh-cloudfoundry.png?branch=v0.7)](https://travis-ci.org/cloudfoundry-community/bosh-cloudfoundry) [![Stories in Ready](http://badge.waffle.io/cloudfoundry-community/bosh-cloudfoundry.png)](http://waffle.io/cloudfoundry-community/bosh-cloudfoundry) [![Code Climate](https://codeclimate.com/github/cloudfoundry-community/bosh-cloudfoundry.png)](https://codeclimate.com/github/cloudfoundry-community/bosh-cloudfoundry)
|
19
19
|
|
20
20
|
## What gets created?
|
21
21
|
|
@@ -85,7 +85,7 @@ Install via RubyGems:
|
|
85
85
|
|
86
86
|
```
|
87
87
|
$ gem install bosh_cli -v "~> 1.5.0.pre" --source https://s3.amazonaws.com/bosh-jenkins-gems/
|
88
|
-
$ gem install bosh-cloudfoundry
|
88
|
+
$ gem install bosh-cloudfoundry
|
89
89
|
```
|
90
90
|
|
91
91
|
The `bosh_cli` gem is currently only available from S3, rather than RubyGem itself. So it needs to be installed first.
|
data/bosh-cloudfoundry.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |spec|
|
4
4
|
spec.name = "bosh-cloudfoundry"
|
5
|
-
spec.version = "0.7.0
|
5
|
+
spec.version = "0.7.0"
|
6
6
|
spec.authors = ["Dr Nic Williams"]
|
7
7
|
spec.email = ["drnicwilliams@gmail.com"]
|
8
8
|
spec.description = %q{Create & manage Cloud Foundry deployments}
|
@@ -151,6 +151,10 @@ properties:
|
|
151
151
|
|
152
152
|
dea_next: *dea
|
153
153
|
|
154
|
+
syslog_aggregator:
|
155
|
+
address: 0.syslog-aggregator.default.demo.microbosh
|
156
|
+
port: 54321
|
157
|
+
|
154
158
|
nfs_server:
|
155
159
|
address: 0.data.default.demo.microbosh
|
156
160
|
#network: "*.demo.microbosh"
|
@@ -229,6 +233,7 @@ properties:
|
|
229
233
|
app_package_directory_key: cc-packages
|
230
234
|
droplets:
|
231
235
|
droplet_directory_key: cc-droplets
|
236
|
+
default_quota_definition: runaway
|
232
237
|
|
233
238
|
ccng: *cc
|
234
239
|
|
@@ -188,6 +188,10 @@ properties:
|
|
188
188
|
|
189
189
|
dea_next: *dea
|
190
190
|
|
191
|
+
syslog_aggregator:
|
192
|
+
address: 0.syslog-aggregator.default.<%= name %>.microbosh
|
193
|
+
port: 54321
|
194
|
+
|
191
195
|
nfs_server:
|
192
196
|
address: 0.data.default.<%= name %>.microbosh
|
193
197
|
#network: "*.<%= name %>.microbosh"
|
@@ -266,6 +270,7 @@ properties:
|
|
266
270
|
app_package_directory_key: cc-packages
|
267
271
|
droplets:
|
268
272
|
droplet_directory_key: cc-droplets
|
273
|
+
default_quota_definition: runaway
|
269
274
|
|
270
275
|
ccng: *cc
|
271
276
|
|
@@ -188,6 +188,10 @@ properties:
|
|
188
188
|
|
189
189
|
dea_next: *dea
|
190
190
|
|
191
|
+
syslog_aggregator:
|
192
|
+
address: 0.syslog-aggregator.default.<%= name %>.microbosh
|
193
|
+
port: 54321
|
194
|
+
|
191
195
|
nfs_server:
|
192
196
|
address: 0.data.default.<%= name %>.microbosh
|
193
197
|
#network: "*.<%= name %>.microbosh"
|
@@ -266,6 +270,7 @@ properties:
|
|
266
270
|
app_package_directory_key: cc-packages
|
267
271
|
droplets:
|
268
272
|
droplet_directory_key: cc-droplets
|
273
|
+
default_quota_definition: runaway
|
269
274
|
|
270
275
|
ccng: *cc
|
271
276
|
|
@@ -188,6 +188,10 @@ properties:
|
|
188
188
|
|
189
189
|
dea_next: *dea
|
190
190
|
|
191
|
+
syslog_aggregator:
|
192
|
+
address: 0.syslog-aggregator.default.<%= name %>.microbosh
|
193
|
+
port: 54321
|
194
|
+
|
191
195
|
nfs_server:
|
192
196
|
address: 0.data.default.<%= name %>.microbosh
|
193
197
|
#network: "*.<%= name %>.microbosh"
|
@@ -266,6 +270,7 @@ properties:
|
|
266
270
|
app_package_directory_key: cc-packages
|
267
271
|
droplets:
|
268
272
|
droplet_directory_key: cc-droplets
|
273
|
+
default_quota_definition: runaway
|
269
274
|
|
270
275
|
ccng: *cc
|
271
276
|
|
@@ -188,6 +188,10 @@ properties:
|
|
188
188
|
|
189
189
|
dea_next: *dea
|
190
190
|
|
191
|
+
syslog_aggregator:
|
192
|
+
address: 0.syslog-aggregator.default.<%= name %>.microbosh
|
193
|
+
port: 54321
|
194
|
+
|
191
195
|
nfs_server:
|
192
196
|
address: 0.data.default.<%= name %>.microbosh
|
193
197
|
#network: "*.<%= name %>.microbosh"
|
@@ -266,6 +270,7 @@ properties:
|
|
266
270
|
app_package_directory_key: cc-packages
|
267
271
|
droplets:
|
268
272
|
droplet_directory_key: cc-droplets
|
273
|
+
default_quota_definition: runaway
|
269
274
|
|
270
275
|
ccng: *cc
|
271
276
|
|
data/tutorials/README.md
CHANGED
@@ -2,4 +2,14 @@
|
|
2
2
|
|
3
3
|
## End-to-end tutorials
|
4
4
|
|
5
|
-
* [Build Your Own Heroku With Open Source Cloud Foundry](https://github.com/cloudfoundry-community/bosh-cloudfoundry/blob/master/tutorials/build-your-own-heroku-with-cloudfoundry.md)
|
5
|
+
* [Build Your Own Heroku With Open Source Cloud Foundry](https://github.com/cloudfoundry-community/bosh-cloudfoundry/blob/master/tutorials/build-your-own-heroku-with-cloudfoundry.md)
|
6
|
+
|
7
|
+
## Practice activities
|
8
|
+
|
9
|
+
Challenges and tasks for you to perform that will help you learn more about running your own Cloud Foundry.
|
10
|
+
|
11
|
+
* [Which bits are running where?](https://github.com/cloudfoundry-community/bosh-cloudfoundry/blob/master/tutorials/activities/which-bits-are-running-where.md)
|
12
|
+
* [Run more applications by adding DEA servers](https://github.com/cloudfoundry-community/bosh-cloudfoundry/blob/master/tutorials/activities/add-more-deas.md)
|
13
|
+
* [View system health](https://github.com/cloudfoundry-community/bosh-cloudfoundry/blob/master/tutorials/activities/view-system-health.md)
|
14
|
+
* [Move the Cloud Controller into its own VMs and scale it](https://github.com/cloudfoundry-community/bosh-cloudfoundry/blob/master/tutorials/activities/move-cc-into-own-job-and-scale.md)
|
15
|
+
|
@@ -0,0 +1,178 @@
|
|
1
|
+
# Add more DEA servers
|
2
|
+
|
3
|
+
In the initial "tutorial" deployment there is a single DEA server - a small instance with approximately 2G of RAM. This isn't very much and you won't be able to run many applications.
|
4
|
+
|
5
|
+
One quick way to increase the amount of RAM available for applications is to run more DEA servers.
|
6
|
+
|
7
|
+
## Activity
|
8
|
+
|
9
|
+
Scale the "env" tutorial application to exceed the 2G of RAM available and see the error.
|
10
|
+
|
11
|
+
Edit the deployment file (as of writing there is not yet a nice way to do this via bosh-cloudfoundry) to increase the number of DEA servers to 3.
|
12
|
+
|
13
|
+
## Tips
|
14
|
+
|
15
|
+
1. Scale a running Cloud Foundry app using `cf scale`
|
16
|
+
1. To edit your deployment file run `bosh edit deployment`
|
17
|
+
1. If you increase the `instances:` of a job, also increase the `size:` of the corresponding `resource_pool`
|
18
|
+
|
19
|
+
## Solution
|
20
|
+
|
21
|
+
To scale the app and run out of RAM:
|
22
|
+
|
23
|
+
```
|
24
|
+
$ cf scale env
|
25
|
+
Instances> 10
|
26
|
+
|
27
|
+
1: 128M
|
28
|
+
2: 256M
|
29
|
+
3: 512M
|
30
|
+
4: 1G
|
31
|
+
Memory Limit> 128M
|
32
|
+
|
33
|
+
Scaling env2... OK
|
34
|
+
Stopping env2... OK
|
35
|
+
|
36
|
+
Preparing to start env2... OK
|
37
|
+
Checking status of app 'env2'...
|
38
|
+
0 of 10 instances running (10 down)
|
39
|
+
0 of 10 instances running (10 down)
|
40
|
+
0 of 10 instances running (10 down)
|
41
|
+
0 of 10 instances running (10 down)
|
42
|
+
0 of 10 instances running (10 down)
|
43
|
+
0 of 10 instances running (10 down)
|
44
|
+
0 of 10 instances running (10 down)
|
45
|
+
0 of 10 instances running (10 starting)
|
46
|
+
0 of 10 instances running (6 starting, 4 down)
|
47
|
+
0 of 10 instances running (3 starting, 7 down)
|
48
|
+
3 of 10 instances running (3 running, 7 starting)
|
49
|
+
3 of 10 instances running (3 running, 7 starting)
|
50
|
+
6 of 10 instances running (6 running, 4 down)
|
51
|
+
8 of 10 instances running (8 running, 2 starting)
|
52
|
+
9 of 10 instances running (9 running, 1 starting)
|
53
|
+
7 of 10 instances running (7 running, 3 down)
|
54
|
+
6 of 10 instances running (6 running, 4 down)
|
55
|
+
7 of 10 instances running (7 running, 3 down)
|
56
|
+
```
|
57
|
+
|
58
|
+
And it never quite finishes. This is the current sign that there isn't enough capacity for your application's scale.
|
59
|
+
|
60
|
+
To scale up the number of DEA servers, edit the following sections of your deployment file (via `bosh edit deploment`).
|
61
|
+
|
62
|
+
Increase the `small` resource pool by 2.
|
63
|
+
|
64
|
+
``` yaml
|
65
|
+
resource_pools:
|
66
|
+
- name: small
|
67
|
+
network: default
|
68
|
+
size: 6
|
69
|
+
stemcell:
|
70
|
+
name: bosh-stemcell
|
71
|
+
version: latest
|
72
|
+
cloud_properties:
|
73
|
+
instance_type: m1.small
|
74
|
+
```
|
75
|
+
|
76
|
+
Increase the 'dea' job by 2.
|
77
|
+
|
78
|
+
In `jobs:`
|
79
|
+
|
80
|
+
``` yaml
|
81
|
+
- name: dea
|
82
|
+
release: cf-release
|
83
|
+
template:
|
84
|
+
- dea_next
|
85
|
+
instances: 3
|
86
|
+
resource_pool: small
|
87
|
+
networks:
|
88
|
+
- name: default
|
89
|
+
default: [dns, gateway]
|
90
|
+
```
|
91
|
+
|
92
|
+
To apply the changes run `bosh deploy`.
|
93
|
+
|
94
|
+
```
|
95
|
+
$ bosh deploy
|
96
|
+
...
|
97
|
+
Resource pools
|
98
|
+
small
|
99
|
+
changed size:
|
100
|
+
- 4
|
101
|
+
+ 6
|
102
|
+
|
103
|
+
Networks
|
104
|
+
No changes
|
105
|
+
|
106
|
+
Jobs
|
107
|
+
dea
|
108
|
+
changed instances:
|
109
|
+
- 1
|
110
|
+
+ 3
|
111
|
+
```
|
112
|
+
|
113
|
+
Type "yes" and Enter.
|
114
|
+
|
115
|
+
It will boot up two new servers and run the DEA job on them. Each DEA job will automatically join Cloud Foundry by announcing itself to the Cloud Controller.
|
116
|
+
|
117
|
+
```
|
118
|
+
Creating bound missing VMs
|
119
|
+
small/0, small/1 | | 0/2 00:00:04 ETA: --:--:--
|
120
|
+
```
|
121
|
+
|
122
|
+
And later...
|
123
|
+
|
124
|
+
```
|
125
|
+
Updating job dea
|
126
|
+
dea/1 (canary) |ooooooooo | 0/2 00:00:04 ETA: --:--:--
|
127
|
+
```
|
128
|
+
|
129
|
+
Now scale the app again to 10 instances:
|
130
|
+
|
131
|
+
```
|
132
|
+
$ cf scale env
|
133
|
+
Instances> 10
|
134
|
+
|
135
|
+
1: 128M
|
136
|
+
2: 256M
|
137
|
+
3: 512M
|
138
|
+
4: 1G
|
139
|
+
Memory Limit> 1
|
140
|
+
|
141
|
+
Scaling env2... OK
|
142
|
+
Stopping env2... OK
|
143
|
+
|
144
|
+
Preparing to start env... OK
|
145
|
+
Checking status of app 'env2'...
|
146
|
+
0 of 10 instances running (10 down)
|
147
|
+
0 of 10 instances running (10 down)
|
148
|
+
0 of 10 instances running (10 down)
|
149
|
+
0 of 10 instances running (10 down)
|
150
|
+
0 of 10 instances running (10 down)
|
151
|
+
0 of 10 instances running (10 down)
|
152
|
+
0 of 10 instances running (10 down)
|
153
|
+
0 of 10 instances running (10 starting)
|
154
|
+
0 of 10 instances running (6 starting, 4 down)
|
155
|
+
0 of 10 instances running (3 starting, 7 down)
|
156
|
+
3 of 10 instances running (3 running, 7 starting)
|
157
|
+
3 of 10 instances running (3 running, 7 starting)
|
158
|
+
6 of 10 instances running (6 running, 4 down)
|
159
|
+
8 of 10 instances running (8 running, 2 starting)
|
160
|
+
9 of 10 instances running (9 running, 1 starting)
|
161
|
+
7 of 10 instances running (7 running, 3 down)
|
162
|
+
6 of 10 instances running (6 running, 4 down)
|
163
|
+
7 of 10 instances running (7 running, 3 down)
|
164
|
+
6 of 10 instances running (6 running, 4 down)
|
165
|
+
7 of 10 instances running (7 running, 3 down)
|
166
|
+
6 of 10 instances running (6 running, 4 down)
|
167
|
+
7 of 10 instances running (7 running, 3 down)
|
168
|
+
6 of 10 instances running (6 running, 4 down)
|
169
|
+
10 of 10 instances running (10 running)
|
170
|
+
Push successful! App 'env2' available at http://env.1.2.3.4.xip.io
|
171
|
+
```
|
172
|
+
|
173
|
+
|
174
|
+
## Bonus
|
175
|
+
|
176
|
+
Why did the two identical DEA servers start one at a time?
|
177
|
+
|
178
|
+
Learn about "canaries" in the educational video [BOSH: What, How, When](http://drnicwilliams.com/2012/05/15/bosh-what-how-when/ "Dr Nic's BOSH: What, How, When").
|
@@ -0,0 +1,111 @@
|
|
1
|
+
# Move the Cloud Controller into its own VMs and scale it
|
2
|
+
|
3
|
+
In the default "medium" deployment (used in the step-by-step tutorial), the Cloud Controller is collocated with the front-end router on the `api/0` server.
|
4
|
+
|
5
|
+
## Activity
|
6
|
+
|
7
|
+
Manually edit your deployment to run the Cloud Controller on its own dedicated server. Then run two Cloud Controller servers. Then revert back to running it on the same server as the router (and which also has the public IP attached).
|
8
|
+
|
9
|
+
You will see the following when running `bosh vms`:
|
10
|
+
|
11
|
+
```
|
12
|
+
$ bosh vms
|
13
|
+
+--------------------+---------+---------------+------------------------------+
|
14
|
+
| Job/index | State | Resource Pool | IPs |
|
15
|
+
+--------------------+---------+---------------+------------------------------+
|
16
|
+
| api/0 | running | small | 10.159.41.142, 50.19.127.213 |
|
17
|
+
| cloud_controller/0 | running | small | 10.85.1.115 |
|
18
|
+
| cloud_controller/1 | running | small | 10.116.133.188 |
|
19
|
+
| core/0 | running | small | 10.170.15.85 |
|
20
|
+
| data/0 | running | small | 10.168.20.214 |
|
21
|
+
| dea/0 | running | small | 10.158.75.168 |
|
22
|
+
+--------------------+---------+---------------+------------------------------+
|
23
|
+
```
|
24
|
+
|
25
|
+
## Tips
|
26
|
+
|
27
|
+
1. to edit your deployment file run `bosh edit deployment`
|
28
|
+
1. to make a backup of your deployment file, get its path from `bosh deployment`
|
29
|
+
1. to apply the new deployment file changes run `bosh deploy`
|
30
|
+
1. the Cloud Controller is the `cloud_controller_ng` job template within the `api` job in the deployment file.
|
31
|
+
1. remove `- cloud_controller_ng` from the `name: api` job; and create a new job that looks similar to the `name: core` job
|
32
|
+
1. your new `cloud_controller` job needs a `properties.db` set to `databases` to tell it where in the `properties` to find the database connections. The `api` job no longer needs these properties.
|
33
|
+
|
34
|
+
|
35
|
+
## Solution
|
36
|
+
|
37
|
+
Add the `cloud_controller` job above the `api` job; and remove `cloud_controller_ng` from the `api` job.
|
38
|
+
|
39
|
+
Convert the following `api` job:
|
40
|
+
|
41
|
+
``` yaml
|
42
|
+
- name: api
|
43
|
+
release: cf-release
|
44
|
+
template:
|
45
|
+
- cloud_controller_ng
|
46
|
+
- gorouter
|
47
|
+
instances: 1
|
48
|
+
resource_pool: small
|
49
|
+
networks:
|
50
|
+
- name: default
|
51
|
+
default:
|
52
|
+
- dns
|
53
|
+
- gateway
|
54
|
+
- name: floating
|
55
|
+
static_ips:
|
56
|
+
- 50.19.127.213
|
57
|
+
properties:
|
58
|
+
db: databases
|
59
|
+
```
|
60
|
+
|
61
|
+
Into the following two jobs:
|
62
|
+
|
63
|
+
``` yaml
|
64
|
+
jobs:
|
65
|
+
...
|
66
|
+
|
67
|
+
- name: cloud_controller
|
68
|
+
release: cf-release
|
69
|
+
template:
|
70
|
+
- cloud_controller_ng
|
71
|
+
instances: 2
|
72
|
+
resource_pool: small
|
73
|
+
networks:
|
74
|
+
- name: default
|
75
|
+
default:
|
76
|
+
- dns
|
77
|
+
- gateway
|
78
|
+
properties:
|
79
|
+
db: databases
|
80
|
+
|
81
|
+
- name: api
|
82
|
+
release: cf-release
|
83
|
+
template:
|
84
|
+
- gorouter
|
85
|
+
instances: 1
|
86
|
+
resource_pool: small
|
87
|
+
networks:
|
88
|
+
- name: default
|
89
|
+
default:
|
90
|
+
- dns
|
91
|
+
- gateway
|
92
|
+
- name: floating
|
93
|
+
static_ips:
|
94
|
+
- 1.2.3.4
|
95
|
+
```
|
96
|
+
|
97
|
+
And increase the `small` resource pool by two (for the two `cloud_controller` job servers above):
|
98
|
+
|
99
|
+
```
|
100
|
+
resource_pools:
|
101
|
+
- name: small
|
102
|
+
network: default
|
103
|
+
size: 6
|
104
|
+
stemcell:
|
105
|
+
name: bosh-stemcell
|
106
|
+
version: latest
|
107
|
+
cloud_properties:
|
108
|
+
instance_type: m1.small
|
109
|
+
```
|
110
|
+
|
111
|
+
To change back to collocated Cloud Controller and Router, copy back in your original deployment file; and `bosh deploy`.
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# View system health
|
2
|
+
|
3
|
+
Bosh CLI includes the ability to view some health metrics of each server in a deployment.
|
4
|
+
|
5
|
+
## Activity
|
6
|
+
|
7
|
+
Display the health (CPU, RAM, persistent disk space) of the servers in your Cloud Foundry deployment.
|
8
|
+
|
9
|
+
## Tips
|
10
|
+
|
11
|
+
1. `bosh vms` shows the list of servers in all deployments
|
12
|
+
1. `bosh vms tutorial` shows the list of servers in the deployment called `tutorial`
|
13
|
+
1. `bosh help vms` shows the available options for `bosh vms`
|
14
|
+
|
15
|
+
## Solution
|
16
|
+
|
17
|
+
Invoke `bosh vms --vitals`:
|
18
|
+
|
19
|
+
```
|
20
|
+
$ bosh vms --vitals
|
21
|
+
+-----------+---------+---------------+------------------------------+-----------------------+------+------+------+----------------+------------+------------+------------+------------+
|
22
|
+
| Job/index | State | Resource Pool | IPs | Load | CPU | CPU | CPU | Memory Usage | Swap Usage | System | Ephemeral | Persistent |
|
23
|
+
| | | | | (avg01, avg05, avg15) | User | Sys | Wait | | | Disk Usage | Disk Usage | Disk Usage |
|
24
|
+
+-----------+---------+---------------+------------------------------+-----------------------+------+------+------+----------------+------------+------------+------------+------------+
|
25
|
+
| api/0 | running | small | 10.159.41.142, 50.19.127.213 | 0.13%, 0.14%, 0.09% | 0.0% | 0.0% | 0.1% | 14.2% (236.6M) | 0.0% (0B) | 49% | 1% | n/a |
|
26
|
+
| core/0 | running | small | 10.170.15.85 | 0.88%, 1.04%, 0.66% | 0.0% | 0.0% | 0.1% | 33.9% (561.9M) | 0.0% (0B) | 49% | 1% | n/a |
|
27
|
+
| data/0 | running | small | 10.168.20.214 | 0.00%, 0.06%, 0.09% | 0.0% | 0.0% | 0.0% | 7.1% (119.2M) | 0.0% (0B) | 49% | 1% | 4% |
|
28
|
+
| dea/0 | running | small | 10.158.75.168 | 0.00%, 0.01%, 0.05% | 0.0% | 0.0% | 0.1% | 19.8% (329.2M) | 0.0% (0B) | 49% | 2% | n/a |
|
29
|
+
+-----------+---------+---------------+------------------------------+-----------------------+------+------+------+----------------+------------+------------+------------+------------+
|
30
|
+
```
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# Which bits are running where?
|
2
|
+
|
3
|
+
Within your running "tutorial" deployment are the following components of Cloud Foundry:
|
4
|
+
|
5
|
+
* Router
|
6
|
+
* Cloud Controller
|
7
|
+
* DEA
|
8
|
+
* NATS (message bus)
|
9
|
+
* UAA (User Account and Authentication)
|
10
|
+
* Health manager
|
11
|
+
* Postgresql
|
12
|
+
* NFS
|
13
|
+
|
14
|
+
## Activity
|
15
|
+
|
16
|
+
Your "tutorial" deployment has 4 VMs:
|
17
|
+
|
18
|
+
```
|
19
|
+
$ bosh vms
|
20
|
+
+-----------+---------+---------------+-------------------------+
|
21
|
+
| Job/index | State | Resource Pool | IPs |
|
22
|
+
+-----------+---------+---------------+-------------------------+
|
23
|
+
| api/0 | running | small | 10.159.41.142, 1.2.3.4 |
|
24
|
+
| core/0 | running | small | 10.170.15.85 |
|
25
|
+
| data/0 | running | small | 10.168.20.214 |
|
26
|
+
| dea/0 | running | small | 10.158.75.168 |
|
27
|
+
+-----------+---------+---------------+-------------------------+
|
28
|
+
```
|
29
|
+
|
30
|
+
Which components are running on which VMs?
|
31
|
+
|
32
|
+
## Tips
|
33
|
+
|
34
|
+
1. to edit your deployment file run `bosh edit deployment`
|
35
|
+
1. the VMs in the running deployment above are called `jobs`
|
36
|
+
|
37
|
+
## Solution
|
38
|
+
|
39
|
+
* `data/0` - `postgres`, `debian_nfs_server`
|
40
|
+
* `core/0` - `nats`, `health_manager_next`, `uaa`
|
41
|
+
* `api/0` - `cloud_controller_ng`, `gorouter`
|
42
|
+
* `dea/0` - `dea_ng`
|
43
|
+
|
@@ -9,9 +9,10 @@ There are some requirements:
|
|
9
9
|
* AWS account, with access credentials, and capacity to provision 6 servers & 2 elastic IPs
|
10
10
|
* Credit on the credit card attached to your AWS account for $1 or so
|
11
11
|
* Ruby 1.9.3 or Ruby 2.0.0 installed on your local machine
|
12
|
+
* Git (1.8+) installed on your local machine
|
12
13
|
* Internet access
|
13
14
|
* About an hour of your time (about 5 minutes of your human activity)
|
14
|
-
*
|
15
|
+
* Doesn't support Windows (lack of rsync for windows)
|
15
16
|
|
16
17
|
Optionally:
|
17
18
|
|
@@ -63,7 +64,7 @@ The inception server above already installs the following gems. If you skipped t
|
|
63
64
|
```
|
64
65
|
$ gem install bosh_cli -v "~> 1.5.0.pre" --source https://s3.amazonaws.com/bosh-jenkins-gems/
|
65
66
|
$ gem install bosh-bootstrap
|
66
|
-
$ gem install bosh-cloudfoundry
|
67
|
+
$ gem install bosh-cloudfoundry
|
67
68
|
```
|
68
69
|
|
69
70
|
|
@@ -189,6 +190,32 @@ $ cd cf-env
|
|
189
190
|
$ bundle
|
190
191
|
|
191
192
|
$ cf push env
|
193
|
+
Instances> 1
|
194
|
+
|
195
|
+
1: 128M
|
196
|
+
2: 256M
|
197
|
+
3: 512M
|
198
|
+
4: 1G
|
199
|
+
Memory Limit> 1
|
200
|
+
|
201
|
+
Creating env... OK
|
202
|
+
|
203
|
+
1: env
|
204
|
+
2: none
|
205
|
+
Subdomain> env
|
206
|
+
|
207
|
+
1: 1.2.3.4.xip.io
|
208
|
+
2: none
|
209
|
+
Domain> 1.2.3.4.xip.io
|
210
|
+
|
211
|
+
Creating route env.1.2.3.4.xip.io... OK
|
212
|
+
Binding env.1.2.3.4.xip.io to env... OK
|
213
|
+
|
214
|
+
Create services for application?> n
|
215
|
+
|
216
|
+
Save configuration?> n
|
217
|
+
...
|
218
|
+
|
192
219
|
```
|
193
220
|
|
194
221
|
Open in a browser: http://env.1.2.3.4.xip.io
|
metadata
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bosh-cloudfoundry
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.0
|
5
|
-
prerelease:
|
4
|
+
version: 0.7.0
|
5
|
+
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Dr Nic Williams
|
@@ -499,6 +499,10 @@ files:
|
|
499
499
|
- templates/v134/openstack/spec
|
500
500
|
- templates/v134/spec
|
501
501
|
- tutorials/README.md
|
502
|
+
- tutorials/activities/add-more-deas.md
|
503
|
+
- tutorials/activities/move-cc-into-own-job-and-scale.md
|
504
|
+
- tutorials/activities/view-system-health.md
|
505
|
+
- tutorials/activities/which-bits-are-running-where.md
|
502
506
|
- tutorials/build-your-own-heroku-with-cloudfoundry.md
|
503
507
|
homepage: ''
|
504
508
|
licenses:
|
@@ -515,13 +519,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
515
519
|
version: '0'
|
516
520
|
segments:
|
517
521
|
- 0
|
518
|
-
hash:
|
522
|
+
hash: 2077461492105591398
|
519
523
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
520
524
|
none: false
|
521
525
|
requirements:
|
522
|
-
- - ! '
|
526
|
+
- - ! '>='
|
523
527
|
- !ruby/object:Gem::Version
|
524
|
-
version:
|
528
|
+
version: '0'
|
529
|
+
segments:
|
530
|
+
- 0
|
531
|
+
hash: 2077461492105591398
|
525
532
|
requirements: []
|
526
533
|
rubyforge_project:
|
527
534
|
rubygems_version: 1.8.25
|