diff --git a/LICENSE b/LICENSE index 261eeb9e9..cd92c18de 100644 --- a/LICENSE +++ b/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [yyyy] [name of copyright owner] + Copyright 2018-2020 KubeSphere Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/README.md b/README.md index a8740d1a8..2b4fb3489 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ cd website ### Running the website locally -hugo version: hugo_extended_0.70.0+, you can install Hugo from [hugo releases](https://help.github.com/en/desktop/contributing-to-projects/creating-an-issue-or-pull-request#creating-a-new-pull-request) +hugo version: hugo_extended_0.70.0+, you can install Hugo from [hugo releases](https://github.com/gohugoio/hugo/releases) When you have installed Hugo, then run: diff --git a/assets/scss/404.scss b/assets/scss/404.scss new file mode 100644 index 000000000..74df99a3d --- /dev/null +++ b/assets/scss/404.scss @@ -0,0 +1,4 @@ +.section-1 { + padding-top: 100px; + text-align: center; +} \ No newline at end of file diff --git a/assets/scss/blogs.scss b/assets/scss/blogs.scss index 18b55ad66..c93e12a72 100644 --- a/assets/scss/blogs.scss +++ b/assets/scss/blogs.scss @@ -1 +1,152 @@ -@import 'open-source'; \ No newline at end of file +@import 'open-source'; + +.section-1 { + background-color: #fff; + padding-top: 60px; + padding-bottom: 100px; + + & > div { + width: 1160px; + margin: 0 auto; + + & > .blog-tab-ul { + padding: 30px 34px 22px; + border-radius: 5px; + box-shadow: 0 4px 16px 0 rgba(7,42,68,.1); + background-color: #fff; + + li { + display: inline-block; + min-width: 48px; + padding: 8px 16px; + margin-bottom: 8px; + border-radius: 20px; + -webkit-transition: all .2s ease-in-out; + transition: all .2s ease-in-out; + cursor: pointer; + font-size: 16px; + font-weight: 500; + line-height: 1.5; + text-align: center; + + &:hover { + box-shadow: 0 8px 16px 0 rgba(101,193,148,.2),0 0 50px 0 rgba(101,193,148,.1); + background-color: #55bc8a; + color: #fff; + } + } + .active { + box-shadow: 0 8px 16px 0 rgba(101,193,148,.2),0 0 50px 0 rgba(101,193,148,.1); + background-color: #55bc8a; + color: #fff; + } + + li + li { + margin-left: 12px; + } + } + + .blogs-ul { + margin-top: 20px; + + & > li { + position: relative; + height: 280px; + border-radius: 4px; + box-shadow: 0 4px 15px 0 rgba(7,42,68,.1); + background-color: #fff; + overflow: hidden; + + .img-div { + position: absolute; + top: 0; + left: 0; + width: 280px; + height: 280px; + overflow: hidden; + & > img { + width: 280px; + height: 280px; + object-fit: contain; + } + } + + & > .content-div{ + height: 216px; + padding: 32px 200px 32px 320px; + + .time { + font-size: 14px; + color: #919aa3; + line-height: 20px; + } + + h3 { + margin: 12px 0; + font-size: 20px; + line-height: 28px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + color: #4ca986; + + a { + color: #4ca986 + } + } + + .author { + font-size: 14px; + color: #36435c; + line-height: 20px; + + img span { + display: inline-block; + vertical-align: middle; + } + } + + .summary { + margin-top: 20px; + margin-bottom: 32px; + font-size: 14px; + line-height: 20px; + color: #919aa3; + } + + ul { + li { + display: inline-block; + padding: 2px 8px; + font-size: 12px; + font-weight: 500; + color: #919aa3; + margin-bottom: 4px; + border-radius: 4px; + line-height: 20px; + background-color: rgba(199,211,221,.09); + } + + li + li { + margin-left: 8px; + } + } + } + + & > a { + position: absolute; + top: 50%; + right: 40px; + transform: translateY(-50%); + display: block; + width: 64px; + height: 64px; + } + } + + & > li + li { + margin-top: 12px; + } + } + } +} \ No newline at end of file diff --git a/assets/scss/case-detail.scss b/assets/scss/case-detail.scss new file mode 100644 index 000000000..05ade9d52 --- /dev/null +++ b/assets/scss/case-detail.scss @@ -0,0 +1,187 @@ +.section-1 { + height: 300px; + + img { + width: 100%; + height: 100%; + object-fit: cover; + } + + div { + position: relative; + width: 1160px; + margin: -162px auto 0; + + h1 { + height: 40px; + text-shadow: 0 2px 6px rgba(0, 0, 0, 0.15); + font-size: 40px; + font-weight: bold; + line-height: 1; + letter-spacing: -0.11px; + color: #ffffff; + } + + p { + width: 733px; + margin-top: 12px; + opacity: 0.8; + text-shadow: 0 2px 6px rgba(0, 0, 0, 0.15); + font-size: 16px; + line-height: 1.5; + letter-spacing: -0.04px; + color: #ffffff; + } + } +} + +.section-2 { + position: relative; + & > img { + position: absolute; + top: 320px; + left: 50%; + transform: translateX(400px); + } + & > div { + position: relative; + width: 1160px; + margin: 0 auto; + padding-top: 56px; + z-index: 2; + + .ul-left { + width: 668px; + + & > li + li { + margin-top: 30px; + } + + & > li { + h2 { + font-size: 24px; + left: 28px; + letter-spacing: -0.07px; + color: #30313b; + } + + & > p { + margin-top: 12px; + font-size: 16px; + line-height: 1.75; + letter-spacing: -0.04px; + color: #919aa3; + } + + & > img { + display: block; + max-width: 100%; + margin: 20px auto 0; + } + + & > ul { + width: 660px; + font-size: 0; + border-radius: 8px; + overflow: hidden; + li { + position: relative; + display: inline-block; + box-sizing: border-box; + width: 220px; + height: 126px; + + p { + position: absolute; + width: 160px; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + font-size: 16px; + line-height: 1.75; + text-align: center; + color: #ffffff; + } + } + li:nth-child(1) { + background-image: linear-gradient(to left, #0c8349 99%, #00603c 0%); + } + li:nth-child(2) { + background-image: linear-gradient(to left, #2a9762 99%, #278d67 0%); + } + li:nth-child(3) { + background-image: linear-gradient(to left, #65c194 99%, #4ca986 9%); + } + } + + & > div { + position: relative; + padding: 20px 60px 20px 38px; + border-radius: 8px; + background-image: linear-gradient(107deg, #4a499a 28%, #8552c3 81%); + + .p1 { + font-size: 16px; + line-height: 1.75; + color: #ffffff; + } + + .p2 { + opacity: 0.8; + font-size: 14px; + line-height: 1.86; + letter-spacing: 0.35px; + color: #ffffff; + } + + img { + position: absolute; + top: -20px; + right: -8px; + } + } + } + } + + & > div { + position: absolute; + right: 40px; + top: -56px; + width: 373px; + border-radius: 10px; + box-shadow: 0 4px 8px 0 rgba(36, 46, 66, 0.06), 0 8px 16px 0 rgba(36, 46, 66, 0.05); + background-color: #ffffff; + + img { + display: block; + width: 293px; + margin: 0 auto; + height: 120px; + object-fit: contain; + } + + .ul-right { + padding: 4px 60px 26px; + + li + li { + margin-top: 16px; + } + + li { + .p1 { + font-size: 16px; + line-height: 28px; + color: #30313b; + } + + .p2 { + font-size: 16px; + line-height: 1.75; + letter-spacing: -0.04px; + color: #919aa3; + } + } + } + } + } +} \ No newline at end of file diff --git a/assets/scss/case.scss b/assets/scss/case.scss index a77cf60ea..c88a83f52 100644 --- a/assets/scss/case.scss +++ b/assets/scss/case.scss @@ -37,6 +37,7 @@ } .section-2 { + position: relative; .cases-ul { display: flex; flex-wrap: wrap ; @@ -45,6 +46,7 @@ top: -60px; width: 1160px; margin: 0 auto; + z-index: 2; li { width: 373px; @@ -84,9 +86,17 @@ } } } + + & > img { + position: absolute; + bottom: 30px; + right: 50%; + transform: translateX(-520px); + } } .section-3 { + position: relative; background-image: url('/images/case/oval-4.svg'); background-position: center top; background-repeat: no-repeat; @@ -115,17 +125,24 @@ background-color: #ffffff; li { - margin-left: 60px; + padding: 8px 16px; + border-radius: 20px; + margin-left: 30px; height: 24px; font-size: 16px; line-height: 1.5; color: #36435c; cursor: pointer; + transition: all ease 0.2s; + + &:hover { + box-shadow: 0 8px 16px 0 rgba(101, 193, 148, 0.2), 0 0 50px 0 rgba(101, 193, 148, 0.1); + background-color: #55bc8a; + color: #ffffff; + } } .active { - padding: 8px 16px; - border-radius: 20px; box-shadow: 0 8px 16px 0 rgba(101, 193, 148, 0.2), 0 0 50px 0 rgba(101, 193, 148, 0.1); background-color: #55bc8a; color: #ffffff; @@ -133,8 +150,10 @@ } #case-children { + position: relative; + z-index: 2; display: flex; - flex-wrap: wrap ; + flex-wrap: wrap; li { margin-top: 20px; margin-right: 21px; @@ -152,5 +171,23 @@ box-shadow: 0 4px 8px 0 rgba(36, 46, 66, 0.06), 0 8px 16px 0 rgba(36, 46, 66, 0.05); } } + + & > p { + margin-top: 40px; + text-align: center; + + a { + color: #00a971; + } + } + } + + + & > img { + width: 152px; + position: absolute; + bottom: -20px; + left: 50%; + transform: translateX(500px); } } \ No newline at end of file diff --git a/assets/scss/common.scss b/assets/scss/common.scss index b3cc25bc4..363d185dc 100644 --- a/assets/scss/common.scss +++ b/assets/scss/common.scss @@ -4,9 +4,53 @@ @import 'footer'; body { - font-family: $font-family-id; + font-family: $font-family-2; +} + +h1, h2, h3 ,h4, h5, h6 { + font-family: $font-family-1; } html { background-color: #f5f8f9; } + +button { + border: none; + + &:hover { + box-shadow: none; + } +} + +.title-h1 { + font-size: 40px; + line-height: 1; + letter-spacing: -0.11px; + color: #ffffff; + text-shadow: 0 2px 6px rgba(0, 0, 0, 0.15); +} + +.title-black-h2 { + text-shadow: 0 4px 8px rgba(35, 45, 65, 0.1); + font-size: 32px; + font-weight: bold; + line-height: 1.63; + color: #3d3e49; +} + +.title-white-h2 { + text-shadow: 0 4px 8px rgba(35, 45, 65, 0.1); + font-size: 32px; + font-weight: bold; + line-height: 1.63; + color: #ffffff; +} + +.title-p { + font-size: 16px; + line-height: 1.5; + letter-spacing: -0.04px; + color: #ffffff; + text-shadow: 0 2px 6px rgba(0, 0, 0, 0.15); +} diff --git a/assets/scss/content.scss b/assets/scss/content.scss index 81eeeb4b6..199152522 100644 --- a/assets/scss/content.scss +++ b/assets/scss/content.scss @@ -6,9 +6,18 @@ & > div { width: 1160px; margin: 0 auto; + position: relative; .breadcrumb { margin: 30px 0; + + a { + color: #919aa3; + + &:hover { + color: #55bc8a; + } + } } .main-div { @@ -113,12 +122,7 @@ } .aside { - position: fixed; - top: 150px; - left: 50%; - width: 214px; - transform: translateX(350px); - + width: 230px; .title { height: 32px; font-size: 24px; @@ -151,5 +155,20 @@ } } } + + .aside-fixed { + position: fixed; + top: 150px; + left: 50%; + transform: translateX(350px); + } + + .aside-absolute { + position: absolute; + right: 0; + bottom: 0; + top: none; + left: none; + } } } \ No newline at end of file diff --git a/assets/scss/contribution.scss b/assets/scss/contribution.scss index 5c488bda2..8d1e3c4d6 100644 --- a/assets/scss/contribution.scss +++ b/assets/scss/contribution.scss @@ -407,18 +407,24 @@ } .section-4 { + position: relative; text-align: center; - background-color: #ffffff; - padding-top: 80px; padding-bottom: 93px; + + & > img { + width: 100%; + height: 445px; + object-fit: cover; + } h2 { height: 52px; + margin-top: -385px; margin-bottom: 60px; text-shadow: 0 4px 8px rgba(35, 45, 65, 0.1); font-size: 32px; font-weight: bold; line-height: 1.63; - color: #171c34; + color: #ffffff; } & > div { @@ -428,7 +434,7 @@ & > div { width: 471px; height: 565px; - background-color: #f5f9fa; + background-color: #ffffff; img { width: 168px; height: 168px; @@ -462,6 +468,9 @@ line-height: 1.33; a { color: #00a971; + &:hover { + color: #008a5c; + } } } } @@ -478,4 +487,37 @@ } } } +} + +.section-5 { + width: 1160px; + margin: 0 auto; + + h2 { + height: 52px; + text-shadow: 0 4px 8px rgba(35, 45, 65, 0.1); + font-family: Roboto; + font-size: 32px; + font-weight: bold; + line-height: 1.63; + text-align: center; + color: #171c34; + } + + ul { + margin-top: 36px; + text-align: center; + font-size: 0; + + li { + display: inline-block; + margin: 0 10px; + + img { + width: 210px; + height: 100px; + object-fit: contain; + } + } + } } \ No newline at end of file diff --git a/assets/scss/footer.scss b/assets/scss/footer.scss index e5cf5c812..86b054c4a 100644 --- a/assets/scss/footer.scss +++ b/assets/scss/footer.scss @@ -39,7 +39,7 @@ width: 209px; height: 20px; font-size: 14px; - margin-left: 17px; + margin-left: 16px; color: #ccd3db; border: none; background-color: #f5f8f9; @@ -61,6 +61,10 @@ } } } + #message { + color: red; + margin-left: 16px; + } } .right-div { width: 720px; @@ -88,7 +92,6 @@ display: block; line-height: 2; color: #919aa3; - font-family: $font-family-id; } } } diff --git a/assets/scss/header.scss b/assets/scss/header.scss index a51bb1f37..7fdfb4955 100644 --- a/assets/scss/header.scss +++ b/assets/scss/header.scss @@ -79,8 +79,8 @@ position: absolute; top: 40px; box-sizing: border-box; - width: 306px; - padding: 12px 30px 18px; + width: 160px; + padding: 12px 0; left: 50%; transform: translateX(-50%); background: #ffffff; @@ -90,9 +90,7 @@ box-shadow: 0 4px 8px 0 rgba(36,46,66,.06),0 8px 16px 0 rgba(36,46,66,.05); li { - display: inline-block; - width: 100px; - padding-left: 20px; + padding: 0 20px; height: 32px; line-height: 32px; font-size: 12px; @@ -108,26 +106,23 @@ } - li:nth-child(2n) { - margin-left: 6px; - } - .active { + border-left: 2px solid #55bc8a; a { color: #55bc8a; } } - &::after { - position: absolute; - top: -20px; - left: 50%; - transform: translateX(-50%); - content: ""; - width: 0; - height: 0; - border: 10px solid transparent; - border-bottom-color: #fff; - } + // &::after { + // position: absolute; + // top: -20px; + // left: 50%; + // transform: translateX(-50%); + // content: ""; + // width: 0; + // height: 0; + // border: 10px solid transparent; + // border-bottom-color: #fff; + // } } .right-menu { @@ -165,6 +160,7 @@ .dropdown-menu { color: black; width: 120px; + padding-left: 20px; li { padding: 0; margin: 0; diff --git a/assets/scss/index.scss b/assets/scss/index.scss index 8fae28062..88f2e41e9 100644 --- a/assets/scss/index.scss +++ b/assets/scss/index.scss @@ -15,6 +15,7 @@ section { position: absolute; top: 0; right: 0; + height: 431px; } & > .img2 { @@ -52,7 +53,7 @@ section { } h1 { - width: 668px; + width: 660px; height: 120px; margin-top: 12px; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); @@ -64,7 +65,7 @@ section { } .p2 { - width: 668px; + width: 660px; height: 72px; margin-top: 12px; margin-bottom: 30px; @@ -93,8 +94,7 @@ section { width: 211px; color: #ffffff; box-shadow: 0 10px 50px 0 rgba(34, 43, 62, 0.1), 0 8px 16px 0 rgba(33, 43, 61, 0.2), 0 10px 50px 0 rgba(76, 169, 134, 0.05); - background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.1) 97%), linear-gradient(to bottom, #000000, #000000); - + background-image: linear-gradient(to bottom,rgba(0,0,0,0),rgba(0,0,0,0.1) 97%),linear-gradient(to bottom,#242e42,#242e42); } .btn2 { @@ -113,14 +113,16 @@ section { top: 231px; right: 0; z-index: 2; - width: 480px; - height: 297px; + width: 460px; object-fit: contain; + border: 6px solid #ffffff; + border-radius: 3px; + box-shadow: 0 10px 20px 0 rgba(34, 43, 62, 0.1), 0 8px 16px 0 rgba(33, 43, 61, 0.2), 0 10px 30px 0 rgba(34, 43, 62, 0.1); } .img2 { - top: 507px; - right: 454px; + top: 470px; + right: 445px; } .img4 { @@ -221,7 +223,7 @@ section { width: 964px; margin: 16px auto 50px; font-size: 16px; - line-height: 1.5; + line-height: 2; color: #919aa3; } @@ -310,6 +312,7 @@ section { font-size: 16px; color: #36435c; margin-bottom: 20px; + line-height: 1.4; } li::before { @@ -327,6 +330,7 @@ section { & > img { position: absolute; + max-width: 365px; bottom: -50px; right: -16px; } @@ -504,6 +508,10 @@ section { font-weight: 600; line-height: 1.71; color: #00a971; + + &:hover { + color: #008a5c; + } } } @@ -680,7 +688,6 @@ section { .section-6 { position: relative; box-sizing: border-box; - height: 1100px; margin-top: -300px; padding-top: 300px; background-color: #f5f8f9; @@ -777,11 +784,57 @@ section { } } + & > .join-div { + display: block; + position: relative; + box-sizing: border-box; + margin-top: 90px; + height: 110px; + padding: 25px 266px 0 55px; + text-align: left; + border-radius: 12px; + background-color: #ffffff; + box-shadow: 0 4px 8px 0 rgba(36, 46, 66, 0.06), 0 8px 16px 0 rgba(36, 46, 66, 0.05); + + &:hover { + background-image: linear-gradient(99deg, #4a499a 29%, #8552c3 80%); + + .p1, .p2 { + color: #ffffff; + } + } + + .p1 { + height: 24px; + font-size: 20px; + color: #30313b; + } + + .p2 { + height: 32px; + margin-top: 4px; + opacity: 0.8; + font-size: 16px; + line-height: 2; + color: #919aa3; + } + + & > img { + position: absolute; + bottom: 0; + right: 45px; + } + } + .bottom-img { width: 639px; height: 72px; - margin-top: 107px; + margin-top: 95px; object-fit: contain; } } +} + +footer { + background: #ffffff; } \ No newline at end of file diff --git a/assets/scss/markdown.scss b/assets/scss/markdown.scss index 93951c042..ce694ec66 100644 --- a/assets/scss/markdown.scss +++ b/assets/scss/markdown.scss @@ -2,7 +2,6 @@ $mobile-max-width: 768px; .md-body { - font-family: $font-family-id; font-size: 16px; line-height: 2; word-wrap: break-word; diff --git a/assets/scss/open-source.scss b/assets/scss/open-source.scss index e2536134d..b6b9c100e 100644 --- a/assets/scss/open-source.scss +++ b/assets/scss/open-source.scss @@ -1,22 +1,44 @@ .open-source-header { text-align: center; - margin-top: 93px; + height: 300px; + color: #ffffff; + + & > img { + width: 100%; + height: 100%; + object-fit:cover; + } + + & > div { + position: absolute; + top: 129px; + left: 0; + right: 0; + text-align: center; + } + h1 { - margin-bottom: 20px; + height: 40px; + text-shadow: 0 2px 6px rgba(0, 0, 0, 0.15); font-size: 40px; - font-weight: 600; - line-height: 1.4; - text-shadow: 0 8px 16px rgba(35,45,65,.16); - color: #36435c; + font-weight: bold; + line-height: 1; + letter-spacing: -0.11px; + color: #ffffff; } + p { - max-width: 760px; - margin: 0 auto 30px; - font-size: 14px; - line-height: 2.29; - text-shadow: 0 8px 16px rgba(35,45,65,.16); - color: #36435c; + height: 24px; + margin-top: 12px; + margin-bottom: 16px; + text-shadow: 0 2px 6px rgba(0, 0, 0, 0.15); + font-size: 16px; + line-height: 1.5; + letter-spacing: -0.04px; + text-align: center; + color: #ffffff; } + button { height: 48px; border-radius: 30px; @@ -44,41 +66,44 @@ vertical-align: text-top; } } - ul { - margin-top: 77px; - li { - position: relative; - display: inline-block; - margin-bottom: 32px; - font-size: 16px; - font-weight: 600; - color: #36435c; - cursor: pointer; - } - li + li { - margin-left: 40px; - } - a { - color: rgb(48, 62, 90); - &:hover { - color: #4ca986; - } - } - .active { - color: #4ca986; - &::after { - position: absolute; - bottom: -32px; - left: 50%; - -webkit-transform: translateX(-50%); - transform: translateX(-50%); - content: ""; - width: 0; - height: 0; - border: 1em solid transparent; - border-bottom-color: #fff; - } - } +} +.open-source-tab { + width: 1160px; + margin: 40px auto 0; + text-align: center; + li { + position: relative; + display: inline-block; + margin-bottom: 32px; + font-size: 16px; + font-weight: 600; + color: #36435c; + cursor: pointer; } + li + li { + margin-left: 40px; + } + a { + color: rgb(48, 62, 90); + &:hover { + color: #4ca986; + } + } + .active { + color: #4ca986; + &::after { + position: absolute; + bottom: -32px; + left: 50%; + -webkit-transform: translateX(-50%); + transform: translateX(-50%); + content: ""; + width: 0; + height: 0; + border: 1em solid transparent; + border-bottom-color: #fff; + } + } + } \ No newline at end of file diff --git a/assets/scss/partner.scss b/assets/scss/partner.scss index 4272dcda6..b53becdfd 100644 --- a/assets/scss/partner.scss +++ b/assets/scss/partner.scss @@ -38,14 +38,24 @@ } .section-2 { + position: relative; + & > img { + width: 152px; + position: absolute; + right: 50%; + bottom: -40px; + transform: translateX(-490px); + } & > div { display: flex; position: relative; + z-index: 2; top: -40px; width: 1160px; margin: 0 auto; box-shadow: 0 4px 8px 0 rgba(36, 46, 66, 0.06); .left-div { + position: relative; width: 470px; height: 298px; border-radius: 10px 0 0 10px; @@ -62,6 +72,16 @@ height: 160px; margin-left: 40px; } + .img-1 { + position: absolute; + top: 0; + left: 0; + } + .img-2 { + position: absolute; + bottom: 0; + right: 0; + } } .right-div { position: relative; @@ -70,7 +90,7 @@ border-radius: 0 10px 10px 0; background-color: #3d3e49; - img { + & > img { margin-top: 107px; margin-left: 45px; } @@ -86,6 +106,45 @@ border-radius: 100px; box-shadow: 0 2px 8px 0 rgba(250, 164, 66, 0.5); background-image: linear-gradient(107deg, #fdba39 20%, #f2635e 99%); + cursor: pointer; + + &:hover { + & > div { + display: block; + } + } + + div { + display: none; + position: absolute; + top: -60px; + left: 50%; + width: 140px; + height: 50px; + transform: translateX(-50%); + border-radius: 10px; + background: #ffffff; + + img { + width: 95px; + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + } + + &::after { + content: ''; + width: 0; + height: 0; + position: absolute; + border: 4px solid transparent; + border-top-color: #ffffff; + bottom: -8px; + left: 50%; + transform: translateX(-50%); + } + } } .div-1 { @@ -139,6 +198,7 @@ } p { + height: 128px; margin-left: 40px; margin-right: 40px; @include common-p-style; @@ -169,21 +229,16 @@ } ul { - @include common-flex-style; margin-top: 20px; + font-size: 0; - .intro { - background-image: radial-gradient(circle at -23% -21%, #cdf6d5, #089566 75%); - - p { - margin: 40px 30px; - font-size: 14px; - line-height: 1.71; - color: #ffffff; - } + li:nth-child(4n + 1) { + margin-left: 0; } li { + display: inline-block; + margin-left: 20px; position: relative; width: 274px; height: 200px; @@ -193,7 +248,7 @@ background-color: #ffffff; &:hover { - div { + .content { display: block; } } @@ -205,8 +260,7 @@ object-fit: contain; } - div { - display: none; + .type { position: absolute; top: 10px; right: 0; @@ -221,6 +275,20 @@ box-shadow: 0 2px 8px 0 rgba(250, 164, 66, 0.5); background-image: linear-gradient(108deg, #fdba39 20%, #f2635e 99%); } + + .content { + display: none; + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + padding: 40px 30px; + background-image: radial-gradient(circle at -23% -21%, #cdf6d5, #089566 75%); + font-size: 14px; + line-height: 1.71; + color: #ffffff; + } } } } diff --git a/assets/scss/service-mesh.scss b/assets/scss/service-mesh.scss new file mode 100644 index 000000000..cf2b2e6a9 --- /dev/null +++ b/assets/scss/service-mesh.scss @@ -0,0 +1,175 @@ +@import 'variables'; +@import 'mixin'; + +html { + background-color: #ffffff; +} + +.section-1 { + position: relative; + height: 350px; + min-width: 1160px; + + img { + width: 100%; + height: 100%; + object-fit:cover; + } + + .title-div { + position: absolute; + width: 1160px; + top: 129px; + left: 50%; + transform: translateX(-50%); + + h1 { + width: 1060px; + font-size: 40px; + text-shadow: 0 2px 6px rgba(0, 0, 0, 0.15); + line-height: 1; + letter-spacing: -0.11px; + color: #ffffff; + } + + p { + width: 1060px; + margin-top: 25px; + font-size: 16px; + line-height: 1.5; + letter-spacing: -0.04px; + color: #ffffff; + text-shadow: 0 2px 6px rgba(0, 0, 0, 0.15); + } + } +} + +.section-2 { + background-color: #f5f8f9; + padding-top: 60px; + & > div { + position: relative; + width: 1160px; + margin: 0 auto; + + h2 { + width: 760px; + margin: 0 auto 45px; + text-align: center; + } + + & > ul { + & > li:nth-child(2n) { + flex-direction: row-reverse; + } + & > li { + @include common-flex-style; + align-items: center; + margin-bottom: 20px; + + & > div { + width: 460px; + + h3 { + font-size: 24px; + line-height: 1; + color: #3d3e49; + } + + p { + margin-top: 24px; + opacity: 0.9; + font-size: 16px; + line-height: 1.5; + color: #3d3e49; + } + + li { + position: relative; + margin-top: 25px; + padding-left: 14px; + font-size: 16px; + color: #36435c; + + &::before { + content: ''; + position: absolute; + display: block; + width: 6px; + height: 6px; + top: 5px; + left: 0; + border-radius: 50%; + background-color: #00a971; + } + + span { + font-weight: 600; + } + } + } + + img { + width: 660px; + } + } + } + } +} + +.section-3 { + position: relative; + padding-top: 80px; + text-align: center; + overflow: hidden; + + .bg-left { + position: absolute; + top: 242px; + right: 50%; + transform: translateX(-200px); + } + + .bg-right { + position: absolute; + top: 200px; + left: 50%; + transform: translateX(180px); + } + + & > div { + position: relative; + width: 1160px; + margin: 0 auto; + img { + width: 955px; + margin-top: 40px; + } + + p { + margin-top: 56px; + font-size: 16px; + line-height: 1.5; + letter-spacing: -0.04px; + color: #31383e; + } + + button { + width: 263px; + height: 56px; + margin-top: 20px; + letter-spacing: -0.04px; + color: #ffffff; + font-size: 16px; + border-radius: 28px; + cursor: pointer; + box-shadow: 0 10px 50px 0 rgba(34, 43, 62, 0.1), 0 8px 16px 0 rgba(33, 43, 61, 0.2), 0 10px 50px 0 rgba(34, 43, 62, 0.1); + background-image: linear-gradient(to bottom, rgba(85, 188, 138, 0), rgba(85, 188, 138, 0.1) 97%), linear-gradient(to bottom, #55bc8a, #55bc8a); + + &:hover { + box-shadow: none; + } + } + } + +} \ No newline at end of file diff --git a/assets/scss/variables.scss b/assets/scss/variables.scss index d82120fcd..ff1098461 100644 --- a/assets/scss/variables.scss +++ b/assets/scss/variables.scss @@ -1,4 +1,5 @@ $font-family: 'PingFang SC', 'Lantinghei SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', 微软雅黑, STHeitiSC-Light, simsun, 宋体, 'WenQuanYi Zen Hei', 'WenQuanYi Micro Hei', sans-serif; -$font-family-id: Roboto, $font-family; \ No newline at end of file +$font-family-1: Roboto, $font-family; +$font-family-2: Proxima Nova, $font-family; \ No newline at end of file diff --git a/assets/scss/videos.scss b/assets/scss/videos.scss index 18b55ad66..63b92fbfa 100644 --- a/assets/scss/videos.scss +++ b/assets/scss/videos.scss @@ -1 +1,184 @@ -@import 'open-source'; \ No newline at end of file +@import 'open-source'; + +.section-1 { + background-color: #fff; + padding-top: 60px; + padding-bottom: 100px; + + & > div { + width: 1160px; + margin: 0 auto; + + & > .video-tab-ul { + padding: 30px 34px 22px; + border-radius: 5px; + box-shadow: 0 4px 16px 0 rgba(7,42,68,.1); + background-color: #fff; + + li { + display: inline-block; + min-width: 48px; + padding: 8px 16px; + margin-bottom: 8px; + border-radius: 20px; + -webkit-transition: all .2s ease-in-out; + transition: all .2s ease-in-out; + cursor: pointer; + font-size: 16px; + font-weight: 500; + line-height: 1.5; + text-align: center; + + &:hover { + box-shadow: 0 8px 16px 0 rgba(101,193,148,.2),0 0 50px 0 rgba(101,193,148,.1); + background-color: #55bc8a; + color: #fff; + } + } + .active { + box-shadow: 0 8px 16px 0 rgba(101,193,148,.2),0 0 50px 0 rgba(101,193,148,.1); + background-color: #55bc8a; + color: #fff; + } + + li + li { + margin-left: 12px; + } + } + + .video-ul { + margin-top: 20px; + font-size: 0; + + & > li { + position: relative; + display: inline-block; + width: 360px; + height: 202px; + border-radius: 4px; + margin-bottom: 40px; + margin-right: 40px; + background-color: #eef4f8; + background-image: url('/images/videos/video-bg.svg'); + overflow: hidden; + cursor: pointer; + + & > img { + width: 100%; + height: 100%; + } + + &:hover { + & > div { + height: 202px; + } + } + + & > div { + position: absolute; + left: 0; + right: 0; + bottom: 0; + height: 70px; + opacity: 0.89; + background-color: #171c34; + transition: all .2s ease-in-out; + overflow: hidden; + + & > .btn { + position: absolute; + left: 50%; + bottom: 120px; + transform: translateX(-50%); + } + + & > div { + position: absolute; + left: 0; + right: 0; + bottom: 0; + height: 70px; + padding: 0 16px; + + h3 { + font-size: 16px; + font-weight: 500; + line-height: 22px; + color: #fff; + padding: 8px 0; + margin-bottom: 6px; + border-bottom: 1px solid hsla(0,0%,100%,.1); + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + } + + p { + font-size: 14px; + line-height: 20px; + color: #919aa3; + } + + .time { + position: absolute; + right: 16px; + bottom: 6px; + } + } + } + } + + li:nth-child(3n) { + margin-right: 0; + } + } + + & > div { + margin-top: 20px; + text-align: center; + + li { + display: inline-block; + margin: 0 10px; + } + + .disabled { + a { + color: #ccd3db; + } + } + + .active { + a { + color: #55bc8a; + } + } + } + } +} + +.jquery-modal { + z-index: 10; + background-color: rgba(23, 28, 52, 0.5); +} + +#modal-for-video { + width: 750px; + max-width: 750px; + height: 420px; + padding: 0; + border-radius: 0; + + video { + width: 100%; + height: 100%; + min-height: 420px; + background-color: #171c34; + outline: none; + } + + a { + top: -40px; + right: 0; + } +} \ No newline at end of file diff --git a/config.toml b/config/_default/config.toml similarity index 83% rename from config.toml rename to config/_default/config.toml index f1e1b6f0b..6acd6defe 100644 --- a/config.toml +++ b/config/_default/config.toml @@ -9,6 +9,7 @@ baseURL = "https://hugo-first.netlify.app" [params] logo = "images/logo.svg" +mailchimpSubscribeUrl = "https://gmail.us18.list-manage.com/subscribe/post?u=553ce463e00897cc36ed80866&id=f4b5009074" [languages.en] contentDir = "content/en" @@ -26,53 +27,23 @@ weight = 2 name = "Scenario" hasChildren = true - [[languages.en.menu.main]] - parent = "Scenario" - name = "Multi-cluster" - URL = "multi-cluster" - weight = 1 - [[languages.en.menu.main]] parent = "Scenario" name = "DevOps" - URL = "devOps" - weight = 2 - - [[languages.en.menu.main]] - parent = "Scenario" - name = "Network" - URL = "network" - weight = 3 + URL = "dev-ops" + weight = 1 [[languages.en.menu.main]] parent = "Scenario" name = "Service Mesh" URL = "service-mesh" - weight = 4 - - [[languages.en.menu.main]] - parent = "Scenario" - name = "Storage" - URL = "storage" - weight = 5 - - [[languages.en.menu.main]] - parent = "Scenario" - name = "AppStore" - URL = "app-store" - weight = 6 - - [[languages.en.menu.main]] - parent = "Scenario" - name = "Multi-tenancy" - URL = "multi-tenancy" - weight = 7 + weight = 2 [[languages.en.menu.main]] parent = "Scenario" name = "Observability" URL = "observability" - weight = 8 + weight = 3 [[languages.en.menu.main]] weight = 3 @@ -146,12 +117,6 @@ weight = 2 name = "Scenario" hasChildren = true - [[languages.zh.menu.main]] - parent = "Scenario" - name = "Multi-cluster" - URL = "multi-cluster" - weight = 1 - [[languages.zh.menu.main]] parent = "Scenario" name = "DevOps" @@ -160,34 +125,10 @@ hasChildren = true [[languages.zh.menu.main]] parent = "Scenario" - name = "Network" - URL = "network" - weight = 3 - - [[languages.en.menu.main]] - parent = "Scenario" name = "Service Mesh" URL = "service-mesh" weight = 4 - [[languages.en.menu.main]] - parent = "Scenario" - name = "Storage" - URL = "storage" - weight = 5 - - [[languages.zh.menu.main]] - parent = "Scenario" - name = "AppStore" - URL = "app-store" - weight = 6 - - [[languages.zh.menu.main]] - parent = "Scenario" - name = "Multi-tenancy" - URL = "multi-tenancy" - weight = 7 - [[languages.zh.menu.main]] parent = "Scenario" name = "Observability" diff --git a/config/upstream/config.toml b/config/upstream/config.toml new file mode 100644 index 000000000..393a12122 --- /dev/null +++ b/config/upstream/config.toml @@ -0,0 +1,4 @@ +baseURL = "https://dev.kubesphere.io/" + +[params] +mailchimpSubscribeUrl = "" diff --git a/content/en/_index.md b/content/en/_index.md index f04a56993..972b185c1 100644 --- a/content/en/_index.md +++ b/content/en/_index.md @@ -7,36 +7,36 @@ css: scss/index.scss section1: title: KubeSphere Container Platform - topic: The Kubernetes Platform, tailored for the hybrid cloud - content: KubeSphere is a distributed operating system providing cloud native stack with Kubernetes as its kernel, and aims to be plug-and-play architecture for third-party applications seamless integration to boost its ecosystem. + topic: The Kubernetes platform tailored for hybrid multicloud + content: KubeSphere is a distributed operating system managing cloud native applications with Kubernetes as its kernel, and provides plug-and-play architecture for the seamless integration of third-party applications to boost its ecosystem. btnContent1: Install on Kubernetes btnContent2: Install on Linux section2: - title: One Platform for full-stack solutions - content: KubeSphere is also a multi-tenant enterprise-grade container platform with full-stack automated IT operation and streamlined DevOps workflows. It provides developer-friendly wizard web UI, helping enterprises to build out a more robust and feature-rich platform, which includes most common functionalities needed for enterprise Kubernetes strategy., + title: One Platform for Full Stack Solutions + content: KubeSphere is also a multi-tenant enterprise-grade container platform with full-stack automated IT operation and streamlined DevOps workflows. It provides developer-friendly wizard web UI, helping enterprises to build out a more robust and feature-rich platform, which includes the most common functionalities needed for enterprise Kubernetes strategies. children: - name: Open Source icon: /images/home/open-source.svg - content: A CNCF certified Kubernetes platform, 100% open source, built and improved by the community + content: A CNCF-certified Kubernetes platform, 100% open source, built and improved by the community. - name: Easy to Run icon: /images/home/easy-to-run.svg - content: Can be deployed on a Kubernetes cluster or Linux machines, supports online and air-gapped installation + content: Can be deployed on an existing Kubernetes cluster or Linux machines, supports online and air-gapped installation. - - name: Feature-rich + - name: Rich Features icon: /images/home/feature-rich.svg - content: Delivers DevOps, service mesh, observability, application management, multi-tenancy, storage and networking management in an unified platform + content: Deliver DevOps, service mesh, observability, application management, multi-tenancy, storage and networking management in a unified platform. - name: Modular & Pluggable icon: /images/home/modular-pluggable.svg - content: These functionalities are loosely coupled with the platform since they are pluggable and optional. Other tools are easy to integrate and play + content: The functionalities are modularized and loosely coupled with the platform. Choose the modules according to your business needs. section3: - title: Benefits to different teams - content: Multi-tenancy makes different teams to securely deploy and maintain containerized applications from the cloud to the edge. It allows developers to deploy code via several clicks on intuitive console, brings centralized observability and powerful DevOps strategy for Ops team, helps Infra team to install and maintain Kubernetes cluster with flexible network and solution solutions, avoid locking team in to a single vendor eco-system. + title: Benefits to Different Teams + content: Multi-tenancy enables different teams to securely deploy and maintain containerized applications from the cloud to the edge. It allows developers to deploy code with several clicks on the friendly console, and brings integrated observability and powerful DevOps strategies for the Ops team. It also helps the Infra team to install and maintain Kubernetes cluster with efficient, flexible network solutions which avoids locking teams into a single-vendor ecosystem. children: - name: Infra Team content: Automated installation, scaling, and upgrades from cloud to data center @@ -44,83 +44,92 @@ section3: children: - content: Improve your environment utilization and reduce internal infrastructure costs - content: Support multi-cluster and multi-cloud Kubernetes management, avoiding vendor lock-in - - content: Provides security enhancements, supports multiple storage and network solutions - - content: Fully trusted, delivers a certified Kubernetes platform and distribution + - content: Provide security enhancements, and support multiple storage and network solutions + - content: Deliver a trustworthy and certified Kubernetes platform and distribution - name: Developers - content: Focus on your bussiness, others are run in automated tools + content: Focus on your business as automation tools do the rest icon: /images/home/74.png children: - - content: Smooth user experience, reduce the learning curve of the cloud native stack + - content: Create smooth user experience and reduce the learning curve of the cloud native stack - content: Provide toolkits and deployment automation tailored to any application environment - - content: Out-of-box logging, monitoring and multi-tenancy, improving development efficiency + - content: Offer out-of-box logging, monitoring and multi-tenancy functions, improving development efficiency - content: Support application lifecycle management, accelerating time to market - name: Ops Team - content: Building one-stop enterprise-grade DevOps framework + content: Build a one-stop enterprise-grade DevOps framework icon: /images/home/71.svg children: - - content: Centralized log collection, monitoring and alerting from infrastructure to applications. - - content: Streamlined continuous deploy, test, release, upgrade and scale - - content: Better track, route and optimize communications within Kubernetes for cloud native apps - - content: Easy-to-use web terminal and graphical panel, satisfying the habits of different users + - content: Centralized log collection, monitoring and alerting from infrastructure to applications + - content: Streamlined process of continuous deployment, test, release, upgrade and scaling + - content: Better tracking, routing and optimized communications within Kubernetes for cloud native apps + - content: Easy-to-use web terminal and graphical panel, satisfying the needs of different users + + - name: User + content: Running and using Apps on Kubernetes has never been so easy + icon: /images/home/80.svg + children: + - content: Deploy and upgrade Apps with one click to transparent underlying infrastructure + - content: Provide on-demand container resources and HPA, hardening the reliabity and flexibility of your applications + - content: Import any Helm repository in seconds to visually deploy and upgrade applications + - content: Support operation in application store, including metering and billing for applications (coming soon) section4: title: Key Features - content: If you want to use an open source project, but act like a commercial product, KubeSphere is your choice.
The Roadmap listed the planning features, you can raise a proposal to submit your ideas with us. + content: If you are seeking an open source project that rivals a commercial product, KubeSphere is your choice.
The Roadmap lists planned features and you can raise a proposal to contribute your ideas to the community. children: - name: Provisioning Kubernetes icon: /images/home/provisioning-kubernetes.svg - content: Deploy Kubernetes on any infrastructure out of box, including online and air-gapped installation, support add GPU node + content: Deploy Kubernetes on any infrastructure out of box, including online and air-gapped installation, and support adding GPU nodes - name: K8s Resource Management icon: /images/home/k-8-s-resource-management.svg - content: Provide web console for creating and managing Kubernetes resources, with powerful observability + content: Provide a web console for creating and managing Kubernetes resources with powerful observability - name: Multi-tenant Management icon: /images/home/multi-tenant-management.svg - content: Provide unified authentication with fine-grained roles and three-tier authorization system, supports AD/LDAP authentication + content: Provide unified authentication with fine-grained roles and three-tier authorization system, and support AD/LDAP authentication features: - name: Application Store icon: /images/home/store.svg - content: Provide application store for Helm-based applications, and offers application lifecycle management + content: Provide an application store for Helm-based applications, and offer application lifecycle management color: grape - name: Service Mesh (Istio-based) icon: /images/home/service.svg - content: Provide fine-grained traffic management, observability and tracing, and offers visualization for traffic topology + content: Provide fine-grained traffic management, observability and tracing, and offer visualization for traffic topology color: red - name: Rich Observability icon: /images/home/rich.svg - content: Multi-dimensional monitoring metrics, multi-tenant log query and collection, support alerting and notification + content: Multi-dimensional monitoring metrics, multi-tenant log query and collection, and alerting and notification support color: green - name: DevOps System icon: /images/home/dev-ops.svg - content: Out-of-box CI/CD based on Jenkins, and offers automated workflow tools including S2I & B2I + content: Out-of-box CI/CD based on Jenkins, and automated workflow tools including S2I & B2I color: orange - name: Multiple Storage Solutions icon: /images/home/multiple.svg - content: Support GlusterFS, CephRBD, NFS, LocalPV solutions, provide CSI plugins to consume storage from multiple cloud providers + content: Support GlusterFS, CephRBD, NFS, LocalPV solutions, and provide CSI plugins to consume storage from multiple cloud providers color: grape - name: Multiple Network Solutions icon: /images/home/network.svg - content: Support Calico and Flannel, provides load balancer plug-in Porter for Kubernetes installed on physical machines + content: Support Calico and Flannel, and provide load balancer plug-in Porter for Kubernetes installed on physical machines color: green - - name: Multi-cluster management + - name: Multi-cluster Management icon: /images/home/management.svg - content: Distribute applications across multiple clusters and cloud providers, and provides the disaster recovery and cross-cluster discovery. + content: Distribute applications across multiple clusters and cloud providers, and provide disaster recovery solutions and cross-cluster discovery color: orange section5: - title: KubeSphere with its cloud native architecture + title: KubeSphere with its Cloud Native Architecture frontEnd: - title: Front end + title: Front End project: KubeSphere Console children: - icon: /images/home/mobx.jpg @@ -128,7 +137,7 @@ section5: - icon: /images/home/react.png backEnd: - title: Back end (REST API) + title: Back End (REST API) project: KubeSphere System group: - name: API Server @@ -138,8 +147,8 @@ section5: section6: - title: Who uses KubeSphere - content: The Case Studies listed more detailed user cases and their cloud native transformation stories.
Various enterprises and organizations use KubeSphere Container Platform for research, production and commercial products. + title: Who Uses KubeSphere + content: The Case Studies list more detailed user cases and their cloud native transformation stories.
Tons of enterprises and organizations are using KubeSphere Container Platform for research, production and their commercial products. children: - icon: /images/home/section6-1.jpg - icon: /images/home/section6-2.jpg @@ -155,5 +164,8 @@ section6: btnLink: link: linkContent: Want your logo up there? Just submit a pull request → + joinTitle: Join the Revolution, Partner with KubeSphere + joinContent: We look forward to your joining KubeSphere partner program to improve both ecosystems and grow your business. + joinLink: image: /images/home/certification.jpg --- \ No newline at end of file diff --git a/content/en/blogs/_index.md b/content/en/blogs/_index.md index 3ff9eee83..d4552ac27 100644 --- a/content/en/blogs/_index.md +++ b/content/en/blogs/_index.md @@ -2,4 +2,6 @@ title: blogs css: scss/blogs.scss + +tip: ALL --- \ No newline at end of file diff --git a/content/en/blogs/monitoring-k8s-control-plane.md b/content/en/blogs/monitoring-k8s-control-plane.md new file mode 100644 index 000000000..cc9d0e18d --- /dev/null +++ b/content/en/blogs/monitoring-k8s-control-plane.md @@ -0,0 +1,115 @@ +--- +title: 'Monitoring Kubernetes Control Plane using KubeSphere' +tag: 'kubernetes, monitoring' +createTime: '2020-03-28' +author: 'Feynman, Guangzhe' +snapshot: 'https://pek3b.qingstor.com/kubesphere-docs/png/20200328170549.png' +--- + +## Introduction to Kubernetes Control Plane + +In a Kubernetes cluster, there are two machines roles including master nodes and worker nodes. The master node runs the Kubernetes control plane, which is responsible for the management of the worker nodes, makes scheduling decisions, and implements changes to drive the cluster to a desired state. The worker nodes, as the name implies, they run the workloads and Pod on them. + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20200328170549.png) + +As is shown in the graph, there are four components running in the Kubernetes control plane, each of them is critical for running a healthy Kubernetes cluster, they act as the different roles within the cluster: + +- **kube-apiserver**: a component of the Kubernetes control plane that exposes the Kubernetes API. The API server is the front end for the Kubernetes control plane. +- **etcd**: Consistent and highly-available key value store used as Kubernetes’ backing store for all cluster data. +- **kube-scheduler**: watches for newly created Pods with no assigned node, and selects a node for them to run on. +- **kube-controller-manager**: watches the state of the cluster through API server watch feature and makes changes to move cluster towards the desired state. + +## Why Monitoring Control Plane + +To keep high reliability of the Kubernetes cluster, monitoring the components of the control plane allows cluster administrator to more rapidly diagnose the scheduling and orchestration issues that occur in the cluster. Thus, we need to collect the metrics of control plane to visualize the real-time data, and digs deeper into the state and performance of each control plane component. + +## Tools to Control Plane Monitoring + +There is no denying that Prometheus a leading open-source monitoring solution. Plus Grafana dashboard, it could be a perfect tools combination solution to monitor the Kubernetes control plane component. But both of them are a little bit complicated to quickly set up and collect the target metrics into a unified monitoring dashboard. + +Fortunately, [KubeSphere](https://github.com/kubesphere/kubesphere) leverages those tools including Prometheus, Kube-state-metrics Node-exporter, ServiceMonitor, as well as the predefined rules in PrometheusRule, **providing the monitoring metrics from application to infrastructure out of box**. + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20200328183733.png) + +## Metrics in KubeSphere + +To effectively monitor the control plane components, visibility of each component health and state is critical. You can install KubeSphere to easily get the whole insight of the control plane components monitoring, and displays the time-series data. + +### Key metrics of API Server + +- `apiserver_request_by_verb_latencies`(ms): Response latency distribution in microseconds for each verb, resource and subresource. +- `apiserver_request_rate` (times/s): Rate of apiserver requests + +![Kubernetes API Server Monitoring](https://pek3b.qingstor.com/kubesphere-docs/png/20200328194749.png) + +### Key metrics of Etcd + +- `has_leader`: Whether or not a leader exists. +- `etcd_mvcc_db_size` (MiB): Total size of the underlying database in bytes. +- `client_grpc_sent/received_bytes_total` (MB/s): Including the total number of bytes sent and received to grpc clients. +- `etcd_grpc_server_msg_sent/received_rate`: Total number of gRPC stream messages received on and sent by the server. +- `etcd_disk_wal_fsync_duration (ms)`: The latency distributions of fsync called by wal. +- `etcd_disk_backend_commit_duration` (ms): Describe your disk write performance. +- `Raft Proposals` (times/s): The raft protocol ensures that the proposals are applied correctly to the cluster, including metrics as follows: + - `etcd_server_proposals_committed_total` + - `etcd_server_proposals_applied_total` + - `etcd_server_proposals_pending` + - `etcd_server_proposals_failed_total` + +![Etcd Monitoring Metrics](https://pek3b.qingstor.com/kubesphere-docs/png/20200328194859.png) + +### Key metrics of kube-scheduler + +- `scheduler_schedule_attempts`: Difference of the number of attempts to schedule pods, by the result. unschedulable means a pod could not be scheduled, while error means an internal scheduler problem. +- `scheduler_schedule_attempt_rate`: Rate of the number of attempts to schedule pods, by the result. unschedulable means a pod could not be scheduled, while error means an internal scheduler problem. +- `scheduler_e2e_scheduling_latency`: The end-to-end scheduling latency, which is the sum of the scheduling algorithm latency and the binding latency. + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20200328195139.png) + +## How to Install KubeSphere + +[KubeSphere](https://github.com/kubesphere/kubesphere) is a distributed operating system providing cloud native stack with Kubernetes as its kernel, and offers rich observability from application to infrastructure. KubeSphere supports installing on cloud-hosted and on-premises Kubernetes cluster, or [installing on Linux machines](https://kubesphere.io/docs/installation/intro/). This guide only walk you through the installation on existing Kubernetes cluster. + +### Prerequisites + +- `Kubernetes version`: `1.15.x, 1.16.x, 1.17.x` +- `Helm version` >= `2.10.0` and < `3.0`,see [Install and Configure Helm in Kubernetes](https://devopscube.com/install-configure-helm-kubernetes/); KubeSphere 3.0 will support Helm 3.0. +- A default Storage Class in your Kubernetes cluster is configured; use `kubectl get sc` to verify it. +- Available resource CPU >= 1 Core and memory >= 2G +- The CSR signing feature is activated in kube-apiserver, see [RKE installation issue](https://github.com/kubesphere/kubesphere/issues/1925#issuecomment-591698309). + +## Deploy KubeSphere + +> No internet access? Refer to [Air-gapped Installation](https://kubesphere.io/docs/installation/install-on-k8s-airgapped/) for instructions on how to use your own private registry to install KubeSphere. + +Install KubeSphere using kubectl, assuming your cluster has internet access. + +- If there are 1 Core and 2 GB RAM available in your cluster, use the command below to trigger a default minimal installation only: + +```bash +kubectl apply -f https://raw.githubusercontent.com/kubesphere/ks-installer/master/kubesphere-minimal.yaml +``` + +- If there are 8 Cores and 16 GB RAM available in your cluster, use the command below to install a complete KubeSphere, i.e. with all components enabled: + +```bash +kubectl apply -f https://raw.githubusercontent.com/kubesphere/ks-installer/master/kubesphere-complete-setup.yaml +``` + +Verify the real-time logs. When you see the following outputs, congratulation! You can access KubeSphere console in your browser now. + +```bash +$ kubectl logs -n kubesphere-system $(kubectl get pod -n kubesphere-system -l app=ks-install -o jsonpath='{.items[0].metadata.name}') -f + +##################################################### +### Welcome to KubeSphere! ### +##################################################### +Console: http://10.128.0.34:30880 +Account: admin +Password: P@88w0rd + +NOTE:Please modify the default password after login. +##################################################### +``` + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20200329101752.png) diff --git a/content/en/case/_index.md b/content/en/case/_index.md index f0212e395..d70cf3e6b 100644 --- a/content/en/case/_index.md +++ b/content/en/case/_index.md @@ -10,11 +10,12 @@ section1: section2: tip: Read Case Study → + icon: images/case/left.svg caseList: - icon: "images/case/case1.jpg" content: "KubeSphere is trusted by various enterprises and organizations to the innovators driving the future of software." - link: "" + link: "benlai" - icon: "images/case/case2.jpg" content: "KubeSphere is trusted by various enterprises and organizations to the innovators driving the future @@ -24,7 +25,7 @@ section2: - icon: "images/case/case3.jpg" content: "KubeSphere is trusted by various enterprises and organizations to the innovators driving the future of software." - link: "" + link: "aqara" - icon: "images/case/case4.jpg" content: "KubeSphere is trusted by various enterprises and organizations to the innovators driving the future @@ -44,6 +45,7 @@ section2: section3: title: 'Various Industries are Powered by KubeSphere' tip: ALL + icon: images/common/hexagon.svg caseType: - name: 'Financial' children: @@ -72,4 +74,8 @@ section3: icon: 'images/case/v7.jpg' - name: 'anchnet' icon: 'images/case/v8.jpg' + bottomContent: + content: Want your logo up there? Just + linkContent: submit a pull request, or email you company's logo to us → + link: --- \ No newline at end of file diff --git a/content/en/case/aqara.md b/content/en/case/aqara.md new file mode 100644 index 000000000..671736402 --- /dev/null +++ b/content/en/case/aqara.md @@ -0,0 +1,119 @@ +--- +title: Aqara +description: + +css: scss/case-detail.scss + +section1: + title: Aqara + content: Aqara is owned by Lumi United Technology, headquartered in Shenzhen, China. Currently, we have over 300 Aqara service providers and 300 smart home showrooms across China. Our users include students, families, working professionals and multi-corporations spanning over 158 countries. + +section2: + listLeft: + - title: Company Introduction + contentList: + - content: Five years ago, we set out to create a different kind of smart home solution, one that is reliable, eco-friendly, and available to anyone who wants to improve their homes and simplify their daily lives. We believe that building a smart home should not be complex or cost prohibitive, which is why we have over 200 Aqara R&D team members working tirelessly to make the most innovative and highest quality products we could at an affordable cost. + image: /images/case/aqara-1.jpg + + - title: Background + contentList: + - content: From adopting the traditional approach to operation and maintenance (O&M) to using Docker Swarm, to running microservices of Spring Cloud family on Kubernetes, and finally to embracing KubeSphere, Lumi United has come a long way in its endeavor to build its own IoT platform of microservices based on KubeSphere. It has been running KubeSphere and Kubernetes stably in the production environment for more than half a year. In this regard, Lumi United has acquired considerable expertise in microservice application development and application platform O&M. This article is contributed by Wei Hengjun and Xu Yangbing, both of whom are O&M engineers from Lumi United Technology Co., Ltd. Image assets in the article come from the official website of Aqara (https://www.aqara.com/). + image: + + - title: Traditional Approach to Container Technology + contentList: + - content: As an O&M engineer with multiple years of experience, Wei Hengjun understands the significance of O&M can never be overstated. At the beginning, he shouldered machines himself to the workplace, struggled to use even a cable clamp in his work, and torpidly installed operating systems. Deploying applications and improving services was never an easy job for him as he might suddenly wake up in the middle of a night just for a series of system warns. All of these have made him who he is now, always working just as a great firefighter. + - content: Rapid technological advances have seen us embrace microservices, virtualization, and containerization and cloud native technologies one after another. O&M has also come a long way from manual operation at the beginning to scripts, platforms and now, containers. Initially, O&M only included tens of machines and it has grown to nearly 1,000 machines operated and maintained all by myself. The traditional way of application deployment requires a large amount of time spent in the preparation of configuration files, caution lists and databases every time it is updated. After that, it has to go through a strict review and approval process before it can finally be released. The whole process can take more than half a month. In this Internet era where speed is highly valued, the conventional approach can no longer serve as an efficient solution. Against this backdrop, container technology has emerged to the spotlight of our time. + image: + + - title: 'Docker Swarm: Build a Container Orchestration System' + contentList: + - content: The traditional way of application deployment has haunted managers for so long as the resource utilization remains at a very low level. Against this background, container technology came to my awareness in 2017 and I tried to develop and test environments in my company, which directly resulted in a 50% increase in the resource utilization in the development and test environment. In 2018, we started to use the Docker container orchestration tool, also known as Docker Swarm, in the production environment, which also greatly improved resource utilization. + - content: 'There have been twists and turns along the road from the command line to scripts and ultimately to platforms. When I just joined the Lumi family, I found the O&M process was still at a primitive stage. At that time, all I could do was roll up my sleeves to analyze the condition under great pressure. It turned out to be that more than 80% of the microservice architecture was nearly based on memory with low resource utilization, especially CPU and disk storage. The update timeline was also unsatisfactory. All of these were extremely irritating. I determined to truly make a difference. Starting from continuous integration, I built environments with Jenkins and Harbor. I used Docker Swarm for orchestration in testing environments. Ultimately, my efforts paid off as the delivery speed and quality in the testing environment had been greatly improved. Nevertheless, as our business grew exponentially, we noticed that Docker Swarm has some apparent weaknesses:' + - content: 1. Inefficient cross-platform support; + - content: 2. Internal communications among services will run overtime in the traffic peak period. + image: + + - type: 1 + contentList: + - content: Improved Resource Utilization + - content: Cross-platform Support + - content: Efficient Container Orchestration + + - title: 'A Comprehensive Shift: Docker Swarm to Kubernetes' + contentList: + - content: The time when the three giants dominated the container orchestration field had past as Kubernetes outpaced Docker Swarm and Mesos as the de facto standard in the area. Therefore, we have steered our business from Docker Swarm to Kubernetes in all respects. In fact, we have been thinking about the shift for several years, especially when we need nearly 1,000 machines for O&M. In this connection, an O&M-friendly and unified container cloud platform is necessary for us in terms of the large-scale deployment of cloud native microservice applications based on Kubernetes. + image: + + - title: 'Model Selection: Embrace KubeSphere' + contentList: + - content: For the native installation and O&M of Kubernetes, open source solutions from a third party are still required. After careful consideration, Rancher and KubeSphere appeared to be our possible choices. + - content: KubeSphere is an open source project initiated by QingCloud and co-developed by multiple enterprises. Compared with Rancher, KubeSphere features a neater user interface and a useful wizard for resource creation. With applications as its kernel, KubeSphere focuses more on the management of Kubernetes cluster resources than Rancher. It provides elegant API ports and integrates common components for development and O&M based on Kubernetes, such as Jenkins, Harbor, Promethues and Apache SkyWalking. Besides, it can be deployed in any infrastructure environment. All of these explain why we have selected the KubeSphere container platform without any hesitation. + - content: We have deepened our understanding of different modules in Kubernetes amidst our use of KubeShpere which features great compatibility with multiple cloud platforms and plugins. It has also accelerated our path to put container orchestration of Kubernetes into practice for the production environment. Furthermore, KubeSphere has liberated us from repetitive work facing O&M, reducing the entire cost of application maintenance. It is truly a cutting-edge tool for the O&M team and provides tremendous benefits to Internet companies. + image: + + - type: 2 + content: 'KubeSphere is truly a cutting-edge tool for the O&M team and provides tremendous benefits to Internet companies.' + author: 'Wei Hengjun' + + - title: Deployment Architecture + contentList: + - content: Currently, our company is using 7 servers in Tencent Cloud to build the cluster. + - content: All stateless services are now running in KubeSphere. Besides, we are using Redis, HBase, Flink, Elasticsearch and MySQL in cloud for stateful data storage services. + - content: Our system has been running for over half a year so far without major issues. As a result, we are planning to transfer all stateful and stateless services in the development, testing and production environment of our company to KubeSphere in recent days. + image: + + - title: Design Architecture + contentList: + - content: Let us take a look at the business architecture of Lumi United. Currently nearly all of its overseas services are running on KubeSphere, including Gateway, message sending and pushing, and IFTTT. + - content: As our business is mainly based on Java, we provide microservices on the basis of Spring Cloud, manage configurations with Apollo, a distributed system configuration center, and use Eureka for service registration and discovery. + - content: With Ribbon and Feign, load balancing and service calling is achieved for microservices. At the same time, we use Hystrix thread poop for isolation, circuit breaking, fallback and traffic limit (sentinel). Springcloud-gateway is used for route scheduling and ELK is used for logging solutions. We use Skywalking as the APM tool for Java microservices distributed system. + - content: We use Tencent Cloud for IaaS. Microservices are mainly included in the platform, where most applications are running on KubeSphere. All the sub-devices are linked to Hub devices (Smart Gateway, Smart Socket Gateway, Cameras, etc.) through the Zigbee protocol. Hub devices are connected to our microservice platform through the PRC protocol and the platform provides data for applications (SaaS). Reversely, applications can call the microservice platform through security authentication, which is how smart home devices are controlled. At the service level, we have plugins for tracing analysis, basic monitoring and CI/CD. + - content: KubeSphere makes it much easier for us to use Kubernetes, accelerating our step in deploying Kubernetes in the production environment. It has significantly improved our efficiency of business update, making it possible for our R&D engineers to quickly switch among different applications for the deployment and authentication of their features. + - content: The IoT microservice platform has been running in our production environment for over half a year so far without major issues. As a result, we are planning to transfer all stateful and stateless services in the development, testing and production environment of our company to KubeSphere in recent days. + image: + + - title: Q&A + contentList: + - content: Do you have any questions as you use KubeSphere? + - content: Yes. For example, the release of packages (War/Jar) in the DevOps pipeline was an issue. In the DevOps pipeline, images needed to be packed to the repository while we also needed a solution for the distribution of old business (War) through Ansible. + - content: I learned that in DevOps, the pod of the correspond template was pulled through jenkins-agent for the whole process. However, we could not get the Jar package as the Maven pod of Java template exited after the execution. + - content: Ultimately, we found that we could find the corresponding template by logging in Jenkins and selecting Manage Jenkins => Configure System. We could set mav package -Dpath=${target_path} in the pipeline and the issue would be solved. + - content: What kind of application development platform can meet the need of the smart home industry going forward? + - content: It should be a platform equipped with comprehensive features of audit, monitoring, logging, alerting and access assignment, offering an elegant strategy for customized resource scaling. Components should also be customized, elegant and pluggable. The platform itself needs to have a self-check strategy for regular issues. Fortunately, KubeSphere supports all of these functions. + - content: What improvements does KubeSphere need to make in functions or designs? + - content: 1. The place to switch the language can be more obvious; + - content: 2. More integration flexibility of Grafana templates; + - content: 3. The Kubernetes node scaling feature can be more simple and it is suggested that it be done in a interface; + - content: 4. "copy from" can be supported in pipeline creation; + - content: 5. Multi-selection can be supported in pipeline running; + - content: 6. Examples can be provided in API documentation; readability can be improved as necessary parameters of many Swagger ports are difficult to understand. + image: + + - title: Postscript + contentList: + - content: We would like to extend our deep gratitude to these two users from Lumi United for sharing their practices of the IoT microservice platform in the smart home industry. This entire journey of Lumi United also represents how some Chinese enterprises work to build their own microservice application platforms. + - content: If you are interested in the details of how Lumi United puts its IoT microservice platform into practice and look for further communications with these two engineers, you are welcome to join the KubeSphere open source community. We will invite them someday in the future for an online technical sharing session based on your needs. Besides, you are also welcome to share your own stories related to the deployment of KubeSphere and Kubernetes in our own environment. + image: + + - title: About KubeSphere + contentList: + - content: KubeSphere is an open source container platform built on Kubernetes with applications as its kernel. It is capable of full stack IT automated operation and maintenance, streamlining the DevOps workflow for enterprises. + - content: Thousands of enterprises across the globe have been using KubeSphere, including Aqara, Benlai, Sina, Maxnerva, WeBank, VNF Corporation and Radore. KubeSphere provides a user-friendly wizard interface for operation and maintenance with abundant enterprise-grade features available, including Kubernetes resource management, DevOps (CI/CD), application lifecycle management, service mesh, multi-tenant management, monitoring and logging, alert and notification, storage and network management and GPU support. All of these can help enterprises quickly build a strong and feature-rich container cloud platform. + image: + + rightPart: + icon: /images/case/aqara-detail.jpg + list: + - title: INDUSTRY + content: Smart Home + - title: LOCATION + content: China + - title: CLOUD TYPE + content: Hybrid + - title: CHALLENGES + content: Availability, Efficiency, Velocity + - title: ADOPTED FEATURES + content: Hosted + +--- \ No newline at end of file diff --git a/content/en/case/benlai.md b/content/en/case/benlai.md new file mode 100644 index 000000000..ff44c888a --- /dev/null +++ b/content/en/case/benlai.md @@ -0,0 +1,102 @@ +--- +title: Benlai +description: + +css: scss/case-detail.scss + +section1: + title: Benlai + content: Founded in 2012, Benlai is an e-commerce website focused on food, including fruits and vegetables. + +section2: + listLeft: + - title: Company Introduction + contentList: + - content: We work closely with select food providers and supply bases. We are committed to improving food safety in China as we strive to provide cold chain delivery services and direct home delivery services from our bases. This is how we work to become a quality food provider in China. + image: /images/case/aqara-1.jpg + + - title: 'Technology Condition: Infrastructure' + contentList: + - content: Deployed in IDC + - content: Over 100 physical machines + - content: Virtualized deployment + image: + + - title: Existing Issues + contentList: + - content: Occupancy rate of physical machines is over 95% + - content: Many idle resources + - content: Application scaling up process is relatively slow + image: + + - title: Embrace DevOps and Kubernetes + contentList: + - content: 'We have three main objectives as we embark on the road of DevOps:' + - content: 1. Improve resource utilization + - content: 2. Enhance release efficiency + - content: 3. Reduce the working cost of O&M + - content: The most important part is cost efficiency. Here is how we work to update our business toward DevOps. + image: + + - type: 1 + contentList: + - content: Improved Resource Utilization + - content: Enhanced Release Efficiency + - content: Reduced Working Costs + + - title: 'Level 1: Model Selection' + contentList: + - content: As we began to learn DevOps, an open-source platform KubeSphere had come to our awareness. KubeSphere is an enterprise-grade container platform built on Kubernetes with applications as its kernel. It supports multiple business scenarios, including agile development and automated O&M, DevOps, microservices governance, grayscale release, multi-tenant management, monitoring and alerting, log query and collection, application store, storage management and network management. + - content: The Jenkins-based DevOps pipeline built in KubeSphere is very appropriate for us to use as it provides all necessary cloud native tools across the whole ecosystem for O&M. + - content: Therefore, we began to create a proper CI/CD process by learning the operation, grammar and plugins related to KubeSphere and Jenkins. With the support of KubeSphere container platform, our level 1 CI/CD process had taken shape. + - content: At Level 1, we successfully achieved some processes, such as code pulling, application programming, pushing images to a local repository and deploying them to a Kubernetes cluster. + image: + + - title: Gaining Expertise + contentList: + - content: With a general CI/CD process in place, we continued to work on the pipeline. For example, we succeeded in the dynamical generation of application information after we studied how to customize a Jenkins pipeline. A large part of the reason why Jenkins becomes a major enterprise-grade CI/CD application is that it features an abundant plugin ecosystem. This has driven us to continue to work on Jenkins plugins, achieving a series of processes in the pipeline, such as FTP uploading, dynamic deployment of ConfigMap with commands and storage deployment. + image: + + - type: 2 + content: 'The Jenkins-based DevOps pipeline built in KubeSphere is very appropriate for us to use as it provides all necessary cloud native tools across the whole ecosystem for O&M.' + author: 'Yang Yang' + + - title: 'Level 2: Improve the Pipeline' + contentList: + - content: We had upgraded our CI/CD process to Level 2 as we learned more about the Jenkinsfile grammar and plugins. We added more elements in the pipeline, such as configuration deployment, storage deployment and CND uploading. + - content: Based on our business, our CI/CD process needs to be divided into varied types for release with different parameters for each type. At the beginning, we tried to use “when” first followed by “Input” to provide different parameters. However, the running order did not come the way we expected. Alternatively, we were aware of another kind of Input grammar to serve as a perfect solution to our issue. + image: + + - title: 'Level 3: Rollback' + contentList: + - content: After our struggle with the dynamic parameter, we had upgraded our CI/CD process to Level 3 where dynamic parameters could be generated for different types of tasks. + - content: For a rollback, the application and ConfigMap must both be included in the rollback while the ConfigMap version controlling feature is not supported in Kubernetes, which poses a great challenge for management. In this connection, we have to acquire the ConfigMap from the configuration center every time an application is released. When a ConfigMap is generated, the version number will be added following its name. This is how we work to perform a rollback for both the application and ConfigMap. + image: + + - title: Standardized Process + contentList: + - content: We have learned from our previous lessons and wondered whether we can standardize the whole process once we have a well-placed CI/CD process. That means all applications can go through the same process before they are released. This serves as a more efficient way than to write the CI/CD process into the pipeline of every application. This is because it will be quite difficult to change the process of various applications once the CI/CD process needs to be modified. + - content: We searched for related information of standardization and finally found Shared Libraries of Jenkins, which helped us to divide the CI/CD process into two parts. Now, we only need to input parameters in the Jenkins pipeline of each application and call the method to execute the process. What’s more, the code of the Jenkins pipeline for each application has decreased from over 500 lines to less than 30 lines. + image: + + - title: 'Level 9: One-click Deployment' + contentList: + - content: Through our unremitting efforts, we have developed great expertise all the way up to Level 9, as the CI/CD process sees a considerable improvement. + - content: For future releases, we only need to select the release type and environment and perhaps a cup of coffee, waiting for the service to be released by KubeSphere all with one click. + image: + + rightPart: + icon: /images/case/aqara-detail.jpg + list: + - title: INDUSTRY + content: Food + - title: LOCATION + content: China + - title: CLOUD TYPE + content: Hybrid + - title: CHALLENGES + content: Resources, Efficiency, Costs + - title: ADOPTED FEATURES + content: Hosted + +--- \ No newline at end of file diff --git a/content/en/contribution/_index.md b/content/en/contribution/_index.md index 6bc5bd4fe..08a406588 100644 --- a/content/en/contribution/_index.md +++ b/content/en/contribution/_index.md @@ -5,7 +5,7 @@ css: "scss/contribution.scss" section1: title: 'Community is the Soul of KubeSphere' - content: 'Join the community to get help, get involved, or to get updates and KubeSphere news!' + content: 'Join the community to get help, get involved, or get updates and KubeSphere news!' topImage: "images/contribution/contribution-top.jpg" section2: @@ -44,7 +44,7 @@ section2: link: '' organization: - topic: 'Community Organization' + topic: 'Community Governance' name: 'KubeSphere Community' icon: 'images/contribution/28.svg' topIcon: 'images/contribution/8.svg' @@ -56,7 +56,7 @@ section2: icon: 'images/contribution/developer-group.svg' children: - name: 'Owner / Lead' - content: 'A lead is also the member of the project who is an experienced and acrive reciewer of the project.' + content: 'A lead is also a member of the project who is an experienced and active reviewer of the project.' - name: 'Member' content: 'A lead is also the member of the project who is an experienced and acrive reciewer of the project.' @@ -80,12 +80,12 @@ section2: section3: interestGroup: title: 'Find Your Special Interest Group' - content: 'SIGs are designed to let you can find everything you need in one place around a central topic. Find your commonality and join the SIG.' + content: 'SIGs are designed to let you find everything you need in one place around a central topic. Find an interesting one and join the SIG.' children: - name: 'Apps' icon: '/images/contribution/apps.svg' iconActive: '/images/contribution/apps-active.svg' - content: 'App charts for the built-in App Store' + content: 'App charts for the built-in Application Store' link: '' linkContent: 'Join SIG - Apps →' children: @@ -93,193 +93,201 @@ section3: - icon: '/images/contribution/calicq2.jpg' - icon: '/images/contribution/calicq3.jpg' - - name: 'App store' + - name: 'Application Store' icon: '/images/contribution/app-store.svg' iconActive: '/images/contribution/app-store-active.svg' - content: '' + content: 'App Store, App template management' link: '' - linkContent: 'Join SIG - App store →' + linkContent: 'Join SIG - Application store →' children: - - icon: '' - - icon: '' - - icon: '' + - icon: '/images/contribution/calicq4.jpg' + - icon: '/images/contribution/calicq5.svg' + - icon: '/images/contribution/calicq6.jpg' - name: 'Architecture' icon: '/images/contribution/architecture.svg' iconActive: '/images/contribution/architecture-active.svg' - content: '' + content: ' System architecture design and investigation' link: '' linkContent: 'Join SIG - Architecture →' children: - - icon: '' + - icon: '/images/contribution/calicq7.jpg' + - icon: '/images/contribution/calicq8.svg' - - name: 'Cloud-Providers' + - name: 'Cloud Providers' icon: '/images/contribution/cloud-providers.svg' iconActive: '/images/contribution/cloud-providers-active.svg' - content: '' + content: 'Support KubeSphere on multi-cloud ' link: '' linkContent: 'Join SIG - Cloud-Providers →' children: - - icon: '' - - icon: '' - - icon: '' + - icon: '/images/contribution/calicq9.jpg' + - icon: '/images/contribution/calicq10.svg' + - icon: '/images/contribution/calicq11.jpg' - name: 'Console (Front-end)' icon: '/images/contribution/console.svg' iconActive: '/images/contribution/console-active.svg' - content: '' + content: 'Web console and framework Devlopment' link: '' linkContent: 'Join SIG - Console (Front-end) →' children: - - icon: '' - - icon: '' - - icon: '' + - icon: '/images/contribution/calicq12.jpg' + - icon: '/images/contribution/calicq13.jpg' + - icon: '/images/contribution/calicq14.jpg' - name: 'DevOps' icon: '/images/contribution/dev-ops.svg' iconActive: '/images/contribution/dev-ops-active.svg' - content: '' + content: 'Pipeline, s2i, b2i, image registry' link: '' linkContent: 'Join SIG - DevOps →' children: - - icon: '' - - icon: '' - - icon: '' + - icon: '/images/contribution/calicq15.jpg' + - icon: '/images/contribution/calicq16.jpg' + - icon: '/images/contribution/calicq17.jpg' - name: ' Docs' icon: '/images/contribution/docs.svg' iconActive: '/images/contribution/docs-active.svg' - content: '' + content: 'Documentation and Website' link: '' linkContent: 'Join SIG - Docs →' children: - - icon: '' - - icon: '' - - icon: '' + - icon: '/images/contribution/calicq8.svg' + - icon: '/images/contribution/calicq7.jpg' + - icon: '/images/contribution/calicq18.svg' - name: 'Edge' icon: '/images/contribution/edge.svg' iconActive: '/images/contribution/edge-active.svg' - content: '' + content: 'Support edge computing platforms such as kubeEdge, K3s etc.' link: '' linkContent: 'Join SIG - Edge →' children: - - icon: '' - - icon: '' - - icon: '' + - icon: '/images/contribution/calicq19.jpg' + - icon: '/images/contribution/calicq20.jpg' - name: 'Installation' icon: '/images/contribution/installation.svg' iconActive: '/images/contribution/installation-active.svg' - content: '' + content: 'KubeSphere installer and deployment' link: '' linkContent: 'Join SIG - Installation →' children: - - icon: '' - - icon: '' - - icon: '' + - icon: '/images/contribution/calicq21.jpg' + - icon: '/images/contribution/calicq7.jpg' + - icon: '/images/contribution/calicq22.jpg' - name: 'Microservice' icon: '/images/contribution/microservice.svg' iconActive: '/images/contribution/microservice-active.svg' - content: '' + content: ' microservice governance and design' link: '' linkContent: 'Join SIG - Microservice →' children: - - icon: '' - - icon: '' - - icon: '' + - icon: '/images/contribution/calicq23.jpg' + - icon: '/images/contribution/calicq24.jpg' + - icon: '/images/contribution/calicq25.jpg' - - name: 'Multicluster' + - name: 'Multi-cluster' icon: '/images/contribution/multicluster.svg' iconActive: '/images/contribution/multicluster-active.svg' - content: '' + content: 'multi-cluster and multi-cloud management' link: '' linkContent: 'Join SIG - Multicluster →' children: - - icon: '' - - icon: '' - - icon: '' + - icon: '/images/contribution/calicq26.jpg' + - icon: '/images/contribution/calicq27.jpg' - - name: 'Multitenancy' + - name: 'Multi-tenancy' icon: '/images/contribution/multitenancy.svg' iconActive: '/images/contribution/multitenancy-active.svg' - content: '' + content: 'workspace, IAM, RBAC' link: '' linkContent: 'Join SIG - Multitenancy →' children: - - icon: '' - - icon: '' - - icon: '' + - icon: '/images/contribution/calicq27.jpg' + - icon: '/images/contribution/calicq28.jpg' + - icon: '/images/contribution/calicq29.jpg' - name: 'Network' icon: '/images/contribution/network.svg' iconActive: '/images/contribution/network-active.svg' - content: '' + content: 'network policy, CNI plugins, SDN' link: '' linkContent: 'Join SIG - Network →' children: - - icon: '' - - icon: '' - - icon: '' + - icon: '/images/contribution/calicq30.svg' + - icon: '/images/contribution/calicq31.jpg' + - icon: '/images/contribution/calicq32.jpg' - name: 'Observability' icon: '/images/contribution/observability.svg' iconActive: '/images/contribution/observability-active.svg' - content: '' + content: 'Logging, Monitoring, Alerting, Notification, Audit, Events' link: '' linkContent: 'Join SIG - Observability →' children: - - icon: '' - - icon: '' - - icon: '' + - icon: '/images/contribution/calicq33.jpg' + - icon: '/images/contribution/calicq34.jpg' + - icon: '/images/contribution/calicq35.jpg' - name: 'Release' icon: '/images/contribution/release.svg' iconActive: '/images/contribution/release-active.svg' - content: '' + content: 'Release of each version' link: '' linkContent: 'Join SIG - Release →' children: - - icon: '' - - icon: '' - - icon: '' + - icon: '/images/contribution/calicq7.jpg' + - icon: '/images/contribution/calicq8.svg' - name: 'Storage' icon: '/images/contribution/storage.svg' iconActive: '/images/contribution/storage-active.svg' - content: '' + content: 'CSI plugins, storage integration' link: '' linkContent: 'Join SIG - Storage →' children: - - icon: '' - - icon: '' - - icon: '' + - icon: '/images/contribution/calicq36.jpg' + - icon: '/images/contribution/calicq37.jpg' + - icon: '/images/contribution/calicq7.jpg' - name: 'Testing' icon: '/images/contribution/testing.svg' iconActive: '/images/contribution/testing-active.svg' - content: '' + content: 'Effectively and automatically test KubeSphere ' link: '' linkContent: 'Join SIG - Testing →' children: - - icon: '' - - icon: '' - - icon: '' + - icon: '/images/contribution/calicq38.jpg' + - icon: '/images/contribution/calicq39.jpg' + - icon: '/images/contribution/calicq7.jpg' section4: involved: - title: 'Get involved' + title: 'Get Involved' children: - title: 'Be a Champion' icon: 'images/contribution/group-1.png' - content: 'Join me tomorrow and start putting in the time to get your campaign ready with a landing page!' + content: 'Join me tomorrow and start to get your campaign ready with a landing page!' link: '' linkContent: 'Become a KubeSphere Champion →' - title: 'Be a Member' icon: 'images/contribution/group-2.png' - content: 'KubeSphere is 100% open source and driven by community,we appreciate contributions to our code and documentation!Significant contributions will earn you a contributor t-shirt.' + content: 'KubeSphere is 100% open source and driven by the community. We appreciate contributions to our code and documentation! Significant contributions will earn you a contributor T-shirt.' link: '' linkContent: 'Become a KubeSphere Member →' + +section5: + title: Participated organizations + list: + - icon: /images/contribution/section5-1.svg + - icon: /images/contribution/section5-2.jpg + - icon: /images/contribution/section5-3.jpg + - icon: /images/contribution/section5-4.jpg + - icon: /images/contribution/section5-5.jpg + --- \ No newline at end of file diff --git a/content/en/observability/_index.md b/content/en/observability/_index.md new file mode 100644 index 000000000..c7996a2de --- /dev/null +++ b/content/en/observability/_index.md @@ -0,0 +1,48 @@ +--- +title: "observability" + +css: "scss/service-mesh.scss" + +section1: + title: KubeSphere allows you to build visualizations simply and intuitively + content: KubeSphere provides rich observability from infrastructure to applications. It integrates your favorite tools for multi-dimensional monitoring metrics, multi-tenant log query and collection, alerting and notification. + image: /images/service-mesh/banner.jpg + +section2: + title: Discoverability, Observability, Security, Everything You Need in One Platform + list: + - title: Multi-dimensional Monitoring + image: /images/observability/multi-dimensional-monitoring.png + contentList: + - content: Infrastructure monitoring provides K8s control plane and cluster node metrics + - content: Application resources monitoring includes CPU, memory, network and storage metrics + - content: Resource usage ranking by node, workspace and project. + - content: Service component monitoring for user to quickly locate component failures + - content: Custom metrics support including application custom metrics dashboard (in v3.0.0) + + - title: Log Query and Collection + image: /images/observability/log-query-and-collection.png + contentList: + - content: Multi-tenant log management, different tenants can only see their own log information. + - content: Multi-level log queries, including project, workload, Pod, container and keywords, supports drilling into each level to locate the issues. + - content: Support multiple log collection platforms, such as Elasticsearch, Kafka, Fluentd + - content: Service component monitoring for user to quickly locate component failures + + - title: Flexible Alerting and Notification + image: /images/observability/flexible-alerting-and-notification.png + contentList: + - content: Rich alerting rules based on multi-tenancy and multi-dimensional monitoring metrics + - content: Flexible alerting policy allows you to customize an alerting policy that contains multiple alerting rules + - content: Multi-level monitoring metrics for alerting, including from infrastructure to workloads. + - content: Flexible alerting rules allows you to customize the detection period, duration and alerting priority of monitoring metrics + - content: Integration with AlertManager, support multiple notification channels (in v3.0.0) + +section3: + title: See Cloud Native Observability in KubeSphere + image: /images/service-mesh/15.jpg + content: Want to get started in action by following with the hands-on lab? + btnContent: Start Hands-on Lab + link: + bgLeft: /images/service-mesh/3-2.svg + bgRight: /images/service-mesh/3.svg +--- \ No newline at end of file diff --git a/content/en/partner/_index.md b/content/en/partner/_index.md index 3d2ca5baf..4a4d67882 100644 --- a/content/en/partner/_index.md +++ b/content/en/partner/_index.md @@ -12,52 +12,60 @@ section2: title: 'Together, build partnership for success all over the world' content: 'KubeSphere partners play a critical role in KubeSphere go-to-market strategy. KubeSphere partners are located all over the world, we are looking forward to the global cooperation, your success is our success.' name1: 'USA' + icon1: '' name2: 'European' + icon2: 'images/partner/radore.jpg' name3: 'China' + icon3: 'images/partner/qingcloud.svg' mapImage: 'images/partner/map.svg' - + bg1: 'images/common/hexagon.svg' + bg2: 'images/partner/background1.svg' + bg3: 'images/partner/background2.svg' section3: title: 'Partner Types' tip: Request now → partnerType: - title: "App Providers" - content: "KubeSphere Application Store is a great place to showcase your application, KubeSphere bring your applications to tens of thousands of users, making them deploy your App to Kubernetes with one click." + content: "KubeSphere Application Store is a great place to showcase your application, KubeSphere bring your applications to tens of thousands of users, making them deploy your App to Kubernetes with one click." link: "" - title: "Consulting" - content: "KubeSphere Application Store is a great place to showcase your application, users can quickly deploy your application to Kubernetes using KubeSphere. Submit your application to KubeSphere Application Store now!" + content: If agencies and consultancies want to help clients easily adopt Kubernetes and deliver applications using modern, open source technologies, KubeSphere is the best choice for your team. link: "" - title: "Cloud Providers" - content: "KubeSphere Application Store is a great place to showcase your application, users can quickly deploy your application to Kubernetes using KubeSphere. Submit your application to KubeSphere Application Store now!" + content: For any cloud providers who want to tightly integrate KubeSphere as a catalog or application in their application market for Kubernetes-based solution, do not hesitate to use KubeSphere to extend your ecosystem. link: "" - title: "Go-To-Market" - content: "KubeSphere Application Store is a great place to showcase your application, users can quickly deploy your application to Kubernetes using KubeSphere. Submit your application to KubeSphere Application Store now!" + content: KubeSphere is 100% open source and free, you are able to localize KubeSphere, translate it into local languages, build local communities and develop local markets. GTM partners from around the globe that are tightly aligned with KubeSphere. link: "" section4: title: 'Featured Partners' - content: 'KubeSphere is trusted by various enterprises and organizations to the innovators driving the future of software.' featuredPartnerList: + - icon: "images/partner/partner5.jpg" + partnerType: "technology" + content: 'KubeSphere is trusted by various enterprises and organizations to the innovators driving the future of software.' + - icon: "images/partner/partner1.jpg" partnerType: "Go-To-Market" + content: - - icon: "images/partner/partner2.jpg" - partnerType: "Go-To-Market" - - - icon: "images/partner/partner3.jpg" + - icon: "images/partner/partner10.jpg" partnerType: "Go-To-Market" + content: - icon: "images/partner/partner4.jpg" - partnerType: "Go-To-Market" + partnerType: "technology" + content: - - icon: "images/partner/partner5.jpg" - partnerType: "Go-To-Market" + - icon: "images/partner/partner8.jpg" + partnerType: "technology" + content: - - icon: "images/partner/partner6.jpg" - partnerType: "Go-To-Market" + - icon: "images/partner/partner9.jpg" + partnerType: "technology" + content: - - icon: "images/partner/partner7.jpg" - partnerType: "Go-To-Market" --- \ No newline at end of file diff --git a/content/en/service-mesh/_index.md b/content/en/service-mesh/_index.md new file mode 100644 index 000000000..475ef51ff --- /dev/null +++ b/content/en/service-mesh/_index.md @@ -0,0 +1,41 @@ +--- +title: "service mesh" + +css: "scss/service-mesh.scss" + +section1: + title: KubeSphere Service Mesh provides a simpler distribution of Istio with consolidated UX + content: If you’re running and scaling microservices on Kubernetes, it’s time to adopt the istio-based service mesh for your distributed system. We design a unified UI to integrate and manage tools including Istio, Envoy, Jaeger. + image: /images/service-mesh/banner.jpg + +section2: + title: What Makes KubeSphere Service Mesh Special + list: + - title: Traffic Management + image: /images/service-mesh/traffic-management.png + summary: + contentList: + - content: Canary release, provides canary rollouts, and staged rollouts with percentage-based traffic splits. + - content: Blue-green deployment allows the new version of the application to be deployed in the green environment and tested for functionality and performance. + - content: Traffic mirroring enables teams to bring changes to production with as little risk as possible. + - content: Circuit breakers allows users to set limits for calls to individual hosts within a service + + - title: Visualization + image: /images/service-mesh/visualization.png + summary: observability is extremely useful in understanding cloud-native microservice interconnections. KubeSphere has the ability to visualize the connections between microservices and the topology of how they interconnect. + contentList: + + - title: Distributed Tracing + image: /images/service-mesh/distributed-tracing.png + summary: Based on Jaeger, KubeSphere enables users to track how each service interacts with other services. It brings a deeper understanding about request latency, bottlenecks, serialization and parallelism via visualization. + contentList: + +section3: + title: See KubeSphere Service Mesh In Action + image: /images/service-mesh/15.jpg + content: Want to get started in action by following with the hands-on lab? + btnContent: Start Hands-on Lab + link: + bgLeft: /images/service-mesh/3-2.svg + bgRight: /images/service-mesh/3.svg +--- \ No newline at end of file diff --git a/content/en/videos/_index.md b/content/en/videos/_index.md index c15f8d37b..fb01b90f9 100644 --- a/content/en/videos/_index.md +++ b/content/en/videos/_index.md @@ -1,4 +1,6 @@ --- title: "page1" css: "scss/videos.scss" +minCss: css/jquery.modal.min.css +tip: ALL --- \ No newline at end of file diff --git a/content/zh/_index.md b/content/zh/_index.md index ac9a93d21..4bf53dcc2 100644 --- a/content/zh/_index.md +++ b/content/zh/_index.md @@ -6,140 +6,138 @@ description: "KubeSphere 是在 Kubernetes 之上构建的以应用为中心的 css: "scss/index.scss" section1: - title: KubeSphere Container Platform - topic: The Kubernetes Platform, tailored to the hybrid cloud - content: KubeSphere is a distributed operating system providing cloud native stack with Kubernetes as its kernel, and aims to be plug-and-play architecture for third-party applications seamless integration to boost its ecosystem. - btnContent1: Install on Kubernetes - btnContent2: Install on Linux + title: + topic: + content: + btnContent1: + btnContent2: section2: - title: One Platform for full-stack solutions - content: KubeSphere is also a multi-tenant enterprise-grade container platform with full-stack automated IT operation and streamlined DevOps workflows. It provides developer-friendly wizard web UI, helping enterprises to build out a more robust and feature-rich platform, which includes most common functionalities needed for enterprise Kubernetes strategy., + title: + content: children: - - name: Open Source + - name: icon: /images/home/open-source.svg - content: A CNCF certified Kubernetes platform, 100% open source, built and improved by the community + content: - - name: Easy to Run + - name: icon: /images/home/easy-to-run.svg - content: Can be deployed on a Kubernetes cluster or Linux machines, supports online and air-gapped installation + content: - - name: Feature-rich + - name: icon: /images/home/feature-rich.svg - content: Delivers DevOps, service mesh, observability, application management, multi-tenancy, storage and networking management in an unified platform + content: - - name: Modular & Pluggable + - name: icon: /images/home/modular-pluggable.svg - content: These functionalities are loosely coupled with the platform since they are pluggable and optional. Other tools are easy to integrate and play + content: section3: - title: Benefits to different teams - content: Multi-tenancy makes different teams to securely deploy and maintain containerized applications from the cloud to the edge. It allows developers to deploy code via several clicks on intuitive console, brings centralized observability and powerful DevOps strategy for Ops team, helps Infra team to install and maintain Kubernetes cluster with flexible network and solution solutions, avoid locking team in to a single vendor eco-system. + title: + content: children: - - name: Infra Team - content: Building one-stop enterprise-grade DevOps framework + - name: + content: icon: /images/home/7.svg children: - - content: Improve your environment utilization and reduce internal infrastructure costs - - content: Support multi-cluster and multi-cloud Kubernetes management, avoiding vendor lock-in - - content: Provides security enhancements, supports multiple storage and network solutions - - content: Fully trusted, delivers a certified Kubernetes platform and distribution + - content: + - content: + - content: + - content: - - name: Developers - content: Focus on your bussiness, others are run in automated tools + - name: + content: icon: /images/home/74.png children: - - content: Smooth user experience, reduce the learning curve of the cloud native stack - - content: Provide toolkits and deployment automation tailored to any application environment - - content: Out-of-box logging, monitoring and multi-tenancy, improving development efficiency - - content: Support application lifecycle management, accelerating time to market - - - name: Ops Team - content: Building one-stop enterprise-grade DevOps framework + - content: + - content: + - content: + - content: + - name: + content: icon: /images/home/71.svg children: - - content: Centralized log collection, monitoring and alerting from infrastructure to applications. - - content: Streamlined continuous deploy, test, release, upgrade and scale - - content: Better track, route and optimize communications within Kubernetes for cloud native apps - - content: Easy-to-use web terminal and graphical panel, satisfying the habits of different users + - content: + - content: + - content: + - content: section4: - title: Key Features - content: If you want to use an open source project, but act like a commercial product, KubeSphere is your choice. The Roadmap listed the planning features, you can raise a proposal to submit your ideas with us. + title: + content: children: - - name: Provisioning Kubernetes + - name: icon: /images/home/provisioning-kubernetes.svg - content: Deploy Kubernetes on any infrastructure out of box, including online and air-gapped installation, support add GPU node + content: - - name: K8s Resource Management + - name: icon: /images/home/k-8-s-resource-management.svg - content: Provide web console for creating and managing Kubernetes resources, with powerful observability - - - name: Multi-tenant Management + content: + - name: icon: /images/home/multi-tenant-management.svg - content: Provide unified authentication with fine-grained roles and three-tier authorization system, supports AD/LDAP authentication + content: features: - - name: Application Store + - name: icon: /images/home/store.svg - content: Provide application store for Helm-based applications, and offers application lifecycle management + content: color: grape - - name: Service Mesh (Istio-based) + - name: icon: /images/home/service.svg - content: Provide fine-grained traffic management, observability and tracing, and offers visualization for traffic topology + content: color: red - - name: Rich Observability + - name: icon: /images/home/rich.svg - content: Multi-dimensional monitoring metrics, multi-tenant log query and collection, support alerting and notification + content: color: green - - name: DevOps System + - name: icon: /images/home/dev-ops.svg - content: Out-of-box CI/CD based on Jenkins, and offers automated workflow tools including S2I & B2I + content: color: orange - - name: Multiple Storage Solutions + - name: icon: /images/home/multiple.svg - content: Support GlusterFS, CephRBD, NFS, LocalPV solutions, provide CSI plugins to consume storage from multiple cloud providers + content: color: grape - - name: Multiple Network Solutions + - name: icon: /images/home/network.svg - content: Support Calico and Flannel, provides load balancer plug-in Porter for Kubernetes installed on physical machines + content: color: green - - name: Multi-cluster management + - name: icon: /images/home/management.svg - content: Distribute applications across multiple clusters and cloud providers, and provides the disaster recovery and cross-cluster discovery. + content: color: orange section5: - title: KubeSphere with its cloud native architecture + title: frontEnd: - title: Front end - project: KubeSphere Console + title: + project: children: - icon: /images/home/mobx.jpg - icon: /images/home/koa.jpg - icon: /images/home/react.png backEnd: - title: Back end (REST API) - project: KubeSphere System + title: + project: group: - - name: API Server - - name: API Gateway - - name: Controller Manager - - name: Account Service + - name: + - name: + - name: + - name: section6: - title: Who uses KubeSphere - content: The Case Studies listed more detailed user cases and their cloud native transformation stories.
Various enterprises and organizations use KubeSphere Container Platform for research, production and commercial products. + title: + content: children: - icon: /images/home/section6-1.jpg - icon: /images/home/section6-2.jpg @@ -151,9 +149,9 @@ section6: - icon: /images/home/section6-8.jpg - icon: /images/home/section6-9.jpg - icon: /images/home/section6-10.jpg - btnContent: Case Studies + btnContent: btnLink: link: - linkContent: Want your logo up there? Just submit a pull request → + linkContent: image: /images/home/certification.jpg --- \ No newline at end of file diff --git a/content/zh/blogs/_index.md b/content/zh/blogs/_index.md index 393e38183..1d91994c2 100644 --- a/content/zh/blogs/_index.md +++ b/content/zh/blogs/_index.md @@ -1,4 +1,6 @@ --- title: "page1" css: "scss/blogs.scss" + +tip: 全部 --- \ No newline at end of file diff --git a/content/zh/blogs/benlai-devops.md b/content/zh/blogs/benlai-devops.md new file mode 100644 index 000000000..6672354f7 --- /dev/null +++ b/content/zh/blogs/benlai-devops.md @@ -0,0 +1,117 @@ +--- +title: '本来生活的 DevOps 升级之路' +tag: 'DevOps,Kubernetes,KubeSphere,Jenkins' +createTime: '2020-03-28' +author: 'YangYang' +snapshot: 'https://pek3b.qingstor.com/kubesphere-docs/png/20200327132943.png' +--- + +我叫杨杨,就职于本来生活网(Benlai.com),负责发布系统架构。我们公司咋说呢,简单说就是卖水果、蔬菜的😄,下面还是来一段官方介绍。 + +## 本来生活简介 + +本来生活网创办于 2012 年,是一个专注于食品、水果、蔬菜的电商网站,从优质食品供应基地、供应商中精挑细选,剔除中间环节,提供冷链配送、食材食品直送到家服务。致力于通过保障食品安全、提供冷链宅配、基地直送来改善中国食品安全现状,成为中国优质食品提供者。 + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20200327131801.png) + +## 技术现状 + +### 基础设施 + +> - 部署在 IDC 机房 +> - 拥有 100 多台物理机 +> - 虚拟化部署 + +### 存在的问题 + +> - 物理机 95% 以上的占用率 +> - 相当多的资源闲置 +> - 应用扩容比较慢 + +## 拥抱 DevOps 与 Kubernetes + +公司走上容器平台的 DevOps 这条康庄大道主要目标有三: + +> 1、提高资源利用率 +> +> 2、提高发布效率 +> +> 3、降低运维的工作成本等等 + +其实最主要的还是 **省钱**,对就是 **省钱**。接下来就是介绍我们本来生活的 DevOps 升级之路: + +## Level 1:工具选型 + +我们从初步接触 DevOps 相关知识,在此期间偶然了解到开源的 KubeSphere (kubesphere.io)。KubeSphere 是在 Kubernetes 之上构建的以应用为中心的企业级容器平台,支持敏捷开发与自动化运维、DevOps、微服务治理、灰度发布、多租户管理、监控告警、日志查询与收集、应用商店、存储管理、网络管理等多种业务场景。 + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20200327141156.png) + +KubeSphere 内置的基于 Jenkins 的 DevOps 流水线非常适合我们,并且还打通了我们日常运维开发中需要的云原生工具生态,这个平台正是我们当初希望自己开发实现的。 + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20200327132943.png) + +于是,我们开始学习 KubeSphere 与 Jenkins 的各种操作、语法、插件等,开始构建适合我们自己的 CI/CD 的整个流程。最终结合 KubeSphere 容器平台,初步实现了第一级的 CI/CD 流程。 + +在 **Level 1** 的流程中,我们主要实现了拉取代码、编译应用、发布镜像到本地仓库、部署到本地 Kubernetes 集群;如下图 + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20200327132507.png) + +### 积累经验值 + +在 KubeSphere 初步完成 CI/CD 流程后,我们继续研究和完善流水线。比如,在研究 Jenkins Pipeline 的自定义方法后,我们实现了动态生成应用相关信息。Jenkins 成为企业级的主流 CI/CD 软件很大一部原因是其拥有丰富的插件生态,因此我们继续研究 Jenkins 插件,并在流水线中实现了上传 FTP、通过命令动态部署 ConfigMap、部署存储等流程。 + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20200327133536.png) + +## Level 2:完善流水线 + +经过不停的努力学习 Jenkinsfile 语法及插件后,我们的 CI/CD 流程升级到 Level 2。我们在流水线中,加入了 **部署配置、部署存储、上传 CDN** 等,如下图: + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20200327135941.png) + +### 小坑 - 动态参数 + +因为业务需要,我们的 CI/CD 流程需要 分为几种类型的发布,而每种类型的发布都需要不同的参数; + +于是我们按照之前学习到的 Jenkins Pipeline 语法,想当然的使用 When 条件语句去判断传入的发布类型跳转到不同 Stage ,然后在通过 Input 输入参数语句实现不同参数的输入,但是发现 Input 参数语句的优先级高于 When 条件语句,也就是说不管我选择哪个发布类型都要先输入参数,然后系统才会去判断是否跳过该 Stage,这与我们想的完全不一样。 + +于是我们各种 Google 和查官方文档,最后找到另外一种 input 语法,可以把 input 的优先级降低,使得 When 条件语句先判断,这样就满足了我们的需求。 + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20200327135953.png) + +## Level 3: + +经过采坑动态参数,我们将 CI/CD 流程升级到 Level 3,即新增了根据不同发布类型的任务,满足动态生成所需的参数,具体流程如下图: + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20200327140027.png) + +### 小坑 - ConfigMap + +在实际生成环境中我们回滚肯定是要将应用的程序和 ConfigMap 一起回滚的,但是 Kubernetes 的 ConfigMap 是没有版本控制的,这对于管理就会非常麻烦。于是,我们只能使用笨办法,在每次发布应用时,去配置中心抓取当前应用的配置生成 ConfigMap。并且,在 ConfigMap 名称后面跟上当前应用的发布版本,然后,在部署到 Kubernetes 时,会将该版本的 ConfigMap 挂载到当前发布的 Deployment 中,这样我们在回滚或发布时,就能直接将应用的镜像和 ConfigMap 一起回滚到指定版本。 + +唯一美中不足的就是 ConfigMap 会越来越多,后期只要定时清理就好,后续也将调研相关的配置管理工具。 + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20200327140058.png) + +### 连环坑:线下访问线上数据库 + +为了将应用的镜像从线下环境上传到线上生产环境的镜像仓库,我们踩了个连环坑,先是折腾了好久镜像仓库的 https 登陆。登陆的坑填平了,又掉到 push 镜像的坑里。最后,发现就是一个小小的配置导致的 push 镜像到线上环境失败。这两个坑折腾了我们很长的时间,不过好在最终都解决了,这些解决方法的细节,我们记录在了 KubeSphere 开发者论坛,可以在 KubeSphere 论坛找到:`https://kubesphere.com.cn/forum/d/294-docker-login-https-harbor`。 + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20200327140134.png) + +## 标准化流程 + +经过前期各种学习和采坑,我们的 CI/CD 流程基本成熟了后,我们开始考虑是不是能把整个流程标准化,每个应用只需要调用这个标准化流程去执行发布就好;而不是把 CI/CD 流程写到每个应用的 Pipeline 中;不然以后应用多了,万一需要修改 CI/CD 流程,想想有那么多应用的流程要修改,会比较麻烦。 + +于是我们又开始 Google 和查文档,寻找了一大圈,终于发现了一个叫 **Jenkins 扩展共享库**。通过 Jenkins 扩展共享库我们把 CI/CD 流程拆分为 **通用方法** 和 **流程逻辑** 两块。 + +然后每个应用的 Jenkins Pipeline 中只需按要求传入参数,然后调用要执行的流程方法即可;每个应用的 Jenkins Pipeline 的代码量从原来的 500 多行减少到了 30 行不到。 + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20200327140144.png) + +## Level 9:实现一键发布 + +经过采坑和填坑的不懈努力 我们积累了很好的经验;一下子跳级到 Level 9,CI/CD 流程有了质的飞跃,化整为零了。以后再也不用担心甲方爸爸随便更改流程啦 😊。 + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20200327140205.png) + +以后发布,只需要在 KubeSphere 平台点击 **运行**,选择 **发布类型** 和 **环境**,然后点击确定,然就可以去喝一杯咖啡 ☕️ 安静地等待服务发布喽! diff --git a/content/zh/blogs/console-opensource.md b/content/zh/blogs/console-opensource.md new file mode 100644 index 000000000..63530075d --- /dev/null +++ b/content/zh/blogs/console-opensource.md @@ -0,0 +1,73 @@ +--- +title: 'KubeSphere 前端开源,社区架构首次公布' +tag: '开源,前端' +createTime: '2019-12-02' +author: 'Feynman Zhou' +snapshot: 'https://pek3b.qingstor.com/kubesphere-docs/png/20191202112003.png' +--- + +## Console 开源 + +从 KubeSphere 第一行代码至今,项目经历了一年多时间的迅速发展,开源社区也这个期间完成孵化,并初具规模。为了让 KubeSphere 项目能够更好地以开源社区的形式发展和演进,让社区开发者能够方便地参与到 KubeSphere 项目的建设,社区宣布将 KubeSphere 前端项目 `console` 开源,**当前开源的版本包含了 KubeSphere 最新发布 v2.1 所有功能的代码**,前端的 Feature Map 可以通过这张图快速了解。 + +**Feature Map** + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20191202112003.png) + +前端项目的代码已在 `github.com/kubesphere/console` 可见,欢迎大家 **Star + Fork**。此前已有多位社区用户与开发者表示,希望能参与到 KubeSphere 项目的前端贡献,现在大家已经可以从 `github.com/kubesphere/kubesphere/issues` 通过标签 `area/console` 找到前端相关的 issue,包括 Bug、feature and design。 + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20191202111750.png) + + +至此,KubeSphere 开源社区发布的项目已涵盖了容器平台(KubeSphere)、多云应用管理平台(OpenPitrix)、网络插件(Porter LB 插件、Hostnic-CNI)、存储插件(CSI)、CI/CD(S2i-operator)、日志插件(Fluentbit-operator)、通知告警(Alert & Notification)、身份认证(IAM)等。 + + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20191202104556.png) + +## KubeSphere 社区架构 + +KubeSphere 相信 `Community over code`,一个健康良好的开源社区发展必定离不开 Contributor 的参与。为了让社区相关的事情更加成体系,让社区同学更有归属感,KubeSphere 首次建立了社区架构,第一次公开的架构包括 **Developer Group** 和 **User Group**。 + +> SIG(特别兴趣小组)由开发者和用户共同组成,目前架构中暂未划分主题,未来将根据社区用户的参与和关注方向进行划分。 + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20191202150115.png) + +### Developer Group + +Developer Group 将以开发者对 KubeSphere 组织下的所有开源项目的贡献数量和质量作为参考,可贡献的项目包括前后端、存储与网络插件、官网文档等项目。 + + +- Active Contributor:2 个月内贡献过超过 4 个 PR,这样即可获得邀请。 +- Reviewer: 从 Active Contributor 中诞生,当 Active Contributor 对该模块拥有比较深度的贡献,并且得到 2 个或 2 个以上 Maintainer 的提名时,将被邀请成为该模块的 Reviewer,具有 Review PR 的义务。 +- Maintainer:即该功能模块的组织者,负责项目某个功能模块的代码与版本开发与维护,社区日常运营,包括组织会议,解答疑问等。Tech Lead 需要为项目的管理和成长负责,责任重大。目前暂由 KubeSphere 内部成员担任,将来可根据贡献程度由社区开发者一起担任,共同为项目的进步而努力。 + +### User Group + +KubeSphere 社区是由开发者和用户共建的,随着 KubeSphere 用户群体愈发壮大,用户在使用过程中遇到的问题反馈及实践经验,对于 KubeSphere 产品的完善及应用推广有着不可忽视的重要作用。 + + +- Ambassador 定位是为 KubeSphere 项目提供过多个有价值的建议反馈,并在其他社区发布内容帮助宣传推广过 KubeSphere。 +- Co-Leader 定位是 KubeSphere 的高级用户,已将 KubeSphere & Kubernetes 在企业环境落地,并乐于在社区帮助其他用户解决技术问题,发布过优质内容。 +- Leader 一定是 KubeSphere 的资深用户,从 Co-Leader 中诞生;参与 KubeSphere 的新功能设计探讨与社区维护,将作为演讲嘉宾在线下 Meetup 进行技术实践分享。 + + +User Group 旨在加强 KubeSphere 用户之间的交流和学习,形式包括但不限于论坛与 GitHub 问答、论坛技术文章分享、官网文档贡献、KubeSphere & K8s 落地实践分享、项目建议反馈、线下技术沙龙等等。User Group 成员可以通过定期的线上、线下的活动,学习前沿的云原生技术知识与交流微服务落地避坑实践,发表技术见解,共同建设 KubeSphere 项目。 + + +## KubeSphere 贡献奖励 + +KubeSphere 社区在一个月之前上线了论坛(kubesphere.com.cn/forum/),方便社区成员与用户间的技术交流与产品问答反馈。最近两周,我们很欣慰的是,有不少用户在论坛发布了多篇高质量的实践文章或避坑指南,帮助了其他用户更好地理解和上手 KubeSphere。社区欢迎大家在论坛分享记录你们在各种基础设施环境下的安装部署相关的文章,以及使用实践和避坑技巧,也希望大家能够将个人原创的云原生相关的知识或文章发布在 KubeSphere 论坛。对于社区用户发布的优质技术文章,将被同步在 KubeSphere 官网博客下。 + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20191202142733.png) + +为了奖励来自社区论坛的优质内容和代码的贡献者,社区也准备了精美礼品予以奖励,礼品包括带有 KubeSphere Logo 的马克杯、T 恤和帽衫。如发布的主题或回复获赞数较多者,将根据排行榜段位标准获得精美礼品,这个奖励机制也同样适用于 Active Contributor。 + +## Meetup 预告 + +2019 年 12 月 14 日(周六)13:00-18:00,社区将在北京举行年度首次线下 Meetup,地址是 **北京市东城区青龙胡同 1 号歌华大厦 13 层**,。 + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20191202151552.png) + +马上扫码或点击【阅读原文】进入官网报名吧! + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20191202151751.png) diff --git a/content/zh/blogs/kubernetes-kubesphere-ha.md b/content/zh/blogs/kubernetes-kubesphere-ha.md new file mode 100644 index 000000000..756f69b1e --- /dev/null +++ b/content/zh/blogs/kubernetes-kubesphere-ha.md @@ -0,0 +1,766 @@ +--- +title: '手把手从零部署与运营生产级的 Kubernetes 集群与 KubeSphere' +tag: 'Kubernetes,kubesphere' +createTime: '2020-03-26' +author: 'Liu_wt' +snapshot: 'https://92uu-blog.oss-cn-beijing.aliyuncs.com/2020-03-25-091655.png' +--- + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20200327191533.png) + +> 本文来自 KubeSphere 社区用户 **Liu_wt** 投稿,欢迎所有社区用户参与投稿或分享经验案例。 + +本文将从零开始,在干净的机器上安装 Docker、Kubernetes (使用 kubeadm)、Calico、Helm 与 KubeSphere,通过手把手的教程演示如何搭建一个高可用生产级的 Kubernetes,并在 Kubernetes 集群之上安装 KubeSphere 容器平台可视化运营集群环境。 + +## 一、准备环境 + +开始部署之前,请先确定当前满足如下条件,本次集群搭建,所有机器处于同一内网网段,并且可以互相通信。 + +⚠️⚠️⚠️:**请详细阅读第一部分,后面的所有操作都是基于这个环境的,为了避免后面部署集群出现各种各样的问题,强烈建议你完全满足第一部分的环境要求** + +> - 两台以上主机 +> - 每台主机的主机名、Mac 地址、UUID 不相同 +> - CentOS 7(本文用 7.6/7.7) +> - 每台机器最好有 2G 内存或以上 +> - Control-plane/Master至少 2U 或以上 +> - 各个主机之间网络相通 +> - 禁用交换分区 +> - 禁用 SELINUX +> - 关闭防火墙(我自己的选择,你也可以设置相关防火墙规则) +> - Control-plane/Master和Worker节点分别开放如下端口 + +**Master节点** + +| 协议 | 方向 | 端口范围 | 作用 | 使用者 | +| --- | --- | --------- | ----------------------- | -------------------------- | +| TCP | 入站 | 6443* | Kubernetes API 服务器 | 所有组件 | +| TCP | 入站 | 2379-2380 | etcd server client API | kube-apiserver, etcd | +| TCP | 入站 | 10250 | Kubelet API | kubelet 自身、控制平面组件 | +| TCP | 入站 | 10251 | kube-scheduler | kube-scheduler 自身 | +| TCP | 入站 | 10252 | kube-controller-manager | kube-controller-manager 自身 | + +**Worker节点** + +| 协议 | 方向 | 端口范围 | 作用 | 使用者 | +| --- | --- | ----------- | ------------- | ----------------- | +| TCP | 入站 | 10250 | Kubelet API | kubelet 自身、控制平面组件 | +| TCP | 入站 | 30000-32767 | NodePort 服务** | 所有组件 | + +其他相关操作如下: + +> 友情提示😊,如果集群过多,可以了解下 ansible,批量管理你的多台机器,方便实用的工具。 + +先进行防火墙、交换分区设置 + +```bash +# 为了方便本操作关闭了防火墙,也建议你这样操作 +systemctl stop firewalld +systemctl disable firewalld + +# 关闭 SeLinux +setenforce 0 +sed -i "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/selinux/config + +# 关闭 swap +swapoff -a +yes | cp /etc/fstab /etc/fstab_bak +cat /etc/fstab_bak |grep -v swap > /etc/fstab +``` + +更换CentOS YUM源为阿里云yum源 + +```bash +# 安装wget +yum install wget -y +# 备份 +mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup +# 获取阿里云yum源 +wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo +# 获取阿里云epel源 +wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo +# 清理缓存并创建新的缓存 +yum clean all && yum makecache +# 系统更新 +yum update -y +``` + +进行时间同步,并确认时间同步成功 + +```bash +timedatectl +timedatectl set-ntp true +``` + +> ⚠️⚠️⚠️以下操作请严格按照声明的版本进行部署,否则将碰到乱七八糟的问题 + +# 二、安装 Docker + +## 2.1、安装 Docker + +您需要在每台机器上安装 Docker,我这里安装的是 `docker-ce-19.03.4` + +```bash +# 安装 Docker CE +# 设置仓库 +# 安装所需包 +yum install -y yum-utils \ + device-mapper-persistent-data \ + lvm2 + +# 新增 Docker 仓库,速度慢的可以换阿里云的源。 +yum-config-manager \ + --add-repo \ + https://download.docker.com/linux/centos/docker-ce.repo +# 阿里云源地址 +# http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo + +# 安装 Docker CE. +yum install -y containerd.io-1.2.10 \ + docker-ce-19.03.4 \ + docker-ce-cli-19.03.4 + +# 启动 Docker 并添加开机启动 +systemctl start docker +systemctl enable docker +``` + +## 2.2、修改 Cgroup Driver + +需要将Docker 的 Cgroup Driver 修改为 systemd,不然在为Kubernetes 集群添加节点时会报如下错误: + +```bash +# 执行 kubeadm join 的 WARNING 信息 +[WARNING IsDockerSystemdCheck]: detected "cgroupfs" as the Docker cgroup driver. The recommended driver is "systemd". Please follow the guide at https://kubernetes.io/docs/setup/cri/ +``` + +目前 Docker 的 Cgroup Driver 看起来应该是这样的: + +```bash +$ docker info|grep "Cgroup Driver" + Cgroup Driver: cgroupfs +``` + +需要将这个值修改为 systemd ,同时我将registry替换成国内的一些仓库地址,以免直接在官方仓库拉取镜像会很慢,操作如下。 + +> ⚠️⚠️⚠️:注意缩进,直接复制的缩进可能有问题,请确保缩进为正确的 Json 格式;如果 Docker 重启后查看状态不正常,大概率是此文件缩进有问题,Json格式的缩进自己了解一下。 + +```bash +# Setup daemon. +cat > /etc/docker/daemon.json < /etc/yum.repos.d/kubernetes.repo +[kubernetes] +name=Kubernetes +baseurl=http://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64 +enabled=1 +gpgcheck=1 +repo_gpgcheck=1 +gpgkey=http://mirrors.aliyun.com/kubernetes/yum/doc/yum-key.gpg http://mirrors.aliyun.com/kubernetes/yum/doc/rpm-package-key.gpg +EOF + +# 官方源配置如下 +cat < /etc/yum.repos.d/kubernetes.repo +[kubernetes] +name=Kubernetes +baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64 +enabled=1 +gpgcheck=1 +repo_gpgcheck=1 +gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg +EOF +``` + +## 3.2、开始安装 + +安装指定版本 `kubelet`、 `kubeadm` 、`kubectl`, 我这里选择当前较新的稳定版 Kubernetes 1.17.3,如果选择的版本不一样,在执行集群初始化的时候,注意 `--kubernetes-version` 的值。 + +```bash +# 增加配置 +cat < /etc/sysctl.d/k8s.conf +net.ipv4.ip_forward=1 +net.bridge.bridge-nf-call-ip6tables = 1 +net.bridge.bridge-nf-call-iptables = 1 +EOF +# 加载 +sysctl --system + +# 安装 +yum install -y kubelet-1.17.3 kubeadm-1.17.3 kubectl-1.17.3 --disableexcludes=kubernetes + +# 启动并设置 kubelet 开机启动 +systemctl start kubelet +systemctl enable --now kubelet +``` + +> ⚠️⚠️⚠️WARNING +> +> 如果此时执行 `systemctl status kubelet` 命令,系统日志将得到 kubelet 启动失败的错误提示,请忽略此错误,因为必须完成后续步骤中 kubeadm init 的操作,kubelet 才能正常启动 + +# 四、使用 Kubeadm 创建集群 + +## 4.1、初始化 Control-plane/Master 节点 + +在第一台 Master 上执行初始化,执行初始化使用 `kubeadm init` 命令。初始化首先会执行一系列的运行前检查来确保机器满足运行 Kubernetes 的条件,这些检查会抛出警告并在发现错误的时候终止整个初始化进程。 然后 `kubeadm init` 会下载并安装集群的 Control-plane 组件。 + +在初始化之前,需要先设置一下 hosts 解析,为了避免可能出现的问题,后面的 Worker 节点我也进行了同样的操作。注意按照你的实际情况修改Master节点的IP,并且注意 `APISERVER_NAME` 的值,如果你将这个 apiserver 名称设置为别的值,下面初始化时候的 `--control-plane-endpoint` 的值保持一致。 + +> 提示:为了使 Kubernetes 集群高可用,建议给集群的控制节点配置负载均衡器,如 HAproxy + Keepalived 或 Nginx,云上可以使用公有云的负载均衡器,然后在以下部分设置 `MASTER_IP` 和 `APISERVER_NAME` 为负载均衡器的地址(IP:6443) 和域名。 + +```bash +# 设置hosts +echo "127.0.0.1 $(hostname)" >> /etc/hosts +export MASTER_IP=192.168.115.49 +export APISERVER_NAME=kuber4s.api +echo "${MASTER_IP} ${APISERVER_NAME}" >> /etc/hosts +``` + +> 友情提示🙂🙂🙂: +> +> 截止2020年01月29日,官方文档声明了使用 kubeadm 初始化 master 时,--config 这个参数是实验性质的,所以就不用了;我们用其他参数一样可以完成 master 的初始化。 + +```bash +--config string kubeadm 配置文件。 警告:配置文件的使用是试验性的。 +``` + +下面有不带注释的初始化命令,建议先查看带注释的每个参数对应的意义,确保与你的当前配置的环境是一致的,然后再执行初始化操作,避免踩雷。 + +```bash +# 初始化 Control-plane/Master 节点 +kubeadm init \ + --apiserver-advertise-address 0.0.0.0 \ + # API 服务器所公布的其正在监听的 IP 地址,指定“0.0.0.0”以使用默认网络接口的地址 + # 切记只可以是内网IP,不能是外网IP,如果有多网卡,可以使用此选项指定某个网卡 + --apiserver-bind-port 6443 \ + # API 服务器绑定的端口,默认 6443 + --cert-dir /etc/kubernetes/pki \ + # 保存和存储证书的路径,默认值:"/etc/kubernetes/pki" + --control-plane-endpoint kuber4s.api \ + # 为控制平面指定一个稳定的 IP 地址或 DNS 名称, + # 这里指定的 kuber4s.api 已经在 /etc/hosts 配置解析为本机IP + --image-repository registry.cn-hangzhou.aliyuncs.com/google_containers \ + # 选择用于拉取Control-plane的镜像的容器仓库,默认值:"k8s.gcr.io" + # 因 Google被墙,这里选择国内仓库 + --kubernetes-version 1.17.3 \ + # 为Control-plane选择一个特定的 Kubernetes 版本, 默认值:"stable-1" + --node-name master01 \ + # 指定节点的名称,不指定的话为主机hostname,默认可以不指定 + --pod-network-cidr 10.10.0.0/16 \ + # 指定pod的IP地址范围 + --service-cidr 10.20.0.0/16 \ + # 指定Service的VIP地址范围 + --service-dns-domain cluster.local \ + # 为Service另外指定域名,默认"cluster.local" + --upload-certs + # 将 Control-plane 证书上传到 kubeadm-certs Secret +``` + +不带注释的内容如下,如果初始化超时,可以修改DNS为8.8.8.8后重启网络服务再次尝试。 + +```bash +kubeadm init \ + --apiserver-advertise-address 0.0.0.0 \ + --apiserver-bind-port 6443 \ + --cert-dir /etc/kubernetes/pki \ + --control-plane-endpoint kuber4s.api \ + --image-repository registry.cn-hangzhou.aliyuncs.com/google_containers \ + --kubernetes-version 1.17.3 \ + --pod-network-cidr 10.10.0.0/16 \ + --service-cidr 10.20.0.0/16 \ + --service-dns-domain cluster.local \ + --upload-certs +``` + +接下来这个过程有点漫长(初始化会下载镜像、创建配置文件、启动容器等操作),泡杯茶,耐心等待,你也可以执行 `tailf /var/log/messages` 来实时查看系统日志,观察 Master 的初始化进展,期间碰到一些报错不要紧张,可能只是暂时的错误,等待最终反馈的结果即可。 + +如果初始化最终成功执行,你将看到如下信息: + +```bash +Your Kubernetes control-plane has initialized successfully! + +To start using your cluster, you need to run the following as a regular user: + + mkdir -p $HOME/.kube + sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config + sudo chown $(id -u):$(id -g) $HOME/.kube/config + +You should now deploy a pod network to the cluster. +Run "kubectl apply -f [podnetwork].yaml" with one of the options listed at: + https://kubernetes.io/docs/concepts/cluster-administration/addons/ + +You can now join any number of the control-plane node running the following command on each as root: + + kubeadm join kuber4s.api:6443 --token 0j287q.jw9zfjxud8w85tis \ + --discovery-token-ca-cert-hash sha256:5e8bcad5ec97c1025e8044f4b8fd0a4514ecda4bac2b3944f7f39ccae9e4921f \ + --control-plane --certificate-key 528b0b9f2861f8f02dfd4a59fc54ad21e42a7dea4dc5552ac24d9c650c5d4d80 + +Please note that the certificate-key gives access to cluster sensitive data, keep it secret! +As a safeguard, uploaded-certs will be deleted in two hours; If necessary, you can use +"kubeadm init phase upload-certs --upload-certs" to reload certs afterward. + +Then you can join any number of worker nodes by running the following on each as root: + +kubeadm join kuber4s.api:6443 --token 0j287q.jw9zfjxud8w85tis \ + --discovery-token-ca-cert-hash sha256:5e8bcad5ec97c1025e8044f4b8fd0a4514ecda4bac2b3944f7f39ccae9e4921f +``` + +为普通用户添加 `kubectl` 运行权限,命令内容在初始化成功后的输出内容中可以看到。 + +```bash +mkdir -p $HOME/.kube +sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config +sudo chown $(id -u):$(id -g) $HOME/.kube/config +``` + +建议root用户也进行以上操作,作者使用的是root用户执行的初始化操作,然后在操作完成后查看集群状态的时候,出现如下错误: + +```bash +The connection to the server localhost:8080 was refused - did you specify the right host or port? +``` + +这时候请备份好 `kubeadm init` 输出中的 `kubeadm join` 命令,因为将会需要这个命令来给集群添加节点。 + +> ⚠️⚠️⚠️提示:令牌是主节点和新添加的节点之间进行相互身份验证的,因此请确保其安全。任何人只要知道了这些令牌,就可以随便给您的集群添加节点。 你可以使用 `kubeadm token` 命令来查看、创建和删除这类令牌。 + +## 4.2、安装 Pod 网络附加组件 + +关于 Kubernetes 网络,建议读完这篇 [文章](https://yuerblog.cc/2019/02/25/flannel-and-calico/),以及文末的其他链接,如[这个](https://juejin.im/entry/599d33ad6fb9a0247804d430)。 + +集群必须安装Pod网络插件,以使Pod可以相互通信,只需要在Master节点操作,其他新加入的节点会自动创建相关pod。 + +必须在任何应用程序之前部署网络组件。另外,在安装网络之前,CoreDNS将不会启动(你可以通过命令 `kubectl get pods --all-namespaces|grep coredns` 查看 CoreDNS 的状态)。 + +```bash +# 查看 CoreDNS 的状态,并不是 Running 状态 +$ kubectl get pods --all-namespaces|grep coredns +kube-system coredns-7f9c544f75-bzksd 0/1 Pending 0 14m +kube-system coredns-7f9c544f75-mtrwq 0/1 Pending 0 14m +``` + +kubeadm 支持多种网络插件,我们选择 Calico 网络插件(kubeadm 仅支持基于容器网络接口(CNI)的网络(不支持kubenet)。),默认情况下,它给出的pod的IP段地址是 `192.168.0.0/16` ,如果你的机器已经使用了此IP段,就需要修改这个配置项,将其值改为在初始化 Master 节点时使用 `kubeadm init --pod-network-cidr=x.x.x.x/x` 的IP地址段,即我们上面配置的 `10.10.0.0/16` ,大概在625行左右,操作如下: + +```bash +# 获取配置文件 +mkdir calico && cd calico +wget https://docs.projectcalico.org/v3.8/manifests/calico.yaml + +# 修改配置文件 +# 找到 625 行左右的 192.168.0.0/16 ,并修改为我们初始化时配置的 10.10.0.0/16 +vim calico.yaml + +# 部署 Pod 网络组件 +kubectl apply -f calico.yaml +``` + +稍等片刻查询 pod 详情,你也可以使用 `watch` 命令来实时查看 pod 的状态,等待 Pod 网络组件部署成功后,就可以看到一些信息了,包括 Pod 的 IP 地址信息,这个过程时间可能会有点长。 + +```bash +watch -n 2 kubectl get pods --all-namespaces -o wide +``` + +## 4.3、将 Worker 节点添加到 Kubernetes + +请首先确认 Worker 节点满足第一部分的环境说明,并且已经安装了 Docker 和 kubeadm、kubelet 、kubectl,并且已经启动 kubelet。 + +```bash +# 添加 Hosts 解析 +echo "127.0.0.1 $(hostname)" >> /etc/hosts +export MASTER_IP=192.168.115.49 +export APISERVER_NAME=kuber4s.api +echo "${MASTER_IP} ${APISERVER_NAME}" >> /etc/hosts +``` + +将 Worker 节点添加到集群,这里注意,执行后可能会报错,有幸的话你会跳进这个坑,这是因为 Worker 节点加入集群的命令实际上在初始化 master 时已经有提示出来了,不过两小时后会删除上传的证书,所以如果你此时加入集群的时候提示证书相关的错误,请执行 `kubeadm init phase upload-certs --upload-certs` 重新加载证书。 + +```bash +kubeadm join kuber4s.api:6443 --token 0y1dj2.ih27ainxwyib0911 \ + --discovery-token-ca-cert-hash sha256:5204b3e358a0d568e147908cba8036bdb63e604d4f4c1c3730398f33144fac61 \ +``` + +执行加入操作,你可能会发现卡着不动,大概率是因为令牌ID对此集群无效或已过 2 小时的有效期(通过执行 `kubeadm join --v=5` 来获取详细的加入过程,看到了内容为 ”token id "0y1dj2" is invalid for this cluster or it has expired“ 的提示),接下来需要在 Master 上通过 `kubeadm token create` 来创建新的令牌。 + +```bash +$ kubeadm token create --print-join-command +W0129 19:10:04.842735 15533 validation.go:28] Cannot validate kube-proxy config - no validator is available +W0129 19:10:04.842808 15533 validation.go:28] Cannot validate kubelet config - no validator is available +# 输出结果如下 +kubeadm join kuber4s.api:6443 --token 1hk9bc.oz7f3lmtbzf15x9b --discovery-token-ca-cert-hash sha256:5e8bcad5ec97c1025e8044f4b8fd0a4514ecda4bac2b3944f7f39ccae9e4921f +``` + +在 Worker 节点上重新执行加入集群命令 + +```bash +kubeadm join kuber4s.api:6443 \ + --token 1hk9bc.oz7f3lmtbzf15x9b \ + --discovery-token-ca-cert-hash sha256:5e8bcad5ec97c1025e8044f4b8fd0a4514ecda4bac2b3944f7f39ccae9e4921f +``` + +接下来在Master上查看 Worker 节点加入的状况,直到 Worker 节点的状态变为 Ready 便证明加入成功,这个过程可能会有点漫长,30 分钟以内都算正常的,主要看你网络的情况或者说拉取镜像的速度;另外不要一看到 `/var/log/messages` 里面报错就慌了,那也得看具体报什么错,看不懂就稍微等一下,一般在 Master 上能看到已经加入(虽然没有Ready)就没什么问题。 + +```bash +watch kubectl get nodes -o wide +``` + +## 4.4、添加 Master 节点 + +需要至少2个CPU核心,否则会报错 + +```bash +kubeadm join kuber4s.api:6443 \ + --token 1hk9bc.oz7f3lmtbzf15x9b \ + --discovery-token-ca-cert-hash sha256:5e8bcad5ec97c1025e8044f4b8fd0a4514ecda4bac2b3944f7f39ccae9e4921f \ + --control-plane --certificate-key 5253fc7e9a4e6204d0683ed2d60db336b3ff64ddad30ba59b4c0bf40d8ccadcd +``` + +## 4.5、补充内容 + +- [kubeadm init](https://kubernetes.io/docs/reference/setup-tools/kubeadm/kubeadm-init/) 初始化 Kubernetes 主节点 +- [kubeadm token](https://kubernetes.io/docs/reference/setup-tools/kubeadm/kubeadm-token/) 管理 `kubeadm join` 的令牌 +- [kubeadm reset](https://kubernetes.io/docs/reference/setup-tools/kubeadm/kubeadm-reset/) 将 `kubeadm init` 或 `kubeadm join` 对主机的更改恢复到之前状态,一般与 `-f` 参数使用 + +移除 worker 节点 + +正常情况下,你无需移除 worker 节点,如果要移除,在准备移除的 worker 节点上执行 + +``` +kubeadm reset -f +``` + +或者在 Control-plane 上执行 + +``` +kubectl delete node nodename +``` + +> - 将 nodename 替换为要移除的 worker 节点的名字 +> - worker 节点的名字可以通过在 Control-plane 上执行 kubectl get nodes 命令获得 + +# 五、Kubernetes 高可用集群 + +## 5.1、环境说明 + +如果你使用的是以上方法部署你的 Kubernetes 集群,想在当前基础上进行高可用集群的创建,则可以按照下面的步骤继续进行。 + +值得注意的是,这里没有将ETCD放在Master外的机器上,而是使用默认的架构,即官方的 Stacked etcd topology 方式的集群 + +![](https://92uu-blog.oss-cn-beijing.aliyuncs.com/2020-03-25-091655.png) + +你需要至少 3 台 Master 节点和 3 台 Worker 节点,或者更多的机器,但要保证是 Master 和 Worker 节点数都是奇数的,以防止 leader 选举时出现脑裂状况。 + +| 机器名称 | 机器IP | 工作内容 | +| -------- | -------------- | ----------- | +| master01 | 192.168.115.49 | master、etcd | +| master02 | 192.168.115.41 | master、etcd | +| master03 | 192.168.115.42 | master、etcd | +| node01 | 192.168.115.46 | worker | +| node02 | 192.168.115.47 | worker | +| node03 | 192.168.115.48 | worker | +| nfs | 192.168.115.50 | 存储 | + +## 5.2、高可用扩展 + +Kubernetes 的高可用扩展其实挺简单,你只需要将不同的 Master 和 Worker 节点加入到集群中就行了。加入的指令在你初始化集群时已经给出了。 + +- 添加 Master 节点: + +需要至少 2 个 CPU 核心,否则会报错 + +```bash +kubeadm join kuber4s.api:6443 \ + --token 1hk9bc.oz7f3lmtbzf15x9b \ + --discovery-token-ca-cert-hash sha256:5e8bcad5ec97c1025e8044f4b8fd0a4514ecda4bac2b3944f7f39ccae9e4921f \ + --control-plane --certificate-key 5253fc7e9a4e6204d0683ed2d60db336b3ff64ddad30ba59b4c0bf40d8ccadcd +``` + +- 添加 Worker 节点 + +在 Worker 节点上重新执行加入集群命令 + +```bash +kubeadm join kuber4s.api:6443 \ +--token 1hk9bc.oz7f3lmtbzf15x9b \ +--discovery-token-ca-cert-hash sha256:5e8bcad5ec97c1025e8044f4b8fd0a4514ecda4bac2b3944f7f39ccae9e4921f +``` + +# 六、安装 KubeSphere + +## 6.1、KubeSphere简介 + +Kubernetes 官方有提供一套 Dashboard,但是我这里选择功能更强大的 KubeSphere,以下内容引用自 KubeSphere 官网: + +[KubeSphere](https://kubesphere.com.cn/docs/zh-CN/) 是在 [Kubernetes](https://kubernetes.io/) 之上构建的以应用为中心的容器平台,提供简单易用的操作界面以及向导式操作方式,在降低用户使用容器调度平台学习成本的同时,极大减轻开发、测试、运维的日常工作的复杂度,旨在解决 Kubernetes 本身存在的存储、网络、安全和易用性等痛点。除此之外,平台已经整合并优化了多个适用于容器场景的功能模块,以完整的解决方案帮助企业轻松应对敏捷开发与自动化运维、DevOps、微服务治理、灰度发布、多租户管理、工作负载和集群管理、监控告警、日志查询与收集、服务与网络、应用商店、镜像构建与镜像仓库管理和存储管理等多种场景。后续版本将提供和支持多集群管理、大数据、AI 等场景。 + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20200327114511.png) + +## 6.2、安装要求 + +KubeSphere 支持直接在 Linux 上部署集群,也支持在 Kubernetes 上部署,我这里选择后者,基本的要求如下: + +- `Kubernetes` 版本:`1.15.x ≤ K8s version ≤ 1.17.x`; +- `Helm` 版本:`2.10.0 ≤ Helm Version < 3.0.0`(不支持 helm 2.16.0[#6894](https://github.com/helm/helm/issues/6894)),且已安装了 Tiller,参考 [如何安装与配置 Helm](https://devopscube.com/install-configure-helm-kubernetes/)(预计 3.0 支持 Helm v3); +- 集群已有默认的存储类型(StorageClass),若还没有准备存储请参考[安装 OpenEBS 创建 LocalPV 存储类型](https://kubesphere.com.cn/docs/zh-CN/appendix/install-openebs)用作开发测试环境。 +- 集群能够访问外网,若无外网请参考 [在 Kubernetes 离线安装 KubeSphere](https://kubesphere.com.cn/docs/installation/install-on-k8s-airgapped/)。 + +## 6.3、安装 Helm + +### 6.3.1、Helm 简介 + +Helm 基本思想如图所示 + +![](https://92uu-blog.oss-cn-beijing.aliyuncs.com/2020-03-25-095440.png) + +以下内容引用自 [此篇文章](https://blog.csdn.net/weixin_30566063/article/details/99247145) + +**Helm 基本概念** + +Helm 可以理解为 Kubernetes 的包管理工具,可以方便地发现、共享和使用为Kubernetes构建的应用,它包含几个基本概念: + +- Chart:一个 Helm 包,其中包含了运行一个应用所需要的镜像、依赖和资源定义等,还可能包含 Kubernetes 集群中的服务定义 +- Release: 在 Kubernetes 集群上运行的 Chart 的一个实例。在同一个集群上,一个 Chart 可以安装很多次。每次安装都会创建一个新的 release。例如一个 MySQL Chart,如果想在服务器上运行两个数据库,就可以把这个 Chart 安装两次。每次安装都会生成自己的 Release,会有自己的 Release 名称。 +- Repository:用于发布和存储 Chart 的仓库。 + + +### 6.3.2、Helm安装 + +安装过程如下 + +```bash +# 创建部署目录并下载Helm +mkdir tiller +cd tiller + +# 先使用官方的方式安装,如果安装不了,可以看到下载文件的地址,然后手动下载解压 +curl -L https://git.io/get_helm.sh | bash +# 获取到下载地址后,想办法下载 +wget https://get.helm.sh/helm-v2.16.3-linux-amd64.tar.gz +tar zxf helm-v2.16.3-linux-amd64.tar.gz +mv linux-amd64/helm /usr/local/bin/helm + +# 验证 +helm version +``` + +部署 Tiller,即 Helm 的服务端。先创建 SA + +```yaml +# yaml文件如下 +$ cat /root/tiller/helm-rbac.yaml +apiVersion: v1 +kind: ServiceAccount +metadata: + name: tiller + namespace: kube-system +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: tiller +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: cluster-admin +subjects: + - kind: ServiceAccount + name: tiller + namespace: kube-system +``` + +创建 RBAC: + +```bash +kubectl apply -f helm-rbac.yaml +``` + +初始化,这个过程可能不会成功,具体接着往下看 + +```bash +helm init --service-account=tiller --history-max 300 +``` + +检查初始化的情况,不出意外的话,墙内用户看pod详情可以看到获取不到镜像的错误。 + +```bash +kubectl get deployment tiller-deploy -n kube-system +``` + +如果一直获取不到镜像,可以通过更换到Azure中国镜像源来解决,操作步骤如下: + +```bash +# 编辑 deploy +kubectl edit deploy tiller-deploy -n kube-system +# 查找到image地址,替换为如下地址,保存退出 +gcr.azk8s.cn/kubernetes-helm/tiller:v2.16.3 +``` + +接下来稍等片刻,再次查看deployment和pod详情,就正常了 + +```bash +kubectl get deployment tiller-deploy -n kube-system +``` + +## 6.4、安装 StorageClass + +Kubernetes 支持多种 StorageClass,我这选择 NFS 作为集群的 StorageClass。 + +参考地址:[https://github.com/kubernetes-incubator/external-storage/tree/master/nfs-client](https://github.com/kubernetes-incubator/external-storage/tree/master/nfs-client) + +### 6.4.1、下载所需文件 + +下载所需文件,并进行内容调整 + +```bash +mkdir nfsvolume && cd nfsvolume +for file in class.yaml deployment.yaml rbac.yaml ; do wget https://raw.githubusercontent.com/kubernetes-incubator/external-storage/master/nfs-client/deploy/$file ; done +``` + +修改 deployment.yaml 中的两处 NFS 服务器 IP 和目录 + +```yaml +... + env: + - name: PROVISIONER_NAME + value: fuseim.pri/ifs + - name: NFS_SERVER + value: 192.168.115.50 + - name: NFS_PATH + value: /data/k8s + volumes: + - name: nfs-client-root + nfs: + server: 192.168.115.50 + path: /data/k8s +``` + +## 6.4.2、部署创建 + +具体的说明可以去官网查看。 + +```bash +kubectl create -f rbac.yaml +kubectl create -f class.yaml +kubectl create -f deployment.yaml +``` + +如果日志中看到“上有坏超级块”,请在集群内所有机器上安装nfs-utils并启动。 + +```bash +yum -y install nfs-utils +systemctl start nfs-utils +systemctl enable nfs-utils +rpcinfo -p +``` + +查看storageclass + +```bash +$ kubectl get storageclass +NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE +managed-nfs-storage fuseim.pri/ifs Delete Immediate false 10m +``` + +### 6.4.3、标记一个默认的 StorageClass + +操作命令格式如下 + +```bash +kubectl patch storageclass -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}' +``` + +请注意,最多只能有一个 StorageClass 能够被标记为默认。 + +验证标记是否成功 + +```bash +$ kubectl get storageclass +NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE +managed-nfs-storage (default) fuseim.pri/ifs Delete Immediate false 12m +``` + +## 6.5、部署 KubeSphere + +过程很简单,如果你的机器资源足够,建议你进行完整安装,操作步骤如下。如果你的资源不是很充足,则可以进行最小化安装,[参考地址](https://kubesphere.com.cn/docs/zh-CN/installation/prerequisites/)。我当然是选择完整安装了,香! + +```bash +# 下载 yaml 文件 +mkdir kubesphere && cd kubesphere +wget https://raw.githubusercontent.com/kubesphere/ks-installer/master/kubesphere-complete-setup.yaml +# 部署 KubeSphere +kubectl apply -f kubesphere-complete-setup.yaml +``` + +这个过程根据你实际网速,实际使用时间长度有所不同。你可以通过如下命令查看实时的日志输出。 + +```bash +kubectl logs -n kubesphere-system $(kubectl get pod -n kubesphere-system -l app=ks-install -o jsonpath='{.items[0].metadata.name}') -f +``` + +当你看到如下日志输出,证明你的 KubeSphere 部署成功 + +```bash +************************************************** +task monitoring status is successful +task notification status is successful +task devops status is successful +task alerting status is successful +task logging status is successful +task openpitrix status is successful +task servicemesh status is successful +total: 7 completed:7 +************************************************** +##################################################### +### Welcome to KubeSphere! ### +##################################################### + +Console: http://192.168.115.49:30880 +Account: admin +Password: P@88w0rd +##################################################### +``` + +确认 Pod 都正常运行后,可使用`IP:30880`访问 KubeSphere UI 界面,默认的集群管理员账号为`admin/P@88w0rd`,Enjoy it,😏! + +![](https://92uu-blog.oss-cn-beijing.aliyuncs.com/2020-03-25-103029.png) + +![](https://92uu-blog.oss-cn-beijing.aliyuncs.com/2020-03-25-145648.png) + +## 参考 + +本文出处 Segmentfault:`https://segmentfault.com/a/1190000022146020` diff --git a/content/zh/blogs/kubesphere-orion.md b/content/zh/blogs/kubesphere-orion.md new file mode 100644 index 000000000..d585a2bf8 --- /dev/null +++ b/content/zh/blogs/kubesphere-orion.md @@ -0,0 +1,275 @@ +--- +title: '在 KubeSphere 安装 Orion vGPU 使用 TensorFlow 运行深度学习训练' +tag: 'AI,Kubernetes,TensorFlow,KubeSphere' +createTime: '2020-01-16' +author: 'Ellaye, Feynman' +snapshot: 'https://pek3b.qingstor.com/kubesphere-docs/png/20200116192941.png' +--- + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20200116193908.png) + +## 概览 + +本文将使用 [KubeSphere 容器平台](https://github.com/kubesphere/kubesphere),在 Kubernetes 上部署 [Orion vGPU 软件](https://github.com/virtaitech/orion) 进行深度学习加速,并基于 Orion vGPU 软件使用经典的 Jupyter Notebook 进行模型训练与推理。 + +在开始安装 Orion vGPU 和演示深度学习训练之前,先简单了解一下,什么是 **vGPU** 以及什么是 **Orion vGPU**。 + +## 什么是 vGPU + +vGPU 又称 **虚拟 GPU**,早在几年前就由 [NVIDIA](https://www.nvidia.cn/data-center/virtual-gpu-technology/) 推出了这个概念以及相关的产品。**vGPU 是通过对数据中心(物理机)的 GPU 进行虚拟化**,用户可在多个虚拟机或容器中 **共享该数据中心的物理 GPU 资源**,有效地提高性能并降低成本。vGPU 使得 GPU 与用户之间的关系不再是一对一,而是 **一对多**。 + +## 为什么需要 vGPU + +随着 AI 技术的快速发展,越来越多的企业开始将 AI 技术应用到自身业务之中。目前,云端 AI 算力主要由三类 AI 加速器来提供:GPU,FPGA 和 AI ASIC 芯片。这些加速器的优点是性能非常高,缺点是 **成本高昂,缺少异构加速管理和调度**。大部分企业因无法构建高效的加速器资源池,而不得不独占式地使用这些昂贵的加速器资源,导致 **资源利用率低,成本高**。 + +以 GPU 为例,通过创新的 vGPU 虚拟化技术,能够帮助用户无需任务修改就能透明地共享和使用数据中心内任何服务器之上的 AI 加速器,不但能够帮助用户提高资源利用率,而且可以 **极大便利 AI 应用的部署,构建数据中心级的 AI 加速器资源池**。 + +## 什么是 Orion vGPU + +Orion vGPU 软件由 [VirtAI Tech 趋动科技](https://virtai.tech/) 开发,是一个 **为云或者数据中心内的 AI 应用、CUDA 应用提供 GPU 资源池化、GPU 虚拟化能力** 的系统软件。通过高效的通讯机制连接应用与 GPU 资源池,使得 AI 应用、CUDA 应用可以不受 GPU 物理位置的限制,部署在云或者数据中心内任何一个 **物理机、Container 或者 VM** 内。 + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20200116162207.png) + +## Orion vGPU 软件架构 + +由于我们将在 KubeSphere 容器平台上部署 Orion vGPU 软件至 Kubernetes,在部署前我们先简单了解一下 Orion vGPU 的软件架构。 + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20200116162958.png) + +### Orion Client + +Orion Client 为一个运行时环境,模拟了 NVidia CUDA 的运行库环境,为 CUDA 程序提供了 API 接口兼容的全新实现。通过和 Orion 其他功能组件的配合,为 CUDA 应用程序虚拟化了一定数量的虚拟 GPU(Orion vGPU)。由于 Orion Client 模拟了 NVidia CUDA 运行环境,因此 CUDA 应用程序可以透明无修改地直接运行在 Orion vGPU 之上。 + +### Orion Controller + +Orion Controller 是一个长期运行的服务程序,其负责整个 GPU 资源池的资源管理。其响应 Orion Client 的 vGPU 请求,并从 GPU 资源池中为 Orion Client 端的 CUDA 应用程序分配并返回 Orion vGPU 资源。该组件可以部署在数据中心任何网络可到达的系统当中,每个资源池部署一个 Orion Controller。资源池的大小取决于 IT 管理的需求,可以是整个数据中心的所有 GPU 作为一个资源池,也可以每个 GPU 服务器作为一个独立的资源池。可以认为它就像一个中介,帮忙沟通 Orion Client 和 Server。 + +### Orion Server + +该组件为一个长运行的系统服务,负责 GPU 资源化的后端服务。Orion Server 部署在每一个物理 GPU 服务器上,接管本机内的所有物理 GPU。Orion Server 通过和 Orion Controller 的交互把本机的 GPU 加入到由 Orion Controller 管理维护的 GPU 资源池当中。 + +当 Orion Client 端应用程序运行时,通过 Orion Controller 的资源调度,建立和 Orion Server 的连接。Orion Server 为其应用程序的所有 CUDA 调用提供一个隔离的运行环境以及真实 GPU 硬件算力。 + +## 场景演示 + +Orion vGPU 的使用包括以下三类场景: + +- 场景一:Docker 容器中使用本地节点 GPU 资源 +- 场景二:KVM 虚拟机中使用本地节点 GPU 资源 +- 场景三:在没有 GPU 的节点上使用远程节点上的 GPU 资源 + +本文仅对场景一进行演示说明,该场景非常适用于教学及推理场景,后续的文章会对场景三说明如何通过 RDMA 使用远程节点 GPU 资源。 + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20200116184604.png) + +## 准备 GPU 节点并安装 NVIDIA 驱动和插件 + +假设您已有 KubeSphere 集群环境,那么可参考 KubeSphere 官方文档扩容一个 GPU 主机作为新的 GPU 节点。本文使用了一台 Ubuntu 18.04 的 GPU 节点通过 KubeSphere 加入了 Kubernetes 集群,并在 GPU 节点安装 NVIDIA 驱动和 NVIDIA Docker 插件,在本文中暂不对该步骤进行详细说明。 + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20200117135711.png) + +## 安装 Orion vGPU 软件 + +通过安装 Orion vGPU 软件,容器得以使用 Orion vGPU 资源加速计算。安装完成后,我们将会在容器中运行与测试 TensorFlow 的部分深度学习训练。 + +如下我们可以使用 KubeSphere 在 Kubernetes 之上容器化部署 Orion vGPU 的三个组件以及它的 Kubernetes Device Plugin。 + +### 安装 Orion Controller + +在上述已经对 Orion Controller 进行过介绍,它可以部署在集群的任意节点。一般说来,会通过选择器让 Controller 运行在指定的节点上,从而把 Controller 的 IP 地址确定下来。本文为了配置简单,仅安装在了 GPU 物理节点上: + +(1)代码克隆到集群中任意主机节点本地。 + +``` +$ git clone https://github.com/virtaitech/orion +``` + +(2)部署 Orion Controller,默认只部署一份 Orion Controller: + +``` +$ cd orion/orion-kubernetes-deploy +$ vi deploy-controller.yaml +``` + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20200116171855.png) + +添加节点选择器,如上图,保存。然后执行如下命令部署 Controller: + +``` +$ kubectl create -f deploy-controller.yaml +``` + +执行完成后在 KubeSphere 界面的 default 项目中可以看到 Controller 的 Pod: + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20200116173959.png) + +### 安装 Orion Kubernetes Device Plugin + +Orion Kubernetes device plugin 是符合 Kubernetes device plugin 接口规范的设备扩展插件。配合 Orion GPU 可以无缝地在一个 Kubernetes 集群里添加 Oiron vGPU 资源,从而在部署应用的时候,在容器中使用 Orion vGPU。 + +如下,修改 `deploy-plugin.yaml` 文件,添加节点选择器,使 Device Plugin 将以 DaemonSet 安装在物理 GPU 节点上。 + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20200116172940.png) + +``` +$ kubectl create -f deploy-plugin.yaml +``` + +执行完成后,等待一段时间,在 KubeSphere 界面的 default 项目中可以看到 `deploy-plugin` 的 Pod。 + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20200116173803.png) + +### 安装 Orion Server + +Orion Server 将在物理 GPU 节点以 DaemonSet 形式部署,以部署支持 CUDA 10.0 的 Orion Server 为例。 + +``` +$ vi deploy-server-cuda10.0.yaml +``` + +添加节点选择器,使 Orion Server 安装在物理 GPU 节点上。 + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20200116180143.png) + +修改后保存即可执行安装: + +``` +kubectl create -f deploy-server-cuda10.0.yaml +``` + +执行完之后,等待一段时间,在 KubeSphere 界面的 default 项目中可以看到 orion-server 的 Pod。 + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20200116180620.png) + +### 安装 Orion Client 应用 + +Orion Client 将安装在物理 GPU 节点,并且使用一个 Jupyter Notebook 作为 Client 应用来使用 vGPU。在 `deploy-client.yaml` 中添加标签,并且参考如下修改 args: + +> - resource limit: 可以设置应用能使用的 virtaitech.com:gpu 的数目; +> - ORION_GMEM:容器内应用申请的 vGPU 显存大小。 + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20200116180912.png) + +``` +$ kubectl create -f deploy-client.yaml +``` + +执行完之后,等待一段时间,default 项目中可以看到 orion-client 的 Pod。 + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20200116181303.png) + +新建一个 deploy-service.yaml 文件用来为 orion-client 创建服务,内容如下: + +``` +kind: Service +apiVersion: v1 +metadata: + name: orion-client + labels: + app: jupyter + annotations: + kubesphere.io/serviceType: statelessservice +spec: + ports: + - name: tcp-8888 + protocol: TCP + port: 8888 + targetPort: 8888 + nodePort: 30110 + selector: + app: jupyter + type: NodePort + externalTrafficPolicy: Cluster +``` + +其中 labels 与 deploy-client.yaml 中的 Pod 一致,NodePort 为需要暴露的外网服务 +然后执行如下命令创建服务: + +``` +kubectl create -f deploy-service.yaml +``` + +此时可通过外网访问 Jupyter Notebook。查看 orion-client 的日志拿到 token,即可登录 Jupyter Notebook。 + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20200116183236.png) + +## 训练一个简单的 CNN 模型 + +以下将在 Jupyter Notebook 训练一个简单的 CNN 模型实现 mnist 手写数字分类。 + +1. 在 Jupyter Notebook 页面点击 `new-python3`。 + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20200116184405.png) + +2. 将 `mnist.txt` 文件中的内容拷贝到上面新建的文件中。鼠标放到代码上,点击运行,运行结果如下: + +> 提示:**mnist.txt** 文件下载地址:https://kubesphere-docs.pek3b.qingstor.com/files/AI/mnist.txt + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20200116184421.png) + +3. 训练的过程中,我们可以在宿主机上通过 nvidia-smi 工作监视物理 GPU 的使用情况: + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20200116204740.png) + +4. 从图中可以看到,真正使用物理 GPU 的进程是 Orion Server 的服务进程  `/usr/bin/oriond`,而不是容器中正在执行 TensorFlow 任务的 Python 进程。这表明容器中的应用程序使用的是 Orion vGPU 资源,对物理 GPU 的访问完全由 Orion Server 所接管。 + +## GPU 深度学习训练测试:人脸识别 + +1. 在 Jupyter 页面上传 `facenet.tar` 文件: + +> 提示:facenet 下载地址: https://kubesphere-docs.pek3b.qingstor.com/files/AI/facenet.tar + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20200116190941.png) + +2. 进入 `orion-client` 容器: + +``` +$ kubectl exec -it orion-client-td2jl -n default /bin/bash +``` + +3. 安装 Python 依赖包: + +``` +$ pip3 install scikit-image==0.10 +$ pip3 install numpy==1.16.0 +``` + +4. 解压文件 facenet.tar 文件: + +``` +$ tar xvf facenet.tar +``` + +5. 在 Jupyer 页面进入 `facenet/src`,点击 `facecomp.ipynb`: + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20200116190957.png) + +6. 打开 facecomp.ipynb 后,鼠标放到代码中,点击运行,在提示输入 `model file path` 时,输入预训练权重路径 `20180408-102900`,按下 Enter 键: + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20200116191008.png) + +7. 提示输入需要计算的照片时,输入 `a1.jpg a2.jpg b1.jpg b2.jpg c1.jpg c2.jpg` (这里随机选择了 VGGFace2 数据集中 3 个人共 6 张照片作为示例),按下 Enter 键。 + +将计算并显示 6 张人脸照片相互之间的距离,同一个人的照片,距离较近。如下图所示: + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20200116191053.png) + +8. 训练的过程中,我们可以在宿主机上通过 `nvidia-smi` 工作监视物理 GPU 的使用情况: + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20200116191110.png) + +9. 结论与上一个训练相同,真正使用物理 GPU 的进程是 Orion Server 的服务进程  `/usr/bin/oriond`,表明容器中的应用程序使用的是 Orion vGPU 资源。 + +## 总结 + +本文通过 Step-by-step 向大家介绍了 vCPU,以及如何使用 **KubeSphere 容器平台** 在 Kubernetes 之上安装部署 Orion vGPU,并使用官方 TensorFlow 的两个示例进行模型训练与推理,最终演示了 vGPU 的第一个应用场景 **Docker 容器中使用本地节点 GPU 资源**。 + +充分证明了 vGPU 能够兼容已有的 AI 应用和 CUDA 应用,无需修改已有应用程序。并且,借助 Orion vGPU 对 GPU 资源池的管理和优化,提高了整个云和数据中心 GPU 的利用率和吞吐率。 + +后续我们将推出第二篇文章并结合示例说明 vGPU 的另一个典型应用场景 **如何通过 RDMA 使用远程节点 GPU 资源**。 + +## 参考 + +- [VirtAI Tech 官网](https://virtai.tech/) +- [GitHub virtaitech/orion](https://github.com/virtaitech/orion) +- [NVIDIA 虚拟 GPU 技术](https://www.nvidia.cn/data-center/virtual-gpu-technology/) diff --git a/content/zh/blogs/kubesphere-release-note-post.md b/content/zh/blogs/kubesphere-release-note-post.md new file mode 100644 index 000000000..c400d392a --- /dev/null +++ b/content/zh/blogs/kubesphere-release-note-post.md @@ -0,0 +1,86 @@ +--- +title: 'KubeSphere 容器平台发布 2.1.1,全面支持 Kubernetes 1.17' +tag: 'Kubernetes,release,kubesphere' +createTime: '2020-02-24' +author: 'Feynman' +snapshot: 'https://pek3b.qingstor.com/kubesphere-docs/png/20200224093525.png' +--- + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20200224093525.png) + +农历二月二,KubeSphere 开源社区激动地向大家宣布,KubeSphere 容器平台 2.1.1 正式发布! + +KubeSphere 作为 **开源的企业级容器平台**,对 2.1.1 版本定义的是 **进一步增强生产可用性**,修复了多个组件的 Bug,升级了内置的多个开源组件。借助 KubeSphere,您可以快速安装与管理原生的 Kubernetes,KubeSphere 2.1.1 已支持至 Kubernetes 1.17,帮助您上手 Kubernetes 新版本中新增的特性。并且,还向前兼容与支持 Kubernetes 1.17 之前的 3 个版本,您可以按需进行安装。 + +KubeSphere 能够帮助企业快速构建一个功能丰富的容器云平台。让企业在享受 Kubernetes 的弹性伸缩与敏捷部署的同时,还可以在容器平台拥有 IaaS 平台的存储与网络能力,获得与 IaaS 平台一样稳定的用户体验。比如,我们在 KubeSphere 2.1.1 新增了对阿里云与腾讯云块存储插件的集成,支持为 Pod 挂载公有云的存储,为有状态应用提供更稳定的持久化存储的能力。 + +除此之外,我们还将安装步骤再一次简化。2.1.1 简化了在已有 Kubernetes 上安装的步骤,无需再像 2.1.0 安装一样,配置集群 CA 证书路径。并且,也将 etcd 监控作为了可选安装项。真正实现了一条命令即可在已有的 Kubernetes 集群上快速安装 KubeSphere。 + +关于 2.1.1 的更新详情,请参考 [Release Note](https://kubesphere.com.cn/docs/v2.1/zh-CN/release/release-v211/)。 + +下面演示两种最简单的安装方法,解锁如何最快尝鲜 KubeSphere 2.1.1。 + +## 如何在 Linux 快速安装 2.1.1 + +1. 本文将演示 All-in-One 安装,请准备一台干净的机器(虚拟机或物理机),安装前关闭防火墙,并确保您的机器符合以下的最小要求: + +- 机器配置: + + - CPU: 最小化安装需 2 Cores;完整安装需 8 Cores + - Memory: 最小化安装需 4 GB;完整安装需 16 GB + +- 操作系统: + + - CentOS 7.4 ~ 7.7 (64-bit) + - Ubuntu 16.04/18.04 LTS (64-bit) + - RHEL 7.4 (64-bit) + - Debian Stretch 9.5 (64-bit) + +2. 下载 `KubeSphere 2.1.1` 安装包至待安装机器,进入安装目录。 + +> 提示:Installer 默认仅开启最小化安装,若机器资源充足,请在 `conf/common.yaml` 中开启可选功能组件,将其设置为 true,再进行安装。 + +```bash +curl -L https://kubesphere.io/download/stable/v2.1.1 > installer.tar.gz \ +&& tar -zxf installer.tar.gz && cd kubesphere-all-v2.1.1/scripts +``` + +3. 建议使用 `root` 用户安装,执行 `install.sh` 脚本,输入 `1` 选择第一种即 all-in-one 模式。 + +```bash +./install.sh +``` + +请耐心等待,当看到 `"Successful"` 的日志与登录信息提示,则说明 KubeSphere 安装成功,请使用日志提示的管理员账号登陆控制台。 + + +## 如何在 Kubernetes 安装 2.1.1 + +请确保您的 Kubernetes 集群满足以下前提条件: + +> - `Kubernetes` 版本: `1.15.x ≤ K8s version ≤ 1.17.x`; +> - `Helm`版本: `2.10.0 ≤ Helm Version < 3.0.0`(不支持 helm 2.16.0),且已安装了 Tiller,(v3.0 将支持 Helm v3); +> - 集群已有默认的存储类型(StorageClass) +> - 集群能够访问外网。 + +若您的集群可用的资源符合 CPU > 1 Core,可用内存 > 2 G,可以参考以下命令开启 KubeSphere 最小化安装: + +```yaml +kubectl apply -f https://raw.githubusercontent.com/kubesphere/ks-installer/master/kubesphere-minimal.yaml +``` + +若您的集群可用的资源符合 CPU ≥ 8 Core,可用内存 ≥ 16 G,建议参考以下命令开启 KubeSphere 完整安装,即开启所有功能组件的安装: + +```yaml +kubectl apply -f https://raw.githubusercontent.com/kubesphere/ks-installer/master/kubesphere-complete-setup.yaml +``` + +查看滚动刷新的安装日志,请耐心等待安装成功。当看到 `"Successful"` 的日志与登录信息提示,则说明 KubeSphere 安装成功,请使用日志提示的管理员账号登陆控制台。 + +```bash +kubectl logs -n kubesphere-system $(kubectl get pod -n kubesphere-system -l app=ks-install -o jsonpath='{.items[0].metadata.name}') -f +``` + +## 如何升级至 2.1.1 + +升级前需要同步老版本的配置修改,请参考官网文档下的升级指南。 diff --git a/content/zh/blogs/kubesphere-values.md b/content/zh/blogs/kubesphere-values.md new file mode 100644 index 000000000..98f8aff29 --- /dev/null +++ b/content/zh/blogs/kubesphere-values.md @@ -0,0 +1,79 @@ +--- +title: '一文说清 KubeSphere 容器平台的价值' +tag: 'DevOps,Kubernetes,KubeSphere,Observability,microservice' +createTime: '2020-04-10' +author: 'Feynman, Ray' +snapshot: 'https://pek3b.qingstor.com/kubesphere-docs/png/20200410130334.png' +--- + +KubeSphere 作为云原生家族 **后起之秀**,开源近两年的时间以来收获了诸多用户与开发者的认可。本文通过大白话从零诠释 KubeSphere 的定位与价值,以及不同团队为什么会选择 KubeSphere。 + +## 对于企业 KubeSphere 是什么 + +KubeSphere 是在 Kubernetes 之上构建的 **多租户** 容器平台,以应用为中心,提供全栈的 IT 自动化运维的能力,简化企业的 DevOps 工作流。使用 KubeSphere 不仅能够帮助企业在公有云或私有化数据中心快速搭建 Kubernetes 集群,还提供了一套功能丰富的向导式操作界面。 + + + +KubeSphere 能够帮助企业快速构建一个功能丰富的容器云平台,让企业在享受 Kubernetes 的弹性伸缩与敏捷部署的同时,还可以在容器平台拥有 IaaS 平台的存储与网络能力,获得与 IaaS 一样稳定的用户体验。比如在 KubeSphere 2.1.1 新增了对阿里云与腾讯云块存储插件的集成,支持为 Pod 挂载公有云的存储,为有状态应用提供更稳定的持久化存储的能力。 + +![对于企业 KubeSphere 是什么](https://pek3b.qingstor.com/kubesphere-docs/png/20200410133408.png) + +在日常的运维开发中,我们可能需要使用与管理大量的开源工具,频繁地在不同工具的 GUI 和 CLI 窗口操作,每一个工具的单独安装、使用与运维都会带来一定的学习成本,而 KubeSphere 容器平台能够统一纳管与对接这些工具,提供一致性的用户体验。这意味着,我们不需要再去多线程频繁地在各种开源组件的控制面板窗口和命令行终端切换,极大赋能企业中的开发和运维团队,提高生产效率。 + +![统一纳管工具](https://pek3b.qingstor.com/kubesphere-docs/png/20200410133506.png) + +## 对于开发者 KubeSphere 是什么 + +有很多用户习惯把 KubeSphere 定义为 “云原生全家桶”。不难理解,KubeSphere 就像是一个一揽子解决方案,我们设计了一套完整的管理界面,开发与运维在一个统一的平台中,可以非常方便地安装与管理用户最常用的云原生工具,从业务视角提供了一致的用户体验来降低复杂性。为了不影响底层 Kubernetes 本身的灵活性,也为了让用户能够按需安装,KubeSphere 所有功能组件都是可插拔的。 + +![对于开发者 KubeSphere 是什么](https://pek3b.qingstor.com/kubesphere-docs/png/20200410133832.png) + +KubeSphere 基于 [OpenPitrix](https://openpitrix.io/) 和 Helm 提供了应用商店,对内可作为团队间共享企业内部的中间件、大数据、APM 和业务应用等,方便开发者一键部署应用至 Kubernetes 中;对外可作为根据行业特性构建行业交付标准、交付流程和应用生命周期管理的基础,作为行业通用的应用商店,可根据不同需求应对不同的业务场景。在 3.0 版本还将支持计量 (Metering),方便企业对应用与集群资源消耗的成本进行管理。 + +![KubeSphere 应用商店](https://pek3b.qingstor.com/kubesphere-docs/png/20200410133902.png) + +## 对于运维 KubeSphere 是什么 + +可观察性是容器云平台非常关键的一环,狭义上主要包含监控、日志和追踪等,广义上还包括告警、事件、审计等。对于 Kubernetes 运维人员来说,通常需要搭建和运维一整套可观察性的技术架构,例如 Prometheus + Grafana + AlertManager、EFK 等等。并且,企业通常还需要对不同租户能够看到的监控、日志、事件、审计等信息,实现按不同租户隔离,这些需求的引入无疑会增大企业的运维成本与复杂性。 + +KubeSphere 能够帮助运维人员基于 Kubernetes 快速搭建一套满足云原生可观察性标准的技术架构,支持在一个统一的平台纳管这些组件,或对接外部已有的组件。KubeSphere 能够在一套管理界面中,实现从基础设施层级到容器微服务层级的多维度日志与监控,支持逐级下钻定位异常资源,并且能够满足多租户隔离的需求。在 3.0 版本还将持续增强可观察性,近一步丰富事件与审计的可视化管理能力。 + +![对于运维 KubeSphere 是什么](https://pek3b.qingstor.com/kubesphere-docs/png/20200410133938.png) + +## 对于 DevOps 团队 KubeSphere 是什么 + +对于 DevOps 团队而言,日常工作除了开发一些自动化的工具之外,还需要运维与管理众多开源工具链。DevOps 本身作为一个很广义的方法论,也可以被认为是一种文化,很多 DevOps 团队在落地过程中,也会遇到各种各样问题,例如 CI/CD 工具繁多、涉及人员和环境较多、流程相对复杂等等。 + +![对于 DevOps 团队 KubeSphere 是什么](https://pek3b.qingstor.com/kubesphere-docs/png/20200410134006.png) + +我们选择以工具型产品的形式,将 DevOps 在 KubeSphere 中落地。KubeSphere DevOps 系统选择 Jenkins 作为其 CI/CD 引擎,借助 Jenkins 丰富的插件体系和易于进行扩展开发的特性,帮助 DevOps 团队在一个统一的平台中,打通开发、测试、构建、部署、监控、日志与通知等流程。KubeSphere 为 DevOps 团队打造了以容器为载体的端到端的应用交付平台,实现从项目管理、应用开发、持续集成、单元测试、制品构建到应用的生产交付,所有的流程都是一个完整的闭环。 + +![KubeSphere DevOps](https://pek3b.qingstor.com/kubesphere-docs/png/20200410134030.png) + +基于 Kubernetes,KubeSphere DevOps 充分利用和释放 Kubernetes 动态扩展的能力。例如,我们在内置的 DevOps 系统使用了 Jenkins Kubernetes 的动态 Agent,即默认全部使用动态的 Kubernetes Slave,这样的方案相较于传统虚拟机上的 Jenkins 要更加灵活敏捷。同时,在 KubeSphere DevOps 中内置了用户常用的 Agent 类型,例如 Maven、Node.js、Go 等,并且还支持用户自定义与扩展的 Agent 类型。 + +![KubeSphere DevOps](https://pek3b.qingstor.com/kubesphere-docs/png/20200410134046.png) + +我们将内置的 Jenkins 与 KubeSphere 账户打通,满足企业对 CI/CD 流水线多租户隔离与统一认证的需求。另外,KubeSphere DevOps 支持创建 InSCM 与 OutOfSCM 两种形式的流水线。这样能很好地兼容项目已有的 Jenkinsfile,或使用图形化编辑流水线。 + +![KubeSphere 流水线](https://pek3b.qingstor.com/kubesphere-docs/png/20200410134153.png) + +业务开发者即使还没有深入了解 Docker 与 Kubernetes 的机制,也可以借助 KubeSphere 内置的自动化 CD 工具,如 Binary to Image 和 Source to Image。用户只需要提交一个仓库地址,或上传 JAR/WAR/Binary 等二进制文件,即可快速将制品打包成 Docker 镜像并发布到镜像仓库,最终将服务自动发布至 Kubernetes 中,无需编写一行 Dockerfile。并且,在自动构建的过程中,能够生成动态日志,帮助开发者快速定位服务构建与发布的问题。 + +![Binary/Source to Image](https://pek3b.qingstor.com/kubesphere-docs/png/20200410134220.png) + +## 对于运营 KubeSphere 是什么 + +在产品新版本发布前,运营团队通常需要引入一部分流量对新版本灰度测试。灰度发布可以保证整体系统的稳定,在初始灰度的时候就可以对新版本进行测试,方便及时发现和调整问题,以验证产品的可行性和收集用户反馈。 + +![KubeSphere 灰度发布](https://pek3b.qingstor.com/kubesphere-docs/png/20200410134244.png) + +KubeSphere 基于 Istio 提供了蓝绿部署、金丝雀发布、流量镜像等三种灰度策略,无需修改应用的服务代码,即可实现灰度、流量治理、Tracing、流量监控、调用链等服务治理功能,即让产品的迭代能够按照不同的灰度策略对新版本进行线上环境的测试,并且能够在服务拓扑与 Tracing 中发现微服务间互相请求的网络问题。 + +![KubeSphere service mesh](https://pek3b.qingstor.com/kubesphere-docs/png/20200410134326.png) + +## 如何安装 KubeSphere + +KubeSphere 支持部署和运行在包括 公有云、私有云、虚机、物理机 和 Kubernetes 等任何基础设施之上,并支持在线与离线安装,可参考 [KubeSphere 官方文档](https://kubesphere.com.cn/docs/zh-CN/installation/intro/) 进行安装。 diff --git a/content/zh/blogs/microservice-blog.md b/content/zh/blogs/microservice-blog.md new file mode 100644 index 000000000..1df88ccb2 --- /dev/null +++ b/content/zh/blogs/microservice-blog.md @@ -0,0 +1,123 @@ +--- +title: '微服务进阶之路 容器落地避坑指南' +tag: 'Istio,微服务' +createTime: '2018-04-16' +author: 'Ray Zhou, Calvin' +snapshot: 'https://pek3b.qingstor.com/kubesphere-docs/png/20190930131109.png' +--- + +微服务架构相对于单体架构有很大的变化,也产生了一些新的设计模式,比如 sidecar,如何开发一个微服务应用是一件有很大挑战性的事情,我们经常会听到有人讨论如何划分微服务,多细的颗粒度才是微服务等问题。初学者经常会处于一个“忐忑不安”的状态,所以我们急需要知道如何才能走上正确的微服务道路,或者需要一些最佳实践指导我们如何设计、开发一个微服务应用。 + +## 不骄不躁不跟风 知己知彼方可百战不殆 + +虽然现在已经进入到一个不谈微服务就落伍的时代,但作为 IT 从业者,我们一定要站在切身利益出发,多思考几个“为什么”,不要急于跟风。原因很简单,不管外面如何风吹雨打,只要你的房子足够结实、安全、舒服,那一般情况下就不需要拆除重建,所以在决定继续沿用单体架构还是转向微服务架构之前,我们一定要做两件事情: + +### 第一件事,从外部了解两种架构各自的优劣: + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20190930125405.png) + +可以看到,单体应用并不是一无是处。 + +### 第二件事,审视我们自己的业务: + + +- 上述单体架构列出的一些问题是否已经严重影响了我们的业务? +- 企业新的业务系统是否要满足快速迭代、弹性等需求? +- 团队内是否有 DevOps 氛围? +- 企业内是否有足够的动力和技术储备去接触新的技术? + + +了解了单体应用和微服务应用的优劣特点,分析了企业自身的业务诉求和实际情况,最终还是决定转型微服务架构,那么我们也要清楚这不是一朝一夕的事情,需要分阶段逐步推进。 + + +## 蒙眼狂奔不可取 循序渐进方可顺利进阶 + +### 第一阶段试炼—— 开发新应用 + + +对于初次接触微服务的企业,选择新应用入手是正确的方式。 + +第一步可以选择 web-scale、无状态类型的新应用上手,比如基于 nginx 的网站、文档等,这类应用非常简单且容易实现,而且能体验到微服务在容器平台上的各种功能。 + +有了一定的经验之后,第二步就可以开发有状态类型的新应用,有状态服务的最大挑战就是数据管理。 + +敲重点,跟以往单体应用的共享数据库不同,微服务应用中的每一个服务“独享”自己的数据库,服务之间需要通过 API、事件或消息传递的方式来相互访问对方的数据,而不是通过直接访问对方数据库的方式。 + +换句话说,理想中的微服务是封装自己的数据,通过API暴露数据出去,从而避免数据耦合,这样每个微服务的数据格式发生变化也不影响其它微服务的数据调用。开发过和升级过大型企业单体应用的人对此会深有体会,一旦有人改变了数据库 schema,整个应用都有可能启动不起来,团队开发效率会大大降低。 + +**微服务架构并不尽善尽美,适合自己的方案才是王道。** + +不难理解,微服务数据是牺牲强一致性而通过最终一致性的方式来管理,这对数据的划分带来很大难度,比如不能再用 join 的方式访问不同服务之间的数据表,实际当中也比较难做到或者做起来很麻烦,现在也没有成熟且好用的库或框架提供微服务的数据管理,而且某些应用确实需要强一致性。 + + + +**而此时,我们不能通盘否定此类应用微服务化的可行性,应该适当折中或“妥协”,采用 miniservice。** + +Miniservice 在开发与部署的独立性和敏捷性方面类似于微服务(microservice),但没有微服务那么强的约束。通常情况下,一个 miniservcie 可以提供多个功能,这些功能之间可以共享数据库。这个时候千万不要害怕混合架构,不要害怕自己的微服务应用是否“正统”,“think big,start small,move fast“才是我们应该遵循的哲学。 + +因此,一个企业应用里既有 microservice 也有 miniservice,甚至有单体部分(可以称之为 macroservice)都是可以接受的。 + +以一个电商平台举例,在整个场景里面,业务开发人员面对的主要压力来自前端频繁的变动,因为要应对频繁的促销、推广、降价等活动,所以面对消费者最前端的业务需要快速迭代。消费者会不停的浏览商品,最终产生交易的请求数量要远低于获取商品信息的请求数量,因此将前端业务无状态化,进行微服务拆分、解耦,便可以快速应对市场变化,灵活做出改变。 + +那是不是把整个平台都做到微服务级别会变得更好?答案是“不确定”,因为当微服务量级到达一定程度,由此产生的管理和运维压力是指数级增长的。而实际上,对于有些业务来讲也没有必要微服务化,比如很多电商平台都有 2B 的业务,其业务变化的频度和压力没有 2C 那么大,那以 macroservices 或者 miniservices 的方式去交付也是可以的。 + +**开发人员应该分析在整个应用架构体系中,哪些适合微服务化,哪些亟需微服务化。** + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20190930125610.png) + + +## 实践出真知 + +在上面的电商案例中,我们提到了服务无状态化,之所以期望服务无状态化,是因为无状态应用可以做到快速的扩缩容,可以应对井喷流量,可以最大效率的利用计算资源。 + +我们经常听到,以无状态为荣,以有状态为耻,说的就是对于一个服务要尽量无状态化它,比如用户 session 管理,以前我们在业务逻辑模块进行管理,导致这些模块不能按照无状态方式任意伸缩。我们可以把这些 session 的管理抽取出来放到一个高可用或分布式的缓存中管理,业务模块通过调用API的方式去获取 session,这样就实现了这些模块的无状态化。 + +但这并不意味着所有服务都做到无状态才是最好的,开发者要细细思考自己的业务模型并进行服务拆分,不要为了无状态而无状态,因为总是会存在有状态服务的。 + + +### 第二阶段进阶 —— 改造遗留应用 + + +如果我们经过认真思考后仍决定对遗留应用进行微服务化,比如需要新增功能、快速迭代现有功能等,那么最好遵循一些最佳实践经验。显然,另起炉灶开发一套新的系统不太现实,失败的概率非常高。 + +第一点注意:新增功能点不能再在原有单体应用基础上开发,而是需要按照微服务方式开发,但由于这个微服务是隶属于原来单体应用的一部分功能,所以通常情况需要访问单体应用的数据,这个时候需要通过API的方式访问,以防止二者之间发生紧耦合。对于单体部分来说,无论是采用 Facade,还是 Adapter 或 Translator 模式提供 API,都是为新增的微服务模块提供松耦合的访问方式。 + +第二点注意:对于已有的单体部分也可以逐步微服务化,可选择经常变化、需要快速迭代满足用户需求的部分着手进行改造。经过几轮改造后要么整体替换掉原单体应用,要么剩下的是稳定不变的单体部分,周围就都是改造过的微服务混合架构了。 + +### 第三阶段收放自如 —— Service Mesh + +Service Mesh 是微服务架构的一部分,它本质上是一个分布式计算中间件,通过拦截流量和安置策略来管理和优化服务之间的通信,使得服务变得更加健壮和安全。通常会提供微服务之间认证、鉴权、加密、服务发现、请求路由、负载均衡、服务自愈等功能。 + +部署微服务应用,Service Mesh 是必不可少的部分。这是因为微服务应用是一个分布式的应用,因此相对于单体应用来说在稳定性、可管理性等方面都有很大难度,需要有 Service Mesh 来管理帮助服务变得更加健壮和安全。 + + +因此,Service Mesh 选型也是比较重要的,经常听到有人纠结是选择 Istio 还是 Spring Cloud 等。我们认为 Istio 是 service mesh 的发展方向,从架构来说,它解耦了控制平面和数据平面,使得开发者可以专注于应用业务逻辑的开发,而复杂的分布式应用服务之间的通信交给 service Mesh 来控制。 + +Spring Cloud 在架构设计理念上是落后的,试想一下,开发者在开发微服务的时候还要思考如何在代码中实现熔断、灰度发布、负载均衡等问题,负担是非常重的。 + +更重要的是 Spring Cloud 类型的 Service Mesh 只支持 Java 语言,完全违背微服务可以任选语言开发的主张,而且有 Vendor lock-in 嫌疑。 + +Istio 身上鲜明的标签很多:天然适合 Kubernetes 平台,不侵入代码,无语言绑定,但不得不承认,Istio 还在发展过程当中,目前也有一些问题亟待解决: + +- 性能依然不够理想 + +基于 Istio 实现的微服务,由于虚拟化、转发等因素造成的性能损耗依然过大,不过积极的方面是我们看到一方面这是社区持续改进的重点,另一方面我们看到大家在做一些有效的尝试,比如通过 cilium 做 service mesh 的 proxy,提升性能; + +- 门槛高 + +Istio 虽然控制面做的很优秀,但上手成本依然很高,很多企业用户还处在容器化改造阶段,以一种复杂面貌去呈现是很难很快融入企业 IT 架构中的; + +- 落地实践少 + +虽然社区火热,被谈论的热度很高,但企业用户或者在观望,或者在尝试,我们能看到的是有技术实力的互联网公司将 Istio 中的某个组件拆解出来,或改造、或接入他们现有微服务治理平台,但这又会造成一种和社区主分支不一致的问题,为将来能否和社区保持一致带来些许担心,是否会走上厂商绑定的老路还需要观察。 + +值得一提的是,在2018年上海 KubeCon 大会上,Google 的开发者讲述了在美国三家公司成功将 Istio 用于生产的案例,相信类似的事情会发生的越来越多,也期待今年上海的 KubeCon 能看到更多来自 Istio 的分享。 + +虽然 Istio 存在上述问题,但我们更应看到其社区正在飞速增长,就好比一两年前 k8s、docker swarm 和 Mesos 之争一样,那个时候 k8s 强大的生态活跃度为它最终胜利打下了良好的基础,我们认为 Istio 就是在 service mesh 领域的 k8s,未来很有可能会赢得这个领域的主导地位。 + +当一个应用的微服务越来越多的时候,service mesh 变得非常重要,而且目光看得更远一些,随着 FaaS 步入业务开发者的视野,大家越来越享受这种便捷、灵活的开发方式,这意味着以服务视角的开发模式会越来越流行,因此 service mesh 框架会变得越来越重要。 + +综上所述,通过 Istio 构建微服务治理屏幕,学习曲线起点比较高,运维也非常麻烦,运维人员关注的是功能的输出,比如熔断、限流、灰度发布等,但 Istio 要求他们先要部署组件,编辑 yaml,了解各种抽象的参数,这就好比在看 3D 电影前,让观众自己先要组装 3D 眼镜一样。 + + +因此,微服务进阶之路道阻且长,企业需要一个平台级的容器产品,可以从业务视角来管理微服务的可视化工具或者平台,降低用户的学习和运维成本,提高用户的业务价值输出能力,帮助用户重塑数字化时代核心竞争力。 diff --git a/content/zh/blogs/netapp.md b/content/zh/blogs/netapp.md new file mode 100644 index 000000000..37f41cbaa --- /dev/null +++ b/content/zh/blogs/netapp.md @@ -0,0 +1,133 @@ +--- +title: 'NetApp 存储在 KubeSphere 上的实践' +tag: 'NetApp,存储' +createTime: '2019-09-12' +author: 'Forest Li' +snapshot: 'https://pek3b.qingstor.com/kubesphere-docs/png/20190930151339.png' +--- + +[NetApp](https://www.netapp.com/cn/index.aspx) 是向目前的数据密集型企业提供统一存储解决方案的居世界最前列的公司,其 Data ONTAP是全球首屈一指的存储操作系统。NetApp 的存储解决方案涵盖了专业化的硬件、软件和服务,为开放网络环境提供了无缝的存储管理。 +**Ontap**数据管理软件支持高速闪存、低成本旋转介质和基于云的对象存储等存储配置,为通过块或文件访问协议读写数据的应用程序提供统一存储。 +**Trident**是一个由NetApp维护的完全支持的开源项目。以帮助您满足容器化应用程序的复杂**持久性**需求。 +[KubeSphere](https://github.com/kubesphere) 是一款开源项目,在目前主流容器调度平台 Kubernetes 之上构建的企业级分布式多租户**容器管理平台**,提供简单易用的操作界面以及向导式操作方式,在降低用户使用容器调度平台学习成本的同时,极大降低开发、测试、运维的日常工作的复杂度。 + + +## 整体方案 + +在 VMware Workstation 环境下安装 ONTAP; ONTAP 系统上创建 SVM(Storage Virtual Machine) 且对接 nfs 协议;在已有 k8s 环境下部署 Trident,Trident 将使用 ONTAP 系统上提供的信息(svm、managementLIF 和 dataLIF)作为后端来提供卷;在已创建的 k8s 和StorageClass 卷下部署 KubeSphere。 + +## 版本信息 + +- Ontap: 9.5 +- Trident: v19.07 +- k8s: 1.15 +- kubesphere: 2.0.2 + +## 步骤 + +主要描述ontap搭建及配置、Trident搭建和配置和kubesphere搭建及配置等方面。 + +## OnTap 搭建及配置 + +在 VMware Workstation 上 `Simulate_ONTAP_9.5P6_Installation_and_Setup_Guide` 运行,Ontap 启动之后,按下面操作配置,其中以 `cluster base license`、`feature licenses for the non-ESX build` 配置证书、e0c、ip address:`192.168.*.20、netmask:255.255.255.0`、**集群名: cluster1、密码**等信息。 + +`https://IP address`, + +以上设置的 IP 地址,用户名和密码: + +![netapp.png](https://ww1.sinaimg.cn/large/006bbiLEgy1g6t9q3s4kkj30yf0l8qsj.jpg) + +## Trident搭建及配置 + +* 下载安装包trident-installer-19.07.0.tar.gz,解压进入trident-installer目录,执行trident安装指令: + +``` +$ ./tridentctl install -n trident +``` + +* 结合ontap的提供的参数创建第一个后端vi backend.json。 + +``` +{ + "version": 1, + "storageDriverName": "ontap-nas", + "backendName": "customBackendName", + "managementLIF": "10.0.0.1", + "dataLIF": "10.0.0.2", + "svm": "trident_svm", + "username": "cluster-admin", + "password": "password" +} +``` + +* 生成后端卷 + +``` +$ ./tridentctl -n trident create backend -f backend.json +``` + +* 创建 StorageClass + +**storage-class-ontapnas.yaml** + +``` +apiVersion: storage.k8s.io/v1 +kind: StorageClass +metadata: + name: ontapnasudp +provisioner: netapp.io/trident +mountOptions: ["rw", "nfsvers=3", "proto=udp"] +parameters: + backendType: "ontap-nas" +``` +创建 StorageClass 指令`kubectl create -f storage-class-ontapnas.yaml` + +## KubeSphere 的安装及配置 + +* 在 Kubernetes 集群中创建名为 `kubesphere-system` 和 `kubesphere-monitoring-system` 的 namespace。 + +``` +$ cat < +``` + +透过 [Kubernetes DNS](https://kubernetes.io/docs/concepts/services-networking/service/#dns),在集群内部可以使用 ``mongodb-service.default:27017`` 访问到 mongodb 服务。 + +### 部署 Example App + +example-app 无需挂载存储卷,但容器的启动时需要必要的环境变量。在 env 中填入必要的环境变量,通过 mongodb-service.default 来访问 mongodb 服务。该端口无需暴露到主机上,service 类型选择使用 [ClusterIP](https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types)。 + +example-app.yaml +```yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + namespace: default + labels: + version: v1 + app: example-app + name: example-app-v1 +spec: + replicas: 1 + selector: + matchLabels: + version: v1 + app: example-app + template: + metadata: + labels: + version: v1 + app: example-app + spec: + containers: + - name: container-l6cx0m + image: leoendlessx/example-app:v0.1.0 + imagePullPolicy: IfNotPresent + ports: + - name: http-app + protocol: TCP + containerPort: 3000 + env: + - name: NODE_ENV + value: production + - name: MONGODB_URI + value: mongodb-service.default # 使 用kubernetes 内部 DNS 来访问 mongodb 服务 + - name: SECRET + value: asecretkey + serviceAccount: default + strategy: + type: RollingUpdate + rollingUpdate: + maxUnavailable: 25% + maxSurge: 25% + +``` + +在 kubernetes 集群中执行 kubectl 部署 +```shell +kubectl apply -f example-app.yaml +``` + +查看 Pod 状态及日志 +```shell +root@i-auleonob:/home/ubuntu# kubectl get pods +NAME READY STATUS RESTARTS AGE +example-app-v1-5678d8db79-7nhkd 1/1 Running 0 26s +mongodb-54f949cb5c-r48bj 1/1 Running 0 71m +root@i-auleonob:/home/ubuntu# kubectl logs example-app-v1-5678d8db79-7nhkd + +> conduit-node@1.0.0 start /root/demo +> node ./app.js + +Warning: connect.session() MemoryStore is not +designed for a production environment, as it will leak +memory, and will not scale past a single process. +Listening on port 3000 +``` + +example-app 程序已成功启动,现在需将服务暴露主机节点上访问,以便主机网络将端口映射到外网。service 类型选择 [NodePort](https://kubernetes.io/docs/concepts/services-networking/service/#nodeport) + +### 创建 Example App 服务到并暴露到主机 + +```yaml +apiVersion: v1 +kind: Service +metadata: + namespace: default + labels: &ref_0 + version: v1 + app: example-app + name: example-app +spec: + type: NodePort + sessionAffinity: ClientIP + selector: *ref_0 + ports: + - name: http-app + protocol: TCP + port: 3000 + targetPort: 3000 + +``` + +在 kubernetes 集群中执行 kubectl 创建服务 +```shell +kubectl apply -f example-app-service.yaml +``` + +查看服务详情 +```shell +root@i-auleonob:/home/ubuntu# kubectl describe svc/example-app +Name: example-app +Namespace: default +Labels: app=example-app + version=v1 +Annotations: kubectl.kubernetes.io/last-applied-configuration: + {"apiVersion":"v1","kind":"Service","metadata":{"annotations":{},"labels":{"app":"example-app","version":"v1"},"name":"example-app","names... +Selector: app=example-app,version=v1 +Type: NodePort +IP: 10.106.109.178 +Port: http-app 3000/TCP +TargetPort: 3000/TCP +NodePort: http-app 30375/TCP +Endpoints: 192.168.219.48:3000 +Session Affinity: ClientIP +External Traffic Policy: Cluster +Events: +``` + +在节点上访问: +```shell +root@i-auleonob:/home/ubuntu# curl 127.0.0.1:30375 +{"errors":{"message":"Not Found","error":{}}} +``` +可见 example-app 可以正常访问,不过仍需要确认是否能正常访问 mongodb。 + +> example-app 容器需要等待 mongodb service 可用时, 才可以正常启动。在 mongodb service 可用后, 手动删除旧的 example-app Pod 即可。 + +### 测试 Example App 服务 +#### 注册用户 +```shell +curl -X POST \ + 'http://127.0.0.1:30375/api/users' \ + -H 'Content-Type: application/json' \ + -H 'X-Requested-With: XMLHttpRequest' \ + -H 'cache-control: no-cache' \ + -d '{"user":{"email":"john@jacob.com", "password":"johnnyjacob", "username":"johnjacob"}}' +{"user":{"username":"johnjacob","email":"john@jacob.com","token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVkNzY3MmMzMzdjNGI5MTAwMGVhZmIzYyIsInVzZXJuYW1lIjoiam9obmphY29iIiwiZXhwIjoxNTczMjI3NzE1LCJpYXQiOjE1NjgwNDM3MTV9.24OGisacl8-n4SooYr8kdcAOYTBvz27sC1mUyU3VkKM"}} +``` + +#### 登录 +```shell +curl -X POST \ + 'http://127.0.0.1:30375/api/users/login' \ + -H 'Content-Type: application/json' \ + -H 'X-Requested-With: XMLHttpRequest' \ + -H 'cache-control: no-cache' \ + -d '{"user":{"email":"john@jacob.com", "password":"johnnyjacob"}}' +{"user":{"username":"johnjacob","email":"john@jacob.com","token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVkNzY3MmMzMzdjNGI5MTAwMGVhZmIzYyIsInVzZXJuYW1lIjoiam9obmphY29iIiwiZXhwIjoxNTczMjI3ODcwLCJpYXQiOjE1NjgwNDM4NzB9.a5p0mCLZLSNbTCECjK9j-5hrgg-tA7mI5iENKdik5Xc"}} +``` + +#### 创建 Article +```shell +curl -X POST \ + 'http://127.0.0.1:30375/api/articles' \ + -H 'Authorization: Token eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVkNzY3MmMzMzdjNGI5MTAwMGVhZmIzYyIsInVzZXJuYW1lIjoiam9obmphY29iIiwiZXhwIjoxNTczMjI3ODcwLCJpYXQiOjE1NjgwNDM4NzB9.a5p0mCLZLSNbTCECjK9j-5hrgg-tA7mI5iENKdik5Xc' \ + -H 'Content-Type: application/json' \ + -H 'X-Requested-With: XMLHttpRequest' \ + -H 'cache-control: no-cache' \ + -d '{"article":{"title":"How to train your dragon", "description":"Ever wonder how?", "body":"Very carefully.", "tagList":["dragons","training"]}}' +{"article":{"slug":"how-to-train-your-dragon-estl69","title":"How to train your dragon","description":"Ever wonder how?","body":"Very carefully.","createdAt":"2019-09-09T15:46:26.935Z","updatedAt":"2019-09-09T15:46:26.935Z","tagList":["dragons","training"],"favorited":false,"favoritesCount":0,"author":{"username":"johnjacob","image":"https://static.productionready.io/images/smiley-cyrus.jpg","following":false}}} +``` + +#### 获取所有 Articles +```shell +curl -X GET \ + 'http://127.0.0.1:30375/api/articles' \ + -H 'Authorization: Token eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVkNzY3MmMzMzdjNGI5MTAwMGVhZmIzYyIsInVzZXJuYW1lIjoiam9obmphY29iIiwiZXhwIjoxNTczMjI3ODcwLCJpYXQiOjE1NjgwNDM4NzB9.a5p0mCLZLSNbTCECjK9j-5hrgg-tA7mI5iENKdik5Xc' \ + -H 'Content-Type: application/json' \ + -H 'X-Requested-With: XMLHttpRequest' \ + -H 'cache-control: no-cache' +{"articles":[{"slug":"how-to-train-your-dragon-estl69","title":"How to train your dragon","description":"Ever wonder how?","body":"Very carefully.","createdAt":"2019-09-09T15:46:26.935Z","updatedAt":"2019-09-09T15:46:26.935Z","tagList":["dragons","training"],"favorited":false,"favoritesCount":0,"author":{"username":"johnjacob","image":"https://static.productionready.io/images/smiley-cyrus.jpg","following":false}}],"articlesCount":1} +``` + +通过测试可发现 example-app 与 mongodb 服务运行正常。 + + diff --git a/content/zh/blogs/openpitrix-insight.md b/content/zh/blogs/openpitrix-insight.md new file mode 100644 index 000000000..ab224bbf1 --- /dev/null +++ b/content/zh/blogs/openpitrix-insight.md @@ -0,0 +1,245 @@ +--- +title: 'OpenPitrix Insight' +author: 'Ray Zhou' +tag: '多云应用管理,Kubernetes' +createTime: '2018-03-27' +snapshot: 'https://pek3b.qingstor.com/kubesphere-docs/png/20190930131521.png' +--- + +云计算在今天已经被绝大多数的企业所采用,具知名云服务厂商 [RightScale 最近的调查](https://www.rightscale.com/blog/cloud-industry-insights/cloud-computing-trends-2018-state-cloud-survey)显示,已经有越来越多的厂商采用多云管理。客户有太多的理由来选择多云管理了,其中最大的原因莫过于采用单一的供应商,会导致被锁定。因此,如何管理多云环境,并在多云的环境下进行自动化,正成为众多企业的刚需,而在这其中,应用程序的管理显得尤为的重要。进一步讲,颇具挑战的是创建一个一站式的应用管理平台,来管理不同类型的应用程序,其中包括传统的应用(或者称之为单体应用,或者传统的主从、分片、peer-to-peer 架构的企业分布式应用)、微服务应用、以及近来发展迅猛的 Serverless 应用等,OpenPitrix 就是为了解决这些问题而生的。用一句话来描述 OpenPitrix: + +> OpenPitrix 是一款开源项目,用来在多云环境下打包、部署和管理不同类型的应用,包括传统应用、微服务应用以及 Serverless 应用等,其中云平台包括 AWS、Azure、Kubernetes、QingCloud、OpenStack、VMWare 等。 + +微服务,即众所周知的微服务架构,这是程序设计的必然趋势,企业创建新的应用时选择的主要方式。另外,开源项目 Kubernetes 已经成为事实上的[编排平台的领导者](https://www.cncf.io/blog/2017/06/28/survey-shows-kubernetes-leading-orchestration-platform/),其在自动化部署、扩展性、以及管理容器化的应用有着独特的优势。但是,仍然有大量的传统遗留应用用户想在毋须改变其架构的情况下迁入到云平台中,而且对很多用户来讲,采用微服务架构,或者是 Serverless 架构还是比较遥远的事情,所以,我们需要帮助这些用户将他们的传统应用迁入到云计算平台中,这也是 OpenPitrix 很重要的一个功能。 + +在2017年3月27日,QingCloud 发布 [AppCenter](https://appcenter.qingcloud.com/),一款旨在为传统企业应用开发商和云用户之间架设友好桥梁的平台,该平台最大的亮点在于其可以让开发者以极低的学习成本就可以将传统的应用程序移植到 QingCloud 中运行,并且具有云计算的所有特性,如敏捷性、伸缩性、稳定性、监控等。通常,一位开发者只需花上几个小时就可以理解整个工作流程,然后,再花一到两周的时间(这具体要取决于应用的复杂性)将应用移植到云平台中。该平台上线之后一直颇受用户的青睐和夸赞,但有一些用户提出更多的需求,希望将之部署到他们内部来管理他们的多云环境。为了满足用户的需求,QingCloud 将之扩展,即在多云的环境下管理多种类型的应用程序,并且采用开源的方法来进行项目的良性发展。 + +俗语有云:"知易行难",尽管 OpenPitrix 原始团队在云计算应用开发有着足够丰富的经验,并成功的开发出了稳定的商业化产品:AppCenter,要知道,等待在前方的依然有很多困难要克服。[OpenPitrix](https://github.com/openpitrix/openpitrix) 从一开始就是以开源的方式来进行,并且在2017年的8月份在 GitHub 上创建了组织和项目,一直到2018年2月24日才写下第一行功能代码,在此期间,团队的所有成员都在思考系统的每个关键点,这些讨论的细节均可在 GitHub 上[公开访问](https://github.com/openpitrix/openpitrix/issues)。 + +以上便是 OpenPitrix 项目的来龙去脉介绍,接下来会解释一些详细的功能和设计细节。 + +## 主要的功能 + +OpenPitrix 所希望实现的功能包括以下内容: + +* 支持多个云平台,如 AWS、Azure、Kubernetes、QingCloud、OpenStack、VMWare 等等; +* 云平台的支持是高度可扩展和插拔的; +* 支持多种应用程序的类型:传统应用、微服务应用、Serverless 应用; +* 应用程序的支持也是高度可扩展的,这也就意味着无论将来出现哪种新的应用程序类型,OpenPitrix 平台都可以通过添加相应的插件来支持它; +* 应用程序的仓库是可配置的,这也就意味着由 OpenPitrix 所驱动的商店,其应用均是可以用来交易的; +* 应用程序库的可见性是可配置的,包括公开、私有或仅让某特定的一组用户可访问,由 OpenPitrix 所驱动的市场,每个供应商都能够操作属于她/他自己的应用商店。 + +## 用户场景实例 + +OpenPitrix 典型的用户场景有: + +* 某企业是采用了多云的系统(包括混合云),要实现一站式的应用管理平台,从而实现应用的部署和管理; +* 云管平台(CMP)可以将 OpenPitrix 视为其其中一个组件,以实现在多云环境下管理应用; +* 可以作为 Kubernetes 的一个应用管理系统。OpenPitrix 和 Helm 有着本质上的不同,虽然 OpenPitrix 底层用了 Helm 来部署 Kubernetes 应用,但 OpenPitrix 着眼于应用的全生命周期管理,比如在企业中,通常会按照应用的状态来分类,如开发、测试、预览、生产等;甚至有些组织还会按照部门来归类,而这是 Helm 所没有的。 + +## 架构概览 + +OpenPitrix 设计的最根本的思想就是解耦应用和应用运行时环境(此处使用运行时环境代替云平台,下同),如下图所示。应用程序能够运行在哪个环境,除了需要匹配 provider 信息之外,还需要匹配应用所在仓库的选择器 (selector) 和运行时环境的标签 (label),即当某个最终用户从商店里选择了某个具体的应用,然后尝试部署它时,系统会自动选择运行时环境。如果有多个运行时环境可以运行此应用的话,则系统会弹出相应的对话框来让用户自行选择,更多设计细节请参考 [OpenPitrix 设计文档](https://github.com/openpitrix/openpitrix/tree/master/docs/design)。 + +![系统架构](https://raw.githubusercontent.com/openpitrix/openpitrix/master/docs/images/arch.png) + +## 应用程序仓库子系统 + +如上面架构概览图所示,仓库子系统分为三大组件:仓库管理 (Repo Manager)、仓库索引 (Repo Indexer)、仓库存储 (App Repo);其中仓库管理包括仓库服务 (Repo Service) 和其后端的数据库 (Repo DB),架构图如下所示。用户创建应用仓库时需配置的信息如:URL、凭证、是否可见等,通常是系统管理人员或开发者为平台创建仓库。仓库索引的守护进程会周期性地扫描新增的仓库、现有仓库的任何更新,并将信息更新到应用管理服务的数据库中。我们可以看出,仓库的存储是独立于特定的 OpenPitrix 平台的,所以,仓库存储的应用可以共享给任何基于 OpenPitrix 的应用管理平台使用。更多设计详情请参考 [OpenPitrix 仓库子系统设计](https://github.com/openpitrix/openpitrix/issues/96)。 + +![应用仓库架构](https://user-images.githubusercontent.com/4156721/38145007-d6abf540-3479-11e8-834f-9caae92a71ff.png) + +> 由仓库组织的应用,都可以作为独立资产由基于 OpenPitrix 的商店来售卖。 + +## 如何将传统的应用迁移到多云的环境 + +首先要申明的是,OpenPitrix 不会特别地去区分多云和混合云之间的差别,在本文中,在没有特别提示的情况下,多云意味着多个云环境,无论它们是公共云还是私有云,还是来自相同或不同的供应商。 + +### 规范 + +很显然,我们将大量借助 QingCloud AppCenter 的经验来实现在多云环境下“云化”传统应用,这其中包括规范在内。为了简单起见,我们在这里展示了一个不完整的 ZooKeeper 云化规范版本,如下所示,完整版本请参考 [AppCeneter 示例](https://github.com/QingCloudAppcenter/Zookeeper/tree/master/3.4.9),该规范很容易理解,文件 ```cluster.json.tmpl``` 定义了 ZooKeeper 集群信息,如名称、描述、多少节点(每个节点的 CPU、内存、存储、镜像、生命周期等),双花括号中的变量来自最终用户从 UI 输入的信息,这些变量是由文件```config.json```定义的。ZooKeeper 应用开发者将这两个文件打包上传到 OpenPitrix 平台,最终用户在部署应用的时候输入必要的信息、点击部署按钮即可。这个应用程序包(还包含语言文件)如同镜像是虚拟机的模板一样,它是一个应用程序的模板,只是它相比镜像更为的复杂罢了,因为它可能包括多个镜像,而且要定义应用程序集群的整个生命周期,还有,它还要支持自定义的监控、健康监测等等更多的功能。正如我们所看到的,开发者将传统应用移植到云平台中除了几个说明文件毋须任何的编码。 + +
cluster.json.tmpl for ZooKeeper + +``` +{ + "name": {{cluster.name}}, + "description": {{cluster.description}}, + "subnet": {{cluster.subnet}}, + "nodes": [{ + "container": { + "type": "kvm", + "zone": "pek3a", + "image": "img-svm7yple" + }, + "count": {{cluster.zk_node.count}}, + "cpu": {{cluster.zk_node.cpu}}, + "memory": {{cluster.zk_node.memory}}, + "volume": { + "size": {{cluster.zk_node.volume_size}} + }, + "services": { + "start": { + "cmd": "/opt/zookeeper/bin/zkServer.sh start;/opt/zookeeper/bin/rest.sh start" + }, + "stop": { + "cmd": "/opt/zookeeper/bin/rest.sh stop;/opt/zookeeper/bin/zkServer.sh stop" + } + } + }] +} +``` +
+ +
config.json for ZooKeeper + +``` +{ + "type": "array", + "properties": [{ + "key": "cluster", + "description": "ZooKeeper release 3.4.9 cluster properties", + "type": "array", + "properties": [{ + "key": "name", + "label": "Name", + "description": "The name of the ZooKeeper service", + "type": "string", + "default": "ZooKeeper", + "required": "no" + }, { + "key": "description", + "label": "Description", + "description": "The description of the ZooKeeper service", + "type": "string", + "default": "", + "required": "no" + }, { + "key": "subnet", + "label": "Subnet", + "description": "Choose a subnet to join", + "type": "string", + "default": "", + "required": "yes" + }, { + "key": "zk_node", + "label": "ZooKeeper Node", + "description": "role-based node properties", + "type": "array", + "properties": [{ + "key": "cpu", + "label": "CPU", + "description": "CPUs of each node", + "type": "integer", + "default": 1, + "range": [ + 1, + 2, + 4, + 8 + ], + "required": "yes" + }, { + "key": "memory", + "label": "Memory", + "description": "memory of each node (in MiB)", + "type": "integer", + "default": 2048, + "range": [ + 1024, + 2048, + 4096, + 8192, + 16384, + 32768 + ], + "required": "yes" + }, { + "key": "count", + "label": "Node Count", + "description": "Number of nodes for the cluster to create", + "type": "integer", + "default": 3, + "range": [ + 1, + 3, + 5, + 7, + 9 + ], + "required": "yes" + }, { + "key": "volume_size", + "label": "Volume Size", + "description": "The volume size for each node", + "type": "integer", + "default": 10, + "required": "yes" + }] + }] + }] +} +``` +
+ +### 架构 + +整个系统中最具挑战性的工作就是如何将上述的一套标准的传统应用软件包无需任何修改就能部署到多个云平台中,因为传统的应用均是基于虚拟机而非容器的。OpenPitrix 设计团队经过了激烈的[讨论](https://github.com/openpitrix/openpitrix/issues/111),最后总结出如下几个原则: + +* OpenPitrix 自身是可以部署到任何地方的。因此,该平台必须支持最终用户同时将应用程序部署到公共云和私有云中,这意味着 OpenPitrix 从架构必须支持能够通过公共互联网部署应用程序; +* 针对每个 IaaS 平台供应商的架构是一致的; +* 最终用户部署应用程序毋须任何麻烦的配置,这意味着对于最终用户而言,一切都是透明的,例如元数据服务的初始化。 + +经过反复的讨论后,我们提出了以下解决方案。首先解释一下架构中出现的一些术语。 + +* **Drone**:该组件由 agent 和 [confd](https://github.com/openpitrix/libconfd) 所构成,Confd 是自动配置 app 实例的守护进程,agent 负责和 Frontgate 的通信,例如来自最终用户发来的指令。agent 也会负责根据应用的状态启动和停止 confd。Drone 是预先安装到应用程序所在的每一个镜像中。 +* **Frontgate**:该组件包含 proxy 和 etcd,Etcd 是后端的存储,存储集群的信息包括集群名称、描述、多少节点、由最终用户发来的指令等。Proxy 连接 Pilot 和 Drone 的 agent,因为虚拟机是运行在 VPC 中,Pilot 无法和 Drone 直接进行通信,所以需要在它们二者之间设置一个 proxy。在有应用运行的 VPC 中会存在一个 Frontgate,这个 VPC 内的所有应用集群共享这个 Frontgate,这个 Frontgate 是当最终用户第一次部署应用程序时,系统自动创建的,且 Frontgate 对最终用户不可见。 +* **Pilot**:接受来自集群服务的指令和信息的组件,如创建集群等,并可以传递指令给 Frontgate,它还接收来自 Frontgate 上传上来的信息。 + +毫无疑问,工作流程很复杂。我们以部署一个应用程序为例来进行简要的说明,一般步骤如下: + +1. 最终用户发送请求到 API 网关,API 网关会将之转发给相应的服务,如集群服务; +2. 集群服务收到请求之后,将之放到 job 队列,job 控制器收到后将其分解成 task,然后放到 task 队列; +3. Task 控制器将 Task 从队列中提出,然后去调用特定的云平台 API,创建集群资源如主机; +4. 集群服务同样会给 Pilot 发送集群的元数据; +5. Pilot 转发信息给 Frontgate 的 proxy,然后 proxy 会将信息注册到后端的 Etcd; +6. 应用程序镜像内部的 Drone 的 Confd 会监测 etcd 的更新,然后自动更新应用配置; +7. 最后,Drone 中的 agent 为用户启动应用。 + +整个流程,如下图所示: + +![vm-based 架构](https://user-images.githubusercontent.com/4156721/38134552-2fbb8ea4-3446-11e8-90b5-a5f5c0e2d249.png) + +### 应用程序镜像 + +正如上面所阐述的,传统应用通常是部署到虚拟机中的,而微服务应用往往是进行容器化的。如果我们使用虚拟机来支持传统应用部署到多云环境中的话,会遇到非常大的挑战。这意味着应用的开发者或供应商在每一个环境中都需要上传或创建镜像,而这在现实中往往很难行得通,尤其是公有云供应商提供很多的 region 和 zone。鉴于此种情况,我们选择了在虚拟机中运行容器的方式来解决此问题,可以建立集中的容器镜像仓库,需要运行时直接拉到云平台中的虚拟机中即可。此种方式也有弊端,那就是在网络不好的地方,拉容器镜像就是一个大的问题,如果下载容器镜像的时间过长,对于用户的体验和耐心都是极大的挑战。要解决此问题,在每个云环境部署缓存或 mirror 是非常好的选择。第二个问题是开发人员需要知道 Docker,这似乎不是一个大问题,因为在我看来,掌握 Docker 是当今开发人员的基本技能。 + +但是,我们依然需要支持直接在 VM 中安装应用程序软件,并将 VM 分发到每个云环境中,原因如下。 + +* 有一些应用需要定制化 Linux 内核; +* 开发者没有掌握 Docker 技术,或者说因为额外的学习或开发成本,开发者并不愿意用 Docker 的方式将传统应用移植到云环境中; +* 最终用户没有意愿去创建一个诸如 Kubernetes 这样的容器编排集群去部署一个传统应用,或者是用户没有 Kubernetes 环境。 + +> 在第一个版本中,会在虚拟机中使用 Docker 的方式来解决应用程序镜像的分发问题,在下个版本中,将支持直接在 VM 中安装应用程序软件。 + +## 如何支持多种类型的应用 + +正如我们开始所说的,OpenPitrix 是支持多种类型的应用程序。当一个用户开始部署一个应用的时候,系统会自动识别应用类型并选择相应的插件去创建应用集群。我们用 provider interface 和 provider plugin 来支持不同类型应用以及将来可能出现的未知应用类型。系统目前有两大类应用类型:基于虚机的和基于容器的,前者是支持传统应用上云,这个我们已经在上一章节解释过了,现在我们解释一下 OpenPitrix 如何支持日益流行的基于互联网规模的应用程序:微服务和 Serverless。对于 OpenPitrix 的第一个版本,没有打算支持 Serverless,我们认为 Serverless 应用还没有标准,而且也没有看清楚谁将赢得最后的胜利。市场上没有与其他主要供应商兼容的产品或服务。那么这样的局面就是家家都是标准的制定者,所以,OpenPitrix 团队决定第一个版本暂时先不支持将 Serverless 应用部署到多云环境, 并持续关注 Serverless 最新标准的进展。 + +另外,在容器的编排方面,开源项目 Kubernetes 已经赢得了胜利,因此,OpenPitrix 会支持 Kubernetes。[Helm](https://github.com/kubernetes/helm) 是一个非常不错的 Kubernetes 包管理器,在第一版 OpenPitrix 中,我们使用 Helm 作为 Kubernetes 应用程序的部署工具,在下一版或许会直接采用 Kubernetes 的应用编排格式。 + +如下图所示,我们将 Helm 的客户端打包到 OpenPitrix 中,另外 Helm 的服务端组件 Tiller 也会作为 OpenPitrix 的组件,这样作为 OpenPitrix 的最终用户,根本就不需要学习任何关于 Helm 的内容,就可以将应用部署到 Kubernetes 中,然而,在撰写本文时,Helm 服务对于 Kubernetes 多集群的管理还尚待改善,详情见 issues [1586](https://github.com/kubernetes/helm/issues/1586)和[1918](https://github.com/kubernetes/helm/issues/1918),因此,在问题解决之前,我们会要求用户将 Tiller 安装到每个 Kubernetes 集群中。当最终用户配置 Kubernetes 集群时,系统将自动配置并测试 OpenPitrix 和 Kubernetes 集群之间的连通性。然后,用户就可以将 Kubernetes 应用程序部署到任意集群中了。 + +![k8s 应用架构](https://user-images.githubusercontent.com/4156721/38145101-4b53de6c-347a-11e8-8ec8-7532e946318b.png) + +## 总结 + +我们规划未来的 OpenPitrix 会增加更多的功能,例如: + +* 针对开发者的工作台,可以让开发者在此以极简的方式开发应用; +* 开发者可以查看使用其应用程序的所有状态包括统计信息; +* 计量计费功能 +* 各种报表功能 +* ...... + +OpenPitrix 将会逐步发展为多云环境下应用程序管理系统的全方位的解决方案。 diff --git a/content/zh/blogs/prow.md b/content/zh/blogs/prow.md new file mode 100644 index 000000000..bc56aab80 --- /dev/null +++ b/content/zh/blogs/prow.md @@ -0,0 +1,210 @@ +--- +title: '基于 Kubernetes 的 CI/CD 利器 — Prow 入门指南' +tag: 'CI/CD,Kubernetes' +createTime: '2019-08-20' +author: 'Magic Song' +snapshot: 'https://pek3b.qingstor.com/kubesphere-docs/png/20190930122613.png' +--- + + +**Prow**是k8s使用的CI/CD系统(),用于管理k8s的issue和pr。如果你经常去k8s社区查看pr或者提交过一些Pr后,就会经常看到一个叫**k8s-ci-bot**的机器人在各个Pr中回复,并且还能合并pr。在k8s-ci-bot中背后工作的就是Prow。Prow是为了弥补github上一些功能上的缺陷,它也是Jenkins-X的一部分,它具备这些功能: + +1. 执行各种Job,包括测试,批处理和制品发布等,能够基于github webhook配置job执行的时间和内容。 +2. 一个可插拔的机器人功能(**Tide**),能够接受`/foo`这种样式的指令。 +3. 自动合并Pr +4. 自带一个网页,能够查看当前任务的执行情况以及Pr的状况,也包括一些帮助信息 +5. 基于OWNER文件在同一个repo里配置模块的负责人 +6. 能够同时处理很多repo的很多pr +7. 能够导出Prometheus指标 + +Prow拥有自己的CI/CD系统,但是也能与我们常见的CI/CD一起协作,所以如果你已经习惯了Jenkins或者travis,都可以使用Prow。 + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20190930122309.png) + +## 安装指南 + +> 官方repo提供了一个基于GKE快速安装指南,本文将基于青云的Iaas搭建Prow环境。不用担心,其中大部分步骤都是平台无关的,整个安装过程能够很方便的在其他平台上使用。 + +### 一、 准备一个kubernetes集群 + +有以下多种方式准备一个集群 + +1. 利用kubeadm自建集群 +2. 在青云控制台上点击左侧的容器平台,选择其中的QKE,简单设置一些参数之后,就可以很快创建一个kubernetes集群。 +3. 将集群的kubeconfig复制到本地,请确保在本地运行`kubectl cluster-info`正确无误 + +### 二、 准备一个github机器人账号 +> 如果没有机器人账号,用个人账号也可以。机器人账号便于区分哪些Prow的行为,所以正式使用时应该用机器人账号。 + +1. 在想要用prow管理的仓库中将机器人账号设置为管理员。 +2. 在账号设置中添加一个[personal access token][1],此token需要有以下权限: + + + **必须**:`public_repo` 和 `repo:status` + + **可选**:`repo`假如需要用于一些私有repo + + **可选**:`admin_org:hook` 如果想要用于一个组织 +3. 将此Token保存在文件中,比如`${HOME}/secrets/oauth` +4. 用`openssl rand -hex 20`生成一个随机字符串用于验证webhook。将此字符串保存在本地,比如`${HOME}/secrets/h-mac` + +*注意最后两步创建的token一定需要保存好,除了需要上传到k8s,后续配置也要用到,用于双向验证* + +### 三、 配置k8s集群 +> 这里使用的default命名空间配置prow,如果需要配置在其他命名空间,需要在相关`kubectl`的命令中配置`-n`参数,并且在部署的yaml中配置命名空间。 +> 建议将[本repo](https://github.com/magicsong/prow-tutorial)克隆到本地,这个repo带有很多帮助配置Prow的小工具。 + + +1. 将上一步中创建token和hmac保存在k8s集群中 +```bash +# openssl rand -hex 20 > ${HOME}/secrets/h-mac +kubectl create secret generic hmac-token --from-file=hmac=${HOME}/secrets/h-mac +kubectl create secret generic oauth-token --from-file=oauth=${HOME}/secrets/oauth +``` +2. 部署Prow。由于Prow官方yaml中使用了grc.io镜像,这个镜像在中国大陆无法访问,所以我们将相应的repo搬到了dockerhub上,并提供了一份替换相关镜像名称的[yaml](prow.yaml),利用下面的命令即可部署Prow(使用的这个repo修改后的yaml) +```bash +kubectl apply -f https://raw.githubusercontent.com/magicsong/prow-tutorial/master/prow.yaml +``` +3. 使用 `kubectl get pod`看到所有Pod都running表示安装已经完成。如下图: + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20190930123654.png) + +4. 配置外网访问 + ++ 如果使用的QKE,那么集群默认带有[`LoadBalancer Controller`](https://github.com/yunify/qingcloud-cloud-controller-manager)。如果只是一个单独集群,那么只需要按照中的安装即可,安装非常方便。 ++ Prow官方采用的是ingress配置外网访问,所以我们需要配置`ingress-controller`。QKE默认带有一个`ingress-controller`,在`kubesphere-control-system`中。如果集群中还没有`ingress-controller`,需要安装一个。[官方文档](https://kubernetes.github.io/ingress-nginx/deploy/)中还没有青云的配置指南,需要安装下面的指令安装`ingress-controller`: + +```bash +kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/mandatory.yaml +kubectl apply -f https://raw.githubusercontent.com/magicsong/prow-tutorial/master/manifest/ingress-service.yaml #这个命令QKE需要执行 +``` +执行上述两条命令之后,敲`kubectl get svc -n ingress-nginx`,等待获取公网IP即可,如下图(如果需要手动指定公网IP,参考LB的[配置文档](https://github.com/yunify/qingcloud-cloud-controller-manager/blob/master/docs/configure.md)配置`ingress-nginx`这个service): + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20190930123738.png) + +**注意**如果使用的QKE,需要执行上面两个命令中的第二个命令。第二个命令对应的yaml就是[ingrsss](manifest/ingress-service.yaml),在apply之前需要将其中的namespace修改为`kubesphere-control-system`。 + +5. 访问Prow地址,默认应该为刚才的ingress的公网ip+端口8080,应该能在页面中看到一个`Echo Test`的任务。访问效果如下: + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20190930123817.png) + +**恭喜你!你已经拥有了一个prow集群,这个集群已经准备工作了,下一步就是要做一些配置工作,以使得Prow能按照我们的意图工作。** + +## 配置指南 +> Prow配置较为复杂,这里只演示最小配置,能让我们的Pr机器人工作起来 + +### 工具准备 +1. 安装[bazel](https://docs.bazel.build/versions/master/install.html)。Bazel是google公司用来构建k8s代码的一个工具,同样prow也是用bazel构建的。后续的配置都是用bazel动态生成的工具来配置的(类似于`go run ./pkg/tool -a -b`)。如果你身处非大陆地区,也可以不用Bazel,直接时候用`go get`来获取静态binay执行命令。 +2. 如果要使用`bazel`,安装完成之后需要将整个仓库 整个仓库clone下来,用于Bazel运行命令的仓库。clone完成之后cd 进入这个repo的根目录 + +### 配置webhook +> Prow是基于webhook工作的,github上的活动会发送给处理 + + +1. 选择一个github仓库配置webhook。执行下面的命令添加一个repo,需要替换掉其中的`hmac-path`和`github-token-path`,hook的地址是上面的prow地址加一个”/hook“: +```bash +# Ideally use https://bazel.build, alternatively try: +# go get -u k8s.io/test-infra/experiment/add-hook && add-hook +bazel run //experiment/add-hook -- \ + --hmac-path=/path/to/hook/secret \ + --github-token-path=/path/to/oauth/secret \ + --hook-url http://an.ip.addr.ess/hook \ + --repo my-org/my-repo \ + --repo my-whole-org \ + --confirm=false # Remove =false to actually add hook +``` +2. 如果运行没问题,那么需要将最后一行改为`--confirm=true`。运行成功后,在repo的webhooks配置中,应该能看到一个新的webhook: + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20190930123838.png) + +### 配置集群使用的插件 +> Prow是以插件机制运行的,类似CoreDNS那种,没有插件就什么都不做,但是依然能正常运行。我们需要配置我们的repo需要哪些插件 + +1. 官方提供了不少插件,在上面的Prow页面中就能看到一些,现在演示如何使用内置的一些插件。首先创建一个`plugins.yaml`的文件,如下: +```yaml +plugins: + github.com/kubesphere-test/prow-tutorial: + - size + - cat + - dog + - pony + - yuks + - label + - trigger + - approve + - lgtm +``` +2. 创建一个空白的`config.yaml`,这个文件将会在后续配置任务中使用,插件配置部分留空即可。 +3. 如果安装了bazel,那么进入`test-infra`这个目录,执行下面的命令(记得替换其中的相关文件的路径),这个命令会检查`config.yaml`和`plugins.yaml`的配置是否正确: +```bash +bazel run //prow/cmd/checkconfig -- --plugin-config=path/to/plugins.yaml --config-path=path/to/config.yaml +``` +4. 检查无误之后就可以将plugins.yaml上传到集群中(替换其中的路径): +```bash +kubectl create configmap plugins \ + --from-file=plugins.yaml=${PWD}/samples/plugins.yaml --dry-run -o yaml \ + | kubectl replace configmap plugins -f - +``` +5. 这样`size`插件就完成了。可以提一个Pr,效果应该如下图: + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20190930123848.png) + +6. 上述演示中还安装了很多好玩的插件,可以参考prow页面中帮助页面,学习如何使用这些命令。 + +### 配置Tide机器人 +> tide机器人最主要的功能就是自动合并Pr,当设定的目标达成时,tide机器人就会自动将代码Merge进主分支。Tide的完整的配置较为复杂,这里演示一个基本的配置,无需修改很多就能运行。 + +1. 在上述config.yaml中加入下列字段(请修改相应的repo和相应的tide页面): +```yaml +tide: + merge_method: + kubesphere-test/prow-tutorial: squash + + target_url: http://139.198.121.161:8080/tide + queries: + - repos: + - kubesphere-test/prow-tutorial + labels: + - lgtm + - approved + missingLabels: + - do-not-merge + - do-not-merge/hold + - do-not-merge/work-in-progress + - needs-ok-to-test + - needs-rebase + + context_options: + # Use branch protection options to define required and optional contexts + from-branch-protection: true + # Treat unknown contexts as optional + skip-unknown-contexts: true + orgs: + org: + required-contexts: + - "check-required-for-all-repos" + repos: + repo: + required-contexts: + - "check-required-for-all-branches" + branches: + branch: + from-branch-protection: false + required-contexts: + - "required_test" + optional-contexts: + - "optional_test" +``` + +2. 执行下面的命令将config.yaml推送到k8s集群中(替换相应的config.yaml文件位置): +```bash +kubectl create configmap config --from-file=config.yaml=${PWD}/samples/config.yaml --dry-run -o yaml | kubectl replace configmap config -f - +``` +3. 去刚才的 pr 上看,应该可以看到下面的 check: + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20190930123905.png) + +4. 由于这是我提的Pr,所以自动会带上`approved`标签,现在只要添加一个`lgtm`的标签就可以。需要找代码Review的人看过代码,然后让他们输入`/lgtm`的评论即可,Prow会自动打上`lgtm`的标签。(由于这次演示没有其他人打/lgtm,并且自己无法给自己评论`/lgtm`,所以本次演示需要手动给这个pr在lables中选择lgtm的标签)。效果如下图: + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20190930123927.png) + +## 高级配置 + +Prow是一个高效的CI/CD系统,也是一个复杂的系统,本文无法阐述所有的高级配置,更深入的配置可以参考官方文档。本Repo整理了一些常用的脚本,方便后续使用Prow的时候进行配置。使用这些脚本时,请注意替换一些数据。更多的高级配置请参考 [OWNERS](https://github.com/magicsong/prow-tutorial/blob/master/owner.md)。 diff --git a/content/zh/blogs/release-210.md b/content/zh/blogs/release-210.md new file mode 100644 index 000000000..ec779488c --- /dev/null +++ b/content/zh/blogs/release-210.md @@ -0,0 +1,106 @@ +--- +title: 'KubeSphere 2.1.1 发布!全面支持 Kubernetes 1.17!多项功能与用户体验优化!' +tag: 'release,KubeSphere' +createTime: '2019-11-11' +author: 'Feynman Zhou' +snapshot: 'https://pek3b.qingstor.com/kubesphere-docs/png/20191112093503.png' +--- + + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20191112093503.png) + +## 2.1.0 正式发布 + +2019 年 11 月 11 日,KubeSphere 开源社区激动地向大家宣布,KubeSphere 2.1.0 正式发布!2.1.0 版本不仅在安装上提供了`最快速方便的安装方式,解耦了核心的功能组件并提供了可插拔的安装方式`,还提供了非常多的让开源社区用户期待已久的新功能,**并修复了已知的 Bug**。 + +同时,社区对 KubeSphere 组件的高可用进行了深度优化与测试,因此,该版本也是被定义为 `Prodcution-ready` 的,`支持用户在生产环境部署和使用`。我们在此对社区用户提交的 issue、PR、Bug 反馈、需求建议、文档改进等一系列贡献表示由衷的感谢,并对 2.1.0 版本做出巨大贡献的开发者们深表谢意。 + +在新版本中,KubeSphere 对 `安装部署、DevOps、应用商店、存储、可观察性、认证与权限` 等模块提供了诸多新功能和深度优化,**更好地帮助企业用户在测试生产环境快速落地云原生技术和运维 Kubernetes,使开发者能够更专注在业务本身,赋能运维和测试人员高效地管理集群资源,实现业务快速发布与持续迭代的需求**。同时,功能组件的可插拔安装能够满足不同用户的个性化需求,下面先通过一张图来快速介绍 2.1.0 版本各功能模块的新功能与优化项。 + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20191112191613.png) + +## 应用商店 + +KubeSphere 是一个 **以应用为中心** 的容器平台,基于自研的开源项目 OpenPitrix (openpitrix.io) 构建了应用商店、内置应用仓库与应用生命周期管理,KubeSphere 应用商店 **对内可作为团队间共享企业内部的中间件、大数据、业务应用等**,以应用模板的形式方便用户快速地一键上传和部署应用到 Kubernetes 中;**对外可作为根据行业特性构建行业交付标准、交付流程和交付路径的基础,作为行业通用的应用商店**,可根据不同需求应对不同的业务场景。 + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20191025011318.png) + + +在 2.1.0 版本中,KubeSphere 从业务视角实现了应用的生命周期管理,支持 Helm 应用的 **上传提交、应用审核、测试部署、应用上架、应用分类、应用升级、应用下架**,帮助开发者或 ISV 将应用共享和交付给普通用户。同时,应用商店内置了多个常用的 Helm 应用方便开发测试。未来将提供基于应⽤的监控指标、应⽤⽇志关键字段告警能⼒,以及计量计费等运营功能。 + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20191111154118.png) + +## DevOps + +DevOps 是云原生时代在开发测试与持续交付场景下最核心的一环,KubeSphere 2.1.0 对 DevOps 系统进行了深度优化,流水线、S2I、B2I 提供了代码依赖缓存支持,**使构建速度大幅提升**。在 CI/CD 流水线集成了更多 Jenkins 插件和版本,优化了流水线 Agent 节点选择,新增了对 PV、PVC、Network Policy 的支持,**并将这一系列优化成果贡献给了 Jenkins 社区**。 + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20191111162132.png) + +结合 S2I & B2I,能够实现用户只需要提交一个仓库地址,或上传 JAR/WAR/Binary 等二进制文件,即可快速**将制品打包成 Docker 镜像并发布到镜像仓库,最终将服务自动部署至 Kubernetes 中,无需编写一行 Dockerfile**。 + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20191111174017.png) + +针对企业中不同角色的用户,KubeSphere 希望打造的是一个 **以容器为载体的端到端的应用交付平台**,实现从 **项目管理、应用开发、持续集成、测试,到应用的生产交付** 的流程是一个完整的闭环,用户借助一个**统一的平台和相关插件**,就可以实现业务的快速交付。后续版本可能会将流水线与应用商店打通 + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20191111155401.png) + +## 可观察性 + +日志通常含有非常有价值的信息,日志管理是云原生可观察性的重要组成部分。不同于物理机或虚拟机,在容器与 Kubernetes 环境中,日志有标准的输出方式(stdout),这使得进行平台级统一的日志收集、分析与管理水到渠成,并体现出日志数据独特的价值。 + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20191111164845.png) + +KubeSphere 提供了**多租户与多维度的日志查询系统**,开发了 **FluentBit Operator** (github.com/kubesphere/fluentbit-operator) ,并将其应用到 KubeSphere 中作为日志收集器,提供灵活的日志收集功能。在 2.1.0 版本中,对于将日志以文件形式保存在 Pod 挂盘上的应用,**新增了在 UI 上开启落盘日志收集功能,支持中文日志的检索,以及日志导出功能**。同时,新版本**优化了日志检索速度,增加了 Prometheus Pod 反亲和性,避免 Prometheus 的单点故障**。 + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20191111164821.png) + +## 用户体验 + +Kubernetes 无疑已经是容器编排的事实标准,但 Kubernetes 本身的学习门槛和易用性一直是开发者和运维用户的痛点。**KubeSphere 不仅仅只是一个简单的 Dashboard,它是经 CNCF 认证的 Kubernetes 主流开源发行版之一,在 Kubernetes 之上提供多种以容器为资源载体的业务功能模块**。 + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20191111170310.png) + +2.1.0 版本极大简化了 Kubernetes 资源的创建与管理,**提供了友好的向导式的交互,以及更丰富的资源状态监控展示**,**让底层资源使用情况和集群排障不再是黑盒**。KubeSphere 根据用户平时的开发习惯来设计用户的操作路径,尽可能减少额外的学习成本,2.0.x 版本原本需要多个步骤完成一个微服务的创建,在 2.1.0 仅需要在一个页面中完成。 + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20191111171133.png) + + +## 未来计划 + +**社区计划(Community Roadmap)** + +以下计划、项目与活动欢迎广大社区用户参与进来,我们也十分期待有更多的开发者与用户参与到新版本的开发、测试与贡献,**共同打造业界最领先的容器平台。** + +> - 前端开源(预计两周) +> - 开发者文档(贡献指南) +> - 成立社区项目委员会,设立 SIG(欢迎 KubeSphere 用户与云原生爱好者加入) +> - KubeSphere 云原生工程师图谱 +> - 12月中旬在北京举办线下 Meetup +> - 持续完善中文文档,提供更多应用场景的示例教程 +> - 文档国际化 + + +**产品计划(Product Roadmap)** + +> - 2.1.1 Bugfix +> - 支持更多云平台的存储、网络、LB 插件 +> - 多集群管理(3.0) +> - 应用商店流程优化(3.0) +> - 通知系统优化(3.0) +> - 自定义监控(3.0) +> - AI 平台 +> - 物联网 +> - SDN +> - 更多新版本的计划欢迎参与社区探讨与设计开发 + +## 如何安装升级 + +可参考官网 kubesphere.io,在文档的安装指南找到安装教程,**支持一键安装与升级,快速安装至 Linux 和 Kubernetes 仅需一行命令**。 + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20191111175033.png) + +## 关于 KubeSphere + +**KubeSphere** (github.com/kubesphere)是在 Kubernetes 之上构建的开源的 **以应用为中心的容器平台**,支持部署和运行在任何基础设施之上,提供简单易用的操作界面以及向导式操作方式,在降低用户使用容器调度平台学习成本的同时,极大减轻开发、测试、运维的日常工作的复杂度,旨在解决 Kubernetes 本身存在的存储、网络、安全和易用性等痛点。帮助企业轻松应对敏捷开发、自动化运维、应用快速交付、微服务治理、多租户管理、监控日志告警、服务与网络管理业务场景。 + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20191112191738.png) diff --git a/content/zh/blogs/skywalking-kubesphere.md b/content/zh/blogs/skywalking-kubesphere.md new file mode 100644 index 000000000..1ddd6e267 --- /dev/null +++ b/content/zh/blogs/skywalking-kubesphere.md @@ -0,0 +1,153 @@ +--- +title: 'KubeSphere 部署 SkyWalking 至 Kubernetes 开启无侵入 APM' +tag: 'SkyWalking,Kubernetes,APM,KubeSphere' +createTime: '2020-03-11' +author: 'Feynman' +snapshot: 'https://pek3b.qingstor.com/kubesphere-docs/png/20200311155321.png' +--- + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20200311155321.png) + +Kubernetes 天然适合分布式的微服务应用。然而,当开发者们将应用从传统的架构迁移到 Kubernetes 以后,会发现分布式的应用依旧存在各种各样的问题,例如大量微服务间的调用关系复杂、系统耗时或瓶颈难以排查、服务异常定位困难等一系列应用性能管理问题,而 APM 正是实时监控并管理微服务应用性能的利器。 + +## 为什么需要 APM + +APM 无疑是在大规模的微服务开发与运维场景下是必不可少的一环,APM 需要主要从这三个角度去解决三大场景问题: + +- 测试角度:性能测试调优监控总览,包括容器总体资源状况(如 CPU、内存、IO)与链路总体状况 +- 研发角度:链路服务的细节颗粒追踪,数据分析与数据安全 +- 运维角度:跟踪请求的处理过程,来对系统在前后端处理、服务端调用的性能消耗进行跟踪,实时感知并追踪访问体验差的业务 + +## 为什么选择 Apache SkyWalking + + 社区拥有很丰富的 APM 解决方案,比如著名的 Pinpoint、Zipkin、SkyWalking、CAT 等。在经过一番调研后,KubeSphere 选择将 **Apache SkyWalking** 作为面向 Kubernetes 的 APM 开源解决方案,将 Apache SkyWalking 集成到了 KubeSphere,作为应用模板在 **KubeSphere 容器平台** 提供给用户一键部署至 Kubernetes 的能力,进一步增强在微服务应用维度的可观察性。 + + ![](https://pek3b.qingstor.com/kubesphere-docs/png/20200311122646.png) + + Apache SkyWalking 在 2019 年 4 月 17 正式成为 **Apache 顶级项目**,提供分布式追踪、服务网格遥测分析、度量聚合和可视化一体化解决方案。Apache SkyWalking 专为微服务、云原生和基于容器的架构而设计。这是 KubeSphere 选择 Apache SkyWalking 的主要原因。 + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20200311150734.png) + + 并且,Apache SkyWalking 本身还具有很多优势,包括多语言自动探针,比如 Java、.NET Core 和 Node.JS,能够实现无侵入式的探针接入 APM 检测,轻量高效,多种后端存储支持,提供链路拓扑与 Tracing 等优秀的可视化方案,模块化,提供 UI、存储、集群管理多种机制可选,并且支持告警。同时,Apache SkyWalking 还很容易与 SpringCloud 应用进行集成。 + +Apache SkyWalking 架构图如下,关于详细的架构介绍,大家可以在 Apache SkyWalking `https://skywalking.apache.org/` 官网找到。 + + ![](https://pek3b.qingstor.com/kubesphere-docs/png/20200311123020.png) + + +## 在 KubeSphere 部署 Apache SkyWalking + +接下来我们通过一个完整的示例演示在 KubeSphere 部署 Apache SkyWalking,并接入一个 SpringCloud 示例应用,在 Apache SkyWalking 的 Dashboard 展示 APM 效果。 + +首先,下载 Apache SkyWalking 的 Helm Chart,然后通过 KubeSphere 将 Chart 上传至应用商店,这部分的步骤可以参考 KubeSphere 官方文档(kubesphere.io/docs),本文不再赘述。 + +KubeSphere 提供了基于 Helm 完整的应用生命周期管理的能力,应用通过审核后即可上架,并提供给平台所有用户一键部署至 Kubernetes 的选项。 + +> 提示:我们对 Apache SkyWalking 的 Helm Chart(6.5.0),针对 Helm 2 作了适配,可以在 `https://github.com/kubesphere/helm-charts` 获取 Chart 文件。 + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20200311124308.png) + +我们可以在应用商店访问 Apache SkyWalking,点击 Deploy 并选择企业空间与项目,取消项目的 CPU 与 Request Limit,即可快速部署 Apache SkyWalking 至 Kubernetes。 + +下面,我们在 KubeSphere Console 查看 SkyWalking 的应用与 Workload 运行状态。 + +**Application** + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20200311165504.png) + +**Deployment** + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20200311130907.png) + +**Statefulset** + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20200311131017.png) + +当我们在 Application 与 Workloads 列表下,看到应用状态显示 **active** 并且 SkyWalking 资源都显示 Running,说明 SkyWalking 部署成功。接下来,可以在 Service 列表中,将 SkyWalking UI 服务的外网访问类型设置为 **NodePort**,即可在浏览器通过 `http://IP:NodePort` 访问 SkyWalking Dashboard。 + +> 提示:若您的 KubeSphere 是部署在云上或物理机,可以借助 LoadBalancer 插件以 LoadBalancer 类型去暴露服务至集群外部。 + +**Services** + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20200311131246.png) + +## 部署 SpringCloud 示例应用 + +在本文中,我们准备了一个简单的 SpringCloud 示例应用,使用 Apache SkyWalking 官方的镜像(apache/skywalking-base:6.5.0),为 SpringCloud 微服务以 initContainer 的方式注入 Agent 到容器中。这也正是 SkyWalking Agent 巧妙之处,无需侵入代码或对原有的业务镜像改造,就能快速接入 APM。 + +首先,通过 Git 将 SpringCloud 示例应用的代码拉取到本地。 + +```bash +git clone https://github.com/kubesphere/tutorial.git +``` + +然后进入 `tutorial/tutorial 6 → skywalking/6.5.0/apm-springcloud-demo/` 目录,分别将 **apm-eureka.yml** 与 **apm-item.yml** 文件中的 Agent Collector 的后端服务地址,修改为 `skywalking-oap` 服务的 DNS 地址与端口。 + +``` +env: +··· + - name: SW_AGENT_COLLECTOR_BACKEND_SERVICES + value: skywalk-1h6lqf-skywalking-skywalking-oap.demo:11800 # skywalking oap 后端服务地址 +``` + +DNS 地址与服务端口,可以通过 KubeSphere Console 地址获取。 + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20200311142356.png) + +然后,我们可以通过 kubectl 对上述克隆过的仓库 **apm-springcloud-demo** 目录下,通过 kubectl 快速部署应用,指定 namespace 为 KubeSphere 上的 demo 项目。 + +``` +$ kubectl apply -f apm-springcloud-demo -n demo +deployment.apps/apm-eureka created +deployment.apps/apm-item created +service/apm-eureka created +service/apm-item created +``` + +此时在 KubeSphere 可以看到,示例应用的工作负载 **apm-eureka** 与 **apm-item** 都已经成功运行。 + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20200311142759.png) + +接下来,只需要对其中一个服务 **apm-item** 发送一些测试请求模拟用户访问流量,就可以访问 SkyWalking 查看数据效果的展示了。 + +## 访问 SkyWalking 查看 APM + +在上述 yaml 文件中,我们已对 SpringCloud 示例应用以 initContainer 的方式注入了 Agent,因此可以直接在 SkyWalking 的 Service Dashboard 查看链路效果与拓扑关系。可以在右下角将时间范围稍作调整,刷新后就可以看到两个示例服务的 Global Heatmap、Global Response Time、Global Top Throughput 以及 Global Top Slow Endpoints。 + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20200311143327.png) + +切换 Service,可以看到一些服务相关的信息,如平均响应时间、平均吞吐量、平均时延统计、SLA 等监控图表。 + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20200311144738.png) + +在 Endpoints 与 Instance,还有非常丰富端点与 JVM 相关的应用指标,对 Java 类应用非常友好。 + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20200311145321.png) + +点击上边栏的 Topology,可以看到当前的示例应用的多个服务依赖拓扑关系。服务拓扑一目了然,代码再复杂也不怕了。 + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20200311143728.png) + +点击 Trace,可以看到服务间的 Tracing 状况。左边是当前所有的访问请求,任意选择一项,可以在右边看到一个详细的链路追踪过程与 Span 信息: + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20200311144031.png) + +选择任意一个 Span,在左侧可以看到 Span 详情,快速查看 Endpoint、http.method、status_code 的信息。 + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20200311144527.png) + +Apache SkyWalking 还支持告警与 Metrics 对比,我们不在本文中一一赘述,感兴趣的同学可以参考 SkyWalking 官方文档深入研究。 + +## 总结 + +本文在基于 Kubernetes 的微服务场景下,借助 KubeSphere 容器平台与 Apache SkyWalking 这两大开源工具,通过一个完整的 SpringCloud 示例应用,演示了如何开启 APM,为业务的可持续运营保驾护航。 + +## 活动预告 + +为了让大家更深入了解开源治理与开源文化,我们专门邀请到了 **Apache SkyWalking Founder** 吴晟老师,为大家带来以 **开源治理** 为主题的线上直播分享活动,有机会与吴晟老师在直播中提问互动,参与分享可扫描二维码获取链接,在 Web 端或移动端拨入。 + +![](https://pek3b.qingstor.com/kubesphere-docs/png/20200311161820.png) + +## 关于 KubeSphere + +KubeSphere 是在 Kubernetes 之上构建的以应用为中心的开源容器平台,提供全栈的 IT 自动化运维的能力,简化企业的 DevOps 工作流。KubeSphere 提供了运维友好的向导式操作界面,包括 Kubernetes 资源管理、DevOps (CI/CD)、应用生命周期管理、微服务治理 (Service Mesh)、多租户管理、监控日志、告警通知、存储与网络管理、GPU support 等功能,帮助企业快速构建一个强大和功能丰富的容器云平台。 diff --git a/content/zh/case/_index.md b/content/zh/case/_index.md index f0212e395..598f12610 100644 --- a/content/zh/case/_index.md +++ b/content/zh/case/_index.md @@ -4,72 +4,66 @@ css: "scss/case.scss" section1: - title: User Case Studies - content: KubeSphere is trusted by various enterprises and organizations to the innovators driving the future of software. + title: + content: topImage: "images/case/case-top.jpg" section2: - tip: Read Case Study → + tip: caseList: - icon: "images/case/case1.jpg" - content: "KubeSphere is trusted by various enterprises and organizations to the innovators driving the future - of software." + content: link: "" - icon: "images/case/case2.jpg" - content: "KubeSphere is trusted by various enterprises and organizations to the innovators driving the future - of software." + content: link: "" - icon: "images/case/case3.jpg" - content: "KubeSphere is trusted by various enterprises and organizations to the innovators driving the future - of software." + content: link: "" - icon: "images/case/case4.jpg" - content: "KubeSphere is trusted by various enterprises and organizations to the innovators driving the future - of software." + content: link: "" - icon: "images/case/case5.jpg" - content: "KubeSphere is trusted by various enterprises and organizations to the innovators driving the future - of software." + content: link: "" - icon: "images/case/case6.jpg" - content: "KubeSphere is trusted by various enterprises and organizations to the innovators driving the future - of software." + content: link: "" section3: - title: 'Various Industries are Powered by KubeSphere' - tip: ALL + title: + tip: 全部 caseType: - - name: 'Financial' + - name: children: - - name: 'sina' + - name: icon: 'images/case/v1.jpg' - - name: 'benlai' + - name: icon: 'images/case/v2.jpg' - - name: 'T Service' + - name: children: - - name: 'inaccel' + - name: icon: 'images/case/v3.jpg' - - name: 'founder' + - name: icon: 'images/case/v4.jpg' - - name: 'E-Business' + - name: children: - - name: 'huaxia' + - name: icon: 'images/case/v5.jpg' - - name: 'aqara' + - name: icon: 'images/case/v6.jpg' - - name: 'Manufacture' + - name: children: - - name: 'powersmart' + - name: icon: 'images/case/v7.jpg' - - name: 'anchnet' + - name: icon: 'images/case/v8.jpg' --- \ No newline at end of file diff --git a/content/zh/conferences/_index.md b/content/zh/conferences/_index.md index eca526915..19807baf6 100644 --- a/content/zh/conferences/_index.md +++ b/content/zh/conferences/_index.md @@ -1,4 +1,41 @@ --- title: "page1" css: "scss/conferences.scss" + +viewDetail: 查看详情 + +list: + - name: KubeCon 大会 + content: KubeSphere 团队在 KubeCon + CloudNativeCon 2019 Shanghai 上的技术主题分享。 + icon: images/conferences/kubecon.svg + bg: images/conferences/kubecon-bg.svg + children: + - name: 基于 Kubernetes 的 Serverless Jenkins — Jenkins X + summary: 在云原生时代,应用模块不断被拆分,使得模块的数量不断上涨并且关系也越加复杂。企业在落地云原生技术的时候同事也需要有强大的 DevOps 手段,没有 DevOps 的云原生不可能是成功的。Jenkins X 是 CDF(持续交付基金会)与 + author: 夏润泽 + link: jenkins-x + image: + + - name: 云原生可观察性之日志管理 + summary: 日志通常含有非常有价值的信息,日志管理是云原生可观察性的重要组成部分。不同于物理机或虚拟机,在容器与 Kubernetes 环境中,日志有标准的输出方式(stdout… + author: 霍秉杰,马丹 + link: logging + image: + + - name: Porter-面向裸金属环境的 Kubernetes 开源负载均衡器 + summary: 我们知道,在 Kubernetes 集群中可以使用 “LoadBalancer” 类型的服务将后端工作负载暴露在外部。云厂商通常为 Kubernetes 提供云上的 LB 插件,但这需要将集群部署在特定 IaaS 平台上。然而,许多企业用户通常都将 Kubernetes… + author: 宋雪涛 + link: porter + image: + + - name: QCon 全球软件开发大会 + content: + icon: images/conferences/qcon.svg + bg: images/conferences/qcon-bg.svg + children: + - name: 基于 CSI Kubernetes 存储插件的开发实践 + summary: 现在很多用户都会将自己的应用迁移到 Kubernetes 容器平台中。在 Kubernetes 容器平台中,存储是支撑用户应用的基石。随着用户不断的将自己的应用深度部署在 K8S 容器平台中,但是我们现有的 Kubernetes… + author: 王欣 + link: csi + image: --- \ No newline at end of file diff --git a/content/zh/conferences/csi.md b/content/zh/conferences/csi.md index 99fda9f07..45e5be9ef 100644 --- a/content/zh/conferences/csi.md +++ b/content/zh/conferences/csi.md @@ -1,6 +1,5 @@ --- title: '基于 CSI Kubernetes 存储插件的开发实践' -type: 'QCon' author: '王欣' createTime: '2019-12-04' snapshot: 'https://pek3b.qingstor.com/kubesphere-docs/png/20190930112634.png' diff --git a/content/zh/conferences/jenkins-x.md b/content/zh/conferences/jenkins-x.md index b416fb45c..754dc49eb 100644 --- a/content/zh/conferences/jenkins-x.md +++ b/content/zh/conferences/jenkins-x.md @@ -1,6 +1,5 @@ --- title: '基于 Kubernetes 的 Serverless Jenkins — Jenkins X' -type: 'KubeCon' author: '夏润泽' createTime: '2019-06-24' snapshot: 'https://pek3b.qingstor.com/kubesphere-docs/png/20190930095450.png' diff --git a/content/zh/conferences/logging.md b/content/zh/conferences/logging.md index e86c75ce9..6b1cb2292 100644 --- a/content/zh/conferences/logging.md +++ b/content/zh/conferences/logging.md @@ -1,6 +1,5 @@ --- title: '云原生可观察性之日志管理' -type: 'KubeCon' author: '霍秉杰,马丹' createTime: '2019-06-25' snapshot: 'https://pek3b.qingstor.com/kubesphere-docs/png/20190930095954.png' diff --git a/content/zh/conferences/porter.md b/content/zh/conferences/porter.md index ecd435b34..d2718e263 100644 --- a/content/zh/conferences/porter.md +++ b/content/zh/conferences/porter.md @@ -1,6 +1,5 @@ --- title: 'Porter-面向裸金属环境的 Kubernetes 开源负载均衡器' -type: 'KubeCon' author: '宋雪涛' createTime: '2019-06-24' snapshot: 'https://pek3b.qingstor.com/kubesphere-docs/png/20190930095713.png' diff --git a/content/zh/contribution/_index.md b/content/zh/contribution/_index.md index 6bc5bd4fe..75cc6ebaf 100644 --- a/content/zh/contribution/_index.md +++ b/content/zh/contribution/_index.md @@ -4,264 +4,264 @@ title: "contribution" css: "scss/contribution.scss" section1: - title: 'Community is the Soul of KubeSphere' - content: 'Join the community to get help, get involved, or to get updates and KubeSphere news!' + title: + content: topImage: "images/contribution/contribution-top.jpg" section2: topType: - - name: 'Download' + - name: icon1: 'images/contribution/download.svg' icon2: 'images/contribution/37.png' children: - - content: 'Download KubeSphere' + - content: link: '' - - content: 'Quickstart' + - content: link: '' - - content: 'Tutorial Videos' + - content: link: '' - - name: 'Contribute' + - name: icon1: 'images/contribution/contribute.svg' icon2: 'images/contribution/38.png' children: - - content: 'Join the SIGs and WGs' + - content: link: '' - - content: 'Improve the Docs' + - content: link: '' - - content: 'Submit a Bug or Suggestion' + - content: link: '' - - name: 'Get in Touch' + - name: icon1: 'images/contribution/business.svg' icon2: 'images/contribution/39.png' children: - - content: 'Join KubeSphere Slack' + - content: link: '' - - content: 'Join the Mailing List' + - content: link: '' - - content: 'Follow us on Twitter' + - content: link: '' organization: - topic: 'Community Organization' - name: 'KubeSphere Community' + topic: + name: icon: 'images/contribution/28.svg' topIcon: 'images/contribution/8.svg' type: - - name: 'TOC' + - name: icon: 'images/contribution/toc.svg' - - name: 'Developer Group' + - name: icon: 'images/contribution/developer-group.svg' children: - - name: 'Owner / Lead' - content: 'A lead is also the member of the project who is an experienced and acrive reciewer of the project.' + - name: + content: - - name: 'Member' - content: 'A lead is also the member of the project who is an experienced and acrive reciewer of the project.' + - name: + content: - - name: 'Contributor' - content: 'A lead is also the member of the project who is an experienced and acrive reciewer of the project.' + - name: + content: - - name: 'User Research Group' + - name: icon: 'images/contribution/user.svg' children: - - name: 'Champion' - content: 'A lead is also the member of the project who is an experienced and acrive reciewer of the project.' + - name: + content: - - name: 'Ambassador' - content: 'A lead is also the member of the project who is an experienced and acrive reciewer of the project.' + - name: + content: - - name: 'Steering Committee' + - name: icon: 'images/contribution/steering.svg' section3: interestGroup: - title: 'Find Your Special Interest Group' - content: 'SIGs are designed to let you can find everything you need in one place around a central topic. Find your commonality and join the SIG.' + title: + content: children: - - name: 'Apps' + - name: icon: '/images/contribution/apps.svg' iconActive: '/images/contribution/apps-active.svg' - content: 'App charts for the built-in App Store' + content: link: '' - linkContent: 'Join SIG - Apps →' + linkContent: children: - icon: '/images/contribution/calicq1.jpg' - icon: '/images/contribution/calicq2.jpg' - icon: '/images/contribution/calicq3.jpg' - - name: 'App store' + - name: icon: '/images/contribution/app-store.svg' iconActive: '/images/contribution/app-store-active.svg' content: '' link: '' - linkContent: 'Join SIG - App store →' + linkContent: children: - icon: '' - icon: '' - icon: '' - - name: 'Architecture' + - name: icon: '/images/contribution/architecture.svg' iconActive: '/images/contribution/architecture-active.svg' content: '' link: '' - linkContent: 'Join SIG - Architecture →' + linkContent: children: - icon: '' - - name: 'Cloud-Providers' + - name: icon: '/images/contribution/cloud-providers.svg' iconActive: '/images/contribution/cloud-providers-active.svg' content: '' link: '' - linkContent: 'Join SIG - Cloud-Providers →' + linkContent: children: - icon: '' - icon: '' - icon: '' - - name: 'Console (Front-end)' + - name: icon: '/images/contribution/console.svg' iconActive: '/images/contribution/console-active.svg' content: '' link: '' - linkContent: 'Join SIG - Console (Front-end) →' + linkContent: children: - icon: '' - icon: '' - icon: '' - - name: 'DevOps' + - name: icon: '/images/contribution/dev-ops.svg' iconActive: '/images/contribution/dev-ops-active.svg' content: '' link: '' - linkContent: 'Join SIG - DevOps →' + linkContent: children: - icon: '' - icon: '' - icon: '' - - name: ' Docs' + - name: icon: '/images/contribution/docs.svg' iconActive: '/images/contribution/docs-active.svg' content: '' link: '' - linkContent: 'Join SIG - Docs →' + linkContent: children: - icon: '' - icon: '' - icon: '' - - name: 'Edge' + - name: icon: '/images/contribution/edge.svg' iconActive: '/images/contribution/edge-active.svg' content: '' link: '' - linkContent: 'Join SIG - Edge →' + linkContent: children: - icon: '' - icon: '' - icon: '' - - name: 'Installation' + - name: icon: '/images/contribution/installation.svg' iconActive: '/images/contribution/installation-active.svg' content: '' link: '' - linkContent: 'Join SIG - Installation →' + linkContent: children: - icon: '' - icon: '' - icon: '' - - name: 'Microservice' + - name: icon: '/images/contribution/microservice.svg' iconActive: '/images/contribution/microservice-active.svg' content: '' link: '' - linkContent: 'Join SIG - Microservice →' + linkContent: children: - icon: '' - icon: '' - icon: '' - - name: 'Multicluster' + - name: icon: '/images/contribution/multicluster.svg' iconActive: '/images/contribution/multicluster-active.svg' content: '' link: '' - linkContent: 'Join SIG - Multicluster →' + linkContent: children: - icon: '' - icon: '' - icon: '' - - name: 'Multitenancy' + - name: icon: '/images/contribution/multitenancy.svg' iconActive: '/images/contribution/multitenancy-active.svg' content: '' link: '' - linkContent: 'Join SIG - Multitenancy →' + linkContent: children: - icon: '' - icon: '' - icon: '' - - name: 'Network' + - name: icon: '/images/contribution/network.svg' iconActive: '/images/contribution/network-active.svg' content: '' link: '' - linkContent: 'Join SIG - Network →' + linkContent: children: - icon: '' - icon: '' - icon: '' - - name: 'Observability' + - name: icon: '/images/contribution/observability.svg' iconActive: '/images/contribution/observability-active.svg' content: '' link: '' - linkContent: 'Join SIG - Observability →' + linkContent: children: - icon: '' - icon: '' - icon: '' - - name: 'Release' + - name: icon: '/images/contribution/release.svg' iconActive: '/images/contribution/release-active.svg' content: '' link: '' - linkContent: 'Join SIG - Release →' + linkContent: children: - icon: '' - icon: '' - icon: '' - - name: 'Storage' + - name: icon: '/images/contribution/storage.svg' iconActive: '/images/contribution/storage-active.svg' content: '' link: '' - linkContent: 'Join SIG - Storage →' + linkContent: children: - icon: '' - icon: '' - icon: '' - - name: 'Testing' + - name: icon: '/images/contribution/testing.svg' iconActive: '/images/contribution/testing-active.svg' content: '' link: '' - linkContent: 'Join SIG - Testing →' + linkContent: children: - icon: '' - icon: '' @@ -269,17 +269,17 @@ section3: section4: involved: - title: 'Get involved' + title: children: - - title: 'Be a Champion' + - title: icon: 'images/contribution/group-1.png' - content: 'Join me tomorrow and start putting in the time to get your campaign ready with a landing page!' + content: link: '' - linkContent: 'Become a KubeSphere Champion →' + linkContent: - - title: 'Be a Member' + - title: icon: 'images/contribution/group-2.png' - content: 'KubeSphere is 100% open source and driven by community,we appreciate contributions to our code and documentation!Significant contributions will earn you a contributor t-shirt.' + content: link: '' - linkContent: 'Become a KubeSphere Member →' + linkContent: --- \ No newline at end of file diff --git a/content/zh/partner/_index.md b/content/zh/partner/_index.md index 999d9236f..66c56dcd1 100644 --- a/content/zh/partner/_index.md +++ b/content/zh/partner/_index.md @@ -1,63 +1,63 @@ --- -title: "page1" +title: "partner" css: "scss/partner.scss" section1: - title: 'Join the Revolution,Partner with KubeSphere' - content: 'We look forward to your joining KubeSphere partner to improve the ecosystem of both, and grow your business. KubeSphere provide resources and rights for partners to help them increase their expertise, deliver open source technology, and resell product.' + title: + content: topImage: 'images/partner/partner-top.jpg' section2: - title: 'Together, build partnership for success all over the world' - content: 'KubeSphere partners play a critical role in KubeSphere go-to-market strategy. KubeSphere partners are located all over the world, we are looking forward to the global cooperation, your success is our success.' - name1: 'USA' - name2: 'European' - name3: 'China' + title: + content: + name1: + name2: + name3: mapImage: 'images/partner/map.svg' section3: - title: 'Partner Types' - tip: Request now → + title: + tip: partnerType: - - title: "App Providers" - content: "KubeSphere Application Store is a great place to showcase your application, users can quickly deploy your application to Kubernetes using KubeSphere. Submit your application to KubeSphere Application Store now!" + - title: + content: link: "" - - title: "Consulting" - content: "KubeSphere Application Store is a great place to showcase your application, users can quickly deploy your application to Kubernetes using KubeSphere. Submit your application to KubeSphere Application Store now!" + - title: + content: link: "" - - title: "Cloud Providers" - content: "KubeSphere Application Store is a great place to showcase your application, users can quickly deploy your application to Kubernetes using KubeSphere. Submit your application to KubeSphere Application Store now!" + - title: + content: link: "" - - title: "Go-To-Market" - content: "KubeSphere Application Store is a great place to showcase your application, users can quickly deploy your application to Kubernetes using KubeSphere. Submit your application to KubeSphere Application Store now!" + - title: + content: link: "" section4: - title: 'Featured Partners' - content: 'KubeSphere is trusted by various enterprises and organizations to the innovators driving the future of software.' + title: + content: featuredPartnerList: - icon: "images/partner/partner1.jpg" - partnerType: "Go-To-Market" + partnerType: - icon: "images/partner/partner2.jpg" - partnerType: "Go-To-Market" + partnerType: - icon: "images/partner/partner3.jpg" - partnerType: "Go-To-Market" + partnerType: - icon: "images/partner/partner4.jpg" - partnerType: "Go-To-Market" + partnerType: - icon: "images/partner/partner5.jpg" - partnerType: "Go-To-Market" + partnerType: - icon: "images/partner/partner6.jpg" - partnerType: "Go-To-Market" + partnerType: - icon: "images/partner/partner7.jpg" - partnerType: "Go-To-Market" + partnerType: --- \ No newline at end of file diff --git a/content/zh/projects/_index.md b/content/zh/projects/_index.md index a658a359a..96402f723 100644 --- a/content/zh/projects/_index.md +++ b/content/zh/projects/_index.md @@ -3,23 +3,23 @@ title: "About" css: "scss/projects.scss" -name: Open Source Projects +name: 开源项目 groups: - - name: Container Platform + - name: 容器平台 children: - - title: KubeSphere + - title: KubeSphere 容器平台 icon: 'images/kubesphere.svg' link: '' description: 基于 Kubernetes 之上构建的以应用为中心的多租户容器平台,支持部署运行在任何基础设施之上,提供简单易用的操作界面以及向导式 UI,旨在解决 Kubernetes 的存储、网络、安全与易用性等痛点。 - - name: App Management + - name: 应用管理 children: - - title: OpenPitrix + - title: OpenPitrix 多云应用管理平台 icon: '' link: '' description: 开源的多云应用管理平台,用来在多云环境下打包、部署和管理不同类型的应用,包括传统应用、微服务应用以及 Serverless 应用等,其中云平台包括 AWS、Kubernetes、QingCloud、VMWare。 - - name: Storage Plugins + - name: 存储插件 children: - title: QingStor-CSI icon: '' diff --git a/content/zh/videos/_index.md b/content/zh/videos/_index.md index c15f8d37b..fcfa5d7db 100644 --- a/content/zh/videos/_index.md +++ b/content/zh/videos/_index.md @@ -1,4 +1,6 @@ --- title: "page1" css: "scss/videos.scss" +minCss: css/jquery.modal.min.css +tip: 全部 --- \ No newline at end of file diff --git a/data/en/video.json b/data/en/video.json new file mode 100644 index 000000000..9ea04f472 --- /dev/null +++ b/data/en/video.json @@ -0,0 +1,34 @@ +[ + { + "title": "Helm-based Application Management in KubeSphere Application Store", + "link": "https://www.youtube.com/embed/h1Mmcr4wnF8?&autoplay=1", + "createTime": "2020.4.25", + "snapshot": "/images/videos/cover.png", + "group": "", + "tag": "" + }, + { + "title": "Binary to Image - Containerize Artifact and Deploy Service to Kubernetes", + "link": "https://www.youtube.com/embed/jThC4CDoCLU?&autoplay=1", + "createTime": "2020.4.25", + "snapshot": "/images/videos/cover.png", + "group": "", + "tag": "" + }, + { + "title": "Bookinfo Canary Release on Kubernetes using Istio, Jaeger and KubeSphere", + "link": "https://www.youtube.com/embed/EkGWtwcsdE4?&autoplay=1", + "createTime": "2020.4.25", + "snapshot": "/images/videos/cover.png", + "group": "", + "tag": "" + }, + { + "title": "Create Horizontal Pod Autoscaler for Kubernetes Deployment using KubeSphere", + "link": "https://www.youtube.com/embed/Aqy-psx9B30?&autoplay=1", + "createTime": "2020.4.25", + "snapshot": "/images/videos/cover.png", + "group": "", + "tag": "" + } +] \ No newline at end of file diff --git a/data/zh/footer.yaml b/data/zh/footer.yaml index c41065d1d..f183646a7 100644 --- a/data/zh/footer.yaml +++ b/data/zh/footer.yaml @@ -1,38 +1,51 @@ footer: list: - - title: 产品 + - title: list: - - content: KubeSphere 容器平台 - link: /en - - content: QKE - link: https://appcenter.qingcloud.com/apps/app-cmgbd5k2/KubeSphere%C2%AE%EF%B8%8F%EF%BC%88QKE%EF%BC%89#Introduction - - content: 商业服务 - link: https://kubesphere.qingcloud.com/ - - title: 相关产品 + - content: + link: '' + + - content: + link: '' + + - content: + link: '' + + - content: + link: '' + + - content: + link: '' + + - content: + link: '' + - title: list: - - content: AppCenter - link: https://appcenter.qingcloud.com/ - - content: NeonSAN - link: https://www.qingcloud.com/products/qingstor-neonsan/ - - content: QingCloud - link: https://www.qingcloud.com/products/qingstor-neonsan/ - - content: OpenPitrix - link: https://openpitrix.io/ - - title: 文档中心 + - content: + link: + - content: + link: + - content: + link: + - content: + link: + - title: list: - - content: 产品介绍 - link: https://kubesphere.io/docs/v2.1/zh-CN/introduction/intro/ - - content: 安装 - link: https://kubesphere.io/docs/v2.1/zh-CN/installation/intro/ - - content: 快速入门 - link: https://kubesphere.io/docs/v2.1/zh-CN/quick-start/quick-start-guide/ - - content: API 文档 - link: https://kubesphere.io/docs/v2.1/zh-CN/api-reference/api-docs/ - - title: 关于 + - content: + link: '' + - content: + link: '' + - content: + link: '' + - content: + link: '' + - title: list: - - content: 动态 - link: https://activity.qingcloud.com/event/kubesphere2019/ - - content: 联系我们 - link: https://www.qingcloud.com/contactus - - content: 加入我们 - link: https://www.qingcloud.com/jobs \ No newline at end of file + - content: + link: + - content: + link: + - content: + link: + - content: + link: \ No newline at end of file diff --git a/data/zh/video.json b/data/zh/video.json new file mode 100644 index 000000000..af5f0b570 --- /dev/null +++ b/data/zh/video.json @@ -0,0 +1,514 @@ +[ + { + "title": "为什么选择 KubeSphere", + "link": "https://kubesphere-docs.pek3b.qingstor.com/website/meetup/meetup-final-1226.mp4", + "createTime": "2019.12.14", + "snapshot": "https://pek3b.qingstor.com/kubesphere-docs/png/20200206170305.png", + "group": "Meetup", + "tag": "用户访谈,容器,Kubernetes" + }, + { + "title": "走近 KubeSphere", + "link": "https://kubesphere-docs.pek3b.qingstor.com/website/meetup/zhouxiaosi-final.mp4", + "createTime": "2019.12.14", + "snapshot": "https://pek3b.qingstor.com/kubesphere-docs/png/20200206171311.png", + "group": "Meetup", + "tag": "KubeSphere 2.1,容器,Kubernetes" + }, + { + "title": "企业级容器 CI/CD 进阶之路", + "link": "https://kubesphere-docs.pek3b.qingstor.com/website/meetup/xiarunze-final.mp4", + "createTime": "2019.12.14", + "snapshot": "https://pek3b.qingstor.com/kubesphere-docs/png/20200206171404.png", + "group": "Meetup", + "tag": "KubeSphere 2.1,DevOps,容器,Kubernetes" + }, + { + "title": "Istio 在 KubeSphere 平台上的实践", + "link": "https://kubesphere-docs.pek3b.qingstor.com/website/meetup/zhangrenyu-final.mp4", + "createTime": "2019.12.14", + "snapshot": "https://pek3b.qingstor.com/kubesphere-docs/png/20200206171431.png", + "group": "Meetup", + "tag": "KubeSphere 2.1,微服务,容器,Kubernetes" + }, + { + "title": "K8s 可观察性实践之路 - 上", + "link": "https://kubesphere-docs.pek3b.qingstor.com/website/meetup/huobingjie-final.mp4", + "createTime": "2019.12.14", + "snapshot": "https://pek3b.qingstor.com/kubesphere-docs/png/20200206171451.png", + "group": "Meetup", + "tag": "KubeSphere 2.1,容器,Kubernetes" + }, + { + "title": "K8s 可观察性实践之路 - 下", + "link": "https://kubesphere-docs.pek3b.qingstor.com/website/meetup/huangguangzhe-final.mp4", + "createTime": "2019.12.14", + "snapshot": "https://pek3b.qingstor.com/kubesphere-docs/png/20200206171451.png", + "group": "Meetup", + "tag": "KubeSphere 2.1,容器,Kubernetes" + }, + { + "title": "你不知道的 KubeSphere Console", + "link": "https://kubesphere-docs.pek3b.qingstor.com/website/meetup/liulu-final.mp4", + "createTime": "2019.12.14", + "snapshot": "https://pek3b.qingstor.com/kubesphere-docs/png/20200206171525.png", + "group": "Meetup", + "tag": "KubeSphere 2.1,容器,Kubernetes" + }, + { + "title": "KubeSphere 多租户管理教程", + "link": "https://kubesphere-docs.pek3b.qingstor.com/website/%E5%85%A5%E9%97%A8%E6%95%99%E7%A8%8B/KS2.1_1-multi-tenancy.mp4", + "createTime": "2019.01.24", + "snapshot": "https://pek3b.qingstor.com/kubesphere-docs/png/20200206174734.png", + "group": "入门教程", + "tag": "KubeSphere 2.1,容器,Kubernetes" + }, + { + "title": "创建 Wordpress 应用并发布至 K8s", + "link": "https://kubesphere-docs.pek3b.qingstor.com/website/%E5%85%A5%E9%97%A8%E6%95%99%E7%A8%8B/KS2.1_3-wordpress-k8s.mp4", + "createTime": "2019.01.24", + "snapshot": "https://pek3b.qingstor.com/kubesphere-docs/png/20200206174845.png", + "group": "入门教程", + "tag": "KubeSphere 2.1,容器,Kubernetes" + }, + { + "title": "创建 Service 与 Ingress 暴露应用", + "link": "https://kubesphere-docs.pek3b.qingstor.com/website/%E5%85%A5%E9%97%A8%E6%95%99%E7%A8%8B/KS2.1_2-service-ingress.mp4", + "createTime": "2019.01.24", + "snapshot": "https://pek3b.qingstor.com/kubesphere-docs/png/20190928174847.png", + "group": "入门教程", + "tag": "KubeSphere 2.1,容器,Kubernetes" + }, + { + "title": "Binary to Image - 发布制品至 K8s", + "link": "https://kubesphere-docs.pek3b.qingstor.com/website/%E5%85%A5%E9%97%A8%E6%95%99%E7%A8%8B/Binary-to-image.mp4", + "createTime": "2019.01.24", + "snapshot": "https://pek3b.qingstor.com/kubesphere-docs/png/20200206174934.png", + "group": "入门教程", + "tag": "KubeSphere 2.1,容器,Kubernetes" + }, + { + "title": "KubeSphere 容器平台新动向 - 周小四", + "link": "https://insight2019.pek3a.qingstor.com/%E7%9B%B4%E6%92%AD%E8%A7%86%E9%A2%91/%E4%B8%BB%E4%BC%9A%E5%9C%BA/6%E3%80%81KubeSphere%20%E5%AE%B9%E5%99%A8%E5%B9%B3%E5%8F%B0%E6%96%B0%E5%8A%A8%E5%90%91%20%20%20%E5%91%A8%E5%B0%8F%E5%9B%9B.mp4", + "createTime": "2019.07.25", + "snapshot": "https://pek3b.qingstor.com/kubesphere-docs/png/20190928183518.png", + "group": "CIC 用户大会", + "tag": "KubeSphere 2.0,峰会论坛" + }, + { + "title": "KubeSphere 助力企业解禁云原生 - 于爽", + "link": "https://insight2019.pek3a.qingstor.com/%E7%9B%B4%E6%92%AD%E8%A7%86%E9%A2%91/%E5%AE%B9%E5%99%A8%E4%B8%8E%E5%BE%AE%E6%9C%8D%E5%8A%A1/KubeSphere%20%E5%8A%A9%E5%8A%9B%E4%BC%81%E4%B8%9A%E8%A7%A3%E7%A6%81%E4%BA%91%E5%8E%9F%E7%94%9F%20%E4%BA%8E%E7%88%BD_batch.mp4", + "createTime": "2019.07.25", + "snapshot": "https://pek3b.qingstor.com/kubesphere-docs/png/20190928183518.png", + "group": "CIC 用户大会", + "tag": "KubeSphere 2.0,峰会论坛" + }, + { + "title": "企业应用向容器迁移和微服务改造实践 - 张仁宇", + "link": "https://insight2019.pek3a.qingstor.com/%E7%9B%B4%E6%92%AD%E8%A7%86%E9%A2%91/%E5%AE%B9%E5%99%A8%E4%B8%8E%E5%BE%AE%E6%9C%8D%E5%8A%A1/%E4%BC%81%E4%B8%9A%E5%BA%94%E7%94%A8%E5%90%91%E5%AE%B9%E5%99%A8%E8%BF%81%E7%A7%BB%E5%92%8C%E5%BE%AE%E6%9C%8D%E5%8A%A1%E6%94%B9%E9%80%A0%E5%AE%9E%E8%B7%B5%20%E5%BC%A0%E4%BB%81%E5%AE%87_batch.mp4", + "createTime": "2019.07.25", + "snapshot": "https://pek3b.qingstor.com/kubesphere-docs/png/20190928183518.png", + "group": "CIC 用户大会", + "tag": "KubeSphere 2.0,峰会论坛" + }, + { + "title": "K8S 监控实践 :Prometheus, 多租户与多集群 - 霍秉杰", + "link": "https://insight2019.pek3a.qingstor.com/%E7%9B%B4%E6%92%AD%E8%A7%86%E9%A2%91/%E5%AE%B9%E5%99%A8%E4%B8%8E%E5%BE%AE%E6%9C%8D%E5%8A%A1/K8S%E7%9B%91%E6%8E%A7%E5%AE%9E%E8%B7%B5%20%EF%BC%9APrometheus%2C%20%E5%A4%9A%E7%A7%9F%E6%88%B7%E4%B8%8E%E5%A4%9A%E9%9B%86%E7%BE%A4%20%E9%9C%8D%E7%A7%89%E6%9D%B0_batch.mp4", + "createTime": "2019.07.25", + "snapshot": "https://pek3b.qingstor.com/kubesphere-docs/png/20190928183518.png", + "group": "CIC 用户大会", + "tag": "KubeSphere 2.0,峰会论坛" + }, + { + "title": "如何打造一个轻量级的极简 CI / CD Kubernetes 工作流 - 夏润泽", + "link": "https://insight2019.pek3a.qingstor.com/%E7%9B%B4%E6%92%AD%E8%A7%86%E9%A2%91/%E5%AE%B9%E5%99%A8%E4%B8%8E%E5%BE%AE%E6%9C%8D%E5%8A%A1/%E5%A6%82%E4%BD%95%E6%89%93%E9%80%A0%E4%B8%80%E4%B8%AA%E8%BD%BB%E9%87%8F%E7%BA%A7%E7%9A%84%E6%9E%81%E7%AE%80%20%E5%A4%8F%E6%B6%A6%E6%B3%BD_batch.mp4", + "createTime": "2019.07.25", + "snapshot": "https://pek3b.qingstor.com/kubesphere-docs/png/20190928183518.png", + "group": "CIC 用户大会", + "tag": "KubeSphere 2.0,峰会论坛" + }, + { + "title": "Harbor 镜像仓储最佳实践 - Alex Xu", + "link": "https://insight2019.pek3a.qingstor.com/%E7%9B%B4%E6%92%AD%E8%A7%86%E9%A2%91/%E5%AE%B9%E5%99%A8%E4%B8%8E%E5%BE%AE%E6%9C%8D%E5%8A%A1/Harbor%E9%95%9C%E5%83%8F%E4%BB%93%E5%82%A8%E6%9C%80%E4%BD%B3%E5%AE%9E%E8%B7%B5%20%E5%BE%90%E5%A4%A9%E8%A1%8C_batch.mp4", + "createTime": "2019.07.25", + "snapshot": "https://pek3b.qingstor.com/kubesphere-docs/png/20190928183518.png", + "group": "CIC 用户大会", + "tag": "峰会论坛" + }, + { + "title": "KubeSphere 容器平台发布 - 周小四", + "link": "https://insight2018.pek3a.qingstor.com/%E8%A7%86%E9%A2%91/%E4%B8%BB%E4%BC%9A%E5%9C%BA/KubeSphere%20%E5%AE%B9%E5%99%A8%E4%BA%A7%E5%93%81%E7%BA%BF-%E5%91%A8%E5%B0%8F%E5%9B%9B-%E9%9D%92%E4%BA%91QingCloud%20%E5%AE%B9%E5%99%A8%E5%8F%8A%E5%BA%94%E7%94%A8%E5%B9%B3%E5%8F%B0%E7%A0%94%E5%8F%91%E6%80%BB%E7%9B%91.mp4", + "createTime": "2018.07.27", + "snapshot": "https://pek3b.qingstor.com/kubesphere-docs/png/20190928184613.png", + "group": "CIC 用户大会", + "tag": "峰会论坛" + }, + { + "title": "划时代的云端容器平台 KubeSphere - 于爽", + "link": "https://insight2018.pek3a.qingstor.com/%E8%A7%86%E9%A2%91/%E5%AE%B9%E5%99%A8%E3%80%81%E5%BE%AE%E6%9C%8D%E5%8A%A1%E6%9E%84%E6%9E%B6%E4%B8%8E%E6%B2%BB%E7%90%86%E4%B8%93%E9%A2%98%E8%AE%BA%E5%9D%9B/%E5%88%92%E6%97%B6%E4%BB%A3%E7%9A%84%E4%BA%91%E7%AB%AF%E5%AE%B9%E5%99%A8%E5%B9%B3%E5%8F%B0%20KubeSphere-%E4%BA%8E%E7%88%BD-%E9%9D%92%E4%BA%91QingCloud%20%E5%AE%B9%E5%99%A8%E5%B9%B3%E5%8F%B0%E8%B5%84%E6%B7%B1%E6%9E%B6%E6%9E%84%E5%B8%88.mp4", + "createTime": "2018.07.27", + "snapshot": "https://pek3b.qingstor.com/kubesphere-docs/png/20190928184613.png", + "group": "CIC 用户大会", + "tag": "KubeSphere 2.0,峰会论坛" + }, + { + "title": "招银云创容器及微服务实践-陈沙克", + "link": "https://insight2018.pek3a.qingstor.com/%E8%A7%86%E9%A2%91/%E5%AE%B9%E5%99%A8%E3%80%81%E5%BE%AE%E6%9C%8D%E5%8A%A1%E6%9E%84%E6%9E%B6%E4%B8%8E%E6%B2%BB%E7%90%86%E4%B8%93%E9%A2%98%E8%AE%BA%E5%9D%9B/%E6%8B%9B%E9%93%B6%E4%BA%91%E5%88%9B%E5%AE%B9%E5%99%A8%E5%8F%8A%E5%BE%AE%E6%9C%8D%E5%8A%A1%E5%AE%9E%E8%B7%B5-%E9%99%88%E6%B2%99%E5%85%8B-%E6%8B%9B%E9%93%B6%E4%BA%91%E5%88%9B%E9%87%91%E8%9E%8D%20PaaS%20%E7%A0%94%E7%A9%B6%E4%B8%AD%E5%BF%83%E6%80%BB%E7%9B%91.mp4", + "createTime": "2018.07.27", + "snapshot": "https://pek3b.qingstor.com/kubesphere-docs/png/20190928184613.png", + "group": "CIC 用户大会", + "tag": "KubeSphere 2.0,峰会论坛" + }, + { + "title": "DataOps 容器技术助力敏捷大数据-王庆", + "link": "https://insight2018.pek3a.qingstor.com/%E8%A7%86%E9%A2%91/%E5%AE%B9%E5%99%A8%E3%80%81%E5%BE%AE%E6%9C%8D%E5%8A%A1%E6%9E%84%E6%9E%B6%E4%B8%8E%E6%B2%BB%E7%90%86%E4%B8%93%E9%A2%98%E8%AE%BA%E5%9D%9B/DataOps%20%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF%E5%8A%A9%E5%8A%9B%E6%95%8F%E6%8D%B7%E5%A4%A7%E6%95%B0%E6%8D%AE-%E7%8E%8B%E5%BA%86%E4%B8%80-%E6%96%B0%E6%B0%A6%E6%95%B0%E6%8D%AE%20CEO.mp4", + "createTime": "2018.07.27", + "snapshot": "https://pek3b.qingstor.com/kubesphere-docs/png/20190928184613.png", + "group": "CIC 用户大会", + "tag": "KubeSphere 2.0,峰会论坛" + }, + { + "title": "DevOps 工具链落地之路-王青", + "link": "https://insight2018.pek3a.qingstor.com/%E8%A7%86%E9%A2%91/%E5%AE%B9%E5%99%A8%E3%80%81%E5%BE%AE%E6%9C%8D%E5%8A%A1%E6%9E%84%E6%9E%B6%E4%B8%8E%E6%B2%BB%E7%90%86%E4%B8%93%E9%A2%98%E8%AE%BA%E5%9D%9B/DevOps%20%E5%B7%A5%E5%85%B7%E9%93%BE%E8%90%BD%E5%9C%B0%E4%B9%8B%E8%B7%AF-%E7%8E%8B%E9%9D%92-JFrog%20%E4%B8%AD%E5%9B%BD%E9%A6%96%E5%B8%AD%E6%9E%B6%E6%9E%84%E5%B8%88.mp4", + "createTime": "2018.07.27", + "snapshot": "https://pek3b.qingstor.com/kubesphere-docs/png/20190928184613.png", + "group": "CIC 用户大会", + "tag": "KubeSphere 2.0,峰会论坛" + }, + { + "title": "ofo 小黄车容器云平台及业务容器化实践-王强", + "link": "https://insight2018.pek3a.qingstor.com/%E8%A7%86%E9%A2%91/%E5%AE%B9%E5%99%A8%E3%80%81%E5%BE%AE%E6%9C%8D%E5%8A%A1%E6%9E%84%E6%9E%B6%E4%B8%8E%E6%B2%BB%E7%90%86%E4%B8%93%E9%A2%98%E8%AE%BA%E5%9D%9B/ofo%20%E5%B0%8F%E9%BB%84%E8%BD%A6%E5%AE%B9%E5%99%A8%E4%BA%91%E5%B9%B3%E5%8F%B0%E5%8F%8A%E4%B8%9A%E5%8A%A1%E5%AE%B9%E5%99%A8%E5%8C%96%E5%AE%9E%E8%B7%B5-%E7%8E%8B%E5%BC%BA-ofo%20%E5%B0%8F%E9%BB%84%E8%BD%A6%E5%AE%B9%E5%99%A8%E4%BA%91%E7%A0%94%E5%8F%91%E8%B4%9F%E8%B4%A3%E4%BA%BA.mp4", + "createTime": "2018.07.27", + "snapshot": "https://pek3b.qingstor.com/kubesphere-docs/png/20190928184613.png", + "group": "CIC 用户大会", + "tag": "KubeSphere 2.0,峰会论坛" + }, + { + "title": "Porter:面向裸金属环境的 Kubernetes 开源负载均衡器", + "link": "https://kubesphere-docs.pek3b.qingstor.com/website/kubecon/Porter%20-%20An%20Open%20Source%20Load%20Balancer%20for%20Bare%20Metal%20Kubernetes%20-%20Xuetao%20Song%20%26%20Fang%20Du.mp4", + "createTime": "2019.09.27", + "snapshot": "https://pek3b.qingstor.com/kubesphere-docs/png/20190928115532.png", + "group": "KubeCon", + "tag": "Kubernetes,峰会论坛" + }, + { + "title": "The New Stack 在 KubeCon 采访 Porter 作者宋雪涛", + "link": "https://kubesphere-docs.pek3b.qingstor.com/website/kubecon/Open%20Source%20Load%20Balancing%20on%20Bare%20Metal.mp4", + "createTime": "2019.09.27", + "snapshot": "https://pek3b.qingstor.com/kubesphere-docs/png/20190928115700.png", + "group": "KubeCon", + "tag": "Kubernetes" + }, + { + "title": "Serverless Jenkins on Kubernetes - Jenkins X", + "link": "https://kubesphere-docs.pek3b.qingstor.com/website/kubecon/Serverless%20Jenkins%20on%20Kubernetes%20-%20Jenkins%20X%20-%20RunZe%20Xia%20%26%20Fang%20Du.mp4", + "createTime": "2019.09.27", + "snapshot": "https://pek3b.qingstor.com/kubesphere-docs/png/20190928115408.png", + "group": "KubeCon", + "tag": "Kubernetes,峰会论坛" + }, + { + "title": "KubeSphere 容器平台产品发布会", + "link": "https://workshop.pek3a.qingstor.com/%E5%A4%A7%E9%81%93%E8%87%B3%E7%AE%80%E4%B8%BB%E4%BC%9A%E5%9C%BA%E7%9B%B4%E6%92%AD%E8%A7%86%E9%A2%91-%E5%89%AA%E8%BE%91.mp4", + "createTime": "2019.04.18", + "snapshot": "https://pek3b.qingstor.com/kubesphere-docs/png/20190928181423.png", + "group": "发布会", + "tag": "KubeSphere 2.0,容器,峰会论坛" + }, + { + "title": "嘉宾观点 - 阳光保险云计算架构师朱向阳", + "link": "https://workshop.pek3a.qingstor.com/%E9%98%B3%E5%85%89%E4%BF%9D%E9%99%A9%E4%BA%91%E8%AE%A1%E7%AE%97%E6%9E%B6%E6%9E%84%E5%B8%88-%E6%9C%B1%E5%90%91%E9%98%B3.mp4", + "createTime": "2019.04.18", + "snapshot": "https://pek3b.qingstor.com/kubesphere-docs/png/20190928182510.png", + "group": "发布会", + "tag": "KubeSphere 2.0,容器" + }, + { + "title": "嘉宾观点 - 马哥教育创始人、CEO 马永亮", + "link": "https://workshop.pek3a.qingstor.com/%E9%98%B3%E5%85%89%E4%BF%9D%E9%99%A9%E4%BA%91%E8%AE%A1%E7%AE%97%E6%9E%B6%E6%9E%84%E5%B8%88-%E6%9C%B1%E5%90%91%E9%98%B3.mp4", + "createTime": "2019.04.18", + "snapshot": "https://pek3b.qingstor.com/kubesphere-docs/png/20190928182936.png", + "group": "发布会", + "tag": "KubeSphere 2.0,容器" + }, + { + "title": "嘉宾观点 - 某保险公司云计算架构师芦苇", + "link": "https://workshop.pek3a.qingstor.com/%E6%9F%90%E4%BF%9D%E9%99%A9%E5%85%AC%E5%8F%B8%E4%BA%91%E8%AE%A1%E7%AE%97%E6%9E%B6%E6%9E%84%E5%B8%88-%E8%8A%A6%E8%8B%87.mp4", + "createTime": "2019.04.18", + "snapshot": "https://pek3b.qingstor.com/kubesphere-docs/png/20190928183054.png", + "group": "发布会", + "tag": "KubeSphere 2.0,容器" + }, + { + "title": "嘉宾观点 - CuriosityChina CTO 水羽哲", + "link": "https://workshop.pek3a.qingstor.com/Curiosity%20China%20CTO%E6%B0%B4%E7%BE%BD%E5%93%B2.mp4", + "createTime": "2019.04.18", + "snapshot": "https://pek3b.qingstor.com/kubesphere-docs/png/20190928183123.png", + "group": "发布会", + "tag": "KubeSphere 2.0,容器" + }, + { + "title": "嘉宾观点 - 金融 PaaS 技术专家陈沙克", + "link": "https://workshop.pek3a.qingstor.com/%E9%87%91%E8%9E%8DPaaS%E6%8A%80%E6%9C%AF%E4%B8%93%E5%AE%B6-%E9%99%88%E6%B2%99%E5%85%8B.mp4", + "createTime": "2019.04.18", + "snapshot": "https://pek3b.qingstor.com/kubesphere-docs/png/20190928183241.png", + "group": "发布会", + "tag": "KubeSphere 2.0,容器" + }, + { + "title": "KubeSphere 是什么", + "link": "https://kubesphere-docs.pek3b.qingstor.com/website/%E4%BA%A7%E5%93%81%E4%BB%8B%E7%BB%8D/Container_100P003C201904_KubeSphere%E6%98%AF%E4%BB%80%E4%B9%88.mp4", + "createTime": "2019.09.27", + "snapshot": "https://pek3b.qingstor.com/kubesphere-docs/png/20190928165927.png", + "group": "产品介绍", + "tag": "KubeSphere 2.0,容器" + }, + { + "title": "KubeSphere架构与主要功能", + "link": "https://kubesphere-docs.pek3b.qingstor.com/website/%E4%BA%A7%E5%93%81%E4%BB%8B%E7%BB%8D/Container_100P004C201904_KubeSphere%E6%9E%B6%E6%9E%84%E4%B8%8E%E4%B8%BB%E8%A6%81%E5%8A%9F%E8%83%BD.mp4", + "createTime": "2019.09.27", + "snapshot": "https://pek3b.qingstor.com/kubesphere-docs/png/20190928170035.png", + "group": "产品介绍", + "tag": "KubeSphere 2.0,容器" + }, + { + "title": "KubeSphere 全景功能概览", + "link": "https://kubesphere-docs.pek3b.qingstor.com/website/%E4%BA%A7%E5%93%81%E4%BB%8B%E7%BB%8D/Container_100P005C201904_KubeSphere%20%E5%85%A8%E6%99%AF%E5%8A%9F%E8%83%BD%E6%A6%82%E8%A7%88.mp4", + "createTime": "2019.09.27", + "snapshot": "https://pek3b.qingstor.com/kubesphere-docs/png/20190928170201.png", + "group": "产品介绍", + "tag": "KubeSphere 2.0,容器" + }, + { + "title": "KubeSphere 租户和权限管理", + "link": "https://kubesphere-docs.pek3b.qingstor.com/website/%E4%BA%A7%E5%93%81%E4%BB%8B%E7%BB%8D/Container_100P006C201906_KubeSphere%20%E7%A7%9F%E6%88%B7%E5%92%8C%E6%9D%83%E9%99%90%E7%AE%A1%E7%90%86.mp4", + "createTime": "2019.09.27", + "snapshot": "https://pek3b.qingstor.com/kubesphere-docs/png/20190928170244.png", + "group": "产品介绍", + "tag": "KubeSphere 2.0,容器" + }, + { + "title": "KubeSphere 的网络与存储", + "link": "https://kubesphere-docs.pek3b.qingstor.com/website/%E4%BA%A7%E5%93%81%E4%BB%8B%E7%BB%8D/Container_100P007C201906_KubeSphere%20%E7%9A%84%E7%BD%91%E7%BB%9C%E4%B8%8E%E5%AD%98%E5%82%A8.mp4", + "createTime": "2019.09.27", + "snapshot": "https://pek3b.qingstor.com/kubesphere-docs/png/20190928170313.png", + "group": "产品介绍", + "tag": "KubeSphere 2.0,容器" + }, + { + "title": "KubeSphere 集群资源管理与监控", + "link": "https://kubesphere-docs.pek3b.qingstor.com/website/%E4%BA%A7%E5%93%81%E4%BB%8B%E7%BB%8D/Container_100P008C201906_KubeSphere%20%E9%9B%86%E7%BE%A4%E8%B5%84%E6%BA%90%E7%AE%A1%E7%90%86%E4%B8%8E%E7%9B%91%E6%8E%A7.mp4", + "createTime": "2019.09.27", + "snapshot": "https://pek3b.qingstor.com/kubesphere-docs/png/20190928170358.png", + "group": "产品介绍", + "tag": "KubeSphere 2.0,容器" + }, + { + "title": "KubeSphere 多租户日志", + "link": "https://kubesphere-docs.pek3b.qingstor.com/website/%E4%BA%A7%E5%93%81%E4%BB%8B%E7%BB%8D/Container_100P009C201906_KubeSphere%20%E6%97%A5%E5%BF%97.mp4", + "createTime": "2019.09.27", + "snapshot": "https://pek3b.qingstor.com/kubesphere-docs/png/20190928170458.png", + "group": "产品介绍", + "tag": "KubeSphere 2.0,容器" + }, + { + "title": "KubeSphere 告警和通知", + "link": "https://kubesphere-docs.pek3b.qingstor.com/website/%E4%BA%A7%E5%93%81%E4%BB%8B%E7%BB%8D/Container_100P010C201906_KubeSphere%20%E5%91%8A%E8%AD%A6%E5%92%8C%E9%80%9A%E7%9F%A5.mp4", + "createTime": "2019.09.27", + "snapshot": "https://pek3b.qingstor.com/kubesphere-docs/png/20190928120049.png", + "group": "产品介绍", + "tag": "KubeSphere 2.0,容器" + }, + { + "title": "Porter 在本来生活的落地实践", + "link": "https://kubesphere-docs.pek3b.qingstor.com/website/meetup/benlaishenghuo-final.mp4", + "createTime": "2019.12.14", + "snapshot": "https://pek3b.qingstor.com/kubesphere-docs/png/20200206171221.png", + "group": "Meetup", + "tag": "网络,容器,Kubernetes" + }, + { + "title": "新浪产品运维团队 K8s 应用实践", + "link": "https://kubesphere-docs.pek3b.qingstor.com/website/meetup/sina-k8s.mp4", + "createTime": "2019.12.14", + "snapshot": "https://pek3b.qingstor.com/kubesphere-docs/png/20200206171248.png", + "group": "Meetup", + "tag": "容器,Kubernetes" + }, + { + "title": "在 OpenShift 部署 KubeSphere", + "link": "https://kubesphere-docs.pek3b.qingstor.com/video/Demo-Install-KubeSphere-on-OpenShift.mp4", + "createTime": "2020.01.20", + "snapshot": "https://pek3b.qingstor.com/kubesphere-docs/png/20200308224101.png", + "group": "Webniar", + "tag": "容器" + }, + { + "title": "KubeSphere 多维度监控教程", + "link": "https://kubesphere-docs.pek3b.qingstor.com/website/%E5%85%A5%E9%97%A8%E6%95%99%E7%A8%8B/%E5%A4%9A%E7%BB%B4%E5%BA%A6%E7%9B%91%E6%8E%A7.mov", + "createTime": "2019.06.24", + "snapshot": "https://pek3b.qingstor.com/kubesphere-docs/png/20190928174806.png", + "group": "入门教程", + "tag": "KubeSphere 2.0,容器,Kubernetes" + }, + { + "title": "KubeSphere 日志查询与收集教程", + "link": "https://kubesphere-docs.pek3b.qingstor.com/website/%E5%85%A5%E9%97%A8%E6%95%99%E7%A8%8B/kubesphere%20%E6%97%A5%E5%BF%97.mov", + "createTime": "2019.06.24", + "snapshot": "https://pek3b.qingstor.com/kubesphere-docs/png/20190928175300.png", + "group": "入门教程", + "tag": "KubeSphere 2.0,容器,Kubernetes" + }, + { + "title": "KubeSphere 集群与工作负载告警策略", + "link": "https://kubesphere-docs.pek3b.qingstor.com/website/%E5%85%A5%E9%97%A8%E6%95%99%E7%A8%8B/kubesphere%20%E5%91%8A%E8%AD%A6.mov", + "createTime": "2019.06.24", + "snapshot": "https://pek3b.qingstor.com/kubesphere-docs/png/20190928175350.png", + "group": "入门教程", + "tag": "KubeSphere 2.0,容器,Kubernetes" + }, + { + "title": "CI/CD 流水线发布 Spring Boot 项目至 K8s", + "link": "https://kubesphere-docs.pek3b.qingstor.com/website/%E5%85%A5%E9%97%A8%E6%95%99%E7%A8%8B/inscm-20190412-1080.mov", + "createTime": "2019.06.24", + "snapshot": "https://pek3b.qingstor.com/kubesphere-docs/png/20190928175645.png", + "group": "入门教程", + "tag": "KubeSphere 2.0,容器,Kubernetes" + }, + { + "title": "图形化构建流水线发布项目至 K8s", + "link": "https://kubesphere-docs.pek3b.qingstor.com/website/%E5%85%A5%E9%97%A8%E6%95%99%E7%A8%8B/noscm-20190412-1080.mov", + "createTime": "2019.06.24", + "snapshot": "https://pek3b.qingstor.com/kubesphere-docs/png/20190928175943.png", + "group": "入门教程", + "tag": "KubeSphere 2.0,容器,Kubernetes" + }, + { + "title": "Source-to-Image(代码直达镜像)", + "link": "https://kubesphere-docs.pek3b.qingstor.com/website/%E5%85%A5%E9%97%A8%E6%95%99%E7%A8%8B/s2i-20190412-1080.mov", + "createTime": "2019.06.24", + "snapshot": "https://pek3b.qingstor.com/kubesphere-docs/png/20190928180222.png", + "group": "入门教程", + "tag": "KubeSphere 2.0,容器,Kubernetes" + }, + { + "title": "微服务治理 - Bookinfo 应用的金丝雀发布(上)", + "link": "https://kubesphere-docs.pek3b.qingstor.com/website/%E5%85%A5%E9%97%A8%E6%95%99%E7%A8%8B/1.mov", + "createTime": "2019.06.24", + "snapshot": "https://pek3b.qingstor.com/kubesphere-docs/png/20190928180638.png", + "group": "入门教程", + "tag": "KubeSphere 2.0,容器,Kubernetes" + }, + { + "title": "微服务治理 - Bookinfo 应用的金丝雀发布(中)", + "link": "https://kubesphere-docs.pek3b.qingstor.com/website/%E5%85%A5%E9%97%A8%E6%95%99%E7%A8%8B/2.mov", + "createTime": "2019.06.24", + "snapshot": "https://pek3b.qingstor.com/kubesphere-docs/png/20190928181043.png", + "group": "入门教程", + "tag": "KubeSphere 2.0,容器,Kubernetes" + }, + { + "title": "微服务治理 - Bookinfo 应用的金丝雀发布(下)", + "link": "https://kubesphere-docs.pek3b.qingstor.com/website/%E5%85%A5%E9%97%A8%E6%95%99%E7%A8%8B/s2i-20190412-1080.mov", + "createTime": "2019.06.24", + "snapshot": "https://pek3b.qingstor.com/kubesphere-docs/png/20190928181112.png", + "group": "入门教程", + "tag": "KubeSphere 2.0,容器,Kubernetes" + }, + { + "title": "容器是什么", + "link": "https://kubesphere-docs.pek3b.qingstor.com/website/%E4%BA%A7%E5%93%81%E4%BB%8B%E7%BB%8D/Container_100P001C201804_%E5%AE%B9%E5%99%A8%E6%98%AF%E4%BB%80%E4%B9%88.mp4", + "createTime": "2019.09.27", + "snapshot": "https://pek3b.qingstor.com/kubesphere-docs/png/20190928114725.png", + "group": "Kubernetes基础", + "tag": "Kubernetes,容器" + }, + { + "title": "容器与镜像的关系", + "link": "https://kubesphere-docs.pek3b.qingstor.com/website/%E4%BA%A7%E5%93%81%E4%BB%8B%E7%BB%8D/Container_100P002C201804_%E5%AE%B9%E5%99%A8%E4%B8%8E%E9%95%9C%E5%83%8F%E7%9A%84%E5%85%B3%E7%B3%BB.mp4", + "createTime": "2019.09.27", + "snapshot": "https://pek3b.qingstor.com/kubesphere-docs/png/20190928114801.png", + "group": "Kubernetes基础", + "tag": "Kubernetes,容器" + }, + { + "title": "什么是 Kubernetes", + "link": "https://kubesphere-docs.pek3b.qingstor.com/website/Kubernetes%E5%9F%BA%E7%A1%80/K8S_100P001C201809_K8S%E6%98%AF%E4%BB%80%E4%B9%88.mp4", + "createTime": "2019.09.27", + "snapshot": "https://pek3b.qingstor.com/kubesphere-docs/png/20190928000918.png", + "group": "Kubernetes基础", + "tag": "Kubernetes,快速教程" + }, + { + "title": "Kubernetes 与 KubeSphere 的关系", + "link": "https://kubesphere-docs.pek3b.qingstor.com/website/Kubernetes%E5%9F%BA%E7%A1%80/K8S_100P002C201809_K8S%E4%B8%8EKubeSphere%E7%9A%84%E5%85%B3%E7%B3%BB.mp4", + "createTime": "2019.09.27", + "snapshot": "https://pek3b.qingstor.com/kubesphere-docs/png/20190928001616.png", + "group": "Kubernetes基础", + "tag": "Kubernetes,快速教程" + }, + { + "title": "Kubernetes 架构", + "link": "https://kubesphere-docs.pek3b.qingstor.com/website/Kubernetes%E5%9F%BA%E7%A1%80/K8S_100P003C201809_K8S%E6%9E%B6%E6%9E%84.mp4", + "createTime": "2019.09.27", + "snapshot": "https://pek3b.qingstor.com/kubesphere-docs/png/20190928001806.png", + "group": "Kubernetes基础", + "tag": "Kubernetes,快速教程" + }, + { + "title": "Kubernetes 基本概念(上)", + "link": "https://kubesphere-docs.pek3b.qingstor.com/website/Kubernetes%E5%9F%BA%E7%A1%80/K8S_100P004C201809_K8S%E5%9F%BA%E6%9C%AC%E6%A6%82%E5%BF%B5-1.mp4", + "createTime": "2019.09.27", + "snapshot": "https://pek3b.qingstor.com/kubesphere-docs/png/20190928001957.png", + "group": "Kubernetes基础", + "tag": "Kubernetes,快速教程" + }, + { + "title": "Kubernetes 基本概念(中)", + "link": "https://kubesphere-docs.pek3b.qingstor.com/website/Kubernetes%E5%9F%BA%E7%A1%80/K8S_100P005C201809_K8S%E5%9F%BA%E6%9C%AC%E6%A6%82%E5%BF%B5-2.mp4", + "createTime": "2019.09.27", + "snapshot": "https://pek3b.qingstor.com/kubesphere-docs/png/20190928002045.png", + "group": "Kubernetes基础", + "tag": "Kubernetes,快速教程" + }, + { + "title": "Kubernetes 基本概念(下)", + "link": "https://kubesphere-docs.pek3b.qingstor.com/website/Kubernetes%E5%9F%BA%E7%A1%80/K8S_100P005C201809_K8S%E5%9F%BA%E6%9C%AC%E6%A6%82%E5%BF%B5-3.mp4", + "createTime": "2019.09.27", + "snapshot": "https://pek3b.qingstor.com/kubesphere-docs/png/20190928002215.png", + "group": "Kubernetes基础", + "tag": "Kubernetes,快速教程" + }, + { + "title": "Kubernetes 网络(上)", + "link": "https://kubesphere-docs.pek3b.qingstor.com/website/Kubernetes%E5%9F%BA%E7%A1%80/K8S_100P007C201809_K8S%20Networking-1.mp4", + "createTime": "2019.09.27", + "snapshot": "https://pek3b.qingstor.com/kubesphere-docs/png/20190928002445.png", + "group": "Kubernetes基础", + "tag": "Kubernetes,快速教程" + }, + { + "title": "Kubernetes 网络(下)", + "link": "https://kubesphere-docs.pek3b.qingstor.com/website/Kubernetes%E5%9F%BA%E7%A1%80/K8S_100P007C201809_K8S%20Networking-2.mp4", + "createTime": "2019.09.27", + "snapshot": "https://pek3b.qingstor.com/kubesphere-docs/png/20190928002510.png", + "group": "Kubernetes基础", + "tag": "Kubernetes,快速教程" + }, + { + "title": "Kubernetes 存储(上)", + "link": "https://kubesphere-docs.pek3b.qingstor.com/website/Kubernetes%E5%9F%BA%E7%A1%80/K8S_100P009C201809_K8S%20Storage-1.mp4", + "createTime": "2019.09.27", + "snapshot": "https://pek3b.qingstor.com/kubesphere-docs/png/20190928002616.png", + "group": "Kubernetes基础", + "tag": "Kubernetes,快速教程" + }, + { + "title": "Kubernetes 存储(下)", + "link": "https://kubesphere-docs.pek3b.qingstor.com/website/Kubernetes%E5%9F%BA%E7%A1%80/K8S_100P010C201809_K8S%20Storage-2-CSI%20%E6%9E%B6%E6%9E%84.mp4", + "createTime": "2019.09.27", + "snapshot": "https://pek3b.qingstor.com/kubesphere-docs/png/20190928002702.png", + "group": "Kubernetes基础", + "tag": "Kubernetes,快速教程" + } +] diff --git a/i18n/en.yaml b/i18n/en.yaml index ce13c85d7..3519f25d0 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -1,3 +1,5 @@ +- id: introduction1 + translation: Technology Blogs - id: introduction2 translation: KubeSphere®️ 2020 All Rights Reserved. - id: introduction3 @@ -18,3 +20,11 @@ translation: Open Source Community - id: introduction11 translation: KubeSphere is committed to the open source contribution of cloud native technology, enriching the ecology of the open source community +- id: introduction12 + translation: Goto Github +- id: email is required + translation: email is required! +- id: Please enter a valid email address. + translation: Please enter a valid email address! + + diff --git a/i18n/zh.yaml b/i18n/zh.yaml index f69f1a2b4..838e95145 100644 --- a/i18n/zh.yaml +++ b/i18n/zh.yaml @@ -1,3 +1,17 @@ +- id: introduction1 + translation: 技术博客 +- id: introduction2 + translation: " " +- id: introduction3 + translation: 发布于 +- id: introduction4 + translation: KubeCon & QCon +- id: introduction5 + translation: 订阅 +- id: introduction6 + translation: 请输入你的邮箱地址 +- id: introduction7 + translation: " " - id: introduction8 translation: 欢迎使用 KubeSphere 文档 - id: introduction9 diff --git a/layouts/404.html b/layouts/404.html index 0bf36cdfd..8a518af0f 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -1,6 +1,6 @@ {{ define "main" }} -
-

页面不存在

+
+

404

{{ end }} \ No newline at end of file diff --git a/layouts/blogs/list.html b/layouts/blogs/list.html index 6394d9da4..ca40d1edd 100644 --- a/layouts/blogs/list.html +++ b/layouts/blogs/list.html @@ -1,6 +1,65 @@ {{ define "main" }} {{- partial "openSource.html" . -}} -
-

内容

+
+
+
    +
  • {{ .Params.tip }}
  • + {{ $tags := slice }} + {{ range .Data.Pages }} + {{ $tag := split .Params.tag ","}} + {{ $tags = $tags | append $tag }} + {{ end }} + {{ range ($tags | uniq) }} +
  • {{ . }}
  • + {{ end }} +
+
    + {{ range .Data.Pages }} +
  • +
    + +
    +
    +

    {{ .Params.createTime }}

    +

    {{ .Title }}

    +
    + + {{ .Params.author }} +
    +

    {{ substr .Summary 0 89 }}

    +
      + {{ range (split .Params.tag ",") }} +
    • {{ . }}
    • + {{ end }} +
    +
    + +
  • + {{ end }} +
+
+ + {{ end }} \ No newline at end of file diff --git a/layouts/blogs/single.html b/layouts/blogs/single.html new file mode 100644 index 000000000..ea270a4ac --- /dev/null +++ b/layouts/blogs/single.html @@ -0,0 +1,39 @@ + + +{{- partial "head.html" . -}} + +{{ $style := resources.Get "scss/content.scss" | toCSS | minify | fingerprint }} + + +{{ $style := resources.Get "scss/markdown.scss" | toCSS | minify | fingerprint }} + + + +{{- partial "header.html" . -}} +
+
+ +
+
{{ .Params.author }}
+
{{ i18n "introduction3" }}:{{ .Params.createTime }}
+

{{ .Title }}

+
+
+ {{ .Content }} +
+
+
+
+
Table of Contents
+
{{ .TableOfContents }}
+
+
+
+{{- partial "footer.html" . -}} + + + + \ No newline at end of file diff --git a/layouts/case/list.html b/layouts/case/list.html index 64fe6c45f..1bd53b74e 100644 --- a/layouts/case/list.html +++ b/layouts/case/list.html @@ -18,11 +18,12 @@

{{ .content }}

{{ end }} + {{ end }}
@@ -46,7 +47,11 @@ {{ end }} {{ end }} + {{ with .bottomContent }} +

{{ .content }} {{ .linkContent }}

+ {{ end }} + {{ end }}
\ No newline at end of file diff --git a/layouts/contribution/list.html b/layouts/contribution/list.html index b53ceb3b5..b65b4bc29 100644 --- a/layouts/contribution/list.html +++ b/layouts/contribution/list.html @@ -113,6 +113,7 @@
{{ with .Params.section4.involved }} +

{{ .title }}

{{ range .children}} @@ -129,6 +130,19 @@ {{ end }}
+
+ {{ with .Params.section5 }} +

{{ .title }}

+
    + {{ range .list }} +
  • + +
  • + {{ end }} +
+ {{ end }} +
+ \ No newline at end of file diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 31d89c440..4fa203433 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -6,6 +6,7 @@ + {{ $common := resources.Get "scss/common.scss" | toCSS | minify | fingerprint }} diff --git a/layouts/partials/header.html b/layouts/partials/header.html index a5c689868..21b6ec95d 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -48,9 +48,9 @@
  • ":'
  • '+b+"
  • ";else k.showFirstOnEllipsisShow&&(h+='
  • 1
  • '),h+='
  • '+j+"
  • ";for(b=f;b<=g;b++)h+=b==d?'
  • '+b+"
  • ":'
  • '+b+"
  • ";if(g>=e-2)for(b=g+1;b<=e;b++)h+='
  • '+b+"
  • ";else h+='
  • '+j+"
  • ",k.showLastOnEllipsisShow&&(h+='
  • '+e+"
  • ");return h},generateHTML:function(a){var c,d=this,e=a.currentPage,f=d.getTotalPage(),g=d.getTotalNumber(),h=k.showPrevious,i=k.showNext,j=k.showPageNumbers,l=k.showNavigator,m=k.showGoInput,n=k.showGoButton,o=k.pageLink,p=k.prevText,q=k.nextText,r=k.goButtonText,s=k.classPrefix,t=k.disableClassName,u=k.ulClassName,v="",w='',x='',y=b.isFunction(k.formatNavigator)?k.formatNavigator(e,f,g):k.formatNavigator,z=b.isFunction(k.formatGoInput)?k.formatGoInput(w,e,f,g):k.formatGoInput,A=b.isFunction(k.formatGoButton)?k.formatGoButton(x,e,f,g):k.formatGoButton,B=b.isFunction(k.autoHidePrevious)?k.autoHidePrevious():k.autoHidePrevious,C=b.isFunction(k.autoHideNext)?k.autoHideNext():k.autoHideNext,D=b.isFunction(k.header)?k.header(e,f,g):k.header,E=b.isFunction(k.footer)?k.footer(e,f,g):k.footer;return D&&(c=d.replaceVariables(D,{currentPage:e,totalPage:f,totalNumber:g}),v+=c),(h||j||i)&&(v+='
    ',v+=u?'
      ':"
        ",h&&(e<=1?B||(v+='
      • '+p+"
      • "):v+='
      • '+p+"
      • "),j&&(v+=d.generatePageNumbersHTML(a)),i&&(e>=f?C||(v+='
      • '+q+"
      • "):v+='
      • '+q+"
      • "),v+="
    "),l&&y&&(c=d.replaceVariables(y,{currentPage:e,totalPage:f,totalNumber:g}),v+='
    '+c+"
    "),m&&z&&(c=d.replaceVariables(z,{currentPage:e,totalPage:f,totalNumber:g,input:w}),v+='
    '+c+"
    "),n&&A&&(c=d.replaceVariables(A,{currentPage:e,totalPage:f,totalNumber:g,button:x}),v+='
    '+c+"
    "),E&&(c=d.replaceVariables(E,{currentPage:e,totalPage:f,totalNumber:g}),v+=c),v},findTotalNumberFromRemoteResponse:function(a){this.model.totalNumber=k.totalNumberLocator(a)},go:function(a,c){function d(a){if(!1===e.callHook("beforePaging",g))return!1;if(f.direction=void 0===f.pageNumber?0:g>f.pageNumber?1:-1,f.pageNumber=g,e.render(),e.disabled&&e.isAsync&&e.enable(),j.data("pagination").model=f,k.formatResult){var d=b.extend(!0,[],a);i.isArray(a=k.formatResult(d))||(a=d)}j.data("pagination").currentPageData=a,e.doCallback(a,c),e.callHook("afterPaging",g),1==g&&e.callHook("afterIsFirstPage"),g==e.getTotalPage()&&e.callHook("afterIsLastPage")}var e=this,f=e.model;if(!e.disabled){var g=a;if((g=parseInt(g))&&!(g<1)){var h=k.pageSize,l=e.getTotalNumber(),m=e.getTotalPage();if(!(l>0&&g>m)){if(!e.isAsync)return void d(e.getDataFragment(g));var n={},o=k.alias||{};n[o.pageSize?o.pageSize:"pageSize"]=h,n[o.pageNumber?o.pageNumber:"pageNumber"]=g;var p=b.isFunction(k.ajax)?k.ajax():k.ajax,q={type:"get",cache:!1,data:{},contentType:"application/x-www-form-urlencoded; charset=UTF-8",dataType:"json",async:!0};b.extend(!0,q,p),b.extend(q.data,n),q.url=k.dataSource,q.success=function(a){e.isDynamicTotalNumber?e.findTotalNumberFromRemoteResponse(a):e.model.totalNumber=k.totalNumber,d(e.filterDataByLocator(a))},q.error=function(a,b,c){k.formatAjaxError&&k.formatAjaxError(a,b,c),e.enable()},e.disable(),b.ajax(q)}}}},doCallback:function(a,c){var d=this,e=d.model;b.isFunction(c)?c(a,e):b.isFunction(k.callback)&&k.callback(a,e)},destroy:function(){!1!==this.callHook("beforeDestroy")&&(this.model.el.remove(),j.off(),b("#paginationjs-style").remove(),this.callHook("afterDestroy"))},previous:function(a){this.go(this.model.pageNumber-1,a)},next:function(a){this.go(this.model.pageNumber+1,a)},disable:function(){var a=this,b=a.isAsync?"async":"sync";!1!==a.callHook("beforeDisable",b)&&(a.disabled=!0,a.model.disabled=!0,a.callHook("afterDisable",b))},enable:function(){var a=this,b=a.isAsync?"async":"sync";!1!==a.callHook("beforeEnable",b)&&(a.disabled=!1,a.model.disabled=!1,a.callHook("afterEnable",b))},refresh:function(a){this.go(this.model.pageNumber,a)},show:function(){var a=this;a.model.el.is(":visible")||a.model.el.show()},hide:function(){var a=this;a.model.el.is(":visible")&&a.model.el.hide()},replaceVariables:function(a,b){var c;for(var d in b){var e=b[d],f=new RegExp("<%=\\s*"+d+"\\s*%>","img");c=(c||a).replace(f,e)}return c},getDataFragment:function(a){var b=k.pageSize,c=k.dataSource,d=this.getTotalNumber(),e=b*(a-1)+1,f=Math.min(a*b,d);return c.slice(e-1,f)},getTotalNumber:function(){return this.model.totalNumber||k.totalNumber||0},getTotalPage:function(){return Math.ceil(this.getTotalNumber()/k.pageSize)},getLocator:function(a){var d;return"string"==typeof a?d=a:b.isFunction(a)?d=a():c('"locator" is incorrect. (String | Function)'),d},filterDataByLocator:function(a){var d,e=this.getLocator(k.locator);if(i.isObject(a)){try{b.each(e.split("."),function(b,c){d=(d||a)[c]})}catch(a){}d?i.isArray(d)||c("dataSource."+e+" must be an Array."):c("dataSource."+e+" is undefined.")}return d||a},parseDataSource:function(a,d){var e=this;i.isObject(a)?d(k.dataSource=e.filterDataByLocator(a)):i.isArray(a)?d(k.dataSource=a):b.isFunction(a)?k.dataSource(function(a){i.isArray(a)||c('The parameter of "done" Function should be an Array.'),e.parseDataSource.call(e,a,d)}):"string"==typeof a?(/^https?|file:/.test(a)&&(k.ajaxDataType="jsonp"),d(a)):c('Unexpected type of "dataSource".')},callHook:function(c){var d,e=j.data("pagination"),f=Array.prototype.slice.apply(arguments);return f.shift(),k[c]&&b.isFunction(k[c])&&!1===k[c].apply(a,f)&&(d=!1),e.hooks&&e.hooks[c]&&b.each(e.hooks[c],function(b,c){!1===c.apply(a,f)&&(d=!1)}),!1!==d},observer:function(){var a=this,d=a.model.el;j.on(h+"go",function(d,e,f){(e=parseInt(b.trim(e)))&&(b.isNumeric(e)||c('"pageNumber" is incorrect. (Number)'),a.go(e,f))}),d.delegate(".J-paginationjs-page","click",function(c){var d=b(c.currentTarget),e=b.trim(d.attr("data-num"));if(e&&!d.hasClass(k.disableClassName)&&!d.hasClass(k.activeClassName))return!1!==a.callHook("beforePageOnClick",c,e)&&(a.go(e),a.callHook("afterPageOnClick",c,e),!!k.pageLink&&void 0)}),d.delegate(".J-paginationjs-previous","click",function(c){var d=b(c.currentTarget),e=b.trim(d.attr("data-num"));if(e&&!d.hasClass(k.disableClassName))return!1!==a.callHook("beforePreviousOnClick",c,e)&&(a.go(e),a.callHook("afterPreviousOnClick",c,e),!!k.pageLink&&void 0)}),d.delegate(".J-paginationjs-next","click",function(c){var d=b(c.currentTarget),e=b.trim(d.attr("data-num"));if(e&&!d.hasClass(k.disableClassName))return!1!==a.callHook("beforeNextOnClick",c,e)&&(a.go(e),a.callHook("afterNextOnClick",c,e),!!k.pageLink&&void 0)}),d.delegate(".J-paginationjs-go-button","click",function(c){var e=b(".J-paginationjs-go-pagenumber",d).val();if(!1===a.callHook("beforeGoButtonOnClick",c,e))return!1;j.trigger(h+"go",e),a.callHook("afterGoButtonOnClick",c,e)}),d.delegate(".J-paginationjs-go-pagenumber","keyup",function(c){if(13===c.which){var e=b(c.currentTarget).val();if(!1===a.callHook("beforeGoInputOnEnter",c,e))return!1;j.trigger(h+"go",e),b(".J-paginationjs-go-pagenumber",d).focus(),a.callHook("afterGoInputOnEnter",c,e)}}),j.on(h+"previous",function(b,c){a.previous(c)}),j.on(h+"next",function(b,c){a.next(c)}),j.on(h+"disable",function(){a.disable()}),j.on(h+"enable",function(){a.enable()}),j.on(h+"refresh",function(b,c){a.refresh(c)}),j.on(h+"show",function(){a.show()}),j.on(h+"hide",function(){a.hide()}),j.on(h+"destroy",function(){a.destroy()});var e=Math.max(a.getTotalPage(),1),f=k.pageNumber;a.isDynamicTotalNumber&&(f=1),k.triggerPagingOnInit&&j.trigger(h+"go",Math.min(f,e))}};if(j.data("pagination")&&!0===j.data("pagination").initialized){if(b.isNumeric(f))return j.trigger.call(this,h+"go",f,arguments[1]),this;if("string"==typeof f){var m=Array.prototype.slice.apply(arguments);switch(m[0]=h+m[0],f){case"previous":case"next":case"go":case"disable":case"enable":case"refresh":case"show":case"hide":case"destroy":j.trigger.apply(this,m);break;case"getSelectedPageNum":return j.data("pagination").model?j.data("pagination").model.pageNumber:j.data("pagination").attributes.pageNumber;case"getTotalPage":return Math.ceil(j.data("pagination").model.totalNumber/j.data("pagination").model.pageSize);case"getSelectedPageData":return j.data("pagination").currentPageData;case"isDisabled":return!0===j.data("pagination").model.disabled;default:c("Unknown action: "+f)}return this}e(j)}else i.isObject(f)||c("Illegal options");return d(k),l.initialize(),this},b.fn[g].defaults={totalNumber:0,pageNumber:1,pageSize:10,pageRange:2,showPrevious:!0,showNext:!0,showPageNumbers:!0,showNavigator:!1,showGoInput:!1,showGoButton:!1,pageLink:"",prevText:"«",nextText:"»",ellipsisText:"...",goButtonText:"Go",classPrefix:"paginationjs",activeClassName:"active",disableClassName:"disabled",inlineStyle:!0,formatNavigator:"<%= currentPage %> / <%= totalPage %>",formatGoInput:"<%= input %>",formatGoButton:"<%= button %>",position:"bottom",autoHidePrevious:!1,autoHideNext:!1,triggerPagingOnInit:!0,hideWhenLessThanOnePage:!1,showFirstOnEllipsisShow:!0,showLastOnEllipsisShow:!0,callback:function(){}},b.fn.addHook=function(a,d){arguments.length<2&&c("Missing argument."),b.isFunction(d)||c("callback must be a function.");var e=b(this),f=e.data("pagination");f||(e.data("pagination",{}),f=e.data("pagination")),!f.hooks&&(f.hooks={}),f.hooks[a]=f.hooks[a]||[],f.hooks[a].push(d)},b[g]=function(a,d){arguments.length<2&&c("Requires two parameters.");var e;if(e="string"!=typeof a&&a instanceof jQuery?a:b(a),e.length)return e.pagination(d),e};var i={};b.each(["Object","Array","String"],function(a,b){i["is"+b]=function(a){return f(a)===b.toLowerCase()}}),"function"==typeof define&&define.amd&&define(function(){return b})}(this,window.jQuery); \ No newline at end of file