Add Container Images for Tanzu (formerly PCF) Deployments
Harness integrates with many different types of repositories and artifact providers. We call these Artifact Servers, and they help you pull your artifacts into your Harness Applications.
Once you set up an Artifact Server, Harness can pull artifacts and add them to the Harness Service you will deploy to Tanzu Application Service (formerly PCF).
In this topic:
- Before You Begin
- Step 1: Add an Artifactory Artifact Server
- Step 2: Type
- Step 3: Display Name
- Step 4: Artifactory URL
- Step 5: Test and Submit
- Step 6: Create the Harness Service
- Step 7: Add the Artifact Source to the Harness Service
- Review: Docker Support in Artifact Sources
- Next Steps
Before You Begin
Step 1: Add an Artifact Server
For steps on setting up an Artifact Server, Add Artifact Servers.
- In Harness, click Setup, and then click Connectors.
- Click Artifact Servers, and then click Add Artifact Server. Enter the following settings.
Step 2: Type
Depending on your Artifact Server, select from the drop down list.
For this example, select Artifactory.
Step 3: Display Name
Enter a name to identify the Artifact Server.
For example, Artifactory Public.
Step 4: Artifactory URL
Enter the URL for the artifact server. For example, https://harness.jfrog.io/harness.
Enter the Username/Password if the repo is not anonymous.
Step 5: Test and Submit
Click Test and the Submit.
If the test fails, that means the Delegate can't connect to the Artifact Server URL.
Make sure that the host running the Delegate can make outbound connections to the Artifact Server URL.
Step 6: Create the Harness Service
In your Harness Application, in Services, create a new Service.
For the Service Deployment Type, select Pivotal Cloud Foundry.
The new Service is created. Now you can add your container images as an artifact source.
Step 7: Add the Artifact Source to the Harness Service
The artifact source for your Harness Service is taken from one of the Artifact Servers that are compatible with PCF. For example, an AWS S3 artifact source.
Harness supports the following PCF artifact servers/types.
- AWS S3
- Artifactory (includes Docker)
- Docker Registry
- Artifactory (Tgz files)
- Nexus (Tgz files)
- Google Container Service (GCS)
- AWS Elastic Container Registry (ECR)
- Custom Repository
cf push. TAR, WAR, JAR, ZIP, and Docker are supported.
To add an artifact to your Harness PCF Service, do the following:
- In your Service, click Add Artifact Source, and select the artifact source.
- Configure the settings for the Artifact Source.
Harness uses artifact metadata only. During deployment runtime, Harness passes the metadata to the target host(s) where it is used to obtain the artifact.
Ensure that the target host has network connectivity to the Artifact Server. For more information, see Service Types and Artifact Sources.
- Click Submit. The artifact is added to the Service.
Next we will describe our application and PCF routes using the Service Manifests section.
Review: Docker Support in Artifact Sources
The following Harness Artifact Sources support Docker:
- Google Container Registry (GCR)
- Amazon Elastic Container Registry (Amazon ECR)
- Docker Registry
For Artifactory, ensure you select the Use Docker Format option:
PCF treats Artifactory as private registry. Harness supports no authentication and Basic authentication. You can use either in your Artifactory repos.
For more information on how PCF supports Docker, see Push a Docker Image from a Registry from Pivotal.