Refine `deploy cloud resources` doc (#441)

* Refine `deploy cloud resources` doc

Made the doc `deploy cloud resources` more neutral for cloud providers,
and easy to refer when deploying a cloud resources.

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* add version v1.2 doc

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* add resources for v1.2

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
This commit is contained in:
Zheng Xi Zhou 2022-01-17 17:10:23 +08:00 committed by GitHub
parent 0e60bc2d65
commit 4c2475a49c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 157 additions and 97 deletions

View File

@ -26,7 +26,7 @@ Terraform | Alibaba Cloud | [ACK](./terraform/alibaba-ack) | Terraform configura
| | | [Redis](./terraform/alibaba-redis) | Terraform configuration for Alibaba Cloud Redis
| | | [VPC](./terraform/alibaba-vpc) | Terraform configuration for Alibaba Cloud VPC
| | Azure | [Mariadb](./terraform/azure-database-mariadb) | Terraform configuration for Azure Database Mariadb
| | Azure | [Storage Account](./terraform/azure-storage-account) | Terraform configuration for Azure Storage Account
| | | [Storage Account](./terraform/azure-storage-account) | Terraform configuration for Azure Storage Account
| | AWS | [S3](./terraform/aws-s3) | Terraform configuration for AWS S3 bucket

Binary file not shown.

After

Width:  |  Height:  |  Size: 270 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

View File

@ -3,93 +3,123 @@ title: Deploy Cloud Service
description: This section introduces the delivery of services provided by cloud vendors through KubeVela and orchestrating your services in the Kubernetes cluster.
---
Integrating cloud service is the most frequent need in our daily development. Varies from the Object storage、Cloud database to LoadBalancer, cache, or search engine, faster to loading them save more time. Meanwhile, to orchestrate different resources from multi-cloud is quite a pain point.
Integrating cloud service is the most frequent need in our daily development, varying from the Object storage, Cloud
database to LoadBalancer, Cache, or search engine. Faster to load them save more time, meanwhile, to orchestrate
different resources from multi-cloud is quite a pain point.
In this section, we introduce an example of using Alibaba Cloud RDS to show you how to deploy cloud services.
In this section, we introduce an example to show you how to deploy cloud services.
## Before starting
- Has a cloud vendor account. To keep its permission more secure, we recommend delegating a subaccount of security keys. For example in AliCloud, please head it to [Creating RAM](https://www.alibabacloud.com/help/en/doc-detail/28627.html).
- Has a cloud vendor account with proper access to your target cloud resources
- Ensure your account has a sufficient balance
- Ensure your account has a sufficient balance
- Connect to a Kubernetes cluster on this cloud vendor for hosting your cloud services
## Enabling cloud vendor Addons
First, we open up VelaUX Dashboard, switch to the tab `Addon`, and click up terraform-alibaba:
First, visit [VelaUX (KubeVela Dashboard)](../install#3-install-velaux), switch to the tab `Addon`, and click up addon
`terraform-xxx`. `xxx` stands for the cloud provider name. We support the following Addons:
- provider-alibaba
- provider-aws
- provider-azure
We can provision cloud resources in Alibaba Cloud, AWS, and Azure respectively.
Follow the instructions on all the properties of the addon for each cloud provider to set the addon and enable it.
For example, for Alibaba Cloud, you need to set the following properties:
Then fill in your ALICLOUD_ACCESS_KEY, ALICLOUD_REGION, and ALICLOUD_SECRET_KEY to enable it。
> Notice: KubeVela encrypt all the keys hence no need to worry about its safety
> Notice: KubeVela encrypts all the keys, hence no need to worry about its safety.
![addon-alibaba](../resources/addon-alibaba.jpg)
`terraform-alibaba` addon depends on `terraform` addon. If the latter isn't enabled, it'll be automatically enabled when the former does. The creating process of cloud services pulls configuration from GitHub. If your control plane cluster that runs KubeVela is very hard to connect to GitHub, please open up the `GithubBlocked` option in `terraform` addon.
The creating process of cloud services pulls configuration from GitHub. If your control plane
cluster that runs KubeVela is very hard to connect to GitHub, please open up the `GithubBlocked` option in `terraform`
addon.
The `terraform-alibaba` addon supports the following types of resources and more later on:
KubeVela supports the following types of resources and more later on:
- alibaba-rds
- alibaba-ack
- alibaba-ask
- alibaba-oss
- alibaba-rds
- alibaba-redis
## Setting up Targets
The way of deploying cloud services differs from other types of apps, cause its controller only runs in the control plane cluster. Therefore, we need to set the cloud vendor and regional parameters of each target.
Enter the page of Targets, select the cloud service you need. Click `Edit` to the edit mode or simply create a new one.
![target-variables](../resources/target-variables.jpg)
The target first mainly describes the Namespace of the Kubernetes cluster and then describes the cloud vendor and region where the cluster is located by setting shared variables.
- Cloud Service Provider: The cloud service provider is bound to AK/SK. The default name generated by `terraform-alibaba` is `default`, so fill in default here.
- Region: Region, select a region based on this parameter when creating a cloud service. You should fill in the location of the Kubernetes cluster described in the current target so that applications in Kubernetes can directly access the delivered cloud services.
Cloud Provider | Cloud Resource | Description
----------------|------------------------------------------------------| -------------
Alibaba Cloud | [ACK](../end-user/components/cloud-services/terraform/alibaba-ack) | Terraform configuration for Alibaba Cloud ACK cluster
| | [EIP](../end-user/components/cloud-services/terraform/alibaba-eip) | Terraform configuration for Alibaba Cloud EIP
| | [OSS](../end-user/components/cloud-services/terraform/alibaba-oss) | Terraform configuration for Alibaba Cloud OSS
| | [RDS](../end-user/components/cloud-services/terraform/alibaba-rds) | Terraform configuration for Alibaba Cloud RDS
| | [Redis](../end-user/components/cloud-services/terraform/alibaba-redis) | Terraform configuration for Alibaba Cloud Redis
| | [VPC](../end-user/components/cloud-services/terraform/alibaba-vpc) | Terraform configuration for Alibaba Cloud VPC
| Azure | [Mariadb](../end-user/components/cloud-services/terraform/azure-database-mariadb) | Terraform configuration for Azure Database Mariadb
| | [Storage Account](../end-user/components/cloud-services/terraform/azure-storage-account) | Terraform configuration for Azure Storage Account
| AWS | [S3](../end-user/components/cloud-services/terraform/aws-s3) | Terraform configuration for AWS S3 bucket
## Creating your cloud service
After finishing setting up the target, let's go to the `Applications` page and click `New Application` to create. Similar to other apps, you need to choose the type of your cloud service, such as `alibaba-rds`; then choose an environment that must have both `Cloud Service Provider` and `Region` parameters set up.
First [create an application](../how-to/dashboard/application/create-application). Please choose the type of your cloud service,
which has a prefix of `aws-`, `azure` or `alibaba-`.
Click `Next Step` to the configuration page. For different vendors, these parameters update accordingly. As for `alibaba-rds`, it has the following:
For different vendors, these parameters update accordingly.
For example, `aws-s3` has the following parameters:
![](../resources/aws-s3-parameters.png)
`azure-database-mariadb` has the following parameters:
![](../resources/azure-database-mariadb-parameters.png)
`alibaba-rds` has the following parameters:
![](../resources/alibaba-rds-parameters.png)
All cloud resources have some common parameters.
- InstanceName: the name of the instance
- DatabaseName: the name of the database
- AccountName: account name by default
- Password: password by default
- AllocatePublicConnection: Whether to assign a public network access address
- DeleteResource: Whether to delete the corresponding cloud service when the app is deleted
- Privilege: default account permissions
- ProviderRef: The Provider which is referenced by a cloud service
- Region: Region is cloud provider's region. It will override `providerRef`.
![set-rds](../resources/set-rds.jpg)
For other cloud resources, you could read the description of each field to get know how to use it.
Set the above parameters according to your needs, click `Create` to enter the application management page, and click the deploy button to start the deployment of cloud services.
Set the above parameters according to your needs to complete creating the application, and then [deploy the application](../how-to/dashboard/application/deploy-application).
## Viewing cloud resource creation status
Like other apps, cloud service apps also need to switch to the corresponding environment page to view instance information. By default, there are several targets in an environment, and the cloud service will generate a corresponding number of instances.
- Check the cloud instance list
Like other apps, cloud service apps also need to switch to the corresponding environment page to view instance information.
By default, there are several targets in an environment, and the cloud service will generate a corresponding number of instances.
![rds-instances](../resources/rds-instances.jpg)
In the instance list, the instance name, status, resource type, and location are displayed. In the beginning, the name is empty, because the cloud service instance generation takes a certain amount of time, and the name will appear when the instance is generated normally. Click the name to enter the cloud vendor console page corresponding to the resource.
In the instance list, the instance name, status, resource type, and location are displayed. In the beginning, the name is empty,
because the cloud service instance generation takes a certain amount of time, and the name will appear when the instance is generated normally.
- View the cloud resource in the console of the cloud provider
You can visit the instance in the console of the cloud provider. For example, you can check the name or console to visit it.
![](../resources/application-console-link.png)
For example, you can check Alibaba Cloud RDS instance in [https://console.aliyun.com](https://console.aliyun.com).
![](../resources/alibaba-cloud-rds-console.png)
- Check details and status of the cloud instance
Click the `Check the detail` button to view the application details.
![rds-status](../resources/rds-status.jpg)
Click the `Check the detail` button to view the application details. You will find that each instance generates a Secret resource, which generally records the service's access address and key information. Secret resources will be distributed to the cluster and Namespace where the target is located while the control cluster exists. Therefore, other applications in the same environment can directly use the resource in the environment variable to obtain the access address and key.
You will find that each instance generates a Secret resource, which generally records the service's access address and
key information. Secret resources will be distributed to the cluster and Namespace where the target is located while the
control cluster exists. Therefore, other applications in the same environment can directly use the resource in the
environment variable to obtain the access address and key.
![env-secret](../resources/env-secret.jpg)
In the last section `Component Status`, the health status and the message of the cloud service instance is displayed.
## FAQ
- The cloud service instance is in the ProviderNotReady state
> First to look at whether the parameters of the target are correctly set according to the documentation guidelines. Then make sure that the AK/SK is correct and the corresponding user has the authority to create the resource.
- The cloud service is always ProvisioningAndChecking and has no name
> The creation of cloud services generally takes a certain amount of time. Please wait or enter the cloud vendor console to view the creation progress.

BIN
docs/tutorials/img.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 270 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

View File

@ -3,93 +3,123 @@ title: Deploy Cloud Service
description: This section introduces the delivery of services provided by cloud vendors through KubeVela and orchestrating your services in the Kubernetes cluster.
---
Integrating cloud service is the most frequent need in our daily development. Varies from the Object storage、Cloud database to LoadBalancer, cache, or search engine, faster to loading them save more time. Meanwhile, to orchestrate different resources from multi-cloud is quite a pain point.
Integrating cloud service is the most frequent need in our daily development, varying from the Object storage, Cloud
database to LoadBalancer, Cache, or search engine. Faster to load them save more time, meanwhile, to orchestrate
different resources from multi-cloud is quite a pain point.
In this section, we introduce an example of using Alibaba Cloud RDS to show you how to deploy cloud services.
In this section, we introduce an example to show you how to deploy cloud services.
## Before starting
- Has a cloud vendor account. To keep its permission more secure, we recommend delegating a subaccount of security keys. For example in AliCloud, please head it to [Creating RAM](https://www.alibabacloud.com/help/en/doc-detail/28627.html).
- Has a cloud vendor account with proper access to your target cloud resources
- Ensure your account has a sufficient balance
- Ensure your account has a sufficient balance
- Connect to a Kubernetes cluster on this cloud vendor for hosting your cloud services
## Enabling cloud vendor Addons
First, we open up VelaUX Dashboard, switch to the tab `Addon`, and click up terraform-alibaba:
First, visit [VelaUX (KubeVela Dashboard)](../install#3-install-velaux), switch to the tab `Addon`, and click up addon
`terraform-xxx`. `xxx` stands for the cloud provider name. We support the following Addons:
- provider-alibaba
- provider-aws
- provider-azure
We can provision cloud resources in Alibaba Cloud, AWS, and Azure respectively.
Follow the instructions on all the properties of the addon for each cloud provider to set the addon and enable it.
For example, for Alibaba Cloud, you need to set the following properties:
Then fill in your ALICLOUD_ACCESS_KEY, ALICLOUD_REGION, and ALICLOUD_SECRET_KEY to enable it。
> Notice: KubeVela encrypt all the keys hence no need to worry about its safety
> Notice: KubeVela encrypts all the keys, hence no need to worry about its safety.
![addon-alibaba](../resources/addon-alibaba.jpg)
`terraform-alibaba` addon depends on `terraform` addon. If the latter isn't enabled, it'll be automatically enabled when the former does. The creating process of cloud services pulls configuration from GitHub. If your control plane cluster that runs KubeVela is very hard to connect to GitHub, please open up the `GithubBlocked` option in `terraform` addon.
The creating process of cloud services pulls configuration from GitHub. If your control plane
cluster that runs KubeVela is very hard to connect to GitHub, please open up the `GithubBlocked` option in `terraform`
addon.
The `terraform-alibaba` addon supports the following types of resources and more later on:
KubeVela supports the following types of resources and more later on:
- alibaba-rds
- alibaba-ack
- alibaba-ask
- alibaba-oss
- alibaba-rds
- alibaba-redis
## Setting up Targets
The way of deploying cloud services differs from other types of apps, cause its controller only runs in the control plane cluster. Therefore, we need to set the cloud vendor and regional parameters of each target.
Enter the page of Targets, select the cloud service you need. Click `Edit` to the edit mode or simply create a new one.
![target-variables](../resources/target-variables.jpg)
The target first mainly describes the Namespace of the Kubernetes cluster and then describes the cloud vendor and region where the cluster is located by setting shared variables.
- Cloud Service Provider: The cloud service provider is bound to AK/SK. The default name generated by `terraform-alibaba` is `default`, so fill in default here.
- Region: Region, select a region based on this parameter when creating a cloud service. You should fill in the location of the Kubernetes cluster described in the current target so that applications in Kubernetes can directly access the delivered cloud services.
Cloud Provider | Cloud Resource | Description
----------------|------------------------------------------------------| -------------
Alibaba Cloud | [ACK](../end-user/components/cloud-services/terraform/alibaba-ack) | Terraform configuration for Alibaba Cloud ACK cluster
| | [EIP](../end-user/components/cloud-services/terraform/alibaba-eip) | Terraform configuration for Alibaba Cloud EIP
| | [OSS](../end-user/components/cloud-services/terraform/alibaba-oss) | Terraform configuration for Alibaba Cloud OSS
| | [RDS](../end-user/components/cloud-services/terraform/alibaba-rds) | Terraform configuration for Alibaba Cloud RDS
| | [Redis](../end-user/components/cloud-services/terraform/alibaba-redis) | Terraform configuration for Alibaba Cloud Redis
| | [VPC](../end-user/components/cloud-services/terraform/alibaba-vpc) | Terraform configuration for Alibaba Cloud VPC
| Azure | [Mariadb](../end-user/components/cloud-services/terraform/azure-database-mariadb) | Terraform configuration for Azure Database Mariadb
| | [Storage Account](../end-user/components/cloud-services/terraform/azure-storage-account) | Terraform configuration for Azure Storage Account
| AWS | [S3](../end-user/components/cloud-services/terraform/aws-s3) | Terraform configuration for AWS S3 bucket
## Creating your cloud service
After finishing setting up the target, let's go to the `Applications` page and click `New Application` to create. Similar to other apps, you need to choose the type of your cloud service, such as `alibaba-rds`; then choose an environment that must have both `Cloud Service Provider` and `Region` parameters set up.
First [create an application](../how-to/dashboard/application/create-application). Please choose the type of your cloud service,
which has a prefix of `aws-`, `azure` or `alibaba-`.
Click `Next Step` to the configuration page. For different vendors, these parameters update accordingly. As for `alibaba-rds`, it has the following:
For different vendors, these parameters update accordingly.
For example, `aws-s3` has the following parameters:
![](../resources/aws-s3-parameters.png)
`azure-database-mariadb` has the following parameters:
![](../resources/azure-database-mariadb-parameters.png)
`alibaba-rds` has the following parameters:
![](../resources/alibaba-rds-parameters.png)
All cloud resources have some common parameters.
- InstanceName: the name of the instance
- DatabaseName: the name of the database
- AccountName: account name by default
- Password: password by default
- AllocatePublicConnection: Whether to assign a public network access address
- DeleteResource: Whether to delete the corresponding cloud service when the app is deleted
- Privilege: default account permissions
- ProviderRef: The Provider which is referenced by a cloud service
- Region: Region is cloud provider's region. It will override `providerRef`.
![set-rds](../resources/set-rds.jpg)
For other cloud resources, you could read the description of each field to get know how to use it.
Set the above parameters according to your needs, click `Create` to enter the application management page, and click the deploy button to start the deployment of cloud services.
Set the above parameters according to your needs to complete creating the application, and then [deploy the application](../how-to/dashboard/application/deploy-application).
## Viewing cloud resource creation status
Like other apps, cloud service apps also need to switch to the corresponding environment page to view instance information. By default, there are several targets in an environment, and the cloud service will generate a corresponding number of instances.
- Check the cloud instance list
Like other apps, cloud service apps also need to switch to the corresponding environment page to view instance information.
By default, there are several targets in an environment, and the cloud service will generate a corresponding number of instances.
![rds-instances](../resources/rds-instances.jpg)
In the instance list, the instance name, status, resource type, and location are displayed. In the beginning, the name is empty, because the cloud service instance generation takes a certain amount of time, and the name will appear when the instance is generated normally. Click the name to enter the cloud vendor console page corresponding to the resource.
In the instance list, the instance name, status, resource type, and location are displayed. In the beginning, the name is empty,
because the cloud service instance generation takes a certain amount of time, and the name will appear when the instance is generated normally.
- View the cloud resource in the console of the cloud provider
You can visit the instance in the console of the cloud provider. For example, you can check the name or console to visit it.
![](../resources/application-console-link.png)
For example, you can check Alibaba Cloud RDS instance in [https://console.aliyun.com](https://console.aliyun.com).
![](../resources/alibaba-cloud-rds-console.png)
- Check details and status of the cloud instance
Click the `Check the detail` button to view the application details.
![rds-status](../resources/rds-status.jpg)
Click the `Check the detail` button to view the application details. You will find that each instance generates a Secret resource, which generally records the service's access address and key information. Secret resources will be distributed to the cluster and Namespace where the target is located while the control cluster exists. Therefore, other applications in the same environment can directly use the resource in the environment variable to obtain the access address and key.
You will find that each instance generates a Secret resource, which generally records the service's access address and
key information. Secret resources will be distributed to the cluster and Namespace where the target is located while the
control cluster exists. Therefore, other applications in the same environment can directly use the resource in the
environment variable to obtain the access address and key.
![env-secret](../resources/env-secret.jpg)
In the last section `Component Status`, the health status and the message of the cloud service instance is displayed.
## FAQ
- The cloud service instance is in the ProviderNotReady state
> First to look at whether the parameters of the target are correctly set according to the documentation guidelines. Then make sure that the AK/SK is correct and the corresponding user has the authority to create the resource.
- The cloud service is always ProvisioningAndChecking and has no name
> The creation of cloud services generally takes a certain amount of time. Please wait or enter the cloud vendor console to view the creation progress.