Skip to content

Commit 8dff65f

Browse files
committed
refine wording on 'environment'
1 parent db12f4a commit 8dff65f

File tree

1 file changed

+135
-0
lines changed

1 file changed

+135
-0
lines changed

create-manifest.html.md.erb

+135
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
---
2+
title: Create a Manifest
3+
---
4+
5+
When you discover a distributed software product that you want to deploy to the cloud using BOSH,
6+
you download a BOSH release of the product.
7+
You then locate a stemcell that is appropriate for your preferred combination of VM and IaaS.
8+
Now you need to decide the orchestration and configuration of the deployment,
9+
and to express your decisions in a form that BOSH can consume: namely, a deployment manifest.
10+
This topic explains how manifests work and how to create them.
11+
12+
## <a id="orchestrate"></a> Specifying Orchestration ##
13+
14+
Suppose the product you want to deploy can do five things: call these capabilities Feature A through Feature D.
15+
You want your deployment to take advantage of all five features, but you don't want any one VM to be responsible for more than two features.
16+
For the sake of capacity and resilience, you want every feature to run on more than one VM.
17+
18+
You can achieve this by defining VM types, where each type supports different features.
19+
Finally, you decide how many instances of each VM type to create.
20+
21+
What you are doing is orchestrating your deployment.
22+
In the manifest you specify your orchestration decisions along with everything else about your deployment,
23+
including the stemcell, release, and network configuration to use.
24+
25+
## <a id="release"></a> Translating from Release to Manifest ##
26+
27+
**Note**: The terms "job" and "template" are used one way in the BOSH release and another in BOSH manifests.
28+
In some situations you may need to use the terms "release job", "manifest job", "release template", and "manifest template" for the sake of clarity.
29+
30+
When you orchestrate, you allocate features to VM types and then specify a number of instances for each VM type.
31+
32+
* A BOSH release uses the term "job" to describe a _feature_.
33+
* Meanwhile, a BOSH manifest uses the term "job" to describe a _VM type_,
34+
and the term "template" to describe a feature.
35+
* When you allocate a feature to a VM type, the feature described as a "job" in the release becomes a "template" in the `jobs` block in the manifest.
36+
You name your VM types as "jobs" and specify a number of instances for each.
37+
38+
For example, the manifest fragment below shows two VM types, each of which supports two features.
39+
40+
<pre class="terminal">
41+
jobs:
42+
- name: vm-type-x
43+
templates:
44+
- name: feature-a
45+
release: foo_beta
46+
- name: feature-d
47+
release: foo_beta
48+
instances: 2
49+
resource_pool: default
50+
persistent_disk: 10240
51+
networks:
52+
- name: default
53+
default: [dns, gateway]
54+
- name: vm-type-y
55+
templates:
56+
- name: feature-b
57+
release: foo_beta
58+
- name: feature-c
59+
release: foo_beta
60+
instances: 4
61+
resource_pool: default
62+
persistent_disk: 20480
63+
networks:
64+
- name: default
65+
default: [dns, gateway]
66+
</pre>
67+
68+
69+
## <a id="anatomy"></a> Anatomy of a Manifest ##
70+
71+
A BOSH deployment manifest begins by identifying the deployment.
72+
73+
For example:
74+
75+
<pre class="terminal">
76+
---
77+
name: dummy
78+
director_uuid: 080a8261-8bf8-4996-a754-2545a99c0b2c
79+
80+
releases:
81+
- name: dummy_a
82+
version: latest
83+
</pre>
84+
85+
After that, the manifest has six required _blocks_:
86+
87+
1. compilation
88+
1. update
89+
1. resource_pools
90+
1. networks
91+
1. jobs
92+
1. properties
93+
94+
Manifests are written in YAML, which means that each block is translated into a hash.
95+
You can put the blocks in any order.
96+
97+
### <a id='compilation'></a> The compilation block ###
98+
99+
BOSH compiles all the software packages within the release at deploy time.
100+
The `compilation` block specifies what VMs should perform the compilation.
101+
102+
### <a id='update'></a> The update block ###
103+
104+
The `update` block:
105+
106+
* Uses the `max_in_flight` variable to limit the number of VMs that can be updated simultaneously.
107+
* Specifies the desired behavior of "canaries."
108+
A "canary" is an instance of a given VM type that BOSH updates before all the other instances in order to test whether the new release can update successfully.
109+
BOSH monitors the updating of the canary, and if that fails, or appears to succeed too quickly, BOSH does not proceed to update the rest of the instances.
110+
111+
### <a id='resource_pools'></a> The resource_pools block ###
112+
113+
Resource pools are collections of VMs which are on the same network, are the same kind of VM from the IaaS's perspective, and are built from the same stemcell.
114+
The `resource_pools` block specifies all of these.
115+
116+
### <a id='networks'></a> The networks block ###
117+
118+
The `networks` block is where you specify network configuration information for the deployment.
119+
Networks are named, enabling you to specify multiple networks.
120+
121+
### <a id='jobs'></a> The jobs block ###
122+
123+
The `jobs` block is where you name VM types and specify:
124+
125+
* The product features each type supports, in the form of templates.
126+
* Some configuration information that applies to the VM type as opposed to the feature.
127+
128+
Features (templates) typically require configuration.
129+
You specify this information in the `properties` block.
130+
131+
### <a id='properties'></a> The properties block ###
132+
133+
The `properties` block consists of headings which are the names of features (templates) from the `jobs` block.
134+
Each heading is followed by one or more lines of configuration information.
135+

0 commit comments

Comments
 (0)