Deploying Cloud Foundry

Page last updated:

This topic describes the process for deploying Cloud Foundry using BOSH.

Before starting this process, you must complete the following tasks:

  1. Log into and target your BOSH Director
  2. Create a Cloud Foundry manifest
  3. Set Cloud Foundry manifest as your deployment

Upload a Stemcell

A stemcell is a versioned image of a bare-minimum OS skeleton, wrapped with IaaS-specific packaging. Deploying Cloud Foundry starts with specifying a stemcell, which BOSH installs on each component virtual machine (VM).

  1. Open https://bosh.io/stemcells in a web browser to view the current list of publicly available BOSH stemcells.

  2. Select an Ubuntu Trusty stemcell for your IaaS and click the build number to download it to your computer. The stemcell downloads as a gzipped tar archive. Do not unzip this file.

  3. In a terminal window, run bosh upload stemcell STEMCELL-PATH to upload your stemcell to the BOSH Director, where STEMCELL-PATH is the location of your downloaded stemcell file.

    $ bosh upload stemcell ~/downloads/light-bosh-stemcell-3202-aws-xen-hvm-ubuntu-trusty-go_agent.tgz
    

Build the Cloud Foundry Release

Use bosh create release to create a Cloud Foundry release.

$ bosh create release

After some processing, this command prompts you for a development release name. The release names correspond to the files in cf-release/releases.

Upload the Cloud Foundry Release

Use bosh upload release to upload the generated release to the BOSH Director.

$ bosh upload release

Deploy

Use bosh deploy to deploy the uploaded Cloud Foundry release.

$ bosh deploy

Verify the Deployment

  1. Run bosh vms. This command provides an overview of the virtual machines that BOSH manages as part of the current deployment. The state of every VM should show as running.

  2. Use curl to test the API endpoint of your Cloud Foundry installation at api.YOUR-SYSTEM-DOMAIN/info.

    $ curl api.INCORRECT-SYSTEM-DOMAIN/info
    404 Not Found: Requested route ('api.INCORRECT-SYSTEM-DOMAIN.com') does not exist.
    
    $ curl api.YOUR-SYSTEM-DOMAIN
    {
     "code": 10000,
     "description": "Unknown request",
     "error_code": "CF-NotFound"
    }
    
    $ curl api.YOUR-SYSTEM-DOMAIN/v2/info
    {"name":"vcap","build":"2222","version":2,"description":"Cloud Foundry","authorization_endpoint":"https://login.YOUR-SYSTEM-DOMAIN","token_endpoint":"https://uaa.YOUR-SYSTEM-DOMAIN","allow_debug":true}
    

    If curl succeeds, it should return specific JSON-formatted information about your deployment. If curl does not succeed, check your networking and make sure your domain has an NS record for your subdomain.

    If you do not know YOUR-SYSTEM-DOMAIN for your Cloud Foundry installation, examine the system_domain property in your deployment manifest.

  3. You should be able to target your Cloud Foundry installation with the Cloud Foundry Command Line Interface (cf CLI) and log in as an administrator. The username is admin and the password is specified in the deployment manifest:

    properties:
      ...
      uaa:
        ...
        scim:
          ...
          users:
          - admin|ADMIN_PASSWORD|...
    

For more information about managing organizations, spaces, users, and applications, refer to the cf CLI topic.

Update Cloud Foundry

  • If you make change to your manifest, run bosh deploy to update your Cloud Foundry deployment with these changes.

  • If you make changes to the cf-release directory, run the following commands to update your Cloud Foundry deployment with these changes:

    $ bosh create release && bosh upload release && bosh deploy
    

Create a pull request or raise an issue on the source for this page in GitHub