Giter Site home page Giter Site logo

docker-services-boshworkspace's Introduction

docker-services-boshworkspace

Build Status

The fastest way to deploy Docker Services in combination with Cloud Foundry onto bosh-lite.

Preparation

To get started you will need a running bosh-lite. Get yours by following the instructions here

Next step is setting up this repository

git clone https://github.com/cloudfoundry-community/docker-services-boshworkspace.git
cd docker-services-boshworkspace
bundle install

Deploy Cloud Foundry

With all prerequisites in place let deploy Cloud Foundry.

bosh deployment cf-warden
bosh prepare deployment
bosh deploy

Deploy Docker Services

bosh deployment docker-warden
bosh prepare deployment
bosh deploy
cf create-service-broker docker containers containers http://cf-containers-broker.10.244.0.34.xip.io
# List services
cf service-access
cf enable-service-access <service_name>

Deploy on AWS VPC

Assuming you used terraform-aws-cf-install, ssh onto the Bastion server and run:

cd ~/workspace/deployments
git clone https://github.com/cloudfoundry-community/docker-services-boshworkspace.git
cd docker-services-boshworkspace

There is a helper script in shell/populate-docker-aws-vpc which will extract information from the cf-boshworkspace deployment on the bastion server and populate the variables in deployments/docker-aws-vpc.yml, a copy of the original file will be left in deployments/docker-aws-vpc.yml.orig. Run the following on the bastion server:

cd ~/workspace/deployments/docker-services-boshworkspace/shell
./populate-docker-aws-vpc

You will still need to modify the SUBNET_ID in deployments/docker-aws-vpc.yml. In AWS Console navigate to VPC > Subnets and select a subnet named "docker", the subnet id will be in the format "subnet-xxxxxxxx" and replace the value SUBNET_ID in the file

Your deployment manifest is now populated, launch the deployment from the bastion server:

cd ~/workspace/deployments/docker-services-boshworkspace
bosh deployment docker-aws-vpc
bosh prepare deployment
bosh -n deploy

By default, it assumes you are deploying into a 10.10.5.0/24 subnet. This is an optimization for users of terraform-aws-cf-install which creates this subnet for us.

Swarm & Offline images

There are alternative deployment files for using docker with swarm. If you want to install the docker service broker without internet access be sure to checkout the offline deployments. Which use the docker-broker-images-boshrelease for installing the docker images.

Alternate Network Configurations

If you want to deploy into another subnet CIDR, then add a meta.subnets to your deployment file to look something like:

meta:
  subnets:
  - range: 10.10.5.0/24
  name: default_unused
  reserved:
    - 10.10.5.2 - 10.10.5.9
    static:
      - 10.10.5.10 - 10.10.5.250
      gateway: 10.10.5.1
      dns:
        - 10.10.0.2
        cloud_properties:
          security_groups: (( meta.security_groups ))
          subnet: (( meta.subnet_ids.docker ))

docker-services-boshworkspace's People

Contributors

cweibel avatar drnic avatar geofffranks avatar lnguyen avatar rkoster avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-services-boshworkspace's Issues

[warden] bosh deploy - spiff fails

$ bosh deployment docker-warden
Deployment set to `/home/ubuntu/workspace/docker-services-boshworkspace/.deployments/docker-warden.yml'
$ bosh deploy
Generating deployment manifest
Command failed: 'spiff merge /home/ubuntu/workspace/docker-services-boshworkspace/templates/docker-deployment.yml /home/ubuntu/workspace/docker-services-boshworkspace/templates/docker-properties.yml /home/ubuntu/workspace/docker-services-boshworkspace/templates/docker-jobs.yml /home/ubuntu/workspace/docker-services-boshworkspace/templates/docker-warden.yml /home/ubuntu/workspace/docker-services-boshworkspace/.stubs/docker-warden.yml 2>&1'
2015/03/04 00:16:13 error generating manifest: unresolved nodes:
        (( static_ips(1) ))     in /home/ubuntu/workspace/docker-services-boshworkspace/templates/docker-jobs.yml       jobs.[0].networks.[0].static_ips

client and server don't have same version

After deploy new version (from master branch) it is not possible to run docker commands. I tried simplest command:
/var/vcap/packages/docker/bin/docker -H unix:///var/vcap/sys/run/docker/docker.sock ps
which showed error:
Error response from daemon: client and server don't have same version (client : 1.19, server: 1.18)

docker-broker-images/1 failed to upload

@rkoster

I added the offline pieces to my deployments/docker-aws-vpc.yml file but get a blobstore error during bosh prepare deployment:

Uploading 'docker-broker-images/1'
Acting as user 'admin' on 'bosh-vpc-3854145d'
Downloading from blobstore (id=2f86ba39-d462-41b9-bc94-e6a55801687a)...
Blobstore error: Could not fetch object, 403/

My changes to deployment file included:

releases:
- name: docker
  version: '17'
  git: https://github.com/cf-platform-eng/docker-boshrelease.git
- name: docker-broker-images
  version: '1'
  git: https://github.com/cloudfoundry-community/docker-broker-images-boshrelease.git
stemcells:
- name: bosh-aws-xen-ubuntu-trusty-go_agent
  version: 2941
templates:
- docker-deployment.yml
- docker-jobs.yml
- docker-properties.yml
- docker-offline.yml
- docker-aws-vpc.yml

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.