Merge remote-tracking branch 'LCTT/master'

This commit is contained in:
Xingyu Wang 2020-04-07 11:42:59 +08:00
commit 860f52f635
5 changed files with 446 additions and 65 deletions

View File

@ -1,73 +1,69 @@
[#]: collector: (lujun9972)
[#]: translator: (robsean)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-12082-1.html)
[#]: subject: (Use the Fluxbox Linux desktop as your window manager)
[#]: via: (https://opensource.com/article/19/12/fluxbox-linux-desktop)
[#]: author: (Seth Kenlon https://opensource.com/users/seth)
使用 Fluxbox Linux desktop 作为你的窗口管理器
使用 Fluxbox 桌面作为你的窗口管理器
======
这篇文章是Linux 桌面24天的特别系列的一部分。
Fluxbox 对系统资源的占用非常轻量,但是它拥有重要的 Linux
桌面特色来使你的用户体验轻松快速高效。
![在蓝色区域中是,在浏览器上的文本编辑器][1]
桌面的概念可谓是仁者见仁智者见智。很多人把桌面看作一个家基地或者一个舒适的客厅甚至是一个字面意义上的桌面在其中放置着他们经常使用的记事本最好的笔和铅笔还有他们最喜欢的咖啡杯。KDE, GNOME, Pantheon (等等)在 Linux 上提供了这种舒适的生活方式
> 本文是 24 天 Linux 桌面特别系列的一部分。Fluxbox 对系统资源的占用非常轻量,但它拥有重要的 Linux 桌面功能,让你的用户体验轻松、高效、快捷。
但是对一些用户来说,桌面只是一个空荡荡的监控控件,将还没有自由浮动的应用程序窗口直接投射到显示器上的一个侧面效果。对于这些用户来说,桌面是真空的,在其中他们可以运行应用程序—不管的大型办公软件和图形套件,还是一个简单的终端窗口,或是来管理服务的停靠小程序。这种操作一台 [POSIX][2] 计算机的模式有很长的历史,该家族树的一支是 *box 窗口管理器Blackbox, Fluxbox 和 Openbox 。
![](https://img.linux.net.cn/data/attachment/album/202004/07/113105p0ng5skkn5kmvdm0.jpg)
[Fluxbox][3] 是一个针对 X11 系统的窗口管理器,它基于一个较老的名为 Blackbox 的项目。当我发现 Linux 时Blackbox 的开发已进入衰退期,因此我进入 Fluxbox ,此后我至少在一个以上的活跃的系统上使用它。它使用 C++ 编写,并在 MIT 开源许可证下授权。
桌面的概念可谓是仁者见仁智者见智。很多人把桌面看作一个家的基地或者一个舒适的客厅甚至是一个字面意义上的桌面在其中放置着他们经常使用的记事本、最好的笔和铅笔还有他们最喜欢的咖啡杯。KDE、 GNOME、Pantheon 等等在 Linux 上提供了这种舒适的生活方式。
但是对一些用户来说,桌面只是一个空荡荡的显示器空间,这是还没有任何可以自由浮动的应用程序窗口直接投射到他们的视网膜上的副作用。对于这些用户来说,桌面是一个空的空间,他们可以在上面运行应用程序 —— 无论是大型办公软件和图形套件,还是一个简单的终端窗口,或是来管理服务的托盘小程序。这种操作 [POSIX][2] 计算机的模式由来已久,该家族树的一支是 *box 窗口管理器Blackbox、Fluxbox 和 Openbox。
[Fluxbox][3] 是一个 X11 系统的窗口管理器,它基于一个较老的名为 Blackbox 的项目。当我发现 Linux 时Blackbox 的开发已进入衰退期,因此我就喜欢上了 Fluxbox ,此后我至少在一个以上的常用的系统上使用过它。它是用 C++ 编写的,并在 MIT 开源许可证下授权。
### 安装 Fluxbox
你很可能会在你的 Linux 发行版的存储库中找到 Fluxbox ,但是你也可以在 [Fluxbox.org][4] 上找到它。如果你正在运行一个不同的桌面,在同一个系统上安装 Fluxbox 是安全的,因为 Fluxbox 不预先决定任何配置或附带应用程序。
你很可能会在你的 Linux 发行版的软件库中找到 Fluxbox,但是你也可以在 [Fluxbox.org][4] 上找到它。如果你正在运行另外一个桌面,在同一个系统上安装 Fluxbox 是安全的,因为 Fluxbox 不会预设任何配置或附带的应用程序。
在安装 Fluxbox 后,注销你当前的桌面会话,以便你可以登录一个新的桌面会话。默认情况下,你的桌面会话管理器 (KDM, GDM, LightDM 或 XDM取决于你的安装设置) 将你继续登录到上一个在桌面,所以你在登录前必需要覆盖上一个桌面。
在安装 Fluxbox 后,注销你当前的桌面会话,以便你可以登录一个新的桌面会话。默认情况下,你的桌面会话管理器 (KDM、GDM、LightDM 或 XDM取决于你的安装设置) 将继续让登录到之前的桌面,所以你在登录前必需要覆盖上一个桌面。
使用 GDM 覆盖一个桌面:
![在 GDM 中选择你的桌面会话][5]
或者使用 KDM:
或者使用 KDM
![使用 KDM 选择你的桌面会话][6]
### 配置 Fluxbox 桌面
当你第一次登录到桌面时,屏幕大部分是空的,因为 Fluxbox 提供的所有东西是面板(用于任务栏,系统托盘等等)和用于应用程序窗口的窗口装饰品。
当你第一次登录到桌面时,屏幕基本是空的,因为 Fluxbox 提供的所有东西是面板(用于任务栏、系统托盘等等)和用于应用程序窗口的窗口装饰品。
![在 CentOS 7 上的默认 Fluxbox 配置][7]
如果你的发行版提供一个简单的 Fluxbox 桌面,你可以使用 **feh** 命令 (你可能需要从你的发行版存储库中来安装它) 来为你的桌面设置背景。这个命令有一些用于设置背景的选项,包括使用你选择的墙纸来填充屏幕的 **\--bg-fill** ,来按比例缩放的 **\--bg-scale** 等等选项。
如果你的发行版提供一个简单的 Fluxbox 桌面,你可以使用 `feh` 命令(你可能需要从你的发行版的软件库中安装它)来为你的桌面设置背景。这个命令有几个用于设置背景的选项,包括使用你选择的墙纸来填充屏幕的 `--bg-fill` 选项,来按比例缩放的 `--bg-scale` 等等选项。
```
`$ feh --bg-fill ~/photo/oamaru/leaf-spiral.jpg`
$ feh --bg-fill ~/photo/oamaru/leaf-spiral.jpg
```
![应用主题的 Fluxbox ][8]
默认情况下Fluxbox 自动生成一个菜单,在桌面上任意位置右键单击可用该菜单,这给予你访问应用程序的能力。取决于你的发行版,这个菜单可能非常小,也可能列出 **/usr/share/applications** 目录中的所有启动程序。
默认情况下Fluxbox 自动生成一个菜单,在桌面上任意位置右键单击可用该菜单,这给予你访问应用程序的能力。根据你的发行版的不同,这个菜单可能非常小,也可能列出 `/usr/share/applications` 目录中的所有启动程序。
Fluxbox 配置是在文本文件中设置的,这些文本文件包含在 **$HOME/.fluxbox** 目录中。你可以:
Fluxbox 配置是在文本文件中设置的,这些文本文件包含在 `$HOME/.fluxbox` 目录中。你可以:
* 在 **keys** 中设置键盘快捷键
* 在 **startup** 中启动服务和应用程序
* 在 **init** 设置桌面首选项(例如工作区数量、面板位置等等)
* 在 **menu** 中设置菜单项
* 在 `keys` 中设置键盘快捷键
* 在 `startup` 中启动的服务和应用程序
* 在 `init` 设置桌面首选项(例如工作区数量、面板位置等等)
* 在 `menu` 中设置菜单项
该文本配置文件非常易于推断,但是你也可以(并且是应该)阅读 Fluxbox 的[文档][9]。
该文本配置文件非常易于逆向工程,但是你也可以 (并且是应该) 阅读 Fluxbox [文档][9] 。
例如,这是我的典型菜单 (或者说至少有它的基本结构)
例如,这是我的典型菜单(或者说至少有它的基本结构):
```
# 为使用你自己的菜单,复制这些文本到 ~/.fluxbox/menu然后编辑
# ~/.fluxbox/init ,并更改 session.menuFile 文件到 ~/.fluxbox/menu
# ~/.fluxbox/init ,并更改 session.menuFile 文件路径到 ~/.fluxbox/menu
[begin] (fluxkbox)
[submenu] (apps) {}
@ -113,10 +109,9 @@ Fluxbox 配置是在文本文件中设置的,这些文本文件包含在 **$HO
[end]
```
该菜单也提供一些首选项设置,例如,选择一个主题和从 Fluxbox 会话中重启或注销的能力。
我使用键盘快捷键来启动大多数的应用程序,这些快捷键写入到 **keys** 配置文件中。这里有一些示例 ( **Mod4** 按键是超级按键,我使用其来指定全局快捷键)
该菜单也提供一些首选项设置,例如,选择一个主题,从 Fluxbox 会话中重启或注销的能力。
我使用键盘快捷键来启动大多数的应用程序,这些快捷键写入到 `keys` 配置文件中。这里有一些示例(`Mod4` 按键是 `Super` 键,我使用其来指定全局快捷键):
```
# 打开应用程序
@ -135,10 +130,9 @@ Mod4 3 :Exec ksnapshot
### 为什么你应该使用 Fluxbox
Fluxbox 对系统资源的占用非常轻量,但是它拥有重要的功能来使你的用户体验轻松快速高效。它很容易定制,并且它允许你定义你自己的工作流。你不必使用 Fluxbox 的面板,因为在这里有其它的极好的面板。你甚至可以鼠标双击和拖动两个独立的应用程序窗口到彼此之中,以便它们成为一个窗口,每个窗口都有自己的选项卡。
Fluxbox 对系统资源的占用非常轻量,但是它拥有重要的功能,可以使你的用户体验轻松、快速、高效。它很容易定制,并且允许你定义你自己的工作流。你不必使用 Fluxbox 的面板,因为还有其它优秀的面板。你甚至可以鼠标中键点击并拖动两个独立的应用程序窗口到彼此之中,以便它们成为一个窗口,每个窗口都有自己的选项卡。
无穷的可能性,所以今天就在你的 Linux 上尝试一下 Fluxbox 的简单稳定吧!
可能性是无穷的,所以今天就在你的 Linux 上尝试一下 Fluxbox 的简单稳定吧!
--------------------------------------------------------------------------------
@ -147,7 +141,7 @@ via: https://opensource.com/article/19/12/fluxbox-linux-desktop
作者:[Seth Kenlon][a]
选题:[lujun9972][b]
译者:[robsean](https://github.com/robsean)
校对:[校对者ID](https://github.com/校对者ID)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出

View File

@ -1,8 +1,8 @@
[#]: collector: (lujun9972)
[#]: translator: (wxy)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-12049-1.html)
[#]: subject: (Directing Kubernetes traffic with Traefik)
[#]: via: (https://opensource.com/article/20/3/kubernetes-traefik)
[#]: author: (Lee Carpenter https://opensource.com/users/carpie)
@ -16,21 +16,21 @@
在本文中,我们将部署几个简单的网站,并学习如何使用 Traefik 将来自外部世界的流量引入到我们的集群中。之后,我们还将学习如何删除 Kubernetes 资源。让我们开始吧!
- [video](https://youtu.be/QcC-5fRhsM8)
- [video](https://img.linux.net.cn/static/video/Ingressing%20with%20k3s-QcC-5fRhsM8.mp4)
### 准备
要继续阅读本文,你只需要我们在上一篇文章中构建的 [k3s 树莓派集群][2]。由于你的集群将从网络上拉取像,因此该集群需要能够访问互联网。
要继续阅读本文,你只需要我们在上一篇文章中构建的 [k3s 树莓派集群][2]。由于你的集群将从网络上拉取像,因此该集群需要能够访问互联网。
出于解释目的,本文将显示一些配置文件和示例 HTML 文件。所有示例文件都可以在[此处][3]下载。
### 部署一个简单的网站
之前,我们使用 `kubectl` 进行了直接部署。但是,这不是部署事物的典型方法。通常,会使用 YAML 配置文件,这就是我们将在本文中使用的配置文件。我们将从顶部开始,并以自顶向下的方式创建该配置文件。
之前,我们使用 `kubectl` 进行了直接部署。但是,这不是典型的部署方法。一般情况都会使用 YAML 配置文件,这也是我们要在本文中使用的配置文件。我们将从顶部开始,并以自顶向下的方式创建该配置文件。
### 部署配置
首先是部署配置。配置如下所示,并在下面进行说明。我通常以 [Kubernetes 文档][4]中的示例为起点,然后对其进行修改以适合我的需求。例如,从[部署文档][5]复制示例后,修改下面的配置
首先是部署配置。配置如下所示,并在下面进行说明。我通常以 [Kubernetes 文档][4]中的示例为起点,然后根据需要对其进行修改。例如,下面的配置是复制了[部署文档][5]中的示例后修改的
创建一个文件 `mysite.yaml`,其内容如下:
@ -58,15 +58,15 @@ spec:
- containerPort: 80
```
其中大部分是样板。重要的部分,我们会将该部署命名为 `mysite-nginx`,并加上 `mysite-nginx``app` 标签。我们已指定要一个<ruby>副本<rt>replica</rt></ruby>,这意味着将只创建一个 Pod。我们还指定了一个容器我们将其命名为 `nginx`。我们将<ruby>镜像<rt>image</rt></ruby>指定为 `nginx`。这意味着在部署时k3s 将从 DockerHub 下载 `nginx` 镜像并从中创建一个 Pod。最后我们指定了<ruby>容器端口<rt>containerPort</rt></ruby>`80`,这只意味着在容器内部 Pod 会监听 `80` 端口。
其中大部分是样板。重要的部分,我们会将该部署命名为 `mysite-nginx`,并为其加上同名的 `app` 标签。我们指定了一个<ruby>副本<rt>replica</rt></ruby>,这意味着将只创建一个 Pod。我们还指定了一个容器我们将其命名为 `nginx`。我们将<ruby>镜像<rt>image</rt></ruby>指定为 `nginx`。这意味着在部署时k3s 将从 DockerHub 下载 `nginx` 镜像并从中创建一个 Pod。最后我们指定了<ruby>容器端口<rt>containerPort</rt></ruby>`80`,这只意味着在容器内部 Pod 会监听 `80` 端口。
我在上面强调了“在容器内部”,因为这是一个重要的区别。由于我们是按容器配置的,因此只能在容器内部访问它,并且进一步将其限制为内部网络。这是允许多个容器在同一容器端口上监听所必需的。换句话说,通过这种配置,其他某些 Pod 也可以在其容器端口 80 上侦听,并且不会与此容器冲突。为了提供对该 Pod 的正式访问权限,我们需要一个<ruby>服务<rt>service</rt></ruby>配置。
我在上面强调了“在容器内部”,因为这是一个重要的区别。由于我们是按容器配置的,因此只能在容器内部访问它,并且进一步将其限制为内部网络。这对于允许多个容器在同一容器端口上监听所是必要的。换句话说,通过这种配置,其他一些 Pod 也可以在其容器端口 80 上侦听,并且不会与此容器冲突。为了提供对该 Pod 的正式访问权限,我们需要一个<ruby>服务<rt>service</rt></ruby>配置。
### 服务配置
在 Kubernetes 中,<ruby>服务<rt>service</rt></ruby>是一种抽象。它提供了一种访问一个或一组 Pod 的方法。如果定义了多个 Pod 副本,则一个连接到服务,并且由服务路由到单个 Pod通过负载均衡路由到多个 Pod。
在 Kubernetes 中,<ruby>服务<rt>service</rt></ruby>是一种抽象。它提供了一种访问 Pod 或 Pod 集合的方法。当连接到服务时,服务会路由到单个 Pod或者如果定义了多个 Pod 副本,会通过负载均衡路由到多个 Pod。
可以在同一配置文件中指定该服务,这就是我们将在此处执行的操作。用 `---` 分隔配置区域。将以下内容添加到 `mysite.yaml` 中:
可以在同一配置文件中指定该服务,这就是我们将在此处要做的。用 `---` 分隔配置区域,将以下内容添加到 `mysite.yaml` 中:
```
---
@ -82,11 +82,11 @@ spec:
port: 80
```
在此配置中,我们将服务命名为 `mysite-nginx-service`。我们提供了 `app: mysite-nginx`<ruby>选择器<rt>selector</rt></ruby>。这是服务选择其路由到的应用程序容器的方式。请记住,我们为容器提供了一个内容为 `mysite-nginx` `app` 标签。这就是服务用来查找我们的容器的方式。最后,我们指定服务协议为 `TCP`,在端口 `80`听。
在此配置中,我们将服务命名为 `mysite-nginx-service`。我们提供了一个<ruby>选择器<rt>selector</rt></ruby>`app: mysite-nginx`。这是服务选择其路由到的应用程序容器的方式。请记住,我们为容器提供了 `app` 标签:`mysite-nginx` 。这就是服务用来查找我们的容器的方式。最后,我们指定服务协议为 `TCP`,在端口 `80`听。
### 入口配置
<ruby>入口<rt>Ingress</rt></ruby>配置指定如何将流量从集群外部传递到集群内部的服务。请记住k3s 预先配置了 Traefik 作为入口控制器。因此,我们将编写特定于 Traefik 的入口配置。将以下内容添加到 `mysite.yaml` 中(不要忘了用 `---` 分隔):
<ruby>入口<rt>Ingress</rt></ruby>配置指定如何将流量从集群外部传递到集群内部的服务。请记住k3s 预先配置了 Traefik 作为入口控制器。因此,我们将编写特定于 Traefik 的入口配置。将以下内容添加到 `mysite.yaml` 中(不要忘了用 `---` 分隔):
```
---
@ -106,13 +106,13 @@ spec:
servicePort: 80
```
在此配置中,我们将入口记录命名为 `mysite-nginx-ingress`。我们告诉 Kubernetes我们希望 `traefik` 成为我们的入口控制器,带有 `kubernetes.io/ingress.class` 的注解。
在此配置中,我们将入口记录命名为 `mysite-nginx-ingress`。我们告诉 Kubernetes我们希望 `traefik` 成为我们的入口控制器,再加上 `kubernetes.io/ingress.class` 的注解。
<ruby>规则<rt>rules</rt></ruby>部分中,我们基本上是说,当 `http` 流量进入时,并且 `path` 匹配 `/`(或其下的任何内容),将其路由到由 `serviceName mysite-nginx-service` 指定的<ruby>后端<rt>backend</rt></ruby>服务中,并将其路由到 `servicePort 80`。这会将传入的 HTTP 流量连接到我们之前定义的服务。
### 部署的东西
### 需要部署的东西
就配置而言,确实如此。如果现在部署,我们将获得默认的 nginx 页面,但这不是我们想要的。让我们创建一些简单但可自定义的部署方式。创建具有以下内容的文件 `index.html`
就配置而言,就是这样了。如果我们现在部署,我们将获得默认的 nginx 页面,但这不是我们想要的。让我们创建一些简单但可自定义的部署方式。创建具有以下内容的文件 `index.html`
```
<html>
@ -143,13 +143,13 @@ spec:
</html>
```
我们尚未介绍 Kubernetes 中的存储机制,因此在这里我们偷懒一下,仅将该文件存储在 Kubernetes 配置映射中。这不是建议的网站部署方式,但可以满足我们的目的。运行以下命令:
我们尚未介绍 Kubernetes 中的存储机制,因此在这里我们偷懒一下,仅将该文件存储在 Kubernetes 配置映射中。这不是我们推荐的部署网站的方式,但对于我们的目的来说是可行的。运行以下命令:
```
kubectl create configmap mysite-html --from-file index.html
```
该命令从本地文件 `index.html` 创建名为 `mysite-html`<ruby>配置映射<rt>configmap</rt></ruby>资源。这实际上是在 Kubernetes 资源中存储一个文件(或一组文件),我们可以在配置中调出该文件。它通常用于存储配置文件(因此而得名),因此我们在这里稍加滥用。在以后的文章中,我们将讨论 Kubernetes 中适当的存储解决方案。
该命令从本地文件 `index.html` 创建名为 `mysite-html`<ruby>配置映射<rt>configmap</rt></ruby>资源。这实际上是在 Kubernetes 资源中存储一个文件(或一组文件),我们可以在配置中调出该文件。它通常用于存储配置文件(因此而得名),我们在这里稍加滥用。在以后的文章中,我们将讨论 Kubernetes 中适当的存储解决方案。
创建配置映射后,让我们将其挂载在我们的 `nginx` 容器中。我们分两个步骤进行。首先,我们需要指定一个<ruby><rt>volume</rt></ruby>来调出配置映射。然后我们需要将该卷挂载到 `nginx` 容器中。通过在 `mysite.yaml` 中的 `container` 后面的 `spec` 标签下添加以下内容来完成第一步:
@ -162,7 +162,7 @@ kubectl create configmap mysite-html --from-file index.html
这告诉 Kubernetes 我们要定义一个名为 `html-volume` 的卷,并且该卷应包含名为 `html-volume`(我们在上一步中创建的)的配置映射的内容。
接下来,在 `nginx` 容器规范中的<ruby>端口<rt>port</rt></ruby>下方,添加以下内容:
接下来,在 `nginx` 容器规范中的<ruby>端口<rt>ports</rt></ruby>下方,添加以下内容:
```
        volumeMounts:
@ -170,7 +170,7 @@ kubectl create configmap mysite-html --from-file index.html
          mountPath: /usr/share/nginx/html
```
这告诉 Kubernetes对于 `nginx` 容器,我们想在容器中的 `/usr/share/nginx/html` 路径挂载名为 `html-volume` 的卷。 为什么要使用 `/usr/share/nginx/html`?那个位置就是 `nginx` 镜像提供 HTML 服务的地方。通过在该路径上挂载卷,我们用该卷内容替换了默认内容。
这告诉 Kubernetes对于 `nginx` 容器,我们想在容器中的 `/usr/share/nginx/html` 路径挂载名为 `html-volume` 的卷。 为什么要使用 `/usr/share/nginx/html`?那个位置就是 `nginx` 镜像提供 HTML 服务的地方。通过在该路径上挂载卷,我们用该卷内容替换了默认内容。
作为参考,配置文件的 `deployment` 部分现在应如下所示:
@ -231,7 +231,7 @@ kubectl get pods
### 尝试一下!
Pod 运行之后,就该尝试了。 开浏览器,然后在地址栏中输入 `kmaster`
Pod 运行之后,就该尝试了。开浏览器,然后在地址栏中输入 `kmaster`
![][6]
@ -239,9 +239,9 @@ Pod 运行之后,就该尝试了。 开浏览器,然后在地址栏中输入
### 另一个
因此,现在我们有了一个运行单个网站的整个 k3s 集群。但是我们可以做更多!如果我们要在同一集群中提供另一个网站怎么办?让我们看看如何做到这一点。
因此,现在我们有了一个运行单个网站的整个 k3s 集群。但是我们可以有更多的网站!如果我们要在同一集群中提供另一个网站怎么办?让我们看看如何做到这一点。
同样,我们需要部署一些东西。碰巧我的狗有一条信息,她想让世界知道一段时间。因此,我专门为她制作了一些 HTML可从示例 zip 文件中获得)。同样,我们将使用配置映射的技巧来托管这些 HTML。这次我们将把整个目录`html` 目录)放到配置映射中,但是调用是相同的。
同样,我们需要部署一些东西。碰巧我的狗有一条她想让全世界都知道的信息,她想了好久了。因此,我专门为她制作了一些 HTML可从示例 zip 文件中获得)。同样,我们将使用配置映射的技巧来托管这些 HTML。这次我们将把整个目录`html` 目录)放到配置映射中,但是调用是相同的。
```
kubectl create configmap mydog-html --from-file html
@ -324,11 +324,11 @@ kubectl apply -f mydog.yaml
![][7]
呼!消息出来了!也许今晚我们都可以睡一觉。
呼!消息发出去了!也许今晚我们都可以睡一觉。
因此,现在,我们有了一个 k3s 集群该集群托管了两个网站Traefik 根据路径名决定将请求传递给哪个服务!但是,我们不仅限于基于路径的路由。我们也可以使用基于主机名的路由,我们将在以后的文章中进行探讨。
因此,现在,我们有了一个 k3s 集群该集群托管了两个网站Traefik 根据路径名决定将请求传递给哪个服务!但是,不仅限于基于路径的路由,我们也可以使用基于主机名的路由,我们将在以后的文章中进行探讨。
另外,我们刚刚托管的网站是标准的未加密 HTML 网站,如今的所有内容都使用 SSL/TLS 加密。在我们的下一篇文章中,我们将为 k3s 集群添加支持以托管 SSL/TLS HTTPS 站点!
另外,我们刚刚托管的网站是标准的未加密 HTML 网站,如今的所有内容都使用 SSL/TLS 加密。在我们的下一篇文章中,我们将为 k3s 集群添加支持以托管 SSL/TLS HTTPS 站点!
### 清理
@ -366,14 +366,14 @@ via: https://opensource.com/article/20/3/kubernetes-traefik
作者:[Lee Carpenter][a]
选题:[lujun9972][b]
译者:[wxy](https://github.com/wxy)
校对:[校对者ID](https://github.com/校对者ID)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/carpie
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/browser_web_internet_website.png?itok=g5B_Bw62 (Digital creative of a browser on the internet)
[2]: https://opensource.com/article/20/3/kubernetes-raspberry-pi
[2]: https://linux.cn/article-12049-1.html
[3]: https://gitlab.com/carpie/ingressing_with_k3s/-/archive/master/ingressing_with_k3s-master.zip
[4]: https://kubernetes.io/docs/
[5]: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#creating-a-deployment

View File

@ -0,0 +1,147 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (How to Use a Differential Analyzer (to Murder People))
[#]: via: (https://twobithistory.org/2020/04/06/differential-analyzer.html)
[#]: author: (Two-Bit History https://twobithistory.org)
How to Use a Differential Analyzer (to Murder People)
======
A differential analyzer is a mechanical, analog computer that can solve differential equations. Differential analyzers arent used anymore because even a cheap laptop can solve the same equations much faster—and can do it in the background while you stream the new season of Westworld on HBO. Before the invention of digital computers though, differential analyzers allowed mathematicians to make calculations that would not have been practical otherwise.
It is hard to see today how a computer made out of anything other than digital circuitry printed in silicon could work. A mechanical computer sounds like something out of a steampunk novel. But differential analyzers did work and even proved to be an essential tool in many lines of research. Most famously, differential analyzers were used by the US Army to calculate range tables for their artillery pieces. Even the largest gun is not going to be effective unless you have a range table to help you aim it, so differential analyzers arguably played an important role in helping the Allies win the Second World War.
To understand how differential analyzers could do all this, you will need to know what differential equations are. Forgotten what those are? Thats okay, because I had too.
### Differential Equations
Differential equations are something you might first encounter in the final few weeks of a college-level Calculus I course. By that point in the semester, your underpaid adjunct professor will have taught you about limits, derivatives, and integrals; if you take those concepts and add an equals sign, you get a differential equation.
Differential equations describe rates of change in terms of some other variable (or perhaps multiple other variables). Whereas a familiar algebraic expression like (y = 4x + 3) specifies the relationship between some variable quantity (y) and some other variable quantity (x), a differential equation, which might look like (\frac{dy}{dx} = x), or even (\frac{dy}{dx} = 2), specifies the relationship between a _rate of change_ and some other variable quantity. Basically, a differential equation is just a description of a rate of change in exact mathematical terms. The first of those last two differential equations is saying, “The variable (y) changes with respect to (x) at a rate defined exactly by (x),” and the second is saying, “No matter what (x) is, the variable (y) changes with respect to (x) at a rate of exactly 2.”
Differential equations are useful because in the real world it is often easier to describe how complex systems change from one instant to the next than it is to come up with an equation describing the system at all possible instants. Differential equations are widely used in physics and engineering for that reason. One famous differential equation is the heat equation, which describes how heat diffuses through an object over time. It would be hard to come up with a function that fully describes the distribution of heat throughout an object given only a time (t), but reasoning about how heat diffuses from one time to the next is less likely to turn your brain into soup—the hot bits near lots of cold bits will probably get colder, the cold bits near lots of hot bits will probably get hotter, etc. So the heat equation, though it is much more complicated than the examples in the last paragraph, is likewise just a description of rates of change. It describes how the temperature of any one point on the object will change over time given how its temperature differs from the points around it.
Lets consider another example that I think will make all of this more concrete. If I am standing in a vacuum and throw a tennis ball straight up, will it come back down before I asphyxiate? This kind of question, posed less dramatically, is the kind of thing I was asked in high school physics class, and all I needed to solve it back then were some basic Newtonian equations of motion. But lets pretend for a minute that I have forgotten those equations and all I can remember is that objects accelerate toward earth at a constant rate of (g), or about (10 ;m/s^2). How can differential equations help me solve this problem?
Well, we can express the one thing I remember about high school physics as a differential equation. The tennis ball, once it leaves my hand, will accelerate toward the earth at a rate of (g). This is the same as saying that the velocity of the ball will change (in the negative direction) over time at a rate of (g). We could even go one step further and say that _the rate of change in the height of my ball above the ground_ (this is just its velocity) will change over time at a rate of negative (g). We can write this down as the following, where (h) represents height and (t) represents time:
[\frac{d^2h}{dt^2} = -g]
This looks slightly different from the differential equations we have seen so far because this is what is known as a second-order differential equation. We are talking about the rate of change of a rate of change, which, as you might remember from your own calculus education, involves second derivatives. Thats why parts of the expression on the left look like they are being squared. But this equation is still just expressing the fact that the ball accelerates downward at a constant acceleration of (g).
From here, one option I have is to use the tools of calculus to solve the differential equation. With differential equations, this does not mean finding a single value or set of values that satisfy the relationship but instead finding a function or set of functions that do. Another way to think about this is that the differential equation is telling us that there is some function out there whose second derivative is the constant (-g); we want to find that function because it will give us the height of the ball at any given time. This differential equation happens to be an easy one to solve. By doing so, we can re-derive the basic equations of motion that I had forgotten and easily calculate how long it will take the ball to come back down.
But most of the time differential equations are hard to solve. Sometimes they are even impossible to solve. So another option I have, given that I paid more attention in my computer science classes that my calculus classes in college, is to take my differential equation and use it as the basis for a simulation. If I know the starting velocity and the acceleration of my tennis ball, then I can easily write a little for-loop, perhaps in Python, that iterates through my problem second by second and tells me what the velocity will be at any given second (t) after the initial time. Once Ive done that, I could tweak my for-loop so that it also uses the calculated velocity to update the height of the ball on each iteration. Now I can run my Python simulation and figure out when the ball will come back down. My simulation wont be perfectly accurate, but I can decrease the size of the time step if I need more accuracy. All I am trying to accomplish anyway is to figure out if the ball will come back down while I am still alive.
This is the numerical approach to solving a differential equation. It is how differential equations are solved in practice in most fields where they arise. Computers are indispensable here, because the accuracy of the simulation depends on us being able to take millions of small little steps through our problem. Doing this by hand would obviously be error-prone and take a long time.
So what if I were not just standing in a vacuum with a tennis ball but were standing in a vacuum with a tennis ball in, say, 1936? I still want to automate my computation, but Claude Shannon wont even complete his masters thesis for another year yet (the one in which he casually implements Boolean algebra using electronic circuits). Without digital computers, Im afraid, we have to go analog.
### The Differential Analyzer
The first differential analyzer was built between 1928 and 1931 at MIT by Vannevar Bush and Harold Hazen. Both men were engineers. The machine was created to tackle practical problems in applied mathematics and physics. It was supposed to address what Bush described, in [a 1931 paper][1] about the machine, as the contemporary problem of mathematicians who are “continually being hampered by the complexity rather than the profundity of the equations they employ.”
A differential analyzer is a complicated arrangement of rods, gears, and spinning discs that can solve differential equations of up to the sixth order. It is like a digital computer in this way, which is also a complicated arrangement of simple parts that somehow adds up to a machine that can do amazing things. But whereas the circuitry of a digital computer implements Boolean logic that is then used to simulate arbitrary problems, the rods, gears, and spinning discs _directly_ simulate the differential equation problem. This is what makes a differential analyzer an analog computer—it is a direct mechanical analogy for the real problem.
How on earth do gears and spinning discs do calculus? This is actually the easiest part of the machine to explain. The most important components in a differential analyzer are the six mechanical integrators, one for each order in a sixth-order differential equation. A mechanical integrator is a relatively simple device that can integrate a single input function; mechanical integrators go back to the 19th century. We will want to understand how they work, but, as an aside here, Bushs big accomplishment was not inventing the mechanical integrator but rather figuring out a practical way to chain integrators together to solve higher-order differential equations.
A mechanical integrator consists of one large spinning disc and one much smaller spinning wheel. The disc is laid flat parallel to the ground like the turntable of a record player. It is driven by a motor and rotates at a constant speed. The small wheel is suspended above the disc so that it rests on the surface of the disc ever so slightly—with enough pressure that the disc drives the wheel but not enough that the wheel cannot freely slide sideways over the surface of the disc. So as the disc turns, the wheel turns too.
The speed at which the wheel turns will depend on how far from the center of the disc the wheel is positioned. The inner parts of the disc, of course, are rotating more slowly than the outer parts. The wheel stays fixed where it is, but the disc is mounted on a carriage that can be moved back and forth in one direction, which repositions the wheel relative to the center of the disc. Now this is the key to how the integrator works: The position of the disc carriage is driven by the input function to the integrator. The output from the integrator is determined by the rotation of the small wheel. So your input function drives the rate of change of your output function and you have just transformed the derivative of some function into the function itself—which is what we call integration!
If that explanation does nothing for you, seeing a mechanical integrator in action really helps. The principle is surprisingly simple and there is no way to watch the device operate without grasping how it works. So I have created [a visualization of a running mechanical integrator][2] that I encourage you to take a look at. The visualization shows the integration of some function (f(x)) into its antiderivative (F(x)) while various things spin and move. Its pretty exciting.
![][3] _A nice screenshot of my visualization, but you should check out the real thing!_
So we have a component that can do integration for us, but that alone is not enough to solve a differential equation. To explain the full process to you, Im going to use an example that Bush offers himself in his 1931 paper, which also happens to be essentially the same example we contemplated in our earlier discussion of differential equations. (This was a happy accident!) Bush introduces the following differential equation to represent the motion of a falling body:
[\frac{d^2x}{dt^2} = -k,\frac{dx}{dt} - g]
This is the same equation we used to model the motion of our tennis ball, only Bush has used (x) in place of (h) and has added another term that accounts for how air resistance will decelerate the ball. This new term describes the effect of air resistance on the ball in the simplest possible way: The air will slow the balls velocity at a rate that is proportional to its velocity (the (k) here is some proportionality constant whose value we dont really care about). So as the ball moves faster, the force of air resistance will be stronger, further decelerating the ball.
To configure a differential analyzer to solve this differential equation, we have to start with what Bush calls the “input table.” The input table is just a piece of graphing paper mounted on a carriage. If we were trying to solve a more complicated equation, the operator of the machine would first plot our input function on the graphing paper and then, once the machine starts running, trace out the function using a pointer connected to the rest of the machine. In this case, though, our input is just the constant (g), so we only have to move the pointer to the right value and then leave it there.
What about the other variables (x) and (t)? The (x) variable is our output as it represents the height of the ball. It will be plotted on graphing paper placed on the output table, which is similar to the input table only the pointer is a pen and is driven by the machine. The (t) variable should do nothing more than advance at a steady rate. (In our Python simulation of the tennis ball problem as posed earlier, we just incremented (t) in a loop.) So the (t) variable comes from the differential analyzers motor, which kicks off the whole process by rotating the rod connected to it at a constant speed.
Bush has a helpful diagram documenting all of this that I will show you in a second, but first we need to make one more tweak to our differential equation that will make the diagram easier to understand. We can integrate both sides of our equation once, yielding the following:
[\frac{dx}{dt} = - \int \left(k,\frac{dx}{dt} + g\right),dt]
The terms in this equation map better to values represented by the rotation of various parts of the machine while it runs. Okay, heres that diagram:
![][4] _The differential analyzer configured to solve the problem of a falling body in one dimension._
The input table is at the top of the diagram. The output table is at the bottom-right. The output table here is set up to graph both (x) and (\frac{dx}{dt}), i.e. height and velocity. The integrators appear at the bottom-left; since this is a second-order differential equation, we need two. The motor drives the very top rod labeled (t). (Interestingly, Bush referred to these horizontal rods as “buses.”)
That leaves two components unexplained. The box with the little (k) in it is a multiplier respresnting our proportionality constant (k). It takes the rotation of the rod labeled (\frac{dx}{dt}) and scales it up or down using a gear ratio. The box with the (\sum) symbol is an adder. It uses a clever arrangement of gears to add the rotations of two rods together to drive a third rod. We need it since our equation involves the sum of two terms. These extra components available in the differential analyzer ensure that the machine can flexibly simulate equations with all kinds of terms and coefficients.
I find it helpful to reason in ultra-slow motion about the cascade of cause and effect that plays out as soon as the motor starts running. The motor immediately begins to rotate the rod labeled (t) at a constant speed. Thus, we have our notion of time. This rod does three things, illustrated by the three vertical rods connected to it: it drives the rotation of the discs in both integrators and also advances the carriage of the output table so that the output pen begins to draw.
Now if the integrators were set up so that their wheels are centered, then the rotation of rod (t) would cause no other rods to rotate. The integrator discs would spin but the wheels, centered as they are, would not be driven. The output chart would just show a flat line. This happens because we have not accounted for the initial conditions of the problem. In our earlier Python simulation, we needed to know the initial velocity of the ball, which we would have represented there as a constant variable or as a parameter of our Python function. Here, we account for the initial velocity and acceleration by displacing the integrator discs by the appropriate amount before the machine begins to run.
Once weve done that, the rotation of rod (t) propagates through the whole system. Physically, a lot of things start rotating at the same time, but we can think of the rotation going first to integrator II, which combines it with the acceleration expression calculated based on (g) and then integrates it to get the result (\frac{dx}{dt}). This represents the velocity of the ball. The velocity is in turn used as input to integrator I, whose disc is displaced so that the output wheel rotates at the rate (\frac{dx}{dt}). The output from integrator I is our final output (x), which gets routed directly to the output table.
One confusing thing Ive glossed over is that there is a cycle in the machine: Integrator II takes as an input the rotation of the rod labeled ((k,\frac{dx}{dt} + g)), but that rods rotation is determined in part by the output from integrator II itself. This might make you feel queasy, but there is no physical issue here—everything is rotating at once. If anything, we should not be surprised to see cycles like this, since differential equations often describe rates of change in a function as a function of the function itself. (In this example, the acceleration, which is the rate of change of velocity, depends on the velocity.)
With everything correctly configured, the output we get is a nice graph, charting both the position and velocity of our ball over time. This graph is on paper. To our modern digital sensibilities, that might seem absurd. What can you do with a paper graph? While its true that the differential analyzer is not so magical that it can write out a neat mathematical expression for the solution to our problem, its worth remembering that neat solutions to many differential equations are not possible anyway. The paper graph that the machine does write out contains exactly the same information that could be output by our earlier Python simulation of a falling ball: where the ball is at any given time. It can be used to answer any practical question you might have about the problem.
The differential analyzer is a preposterously cool machine. It is complicated, but it fundamentally involves nothing more than rotating rods and gears. You dont have to be an electrical engineer or know how to fabricate a microchip to understand all the physical processes involved. And yet the machine does calculus! It solves differential equations that you never could on your own. The differential analyzer demonstrates that the key material required for the construction of a useful computing machine is not silicon but human ingenuity.
### Murdering People
Human ingenuity can serve purposes both good and bad. As I have mentioned, the highest-profile use of differential analyzers historically was to calculate artillery range tables for the US Army. To the extent that the Second World War was the “Good Fight,” this was probably for the best. But there is also no getting past the fact that differential analyzers helped to make very large guns better at killing lots of people. And kill lots of people they did—if Wikipedia is to be believed, more soldiers were killed by artillery than small arms fire during the Second World War.
I will get back to the moralizing in a minute, but just a quick detour here to explain why calculating range tables was hard and how differential analyzers helped, because its nice to see how differential analyzers were applied to a real problem. A range table tells the artilleryman operating a gun how high to elevate the barrel to reach a certain range. One way to produce a range table might be just to fire that particular kind of gun at different angles of elevation many times and record the results. This was done at proving grounds like the Aberdeen Proving Ground in Maryland. But producing range tables solely through empirical observation like this is expensive and time-consuming. There is also no way to account for other factors like the weather or for different weights of shell without combinatorially increasing the necessary number of firings to something unmanageable. So using a mathematical theory that can fill in a complete range table based on a smaller number of observed firings is a better approach.
I dont want to get too deep into how these mathematical theories work, because the math is complicated and I dont really understand it. But as you might imagine, the physics that governs the motion of an artillery shell in flight is not that different from the physics that governs the motion of a tennis ball thrown upward. The need for accuracy means that the differential equations employed have to depart from the idealized forms weve been using and quickly get gnarly. Even the earliest attempts to formulate a rigorous ballistic theory involve equations that account for, among other factors, the weight, diameter, and shape of the projectile, the prevailing wind, the altitude, the atmospheric density, and the rotation of the earth[1][5].
So the equations are complicated, but they are still differential equations that a differential analyzer can solve numerically in the way that we have already seen. Differential analyzers were put to work solving ballistics equations at the Aberdeen Proving Ground in 1935, where they dramatically sped up the process of calculating range tables.[2][6] Nevertheless, during the Second World War, the demand for range tables grew so quickly that the US Army could not calculate them fast enough to accompany all the weaponry being shipped to Europe. This eventually led the Army to fund the ENIAC project at the University of Pennsylvania, which, depending on your definitions, produced the worlds first digital computer. ENIAC could, through rewiring, run any program, but it was constructed primarily to perform range table calculations many times faster than could be done with a differential analyzer.
Given that the range table problem drove much of the early history of computing even apart from the differential analyzer, perhaps its unfair to single out the differential analyzer for moral hand-wringing. The differential analyzer isnt uniquely compromised by its military applications—the entire field of computing, during the Second World War and well afterward, advanced because of the endless funding being thrown at it by the United States military.
Anyway, I think the more interesting legacy of the differential analyzer is what it teaches us about the nature of computing. I am surprised that the differential analyzer can accomplish as much as it can; my guess is that you are too. It is easy to fall into the trap of thinking of computing as the realm of what can be realized with very fast digital circuits. In truth, computing is a more abstract process than that, and electronic, digital circuits are just what we typically use to get it done. In his paper about the differential analyzer, Vannevar Bush suggests that his invention is just a small contribution to “the far-reaching project of utilizing complex mechanical interrelationships as substitutes for intricate processes of reasoning.” That puts it nicely.
_If you enjoyed this post, more like it come out every four weeks! Follow [@TwoBitHistory][7] on Twitter or subscribe to the [RSS feed][8] to make sure you know when a new post is out._
_Previously on TwoBitHistory…_
> Do you worry that your children are "BBS-ing"? Do you have a neighbor who talks too much about his "door games"?
>
> In this VICE News special report, we take you into the seedy underworld of bulletin board systems:<https://t.co/hBrKGU2rfB>
>
> — TwoBitHistory (@TwoBitHistory) [February 2, 2020][9]
1. Alan Gluchoff. “Artillerymen and Mathematicians: Forest Ray Moulton and Changes in American Exterior Ballistics, 1885-1934.” Historia Mathematica, vol. 38, no. 4, 2011, pp. 506547., <https://www.sciencedirect.com/science/article/pii/S0315086011000279>. [↩︎][10]
2. Karl Kempf. “Electronic Computers within the Ordnance Corps,” 1961, accessed April 6, 2020, <https://ftp.arl.army.mil/~mike/comphist/61ordnance/index.html>. [↩︎][11]
--------------------------------------------------------------------------------
via: https://twobithistory.org/2020/04/06/differential-analyzer.html
作者:[Two-Bit History][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://twobithistory.org
[b]: https://github.com/lujun9972
[1]: http://worrydream.com/refs/Bush%20-%20The%20Differential%20Analyzer.pdf
[2]: https://sinclairtarget.com/differential-analyzer/
[3]: https://twobithistory.org/images/diff-analyzer-viz.png
[4]: https://twobithistory.org/images/analyzer-diagram.png
[5]: tmp.GUgd146Tkg#fn:1
[6]: tmp.GUgd146Tkg#fn:2
[7]: https://twitter.com/TwoBitHistory
[8]: https://twobithistory.org/feed.xml
[9]: https://twitter.com/TwoBitHistory/status/1224014531778826240?ref_src=twsrc%5Etfw
[10]: tmp.GUgd146Tkg#fnref:1
[11]: tmp.GUgd146Tkg#fnref:2

View File

@ -0,0 +1,156 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (What is good documentation for software projects?)
[#]: via: (https://opensource.com/article/20/4/documentation)
[#]: author: (Cameron Shorter https://opensource.com/users/cameronshorter)
What is good documentation for software projects?
======
Mixing experienced tech writers with open source communities reveals new
approaches for creating better docs.
![Typewriter with hands][1]
The [Open Geospatial (OSGeo) Foundation][2] recently participated in Google's first [Season of Docs][3], in which Google sponsored senior technical writers to contribute to open source projects. OSGeo is an umbrella organization for around 50 geospatial open source projects. I've contributed to a number of these projects over the years and recently co-mentored the two Season of Docs technical writers Google allocated to OSGeo.
We discovered during our involvement that, like many open source projects, we knew little about:
* The state of our docs
* What we were aiming for
* Our priorities
* The details of the challenges we faced
* How to improve
We discovered:
* How hard it is to keep tech docs current
* Skillsets from multiple roles are needed to create good docs
* Open source's docs and writing processes are immature when compared to software development
It is an exciting problem space with high-value challenges ready to be tackled. It reminds me of the early days of open source, before it became trendy with business.
### What should tech writers work on?
Open source communities welcomed the chance to have tech writers improve our docs and expressed a pressing need for it, but found it hard to articulate exactly what needed to be fixed:
* People explained that their project docs often hadn't been updated between doc releases.
* Some projects had new features that had not been documented.
* Other projects had issue lists, collating observed deficiencies, but had no systematic review.
* Most observed that docs were created by developers with no formal tech writing training.
* Many noted that their English docs were written by non-native English speakers.
But where should we start? We needed to decide on what we wanted and what we should work on first.
### Defining good docs
We then realized that we didn't have a good definition of "good documentation." For our software projects, we have a comprehensive [incubation process][4] to assess the maturity of software and the project's community, but we couldn't find a similar set of metrics to define "good documentation." So we started the [Good Docs Project][5] to collate "best-practice templates and writing instructions for documenting open source software." This helped us define what we were aiming for and prioritize what we can achieve with our available resources.
### Documentation audit
Once we knew what good docs looked like, we could audit the status of a project's docs:
* What documentation do we have?
* Does it cover all the functionality?
* Does it cover end-user needs?
* Is the documentation any good?
We discovered that the quality, currency, and completeness of our OSGeo docs were immature when compared to the quality of the software they described.
### It takes a village to raise good docs
In researching open source projects' documentation needs, it became clear that crafting good docs requires multiple skillsets. Ideally, a doc team has access to:
* A developer with a deep understanding of the software being described
* A software user who can explain the application within the context of the application's domain
* An educator who understands the principles of learning
* An information architect who understands how to structure material
* A writer who writes clearly and concisely with good grammar
* Someone who speaks English as a first language (for English docs)
* A translator who is good at translating docs into multiple languages
* A DevOps person who can set up doc-build pipelines
* A community builder, facilitator, and coordinator who can inspire collective action, capture offers of help, and help all these different personas collaborate
Technical writers usually have a high-level understanding of most of these domains, and their skills are often under-appreciated and under-utilized, especially if they are directed with a vague "just clean up the grammar and stuff."
However, the best docs typically have been influenced by multiple stakeholders. This can be partly achieved by [using templates to collaborate][6] between domains, timeframes, projects, and organizations.
### Tools for documenting open source projects are painful
We experienced significant pain in trying to convert between software and [writing toolsets][7]. We love the versioning of Git, are frustrated by clunky Markdown interfaces, and want access to editing and review workflows in Word and Google Docs along with grammar and syntax plugin tools such as Grammarly. Translation tools such as Transifex are pretty cool, too.
Could someone please write an application that addresses this use case? Maybe there is an idea in here for a future [Google Summer of Code][8]?
### Achievements during OSGeo's Season of Docs
We're quite proud of our achievements during OSGeo's participation in Google's Season of Docs. Our allocated tech writers amplified the effectiveness of our existing documentation communities, and our documentation communities amplified the effectiveness of these tech writers:
* [Felicity Brand][9] worked with around 50 of OSGeo's open source projects to update the Quickstarts as part of our [OSGeoLive][10] distribution of software.
* [Swapnil Ogale][11] worked directly with [GeoNetwork's][12] documentation team, auditing the breadth and quality of docs, setting up templates for future docs, and updating many of the docs.
Further:
* We kicked off the Good Docs Project to establish "best-practice templates and writing instructions for documenting open source software."
* In conjunction with the [OGC][13] and [ISO][14] spatial standards communities, we kicked off an [OSGeo Lexicon][15] project to coordinate official definitions for terminology used within the OSGeo context. This will apply best-practice definitions to previously haphazard glossaries.
* We did a [deep-dive analysis][16] of the documentation challenges faced by QGIS, one of OSGeo's most successful projects. Surprisingly, its biggest problem isn't a lack of tech writers or complicated tools (although they are factors). Key problems center around:
* Poorly capturing community goodwill and offers of assistance
* Lack of direction
* Struggling to keep up with a rapidly evolving software baseline
* Insufficient writing expertise
* A high technical barrier to entry
* Documentation and training being generated outside of the core project
* Awkward documentation tools and processes
### Thanks, Google
We are grateful to Google for sponsoring Season of Docs. We've learned plenty from Felicity and Swapnil, the great writers that Google provided to us, and we hope what we have learned will help make future Season of Docs initiatives even better.
* * *
_This originally appeared on [Cameron Shorter's blog][17] and is republished with permission._
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/4/documentation
作者:[Cameron Shorter][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/cameronshorter
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/typewriter-hands.jpg?itok=oPugBzgv (Typewriter with hands)
[2]: https://www.osgeo.org/
[3]: https://developers.google.com/season-of-docs
[4]: https://www.osgeo.org/about/committees/incubation/graduation/
[5]: https://thegooddocsproject.dev/
[6]: http://cameronshorter.blogspot.com/2019/02/inspiring-techies-to-become-great.html
[7]: https://opensource.com/article/20/3/open-source-writing-tools
[8]: https://summerofcode.withgoogle.com/
[9]: https://flicstar.com/2019/11/27/project-report-for-season-of-docs-2019/
[10]: https://live.osgeo.org/en/index.html
[11]: https://docs.google.com/document/d/1sTGz8aWPTS6moxgrtsBRz19roemJlilcdQk6B-9IZOo
[12]: https://geonetwork-opensource.org/
[13]: https://www.ogc.org/
[14]: https://committee.iso.org/home/tc211
[15]: https://wiki.osgeo.org/wiki/Lexicon_Committee
[16]: http://cameronshorter.blogspot.com/2019/12/why-qgis-docs-team-is-struggling.html
[17]: https://cameronshorter.blogspot.com/2020/03/insights-from-mixing-writers-with-open.html

View File

@ -0,0 +1,84 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (New Linux Distribution UbuntuDDE Brings The Beautiful Deepin Desktop to Ubuntu)
[#]: via: (https://itsfoss.com/ubuntudde/)
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
New Linux Distribution UbuntuDDE Brings The Beautiful Deepin Desktop to Ubuntu
======
Deepin is a beautiful desktop environment with an intuitive UI. UbuntuDDE project combines the power of Ubuntu and the beauty of Deepin.
[Deepin Desktop Environment][1] (DDE) is a beautiful desktop environment created by the developers of [Deepin Linux][2]. Initially, Deepin Linux was based on [Ubuntu][3] but later they switched to [Debian][4].
![Deepin Desktop Environment in Ubuntu][5]
One major problem with Deepin Linux is its slow servers. A regular system takes hours to download for the fact that they have all their servers in China and these servers are unfortunately extremely slow.
If you want to use Deepin desktop, nothing stops you from installing it on your regular Ubuntu system. [UbuntuDDE][6] is trying to make it simpler by providing you an out of the box Deepin desktop experience on top of Ubuntu. This saves you time and effort in installing and configuring Deepin on Ubuntu.
![Screenshot of UbuntuDDE][7]
### Ubuntu DDE: Power of Ubuntu and beauty of Deepin desktop
Please note that UbuntuDDE is not an official flavor of Ubuntu. UbuntuDDE developers are not associated with the Ubuntu team. UbuntuDDE is currently a Remix distribution and is aiming for getting recognized as Ubuntus official flavor in future releases.
UbuntuDDE developers are helped by Alan Pope of Ubuntus Snapcraft team and teams of Ubuntu Budgie and [Ubuntu Cinnamon][8] and a few other developers.
In a conversation with Its FOSS, its lead developer Arun highlighted that the important aspect of this project is to regularly maintain the DDE packages for Ubuntu and help users enjoy the full taste of DDE (Deepin Desktop Environment).
![Ubuntu Deepin Edition login screen][9]
Arun also mentioned that this Ubuntu Deepin remix project started first by maintaining and packaging the packages to the latest release from the upstream i.e. Deepin Repository. Then, it eventually got spin with Ubuntu 20.04 focal resulting in an image file that everyone can install without the hassle to install regular Ubuntu first and then the Deepin Desktop. UbuntuDDE is not just the combo of DDE and Ubuntu but also the fusion of selective packages and design changes by the UbuntuDDE Team.
![UbuntuDDE screenshot][10]
Unlike Deepin Linux, UbuntuDDE doesnt use Deepin Appstore. It uses Ubuntu Software Center instead. This should be a good news if you are spooked by the [spyware labeling of Wuhan-based Deepin Linux][11].
### Download UbuntuDDE 20.04 Beta
UbuntuDDE is aiming to release its first official stable release with Ubuntu 20.04. Like [other Ubuntu flavors][12], UbuntuDDE 20.04 beta is also available for you to download and try.
Warning!
A word of warning. UbuntuDDE is a novice project under development. Please dont use it on your main system. If you want to try it, use it in virtual machine or on a spare system.
[Download Ubuntu 20.04 DDE Beta][13]
![Installing UbuntuDDE][14]
Since it is essentially Ubuntu, installing UbuntuDDE is the same as installing Ubuntu. You may refer to this tutorial showing [how to install Ubuntu inside VirtualBox][15].
I know you may think not another Ubuntu or its just Deepin on Ubuntu that anyone can do and you do have a point. But I also know there is a small segment of users who like projects like UbuntuDDE that makes thing easier for them. I mean thats how many Ubuntu flavor came into existence. What do you think?
--------------------------------------------------------------------------------
via: https://itsfoss.com/ubuntudde/
作者:[Abhishek Prakash][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/abhishek/
[b]: https://github.com/lujun9972
[1]: https://www.deepin.org/en/dde/
[2]: https://www.deepin.org/en/
[3]: https://ubuntu.com/
[4]: https://www.debian.org/
[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-deepin-edition-screenshot.jpg?ssl=1
[6]: https://ubuntudde.com/
[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-deepin-edition-screenshot-1.jpg?ssl=1
[8]: https://itsfoss.com/ubuntu-cinnamon/
[9]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-deepin-edition-screenshot-5.jpg?ssl=1
[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-deepin-edition-screenshot-2.jpg?ssl=1
[11]: https://www.deepin.org/en/2018/04/14/linux-deepin-is-not-spyware/
[12]: https://itsfoss.com/which-ubuntu-install/
[13]: https://ubuntudde.com/download/
[14]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-deepin-edition-screenshot-4.jpg?ssl=1
[15]: https://itsfoss.com/install-linux-in-virtualbox/