diff --git a/docs/kubectlplugin.mdx b/docs/kubectlplugin.mdx index 70ea7979..804f5b4b 100644 --- a/docs/kubectlplugin.mdx +++ b/docs/kubectlplugin.mdx @@ -1,6 +1,8 @@ --- title: Install kubectl plugin +draft: true --- + import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; @@ -21,10 +23,13 @@ values={[ 1. [Install and set up](https://krew.sigs.k8s.io/docs/user-guide/setup/install/) Krew on your machine. 2. Discover plugins available on Krew: + ```shell kubectl krew update ``` + 3. install kubectl vela: + ```shell script kubectl krew install vela ``` @@ -33,6 +38,7 @@ kubectl krew install vela **macOS/Linux** + ```shell script curl -fsSl https://kubevela.io/script/install-kubectl-vela.sh | bash ``` @@ -43,8 +49,6 @@ Kubectl will discover it from your system path automatically. - - ## Usage ```shell @@ -55,4 +59,4 @@ Usage: kubectl vela [flags] kubectl vela [command] -``` \ No newline at end of file +``` diff --git a/docs/quick-start-appfile.md b/docs/quick-start-appfile.md index 3e42124f..16f87a1d 100644 --- a/docs/quick-start-appfile.md +++ b/docs/quick-start-appfile.md @@ -1,5 +1,6 @@ --- title: Overview +draft: true --- To achieve best user experience for your platform, we recommend platform builders to create simple and user friendly UI for end users instead of exposing full platform level details to them. Some common practices include building GUI console, adopting DSL, or creating a user friendly command line tool. diff --git a/docs/quick-start.md b/docs/quick-start.md index 9691c87b..537141c4 100644 --- a/docs/quick-start.md +++ b/docs/quick-start.md @@ -6,13 +6,11 @@ title: Deploy First Application Welcome to KubeVela! In this section, we show you how to deliver your first app. -## Deploy a simple application via CLI +## Deploy a classic application via CLI -A simple deployment definition in KubeVela looks as below: +A classic application configuration in KubeVela looks as below, there are one component and one trait, to deploy a stateless service with one instance. More advanced, there are three policies and three workflow steps, to deploy the application to two targets. ```yaml -cat < Hello World diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/quick-start.md b/i18n/zh/docusaurus-plugin-content-docs/current/quick-start.md index f9d94f94..399b32d4 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/quick-start.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/quick-start.md @@ -8,11 +8,9 @@ title: 交付第一个应用 ## 通过 CLI 部署应用 -一个基础的应用定义及部署方式如下所述: +下面给出了一个经典的 OAM 应用定义,它包括了一个无状态服务组件和运维特征,三个部署策略和带有三个部署的工作流。此应用描述的含义是将一个服务部署到两个目标命名空间,并且在第一个目标部署完成后等待人工审核后部署到第二个目标,且在第二个目标时部署2个实例。 ```yaml -cat < 需要注意的是需要你的部署环境可以正常获取 `crccheck/hello-world` 镜像 + +* 查看部署状态 + +```bash +$ vela status first-vela-app +``` + +正常情况下应用完成第一个目标部署后进入暂停状态。 + +* 人工审核,批准应用进入第二个目标部署 + +```bash +$ vela workflow resume first-vela-app +``` + +* 通过下述方式来访问该应用 + +```bash $ vela port-forward first-vela-app 8000:8000 Hello World @@ -49,7 +103,7 @@ Hello World ``` -到这里,你已完成了第一个简单应用的部署,它仅包括一个组件,暂未涉及运维特征、工作流和多集群等特性。 +到这里,你已完成了第一个应用的部署。 > 目前,通过 CLI 创建的应用会同步到 UI 进行可视化,但它是只读的。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-v1.3/quick-start.md b/i18n/zh/docusaurus-plugin-content-docs/version-v1.3/quick-start.md index f9d94f94..399b32d4 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-v1.3/quick-start.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-v1.3/quick-start.md @@ -8,11 +8,9 @@ title: 交付第一个应用 ## 通过 CLI 部署应用 -一个基础的应用定义及部署方式如下所述: +下面给出了一个经典的 OAM 应用定义,它包括了一个无状态服务组件和运维特征,三个部署策略和带有三个部署的工作流。此应用描述的含义是将一个服务部署到两个目标命名空间,并且在第一个目标部署完成后等待人工审核后部署到第二个目标,且在第二个目标时部署2个实例。 ```yaml -cat < 需要注意的是需要你的部署环境可以正常获取 `crccheck/hello-world` 镜像 + +* 查看部署状态 + +```bash +$ vela status first-vela-app +``` + +正常情况下应用完成第一个目标部署后进入暂停状态。 + +* 人工审核,批准应用进入第二个目标部署 + +```bash +$ vela workflow resume first-vela-app +``` + +* 通过下述方式来访问该应用 + +```bash $ vela port-forward first-vela-app 8000:8000 Hello World @@ -49,7 +103,7 @@ Hello World ``` -到这里,你已完成了第一个简单应用的部署,它仅包括一个组件,暂未涉及运维特征、工作流和多集群等特性。 +到这里,你已完成了第一个应用的部署。 > 目前,通过 CLI 创建的应用会同步到 UI 进行可视化,但它是只读的。 diff --git a/sidebars.js b/sidebars.js index 40928209..4c4f4406 100644 --- a/sidebars.js +++ b/sidebars.js @@ -1,96 +1,94 @@ -const { Component } = require("react"); +const { Component } = require('react'); module.exports = { docs: [ - "getting-started/introduction", - "install", + 'getting-started/introduction', + 'install', + 'quick-start', { - type: "category", - label: "Basics", - collapsed: false, - items: [ - "getting-started/core-concept", - "getting-started/architecture", - ], + type: 'category', + label: 'Basics', + collapsed: true, + items: ['getting-started/core-concept', 'getting-started/architecture'], }, { - type: "category", - label: "User Guide", + type: 'category', + label: 'User Guide', collapsed: false, items: [ - "tutorials/webservice", - "tutorials/helm", - "tutorials/k8s-object", - "tutorials/consume-cloud-services", + 'tutorials/webservice', + 'tutorials/helm', + 'tutorials/k8s-object', + 'tutorials/consume-cloud-services', { - type: "category", - label: "Deploy with more workload type", + type: 'category', + label: 'Deploy with more workload type', collapsed: true, items: [ - "end-user/components/cue/task", - "end-user/components/kustomize", - "end-user/components/ref-objects", - "end-user/components/more", + 'end-user/components/cue/task', + 'end-user/components/kustomize', + 'end-user/components/ref-objects', + 'end-user/components/more', ], }, - "case-studies/multi-cluster", - "tutorials/jenkins", - "tutorials/trigger", - "case-studies/gitops", + 'case-studies/multi-cluster', + 'tutorials/jenkins', + 'tutorials/trigger', + 'case-studies/gitops', { - type: "category", - label: "How-to Guides", + type: 'category', + label: 'How-to Guides', collapsed: true, items: [ { - "Cloud Resources": [ - "end-user/components/cloud-services/provision-and-consume-cloud-services", - "end-user/components/cloud-services/provision-and-initiate-database", - "end-user/components/cloud-services/secure-your-database-connection", - "end-user/components/cloud-services/provision-an-RDS-instance-with-more-than-one-database", + 'Cloud Resources': [ + 'end-user/components/cloud-services/provision-and-consume-cloud-services', + 'end-user/components/cloud-services/provision-and-initiate-database', + 'end-user/components/cloud-services/secure-your-database-connection', + 'end-user/components/cloud-services/provision-an-RDS-instance-with-more-than-one-database', ], }, { - "Deploy applications": [ - "how-to/dashboard/application/create-application", - "how-to/dashboard/application/bind-new-environment", - "tutorials/workflows", - "how-to/dashboard/application/deploy-application", - "how-to/dashboard/application/get-application-instance", - "tutorials/scaler", - "how-to/dashboard/application/get-application-log", - "how-to/dashboard/application/get-application-endpoint", - "how-to/dashboard/application/view-application-resource", - "how-to/dashboard/application/get-application-revision", - "how-to/dashboard/application/recycle-environment", - "how-to/dashboard/application/delete-application", + 'Deploy applications': [ + 'how-to/dashboard/application/create-application', + 'how-to/dashboard/application/bind-new-environment', + 'tutorials/workflows', + 'how-to/dashboard/application/deploy-application', + 'how-to/dashboard/application/get-application-instance', + 'tutorials/scaler', + 'how-to/dashboard/application/get-application-log', + 'how-to/dashboard/application/get-application-endpoint', + 'how-to/dashboard/application/view-application-resource', + 'how-to/dashboard/application/get-application-revision', + 'how-to/dashboard/application/recycle-environment', + 'how-to/dashboard/application/delete-application', ], }, { - "Day-2 Operations": [ - "end-user/traits/rollout", - "end-user/traits/ingress", - "end-user/traits/service-binding", - "end-user/traits/sidecar", - "end-user/policies/health", - "end-user/workflow/webhook-notification", - "end-user/service-account-integration", - "how-to/dashboard/trigger/overview", - "end-user/traits/more", + 'Day-2 Operations': [ + 'end-user/traits/rollout', + 'end-user/traits/ingress', + 'end-user/traits/service-binding', + 'end-user/traits/sidecar', + 'end-user/policies/health', + 'end-user/workflow/webhook-notification', + 'end-user/service-account-integration', + 'how-to/dashboard/trigger/overview', + 'end-user/traits/more', ], }, { - "Manage integration configs": [ - "how-to/dashboard/config/dex-connectors", - "how-to/dashboard/config/helm-repo", + 'Manage integration configs': [ + 'how-to/dashboard/config/dex-connectors', + 'how-to/dashboard/config/helm-repo', ], }, { - "Advanced Features": [ - "end-user/workflow/component-dependency-parameter", - "end-user/version-control", - "end-user/policies/apply-once", - "end-user/policies/gc", + 'Advanced Features': [ + 'end-user/workflow/component-dependency-parameter', + 'end-user/version-control', + 'end-user/policies/apply-once', + 'end-user/policies/gc', ], }, ], @@ -98,122 +96,122 @@ module.exports = { ], }, { - type: "category", - label: "Operator Manual", + type: 'category', + label: 'Operator Manual', items: [ - "tutorials/sso", - "how-to/dashboard/user/user", - "how-to/dashboard/user/rbac", - "how-to/dashboard/user/project", + 'tutorials/sso', + 'how-to/dashboard/user/user', + 'how-to/dashboard/user/rbac', + 'how-to/dashboard/user/project', { - "Manage resource": [ - "platform-engineers/system-operation/managing-clusters", - "how-to/dashboard/target/overview", + 'Manage resource': [ + 'platform-engineers/system-operation/managing-clusters', + 'how-to/dashboard/target/overview', ], }, - "how-to/addon", + 'how-to/addon', { - "Install or upgrade": [ - "platform-engineers/system-operation/bootstrap-parameters", - "platform-engineers/advanced-install", - "platform-engineers/system-operation/offline-installation", + 'Install or upgrade': [ + 'platform-engineers/system-operation/bootstrap-parameters', + 'platform-engineers/advanced-install', + 'platform-engineers/system-operation/offline-installation', ], }, - "platform-engineers/system-operation/observability", - "platform-engineers/system-operation/performance-finetuning", + 'platform-engineers/system-operation/observability', + 'platform-engineers/system-operation/performance-finetuning', { - type: "category", - label: "Extension", + type: 'category', + label: 'Extension', collapsed: true, items: [ { - type: "category", - label: "Learning OAM", + type: 'category', + label: 'Learning OAM', collapsed: false, items: [ - "platform-engineers/oam/oam-model", - "platform-engineers/oam/x-definition", + 'platform-engineers/oam/oam-model', + 'platform-engineers/oam/x-definition', ], }, { - "Learning CUE": [ - "platform-engineers/cue/basic", - "platform-engineers/cue/definition-edit", - "platform-engineers/cue/advanced", + 'Learning CUE': [ + 'platform-engineers/cue/basic', + 'platform-engineers/cue/definition-edit', + 'platform-engineers/cue/advanced', ], }, { - Addons: ["platform-engineers/addon/intro"], + Addons: ['platform-engineers/addon/intro'], }, - "platform-engineers/components/custom-component", + 'platform-engineers/components/custom-component', { - "Cloud Resources": [ - "platform-engineers/addon/terraform", - "platform-engineers/components/component-terraform", + 'Cloud Resources': [ + 'platform-engineers/addon/terraform', + 'platform-engineers/components/component-terraform', ], }, { - type: "category", - label: "Traits System", + type: 'category', + label: 'Traits System', items: [ - "platform-engineers/traits/customize-trait", - "platform-engineers/traits/patch-trait", - "platform-engineers/traits/status", - "platform-engineers/traits/advanced", + 'platform-engineers/traits/customize-trait', + 'platform-engineers/traits/patch-trait', + 'platform-engineers/traits/status', + 'platform-engineers/traits/advanced', ], }, { - "Workflow System": [ - "platform-engineers/workflow/workflow", - "platform-engineers/workflow/cue-actions", - "platform-engineers/workflow/working-mechanism", + 'Workflow System': [ + 'platform-engineers/workflow/workflow', + 'platform-engineers/workflow/cue-actions', + 'platform-engineers/workflow/working-mechanism', ], }, - "platform-engineers/system-operation/velaql", - "platform-engineers/debug/dry-run", - "platform-engineers/x-def-version", + 'platform-engineers/system-operation/velaql', + 'platform-engineers/debug/dry-run', + 'platform-engineers/x-def-version', ], }, ], }, - "contributor/overview", + 'contributor/overview', { - type: "category", - label: "References", + type: 'category', + label: 'References', items: [ - "cli/vela", + 'cli/vela', { - type: "category", - label: "Built-in Addons", + type: 'category', + label: 'Built-in Addons', items: [ - "reference/addons/overview", - "reference/addons/velaux", - "reference/addons/terraform", - "reference/addons/ai", + 'reference/addons/overview', + 'reference/addons/velaux', + 'reference/addons/terraform', + 'reference/addons/ai', ], }, - "end-user/components/cloud-services/cloud-resources-list", - "end-user/components/references", - "end-user/traits/references", - "end-user/policies/references", - "end-user/workflow/built-in-workflow-defs", - "reference/ui-schema", - "reference/user-improvement-plan", + 'end-user/components/cloud-services/cloud-resources-list', + 'end-user/components/references', + 'end-user/traits/references', + 'end-user/policies/references', + 'end-user/workflow/built-in-workflow-defs', + 'reference/ui-schema', + 'reference/user-improvement-plan', { - label: "VelaUX API Doc", - type: "link", - href: "https://kubevela.stoplight.io/docs/kubevela/b3A6NDI5NzQxMzM-detail-definition", + label: 'VelaUX API Doc', + type: 'link', + href: 'https://kubevela.stoplight.io/docs/kubevela/b3A6NDI5NzQxMzM-detail-definition', }, ], }, { - type: "category", - label: "Roadmap", - items: ["roadmap/README"], + type: 'category', + label: 'Roadmap', + items: ['roadmap/README'], }, { - type: "doc", - id: "developers/references/devex/faq", + type: 'doc', + id: 'developers/references/devex/faq', }, ], }; diff --git a/static/example/applications/first-app.yaml b/static/example/applications/first-app.yaml new file mode 100644 index 00000000..518dcac2 --- /dev/null +++ b/static/example/applications/first-app.yaml @@ -0,0 +1,47 @@ +apiVersion: core.oam.dev/v1beta1 +kind: Application +metadata: + name: first-vela-app +spec: + components: + - name: express-server + type: webservice + properties: + image: crccheck/hello-world + ports: + - port: 8000 + expose: true + traits: + - type: scaler + properties: + replicas: 1 + policies: + - name: target-default + type: topology + properties: + clusters: ["local"] + namespace: "default" + - name: target-prod + type: topology + properties: + clusters: ["local"] + namespace: "prod" + - name: deploy-ha + type: override + properties: + components: + - type: webservice + traits: + - type: scaler + properties: + replicas: 2 + workflow: + steps: + - name: deploy2default + type: deploy + properties: + policies: ["target-default"] + - name: deploy2prod + type: deploy + properties: + policies: ["target-prod", "deploy-ha"] \ No newline at end of file diff --git a/versioned_docs/version-v1.3/kubectlplugin.mdx b/versioned_docs/version-v1.3/kubectlplugin.mdx index 70ea7979..804f5b4b 100644 --- a/versioned_docs/version-v1.3/kubectlplugin.mdx +++ b/versioned_docs/version-v1.3/kubectlplugin.mdx @@ -1,6 +1,8 @@ --- title: Install kubectl plugin +draft: true --- + import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; @@ -21,10 +23,13 @@ values={[ 1. [Install and set up](https://krew.sigs.k8s.io/docs/user-guide/setup/install/) Krew on your machine. 2. Discover plugins available on Krew: + ```shell kubectl krew update ``` + 3. install kubectl vela: + ```shell script kubectl krew install vela ``` @@ -33,6 +38,7 @@ kubectl krew install vela **macOS/Linux** + ```shell script curl -fsSl https://kubevela.io/script/install-kubectl-vela.sh | bash ``` @@ -43,8 +49,6 @@ Kubectl will discover it from your system path automatically. - - ## Usage ```shell @@ -55,4 +59,4 @@ Usage: kubectl vela [flags] kubectl vela [command] -``` \ No newline at end of file +``` diff --git a/versioned_docs/version-v1.3/quick-start-appfile.md b/versioned_docs/version-v1.3/quick-start-appfile.md index 3e42124f..16f87a1d 100644 --- a/versioned_docs/version-v1.3/quick-start-appfile.md +++ b/versioned_docs/version-v1.3/quick-start-appfile.md @@ -1,5 +1,6 @@ --- title: Overview +draft: true --- To achieve best user experience for your platform, we recommend platform builders to create simple and user friendly UI for end users instead of exposing full platform level details to them. Some common practices include building GUI console, adopting DSL, or creating a user friendly command line tool. diff --git a/versioned_docs/version-v1.3/quick-start.md b/versioned_docs/version-v1.3/quick-start.md index 9691c87b..537141c4 100644 --- a/versioned_docs/version-v1.3/quick-start.md +++ b/versioned_docs/version-v1.3/quick-start.md @@ -6,13 +6,11 @@ title: Deploy First Application Welcome to KubeVela! In this section, we show you how to deliver your first app. -## Deploy a simple application via CLI +## Deploy a classic application via CLI -A simple deployment definition in KubeVela looks as below: +A classic application configuration in KubeVela looks as below, there are one component and one trait, to deploy a stateless service with one instance. More advanced, there are three policies and three workflow steps, to deploy the application to two targets. ```yaml -cat < Hello World diff --git a/versioned_sidebars/version-v1.3-sidebars.json b/versioned_sidebars/version-v1.3-sidebars.json index 8e2e33d6..fa39b5fd 100644 --- a/versioned_sidebars/version-v1.3-sidebars.json +++ b/versioned_sidebars/version-v1.3-sidebars.json @@ -5,18 +5,18 @@ "id": "version-v1.3/getting-started/introduction" }, { - "collapsed": false, + "type": "doc", + "id": "version-v1.3/install" + }, + { + "type": "doc", + "id": "version-v1.3/quick-start" + }, + { + "collapsed": true, "type": "category", - "label": "Getting Started", + "label": "Basics", "items": [ - { - "type": "doc", - "id": "version-v1.3/install" - }, - { - "type": "doc", - "id": "version-v1.3/quick-start" - }, { "type": "doc", "id": "version-v1.3/getting-started/core-concept"