From d99db01cbf914f30d1c3e0b05a7c4c77c093ca8f Mon Sep 17 00:00:00 2001 From: Jakub Hadvig Date: Tue, 23 Jun 2020 13:36:50 +0200 Subject: [PATCH] Guided Tours CRD --- enhancements/console/guided-tours-crd.yaml | 123 +++++++++++++++++++++ enhancements/console/guided-tours.md | 54 +++------ 2 files changed, 138 insertions(+), 39 deletions(-) create mode 100644 enhancements/console/guided-tours-crd.yaml diff --git a/enhancements/console/guided-tours-crd.yaml b/enhancements/console/guided-tours-crd.yaml new file mode 100644 index 00000000000..26045bdf287 --- /dev/null +++ b/enhancements/console/guided-tours-crd.yaml @@ -0,0 +1,123 @@ +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: guidedtours.console.openshift.io + annotations: + displayName: GuidedTours + description: Extension for adding Guided Tours to the OpenShift web console +spec: + scope: Cluster + preserveUnknownFields: false + group: console.openshift.io + versions: + - name: v1 + served: true + storage: true + names: + plural: guidedtours + singular: guidedtour + kind: GuidedTour + listKind: GuidedTourList + additionalPrinterColumns: + - name: Display name + type: string + JSONPath: .spec.displayName + - name: Version + type: string + JSONPath: .spec.version + - name: Description + type: string + JSONPath: .spec.description + - name: Age + type: date + JSONPath: .metadata.creationTimestamp + subresources: + status: {} + "validation": + "openAPIV3Schema": + description: GuidedTour is an extension for guiding user thought various workflows in the OpenShift web console + links. + type: object + required: + - spec + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: GuidedTourSpec is the desired guided tour configuration. + type: object + required: + - version + - displayName + - introduction + - tasks + properties: + version: + description: version definest the release version of the guided + tour. Each Guided Tour needs to be versioned, to accuratelly + reflect the workflow in particular release of OpenShift's web + console. + type: string + pattern: ^4.\d+$ + displayName: + description: displayName is the display name of the Guided Tour. + type: string + icon: + description: icon is a base64 encoded icon for a Guided Tour, + that will be displayed next to the displayName. (optional) + type: string + duration: + description: duration informs user on aproximately how long the + Guided Tour should take to finish. (optional) + type: integer + description: + description: description is the description of the Guided Tour. (optional, includes markdown) + type: string + prerequisites: + description: prerequisites describes what are the prerequisites + for the Guided Tour. (optional) + type: string + introduction: + description: introduction describes the purpose and usability of + the Guided Tour. (includes markdown) + type: string + tasks: + type: array + items: + type: object + required: + - title + - description + properties: + title: + description: title describes the given task and will be rendered as a + step header. + type: string + description: + description: description contains steps necessary to pass the task. (includes markdown) + type: string + review: + description: review contains information and steps that user + needs to take in order to validate his work, after he goes through a task. + taskReview will be rendered at the end of task. (optional, includes markdown) + type: string + recapitulation: + description: recapitulation contains information about passed step. (optional) + type: string + conclusion: + description: conclusion sums up the Guided Tour and suggests the possible + next Guided Tours for user to take. (optional, includes markdown) + type: string + nextGuidedTour: + description: nextGuidedTour is the name of the following Guided Tour. + type: string \ No newline at end of file diff --git a/enhancements/console/guided-tours.md b/enhancements/console/guided-tours.md index 0ab93e44e2a..3d22cd5f7fd 100644 --- a/enhancements/console/guided-tours.md +++ b/enhancements/console/guided-tours.md @@ -69,7 +69,6 @@ guiding them though the necessary steps. * Introduce CRD format that will be used for writing Guided Tours. * Introduce default storage for Guided Tours. -* Introduce mechanism how to connect different parts of OpenShift Console (Operators, Workloads, ...) with the Guided Tours. ### User Stories @@ -94,7 +93,7 @@ As a operator creator I want to provide operator consumers with a guide on how t 1. In order to provide mechanism to discribe a Guided Tour, new CRD named `GuidedTours` will be created. 2. A new `openshift/guided-tours` repository will be created which will contain all supported Guided Tours. 3. `console-operator` will import all the existing Guided Tours CRs from the `openshift/guided-tours` repository into the `/manifest` directory, so that the CVO can: - * create them if the CR doenst exists. + * create them if the CR doesn't exists. * update the CRs upon the cluster update (since CVO is doing `apply`). 4. `console-operator` will check for older `GuidedTours` CR versions and remove those that doesn't match the cluster major version, which indicates that new version is not available. 5. Steps in the Guided Tours will support basic markdown thats already in use in the OpenShift's Console. @@ -114,51 +113,28 @@ metadata: name: explore-serverless spec: version: 2.6 - name: Explore Serverless - followingGuidedTour: serverless-application + displayName: Explore Serverless duration: 10 description: Install the Serverless Operator to enable containers, microservices and functions to run "serverless" - prerequisites: Release requisites if any Install X numver of resources. - introduction: - about: Redhat OpenShift Serverless is a service based on the open source Knative project. It provides ... - explanations: - - title: Run anywhere - description: Use Kubernetes and OpenShift to build, scale ... - - title: Integrate with legacy - description: Build modern, serverless applications and support legacy apps through event sources... - ... + prerequisites: Release requirements if any Install X number of resources. + introduction: Redhat OpenShift Serverless is a service based on the open source Knative project. It provides ... tasks: - title: Install Serverless Operator - description: The OperatorHub is where you can find a catalogof available Operators to install on your cluster - steps: - - Visit the OperatorHub and search for the OpenShift Serverless Operator. Complete the installation ... - - You can easily search for the Operator on your cluster using the filter at the top of the page. - - ... - - When OpenShift Serverless Operator appears in your Installed Operator list, ... + description: The OperatorHub is where you can find a catalog of available Operators to install on your cluster ... + review: Make sure the Serverless Operator was successfully installed ... + recapitulation: You've just installed the Serverless Operator! Next, we'll install the required CR's for this Operator to run. - title: Create knative-serving API - description: The first CR we'll create is knative-serving - explanations: - - title: Serving - description: Offers a request-driven model that serves containerized worloads ... - steps: - - Go to the project dropdown and create a project. - - ... - - Check that the form has already specified the namespace ... + description: The first CR we'll create is knative-serving ... + review: Make sure the knative-serving API was successfully installed ... + recapitulation: You've just created an instance of knative-serving! Next, we'll create an instance of knative-eventing - title: create knative-eventing API - description: The second CR we'll create is knative-eventing - explanations: - - title: Eventing - description: Common infrastructure for consuming and producing events to stimulate applications. - steps: - - Go to the project dropdown and create a project. - - ... - - Check that the form has already specified the namespace ... + description: The second CR we'll create is knative-eventing ... + review: Make sure the knative-eventing API was successfully installed ... + recapitulation: You've just created an instance of knative-serving! + conclusion: Your Serverless Operator is ready! If you want to learn how to deploy a serverless application, take the Serverless Application tour. + nextGuidedTour: serverless-application ``` -#### Check your work - -TBD. Post 4.6 - #### Air Gapped Environments Since the supported Guided Tours CRs will be part of the `console-operator`'s manifests, they will be distributed together with image.