From 9f824ee53b0f5fddcecc69b12ded25ed549f54ec Mon Sep 17 00:00:00 2001 From: Harry Zhang Date: Tue, 19 May 2020 17:23:14 -0700 Subject: [PATCH 1/2] better quickstart for application Signed-off-by: Harry Zhang --- docs/getting-started/run-applications.md | 65 +++++++++++++----------- 1 file changed, 36 insertions(+), 29 deletions(-) diff --git a/docs/getting-started/run-applications.md b/docs/getting-started/run-applications.md index 9521b6d61d3..9efbe46a5c1 100644 --- a/docs/getting-started/run-applications.md +++ b/docs/getting-started/run-applications.md @@ -33,12 +33,38 @@ on-demand by Crossplane. > published a PostgreSQLInstance with at least one working Composition in order > to create the OAM application we'll use in this guide. -## Install the OAM Addon +## Infrastructure Operator + +### Install workloads and traits As the infrastructure operator our work is almost done - we defined, published, -and composed the infrastructure that our application developer and operator -team-mates will use in the previous guide. One task remains for us, which is to -install and configure Crossplane's OAM addon. +and composed the infrastructure that our application developer and operator +teammates will use in the previous guide. One task remains is, which is to define +the [_workloads_] and [_traits_] that our platform supports. + +OAM applications consist of workloads, each of which may be modified by traits. +The infrastructure operator may choose which workloads and traits by creating +or deleting `WorkloadDefinitions` and `TraitDefinitions` like below: + +```yaml +--- +apiVersion: core.oam.dev/v1alpha2 +kind: WorkloadDefinition +metadata: + name: containerizedworkloads.core.oam.dev +spec: + definitionRef: + name: containerizedworkloads.core.oam.dev +``` +Run the following command to add support for all the workloads and traits required +by this guide: + +```console +kubectl apply -f https://raw.githubusercontent.com/crossplane/crossplane/master/docs/snippets/run/definitions.yaml +``` + +Among them, OAM core workloads and traits will need to install corresponding controllers +as OAM addon: