This repository is a BOSH release for deploying Gorouter, TCP Routing, and other associated tasks that provide HTTP and TCP routing in Cloud Foundry foundations.
Our BOSH release is available on bosh.io and on our GitHub Releases page.
If you have a concrete issue to report or a change to request, please create a Github issue on routing-release.
Issues with any related submodules (Gorouter, Routing API, Route Registrar, CF TCP Router) should be created here instead.
You can also reach us on Slack at
cloudfoundry.slack.com in the
#cf-for-vms-networking.
channel.
See the Routing Contributing Resources section for more information on how to contribute.
The TCP Router and Routing API are stateless and horizontally scalable. The TCP Routers must be fronted by a load balancer for high-availability. The Routing API depends on a database, that can be clustered for high-availability. For high availability, deploy multiple instances of each job, distributed across regions of your infrastructure.
For details refer to Routing API.
For documentation on metrics available for streaming from Routing components through the Loggregator Firehose, visit the CloudFoundry Documentation. You can use the NOAA Firehose sample app to quickly consume metrics from the Firehose.
For more information on how Routing release accomplishes session affinity, i.e. sticky sessions, refer to the Session Affinity document.
X-CF Headers describes the X-CF headers that are set on requests and responses inside of CF.
-
Clone CI repository (next to where this code is cloned), and make sure latest is pulled by running
git pullmkdir -p ~/workspace cd ~/workspace git clone https://github.com/cloudfoundry/wg-app-platform-runtime-ci.git
-
Git - Distributed version control system
-
Go - The Go programming language
Run the appropriate unit tests (see Testing).
The release branch contains code that has been released. All development work
happens on the develop branch.
- Clone the repository
mkdir -p ~/workspace
cd ~/workspace
git clone https://github.com/cloudfoundry/routing-release.git
cd routing-release/- Initialize and sync submodules.
./scripts/updateTemplate tests can be run with ./scripts/test-in-docker-locally.bash. This will also run unit + integration tests.
If you wish to run template tests on their own, you can enter the docker env with ./scripts/start-docker-for-testing.bash and then run the tests via cd /repo && ./scripts/docker/tests-templates.bash
Running tests for this release requires a DB flavor. The following scripts with default to mysql DB. Set DB environment variable for alternate DBs e.g. <mysql-8.0(or mysql),mysql-5.7,postgres>
./scripts/create-docker-container.bash: This will create a docker container with appropriate mounts../scripts/test-in-docker-locally.bash: Create docker container and run all tests and setup in a single script../scripts/test-in-docker-locally.bash <package> <sub-package>: For running tests under a specific package and/or sub-package: e.g../scripts/test-in-docker-locally.bash gorouter router
When inside docker container:
/repo/scripts/docker/build-binaries.bash: This will build binaries required for running tests e.g. nats-server and rtr/repo/scripts/docker/test.bash: This will run all tests in this release/repo/scripts/docker/test.bash gorouter: This will only rungoroutertests/repo/scripts/docker/test.bash gorouter router: This will only runroutersub-package tests forgorouterpackage/repo/scripts/docker/tests-templates.bash: This will run all of tests for bosh tempalates/repo/scripts/docker/lint.bash: This will run all of linting defined for this repo.
The Routing Acceptance Tests must run against a full Cloud Foundry deployment. One method is to deploy Cloud Foundry on a BOSH lite with cf-deployment.
To run the Routing Acceptance Tests, see the README.md.