Skip to content

Commit

Permalink
Publishing md doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Bowser1704 committed Oct 11, 2020
1 parent ffda278 commit b54458f
Show file tree
Hide file tree
Showing 22 changed files with 1,139 additions and 22 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
@@ -0,0 +1,3 @@
[submodule "themes/hermit"]
path = themes/hermit
url = https://github.com/Track3/hermit.git
80 changes: 80 additions & 0 deletions config-hermit.toml
@@ -0,0 +1,80 @@
baseURL = "https://bowser1704.github.io/"
languageCode = "en-us"
defaultContentLanguage = "en"
title = "Bowser's blog"
theme = "hermit"
# enableGitInfo = true
pygmentsCodefences = true
pygmentsUseClasses = true
hasCJKLanguage = true # If Chinese/Japanese/Korean is your main content language, enable this to make wordCount works right.
rssLimit = 10 # Maximum number of items in the RSS feed.
copyright = "This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License." # This message is only used by the RSS template.
enableEmoji = true # Shorthand emojis in content files - https://gohugo.io/functions/emojify/
# googleAnalytics = "UA-123-45"
# disqusShortname = "yourdiscussshortname"

[author]
name = "Bowser"

[blackfriday]
# hrefTargetBlank = true
# noreferrerLinks = true
# nofollowLinks = true

[taxonomies]
tag = "tags"
# Categories are disabled by default.

[params]
dateform = "Jan 2, 2006"
dateformShort = "Jan 2"
dateformNum = "2006-01-02"
dateformNumTime = "2006-01-02 15:04 -0700"

# Metadata mostly used in document's head
# description = ""
# images = [""]
themeColor = "#494f5c"

homeSubtitle = "A minimal and fast theme for Hugo."
footerCopyright = ' &#183; <a href="https://creativecommons.org/licenses/by-nc/4.0/" target="_blank" rel="noopener">CC BY-NC 4.0</a>'
# bgImg = "" # Homepage background-image URL

# Prefix of link to the git commit detail page. GitInfo must be enabled.
# gitUrl = "https://github.com/username/repository/commit/"

# Toggling this option needs to rebuild SCSS, requires Hugo extended version
justifyContent = false # Set "text-align: justify" to `.content`.

relatedPosts = false # Add a related content section to all single posts page

code_copy_button = true # Turn on/off the code-copy-button for code-fields

# Add custom css
# customCSS = ["css/foo.css", "css/bar.css"]

# Social Icons
# Check https://github.com/Track3/hermit#social-icons for more info.
[[params.social]]
name = "email"
url = "bowser1704@gmail.com"

[[params.social]]
name = "telegram"
url = "Bowser1704"

[[params.social]]
name = "github"
url = "https://github.com/Bowser1704"

[menu]

[[menu.main]]
name = "Posts"
url = "posts/"
weight = 10

[[menu.main]]
name = "About"
url = "about/"
weight = 20
21 changes: 1 addition & 20 deletions content/note/ci.md
Expand Up @@ -63,23 +63,4 @@ Argo CD 的使用



Muxi App Engine (MAE):

下面是需求

1. MKE (Muxi Kubernetes Engine) 能够在网站里面部署、回滚、向不同的机器部署、能够查看 pod 的 log。

2. 镜像构建服务,镜像构建基于 Drone CI,需要把它与整个 MAE 接入,需要接入阿里云镜像管理 API。

有一些 1+2 的例子:

- https://github.com/rancher/rio

3. 服务器管理系统 「阿里云机器管理「ECS、RDS」,利用子账号、阿里云开放 API」,可以看到过期时间、地区、可用区,更进一步的也许可以直接通过这个来续费,并且来上报学生机。

4. 基于 Prometheus 数据的监控仪板。通过写 PromQL 查询需要的数据,然后前端渲染。

下面是注意的地方 ⚠️

1. 需要利用到 RBAC 对每个人的权限进行控制。
2.
1.
53 changes: 51 additions & 2 deletions content/note/helm-in-k3s.md
Expand Up @@ -9,7 +9,7 @@ date: 2020-06-25T10:11:19+08:00

## 在 k3s 内使用 Helm(国内)

### 1. 国内访问问题
### 1. AppHub

[Helm](https://helm.sh/) 可以类似理解为 ”K8s OS“ 的包管理工具,再以前没有这个工具我们要手动写 yaml/json 文件来自动化部署应用,但是 Helm 就类似于 Homebrew 一样,有人帮我们写好了配置文件(Chart),我们只需要一个命令,加自定义的参数就行了。

Expand All @@ -19,6 +19,8 @@ helm install stable/mysql --generate-name

Helm 官方提供了一个 Chart 仓库,[Helm Hub](https://hub.helm.sh/),但是众说周知的原因,无法访问。阿里云原生团队提供了镜像服务,同步所有 Charts 并且将其中的 `gcr.io` 等镜像地址全部替换为国内可以访问的镜像。

阿里云 Helm charts 开源仓库。

[AppHub](https://github.com/cloudnativeapp/charts)

> AppHub 的主要职责之一,是把所有 Helm 官方 Hub 托管的应用,都自动同步到国内,并自动将 Charts 文件中的 gcr.io 等有网络访问问题的 URL 替换成为稳定的国内镜像 URL。
Expand Down Expand Up @@ -59,9 +61,56 @@ spec:
repo: https://apphub.aliyuncs.com
```

### 3. 使用 release 文件

[k3s helm](https://rancher.com/docs/k3s/latest/en/helm/)

在路径 `/var/lib/rancher/k3s/server/static/charts/` 下的 `tgz` 格式文件可以通过 kubernetes API 访问。

所以可以通过下载 tgz / helm chart release 文件解决「网络」问题。yaml 文件可以这么写:

```yaml
apiVersion: helm.cattle.io/v1
kind: HelmChart
metadata:
name: traefik
namespace: kube-system
spec:
chart: https://%{KUBERNETES_API}%/static/charts/traefik-1.81.0.tgz
valuesContent: |-
rbac:
enabled: true
ssl:
enabled: true
metrics:
prometheus:
enabled: true
kubernetes:
ingressEndpoint:
useDefaultPublishedService: true
image: "rancher/library-traefik"
tolerations:
- key: "CriticalAddonsOnly"
operator: "Exists"
- key: "node-role.kubernetes.io/master"
operator: "Exists"
effect: "NoSchedule"
```

#### 如何下载 helm chart release

安装 helm 到网络环境良好的机器,例如你的电脑。

```bash
helm pull loki/promtail
# download promtail-x.x.x.tgz to your current directory.
```

然后上传到机器上,copy 到 `/var/lib/rancher/k3s/server/static/charts/` 目录下。

-------

参考文献。
Ref:

1. [Operator 与 Controller 的区别](https://octetz.com/docs/2019/2019-10-13-controllers-and-operators/)

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

Large diffs are not rendered by default.

@@ -0,0 +1 @@
{"Target":"css/style.min.eac77496566fd7d5768fd650ddb0b2b181ca6a2d7c5fdd6fe6b8ba4bf47e566f.css","MediaType":"text/css","Data":{"Integrity":"sha256-6sd0llZv19V2j9ZQ3bCysYHKai18X91v5ri6S/R+Vm8="}}
Binary file added static/android-chrome-192x192.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/android-chrome-512x512.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/apple-touch-icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions static/browserconfig.xml
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
<msapplication>
<tile>
<square150x150logo src="/mstile-150x150.png"/>
<TileColor>#da532c</TileColor>
</tile>
</msapplication>
</browserconfig>
Binary file added static/favicon-16x16.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/favicon-32x32.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/favicon.ico
Binary file not shown.
Binary file added static/mstile-150x150.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b54458f

Please sign in to comment.