Skip to content

Cloud Foundry Implementation

Greg Turnquist edited this page Mar 10, 2016 · 4 revisions

Maintainer: @gregturn

Note - this is meant to serve as a technical guide to the Cloud Foundry implementation. A more general walkthrough can (soon) be found on spinnaker.io.

Authentication

The provider specification in spinnaker-local.yml is as follows:

  cf:
    # If you want to deploy some services to Cloud Foundry (cf),
    # set enabled and provide primary credentials for deploying.
    # Enabling cf is independent of other providers.
    enabled: true
    defaultOrg: spinnaker
    defaultSpace: production
    primaryCredentials:
      name: prod
      api: https://api.ivory.springapps.io
      console: https://apps.ivory.springapps.io
    # You must also supply cf.account.username and cf.account.password through env properties

NOTE: You can simply add cf.account.username and cf.account.password here, or supply them as environment variables (e.g. CF_ACCOUNT_USERNAME or CF_ACCOUNT_PASSWORD).

Authentication is handled by the clouddriver service and works with any compliant Cloud Foundry provider, thanks to the cf-java-client library.

The Cloud Foundry provider will poll the designation organization and space for applications and cache the results. Anything you do directly in Cloud Foundry will eventually be displayed inside Spinnaker.

Infrastructure

Server Groups

Spinnaker Server Groups map 1-to-1 with Cloud Foundry applications.

Below are the server group operations and their implementations

Create

  • Ad-hoc creation - you supply repository and artifact details to deploy
  • Pipeline deploy stage - you supply repository and artifact details to deploy
  • Pipeline find image - you point to an already deployed server group and use its artifact details

Install a new server group.

Clone

Not supported yet

Resize

  • Ad-hoc
  • Pipeline stage

Change number of instances through a Cloud Foundry "scale" operation.

Enable/Disable

  • Ad-hoc
  • Pipeline stage
  • Part of certain pipeline deploy strategies

Enable - Startup the Cloud Foundry application and map the route to receive traffic.

Disable - Shutdown the Cloud Foundry application and unmap the route so no traffic is routed to it.

Destroy

  • Ad-hoc
  • Pipeline stage
  • Part of certain pipeline deploy strategies

Delete the Cloud Foundry application.

Load Balancers

In Cloud Foundry, Load Balancers are routes assigned to an application. It is not something you can talk to or gather health status. It's either there or it's not. Each server group has metadata indicating which load balancer(s) its associated with, which makes it possible to map/unmap routes.

Caching and Presenting Infrastructure

To understand how Clouddriver caches data see Caching.