Skip to content

Commit

Permalink
deployment schema updates
Browse files Browse the repository at this point in the history
  • Loading branch information
cppforlife committed May 22, 2015
1 parent 32215fc commit e341c89
Show file tree
Hide file tree
Showing 8 changed files with 85 additions and 19 deletions.
1 change: 0 additions & 1 deletion aws-cpi.html.md.erb
Expand Up @@ -40,7 +40,6 @@ Example of vip network:
networks:
- name: default
type: vip
cloud_properties: {}
```

---
Expand Down
75 changes: 74 additions & 1 deletion deployment-manifest.html.md.erb
Expand Up @@ -47,6 +47,25 @@ releases:
- {name: redis, version: 12}
```

### <a id='bosh-init-releases'></a> Custom bosh-init Releases Block

**releases** [Array, required]: The name, url and possibly SHA1 of each release in the deployment.

- **name** [String, required]: Name of a release name used in the deployment
- **url** [String, required]: URL of the release to use. URL may use the file protocol (`file://`) or HTTP(s) (`http(s)://`). File URLs can be absolute or relative to the current directory of `bosh-init` execution.
- **sha1** [String, required]: The SHA1 of the release tarball. SHA1 is only required when using HTTP(s) URLs.

Example:

```yaml
releases:
- name: bosh
url: https://bosh.io/d/github.com/cloudfoundry/bosh?v=158
sha1: a97811864b96bee096477961b5b4dadd449224b4
- name: bosh-aws-cpi
url: file://bosh-aws-cpi-release-158.tgz
```

---
## <a id='networks'></a>Networks Block

Expand Down Expand Up @@ -89,6 +108,27 @@ resource_pools:
availability_zone: us-east-1c
```

### <a id='bosh-init-stemcells'></a> Custom bosh-init Stemcell Key Schema

**stemcell** [Hash, required]: The stemcell used to create resource pool VMs.

- **url** [String, required]: URL of the stemcell tarball. URL may use the file protocol (`file://`) or HTTP(s) (`http(s)://`). File URLs can be absolute or relative to the current directory of `bosh-init` execution.
- **sha1** [String, required]: The SHA1 of the stemcell tarball. SHA1 is only required when using HTTP(s) URLs.

Example:

```yaml
resource_pools:
- name: redis-servers
network: default
stemcell:
url: https://bosh.io/d/stemcells/bosh-aws-xen-ubuntu-trusty-go_agent?v=2950
sha1: 6489bff150d1ecbd12fda30267896f041dd279f0
cloud_properties:
instance_type: m1.small
availability_zone: us-east-1c
```

### <a id='resource-pools-cloud-properties'></a> CPI Specific `cloud_properties`

- [See AWS CPI resource pool cloud properties](aws-cpi.html#resource-pools)
Expand Down Expand Up @@ -213,7 +253,7 @@ Example:
---
## <a id='properties'></a>Properties Block

**properties**: Describes global properties and general configuration information.
**properties** [Hash, optional]: Describes global properties and general configuration information.

Global properties allow BOSH to configure jobs to a specific environment. `properties` defined in the [Properties](#properties) block are accessible to all jobs. Any identically named `properties` in the [Jobs](#jobs) block will override the global property for that job.

Expand Down Expand Up @@ -243,3 +283,36 @@ properties:
1. If an identically named property exists in the Properties sub-block of the [Jobs](#jobs) block of the deployment manifest, the value of this property overrides all previous values.

<p class="note"><strong>Note</strong>: If you declare specific properties in a job template spec, BOSH ignores all other properties. If you do not declare any specific properties in a job template spec, BOSH applies all properties from the deployment manifest to the job. </p>

---
## <a id='cloud-provider'></a> Cloud Provider Block

**cloud_provider** [Hash, required]: Specifies CPI configuration for the `bosh-init` to create VMs, etc. Regular deployment manifests cannot specify this block.

* **template** [Hash, required]: Specifies the name of the CPI job and release where the CPI job exists. It will be used by the `bosh-init` to create VMs, persistent disks, etc.
* **name** [String, required]: The CPI job name.
* **release** [String, required]: The CPI release name.
* **mbus** [String, required]: HTTPs URL used by the `bosh-init` to contact the Agent on a created VM. The URL includes basic auth credentials that should be customized for each deployment. Example: `"https://mbus:mbus-password@10.0.0.6:6868"`.
* **properties** [Hash, required]: Properties required by the CPI job.

Example from [Initializing BOSH environment on vSphere](init-vsphere.html):

```yaml
cloud_provider:
template: {name: cpi, release: bosh-vsphere-cpi}

mbus: "https://mbus:mbus-password@10.0.0.6:6868"

properties:
vcenter: { ... }

agent: {mbus: "https://mbus:mbus-password@0.0.0.0:6868"}

blobstore:
provider: local
path: /var/vcap/micro_bosh/data/cache

ntp:
- 0.pool.ntp.org
- 1.pool.ntp.org
```
2 changes: 1 addition & 1 deletion job-logs.html.md.erb
Expand Up @@ -73,7 +73,7 @@ To save output from a BOSH errand VM:
By default, BOSH downloads the logs to your present working directory. Use the `--logs-dir destination_directory` option to change this directory.

<pre class="terminal">
$ run errand smoke-tests --download-logs --logs-dir ~/workspace/smoke-tests-logs
$ bosh run errand smoke-tests --download-logs --logs-dir ~/workspace/smoke-tests-logs
</pre>

---
Expand Down
11 changes: 4 additions & 7 deletions networks.html.md
Expand Up @@ -82,11 +82,11 @@ Schema for manual network definition:
* **type** [String, required]: Value should be `manual`
* **subnets** [Array, required]: Lists subnets in this network
* **range** [String, required]: Subnet IP range that includes all IPs from this subnet
* **gateway** [String, optional]: Subnet gateway IP
* **gateway** [String, required]: Subnet gateway IP
* **dns** [Array, optional]: DNS IP addresses for this subnet
* **reserved** [Array, optional]: Array of reserved IPs and/or IP ranges. BOSH does not assign IPs from this range to any VM
* **static** [Array, optional]: Array of static IPs and/or IP ranges. BOSH assigns IPs from this range to jobs requesting static IPs. Only IPs specified here can be used for static IP reservations.
* **cloud_properties** [Hash, required]: Describes any IaaS-specific properties for the subnet. May be empty.
* **cloud_properties** [Hash, optional]: Describes any IaaS-specific properties for the subnet. Default is `{}` (empty Hash).

Example:

Expand Down Expand Up @@ -149,7 +149,7 @@ Schema for dynamic network definition:
* **name** [String, required]: Name used to reference this network configuration
* **type** [String, required]: Value should be `dynamic`
* **dns** [Array, optional]: DNS IP addresses for this network
* **cloud_properties** [Hash, required]: Describes any IaaS-specific properties for the network. May be empty.
* **cloud_properties** [Hash, optional]: Describes any IaaS-specific properties for the network. Default is `{}` (empty Hash).

Example:

Expand All @@ -174,15 +174,14 @@ Schema for VIP network definition:

* **name** [String, required]: Name used to reference this network configuration
* **type** [String, required]: Value should be `vip`
* **cloud_properties** [Hash, required]: Describes any IaaS-specific properties for the network. May be empty.
* **cloud_properties** [Hash, optional]: Describes any IaaS-specific properties for the network. Default is `{}` (empty Hash).

Example:

```yaml
networks:
- name: my-network
type: vip
cloud_properties: {}

jobs:
- name: my-job
Expand Down Expand Up @@ -210,12 +209,10 @@ networks:
- name: my-network-1
type: dynamic
dns: [8.8.8.8]
cloud_properties: {}

- name: my-network-2
type: dynamic
dns: [4.4.4.4]
cloud_properties: {}

jobs:
- name: my-multi-homed-job
Expand Down
1 change: 0 additions & 1 deletion openstack-cpi.html.md.erb
Expand Up @@ -42,7 +42,6 @@ Example of vip network:
networks:
- name: default
type: vip
cloud_properties: {}
```

---
Expand Down
12 changes: 6 additions & 6 deletions snapshots.html.md.erb
Expand Up @@ -33,25 +33,25 @@ Once you enable snapshots in your deployment, you can use following CLI commands
<p class="note"><strong>Note</strong>: When you manually take a snapshot, the Director does not pause any processes or flush buffered data to disk. Depending on your IaaS, a snapshot taken manually might not fully capture all the data on your VM at the point you take the snapshot.</p>

<pre class="terminal">
bosh snapshots
$ bosh snapshots
</pre>

Displays the job, Content ID (CID), and created date of all snapshots. Run <code>bosh snapshots</code> to display a list of CIDs if you need to find specific snapshots to recover.

<pre class="terminal">
bosh take snapshot [JOB] [INDEX]
$ bosh take snapshot [JOB] [INDEX]
</pre>

Takes a snapshot of the job VM that you specify. If you do not specify a <code>JOB</code>, takes a snapshot of every VM in the current deployment.

<pre class="terminal">
bosh delete snapshot SNAPSHOT-CID
$ bosh delete snapshot SNAPSHOT-CID
</pre>

Deletes the snapshot that SNAPSHOT-CID specifies.

<pre class="terminal">
bosh delete snapshots
$ bosh delete snapshots
</pre>

Deletes all snapshots.
Expand All @@ -75,8 +75,8 @@ To schedule snapshots for all VMs in all deployments:
```yaml
properties:
director:
enable_snapshots: true
snapshot_schedule: 0 0 7 * * * UTC
enable_snapshots: true
snapshot_schedule: 0 0 7 * * * UTC
```

1. Run `bosh deploy` to update your deployment.
Expand Down
1 change: 0 additions & 1 deletion vcloud-cpi.html.md.erb
Expand Up @@ -61,5 +61,4 @@ Example of 10GB disk:
disk_pools:
- name: default
disk_size: 10_240
cloud_properties: {}
```
1 change: 0 additions & 1 deletion vsphere-cpi.html.md.erb
Expand Up @@ -89,7 +89,6 @@ Example of 10GB disk:
disk_pools:
- name: default
disk_size: 10_240
cloud_properties: {}
```

---
Expand Down

0 comments on commit e341c89

Please sign in to comment.