In Keptn, a project is a structure that allows organizing your services. A project is stored as a git repository and contains branches representing the multi-stage environment (e.g., dev, staging, and production stage). In other words, the separation of stage configurations is based on git repository branches.
To create a project, you can use the CLI command keptn create project and pass a shipyard file.
The simplest shipyard.yaml file with a single stage and no sequences defined would look like this:
apiVersion: spec.keptn.sh/0.2.3 kind: "Shipyard" metadata: name: "shipyard-sockshop" spec: stages: - name: "single-stage"
Recommended approach for Keptn in production: Create a project with the Keptn CLI using a Git upstream:
keptn create project PROJECTNAME --shipyard=FILEPATH --git-user=GIT_USER --git-token=GIT_TOKEN --git-remote-url=GIT_REMOTE_URL
See Git based upstream for more information.
Demo/Lab setting: Create a project with the Keptn CLI without a Git upstream and no backup:
keptn create project PROJECTNAME --shipyard=FILEPATH
To delete a Keptn project, the keptn delete project command is provided:
keptn delete project PROJECTNAME
Note: If a Git upstream is configured for this project, the referenced repository or project will not be deleted. Besides, deployed services are also not deleted by this command. To clean-up all resources created by Keptn, please go to Clean-up after deleting a project.
If you do not have a Git upstream set for your project, please set one since it is the recommended way of using Keptn: configure Git upstream.
If you do not have a Git repository to set an upstream, you can update the shipyard using:
keptn add-resource --project=PROJECT --resource=./shipyard.yaml --resourceUri=./shipyard.yaml
⚠️ Only modify your shipyard in ways mentioned in this section.
⚠️ Make sure to have no running sequence while you are updating the shipyard. Otherwise, running sequences will be updated.
The following updates of shipyard.yaml are currently supported by Keptn:
In contrast, the following updates are not supported by Keptn:
Please have a look at the shipyard section for more information regarding updating a shiypard file.