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.
Job | Status |
---|---|
unit tests | |
performance tests | |
smoke tests |
- Clone CI repository (next to where routing-release is cloned)
mkdir -p ~/workspace
cd ~/workspace
git clone https://github.com/cloudfoundry/wg-app-platform-runtime-ci.git
When working on individual components of the Routing Release, work out of the
submodules under src/
.
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/update
From the root of the repo, run:
rspec ./spec/
rubocop ./spec/
If you do not have rspec
or 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.
Running tests for this release requires Linux specific setup and it takes advantage of having the same configuration as Concourse CI, so it's recommended to run the tests (units & integration) in docker containers.
./scripts/docker/container.bash <mysql-8.0(or mysql),mysql-5.7,postgres>
: This will create a docker container with appropriate mounts./repo/scripts/docker/build-binaries.bash
: This will build binaries required for running tests e.g. nats-server
-
/repo/scripts/docker/test.bash
: This will run all tests in this release -
/repo/scripts/docker/test.bash gorouter
: This will only rungorouter
tests -
/repo/scripts/docker/test.bash gorouter router
: This will only runrouter
sub-package tests forgorouter
package -
/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.
There are also these scripts to make local development/testing easier:
./scripts/test-in-docker-locally
: Runs template tests, building binaries, and then the test.bash script. Default tomysql
DB. SetDB
environment variable for alternate DBs e.g. <mysql-8.0(or mysql),mysql-5.7,postgres>- The
<test-script> <component> <subpackage>
syntax mentioned above is also supported here:./scripts/test-in-docker-locally gorouter router
- The
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.