mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-03-03 01:10:13 +08:00
Merge remote-tracking branch 'LCTT/master'
This commit is contained in:
commit
52c25dca16
@ -0,0 +1,90 @@
|
||||
DevOps 接下来会发生什么:要关注的 5 个趋势
|
||||
======
|
||||
|
||||
> 专家们权衡了 DevOps 团队最近会有何期望。
|
||||
|
||||

|
||||
|
||||
“DevOps” 一词通常认为是来源于 [这篇 2008 年关于敏捷基础设施和运营的讲演中][1]。现在的 IT 词汇中,它无处不在,这个“混搭”的词汇出现还不到 10 年:我们还在研究它在 IT 中更现代化的工作方法。
|
||||
|
||||
诚然,多年来一直在 “从事 DevOps” 的人积累了丰富的知识。但是大多数的 DevOps 环境 —— 人与 [文化][2] 、流程与方法、工具与技术的融合 —— 还远远没有成熟。
|
||||
|
||||
更多的变化即将到来。Robert Reeves 说 “DevOps 是一个过程,一种算法”,他是 [Datical][3] 的 CTO, “它的绝对目标就是随着时间进行改变和演进”,这就是重点。
|
||||
|
||||
那我们预计接下来会发生什么呢?这里有一些专家们观察到的重要趋势。
|
||||
|
||||
### 1、 预计 DevOps、容器、以及微服务之间的相互依赖会增强
|
||||
|
||||
驱动 DevOps 发展的文化本身可能会演进。当然,DevOps 仍然将在根本上摧毁传统的 IT 孤岛和瓶颈,但这样做的理由可能会变得更加急迫。证据 A & B: [对容器和微服务的兴趣][4] 与日俱增。这个技术组合很强大、可连续扩展、与规划和 [持续进行的管理][5]配合最佳。
|
||||
|
||||
Arvind Soni 说 “影响 DevOps 的其中一个主要因素是向微服务转变”,他是 [Netsil][6] 的产品副总裁,补充道,容器和业务流程,使开发者打包和交付的速度越来越快。DevOps 团队的任务可能是帮助去加速打包并管理越来越复杂的微服务弹性架构。
|
||||
|
||||
### 2、 预计 ”安全网“ 更少
|
||||
|
||||
DevOps 使团队可以更快更敏捷地去构建软件,部署速度也更快更频繁、同时还能提升软件质量和稳定性。但是好的 IT 领导通常都不会忽视管理风险,因此,早期大量的 DevOps 迭代都是使用了安全防护 —— 从后备的不重要业务开始的。为了实现更快的速度和敏捷性,越来越多的团队将抛弃他们的 ”辅助轮“(LCTT 译注:意思说减少了安全防护措施)。
|
||||
|
||||
Nic Grange 说 “随着团队的成熟,他们决定不再需要一些早期增加的安全 ‘防护栏’ 了”,他是 [Retriever Communications][7] 的 CTO。Grange 给出了一个阶段展示的服务器的示例:随着 DevOps 团队的成熟,他们决定不再需要阶段展示的服务器了,尤其是他们很少在试生产环境中发现问题。(Grange 指出,这一举措对于缺乏 DevOps 经验的团队来说,不可轻易效仿)
|
||||
|
||||
Grange 说 “这个团队可能在监视和发现并解决生产系统中出现的问题的能力上有足够的信心”,“部署过程和测试阶段,如果没有任何证据证明它的价值,那么它可能会把整个进度拖慢”。
|
||||
|
||||
### 3、 预计 DevOps 将在其它领域大面积展开
|
||||
|
||||
DevOps 将两个传统的 IT 部门(开发和运营)结合的更紧密。越来越多的公司看到了这种结合的好处,这种文化可能会传播开来。这种情况在一些组织中已经出现,在 “DevSecOps” 一词越来越多出现的情况下,它反映出了在软件开发周期中有意地、越来越早地包含了安全性。
|
||||
|
||||
Derek Weeks 说 “DevSecOps 不仅是一个工具,它是将安全思维更早地集成到开发实践中”,它是 [Sonatype][8] 的副总裁和 DevOps 拥挤者。
|
||||
|
||||
[Red Hat][9] 的安全策略师 Kirsten Newcomer 说,这种做法并不是一个技术挑战,而是一个文化挑战。
|
||||
|
||||
Newcomer 说 “从历史来看,安全团队都是从开发团队中分离出来的 —— 每个团队在它们不同的 IT 领域中形成了各自的专长” ,“它并不需要这种方法。每个关心安全性的企业也关心他们通过软件快速交付业务价值的能力,这些企业正在寻找方法,将安全放进应用程序的开发周期中。它们采用 DevSecOps 通过 CI/CD 流水线去集成安全实践、工具和自动化。为了做的更好,他们整合他们的团队 —— 将安全专家整合到应用程序开发团队中,参与到从设计到产品部署的全过程中。这种做法使双方都看到了价值 —— 每个团队都扩充了它们的技能和知识,使他们成为更有价值的技术专家。DevOps 做对了 —— 或者说是 DevSecOps —— 提升了 IT 安全性。”
|
||||
|
||||
除了安全以外,还可以让 DevOps 扩展到其它领域,比如数据库团队、QA,甚至是 IT 以外的潜在领域。
|
||||
|
||||
Datical 的 Reeves 说 “这是一件非常 DevOps 化的事情:发现相互掣肘的地方并解决它们”,“对于以前采用 DevOps 的企业来说,安全和数据库是他们面临的最大瓶颈。”
|
||||
|
||||
### 4、 预计 ROI 将会增加
|
||||
|
||||
Eric Schabell 说,“由于公司深入推进他们的 DevOps 工作,IT 团队在方法、流程、容器和微服务方面的投资将得到更多的回报。” 他是 Red Hat 的全球技术传播总监,Schabell 说 “‘圣杯’将移动的更快、完成的更多、并且变得更灵活。由于这些组件找到了更宽阔的天地,组织在应用程序中更有归属感时,结果就会出现。”
|
||||
|
||||
“每当新兴技术获得我们的关注时,任何事都有一个令人兴奋的学习曲线,但当认识到它应用很困难的时候,同时也会经历一个从兴奋到幻灭的低谷。最终,我们将开始看到从低谷中爬出来,并收获到应用 DevOps、容器、和微服务的好处。”
|
||||
|
||||
### 5、 预计成功的指标将持续演进
|
||||
|
||||
Mike Kail 说 “我相信 DevOps 文化的两个核心原则 —— 自动化和可衡量是从来不会变的”,它是 [CYBRIC][10] 的 CTO,也是 Yahoo 前 CIO。“总是有办法去自动化一个任务,或者提升一个已经自动化的解决方案,而随着时间的推移,重要的事情是测量可能的变化和扩展。这个成熟的过程是一个永不停步的旅行,而不是一个目的地或者已完成的任务。”
|
||||
|
||||
在 DevOps 的精神中,成熟和学习也与协作者和分享精神有关。Kail 认为,对于敏捷方法和 DevOps 文化来说,它仍然为时尚早,这意味着它们还有足够的增长空间。
|
||||
|
||||
Kail 说 “随着越来越多的成熟组织持续去测量可控指标,我相信(希望) —— 这些经验应该被广泛的分享,以便我们去学习并改善它们。”
|
||||
|
||||
作为 Red Hat 技术传播专家,[Gordon Haff][11] 最近注意到,组织使用业务成果相关的因素去改善他们的 DevOps 指标的工作越来越困难。 [Haff 写道][12] “你或许并不真正关心你的开发者写了多少行代码、服务器是否在一夜之间出现了硬件故障、或者你的测试覆盖面是否全面”。事实上,你可能并不直接关心你的网站的响应速度和更新快慢。但是你要注意的是,这些指标可能与消费者放弃购物车或者转到你的竞争对手那里有关。”
|
||||
|
||||
与业务成果相关的一些 DevOps 指标的例子包括,消费者交易金额(作为消费者花销统计的指标)和净推荐值(消费者推荐公司产品和服务的意愿)。关于这个主题更多的内容,请查看这篇完整的文章—— [DevOps 指标:你是否测量了重要的东西][12]。
|
||||
|
||||
### 唯一不变的就是改变
|
||||
|
||||
顺利说一句,如果你希望这件事一蹴而就,那你就要倒霉了。
|
||||
|
||||
Reeves 说 “如果你认为今天发布非常快,那你就什么也没有看到”,“这就是为什么要让相关者包括数据库团队进入到 DevOps 中的重要原因。因为今天这两组人员的冲突会随着发布速度的提升而呈指数级增长。”
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://enterprisersproject.com/article/2017/10/what-s-next-devops-5-trends-watch
|
||||
|
||||
作者:[Kevin Casey][a]
|
||||
译者:[qhwdw](https://github.com/qhwdw)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:https://enterprisersproject.com/user/kevin-casey
|
||||
[1]:http://www.jedi.be/presentations/agile-infrastructure-agile-2008.pdf
|
||||
[2]:https://enterprisersproject.com/article/2017/9/5-ways-nurture-devops-culture
|
||||
[3]:https://www.datical.com/
|
||||
[4]:https://enterprisersproject.com/article/2017/9/microservices-and-containers-6-things-know-start-time
|
||||
[5]:https://enterprisersproject.com/article/2017/10/microservices-and-containers-6-management-tips-long-haul
|
||||
[6]:https://netsil.com/
|
||||
[7]:http://retrievercommunications.com/
|
||||
[8]:https://www.sonatype.com/
|
||||
[9]:https://www.redhat.com/en/
|
||||
[10]:https://www.cybric.io/
|
||||
[11]:https://enterprisersproject.com/user/gordon-haff
|
||||
[12]:https://enterprisersproject.com/article/2017/7/devops-metrics-are-you-measuring-what-matters
|
@ -1,44 +1,46 @@
|
||||
如何在终端中显示图片
|
||||
如何在终端中显示图片
|
||||
======
|
||||
|
||||

|
||||
Linux 上用许多 GUI 图片浏览器。但我尚未听说或使用过任何在终端中显示图片的应用程序。幸运的是,我刚刚发现了一个可用于在终端中显示图像的名叫 ** FIM ** 的图像查看器。FIM 引起了我的注意,是因为与大多数 GUI 图片浏览器相比,它非常轻巧。毫不迟疑,让我们来看看它能做什么。
|
||||
|
||||
###使用FIM在终端中显示图像
|
||||
Linux 上有许多 GUI 图片浏览器。但我尚未听说或使用过任何在终端中显示图片的应用程序。幸运的是,我刚刚发现了一个可用于在终端中显示图像的名叫 **FIM** 的图像查看器。FIM 引起了我的注意,是因为与大多数 GUI 图片浏览器相比,它非常轻巧。毫不迟疑,让我们来看看它能做什么。
|
||||
|
||||
**FIM** stands for **F**bi **IM**proved. 对于那些不知道的人,**Fbi**是指 linux 中的 **f**rame **b**uffer **i**mageviewer。它使用系统的帧缓冲器直接从命令行显示图像。默认情况下,它能用终端显示bmp,gif,jpeg,PhotoCD,png,ppm,tiff 和 xwd。对于其他格式,它会尝试使用 ImageMagick 的转换。
|
||||
### 使用 FIM 在终端中显示图像
|
||||
|
||||
FIM 基于 Fbi,它是一款高度可高度定制及脚本化的图像浏览器,非常适合使用 Vim 文本编辑器或 Mutt 等软件的用户。它会以全屏显示图像,并可通过键盘快捷键控制(如调整大小,翻转,缩放)。与fbi不同的是,FIM 是通用的:它可以打开许多文件格式,并且可以在以下视频模式下显示图片:
|
||||
**FIM** 意即 **F**bi **IM**proved。对于那些不知道的人,**Fbi** 是指 Linux 中的 **f**rame **b**uffer **i**mageviewer。它使用系统的帧缓冲器直接从命令行显示图像。默认情况下,它能用终端显示 bmp、gif、jpeg、PhotoCD、png、ppm、tiff 和 xwd。对于其他格式,它会尝试使用 ImageMagick 的转换。
|
||||
|
||||
*使用 Linux framebuffer 设备,以图形方式呈现
|
||||
*在 X / Xorg 下,使用 SDL 库。以图形方式呈现
|
||||
*在 X / Xorg 下,使用 Imlib2 库。以图形方式呈现。
|
||||
*在任何文本控制台中使用 AAlib 库呈现为 ASCII 字符画 。
|
||||
FIM 基于 Fbi,它是一款高度可高度定制及脚本化的图像浏览器,非常适合使用 Vim 文本编辑器或 Mutt 等软件的用户。它会以全屏显示图像,并可通过键盘快捷键控制(如调整大小、翻转、缩放)。与 Fbi 不同的是,FIM 是通用的:它可以打开许多文件格式,并且可以在以下视频模式下显示图片:
|
||||
|
||||
* 使用 Linux framebuffer 设备,以图形方式呈现
|
||||
* 在 X / Xorg 下,使用 SDL 库,以图形方式呈现
|
||||
* 在 X / Xorg 下,使用 Imlib2 库,以图形方式呈现。
|
||||
* 在任何文本控制台中使用 AAlib 库呈现为 ASCII 字符画
|
||||
|
||||
FIM 是完全免费且开源的。
|
||||
|
||||
FIM是完全免费且开源的。
|
||||
### 安装 FIM
|
||||
|
||||
###安装FIM
|
||||
|
||||
基于 DEB 的系统,如 Ubuntu,Linux Mint, 可从默认的仓库中获取 FIM 图像查看器。因此,你可以使用如下命令安装fbi:
|
||||
基于 DEB 的系统,如 Ubuntu、Linux Mint, 可从默认的仓库中获取 FIM 图像查看器。因此,你可以使用如下命令安装fbi:
|
||||
|
||||
```
|
||||
$ sudo apt-get install fim
|
||||
```
|
||||
|
||||
如果它在你使用的 Linux 发行版的仓库中不包含 FIM,则可以下载源代码进行编译和安装,如下所示。
|
||||
|
||||
```
|
||||
wget http://download.savannah.nongnu.org/releases/fbi-improved/fim-0.6-trunk.tar.gz
|
||||
wget http://download.savannah.nongnu.org/releases/fbi-improved/fim-0.6-trunk.tar.gz.sig
|
||||
gpg --search 'dezperado autistici org'
|
||||
#按照屏幕上的说明,从密钥服务器导入密钥
|
||||
gpg --verify fim-0.6-trunk.tar.gz.sig
|
||||
```
|
||||
|
||||
```
|
||||
tar xzf fim-0.6-trunk.tar.gz
|
||||
cd fim-0.6-trunk
|
||||
./configure --help=short
|
||||
#阅读./configure --help = short的输出:你可以在 ./configure 中添加选项
|
||||
#阅读./configure --help=short 的输出:你可以在 ./configure 中添加选项
|
||||
./configure
|
||||
make
|
||||
su -c“make install”
|
||||
@ -47,6 +49,7 @@ su -c“make install”
|
||||
### FIM用法
|
||||
|
||||
安装完成后,您可以使用以下命令以“自动缩放”显示的图像:
|
||||
|
||||
```
|
||||
$ fim -a dog.jpg
|
||||
```
|
||||
@ -57,45 +60,48 @@ $ fim -a dog.jpg
|
||||
|
||||
正如你在上面的屏幕截图中看到的,FIM 没有使用任何外部 GUI 图片浏览器。相反,它使用我们系统的帧缓冲器来显示图像。
|
||||
|
||||
如果当前目录中有多个.jpg文件,可以使用通配符打开所有文件,如下所示。
|
||||
如果当前目录中有多个 .jpg 文件,可以使用通配符打开所有文件,如下所示。
|
||||
|
||||
```
|
||||
$ fim -a * .jpg
|
||||
```
|
||||
|
||||
要打开目录中的所有图像,例如 **Pictures**,请运行:
|
||||
要打开目录中的所有图像,例如 `Pictures`,请运行:
|
||||
|
||||
```
|
||||
$ fim Pictures/
|
||||
```
|
||||
|
||||
我们也可以在文件夹及其子文件夹中递归地打开图像,然后像下面那样对列表进行排序。
|
||||
|
||||
```
|
||||
$ fim -R Pictures/ --sort
|
||||
```
|
||||
|
||||
要以 ASCII 格式渲染图像,可以使用 **-t** 标志。
|
||||
要以 ASCII 格式渲染图像,可以使用 `-t` 标志。
|
||||
|
||||
```
|
||||
$ fim -t dog.jpg
|
||||
```
|
||||
|
||||
要退出 Fim,请按 **ESC** 或 **q**。
|
||||
要退出 Fim,请按 `ESC` 或 `q`。
|
||||
|
||||
**键盘快捷键**
|
||||
|
||||
您可以使用各种键盘快捷键来管理图像。例如,要加载下一张图像和之前的图像,请按下 PgUp / PgDown 键。成倍放大或缩小,请使用 +/- 键。以下是用于在FIM中控制图像的常用按键。
|
||||
|
||||
* **PageUp/Down**:上一张/下一张图片
|
||||
* **+/-**:放大/缩小
|
||||
* **a**:自动缩放
|
||||
* **w**:自适应宽度
|
||||
* **h**:自适应高度
|
||||
* **j/k**:平移/向上
|
||||
* **f/m**:翻转/镜像
|
||||
* **r/R**:旋转(顺时针/逆时针)
|
||||
* **ESC/q**:退出
|
||||
#### 键盘快捷键
|
||||
|
||||
您可以使用各种键盘快捷键来管理图像。例如,要加载下一张图像和之前的图像,请按下 `PgUp` / `PgDown` 键。成倍放大或缩小,请使用 `+` / `-` 键。以下是用于在FIM中控制图像的常用按键。
|
||||
|
||||
* `PageUp` / `Down`:上一张/下一张图片
|
||||
* `+` / `-` :放大/缩小
|
||||
* `a`:自动缩放
|
||||
* `w`:自适应宽度
|
||||
* `h`:自适应高度
|
||||
* `j` / `k`:平移/向上
|
||||
* `f` / `m`:翻转/镜像
|
||||
* `r` / `R`:旋转(顺时针/逆时针)
|
||||
* `ESC` / `q`:退出
|
||||
|
||||
有关完整详细信息,请参阅手册页。
|
||||
|
||||
```
|
||||
$ man fim
|
||||
```
|
||||
@ -104,16 +110,14 @@ $ man fim
|
||||
|
||||
干杯!
|
||||
|
||||
|
||||
|
||||
-------------------------------------------------- ------------------------------
|
||||
|
||||
via: https://www.ostechnix.com/how-to-display-images-in-the-terminal/
|
||||
|
||||
作者:[SK] [A]
|
||||
选题:[lujun9972](https://github.com/lujun9972)
|
||||
译者:[译者KevinSJ](https://github.com/KevinSJ)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
译者:[KevinSJ](https://github.com/KevinSJ)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
@ -1,4 +1,4 @@
|
||||
在 X 中启动用户软件
|
||||
如何在 X 中启动用户软件
|
||||
======
|
||||
|
||||
目前有很多方法可以在开启用户会话时启动软件。
|
||||
@ -7,56 +7,48 @@
|
||||
|
||||
### x11-common
|
||||
|
||||
`man xsession`
|
||||
```
|
||||
man xsession
|
||||
```
|
||||
|
||||
* 由显示管理器启动,如 `/usr/share/lightdm/lightdm.conf.d/01_debian.conf` 或 `/etc/gdm3/Xsession`。
|
||||
* Debian 特定。
|
||||
* 在 `/etc/X11/Xsession.d/` 中运行脚本。
|
||||
* `/etc/X11/Xsession.d/40x11-common_xsessionrc` 引用 `~/.xsessionrc` ,它只比设置环境变量能做的多一点,因为它在 X 会话启动时运行。
|
||||
* `/etc/X11/Xsession.d/40x11-common_xsessionrc` 引用 `~/.xsessionrc` ,它能比设置环境变量能做的多一点,因为它在 X 会话启动时运行。
|
||||
* 最后,它启动会话管理器(`gnome-session`、`xfce4-session` 等等)。
|
||||
|
||||
|
||||
|
||||
### systemd --user
|
||||
|
||||
* <https://wiki.archlinux.org/index.php/Systemd/User>
|
||||
* 由 `pam_systemd` 启动,所以它可能在环境变量中没有 DISPLAY 变量设置。
|
||||
* 由 `pam_systemd` 启动,所以在环境变量中可能没有设置 `DISPLAY` 变量。
|
||||
* 管理单元:
|
||||
* `/usr/lib/systemd/user/` 由已安装的软件包提供的单元。
|
||||
* `~/.local/share/systemd/user/` 由安装在家目录的软件包提供的单元。
|
||||
* `/etc/systemd/user/` 由系统管理员提供的系统范围的用户的单元。
|
||||
* `~/.config/systemd/user/` ,用户自己放置的单元。
|
||||
* 设置 X 会话并使用 DISPLAY 变量时,启动 systemd 用户单元的技巧是从 `.desktop` 自启动文件调用 `systemctl start`。
|
||||
* 当设置 X 会话和 `DISPLAY` 变量时,启动 systemd 用户单元的技巧是从 `.desktop` 自启动文件调用 `systemctl start`。
|
||||
|
||||
|
||||
|
||||
### dbus activation
|
||||
### dbus 激活
|
||||
|
||||
* <https://dbus.freedesktop.org/doc/system-activation.txt>
|
||||
* 进行 dbus 请求的用户进程可以触发启动服务器程序。
|
||||
* 对于系统调试,有没有一种方法可以监控哪些服务正在启动 dbus?
|
||||
|
||||
|
||||
* 对于系统调试,有没有一种方法可以监控哪些服务正在启动 dbus ?
|
||||
|
||||
### X 会话管理器
|
||||
|
||||
* <https://en.wikipedia.org/wiki/X_session_manager>
|
||||
* 由 `x11-common` 的 `Xsession.d` 运行。
|
||||
* 运行 freedesktop autostart .desktop 文件。
|
||||
* 运行 freedesktop 自动启动的 `.desktop` 文件。
|
||||
* 运行桌面环境特定的软件。
|
||||
|
||||
|
||||
|
||||
### xdg autostart
|
||||
### xdg 自动启动
|
||||
|
||||
* <https://specifications.freedesktop.org/autostart-spec/autostart-spec-latest.html>
|
||||
* 由会话管理器运行
|
||||
* 由会话管理器运行。
|
||||
* 如果存在 `/etc/xdg/autostart/foo.desktop` 和 `~/.config/autostart/foo.desktop` ,那么只会使用 `~/.config/autostart/foo.desktop`,因为 `~/.config/autostart/` 比 `/etc/xdg/autostart/` 更重要。
|
||||
* 是否有顺序或者并行?
|
||||
* 是顺序的还是并行?
|
||||
|
||||
|
||||
|
||||
### 其他启动笔记
|
||||
### 其他启动注意事项
|
||||
|
||||
#### ~/.Xauthority
|
||||
|
||||
@ -73,7 +65,7 @@ via: http://www.enricozini.org/blog/2018/debian/starting-user-software/
|
||||
作者:[Enrico Zini][a]
|
||||
选题:[lujun9972](https://github.com/lujun9972)
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
@ -1,3 +1,5 @@
|
||||
translating----geekpi
|
||||
|
||||
Get started with Pidgin: An open source replacement for Skype for Business
|
||||
======
|
||||
|
||||
|
@ -1,90 +0,0 @@
|
||||
pinewall translating
|
||||
|
||||
Containerization, Atomic Distributions, and the Future of Linux
|
||||
======
|
||||
|
||||

|
||||
Linux has come a long way since Linus Torvalds announced it in 1991. It has become the dominant operating system in the enterprise space. And, although we’ve seen improvements and tweaks in the desktop environment space, the model of a typical Linux distribution has largely remained the same over the past 25+ years. The traditional package management based model has dominated both the desktop and server space.
|
||||
|
||||
However, things took an interesting turn when Google launched Linux-based Chrome OS, which deployed an image-based model. Core OS (now owned by Red Hat) came out with an operating system (Container Linux) that was inspired by Google but targeted at enterprise customers.
|
||||
|
||||
Container Linux changed the way operating systems update. It changed the way applications were delivered and updated. Is this the future of Linux distributions? Will it replace the traditional package-based distribution model?
|
||||
|
||||
### Three models
|
||||
|
||||
Matthias Eckermann, Director of Product Management for SUSE Linux Enterprise, thinks there are not two but three models. “Outside of the traditional (RHEL/SLE) and the image-based model (RH Atomic Host), there is a third model: transactional. This is where [SUSE CaaS Platform][1] and its SUSE MicroOS lives,” said Eckermann.
|
||||
|
||||
### What’s the difference?
|
||||
|
||||
Those who live in Linux land are very well aware of the traditional model. It’s made up of single packages and shared libraries. This model has its own benefit as application developers don’t have to worry about bundling libraries with their apps. There is no duplication, which keeps the system lean and thin. It also saves bandwidth as users don’t have to download a lot of packages. Distributions have total control over packages so security issues can be fixed easily by pushing updates at the system level.
|
||||
|
||||
“Traditional packaging continues to provide the opportunity to carefully craft and tune an operating system to support mission-critical workloads that need to stand the test of time,” said Ron Pacheco, Director of Product Management at Red Hat Enterprise Linux.
|
||||
|
||||
But the traditional model has some disadvantages, too. App developers must restrict themselves to the libraries shipped with the distro, which means they can’t take advantage of new packages for their apps if the distro doesn’t support them. It could also lead to conflict between two different versions. As a result, it creates administration challenges as they are often difficult to keep updated and in sync.
|
||||
|
||||
### Image-based Model
|
||||
|
||||
That’s where the image based model comes to the rescue. “The image-based model solves the problems of the traditional model as it replaces the operating system at every reiteration and doesn't work with single packages,” said Eckermann.
|
||||
|
||||
“When we talk about the operating system as an image, what we’re really talking about is developing and deploying in a programmatic way and with better integrated life cycle management,” said Pacheco, giving the example of OpenShift, which is built on top of Red Hat Enterprise Linux.
|
||||
|
||||
Pacheco sees the image-based OS as a continuum, from hand-tooling a deployed image to a heavily automated infrastructure that can be managed at a large scale; regardless of where a customer is on this range, the same applications have to run. “You don't want to create a silo by using a wholly different deployment model,” he said.
|
||||
|
||||
The image-based model replaces the entire OS with new libraries and packages, which introduces its own set of problems. The image-based model has to be reconstructed to meet the needs of specific environments. For example, if the user has a specific need for installing a specific hardware driver or low-level monitoring option, the image model fails, or options to have finer granularity have to be re-invented.
|
||||
|
||||
### Transactional model
|
||||
|
||||
The third model is transactional updates, which follows the traditional package-based updates, but instead handles all packages as if they were images, updating all the packages that belong together in one shot like an image.
|
||||
|
||||
“The difference is because they are single packages that are grouped together as well as on descending and the installation, the customer has the option to influence this if necessary. This gives the user extra flexibility by combining the benefits of both and avoiding the disadvantages associated with the traditional or image model,” said Eckermann.
|
||||
|
||||
Pacheco said that it’s becoming increasingly common for carefully crafted workloads to be deployed as images in order to deploy consistently, reliably, and to do so with elasticity. “This is what we see our customers do today when they create and deploy virtual machines on premises or on public/private clouds as well as on traditional bare metal deployments,” he said.
|
||||
|
||||
Pacheco suggests that we should not look at these models as strictly a “compare and contrast scenario,” but rather as an evolution and expansion of the operating system’s role.
|
||||
|
||||
### Arrival of Atomic Updates
|
||||
|
||||
Google’s Chrome OS and the Core OS popularized the concept of transactional updates, a model followed by both Red Hat and SUSE.
|
||||
|
||||
“The real problem is the operating system underlining the container host operating system is not in focus anymore -- at least not in a way the administrator should care about. Both RH Atomic Host and SUSE CaaS Platform solve this problem similarly from a user experience perspective,” said Eckermann.
|
||||
|
||||
[Immutable infrastructure][2], such as that provided by SUSE CaaS Platform, Red Hat Atomic Host, and Container Linux (formerly Core OS), encourages the use of transactional updates. “Having a model where the host always moves to a ‘known good’ state enables better confidence with updates, which in turn enables a faster flow of features, security benefits, and an easier-to-adopt operational model,” said Ben Breard, senior technology product manager, Red Hat.
|
||||
|
||||
These newer OSes isolate the applications from the underlying host with Linux containers thereby removing many of the traditional limitations associated with infrastructure updates.
|
||||
|
||||
“The real power and benefits are realized when the orchestration layer is intelligently handling the updates, deployments, and, ultimately, seamless operations,” added Breard.
|
||||
|
||||
### The Future
|
||||
|
||||
What does the future hold for Linux? The answer really depends on who you ask. Container players will say the future belongs to containerized OS, but Linux vendors who still have a huge market may disagree.
|
||||
|
||||
When asked if, in the long run, atomic distros will replace traditional distributions, Eckermann said, “If I say yes, then I am following the trend; if I say no, I will be considered old-fashioned. Nevertheless, I say no: atomic distros will not replace traditional distros in the long run -- but traditional workloads and containerized workloads will live together in data centers as well as private and public cloud environments.”
|
||||
|
||||
Pacheco maintained that the growth in Linux deployments, in general, makes it difficult to imagine one model replacing the other. He said that instead of looking at them as competing models, we should look at atomic distributions as part of the evolution and deployment of the operating system.
|
||||
|
||||
Additionally, there are many use-cases that may need a mix of both species of Linux distributions. “Imagine the large number of PL/1 and Cobol systems in banks and insurance companies. Think about in-memory databases and core data bus systems,” said Eckermann.
|
||||
|
||||
Most of these applications can’t be containerized. As much as we would like to think, containerization is not a silver bullet that solves every problem. There will always be a mix of different technologies.
|
||||
|
||||
Eckermann believes that over time, a huge number of new developments and deployments will go into containerization, but there is still good reason to keep traditional deployment methods and applications in the enterprise.
|
||||
|
||||
“Customers need to undergo business, design, and cultural transformations in order to maximize the advantages that container-based deployments are delivering. The good news is that the industry understands this, as a similar transformation at scale occurred with the historical moves from mainframes to UNIX to x86 to virtualization,” said Pacheco.
|
||||
|
||||
### Conclusion
|
||||
|
||||
It’s apparent that the volume of containerized workloads will increase in the future, which translates into more demand for atomic distros. In the meantime, a substantial percentage of workloads may remain on traditional distros that will keep them running. What really matters is that both players have invested heavily in new models and are ready to tweak their strategy as the market evolves. An external observer can clearly see that the future belongs to transactional/atomic models. We have seen the evolution of datacenter; we have come a long way from one application per server to function-as-a-service model. It is not far fetched to see Linux distros entering the atomic phase.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.linux.com/blog/2018/4/containerization-atomic-distributions-and-future-linux
|
||||
|
||||
作者:[SWAPNIL BHARTIYA][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
选题:[lujun9972](https://github.com/lujun9972)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:https://www.linux.com/users/arnieswap
|
||||
[1]:https://www.suse.com/products/caas-platform/
|
||||
[2]:https://www.digitalocean.com/community/tutorials/what-is-immutable-infrastructure
|
@ -1,135 +0,0 @@
|
||||
3 Python template libraries compared
|
||||
======
|
||||
|
||||

|
||||
In my day job, I spend a lot of time wrangling data from various sources into human-readable information. While a lot of the time this just takes the form of a spreadsheet or some type of chart or other data visualization, there are other times when it makes sense to present the data instead in a written format.
|
||||
|
||||
But a pet peeve of mine is copying and pasting. If you’re moving data from its source to a standardized template, you shouldn’t be copying and pasting either. It’s error-prone, and honestly, it’s not a good use of your time.
|
||||
|
||||
So for any piece of information I send out regularly which follows a common pattern, I tend to find some way to automate at least a chunk of it. Maybe that involves creating a few formulas in a spreadsheet, a quick shell script, or some other solution to autofill a template with information pulled from an outside source.
|
||||
|
||||
But lately, I’ve been exploring Python templating to do much of the work of creating reports and graphs from other datasets.
|
||||
|
||||
Python templating engines are hugely powerful. My use case of simplifying report creation only scratches the surface of what they can be put to work for. Many developers are making use of these tools to build full-fledged web applications and content management systems. But you don’t have to have a grand vision of a complicated web app to make use of Python templating tools.
|
||||
|
||||
### Why templating?
|
||||
|
||||
Each templating tool is a little different, and you should read the documentation to understand the exact usage. But let’s create a hypothetical example. Let’s say I’d like to create a short page listing all of the Python topics I've written about recently. Something like this:
|
||||
```
|
||||
html>
|
||||
|
||||
head>
|
||||
|
||||
title>/title>
|
||||
|
||||
/head>
|
||||
|
||||
body>
|
||||
|
||||
p>/p>
|
||||
|
||||
ul>
|
||||
|
||||
li>/li>
|
||||
|
||||
li>/li>
|
||||
|
||||
li>/li>
|
||||
|
||||
/ul>
|
||||
|
||||
/body>
|
||||
|
||||
/html>My Python articlesThese are some of the things I have written about Python:Python GUIsPython IDEsPython web scrapers
|
||||
|
||||
```
|
||||
|
||||
Simple enough to maintain when it’s just these three items. But what happens when I want to add a fourth, or fifth, or sixty-seventh? Rather than hand-coding this page, could I generate it from a CSV or other data file containing a list of all of my pages? Could I easily create duplicates of this for every topic I've written on? Could I programmatically change the text or title or heading on each one of those pages? That's where a templating engine can come into play.
|
||||
|
||||
There are many different options to choose from, and today I'll share with you three, in no particular order: [Mako][6], [Jinja2][7], and [Genshi][8].
|
||||
|
||||
### Mako
|
||||
|
||||
[Mako][6] is a Python templating tool released under the MIT license that is designed for fast performance (not unlike Jinja2). Mako has been used by Reddit to power their web pages, as well as being the default templating language for web frameworks like Pyramid and Pylons. It's also fairly simple and straightforward to use; you can design templates with just a couple of lines of code. Supporting both Python 2.x and 3.x, it's a powerful and feature-rich tool with [good documentation][9], which I consider a must. Features include filters, inheritance, callable blocks, and a built-in caching system, which could be import for large or complex web projects.
|
||||
|
||||
### Jinja2
|
||||
|
||||
Jinja2 is another speedy and full-featured option, available for both Python 2.x and 3.x under a BSD license. Jinja2 has a lot of overlap from a feature perspective with Mako, so for a newcomer, your choice between the two may come down to which formatting style you prefer. Jinja2 also compiles your templates to bytecode, and has features like HTML escaping, sandboxing, template inheritance, and the ability to sandbox portions of templates. Its users include Mozilla, SourceForge, NPR, Instagram, and others, and also features [strong documentation][10]. Unlike Mako, which uses Python inline for logic inside your templates, Jinja2 uses its own syntax.
|
||||
|
||||
### Genshi
|
||||
|
||||
[Genshi][8] is the third option I'll mention. It's really an XML tool which has a strong templating component, so if the data you are working with is already in XML format, or you need to work with formatting beyond a web page, Genshi might be a good solution for you. HTML is basically a type of XML (well, not precisely, but that's beyond the scope of this article and a bit pedantic), so formatting them is quite similar. Since a lot of the data I work with commonly is in one flavor of XML or another, I appreciated working with a tool I could use for multiple things.
|
||||
|
||||
The release version currently only supports Python 2.x, although Python 3 support exists in trunk, I would caution you that it does not appear to be receiving active development. Genshi is made available under a BSD license.
|
||||
|
||||
### Example
|
||||
|
||||
So in our hypothetical example above, rather than update the HTML file every time I write about a new topic, I can update it programmatically. I can create a template, which might look like this:
|
||||
```
|
||||
html>
|
||||
|
||||
head>
|
||||
|
||||
title>/title>
|
||||
|
||||
/head>
|
||||
|
||||
body>
|
||||
|
||||
p>/p>
|
||||
|
||||
ul>
|
||||
|
||||
%for topic in topics:
|
||||
|
||||
li>/li>
|
||||
|
||||
%endfor
|
||||
|
||||
/ul>
|
||||
|
||||
/body>
|
||||
|
||||
/html>My Python articlesThese are some of the things I have written about Python:%for topic in topics:${topic}%endfor
|
||||
|
||||
```
|
||||
|
||||
And then I can iterate across each topic with my templating library, in this case, Mako, like this:
|
||||
```
|
||||
from mako.template import Template
|
||||
|
||||
|
||||
|
||||
mytemplate = Template(filename='template.txt')
|
||||
|
||||
print(mytemplate.render(topics=("Python GUIs","Python IDEs","Python web scrapers")))
|
||||
|
||||
```
|
||||
|
||||
Of course, in a real-world usage, rather than listing the contents manually in a variable, I would likely pull them from an outside data source, like a database or an API.
|
||||
|
||||
These are not the only Python templating engines out there. If you’re starting down the path of creating a new project which will make heavy use of templates, you’ll want to consider more than just these three. Check out this much more comprehensive list on the [Python wiki][11] for more projects that are worth considering.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/resources/python/template-libraries
|
||||
|
||||
作者:[Jason Baker][a]
|
||||
选题:[lujun9972](https://github.com/lujun9972)
|
||||
译者:[译者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/jason-baker
|
||||
[1]:https://opensource.com/resources/python?intcmp=7016000000127cYAAQ
|
||||
[2]:https://opensource.com/resources/python/ides?intcmp=7016000000127cYAAQ
|
||||
[3]:https://opensource.com/resources/python/gui-frameworks?intcmp=7016000000127cYAAQ
|
||||
[4]:https://opensource.com/tags/python?intcmp=7016000000127cYAAQ
|
||||
[5]:https://developers.redhat.com/?intcmp=7016000000127cYAAQ
|
||||
[6]:http://www.makotemplates.org/
|
||||
[7]:http://jinja.pocoo.org/
|
||||
[8]:https://genshi.edgewall.org/
|
||||
[9]:http://docs.makotemplates.org/en/latest/
|
||||
[10]:http://jinja.pocoo.org/docs/2.10/
|
||||
[11]:https://wiki.python.org/moin/Templating
|
@ -1,92 +0,0 @@
|
||||
translating---geekpi
|
||||
|
||||
How To Install Ncurses Library In Linux
|
||||
======
|
||||

|
||||
|
||||
**GNU Ncurses** is a programming library that allows the users to write text-based user interfaces(TUI). Many text-based games are created using this library. One popular example is [**PacVim**][1], a CLI game to learn VIM commands. In this brief guide, I will be explaining how to install Ncurses library in Unix-like operating systems.
|
||||
|
||||
### Install Ncurses Library In Linux
|
||||
|
||||
Ncurses is available in the default repositories of most Linux distributions. For instance, you can install it on Arch-based systems using the following command:
|
||||
```
|
||||
$ sudo pacman -S ncurses
|
||||
|
||||
```
|
||||
|
||||
On RHEL, CentOS:
|
||||
```
|
||||
$ sudo yum install ncurses-devel
|
||||
|
||||
```
|
||||
|
||||
On Fedora 22 and newer versions:
|
||||
```
|
||||
$ sudo dnf install ncurses-devel
|
||||
|
||||
```
|
||||
|
||||
On Debian, Ubuntu, Linux Mint:
|
||||
```
|
||||
$ sudo apt-get install libncurses5-dev libncursesw5-dev
|
||||
|
||||
```
|
||||
|
||||
The GNU ncureses might be bit old in the default repositories. If you want a most recent stable version, you can compile and install from the source as shown below.
|
||||
|
||||
Download the latest ncurses version from [**here**][2]. As of writing this guide, the latest version was 6.1.
|
||||
```
|
||||
$ wget https://ftp.gnu.org/pub/gnu/ncurses/ncurses-6.1.tar.gz
|
||||
|
||||
```
|
||||
|
||||
Extract the tar file:
|
||||
```
|
||||
$ tar xzf ncurses-6.1.tar.gz
|
||||
|
||||
```
|
||||
|
||||
This will create a folder named ncurses-6.1 in the current directory. Cd to the directory:
|
||||
```
|
||||
$ cd ncurses-6.1
|
||||
|
||||
$ ./configure --prefix=/opt/ncurses
|
||||
|
||||
```
|
||||
|
||||
Finally, compile and install using the following commands:
|
||||
```
|
||||
$ make
|
||||
|
||||
$ sudo make install
|
||||
|
||||
```
|
||||
|
||||
Verify the installation using command:
|
||||
```
|
||||
$ ls -la /opt/ncurses
|
||||
|
||||
```
|
||||
|
||||
That’s it. Ncurses have been installed on the Linux distribution. Go ahead and create your nice looking TUIs using Ncurses.
|
||||
|
||||
More good stuffs to come. Stay tuned!
|
||||
|
||||
Cheers!
|
||||
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.ostechnix.com/how-to-install-ncurses-library-in-linux/
|
||||
|
||||
作者:[SK][a]
|
||||
选题:[lujun9972](https://github.com/lujun9972)
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:https://www.ostechnix.com/author/sk/
|
||||
[1]:https://www.ostechnix.com/pacvim-a-cli-game-to-learn-vim-commands/
|
||||
[2]:https://ftp.gnu.org/pub/gnu/ncurses/
|
@ -1,88 +0,0 @@
|
||||
DevOps 接下来会发生什么:观察到的 5 个趋势
|
||||
======
|
||||
|
||||

|
||||
|
||||
"DevOps" 一词通常认为是来源于 [2008 年关于敏捷基础设施和运营的介绍][1]。现在的 IT 词汇中,它无处不在,这个“混搭”的词汇出现还不到 10 年:我们还在研究它在 IT 中更现代化的工作方法。
|
||||
|
||||
当然,多年来一直在 “从事 DevOps" 的人积累了丰富的知识。但是大多数的 DevOps 环境 —— 人与 [文化][2] 、流程与方法、工具与技术的融合 —— 还远远没有成熟。
|
||||
|
||||
更多的变化即将到来。Robert Reeves 说 ”DevOps 是一个过程,一种算法“,他是 [Datical][3] 的 CTO, "它的绝对目标就是随着时间进行改变和演进”,这就是重点。
|
||||
|
||||
那我们预计接下来会发生什么呢?这里有一些专家们观察到的重要趋势。
|
||||
|
||||
### 1. 预计 DevOps、容器、以及微服务之间的相互依赖会增强
|
||||
|
||||
驱动 DevOps 发展的文化本身可能会演进。当然,DevOps 仍然将在根本上摧毁传统的 IT 站点和瓶颈,但这样做的理由可能会变得更加急迫。展示(证据) A & B: [对容器和微服务的兴趣][4] 与日俱增。这个技术组合很强大、可连续扩展、与规划和 [持续进行的管理][5]配合最佳。
|
||||
|
||||
Arvind Soni 说 "影响 DevOps 的其中一个主要因素是向微服务转变“,它是 [Netsil][6] 的产品副总裁,添加容器和业务流程,使开发者打包和交付的速度越来越快。DevOps 团队的任务可能是帮助去加速打包并管理越来越复杂的微服务弹性架构。
|
||||
|
||||
### 2. 预计 ”安全网“ 更少
|
||||
|
||||
DevOps 使团队可以更快更敏捷地去构建软件,部署速度也更快更频繁、同时还能提升软件质量和稳定性。但是好的 IT 领导通常都不会忽视管理风险,因此,早期大量的 DevOps 迭代都是使用了安全防护 —— 从后备的不重要业务开始的。为了实现更快的速度和敏捷性,越来越多的团队将抛弃他们的 ”辅助轮“(译者注:意思说减少了安全防护措施)。
|
||||
|
||||
Nic Grange 说 "随着团队的成熟,他们决定不再需要一些早期增加的安全 ”防护栏“ 了”,他是 [Retriever Communications][7] 的 CTO。Grange 给出了一个展示服务器的示例:随着 DevOps 团队的成熟,他们决定不再需要了,尤其是他们很少在试生产环境中发现问题。(Grange 指出,这一举措对于缺乏 DevOps 经验的团队来说,不可轻易效仿)
|
||||
|
||||
Grange 说 "这个团队可能在监视和发现并解决生产系统中出现的问题的能力上有足够的信心“,"部署过程和测试阶段,如果没有任何证据证明它的价值,那么它可能会把整个进度拖慢”。
|
||||
|
||||
### 3. 预计 DevOps 将在其它领域大面积展开
|
||||
|
||||
DevOps 将两个传统的 IT 组(开发和运营)结合的更紧密。越来越多的公司看到了这种结合的好处,这种文化可能会传播开来。这种情况在一些组织中已经出现,在 “DevSecOps” 一词越来越多出现的情况下,它反映出了在软件开发周期中有意地、越来越早地包含了安全性。
|
||||
|
||||
Derek Weeks 说 "DevSecOps 不仅是一个工具,它是将安全思维更早地集成到开发实践中“,它是 [Sonatype][8] 的副总裁和 DevOps 拥挤者。
|
||||
|
||||
[Red Hat][9] 的安全策略师 Kirsten Newcomer 说,这种做法并不是一个技术挑战,而是一个文化挑战。
|
||||
|
||||
Newcomer 说 "从历史来看,安全团队都是从开发团队中分离出来的 —— 每个团队在它们不同的 IT 领域中形成了各自的专长” ,"它并不需要这种方法。每个关心安全性的企业也关心他们通过软件快速交付业务价值的能力,这些企业正在寻找方法,将安全放进应用程序的开发周期中。它们采用 DevSecOps 通过 CI/CD 流水线去集成安全实践、工具、和自动化。为了做的更好,他们整合他们的团队 —— 将安全专家整合到应用程序开发团队中,参与到从设计到产品部署的全过程中。这种做法使双方都看到了价值 —— 每个团队都扩充了它们的技能和知识,使他们成为更有价值的技术专家。DevOps 做对了—— 或者说是 DevSecOps —— 提升了 IT 安全性。“
|
||||
|
||||
除了安全以外,让 DevOps 扩展到其它领域,比如数据库团队、QA、甚至是 IT 以外的潜在领域。
|
||||
|
||||
Datical 的 Reeves 说 "这是一件非常 DevOps 化的事情:发现相互掣肘的地方并解决它们”,"对于以前采用 DevOps 的企业来说,安全和数据库是他们面临的最大瓶颈。“
|
||||
|
||||
### 4. 预计 ROI 将会增加
|
||||
|
||||
Eric Schabell 说,”由于公司深入推进他们的 DevOps 工作,IT 团队在方法、流程、容器、和微服务方面的投资将得到更多的回报。“ 他是 Red Hat 的全球技术传播总监,Schabell 说 "Holy Grail 将移动的更快、完成的更多、并且变得更灵活。由于这些组件找到了更宽阔的天地,组织在应用程序中更有归属感时,结果就会出现。”
|
||||
|
||||
"每当新兴技术获得我们的关注时,任何事都有一个令人兴奋的学习曲线,但当认识到它应用很困难的时候,同时也会经历一个从兴奋到幻灭的低谷。最终,我们将开始看到从低谷中爬出来,并收获到应用 DevOps、容器、和微服务的好处。“
|
||||
|
||||
### 5. 预计成功的指标将持续演进
|
||||
|
||||
Mike Kail 说 "我相信 DevOps 文化的两个核心原则 —— 自动化和可衡量是从来不会变的”,它是 [CYBRIC][10] 的 CTO,也是 Yahoo 前 CIO。“总是有办法去自动化一个任务,或者提升一个已经自动化的解决方案,而随着时间的推移,重要的事情是测量可能的变化和扩展。这个成熟的过程是一个永不停步的旅行,而不是一个目的地或者已完成的任务。”
|
||||
|
||||
在 DevOps 的精神中,成熟和学习也与协作者和分享精神有关。Kail 认为,对于敏捷方法和 DevOps 文化来说,它仍然为时尚早,这意味着它们还有足够的增长空间。
|
||||
|
||||
Kail 说 "随着越来越多的成熟组织持续去测量可控指标,我相信(希望) —— 这些经验应该被广泛的分享,以便我们去学习并改善它们。“
|
||||
|
||||
作为 Red Hat 技术传播专家 [Gordon Haff][11] 最近注意到,组织使用业务成果相关的因素去改善他们的 DevOps 指标的工作越来越困难。 [Haff 写道][12] "你或许并不真正关心你的开发者写了多少行代码、服务器是否在一夜之间出现了硬件故障、或者你的测试覆盖面是否全面”。事实上,你可能并不直接关心你的网站的响应速度和更新快慢。但是你要注意的是,这些指标可能与消费者放弃购物车或者转到你的竞争对手那里有关。“
|
||||
|
||||
与业务成果相关的一些 DevOps 指标的例子包括,消费者交易金额(作为消费者花销统计的指标)和净推荐值(消费者推荐公司产品和服务的意愿)。关于这个主题更多的内容,请查看这篇完整的文章—— [DevOps 指标:你是否测量了重要的东西 ][12]。
|
||||
|
||||
### 唯一不变的就是改变
|
||||
|
||||
顺利说一句,如果你希望这件事一蹴而就,那你就要倒霉了。
|
||||
|
||||
Reeves 说 "如果你认为今天发布非常快,那你就什么也没有看到”,“这就是为什么要让相关者包括数据库团队进入到 DevOps 中的重要原因。因为今天这两组人员的冲突会随着发布速度的提升而呈指数级增长。”
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://enterprisersproject.com/article/2017/10/what-s-next-devops-5-trends-watch
|
||||
|
||||
作者:[Kevin Casey][a]
|
||||
译者:[qhwdw](https://github.com/qhwdw)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:https://enterprisersproject.com/user/kevin-casey
|
||||
[1]:http://www.jedi.be/presentations/agile-infrastructure-agile-2008.pdf
|
||||
[2]:https://enterprisersproject.com/article/2017/9/5-ways-nurture-devops-culture
|
||||
[3]:https://www.datical.com/
|
||||
[4]:https://enterprisersproject.com/article/2017/9/microservices-and-containers-6-things-know-start-time
|
||||
[5]:https://enterprisersproject.com/article/2017/10/microservices-and-containers-6-management-tips-long-haul
|
||||
[6]:https://netsil.com/
|
||||
[7]:http://retrievercommunications.com/
|
||||
[8]:https://www.sonatype.com/
|
||||
[9]:https://www.redhat.com/en/
|
||||
[10]:https://www.cybric.io/
|
||||
[11]:https://enterprisersproject.com/user/gordon-haff
|
||||
[12]:https://enterprisersproject.com/article/2017/7/devops-metrics-are-you-measuring-what-matters
|
@ -0,0 +1,88 @@
|
||||
容器化,原子化发行版以及 Linux 的未来
|
||||
======
|
||||
|
||||

|
||||
自从 Linus Torvalds 在 1991 年发布 Linux 以来,Linux 已历经漫长的岁月。它已经成为企业级领域的主流操作系统。同时,我们看到桌面级领域出现了很多改进和调整,但在过去的 25+ 年,主流 Linux 发行版的模式很大程度上保持不变。基于软件包管理的传统模式依然统治着桌面级和服务器级市场。
|
||||
|
||||
但随着 Google 发布了基于 Linux 的 Chrome-OS,情况出现了微妙的转变,Chrome-OS 采用镜像模式。Core OS (目前归属于 Red Hat) 受 Google 启发推出了一款操作系统 Container Linux,主要面向企业级用户。
|
||||
|
||||
Container Linux 改变了操作系统更新的方式,也改变了应用分发和更新的方式。这会是 Linux 发行版的未来吗?这是否会取代基于软件包的传统发行版模式呢?
|
||||
|
||||
### 三种模式
|
||||
|
||||
SLE (SUSE Linux Enterprise) 的产品管理总监 Matthias Eckermann 认为目前存在 3 种模式,而不是 2 种。Eckermann 提到:“除了传统模式 (RHEL/SLE) 和镜像模式 (RH Atomic Host),还存在第三种模型:事务模式。[SUSE CaaS 平台][1] 及 SUSE MicroOS 就采用这种模型。”
|
||||
|
||||
### 差异有哪些
|
||||
|
||||
Linux 用户对传统模式非常熟悉,它由独立的软件包和共享库组成。这种模式有独特的优势,让应用开发者无需将共享库捆绑在应用中。由于库不会多次引入,使得系统简洁和轻便。这也让用户无需下载很多软件包,节省了带宽。发行版对软件包全权负责,通过推送系统级别的更新,可以轻松地解决安全隐患。
|
||||
|
||||
RHEL (Red Hat Enterprise Linux) 的产品管理总监 Ron Pacheco 表示,“传统的打包方式继续为我们提供精心构建和优化操作系统的机会,以便支持需要经过时间考验的任务关键型工作负载。”
|
||||
|
||||
但传统模式也有一些弊端。应用开发者受限使用发行版包含的库,使其无法从发行版不支持的新软件中获益。这也可能导致不同版本之间相互冲突。最终,传统模式给管理员增加了挑战,使其难以让软件包一直处于最新版本状态。
|
||||
|
||||
### 镜像模式
|
||||
|
||||
镜像模式应运而生。Eckermann 表示,“镜像模式解决了传统模式遇到的问题,它在每次迭代更新时替换整个操作系统,其中也不包含独立的软件包”。
|
||||
|
||||
Pacheco 表示,“当我们用镜像作为操作系统的代名词进行讨论时,我们真正关心的是可编程式的开发部署以及更好的集成式生命周期管理”,基于 RHEL 搭建的 OpenShift 被他用作示例。
|
||||
|
||||
Pacheco 认为基于镜像的操作系统是一种延续,从手工打造并部署镜像,到可大规模管理的高度自动化基础设施;无论客户使用哪种类型,都需要运行同样的应用。他说,“你肯定不希望使用一个完全不同的部署模式,这需要重做很多工作”。
|
||||
|
||||
镜像模式替代了使用新库和软件包的完整操作系统,但也面临一系列问题。在镜像模式中,需要重建镜像才能适应特殊环境的需求。例如,用户有特殊需求,需要安装特定硬件的驱动或安装底层监控功能,镜像模式无法满足,需要重新设计功能以实现细粒度操作。
|
||||
|
||||
### 事务模式
|
||||
|
||||
第三种模式采用事务更新,基于传统的软件包更新,但将全部的软件包视为一个镜像,就像镜像那样在一次操作中更新全部软件包。
|
||||
|
||||
Eckermann 表示,“由于安装或回滚时操作对象是打包在一起的独立软件包,用户在需要时能够做相应的调整,这就是差别所在。结合传统模式和镜像模式的优点,避免两种模式的缺点,事务模式给用户提供了额外的灵活性。”
|
||||
|
||||
Pacheco 表示,将精心构造的工作负载部署成镜像的做法越来越成为主流,因为这种部署方式具有一致性和可靠性,而且可以弹性部署。“这正是我们用户目前的做法,部署环境包括在预置设备或公有/私有云上创建并部署的虚拟机,或在传统的裸机上”
|
||||
|
||||
Pacheco 建议我们将这几种模式视为操作系统角色的进化和扩展,而不是仅仅“使用场景的比较和对比“。
|
||||
|
||||
### 原子化更新的问世
|
||||
|
||||
Google 的 Chrome OS 和 Core OS 为我们普及了事务更新的概念,该模型也被 Red Hat 和 SUSE 采用。
|
||||
|
||||
Eckermann 表示,”我们必须认识到,用于容器主机的操作系统已经不再是关注点 —— 至少不是管理员的关注点。RH Atomic 主机和 SUSE CaaS 平台都解决了该问题,实现方式在用户看来很相似。“
|
||||
|
||||
SUSE CaaS 平台、Red Hat Atomic Host和 Container Linux (前身是 Core OS)提供的[<ruby>不可变基础设施<rt>Immutable infrastructure</rt></ruby>][2] 推广了事务更新的使用。Red Hat 高级技术产品经理 Ben Breard 表示,”在事务模式中,主机总是会变更到已确认正确的新状态,这让我们更有信心执行更新,进而实现更快速的功能流、安全优势以及易于采用的操作模式“。
|
||||
|
||||
这些新型操作系统使用 Linux 容器将应用与底层系统隔离,解除了传统模式中基础设施更新的诸多限制。
|
||||
|
||||
Breard 补充道,“当编排层可以智能处理更新、部署,甚至最终实现无缝操作时,我们才会真正意识到该模式的威力和好处”。
|
||||
|
||||
### 展望未来
|
||||
|
||||
Linux 的未来会是什么样子?不同的人会给出不同的回答。容器支持者认为未来属于容器化的操作系统,但依然拥有庞大市场的 Linux 供应商显然不这么认为。
|
||||
|
||||
当被问到原子化发行版是否在很久以后将替换传统发行版时,Eckermann 表示,“如果我回答肯定的,那么表示我顺应潮流;如果回答是否的的,意味着我还是站在传统阵营。然而,我的回答是否定的,即 atomic 发行版在很久以后也不会替换传统发行版,传统负载和容器化负载将在数据中心、私有云以及公有云环境中共存。”
|
||||
|
||||
Pacheco 认为,从 Linux 的部署增长情况来看,一般情况下很难想象一种模式替换另一种模式。与其将多种模式视为相互竞争的关系,不如将原子化发行版视为操作系统进化和部署的一部分。
|
||||
|
||||
此外,在一些使用案例中,我们需要同时使用多种 Linux 发行版。Eckermann 表示,“想一想银行和保险公司中大量的 PL/1 和 Cobol 系统。再想一想内存数据库和核心数据总线系统”。
|
||||
|
||||
这些应用大多数无法进行容器化。就我们目前来看,容器化不是解决所有问题的万金油。总是会同时存在多种不同的技术。
|
||||
|
||||
Eckermann 相信,随着时间的推移,大量新的开发和部署将采用容器化,但仍然有不错的理由,促使我们在企业级环境中保留传统的部署方式和应用。
|
||||
|
||||
Pacheco 认为,“用户需要经历业务、设计和文化的转型,才能最大化基于容器的部署带来的优势。好消息是业界已经认识到并开始大规模转变,就像历史上大型机转变成 UNIX,UNIX 转变成 x86,x86 转变成虚拟化那样”。
|
||||
|
||||
### 结论
|
||||
|
||||
很明显,未来容器化负载的使用量会持续增长,也就意味着原子化发行版的需求量持续增长。与此同时,仍会有不少工作负载运行在传统发行版中。重要的是,这两类用户都在新模式上大规模投入,以便市场改变时可以做相应的策略改变。从外部观察者的视角来看,未来属于事务/原子化模式。我们已经见证了数据中心的发展,我们花了很长时间完成了从每个服务器一个应用到函数即服务模型的转变。Linux 发行版进入原子化时代的日子也不会太远了。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.linux.com/blog/2018/4/containerization-atomic-distributions-and-future-linux
|
||||
|
||||
作者:[SWAPNIL BHARTIYA][a]
|
||||
译者:[pinewall](https://github.com/pinewall)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
选题:[lujun9972](https://github.com/lujun9972)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:https://www.linux.com/users/arnieswap
|
||||
[1]:https://www.suse.com/products/caas-platform/
|
||||
[2]:https://www.digitalocean.com/community/tutorials/what-is-immutable-infrastructure
|
112
translated/tech/20180427 3 Python template libraries compared.md
Normal file
112
translated/tech/20180427 3 Python template libraries compared.md
Normal file
@ -0,0 +1,112 @@
|
||||
3 个 Python 模板库比较
|
||||
=====
|
||||
|
||||

|
||||
在我的日常工作中,我花费大量的时间将各种来源的数据转化为可读的信息。虽然很多时候这只是电子表格或某种类型的图表或其他数据可视化的形式,但也有其他时候,将数据以书面形式呈现是有意义的。
|
||||
|
||||
但我的一个 pet peeve (to 校正:不知道该怎么翻译)正在复制和粘贴。如果你要将数据从源头移动到标准化模板,则不应该复制和粘贴。这很容易出错,说实话,这会浪费你的时间。
|
||||
|
||||
因此,对于我定期发送的任何信息都遵循一个共同的模式,我倾向于找到某种方法来自动化至少一部分信息。也许这涉及到在电子表格中创建一些公式,一个快速 shell 脚本或其他解决方案,以便使用从外部源提取的信息自动填充模板。
|
||||
|
||||
但最近,我一直在探索 Python 模板来完成从其他数据集创建报告和图表的大部分工作。
|
||||
|
||||
Python 模板引擎非常强大。我简化创建报告的使用案例仅仅触及了它们可以用来工作的皮毛。许多开发人员正在利用这些工具来构建完整的 web 应用程序和内容管理系统。但是,你不需要有一个复杂的 web 应用程序来使用 Python 模板工具。
|
||||
|
||||
### 为什么选择模板?
|
||||
|
||||
每个模板工具都不甚相同,你应该阅读文档以了解其确切的用法。但让我们创建一个假设的例子。假设我想创建一个简短的页面,列出我最近编写的所有 Python 主题。就像这样:
|
||||
```
|
||||
<html>
|
||||
<head>
|
||||
<title>My Python articles</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>These are some of the things I have written about Python:</p>
|
||||
<ul>
|
||||
<li>Python GUIs</li>
|
||||
<li>Python IDEs</li>
|
||||
<li>Python web scrapers</li>
|
||||
</ul>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
```
|
||||
|
||||
当它仅仅是这三个项目时,足够简单地维护它。但是当我想添加第四个,第五个或第六十七个时会发生什么?我可以从包含我所有页面列表的 CSV 文件或其他数据文件生成它,而不是手动编码此页面吗?我可以轻松地为我写的每个主题创建重复内容吗?我可以以编程方式更改每个页面上的文本标题吗?这就是模板引擎可以发挥作用的地方。
|
||||
|
||||
有许多不同的选择,今天我将与你其中分享三个,顺序不分先后:[Mako][6], [Jinja2][7] 和 [Genshi][8]。
|
||||
|
||||
### Mako
|
||||
|
||||
[Mako][6] 是根据 MIT 许可证发布的 Python 模板工具,专为快速展现而设计的(与Jinja2不同)。Reddit 已经使用 Mako 为他们的网页提供动力,它同时也是 Pyramid 和 Pylons 等 web 框架的默认模板语言。它相当简单且易于使用。你可以使用几行代码来设计模板;支持Python 2.x 和 3.x,它是一个功能强大且功能丰富的工具,具有[良好的文档][9],这一点我认为是必须的。其功能包括过滤器,继承,可调用块和内置缓存系统,这些系统可以被大型或复杂的 web 项目导入。
|
||||
|
||||
### Jinja2
|
||||
|
||||
Jinja2 是另一个快速且功能全面的选项,可用于 Python 2.x 和 3.x,遵循 BSD 许可证。Jinja2 从功能角度与 Mako 有很多重叠,因此对于新手来说,你在两者之间的选择可能会归结为你喜欢的格式化风格。Jinja2 还将模板编译为字节码,并具有 HTML 转义,沙盒,模板继承和模板沙盒部分的功能。其用户包括 Mozilla, SourceForge, NPR, Instagram 等,并且还具有[强大的文档][10]。与 Mako 在模板内部使用 Python 逻辑不同的是,Jinja2 使用自己的语法。
|
||||
|
||||
### Genshi
|
||||
|
||||
[Genshi][8] 是我会提到的第三个选项。它是一个 XML 工具,具有强大的模板组件,所以如果你使用的数据已经是 XML 格式,或者你需要使用网页以外的格式,Genshi 可能成为你的一个很好的解决方案。HTML 基本上是一种 XML(好吧,不是精确的,但这超出了本文的范围,有点卖弄学问了),因此格式化它们非常相似。由于我通常使用的很多数据都是 XML 或其他类型的数据,因此我非常喜欢使用我可以用于多种事物的工具。
|
||||
|
||||
发行版目前仅支持 Python 2.x,尽管 Python 3 支持存在于主干中,但我提醒你,它看起来并没有得到有效的开发。Genshi 遵循 BSD 许可证提供。
|
||||
|
||||
### 示例
|
||||
|
||||
因此,在上面的假设示例中,我不会每次写新主题时都更新 HTML 文件,而是通过编程方式对其进行更新。我可以创建一个模板,如下所示:
|
||||
```
|
||||
<html>
|
||||
<head>
|
||||
<title>My Python articles</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>These are some of the things I have written about Python:</p>
|
||||
<ul>
|
||||
%for topic in topics:
|
||||
<li>${topic}</li>
|
||||
%endfor
|
||||
</ul>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
|
||||
然后我可以使用我的模板库来迭代每个主题,比如使用 Mako,像这样:
|
||||
```
|
||||
from mako.template import Template
|
||||
|
||||
mytemplate = Template(filename='template.txt')
|
||||
print(mytemplate.render(topics=("Python GUIs","Python IDEs","Python web scrapers")))
|
||||
|
||||
```
|
||||
|
||||
当然,在现实世界的用法中,我不会将这些内容手动地列在变量中,而是将它们从外部数据源(如数据库或API)中提取出来。
|
||||
|
||||
这些不是唯一的 Python 模板引擎。如果你正在开始创建一个将大量使用模板的新项目,那么你考虑的可能不仅仅是这三种选择。在[ Python 维基][11]上查看更全面的列表,以获得更多值得考虑的项目。
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/resources/python/template-libraries
|
||||
|
||||
作者:[Jason Baker][a]
|
||||
选题:[lujun9972](https://github.com/lujun9972)
|
||||
译者:[MjSeven](https://github.com/MjSeven)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:https://opensource.com/users/jason-baker
|
||||
[1]:https://opensource.com/resources/python?intcmp=7016000000127cYAAQ
|
||||
[2]:https://opensource.com/resources/python/ides?intcmp=7016000000127cYAAQ
|
||||
[3]:https://opensource.com/resources/python/gui-frameworks?intcmp=7016000000127cYAAQ
|
||||
[4]:https://opensource.com/tags/python?intcmp=7016000000127cYAAQ
|
||||
[5]:https://developers.redhat.com/?intcmp=7016000000127cYAAQ
|
||||
[6]:http://www.makotemplates.org/
|
||||
[7]:http://jinja.pocoo.org/
|
||||
[8]:https://genshi.edgewall.org/
|
||||
[9]:http://docs.makotemplates.org/en/latest/
|
||||
[10]:http://jinja.pocoo.org/docs/2.10/
|
||||
[11]:https://wiki.python.org/moin/Templating
|
@ -0,0 +1,90 @@
|
||||
如何在 Linux 中安装 Ncurses 库
|
||||
======
|
||||

|
||||
|
||||
**GNU Ncurses** 是一个允许用户编写基于文本的用户界面(TUI)的编程库。许多基于文本的游戏都是使用这个库创建的。一个受欢迎的例子是 [**PacVim**][1],这是一款学习 VIM 命令的 CLI 游戏。在这篇简要的指南中,我将解释如何在类 Unix 操作系统中安装 Ncurses 库。
|
||||
|
||||
### 在 Linux 中安装 Ncurses 库
|
||||
|
||||
Ncurses 在大多数 Linux 发行版的默认仓库中都有。例如,你可以使用以下命令将其安装在基于 Arch 的系统上:
|
||||
```
|
||||
$ sudo pacman -S ncurses
|
||||
|
||||
```
|
||||
|
||||
在RHEL、CentOS 上:
|
||||
```
|
||||
$ sudo yum install ncurses-devel
|
||||
|
||||
```
|
||||
|
||||
在 Fedora 22 和更新版本上:
|
||||
```
|
||||
$ sudo dnf install ncurses-devel
|
||||
|
||||
```
|
||||
|
||||
在 Debian、Ubuntu、Linux Mint 上:
|
||||
```
|
||||
$ sudo apt-get install libncurses5-dev libncursesw5-dev
|
||||
|
||||
```
|
||||
|
||||
默认仓库中的 GNU ncureses 可能有点老了。如果你想要最新的稳定版本,可以从源代码进行编译和安装,如下所示。
|
||||
|
||||
从[**这里**][2]下载最新的 ncurses 版本。在写这篇文章时,最新版本是 6.1。
|
||||
```
|
||||
$ wget https://ftp.gnu.org/pub/gnu/ncurses/ncurses-6.1.tar.gz
|
||||
|
||||
```
|
||||
|
||||
解压 tar 文件:
|
||||
```
|
||||
$ tar xzf ncurses-6.1.tar.gz
|
||||
|
||||
```
|
||||
|
||||
这将在当前目录中创建一个名为 ncurses-6.1 的文件夹。cd 到该目录:
|
||||
```
|
||||
$ cd ncurses-6.1
|
||||
|
||||
$ ./configure --prefix=/opt/ncurses
|
||||
|
||||
```
|
||||
|
||||
最后,使用以下命令进行编译和安装:
|
||||
```
|
||||
$ make
|
||||
|
||||
$ sudo make install
|
||||
|
||||
```
|
||||
|
||||
使用命令验证安装:
|
||||
```
|
||||
$ ls -la /opt/ncurses
|
||||
|
||||
```
|
||||
|
||||
就是这样。Ncurses 已经安装在 Linux 发行版上。继续使用 Ncurses 创建漂亮的 TUI。
|
||||
|
||||
还会有更多的好东西。敬请关注!
|
||||
|
||||
干杯!
|
||||
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.ostechnix.com/how-to-install-ncurses-library-in-linux/
|
||||
|
||||
作者:[SK][a]
|
||||
选题:[lujun9972](https://github.com/lujun9972)
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:https://www.ostechnix.com/author/sk/
|
||||
[1]:https://www.ostechnix.com/pacvim-a-cli-game-to-learn-vim-commands/
|
||||
[2]:https://ftp.gnu.org/pub/gnu/ncurses/
|
Loading…
Reference in New Issue
Block a user