Seperate install and getting started.

This commit is contained in:
Harry Zhang
2020-11-10 15:26:03 -08:00
parent 877b7b8cb6
commit e69548a72a
6 changed files with 140 additions and 145 deletions
+41 -42
View File
@@ -1,10 +1,8 @@
- Overview
- [Introduction](/en/introduction.md)
- [Installation](/en/install.md)
- [Quick Start](/en/quick-start.md)
- [Concepts](/en/concepts.md)
- [Getting Started](/en/quick-start.md)
- For Developers
- Using KubeVela
- [Setting Up Deployment Environment](/en/developers/config-enviroments.md)
- [Initializing Application](/en/developers/app-init.md)
- [Setting Routes](/en/developers/set-route.md)
@@ -20,45 +18,46 @@
- [Managing Capabilities](/en/developers/cap-center.md)
- [Capability References](/en/developers/references/README.md)
- For Platform Engineers
- [Extending KubeVela](/en/platform-engineers/extending-kubevela.md)
- Internals
- [Design and Architecture](/en/design.md)
- Extending KubeVela
- [Add Trait](/en/platform-engineers/trait.md)
- [Add Workload Type](/en/platform-engineers/workload-type.md)
- [Add Cloud Resource](/en/platform-engineers/cloud-resource.md)
- Roadmap
- [KubeVela Roadmap](/en/roadmap.md)
- CLI Reference
- General
- [vela config](/en/cli/vela_config.md)
- [vela env](/en/cli/vela_env.md)
- [vela init](/en/cli/vela_init.md)
- [vela install](/en/cli/vela_install.md)
- [vela up](/en/cli/vela_up.md)
- [vela version](/en/cli/vela_version.md)
- Applications
- [vela delete](/en/cli/vela_delete.md)
- [vela exec](/en/cli/vela_exec.md)
- [vela logs](/en/cli/vela_logs.md)
- [vela ls](/en/cli/vela_ls.md)
- [vela port-forward](/en/cli/vela_port-forward.md)
- [vela show](/en/cli/vela_show.md)
- [vela status](/en/cli/vela_status.md)
- [vela svc](/en/cli/vela_svc.md)
- Workload Types
- [vela workloads](/en/cli/vela_workloads.md)
- Traits
- [vela traits](/en/cli/vela_traits.md)
- [vela scaler](/en/cli/vela_scaler.md)
- [vela route](/en/cli/vela_route.md)
- [vela autoscale](/en/cli/vela_autoscale.md)
- [vela rollout](/en/cli/vela_rollout.md)
- [vela metric](/en/cli/vela_metric.md)
- System
- [vela completion](/en/cli/vela_completion.md)
- [vela dashboard](/en/cli/vela_dashboard.md)
- [vela system](/en/cli/vela_system.md)
- [vela template](/en/cli/vela_template.md)
- Extensibility
- [vela cap](/en/cli/vela_cap.md)
- Reference
- [Concepts and Glossaries](/en/concepts.md)
- CLI
- General
- [vela config](/en/cli/vela_config.md)
- [vela env](/en/cli/vela_env.md)
- [vela init](/en/cli/vela_init.md)
- [vela install](/en/cli/vela_install.md)
- [vela up](/en/cli/vela_up.md)
- [vela version](/en/cli/vela_version.md)
- Applications
- [vela delete](/en/cli/vela_delete.md)
- [vela exec](/en/cli/vela_exec.md)
- [vela logs](/en/cli/vela_logs.md)
- [vela ls](/en/cli/vela_ls.md)
- [vela port-forward](/en/cli/vela_port-forward.md)
- [vela show](/en/cli/vela_show.md)
- [vela status](/en/cli/vela_status.md)
- [vela svc](/en/cli/vela_svc.md)
- Workload Types
- [vela workloads](/en/cli/vela_workloads.md)
- Traits
- [vela traits](/en/cli/vela_traits.md)
- [vela scaler](/en/cli/vela_scaler.md)
- [vela route](/en/cli/vela_route.md)
- [vela autoscale](/en/cli/vela_autoscale.md)
- [vela rollout](/en/cli/vela_rollout.md)
- [vela metric](/en/cli/vela_metric.md)
- System
- [vela completion](/en/cli/vela_completion.md)
- [vela dashboard](/en/cli/vela_dashboard.md)
- [vela system](/en/cli/vela_system.md)
- [vela template](/en/cli/vela_template.md)
- Extensibility
- [vela cap](/en/cli/vela_cap.md)
+77 -60
View File
@@ -1,13 +1,17 @@
# Install KubeVela
## 1. Setup local k8s cluster
## 1. Setup Kubernetes cluster
Requirements:
- Kubernetes cluster >= v1.15.0
- kubectl installed and configured
You may pick either Minikube or KinD as local cluster testing option.
### Minikube
> NOTE: If you are not using minikube or kind, please make sure to [install or enable ingress-nginx](https://kubernetes.github.io/ingress-nginx/deploy/) by yourself.
<details><summary>Minikube</summary>
<p>
Follow the minikube [installation guide](https://minikube.sigs.k8s.io/docs/start/).
@@ -22,8 +26,11 @@ Install ingress:
```bash
$ minikube addons enable ingress
```
<p>
</details>
### KinD
<details><summary>KinD</summary>
<p>
Follow [this guide](https://kind.sigs.k8s.io/docs/user/quick-start/#installation) to install kind.
@@ -55,6 +62,8 @@ Then install [ingress for kind](https://kind.sigs.k8s.io/docs/user/ingress/#ingr
```bash
$ kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/provider/kind/deploy.yaml
```
<p>
</details>
## 2. Get KubeVela
@@ -75,28 +84,74 @@ $ vela install
This will install KubeVela server component and its dependency components.
## 4. Verify
<details><summary>(Advanced) Verify Installation Manually</summary>
<p>
Check Vela Helm Chart has been installed:
Check Vela Helm Chart has been installed:
```
$ helm list -n vela-system
NAME NAMESPACE REVISION ...
kubevela vela-system 1 ...
```
```console
$ helm list -n vela-system
NAME NAMESPACE REVISION ...
kubevela vela-system 1 ...
```
Later on, check that the dependency components has been installed:
```
$ helm list --all-namespaces
NAME NAMESPACE REVISION ...
cert-manager cert-manager 1 ...
flagger vela-system 1
kube-prometheus-stack monitoring 1
...
```
Later on, check that all dependency components has been installed (they will need 5-10 minutes to show up):
**Voila!** You are all set to go.
```console
$ helm list --all-namespaces
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
flagger vela-system 1 2020-11-10 18:47:14.0829416 +0000 UTC deployed flagger-1.1.0 1.1.0
keda keda 1 2020-11-10 18:45:15.6981827 +0000 UTC deployed keda-2.0.0-rc3 2.0.0-rc2
kube-prometheus-stack monitoring 1 2020-11-10 18:45:37.9608079 +0000 UTC deployed kube-prometheus-stack-9.4.4 0.38.1
kubevela vela-system 1 2020-11-10 10:44:20.663582 -0800 PST deployed
```
## Clean Up
> We will introduce a `vela system health` command to check the dependencies in the future.
</p>
</details>
<details><summary>(Advanced) Customize Your Installation</summary>
<p>
We have installed the following dependency components along with Vela server component:
- [Prometheus Stack](https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack)
- [Cert-manager](https://cert-manager.io/)
- [Flagger](https://flagger.app/)
The config has been saved in a ConfigMap in "vela-system/vela-config":
```console
$ kubectl -n vela-system get cm vela-config -o yaml
apiVersion: v1
data:
certificates.cert-manager.io: |
{
"repo": "jetstack",
"urL": "https://charts.jetstack.io",
"name": "cert-manager",
"namespace": "cert-manager",
"version": "1.0.3"
}
flagger.app: |
...
kind: ConfigMap
```
User can specify their own dependencies by editing the `vela-config` ConfigMap.
Currently adding new chart or updating existing chart requires redeploying Vela:
```console
$ kubectl -n vela-system edit cm vela-config
...
$ helm uninstall -n vela-system kubevela
$ helm install -n vela-system kubevela
```
</p>
</details>
## 4. (Optional) Clean Up
<details>
Run:
@@ -133,42 +188,4 @@ $ kubectl delete crd \
traitdefinitions.core.oam.dev \
workloaddefinitions.core.oam.dev
```
## [Optional] Add/Update Dependencies
We have installed the following dependency components along with Vela server component:
- [Prometheus Stack](https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack)
- [Cert-manager](https://cert-manager.io/)
- [Flagger](https://flagger.app/)
> NOTE: If you are not using minikube or kind, please make sure to [install ingress-nginx](https://kubernetes.github.io/ingress-nginx/deploy/) by yourself.
The config has been saved in a ConfigMap in "vela-system/vela-config":
```
$ kubectl -n vela-system get cm vela-config -o yaml
apiVersion: v1
data:
certificates.cert-manager.io: |
{
"repo": "jetstack",
"urL": "https://charts.jetstack.io",
"name": "cert-manager",
"namespace": "cert-manager",
"version": "1.0.3"
}
flagger.app: |
...
kind: ConfigMap
```
User can specify their own dependencies by editing the `vela-config` ConfigMap.
Currently adding new chart or updating existing chart requires redeploying Vela:
```
$ kubectl -n vela-system edit cm vela-config
...
$ helm uninstall -n vela-system kubevela
$ helm install -n vela-system kubevela
```
</details>
@@ -1,14 +1,8 @@
# Extending Capabilities in KubeVela
# Extending Traits in KubeVela
## How Capabilities Work
In the following tutorial, you will learn how to add a new trait and expose it to users via Appfile.
A Capability is a functionality provided by the infrastructure that users can configure to run and operate applications.
Vela has [an extensible capability system](../design.md#2-capability-oriented-architecture) that allows platform builders to bring bespoke infrastructure capabilities into Vela by writing YAML definitions and CUE templates.
In the following tutorial, you will learn how to add a new capability and expose it to users via CLI/Appfile.
The new capability is a type of trait but the same process applies to workload as well.
## Add A New Capability
## Add A New Trait
Prerequisites:
@@ -101,32 +95,9 @@ $ vela up
Service status: vela status testapp --svc testsvc
```
You can use either of the following options to attach the newly added kubewatch trait to the App:
#### Verify
#### Option 1: Testing in CLI
Add kubewatch trait to the application:
```bash
$ vela kubewatch testapp --svc testsvc --webhook https://hooks.slack.com/<your-token>
Adding kubewatch for app testsvc
⠋ Checking Status ...
✅ Application Deployed Successfully!
- Name: testsvc
Type: webservice
HEALTHY Ready: 1/1
Traits:
- ✅ kubewatch: webhook=https://hooks.slack.com/...
...
```
Check your Slack channel to verify the nofitications:
![Image of Kubewatch](../../resources/kubewatch-notif.jpg)
#### Option 2: Testing in Appfile
Instead of using CLI, you can add `kubewatch` config to Appfile:
You can now add `kubewatch` config to Appfile to attach the newly added kubewatch trait to the App:
```bash
$ cat << EOF >> vela.yaml
@@ -140,3 +111,8 @@ Deploy it:
```
$ vela up
```
Check your Slack channel to verify the nofitications:
![Image of Kubewatch](../../resources/kubewatch-notif.jpg)
+12 -9
View File
@@ -1,12 +1,14 @@
# Quick Start
Welcome to KubeVela! In this guide, we'll walk you through how to deploy a simple service application using KubeVela CLI/Appfile.
Welcome to KubeVela! In this guide, we'll walk you through how to install KubeVela, and deploy your first simple application.
## Setup
## Step 1: Install
Make sure you have finished and verified the installation following [this guide](./install.md).
## 1. Initialize Application
## Step 2: Deploy Your First Application
**vela init**
```bash
$ vela init --render-only
@@ -41,7 +43,7 @@ services:
domain: testsvc.example.com
```
## 2. Deploy Application
**vela up**
```bash
$ vela up
@@ -67,10 +69,10 @@ Check the status until we see route trait ready:
$ vela status testapp
About:
Name: testapp
Namespace: default
Created at: ...
Updated at: ...
Name: testapp
Namespace: default
Created at: ...
Updated at: ...
Services:
@@ -81,7 +83,7 @@ Services:
Created at: ...
Updated at: ...
Routes:
- route: Visiting URL: http://testsvc.example.com IP: localhost
- route: Visiting URL: http://testsvc.example.com IP: localhost
```
**In [kind cluster setup](./install.md#kind)**, you can visit the service via localhost. In other setups, replace localhost with ingress address accordingly.
@@ -102,6 +104,7 @@ Hello World
`'--.._\..--''
</xmp>
```
**Voila!** You are all set to go.
## What's Next