This repository provides a simple and fast way to run Cloud Foundry locally. It enables developers to rapidly prototype, develop, and test new ideas in an inexpensive setup.
The following tools need to be installed:
dockeror podmandocker-composeor podman-composemake:- It should be already installed on MacOS and Linux.
- For Windows installation see: https://gnuwin32.sourceforge.net/packages/make.htm
Important
Please ensure that your Podman setup is configured as an alias for Docker, as this project relies on Docker commands. You can achieve this by executing sudo ln -s /opt/podman/bin/podman /usr/local/bin/docker and sudo ln -s /opt/homebrew/bin/podman-compose /usr/local/bin/docker-compose on Mac OS X.
make up# Login via CF CLI and create a test space
make login
# Upload Java, Node, Go, and Binary buildpacks
# 'make bootstrap-complete' would upload all buildpacks
make bootstrapcf push -f examples/hello-js/manifest.yamlmake downYou can configure the installation by setting the environment variable INSTALL_OPTIONAL_COMPONENTS=false to leave out these optional components:
bosh-dns, cf-tcp-router, credhub, loggregator, nfsbroker, policy-agent, policy-server, routing-api, service-discovery-controller
Set ADDITIONAL_VALUES_FILES environment variable to a comma-separated list of Helmfile values files. They are merged last, so they can override any value in values.yaml.gotmpl (domains, CNI, chart versions, etc.).
ADDITIONAL_VALUES_FILES=./my-values.yaml make upThe postgresql value is passed to the PostgreSQL chart. For example, to raise max_connections (default 100), put this in a values file and use it via ADDITIONAL_VALUES_FILES (or the additional-values-files input of the setup-cf action):
postgresql:
primary:
extendedConfiguration: |
max_connections = 500This repository ships a composite action at .github/actions/setup-cf that provisions a full Cloud Foundry environment on a KinD cluster inside a GitHub Actions workflow. After it completes, the generated credentials from temp/secrets.env are exported into $GITHUB_ENV, so later steps can use the CF CLI directly.
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: cloudfoundry/kind-deployment/.github/actions/setup-cf@main
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- run: cf push -f examples/hello-js/manifest.yamlInputs (all optional):
isolated-cell(boolean, defaultfalse): add an isolated worker cell for routing isolation segment tests.install-optional-components(boolean, defaulttrue): install optional CF components.cf-cli-version(string, default8.19.0): CF CLI version to install.github-token(string): GitHub API token, used whenuse-latest-versionsis enabled to avoid rate limiting.ref(string, defaultmain): kind-deployment branch, tag or commit SHA that is checked out and deployed. Set it to the same commit as the action's@<sha>to get a fully pinned setup.use-latest-versions(boolean, defaultfalse): sync to the latestdevelopversions of cf-deployment before deploying.additional-values-files(string, default ''): comma-separated list of Helmfile values files, merged last. Use it to override any value, e.g. a chart version (charts.capi.version). Must be absolute paths, e.g.${{ github.workspace }}/capi-values.yaml, since Helmfile runs from the checked-outkind-deploymentdirectory.
- Routing isolation segments are not fully feature complete since this relies on more than one gateway which is not possible to realize in a local kind setup (see FAQ)
Please check our contributing guidelines.
This project follows Cloud Foundry Code of Conduct.