Create starter Supply Chains

This topic gives you recipes for authoring useful minimal Supply Chains to get started with.

Build and deploy an application recipe

This Supply Chain will build and deploy an application from source.

It will perform the following actions:

  • Pull the application source from Git
  • Build a container image using Buildpacks
  • Generate a runtime definition with the image
  • Generate a Kubernetes Deployment and Service
  • Generate a Carvel package to make the application deployable
  • Deploy the application

Complete the following steps:

  1. Ensure that you have first initialized a working directory by running tanzu supplychain init.

  2. Generate the Supply Chain by running:

    tanzu supplychain generate \
      --kind WebApp \
      --description "Build and deploy an application from Git" \
      --component source-git-provider-1.0.0 \
      --component buildpack-build-1.0.0 \
      --component conventions-1.0.0 \
      --component app-config-web-1.0.0 \
      --component carvel-package-1.0.0 \
      --component deployer-1.0.0
    
Note

To deploy other workload types, replace the app-config-web-1.0.0 component with another option such as app-config-server-1.0.0, or app-config-worker-1.0.0.

Build an application and store the artifact in a Git recipe

This Supply Chain builds a Carvel package from the application source and stores it in a Git repository for deployment to a runtime environment.

It will perform the following actions:

  • Pull the application source from Git
  • Build a container image using Buildpacks
  • Generate a runtime definition with the image
  • Generate a Knative service
  • Generate a Carvel package to make the application deployable
  • Create a pull request against a Git repository with the Carvel package contents

Complete the following steps:

  1. Ensure that you have initialized a working directory using tanzu supplychain init.
  2. Generate the Supply Chain by running:

    tanzu supplychain generate \
      --kind CarvelPackage \
      --description "Build an application from source and store the Carvel package in Git" \
      --component source-git-provider-1.0.0 \
      --component buildpack-build-1.0.0 \
      --component conventions-1.0.0 \
      --component app-config-web-1.0.0 \
      --component carvel-package-1.0.0 \
      --component git-writer-pr-1.0.0
    
Note

To write directly to a Git repository without creating a pull request, replace the git-writer-pr-1.0.0 component with git-writer-1.0.0.

Deploy an application package from a Git recipe

This Supply Chain will deploy a Carvel package from a git repository.

It will perform the following actions:

  • Pull the application package from Git
  • Translate the Carvel package to a deployable package
  • Deploy the application

Complete the following steps:

  1. Ensure that you initialized a working directory by running tanzu supplychain init.
  2. Generate the Supply Chain by running:

    tanzu supplychain generate \
     --kind PackageDeploy \
     --description "Deploy a Carvel package from Git" \
     --component source-git-provider-1.0.0 \
     --component source-package-translator-1.0.0 \
     --component deployer-1.0.0
    

Supply Chain Choreographer

The recipes in this topic are analogous to out-of-the-box supply chains, and profile experiences in Supply Chain Choreographer. Use this mapping to help decide which recipe to start with. These recipes do not provide exact parity with out-of-the-box supply chains.

check-circle-line exclamation-circle-line close-line
Scroll to top icon