Skip to main content

launchpad.yaml Reference

The launchpad.yaml file stores your default project settings, so that you don't have to pass them as flags when running launchpad up. We recommend checking your launchpad.yaml into source control so that other developers can use the same configuration.

launchpad.yaml can be generated interactively by running launchpad init.

Schema

# launchpad.yaml
configVersion: '0.1.2'
name: <string>
projectId: <string>
cluster: <string>
imageRepository: <string>
envsec:
provider: <string>
services:
www-django-app:
type: web | cron
image: <string>
buildCommand: <string>
instance: nano | micro | small | medium | medium-plus
url: <string>
port: <number>
command: <string>
schedule: <string>
...

Note that the default values in your launchpad.yaml can be overridden with the flags in your CLI. For example: launchpad up --image-repository IMAGE_REPOSITORY will deploy to the repository specified in the flag, rather than the one in your launchpad.yaml.

launchpad.yaml Spec

launchpad.yaml specifies a project that should be deployed to Launchpad as a single application. All the services and images specified in the launchpad.yaml will be deployed together when the developer runs launchpad up.

  • configVersion: "0.1.2" required

  • name (String) required

    A user friendly name for the project that will be deployed. You can use this name with launchpad up to refer to a specific project in your namespace.

  • projectId (String) required

    A unique ID set by the Jetpack CLI with launchpad init or launchpad up. This ID is used to match the projects to secrets in launchpad env and to the runtime in the user's namespace. Users should not modify this variable after it's set by the CLI.

  • cluster (String) required

    The cluster in your launchpad org to deploy your project. You can get a list of clusters for your org by running launchpad cluster ls. This will also be set when running launchpad init.

    If you want to manually deploy to a cluster that is not managed by Mission Control, you can include the name of a context from your kubeconfig here (you can get the list of contexts in your kubeconfig by running kubectl config get-contexts).

    If you do not specify a cluster in your launchpad.yaml, Launchpad will attempt to deploy to the cluster in your current kube context. Note that this may fail if the cluster in your current Kubernetes context does not have permissions to pull from the repository selected in imageRepository.

    For more information see Deploying to your Own Cluster.

  • imageRepository (String) optional

    The Docker Image Repository where you want to push your completed images. This should be left blank if you are using Mission Control to manage your deployment.

    For more information see Deploying to your Own Cluster.

  • envsec ({String, String}) optional

    Settings for environment variables and secrets provider. This field will be automatically populated if you have invoked launchpad env commands, or if your cluster is managed by Mission Control.

    For more information see Adding Environment Variables to your Project

  • services ({String, Service}) required

    Mapping of Services to be deployed by your project. Each Service object should have a string key that represents the service's name, and should follow the Service spec below.

  • environment ({}Environment) optional

    A map of different environments. Each environment contains custom flags that will be applied when using the --environment flag in launchpad up.

Service

A service represents a containerized workload that you plan to deploy as part of your project. The key for each project should be the name of the service, and should be unique among all the services in your project.

# Example Web Service.
# Will build the Dockerfile contained in your present directory, expose port 80, and deploy it as a web service.

my-service:
type: web
instance: medium
port: 80
url: http://my-service.com
  • type (web | cron), required

    The type of service to deploy. Services can either be web services or cronjobs

    • web: Will create a Kubernetes Deployment with at least 1 replica, horizontal autoscaling enabled, and a public preview URL. This type is best used for public APIs or webservices that you want to expose to users.
    • cron: Will create a Kubernetes cronjob that will automatically run on a user provided cron schedule. Will automatically scale pods to 0 once the job has finished running.
  • image (String), optional

    Docker image to use in place of the local Dockerfile. Takes a Docker image name, with an optional tag (e.g., nginx:latest).

  • command: (String) optional

    Command to run upon starting your container. If not provided, it will use your container's ENTRYPOINT or default command

  • buildCommand ([String]), optional

    This command will run immediately prior to Jetpack building your Docker image. This can be used to compile or build your project's binary before copying it into your container.

    The command should be represented as an array of strings with the format ["executable", "param1", "param2",...].

  • instance (nano | micro | small | medium | medium-plus), optional, default=micro

    Set's resource limits for this service, based on fractions of an AWS t3.medium:

    • nano 1/16: 125mcpu 250mb
    • micro 1/8: 250mcpu 500mb
    • small 1/4: 500mcpu 1gb
    • medium 1/2: 1 cpu 2gb
    • medium-plus 3/4: 1.5 cpu 3gb

  • port (int), optional, web type only, default=8080

    The port to expose for your service. Will default to 8080 if not set in the config.

  • schedule: (String) required, cron type only

    Schedule for running your job, in crontab format. Will error on deploy if not set for a cron type service.

  • src: (String) optional, default='.'

    Path to your project's source code and Dockerfile. If left blank, will build using the current path of your launchpad.yaml

  • url (String or Map), optional, web type only

    Alternate public URL for exposing your service. If not set, will use the default preview URL format for Jetpack.

    To configure different URL for each environment, set it as a map:

      url:
    preview: <your_preview_url>
    prod: <your_production_url>