diff --git a/_topic_map.yml b/_topic_map.yml index 3ef16fc5b4..80bae1afff 100644 --- a/_topic_map.yml +++ b/_topic_map.yml @@ -1289,6 +1289,10 @@ Topics: ### Knative services - Name: Getting started with Knative services File: getting-started-knative-services +- Name: Creating serverless applications + File: creating-serverless-applications +- Name: Splitting traffic between revisions + File: splitting-traffic-between-revisions ### Monitoring - Name: Monitoring OpenShift Serverless components File: monitoring-serverless diff --git a/images/odc-serverless-app.png b/images/odc-serverless-app.png new file mode 100644 index 0000000000..8378acde15 Binary files /dev/null and b/images/odc-serverless-app.png differ diff --git a/images/odc-serverless-revisions.png b/images/odc-serverless-revisions.png new file mode 100644 index 0000000000..b373b4753b Binary files /dev/null and b/images/odc-serverless-revisions.png differ diff --git a/images/odc_import_from_git.png b/images/odc_import_from_git.png index 8dd50660cc..76c720f2cc 100644 Binary files a/images/odc_import_from_git.png and b/images/odc_import_from_git.png differ diff --git a/modules/odc-splitting-traffic-between-revisions-using-developer-perspective.adoc b/modules/odc-splitting-traffic-between-revisions-using-developer-perspective.adoc new file mode 100644 index 0000000000..0c55c2d07e --- /dev/null +++ b/modules/odc-splitting-traffic-between-revisions-using-developer-perspective.adoc @@ -0,0 +1,27 @@ +// Module is included in the following assemblies: +// +// serverless/splitting-traffic-between-revisions.adoc + +[id="odc-splitting-traffic-between-revisions-using-developer-perspective_{context}"] += Splitting traffic between revisions using the Developer perspective + +After you create a serverless application, the serverless application is displayed in the *Topology* view of the *Developer* perspective. The application revision is represented by the node and the serverless resource service is indicated by a quadrilateral around the node. + +Any new change in the code or the service configuration triggers a revision, a snapshot of the code at a given time. For a service, you can manage the traffic between the revisions of the service by splitting and routing it to the different revisions as required. + +.Procedure +To split traffic between multiple revisions of an application in the *Topology* view: + +. Click the serverless resource service, indicated by the quadrilateral, to see its overview in the side panel. +. Click the *Resources* tab, to see a list of *Revisions* and *Routes* for the service. ++ +image::odc-serverless-app.png[Serverless Application] + +. Click the service, indicated by the *S* icon at the top of the side panel, to see an overview of the service details. +. Click the *YAML* tab and modify the service configuration in the YAML editor, and click *Save*. For example, change the `timeoutseconds` from 300 to 301 . This change in the configuration triggers a new revision. In the *Topology* view, the latest revision is displayed and the *Resources* tab for the service now displays the two revisions. +. In the *Resources* tab, click the btn:[Set Traffic Distribution] button to see the traffic distribution dialog box: +.. Add the split traffic percentage portion for the two revisions in the *Splits* field. +.. Add tags to create custom URLs for the two revisions. +.. Click *Save* to see two nodes representing the two revisions in the Topology view. ++ +image::odc-serverless-revisions.png[Serverless Application Revisions] diff --git a/serverless/creating-serverless-applications.adoc b/serverless/creating-serverless-applications.adoc new file mode 100644 index 0000000000..3823ea8611 --- /dev/null +++ b/serverless/creating-serverless-applications.adoc @@ -0,0 +1,18 @@ +[id="creating-serverless-applications"] += Creating serverless applications +include::modules/common-attributes.adoc[] +include::modules/serverless-document-attributes.adoc[] +:context: creating-serverless-applications + +// To Do: modules/serverless-creating-serverless-applications-using-cli.adoc[leveloffset=+1] + +.Prerequisites +To create serverless applications using the *Developer* perspective ensure that: + +* You have xref:../web-console/web-console.adoc#web-console[logged in to the web console]. +* You are in the xref:../web-console/odc-about-developer-perspective.adoc#odc-about-developer-perspective[*Developer* perspective]. +* You have the appropriate xref:../authentication/using-rbac.adoc#default-roles_using-rbac[roles and permissions] in a project to create applications and other workloads in {product-title}. +* You have xref:../installing-openshift-serverless.adoc#installing-serverless-operator_installing-openshift-serverless[installed the Openshift Serverless Operator]. +* You have xref:../installing-openshift-serverless.adoc#installing-knative-serving_installing-openshift-serverless[created a knative-serving namespace and a KnativeServing resource in the the knative-serving namespace]. + +include::modules/odc-importing-codebase-from-git-to-create-application.adoc[leveloffset=+1] diff --git a/serverless/splitting-traffic-between-revisions.adoc b/serverless/splitting-traffic-between-revisions.adoc new file mode 100644 index 0000000000..3aedf790fb --- /dev/null +++ b/serverless/splitting-traffic-between-revisions.adoc @@ -0,0 +1,9 @@ +[id="splitting-traffic-between-revisions"] += Splitting traffic between revisions +include::modules/common-attributes.adoc[] +include::modules/serverless-document-attributes.adoc[] +:context: splitting-traffic-between-revisions + +// To Do:modules/serverless-splitting-traffic-between-revisions-using-cli.adoc[leveloffset=+1] + +include::modules/odc-splitting-traffic-between-revisions-using-developer-perspective.adoc[leveloffset=+1]