diff --git a/README.md b/README.md index dc9594e4..8f7a5e14 100644 --- a/README.md +++ b/README.md @@ -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:
- 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" @@ -235,33 +228,21 @@ If a docker image cannot be downloaded by BOSH dynamically, its better to provid- 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))"Also, refer to [docker-bosh](docs/docker-bosh.md) for more details. diff --git a/docs/docker-bosh.md b/docs/docker-bosh.md index 79c53cc0..de832fc8 100644 --- a/docs/docker-bosh.md +++ b/docs/docker-bosh.md @@ -80,18 +80,20 @@ Various properties can be specified to control/configure the app. The format ismanifest Y yaml -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`. + 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`. +[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 @@ -99,19 +101,14 @@ Various properties can be specified to control/configure the app. The format is 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 ))" ``` diff --git a/sample/resources/cfplatformeng-docker-tile-example.tgz b/sample/resources/cfplatformeng-docker-tile-example.tgz new file mode 100644 index 00000000..224a0917 Binary files /dev/null and b/sample/resources/cfplatformeng-docker-tile-example.tgz differ diff --git a/sample/resources/ubuntu_image.tgz b/sample/resources/ubuntu_image.tgz deleted file mode 100644 index 421376db..00000000 --- a/sample/resources/ubuntu_image.tgz +++ /dev/null @@ -1 +0,0 @@ -dummy diff --git a/sample/tile.yml b/sample/tile.yml index 12247ff0..7ca6493a 100644 --- a/sample/tile.yml +++ b/sample/tile.yml @@ -102,9 +102,8 @@ 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 @@ -112,19 +111,14 @@ packages: 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