• Stars
    star
    181
  • Rank 212,110 (Top 5 %)
  • Language
    Ruby
  • License
    Apache License 2.0
  • Created over 12 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Cloud Foundry Cloud Controller

Code Climate Code Climate slack.cloudfoundry.org

Welcome to the Cloud Controller

Helpful Resources

Components

Cloud Controller

The Cloud Controller provides REST API endpoints to create and manage apps, services, user roles, and more!

Database

The Cloud Controller supports Postgres and Mysql.

Blobstore

The Cloud Controller manages a blobstore for:

All Platforms:

  • Resource cache: During package upload resource matching, Cloud Controller will only upload files it doesn't already have in this cache.

When deployed via capi-release only:

  • App packages: Unstaged files for an application
  • Droplets: An executable containing an app and its runtime dependencies
  • Buildpacks: Set of programs that transform packages into droplets
  • Buildpack cache: Cached dependencies and build artifacts to speed up future staging

Cloud Controller currently supports webdav and the following fog connectors:

  • Alibaba Cloud (Experimental)
  • Azure
  • Openstack
  • Local (NFS)
  • Google
  • AWS

Runtime

The Cloud Controller on VMs uses Diego to stage and run apps and tasks. See Diego Design Notes for more details.

When deployed on Kubernetes, Cloud Controller uses kpack to build images from source with Cloud Native Buildpacks and Eirini to run apps directly on the Kubernetes cluster.

Contributing

Please read the contributors' guide and the Cloud Foundry Code of Conduct

Unit Tests

TLDR: Always run bundle exec rake before committing

To maintain a consistent and effective approach to testing, please refer to the spec README and keep it up to date, documenting the purpose of the various types of tests.

By default rspec will randomly pick between postgres and mysql.

If postgres is not running on your OSX machine, you can start up a server by doing the following:

brew services start postgresql
createuser -s postgres
DB=postgres rake db:create

It will try to connect to those databases with the following connection string:

  • postgres: postgres://postgres@localhost:5432/cc_test
  • mysql: mysql2://root:password@localhost:3306/cc_test

To specify a custom username, password, host, or port for either database type, you can override the default connection string prefix (the part before the cc_test database name) by setting the MYSQL_CONNECTION_PREFIX and/or POSTGRES_CONNECTION_PREFIX variables. Alternatively, to override the full connection string, including the database name, you can set the DB_CONNECTION_STRING environment variable. This will restrict you to only running tests in serial, however.

For example, to run unit tests in parallel with a custom mysql username and password, you could execute:

MYSQL_CONNECTION_PREFIX=mysql2://custom_user:custom_password@localhost:3306 bundle exec rake

The following are examples of completely fully overriding the database connection string:

DB_CONNECTION_STRING="postgres://postgres@localhost:5432/cc_test" DB=postgres rake spec:serial
DB_CONNECTION_STRING="mysql2://root:password@localhost:3306/cc_test" DB=mysql rake spec:serial

If you are running the integration specs (which are included in the full rake), and you are specifying DB_CONNECTION_STRING, you will also need to have a second test database with _integration_cc as the name suffix.

For example, if you are using:

DB_CONNECTION_STRING="postgres://postgres@localhost:5432/cc_test"

You will also need a database called:

`cc_test_integration_cc`

The command

rake db:create

will create the above database when the DB environment variable is set to postgres or mysql. You should run this before running rake in order to ensure that the cc_test database exists.

Running tests on a single file

The development team typically will run the specs to a single file as (e.g.)

bundle exec rspec spec/controllers/runtime/users_controller_spec.rb

Running all the unit tests

bundle exec rake spec

Note that this will run all tests in parallel by default. If you are setting a custom DB_CONNECTION_STRING, you will need to run the tests in serial instead:

bundle exec rake spec:serial

To be able to run the unit tests in parallel and still use custom connection strings, use the MYSQL_CONNECTION_PREFIX and POSTGRES_CONNECTION_PREFIX environment variables described above.

Running static analysis

bundle exec rubocop

Running both unit tests and rubocop

By default, bundle exec rake will run the unit tests first, and then rubocop if they pass. To run rubocop first, run:

RUBOCOP_FIRST=1 bundle exec rake

Logs

Cloud Controller uses Steno to manage its logs. Each log entry includes a "source" field to designate which module in the code the entry originates from. Some of the possible sources are 'cc.app', 'cc.app_stager', and 'cc.healthmanager.client'.

Here are some use cases for the different log levels:

  • error - the CC received a malformed HTTP request, or a request for a non-existent droplet
  • warn - the CC failed to delete a droplet, CC received a request with an invalid auth token
  • info - CC received a token from UAA, CC received a NATS request
  • debug2 - CC created a service, updated a service
  • debug - CC syncs resource pool, CC uploaded a file

Configuration

The Cloud Controller uses a YAML configuration file. For an example, see config/cloud_controller.yml.

More Repositories

1

bosh

Cloud Foundry BOSH is an open source tool chain for release engineering, deployment and lifecycle management of large scale distributed services.
Ruby
2,010
star
2

cli

The official command line client for Cloud Foundry
Go
1,733
star
3

uaa

CloudFoundry User Account and Authentication (UAA) Server
Java
1,541
star
4

java-buildpack-memory-calculator

Cloud Foundry JVM Memory Calculator
Go
602
star
5

gosigar

A Golang implementation of the Sigar API
Go
453
star
6

gorouter

CF Router
Go
429
star
7

java-buildpack

Cloud Foundry buildpack for running Java applications
Ruby
425
star
8

go-diodes

Diodes are ring buffers manipulated via atomics.
Go
411
star
9

cf-java-client

Java Client Library for Cloud Foundry
Java
318
star
10

korifi

Cloud Foundry on Kubernetes
Go
301
star
11

cf-for-k8s

The open source deployment manifest for Cloud Foundry on Kubernetes
Shell
301
star
12

cf-deployment

The canonical open source deployment manifest for Cloud Foundry
Go
279
star
13

stratos

Stratos: Web-based Management UI for Cloud Foundry and Kubernetes
TypeScript
241
star
14

credhub

CredHub centralizes and secures credential generation, storage, lifecycle management, and access
Java
225
star
15

garden

Go Warden
Go
223
star
16

java-buildpack-auto-reconfiguration

Auto-reconfiguration functionality for the Java Buildpack
Java
219
star
17

loggregator-release

Cloud Native Logging
Go
217
star
18

bytefmt

Human readable byte formatter
Go
208
star
19

diego-release

BOSH Release for Diego
HTML
199
star
20

staticfile-buildpack

Deploy static HTML/JS/CSS apps to Cloud Foundry
Go
199
star
21

bosh-bootloader

Command line utility for standing up a BOSH director on an IAAS of your choice.
Go
176
star
22

bosh-cli

BOSH CLI v2+
Go
174
star
23

nodejs-buildpack

Cloud Foundry buildpack for Node.js
Go
161
star
24

diego-design-notes

Diego Architectural Design Musings and Explications
HTML
142
star
25

php-buildpack

A Cloud Foundry Buildpack for PHP.
Python
142
star
26

bosh-deployment

Collection of BOSH manifests referenced by cloudfoundry/docs-bosh
Shell
125
star
27

python-buildpack

Cloud Foundry buildpack for the Python Language
Go
118
star
28

eirini

Pluggable container orchestration for Cloud Foundry, and a Kubernetes backend
Go
115
star
29

cloud-service-broker

OSBAPI service broker that uses Terraform to provision and bind services. Derived from https://github.com/GoogleCloudPlatform/gcp-service-broker
Go
81
star
30

go-buildpack

Cloud Foundry buildpack for the Go Language
Go
80
star
31

multiapps-cli-plugin

A CLI plugin for Multi-Target Application (MTA) operations in Cloud Foundry
Go
77
star
32

guardian

containers4life
Go
75
star
33

lager

An opinionated logger for Go.
Go
73
star
34

app-autoscaler

Auto Scaling for CF Applications
Go
73
star
35

ibm-websphere-liberty-buildpack

IBM WebSphere Application Server Liberty Buildpack
Ruby
71
star
36

summit-training-classes

Opensourced content for cloud foundry training classes: zero to hero (beginner), bosh/operator, and microservices
JavaScript
69
star
37

cf-acceptance-tests

CF Acceptance tests
Go
68
star
38

cf-networking-release

Container Networking for CloudFoundry
Go
68
star
39

ruby-buildpack

Cloud Foundry buildpack for Ruby, Sinatra and Rails
Go
63
star
40

garden-runc-release

Shell
63
star
41

bosh-google-cpi-release

BOSH Google CPI
Go
62
star
42

bosh-azure-cpi-release

BOSH Azure CPI
Ruby
61
star
43

loggregator

Archived: Now bundled in https://github.com/cloudfoundry/loggregator-release
Go
60
star
44

cf-mysql-release

Cloud Foundry MySQL Release
Go
58
star
45

go-pubsub

Tree based pubsub library for Go.
Go
56
star
46

bosh-agent

BOSH Agent runs on each BOSH deployed VM
Go
56
star
47

docs-book-cloudfoundry

The bookbinder repository for open source Cloud Foundry documentation
HTML
55
star
48

homebrew-tap

Cloud Foundry Homebrew packages
Ruby
53
star
49

multiapps-controller

The server side component (controller) for Multi-Target Application (MTA) for Cloud Foundry
Java
52
star
50

socks5-proxy

This is a go library for starting a socks5 proxy server via SSH
Go
44
star
51

cf-uaac

Ruby
41
star
52

docs-cloudfoundry-concepts

A place for architecture and concept docs
HTML
41
star
53

buildpacks-ci

Concourse CI pipelines for the buildpacks team
HTML
41
star
54

service-fabrik-broker

Cloud Foundry service broker which provisions service instances as Docker containers and BOSH deployments.
JavaScript
40
star
55

grootfs

Garden root file system
Go
40
star
56

routing-release

This is the BOSH release for cloud foundry routers
Ruby
39
star
57

docs-dev-guide

Documentation for application developers who want to deploy their applications to Cloud Foundry
HTML
39
star
58

cf-smoke-tests

Smoke tests for CloudFoundry that are safe to run in a production environment
Go
38
star
59

credhub-cli

CredHub CLI provides a command line interface to interact with CredHub servers
Go
38
star
60

community

Governance and contact information for Cloud Foundry
Python
37
star
61

bosh-linux-stemcell-builder

BOSH Ubuntu Linux stemcells
Ruby
37
star
62

haproxy-boshrelease

A BOSH release for haproxy (based on cf-release's haproxy job)
Ruby
37
star
63

pmc-notes

Agendas and Notes for Cloud Foundry Project Management Committee Meetings
36
star
64

eirini-release

Helm release for Project Eirini
Shell
36
star
65

bosh-s3cli

Go CLI for S3
Go
36
star
66

bpm-release

isolated bosh jobs
Go
35
star
67

libbuildpack

A library for writing buildpacks
Go
34
star
68

cfdot

A command-line tool to interact with a Cloud Foundry Diego deployment.
Go
34
star
69

bosh-openstack-cpi-release

BOSH OpenStack CPI
Ruby
33
star
70

java-test-applications

Applications used for testing the Java buildpack
Java
33
star
71

switchboard

Golang TCP Proxy
JavaScript
33
star
72

docs-bosh

The docs repo for BOSH
HTML
32
star
73

cf-k8s-networking

building a cloud foundry without gorouter....
Go
32
star
74

cflinuxfs2

The official Cloud Foundry app container rootfs
Ruby
31
star
75

pxc-release

BOSH release of Percona Xtradb Cluster
JavaScript
30
star
76

clock

time provider & rich fake for Go
Go
30
star
77

bosh-vsphere-cpi-release

BOSH vSphere CPI
Ruby
30
star
78

os-conf-release

Additional Linux OS configuration release
Go
30
star
79

binary-buildpack

Deploy binaries to Cloud Foundry
Shell
28
star
80

bbs

Internal API to access the database for Diego.
Go
28
star
81

nginx-buildpack

Cloud Foundry buildpack that provides NGINX
Go
28
star
82

jumpbox-deployment

Deploy single vanilla jumpbox machine with BOSH
Shell
28
star
83

bosh-aws-cpi-release

BOSH AWS CPI
Ruby
27
star
84

uaa-release

Bosh Release for the UAA
Ruby
27
star
85

app-autoscaler-release

Automated scaling for apps running on Cloud Foundry
Go
26
star
86

archiver

Utilities for extracting and compressing tgz and zip files.
Go
26
star
87

bosh-backup-and-restore

Go
26
star
88

exemplar-release

Shell
25
star
89

apt-buildpack

Go
25
star
90

diego-notes

Diego Notes
23
star
91

capi-release

Bosh Release for Cloud Controller and friends
HTML
23
star
92

noaa

NOAA is a client library to consume metric and log messages from Doppler.
Go
23
star
93

metric-store-release

Metric Store: A Cloud-Native Time Series Database for Cloud Foundry
Go
23
star
94

cli-plugin-repo

Public repository for community created CF CLI plugins.
Go
23
star
95

cf-deployment-concourse-tasks

Shell
23
star
96

buildpack-packager

Buildpack Packager
Ruby
23
star
97

uaa-cli

CLI for UAA written in Go
Go
22
star
98

galera-healthcheck

A lightweight web server written in Golang to check the health of a node in a Galera cluster
Go
21
star
99

winc

CLI tool for spawning and running containers on Windows according to the OCI specification
Go
21
star
100

docs-buildpacks

HTML
21
star