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.
[!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.
Run the Installation
make up
Access and Bootstrap CloudFoundry
# 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 bootstrap
Deploy a Sample Application
cf push -f examples/hello-js/manifest.yaml
Delete the Installation
make down
Configuration
You can configure the installation by setting the environment variable INSTALL_OPTIONAL_COMPONENTS=false to leave out these optional components:
Set ADDITIONAL_VALUES_FILES environment variable to a comma-separated list of Helmfile values files. Supported formats are plain YAML (.yaml), Go templates that render to YAML (.yaml.gotmpl) and HCL (.hcl); the file extension determines how a file is interpreted (see the Helmfile documentation for details). 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 up
PostgreSQL configuration
The 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):
This 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.
cf-cli-version (string, default 8.19.0): CF CLI version to install.
github-token (string): GitHub API token, used when use-latest-versions is enabled to avoid rate limiting.
ref (string, default main): 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, default false): sync to the latest develop versions of cf-deployment before deploying.
additional-values-files (string, default ‘’): comma-separated list of Helmfile values files, merged last. Supported formats are plain YAML (.yaml), Go templates that render to YAML (.yaml.gotmpl) and HCL (.hcl); the file extension determines how a file is interpreted. 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-out kind-deployment directory.
Unsupported Features
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)
kind-deployment
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.
Prerequisites
The following tools need to be installed:
dockeror podmandocker-composeor podman-composemake:Run the Installation
Access and Bootstrap CloudFoundry
Deploy a Sample Application
Delete the Installation
Configuration
You can configure the installation by setting the environment variable
INSTALL_OPTIONAL_COMPONENTS=falseto leave out these optional components:bosh-dns,cf-tcp-router,credhub,loggregator,nfsbroker,policy-agent,policy-server,routing-api,service-discovery-controllerCustom Helmfile values
Set
ADDITIONAL_VALUES_FILESenvironment variable to a comma-separated list of Helmfile values files. Supported formats are plain YAML (.yaml), Go templates that render to YAML (.yaml.gotmpl) and HCL (.hcl); the file extension determines how a file is interpreted (see the Helmfile documentation for details). They are merged last, so they can override any value invalues.yaml.gotmpl(domains, CNI, chart versions, etc.).PostgreSQL configuration
The
postgresqlvalue is passed to the PostgreSQL chart. For example, to raisemax_connections(default 100), put this in a values file and use it viaADDITIONAL_VALUES_FILES(or theadditional-values-filesinput of thesetup-cfaction):Using the
setup-cfGitHub ActionThis repository ships a composite action at
.github/actions/setup-cfthat provisions a full Cloud Foundry environment on a KinD cluster inside a GitHub Actions workflow. After it completes, the generated credentials fromtemp/secrets.envare exported into$GITHUB_ENV, so later steps can use the CF CLI directly.Inputs (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. Supported formats are plain YAML (.yaml), Go templates that render to YAML (.yaml.gotmpl) and HCL (.hcl); the file extension determines how a file is interpreted. 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.Unsupported Features
Read More Documentation
Contributing
Please check our contributing guidelines.
This project follows Cloud Foundry Code of Conduct.