From ad622b8f6492814b15e66e169ff680245c42e495 Mon Sep 17 00:00:00 2001 From: Sherlock113 Date: Fri, 28 Aug 2020 18:11:07 +0800 Subject: [PATCH] Add enabling devops in components Signed-off-by: Sherlock113 --- .../en/docs/pluggable-components/devops.md | 113 +++++++++++++ .../docs/pluggable-components/release-v210.md | 155 ------------------ 2 files changed, 113 insertions(+), 155 deletions(-) create mode 100644 content/en/docs/pluggable-components/devops.md delete mode 100644 content/en/docs/pluggable-components/release-v210.md diff --git a/content/en/docs/pluggable-components/devops.md b/content/en/docs/pluggable-components/devops.md new file mode 100644 index 000000000..63f862505 --- /dev/null +++ b/content/en/docs/pluggable-components/devops.md @@ -0,0 +1,113 @@ +--- +title: "Enable DevOps System" +keywords: "Kubernetes, Jenkins, KubeSphere, DevOps, cicd" +description: "How to Enable KubeSphere DevOps System" + +linkTitle: "Enable DevOps System" +weight: 3520 +--- + +## What is KubeSphere DevOps System + +KubeSphere DevOps System is designed for CI/CD workflows in Kubernetes. Based on [Jenkins](https://jenkins.io/), it provides one-stop solutions to help both development and Ops teams build, test and publish apps to Kubernetes in a straight-forward way. It also features plugin management, Binary-to-Image (B2I), Source-to-Image (S2I), code dependency caching, code quality analysis, pipeline logging, etc. + +The DevOps system offers an enabling environment for users as apps can be automatically released to the same platform. It is also compatible with third-party private image registries (e.g. Harbor) and code repositories (e.g. GitLab/GitHub/SVN/BitBucket). As such, it creates excellent user experiences by providing users with comprehensive, visualized CI/CD pipelines which are extremely useful in air-gapped environments. + +For more information, see DevOps Administration. + +## Enable DevOps before Installation + +### Installing on Linux + +When you install KubeSphere on Linux, you need to create a configuration file, which lists all KubeSphere components. + +1. In the tutorial of [Installing KubeSphere on Linux](https://kubesphere-v3.netlify.app/docs/installing-on-linux/introduction/multioverview/), you create a default file **config-sample.yaml**. Modify the file by executing the following command: + +```bash +vi config-sample.yaml +``` + +{{< notice note >}} + +If you adopt [All-in-one Installation](https://kubesphere-v3.netlify.app/docs/quick-start/all-in-one-on-linux/), you do not need to create a config-sample.yaml file as you can create a cluster directly. Generally, the all-in-one mode is for users who are new to KubeSphere and look to get familiar with the system. If you want to enable DevOps in this mode (e.g. for testing purpose), refer to the following section to see how DevOps can be installed after installation. + +{{}} + +2. In this file, navigate to `devops` and change `false` to `true` for `enabled`. Save the file after you finish. + +```bash +devops: + enabled: true # Change "false" to "true" +``` + +3. Create a cluster using the configuration file: + +```bash +./kk create cluster -f config-sample.yaml +``` + +### **Installing on Kubernetes** + +When you install KubeSphere on Kubernetes, you need to download the file [cluster-configuration.yaml](https://raw.githubusercontent.com/kubesphere/ks-installer/master/deploy/cluster-configuration.yaml) for cluster setting. If you want to install DevOps, do not use `kubectl apply -f` directly for this file. + +1. In the tutorial of [Installing KubeSphere on Kubernetes](https://kubesphere-v3.netlify.app/docs/installing-on-kubernetes/introduction/overview/), you execute `kubectl apply -f` first for the file [kubesphere-installer.yaml](https://raw.githubusercontent.com/kubesphere/ks-installer/master/deploy/kubesphere-installer.yaml). After that, to enable DevOps, create a local file cluster-configuration.yaml. + +```bash +vi cluster-configuration.yaml +``` + +2. Copy all the content in the file [cluster-configuration.yaml](https://raw.githubusercontent.com/kubesphere/ks-installer/master/deploy/cluster-configuration.yaml) and paste it to the local file just created. +3. In this local cluster-configuration.yaml file, navigate to `devops` and enable DevOps by changing `false` to `true` for `enabled`. Save the file after you finish. + +```bash +devops: + enabled: true # Change "false" to "true" +``` + +4. Execute the following command to start installation: + +```bash +kubectl apply -f cluster-configuration.yaml +``` + +Whether you install KubeSphere on Linux or on Kubernetes, you can check the status of the component in the web console of KubeSphere after installation in **Components**. + +## Enable DevOps after Installation + +1. Log in the console as `admin`. Click **Platform** at the top left corner and select **Clusters Management**. + +![clusters-management](https://ap3.qingstor.com/kubesphere-website/docs/20200828111130.png) + +2. Click **CRDs** and enter `clusterconfiguration` in the search bar. Click the result to view its detailed page. + +{{< notice info >}} + +A Custom Resource Definition (CRD) allows users to create a new type of resources without adding another API server. They can use these resources like any other native Kubernetes objects. + +{{}} + +3. In **Resource List**, click the three dots on the right of `ks-installer` and select **Edit YAML**. + +![edit-yaml](https://ap3.qingstor.com/kubesphere-website/docs/20200827182002.png) + +4. In this yaml file, navigate to `devops` and change `false` to `true` for `enabled`. After you finish, click **Update** at the bottom right corner to save the configuration. + +```bash +devops: + enabled: true # Change "false" to "true" +``` + +5. You can use the web kubectl to check the installation process by executing the following command: + +```bash +kubectl logs -n kubesphere-system $(kubectl get pod -n kubesphere-system -l app=ks-install -o jsonpath='{.items[0].metadata.name}') -f +``` + +{{< notice tip >}} + +You can find the web kubectl tool by clicking the hammer icon at the bottom right corner of the console. + +{{}} + +6. Check the status in **Components** or execute `kubectl get pod --all-namespaces` through kubectl to see the status of pods. + diff --git a/content/en/docs/pluggable-components/release-v210.md b/content/en/docs/pluggable-components/release-v210.md deleted file mode 100644 index 57ab876fd..000000000 --- a/content/en/docs/pluggable-components/release-v210.md +++ /dev/null @@ -1,155 +0,0 @@ ---- -title: "KubeSphere DevOps System" -keywords: "kubernetes, jenkins, kubesphere, DevOps, cicd" -description: "How to Enable KubeSphere DevOps System" - -linkTitle: "KubeSphere DevOps System" -weight: 200 ---- - -KubeSphere 2.1.0 was released on Nov 11th, 2019, which fixes known bugs, adds some new features and brings some enhancement. If you have installed versions of 2.0.x, please upgrade it and enjoy the better user experience of v2.1.0. - -## Installer Enhancement - -- Decouple some components and make components including DevOps, service mesh, app store, logging, alerting and notification optional and pluggable -- Add Grafana (v5.2.4) as the optional component -- Upgrade Kubernetes to 1.15.5. It is also compatible with 1.14.x and 1.13.x -- Upgrade [OpenPitrix](https://openpitrix.io/) to v0.4.5 -- Upgrade the log forwarder Fluent Bit to v1.3.2 -- Upgrade Jenkins to v2.176.2 -- Upgrade Istio to 1.3.3 -- Optimize the high availability for core components - -## App Store - -### Features - -Support upload / test / review / deploy / publish/ classify / upgrade / deploy and delete apps, and provide nine built-in applications - -### Upgrade & Enhancement - -- The application repository configuration is moved from global to each workspace -- Support adding application repository to share applications in a workspace - -## Storage - -### Features - -- Support Local Volume with dynamic provisioning -- Provide the real-time monitoring feature for QingCloud block storage - -### Upgrade & Enhancement - -QingCloud CSI is adapted to CSI 1.1.0, supports upgrade, topology, create or delete a snapshot. It also supports creating PVC based on a snapshot - -### BUG Fixes - -Fix the StorageClass list display problem - -## Observability - -### Features - -- Support for collecting the file logs on the disk. It is used for the Pod which preserves the logs as the file on the disk -- Support integrating with external ElasticSearch 7.x -- Ability to search logs containinh Chinese words -- Add initContainer log display -- Ability to export logs -- Support for canceling the notification from alerting - -### UPGRADE & ENHANCEMENT - -- Improve the performance of log search -- Refine the hints when the logging service is abnormal -- Optimize the information when the monitoring metrics request is abnormal -- Support pod anti-affinity rule for Prometheus - -### BUG FIXES - -- Fix the mistaken highlights in the logs search result -- Fix log search not matching phrases correctly -- Fix the issue that log could not be retrieved for a deleted workload when it is searched by workload name -- Fix the issue where the results were truncated when the log is highlighted -- Fix some metrics exceptions: node `inode`, maximum pod tolerance -- Fix the issue with an incorrect number of alerting targets -- Fix filter failure problem of multi-metric monitoring -- Fix the problem of no logging and monitoring information on taint nodes (Adjust the toleration attributes of node-exporter and fluent-bit to deploy on all nodes by default, ignoring taints) - -## DevOps - -### Features - -- Add support for branch exchange and git log export in S2I -- Add B2I, ability to build Binary/WAR/JAR package and release to Kubernetes -- Support dependency cache for the pipeline, S2I, and B2I -- Support delete Kubernetes resource action in `kubernetesDeploy` step -- Multi-branch pipeline supports trigger other pipelines when create or delete the branch - -### Upgrades & Enhancement - -- Support BitBucket in the pipeline -- Support Cron script validation in the pipeline -- Support Jenkinsfile syntax validation -- Support custom the link in SonarQube -- Support event trigger build in the pipeline -- Optimize the agent node selection in the pipeline -- Accelerate the start speed of the pipeline -- Use dynamical volume as the work directory of the Agent in the pipeline, also contributes to Jenkins [#589](https://github.com/jenkinsci/kubernetes-plugin/pull/598) -- Optimize the Jenkins kubernetesDeploy plugin, add more resources and versions (v1, app/v1, extensions/v1beta1、apps/v1beta2、apps/v1beta1、autoscaling/v1、autoscaling/v2beta1、autoscaling/v2beta2、networking.k8s.io/v1、batch/v1beta1、batch/v2alpha1), also contributes to Jenkins [#614](https://github.com/jenkinsci/kubernetes-plugin/pull/614) -- Add support for PV, PVC, Network Policy in deploy step of the pipeline, also contributes to Jenkins [#87](https://github.com/jenkinsci/kubernetes-cd-plugin/pull/87)、[#88](https://github.com/jenkinsci/kubernetes-cd-plugin/pull/88) - -### Bug Fixes - -- Fix the issue that 400 bad request in GitHub Webhook -- incompatible change: DevOps Webhook's URL prefix is changed from `/webhook/xxx` to `/devops_webhook/xxx` - -## Authentication and authority - -### Features - -Support sync and authenticate with AD account - -### Upgrades & Enhancement - -- Reduce the LDAP component's RAM consumption -- Add protection against brute force attacks - -### Bug Fixes - -- Fix LDAP connection pool leak -- Fix the issue where users could not be added in the workspace -- Fix sensitive data transmission leaks - -## User Experience - -### Features - -Ability to wizard management of projects (namespace) that are not assigned to the workspace - -### Upgrades & Enhancement - -- Support bash-completion in web kubectl -- Optimize the host information display -- Add connection test of the email server -- Add prompt on resource list page -- Optimize the project overview page and project basic information -- Simplify the service creation process -- Simplify the workload creation process -- Support real-time status update in the resource list -- optimize YAML editing -- Support image search and image information display -- Add the pod list to the workload page -- Update the web terminal theme -- Support container switching in container terminal -- Optimize Pod information display, and add Pod scheduling information -- More detailed workload status display - -### Bug Fixes - -- Fix the issue where the default request resource of the project is displayed incorrectly -- Optimize the web terminal design, make it much easier to find -- Fix the Pod status update delay -- Fix the issue where a host could not be searched based on roles -- Fix DevOps project quantity error in workspace detail page -- Fix the issue with the workspace list pages not turning properly -- Fix the problem of inconsistent result ordering after query on workspace list page