From 747dcb7ccaf5c4d151dbbcfda4f61859dc189ebf Mon Sep 17 00:00:00 2001 From: Benjamin Huo Date: Tue, 26 Jul 2022 10:29:45 +0800 Subject: [PATCH 01/16] Add comments Signed-off-by: Benjamin Huo --- content/en/docs/concepts/function_build.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/docs/concepts/function_build.md b/content/en/docs/concepts/function_build.md index 6767369f..b3dea376 100644 --- a/content/en/docs/concepts/function_build.md +++ b/content/en/docs/concepts/function_build.md @@ -29,7 +29,7 @@ spec: ## Customize functions framework version, valid for functions-framework-go for now ## Usually you needn't to do so because the builder will ship with the latest functions-framework # FUNC_FRAMEWORK_VERSION: "v0.3.0" - # Use FUNC_GOPROXY to set the goproxy + ## Use FUNC_GOPROXY to set the goproxy # FUNC_GOPROXY: "https://goproxy.cn" srcRepo: url: "https://github.com/OpenFunction/samples.git" From df6fdc80d0b1eac8f1daee3b8dec33437a0f5e6a Mon Sep 17 00:00:00 2001 From: Benjamin Huo Date: Tue, 26 Jul 2022 11:03:28 +0800 Subject: [PATCH 02/16] Remove latest from v0.6 (#164) Signed-off-by: Benjamin Huo --- content/en/docs/_index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/docs/_index.md b/content/en/docs/_index.md index 14db929f..094d84c4 100644 --- a/content/en/docs/_index.md +++ b/content/en/docs/_index.md @@ -1,5 +1,5 @@ --- -title: "v0.6.0 (latest)" +title: "v0.6.0" linkTitle: "Docs" weight: 20 --- From d9dbd207f445af865af86dfd8f39da2e493ac448 Mon Sep 17 00:00:00 2001 From: Benjamin Huo Date: Tue, 26 Jul 2022 11:19:27 +0800 Subject: [PATCH 03/16] Minor change Signed-off-by: Benjamin Huo --- content/en/docs/_index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/docs/_index.md b/content/en/docs/_index.md index 094d84c4..49bf8b3a 100644 --- a/content/en/docs/_index.md +++ b/content/en/docs/_index.md @@ -3,7 +3,7 @@ title: "v0.6.0" linkTitle: "Docs" weight: 20 --- -Welcome to the OpenFunction documentation site! +Welcome to the OpenFunction documentation site! {{% alert title="What is OpenFunction?" color="success" %}} From e264c5fc2a430e0a2148fafb10f33197ed7c0db5 Mon Sep 17 00:00:00 2001 From: Benjamin Huo Date: Tue, 26 Jul 2022 11:34:02 +0800 Subject: [PATCH 04/16] Change version to 0.6.x for branch v0.6 (#165) Signed-off-by: Benjamin Huo --- config.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config.toml b/config.toml index 55ae1f9e..6974c08d 100644 --- a/config.toml +++ b/config.toml @@ -108,7 +108,7 @@ version = "0.0" url_latest_version = "/" [[params.versions]] -version = "latest" +version = "v0.6.x" # url = "./docs" # If chinese document is avaliable url = '/docs' @@ -120,7 +120,7 @@ github_repo = "https://github.com/OpenFunction/website" # Uncomment this if you have a newer GitHub repo with "main" as the default branch, # or specify a new value if you want to reference another branch in your GitHub links -github_branch= "main" +github_branch= "v0.6" # Google Custom Search Engine ID. Remove or comment out to disable search. # gcs_engine_id = "d72aa9b2712488cc3" From a798560d49ede98d61778070cc5662af249b824c Mon Sep 17 00:00:00 2001 From: Benjamin Huo Date: Thu, 28 Jul 2022 15:28:30 +0800 Subject: [PATCH 05/16] Change latest version to relative path (#171) * Add versions (#169) Signed-off-by: Benjamin Huo * Minor changes (#170) Signed-off-by: Benjamin Huo * Change latest version to relative path Signed-off-by: Benjamin Huo --- config.toml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/config.toml b/config.toml index 6974c08d..d97f022d 100644 --- a/config.toml +++ b/config.toml @@ -101,16 +101,19 @@ archived_version = false # The version number for the version of the docs represented in this doc set. # Used in the "version-banner" partial to display a version number for the # current doc set. -version = "0.0" +version = "0.6" # A link to latest version of the docs. Used in the "version-banner" partial to # point people to the main doc site. -url_latest_version = "/" +url_latest_version = "/docs" [[params.versions]] -version = "v0.6.x" -# url = "./docs" # If chinese document is avaliable -url = '/docs' + version = "v0.6 (latest)" + url = "/docs" + +[[params.versions]] + version = "v0.6" + url = "https://v0-6.openfunction.dev/docs/" # Repository configuration (URLs for in-page links to opening issues and suggesting changes) github_repo = "https://github.com/OpenFunction/website" From 5fb124dedb3366e9bd00b674a92088d7cf3eb850 Mon Sep 17 00:00:00 2001 From: Benjamin Huo Date: Thu, 28 Jul 2022 20:03:42 +0800 Subject: [PATCH 06/16] Add hugo version env for branch deploy (#174) (#175) Signed-off-by: Benjamin Huo --- netlify.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/netlify.toml b/netlify.toml index ed26e2df..cfec9d39 100644 --- a/netlify.toml +++ b/netlify.toml @@ -4,6 +4,9 @@ [context.deploy-preview.environment] HUGO_VERSION = "0.101.0" +[context.branch-deploy.environment] + HUGO_VERSION = "0.101.0" + [context.deploy-preview] command = "cd themes/docsy && git submodule update -f --init && cd ../.. && hugo --gc --minify" From 3359f00fc30cd82cfa0990a79efc2064b6edbd60 Mon Sep 17 00:00:00 2001 From: Benjamin Huo Date: Fri, 29 Jul 2022 20:26:06 +0800 Subject: [PATCH 07/16] Add install options (#177) (#178) Signed-off-by: Benjamin Huo --- README.md | 14 ++++---- .../en/docs/getting-started/installation.md | 36 +++++++++++++++---- 2 files changed, 36 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 59c5608e..331527a2 100644 --- a/README.md +++ b/README.md @@ -13,10 +13,10 @@ Contributions of any kind are welcome! 2. Run the following commands to clone your fork and enter into it. Make sure you replace `` with your GitHub ID. ``` - git clone https://github.com//website.git - cd website + git clone https://github.com//openfunction.dev.git + cd openfunction.dev ``` -### Build and preview the website +### Build and preview the openfunction.dev #### Pre-requisites @@ -27,12 +27,12 @@ Contributions of any kind are welcome! 1. Ensure pre-requisites are installed 1. Clone repository -1. Change to website directory: `cd website` +1. Change to openfunction.dev directory: `cd openfunction.dev` 1. Add Docsy submodule: `git submodule add https://github.com/google/docsy.git themes/docsy` 1. Update submodules: `git submodule update --init --recursive` 1. Install npm packages: `npm install` -### Running the website locally +### Running the openfunction.dev locally After you setup the environment, run the following command: @@ -40,11 +40,11 @@ After you setup the environment, run the following command: hugo server -D ``` -Now you can preview the website in your browser at `http://localhost:1313/`. +Now you can preview the openfunction.dev in your browser at `http://localhost:1313/`. ### Open a pull request -Open a [pull request (PR)](https://help.github.com/en/desktop/contributing-to-projects/creating-an-issue-or-pull-request#creating-a-new-pull-request) to contribute to our website. Use DCO sign-off when you submit a PR by running the command below (add `-s`): +Open a [pull request (PR)](https://help.github.com/en/desktop/contributing-to-projects/creating-an-issue-or-pull-request#creating-a-new-pull-request) to contribute to our openfunction.dev. Use DCO sign-off when you submit a PR by running the command below (add `-s`): ```bash git commit -s -m "xxx" diff --git a/content/en/docs/getting-started/installation.md b/content/en/docs/getting-started/installation.md index 87533599..0acffa2b 100644 --- a/content/en/docs/getting-started/installation.md +++ b/content/en/docs/getting-started/installation.md @@ -41,24 +41,46 @@ This option is the **recommended** installation method. - Helm version: `>=v3.6.3` #### install the chart -1. Run the following command to add the OpenFunction chart repository. + +1. Run the following command to add the OpenFunction chart repository first: ```shell helm repo add openfunction https://openfunction.github.io/charts/ helm repo update ``` -2. Run the following command to install the OpenFunction chart. - ```shell - kubectl create namespace openfunction - helm install openfunction openfunction/openfunction -n openfunction - ``` +2. Then you have several options to setup OpenFunction, you can choose to: + + - Install all components: + ```shell + kubectl create namespace openfunction + helm install openfunction openfunction/openfunction -n openfunction + ``` + + - Install Serving only (without build): + ```shell + kubectl create namespace openfunction + helm install openfunction --set ShipwrightBuild.enabled=false --set TektonPipelines.enabled=false openfunction/openfunction -n openfunction + ``` + + - Install Knative sync runtime only: + ```shell + kubectl create namespace openfunction + helm install openfunction --set Keda.enabled=false openfunction/openfunction -n openfunction + ``` + + - Install OpenFunction async runtime only: + ```shell + kubectl create namespace openfunction + helm install openfunction --set IngressNginx.enabled=false --set KnativeServing.enabled=false openfunction/openfunction -n openfunction + ``` + {{% alert title="Note" color="success" %}} For more information about how to install OpenFunction with Helm, see [Install OpenFunction with Helm](https://github.com/OpenFunction/charts/tree/release-0.6#install-the-chart). {{% /alert %}} -3. Run the following command to verify OpenFunction is ready. +3. Run the following command to verify OpenFunction is up and running: ```shell kubectl get pods -namespace openfunction ``` From 83b65c6ae09be0a0d49f64e84b0910c0c64083b1 Mon Sep 17 00:00:00 2001 From: Benjamin Huo Date: Fri, 29 Jul 2022 20:42:49 +0800 Subject: [PATCH 08/16] Adjust install steps (#179) (#180) Signed-off-by: Benjamin Huo --- README.md | 10 +++++----- content/en/docs/getting-started/installation.md | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 331527a2..561c9eca 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # OpenFunction Website -This project uses [Hugo](https://gohugo.io/) and [Hugo template Docsy](https://github.com/google/docsy) to build the OpenFunction website. +openfunction.dev is OpenFunction's website which is built with [Hugo](https://gohugo.io/) and [Hugo template Docsy](https://github.com/google/docsy). ## Contribute @@ -16,7 +16,7 @@ Contributions of any kind are welcome! git clone https://github.com//openfunction.dev.git cd openfunction.dev ``` -### Build and preview the openfunction.dev +### Build and preview openfunction.dev #### Pre-requisites @@ -32,7 +32,7 @@ Contributions of any kind are welcome! 1. Update submodules: `git submodule update --init --recursive` 1. Install npm packages: `npm install` -### Running the openfunction.dev locally +### Running openfunction.dev locally After you setup the environment, run the following command: @@ -40,11 +40,11 @@ After you setup the environment, run the following command: hugo server -D ``` -Now you can preview the openfunction.dev in your browser at `http://localhost:1313/`. +Now you can preview openfunction.dev in your browser at `http://localhost:1313/`. ### Open a pull request -Open a [pull request (PR)](https://help.github.com/en/desktop/contributing-to-projects/creating-an-issue-or-pull-request#creating-a-new-pull-request) to contribute to our openfunction.dev. Use DCO sign-off when you submit a PR by running the command below (add `-s`): +Open a [pull request (PR)](https://help.github.com/en/desktop/contributing-to-projects/creating-an-issue-or-pull-request#creating-a-new-pull-request) to contribute to openfunction.dev. Use DCO sign-off when you submit a PR by running the command below (add `-s`): ```bash git commit -s -m "xxx" diff --git a/content/en/docs/getting-started/installation.md b/content/en/docs/getting-started/installation.md index 0acffa2b..a241b56d 100644 --- a/content/en/docs/getting-started/installation.md +++ b/content/en/docs/getting-started/installation.md @@ -33,14 +33,13 @@ For more information about OpenFunction components compatibility with Kubernetes ## Install OpenFunction -### Option 1: Helm -This option is the **recommended** installation method. +### Option 1: Install with helm chart (recommended) #### Requirements - Kubernetes version: `>=v1.20.0-0` - Helm version: `>=v3.6.3` -#### install the chart +#### Steps to install OpenFunction helm charts 1. Run the following command to add the OpenFunction chart repository first: ```shell @@ -85,7 +84,8 @@ This option is the **recommended** installation method. kubectl get pods -namespace openfunction ``` -### Option 2: CLI +### Option 2: Install with CLI + 1. Run the following command to download `ofn`, the CLI of OpenFunction. ```shell From d9a996652186782391fea3e4d61a8f35dc4560ef Mon Sep 17 00:00:00 2001 From: Benjamin Huo Date: Sat, 30 Jul 2022 16:28:11 +0800 Subject: [PATCH 09/16] Fix broken links for openfunction events docs (#183) Signed-off-by: Benjamin Huo --- content/en/docs/concepts/Events/_index.md | 4 ++-- content/en/docs/concepts/Events/clustereventbus.md | 2 +- .../en/docs/concepts/Events/event-bus-and-trigger.md | 4 ++-- content/en/docs/concepts/Events/event-source.md | 2 +- .../concepts/Events/{events.md => introduction.md} | 10 ++++------ .../docs/concepts/Events/multisource-in-eventsource.md | 4 ++-- content/en/docs/concepts/Events/trigger-conditions.md | 4 ++-- 7 files changed, 14 insertions(+), 16 deletions(-) rename content/en/docs/concepts/Events/{events.md => introduction.md} (87%) diff --git a/content/en/docs/concepts/Events/_index.md b/content/en/docs/concepts/Events/_index.md index 9ab96c1c..8e4d4839 100644 --- a/content/en/docs/concepts/Events/_index.md +++ b/content/en/docs/concepts/Events/_index.md @@ -1,6 +1,6 @@ --- -title: "Events" -linkTitle: "Events" +title: "OpenFunction Events" +linkTitle: "OpenFunction Events" weight: 4500 description: --- diff --git a/content/en/docs/concepts/Events/clustereventbus.md b/content/en/docs/concepts/Events/clustereventbus.md index b2475fb4..5aae309e 100644 --- a/content/en/docs/concepts/Events/clustereventbus.md +++ b/content/en/docs/concepts/Events/clustereventbus.md @@ -9,7 +9,7 @@ This document describes how to use a ClusterEventBus. ## Prerequisites -You have finished the steps described in [Use EventBus and Trigger](../use-event-bus-and-trigger). +You have finished the steps described in [Use EventBus and Trigger](../event-bus-and-trigger). ## Use a ClusterEventBus diff --git a/content/en/docs/concepts/Events/event-bus-and-trigger.md b/content/en/docs/concepts/Events/event-bus-and-trigger.md index bc480c4c..5d7c3ee6 100644 --- a/content/en/docs/concepts/Events/event-bus-and-trigger.md +++ b/content/en/docs/concepts/Events/event-bus-and-trigger.md @@ -9,8 +9,8 @@ This document gives an example of how to use EventBus and Trigger. ## Prerequisites -- You need to create a function as the target function to be triggered. For more information, see [Use EventSource](../use-event-source#create-a-function). -- You need to create a Kafka cluster. For more information, see [Use EventSource](../use-event-source#create-a-kafka-cluster). +- You need to create a function as the target function to be triggered. Please refer to [Create a function](../event-source#create-a-function) for more details. +- You need to create a Kafka cluster. Please refer to [Create a Kafka cluster](../event-source#create-a-kafka-cluster) for more details. ## Deploy an NATS streaming server diff --git a/content/en/docs/concepts/Events/event-source.md b/content/en/docs/concepts/Events/event-source.md index 19358dcb..19824c85 100644 --- a/content/en/docs/concepts/Events/event-source.md +++ b/content/en/docs/concepts/Events/event-source.md @@ -11,7 +11,7 @@ In this example, an EventSource is defined for synchronous invocation to use the ## Create a Function -Use the following content to create a function as the EventSource Sink. For more information about how to create a function, see [Your First Function: Go](../../../getting-started/your-first-function/function-go). +Use the following content to create a function as the EventSource Sink. For more information about how to create a function, see [Create sync functions](../../../getting-started/quickstarts/sync-functions). ```yaml apiVersion: core.openfunction.io/v1beta1 diff --git a/content/en/docs/concepts/Events/events.md b/content/en/docs/concepts/Events/introduction.md similarity index 87% rename from content/en/docs/concepts/Events/events.md rename to content/en/docs/concepts/Events/introduction.md index e6d7dfc1..1f1cbcec 100644 --- a/content/en/docs/concepts/Events/events.md +++ b/content/en/docs/concepts/Events/introduction.md @@ -1,15 +1,13 @@ --- -title: "Events" -linkTitle: "Events" +title: "Introduction" +linkTitle: "Introduction" weight: 3400 description: --- -This document describes the concept of Events in OpenFunction. - ## Overview -Events is the event management framework for OpenFunction. It provides the following core features: +OpenFunction Events is OpenFunction's event management framework. It provides the following core features: - Support for triggering target functions by synchronous and asynchronous calls - User-defined trigger judgment logic @@ -17,7 +15,7 @@ Events is the event management framework for OpenFunction. It provides the follo ## Architecture -The following diagram illustrates the architecture of Events. +The following diagram illustrates the architecture of OpenFunction Events. ![openfunction-events](/images/docs/en/concepts/events/openfunction-events.svg) diff --git a/content/en/docs/concepts/Events/multisource-in-eventsource.md b/content/en/docs/concepts/Events/multisource-in-eventsource.md index 982e0b25..373f47b0 100644 --- a/content/en/docs/concepts/Events/multisource-in-eventsource.md +++ b/content/en/docs/concepts/Events/multisource-in-eventsource.md @@ -9,8 +9,8 @@ This document describes how to use multiple sources in one EventSource. ## Prerequisites -- You need to create a function as the target function to be triggered. For more information, see [Use EventSource](../use-event-source#create-a-function). -- You need to create a Kafka cluster. For more information, see [Use EventSource](../use-event-source#create-a-kafka-cluster). +- You need to create a function as the target function to be triggered. Please refer to [Create a function](../event-source#create-a-function) for more details. +- You need to create a Kafka cluster. Please refer to [Create a Kafka cluster](../event-source#create-a-kafka-cluster) for more details. ## Use Multiple Sources in One EventSource diff --git a/content/en/docs/concepts/Events/trigger-conditions.md b/content/en/docs/concepts/Events/trigger-conditions.md index 1d0d8b0a..6010c499 100644 --- a/content/en/docs/concepts/Events/trigger-conditions.md +++ b/content/en/docs/concepts/Events/trigger-conditions.md @@ -9,7 +9,7 @@ This document describes how to use Trigger conditions. ## Prerequisites -You have finished the steps described in [Use EventBus and Trigger](../use-event-bus-and-trigger). +You have finished the steps described in [Use EventBus and Trigger](../event-bus-and-trigger). ## Use Trigger Conditions @@ -125,7 +125,7 @@ You have finished the steps described in [Use EventBus and Trigger](../use-event serving-4x5wh-ksvc-wxbf2-v100-deployment-5c495c84f6-k2jdg 2/2 Running 0 46s ``` -5. Create an event producer by referring to [Create an Event Producer](../../use-event-bus-and-trigger#create-an-event-producer). +5. Create an event producer by referring to [Create an Event Producer](../event-bus-and-trigger#create-an-event-producer). 6. Run the following command and you can see from the output that the `eventA && eventB` condition in the Trigger is matched and the event is sent to the `metrics` topic of the event bus at the same time. The OpenFuncAsync function is triggered. From 04f46ce3a0730fa1ad9248aa29c9f28ff3039d39 Mon Sep 17 00:00:00 2001 From: Benjamin Huo Date: Thu, 4 Aug 2022 12:03:38 +0800 Subject: [PATCH 10/16] adjust version to v0.7 preview (#192) Signed-off-by: Benjamin Huo --- config.toml | 2 +- content/en/docs/_index.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config.toml b/config.toml index d97f022d..6a096457 100644 --- a/config.toml +++ b/config.toml @@ -108,7 +108,7 @@ version = "0.6" url_latest_version = "/docs" [[params.versions]] - version = "v0.6 (latest)" + version = "v0.7 (preview)" url = "/docs" [[params.versions]] diff --git a/content/en/docs/_index.md b/content/en/docs/_index.md index 49bf8b3a..b08d2ae6 100644 --- a/content/en/docs/_index.md +++ b/content/en/docs/_index.md @@ -1,5 +1,5 @@ --- -title: "v0.6.0" +title: "v0.6" linkTitle: "Docs" weight: 20 --- From a355387a5d6e44d0c989b155ecbf8115df11815d Mon Sep 17 00:00:00 2001 From: Benjamin Huo Date: Thu, 4 Aug 2022 12:10:03 +0800 Subject: [PATCH 11/16] Adjust url for latest docs (#193) Signed-off-by: Benjamin Huo --- config.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.toml b/config.toml index 6a096457..3256297c 100644 --- a/config.toml +++ b/config.toml @@ -109,7 +109,7 @@ url_latest_version = "/docs" [[params.versions]] version = "v0.7 (preview)" - url = "/docs" + url = "https://openfunction.dev/docs/" [[params.versions]] version = "v0.6" From 46929ac0f51a6d0a46817916a9bf646b962ddecc Mon Sep 17 00:00:00 2001 From: Benjamin Huo Date: Fri, 5 Aug 2022 10:27:50 +0800 Subject: [PATCH 12/16] Fix version drop down menu (#197) * Adjust url for latest docs Signed-off-by: Benjamin Huo * fix: Display document dropdown icons Signed-off-by: TheYoungManLi Co-authored-by: TheYoungManLi --- layouts/partials/navbar-lang-selector.html | 2 +- layouts/partials/scripts.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/layouts/partials/navbar-lang-selector.html b/layouts/partials/navbar-lang-selector.html index 4080afc7..cf8317ae 100644 --- a/layouts/partials/navbar-lang-selector.html +++ b/layouts/partials/navbar-lang-selector.html @@ -1,6 +1,6 @@ {{/* Link directly to documentation etc., if possible. */}} {{ $langPage := cond (gt (len .Translations) 0) . .Site.Home }} -