Connect to Your Target PCF Account
This topic sets up the Harness Delegate in your PCF environment and adds the Cloud Provider used to connect to your PCF cloud for deployment.
In this topic:
- Before You Begin
- Step 1: Set Up the Harness Delegate
- Step 2: Add the Cloud Foundry CLI
- Step 3: Add the Harness PCF Cloud Provider
- Review: PCF Permissions
- Next Steps
Before You Begin
- See Harness Key Concepts.
Step 1: Set Up the Harness Delegate
The Harness Delegate is a service you run in your local network or VPC to connect your artifact servers, PCF infrastructure, and any other providers with the Harness Manager.
If you are running your PCF Cloud in AWS, you can use a Shell Script Delegate run on an EC2 instance in the same VPC and subnet as your PCF Cloud, or an ECS Delegate run in an ECS cluster in the same VPC.
For information on setting up Harness Delegates, see Delegate Installation and Management.
Step 2: Add the Cloud Foundry CLI
The host running the Harness Delegate must run the CF CLI in order to execute the required commands.
The version of the CF CLI you install on the Delegate should always match the PCF features you are using in your Harness PCF deployment. For example, if you are using
buildpacks in your manifest.yml in your Harness Service, the CLI you install on the Delegate should be version 3.6 or later.
Here is an example Delegate Profile that installs the CF CLI:
apt-get install wget
wget -q -O - https://packages.cloudfoundry.org/debian/cli.cloudfoundry.org.key | apt-key add -
echo "deb https://packages.cloudfoundry.org/debian stable main" | tee /etc/apt/sources.list.d/cloudfoundry-cli.list
apt-get install cf-cli
Step 3: Add the Harness PCF Cloud Provider
A Harness PCF Cloud Provider connects Harness to your PCF account and allows the Harness Delegate to make API calls.
The Pivotal Cloud Foundry dialog has the following fields.
Enter a name for the Cloud Provider. You will use this name when selecting this Cloud Provider in Harness Infrastructure Definitions.
Enter the API endpoint URL, without URL scheme. For example, api.run.pivotal.io. Omit http://.For more information, see Identifying the API Endpoint for your PAS Instance from Pivotal.
Username / Password
Username and password for the PCF account to use for this connection.
If you want to restrict the use of a provider to specific applications and environments, do the following:
In Usage Scope, click the drop-down under Applications, and click the name of the application.
In Environments, click the name of the environment.
Review: PCF Permissions
Make sure the PCF user account is assigned Admin, Org Manager, or Space Manager role. The user account must be able to update spaces, orgs, and applications.
For more information, see Orgs, Spaces, Roles, and Permissions from Pivotal.
For steps on setting up all Cloud Providers, see Add Cloud Providers.