forked from cloudfoundry/docs-bosh
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deployment-basics.html.md.erb
88 lines (73 loc) · 2.6 KB
/
deployment-basics.html.md.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
---
title: Build Deployment Manifest
---
(See [What is a Deployment?](deployment.html) for an introduction to deployments.)
A deployment is a collection of VMs, persistent disks and other resources. To create a deployment in the Director, it has to be described with a [deployment manifest](terminology.html#manifest). Most deployment manifests look something like this:
```yaml
---
name: zookeeper
releases:
- name: zookeeper
version: 0.0.5
url: https://bosh.io/d/github.com/cppforlife/zookeeper-release?v=0.0.5
sha1: 65a07b7526f108b0863d76aada7fc29e2c9e2095
stemcells:
- alias: default
os: ubuntu-trusty
version: latest
update:
canaries: 2
max_in_flight: 1
canary_watch_time: 5000-60000
update_watch_time: 5000-60000
instance_groups:
- name: zookeeper
azs: [z1, z2, z3]
instances: 5
jobs:
- name: zookeeper
release: zookeeper
properties: {}
vm_type: default
stemcell: default
persistent_disk: 10240
networks:
- name: default
- name: smoke-tests
azs: [z1]
lifecycle: errand
instances: 1
jobs:
- name: smoke-tests
release: zookeeper
properties: {}
vm_type: default
stemcell: default
networks:
- name: default
```
(Taken from <https://github.com/cppforlife/zookeeper-release/blob/master/manifests/zookeeper.yml>)
Here is how deployment manifest describes a reasonably complex Zookeeper cluster:
- Zookepeer source code, configuration file, startup scripts
- include `zookeeper` release version `0.0.5` to the `releases` section
- Operating system image onto which install software
- include latest version of `ubuntu-trusty` stemcell
- Create 5 Zookeeper VMs spread
- add `zookeeper` [instance group](terminology.html#instance-group) with `instances: 5`
- Spread VMs over multiple availability zones
- add `azs: [z1, z2, z3]`
- Install Zookeeper software onto VMs
- add `zookeeper` job to this instance group
- Size VMs in the same way
- add `vm_type: default` which references VM type from cloud config
- Attach a 10GB [persistent disk](terminology.html#persistent-disk) to each Zookeeper VM
- add `persistent_disk: 10240` to `zookeeper` instance group
- Place VMs onto some [network](networks.html)
- add `networks: [{name: default}]` to `zookeeper` instance group
- Provide a way to smoke test Zookeeper cluster
- add `smoke-tests` instance group with `smoke-tests` job from Zookeeper release
Refer to [manifest v2 schema](manifest-v2.html) for detailed breakdown.
Once manifest is complete referenced stemcells and releases must be uploaded.
---
Next: [Upload Stemcells](uploading-stemcells.html)
Previous: [Update Cloud Config](update-cloud-config.html)