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.
If you have a concrete issue to report or a change to request, please create a Github issue on routing-release.
See the Routing Contributing Resources section for more information on how to contribute.
Table of Contents
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.
When working on individual components of the Routing Release, work out of the
Run the appropriate unit tests (see Testing).
release branch contains code that has been released. All development work
happens on the
Get the code
- Clone the repository
mkdir -p ~/workspace cd ~/workspace git clone https://github.com/cloudfoundry/routing-release.git cd routing-release/
- Initialize and sync submodules.
From the root of the repo, run:
Run the specs
Lint the specs
If you do not have
rubocop installed locally, run
./scripts/start-docker-for-testing.sh and execute the commands in the docker
container. Prepend "sudo" to the script if you are an unprivileged user.
In a Docker container
Run tests using the script provided. This script pulls a docker image and runs the tests within a container because integration tests require Linux specific features.
Notice/warning: the script is called
run-unit-tests-in-dockerbut it really runs unit and integration tests, that's why they need to run in a container.
./scripts/run-unit-tests-in-docker #sudo for unprivileged users
If you'd like to run a specific component's tests in a Docker container, the
run-unit-testsscript also takes a package name as an argument:
- If you'd like to run the unit and integration tests for an individual
component locally, we recommend you run
bin/testin that component's directory. Please make sure it's a component that doesn't require a Linux operating system.
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.