Update and refactor app repository in workspace administration

Signed-off-by: Sherlock113 <sherlockxu@yunify.com>
This commit is contained in:
Sherlock113 2020-11-17 14:23:12 +08:00
parent 27b7a44513
commit 7140c44563
8 changed files with 71 additions and 39 deletions

View File

@ -0,0 +1,7 @@
---
linkTitle: "App Repository"
weight: 2200
_build:
render: false
---

View File

@ -0,0 +1,53 @@
---
title: "Import Helm Repository"
keywords: "Kubernetes, helm, KubeSphere, application"
description: "Import Helm Repository into KubeSphere"
linkTitle: "Import Helm Repository"
weight: 100
---
KubeSphere builds app repositories that allow users to use Kubernetes applications based on Helm charts. App repositories are powered by [OpenPitrix](https://github.com/openpitrix/openpitrix), an open-source platform for cross-cloud application management sponsored by QingCloud. In an app repository, every application serves as a base package library. To deploy and manage an app from an app repository, you need to create the repository in advance.
To create a repository, you use an HTTP/HTTPS server or object storage solutions to store packages. More specifically, an app repository relies on external storage independent of OpenPitrix, such as [MinIO](https://min.io/) object storage, [QingStor object storage](https://github.com/qingstor), and [AWS object storage](https://aws.amazon.com/what-is-cloud-object-storage/). These object storage services are used to store configuration packages and index files created by developers. After a repository is registered, the configuration packages are automatically indexed as deployable applications.
This tutorial demonstrates how to add an app repository to KubeSphere.
## Prerequisites
- You need to enable [KubeSphere App Store (OpenPitrix)](../../../pluggable-components/app-store/).
- You need to have an app repository. Refer to [the official documentation of Helm](https://v2.helm.sh/docs/developing_charts/#the-chart-repository-guide) to create repositories or [upload your own apps to the public repository of KubeSphere](../upload-app-to-public-repository/). Alternatively, use the example repository in the steps below, which are only for demonstration purposes.
- You need to create a workspace and a user account (`ws-admin`). The account must be granted the role of `workspace-admin` in the workspace. For more information, refer to [Create Workspace, Project, Account and Role](../../../quick-start/create-workspace-and-project/).
## Add App Repository
1. Log in the web console of KubeSphere as `ws-admin`. In your workspace, go to **App Repos** under **Apps Management**, and then click **Add Repo**.
![app-repo](/images/docs/workspace-administration/app-repository/import-helm-repository/app-repo.jpg)
2. In the dialogue that appears, specify an app repository name and add your repository URL. For example, enter `https://charts.kubesphere.io/main`.
![app-info-dialogue](/images/docs/workspace-administration/app-repository/import-helm-repository/app-info-dialogue.jpg)
- **App Repository Name**: Set a simple and clear name for the repository, which is easy for users to identify.
- **Type**: Support applications based on Helm charts.
- **URL**: Support the following three protocols:
- S3: The URL is S3-styled, such as `s3.<zone-id>.qingstor.com/<bucket-name>/` for the access to QingStor services using the S3 interface. If you select this type, you need to provide the access key and secret.
- HTTP: Readable but not writable. Applications in the app repository (object storage) can be acquired and deployed to the runtime environment, such as `http://docs-repo.gd2.qingstor.com`. The example contains an sample app NGINX, which will be imported automatically after the repository is created. You can deploy it from app templates.
- HTTPS: Readable but not writable. Applications in the app repository can be acquired and deployed to the runtime environment.
- **Description**: Give a brief introduction of main features of the app repository.
3. After you specify required fields, click **Validate** to verify the URL. You will see a green check mark next to the URL if it is available and click **OK** to finish.
![validate-link](/images/docs/workspace-administration/app-repository/import-helm-repository/validate-link.jpg)
{{< notice note >}}
- The example repository used in this tutorial is a mirror of Google's Helm repository. Some of the apps in this repository may not be successfully deployed. The KubeSphere team will develop a commercial version of app repositories for enterprises in the future.
- In an on-premises private cloud environment, you can build your own repository based on [Helm](https://helm.sh). Then, you develop and upload applications to the repository and deploy them on KubeSphere for your own needs.
{{</ notice >}}
4. The repository displays in the repository list below after imported and KubeSphere automatically adds all apps in the repository as app templates. When users choose to deploy apps using app templates, they can see apps in this repository. For more information, see [App Repository](../../../project-user-guide/application/application-repo/).
![app-repo-list](/images/docs/workspace-administration/app-repository/import-helm-repository/app-repo-list.jpg)

View File

@ -0,0 +1,11 @@
---
title: "Upload Apps to KubeSphere Public Repository"
keywords: "Kubernetes, helm, KubeSphere, application"
description: "How to upload apps to KubeSphere public repository."
linkTitle: "Upload Apps to KubeSphere Public Repository"
weight: 200
---
TBD

View File

@ -1,39 +0,0 @@
---
title: "Import Helm Repository"
keywords: "kubernetes, helm, kubesphere, application"
description: "Import Helm Repository into KubeSphere"
linkTitle: "Import Helm Repository"
weight: 100
---
KubeSphere builds application repository services on [OpenPitrix](https://openpitrix.io), the open source cross-cloud application management platform from [QingCloud](https://www.qingcloud.com), which supports for Kubernetes applications based on Helm Chart. In an application repository, each application is a base package repository and if you want to use OpenPitrix for application management, you need to create the repository first. You can store packages to an HTTP/HTTPS server, a [minio](https://docs.min.io/), or an S3 object storage. The application repository is an external storage independent of OpenPitrix, which can be [minio](https://docs.min.io/), QingCloud's QingStor object storage, or AWS object storage, in which the contents are the configuration packages of the application developed by developers. and indexed files. After registering the repository, the stored application configuration packages are automatically indexed as deployable applications.
## Preparing the application repository
The [official Helm documentation](https://helm.sh/docs/topics/chart_repository/#hosting-chart-repositories) already provides several ways to create application repositories, But in this document, we recommend that you use the official KubeSphere helm repo.
- [KubeSphere Official Application Repository](https://charts.kubesphere.io/)
## Adding application repositories
1. Create a Workspace, and then in the Workspace, go to `App Managements → App repos` and click `Add Repo`.
![repo](/images/application-templates/20201109150224.png)
2. In the Add Repository window, fill in the URL with `https://charts.kubesphere.io/main`, and then create the repository after verification.
- Repository Name: Give a simple and clear name to the repository, which is easy for users to browse and search.
- Type: Helm Chart type application is supported.
- URL: The following three protocols are supported
- The URL is S3 styled, e.g. `s3.<zone-id>.qingstor.com/<bucket-name>/` to access the QingStor service using the S3 interface.
- HTTP: readable, not writable, only supports fetching applications from this application repository (object storage) and deploying to the runtime environment, e.g., enter `http://docs-repo.gd2.qingstor.com`. This example contains a sample Nginx application that will be automatically imported into the platform after creation, and can be done in the application template Deployment.
- HTTPS: readable, not writable, supports only getting applications from this application repository, supports deployment to a runtime environment.
- Description information: a brief description of the main features of the application repository to give users a better understanding of the application repository.
3. If the validation is passed, click the **OK** button to complete the addition of the application repository. Once the repository is added, KubeSphere will automatically load all the application templates under the repository.
> Note that the example repository added above is a mirror of Google's Helm repository (we will be developing a commercial version of the application repository for enterprise use in the future), and some of these applications may not be successfully deployed.
In an on-premises private cloud scenario, you can build your own repository based on [Helm](https://helm.sh), and develop and upload applications to your repository that meet your business needs, and then deploy them for distribution based on KubeSphere.

Binary file not shown.

After

Width:  |  Height:  |  Size: 217 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 245 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 232 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 202 KiB