cf-networking-release

module
v0.0.1-cli Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 12, 2016 License: Apache-2.0

README

netman-release

A garden-runc add-on that provides container networking.

Deploy and run high-level acceptance test errand

pushd ~/workspace
  git clone https://github.com/cloudfoundry-incubator/diego-release
  git clone https://github.com/cloudfoundry/cf-release
  git clone https://github.com/cloudfoundry-incubator/netman-release
popd

pushd ~/workspace/netman-release
  ./scripts/deploy-to-bosh-lite
popd

bosh run errand netman-cf-acceptance

Kicking the tires on the policy server

cf auth network-admin network-admin

# list policies
cf curl /networking/v0/external/policies

# create a new policy
cf curl -X POST /networking/v0/external/policies -d '{ "policies": [ {"source": { "id": "some-app-guid" }, "destination": { "id": "some-other-app-guid", "protocol": "tcp", "port": 8080 } } ] }'

# delete that policy
cf curl -X DELETE /networking/v0/external/policies -d '{ "policies": [ {"source": { "id": "some-app-guid" }, "destination": { "id": "some-other-app-guid", "protocol": "tcp", "port": 8080 } } ] }'

Using your own CNI plugin

  1. Remove the following BOSH jobs:
  • cni-flannel
  • netman-agent
  1. Remove the following BOSH packages:
  • flannel
  • flannel-watchdog
  • netman-agent
  1. Add in all packages and jobs required by your CNI plugin. At a minimum, you must provide a CNI binary program and a CNI config file.
  • For more info on bosh packaging scripts read this.
  • For more info on bosh jobs read this.
  1. Update the deployment manifest properties
garden-cni:
  adapter:
    cni_plugin_dir: /var/vcap/packages/YOUR_PACKAGE/bin # your CNI binary goes in this directory
    cni_config_dir: /var/vcap/jobs/YOUR_JOB/config/cni  # your CNI config file goes in this directory

Remove any lingering references to flannel or cni-flannel in the deployment manifest.

Development

Running low-level tests
~/workspace/netman-release/scripts/docker-test
Referencing a new library from existing BOSH package
  1. Add any new libraries into the submodule from the root of the repo
cd $GOPATH
git submodule add https://github.com/foo/bar src/github.com/foo/bar
./scripts/sync-package-specs
Adding a new BOSH package
  1. Add any new libraries into the submodules from the root of the repo
cd $GOPATH
git submodule add https://github.com/foo/bar src/github.com/foo/bar
  1. Update the package sync script:
vim $GOPATH/scripts/sync-package-specs

Find or create the sync_package line for baz

  1. Run the sync script:
./scripts/sync-package-specs

Directories

Path Synopsis
src
cli-plugin/fakes
This file was generated by counterfeiter
This file was generated by counterfeiter
guardian-cni-adapter/fakes
This file was generated by counterfeiter
This file was generated by counterfeiter
lib/fakes
This file was generated by counterfeiter
This file was generated by counterfeiter
netman-agent/fakes
This file was generated by counterfeiter
This file was generated by counterfeiter
policy-server/fakes
This file was generated by counterfeiter
This file was generated by counterfeiter

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL