netman-release
A garden-runc add-on
that provides container networking.
Project links
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
- Remove the following BOSH jobs:
- Remove the following BOSH packages:
flannel
flannel-watchdog
netman-agent
- 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.
- 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
- 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
- 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
- Update the package sync script:
vim $GOPATH/scripts/sync-package-specs
Find or create the sync_package
line for baz
- Run the sync script:
./scripts/sync-package-specs