Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 5 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,24 +186,17 @@ If this app is also a service broker, use `docker-app-broker` instead of just
`docker-app`. This option is appropriate for docker-wrapper 12-factor apps that
delegate their persistence to bound services.

Docker applications that require persistent storage can not be deployed into the
Elastic Runtime. These can be deployed to separate BOSH-managed VMs instead by
using the `docker-bosh` type:
Docker applications that require persistent storage can not be deployed into the Elastic Runtime. These can be deployed to separate BOSH-managed VMs instead by using the `docker-bosh` type:

<pre>
- name: docker-bosh1
type: docker-bosh
image: test/dockerimage
cpu: 5
memory: 4096
ephemeral_disk: 4096
persistent_disk: 2048
instances: 1
manifest: |
test-key1: testValue1
test-key2: testValue2
test-key3: testValue3
test-key4: testValue4
containers:
- name: redis
image: "redis"
Expand Down Expand Up @@ -235,33 +228,21 @@ If a docker image cannot be downloaded by BOSH dynamically, its better to provid
<pre>
- name: docker-bosh2
type: docker-bosh
image: test/dockerimage # This should match the `image` entry within manifest
files:
- path: resources/dockerimage.tgz
- path: resources/cfplatformeng-docker-tile-example.tgz
cpu: 5
memory: 4096
ephemeral_disk: 4096
persistent_disk: 2048
instances: 1
manifest: |
test-key1: testValue1
test-key2: testValue2
test-key3: testValue3
test-key4: testValue4
containers:
- name: test-docker-image
image: "test/dockerimage" # This should match the `image_name` specified in the package
command: "--dir /var/lib/redis/ --appendonly yes"
bind_ports:
- "6379:6379"
bind_volumes:
- "/var/lib/redis"
entrypoint: "redis-server"
memory: "256m"
- name: test_docker_image
image: "cfplatformeng/docker-tile-example"
env_vars:
- "EXAMPLE_VAR=1"
# See below on custom forms/variables and binding it to the docker env variable
- custom-variable-name: ((.properties.customer_name.value))
- "custom_variable_name=((.properties.customer_name.value))"
</pre>

Also, refer to [docker-bosh](docs/docker-bosh.md) for more details.
Expand Down
25 changes: 11 additions & 14 deletions docs/docker-bosh.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,38 +80,35 @@ Various properties can be specified to control/configure the app. The format is
<td> manifest </td>
<td> Y </td>
<td> yaml </td>
<td> docker-boshrelease yaml manifest for running the container; Also, requires specifying env variables to be passed onto the docker image along with the `image` name that matches the `image_name`.
<td> docker-boshrelease yaml manifest [1] for running the container; Also, requires specifying env variables to be passed onto the docker image along with the `image` name that matches the `image_name`.
<td> </td>
</tr>
</table>

[1] [Properties format](https://github.com/cloudfoundry-community/docker-boshrelease/blob/master/CONTAINERS.md#properties-format)

### Sample docker package
```
- name: docker-bosh1
type: docker-bosh
image_name: ubuntu # Need this to match the `image` specifed in manifest
files:
- path: resources/ubuntu_image.tgz
- path: resources/cfplatformeng-docker-tile-example.tgz
cpu: 5
memory: 4096
ephemeral_disk: 4096
persistent_disk: 2048
instances: 1
manifest: |
containers:
- name: test-ubuntu-docker
image: ubuntu # should match the docker image name
command: "--dir /var/lib/test --appendonly yes"
bind_ports:
- "9200:9200"
bind_volumes:
- "/var/lib/test"
env-vars:
- test-key1: testValue1
- test-key2: testValue2
- name: test_docker_image
image: "cfplatformeng/docker-tile-example"
env_vars:
- "test_key1=testValue1"
- "test_key2=testValue2"
# Add custom properties below
- custom-variable-name: (( .properties.customer_name.value ))
- custom-variable-city: (( .properties.city.value ))
- "custom_variable_name=(( .properties.customer_name.value ))"
- "custom_variable_city=(( .properties.city.value ))"

```

Expand Down
Binary file not shown.
1 change: 0 additions & 1 deletion sample/resources/ubuntu_image.tgz

This file was deleted.

22 changes: 8 additions & 14 deletions sample/tile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,29 +102,23 @@ packages:
- path: resources/buildpack2.zip
- name: docker-bosh1
type: docker-bosh
image_name: ubuntu # Needs to match `image` specified in manifest
files:
- path: resources/ubuntu_image.tgz
- path: resources/cfplatformeng-docker-tile-example.tgz
cpu: 5
memory: 4096
ephemeral_disk: 4096
persistent_disk: 2048
instances: 1
manifest: |
containers:
- name: test-ubuntu-docker
image: ubuntu # should match the docker image name
command: "--dir /var/lib/test --appendonly yes"
bind_ports:
- "9200:9200"
bind_volumes:
- "/var/lib/test"
env-vars:
- test-key1: testValue1
- test-key2: testValue2
- name: docker_example
image: "cfplatformeng/docker-tile-example" # should match the docker image name
env_vars:
- "test_key1=testValue1"
- "test_key2=testValue2"
# Must add custom properties below
- custom-variable-name: (( .properties.customer_name.value ))
- custom-variable-city: (( .properties.city.value ))
- "custom_variable_name=(( .properties.customer_name.value ))"
- "custom_variable_city=(( .properties.city.value ))"
- name: docker-app
type: docker-app
image: test/dockerimage
Expand Down