Merge branch 'LCTT:master' into master

This commit is contained in:
Hans zhao 2022-05-14 11:31:48 +08:00 committed by GitHub
commit b0d4fcbaf5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 391 additions and 103 deletions

View File

@ -3,40 +3,40 @@
[#]: author: "Ray Paik https://opensource.com/users/rpaik"
[#]: collector: "lkxed"
[#]: translator: "PeterPan0106"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14590-1.html"
如何使社区认可更加包容
======
抛开具体的工作量,我们认为所有的贡献都弥足珍贵。当所有社区贡献者都能获得家庭般的赞赏时,他们会更倾向于继续为社区添砖加瓦。
![Global citizens unite to improve housing with open design and development][1]
(图源: Opensource.com
> 抛开具体的工作量,我们认为所有的贡献都弥足珍贵。当所有社区贡献者都能获得家庭般的赞赏时,他们会更倾向于继续为社区添砖加瓦。
给予一个优秀的工作足够的认同和赞赏是我作为一个社区管理员最喜欢的事。我不但有机会能够对贡献者表示感激,同时还能为社区设立一个优秀的榜样。认同和赞赏可以是为了庆祝一个成就,例如有人帮助其他成员加入社区、减少技术债务或者贡献了激动人心的新功能。
![](https://img.linux.net.cn/data/attachment/album/202205/13/234756gi7q42f2mgz5mg44.png)
但是用来确定贡献量的规则可能会有难以预料的后果。例如某些社区管理员利用如下图所示的图表来表彰贡献过度地强调了pull requests以及对代码库的贡献量。
给予一个优秀的工作足够的认同和赞赏是我作为一个社区管理员最喜欢做的事。我不但有机会能够对贡献者表示感激,同时还能为社区设立一个优秀的榜样。认同和赞赏可以是为了庆祝一个成就,例如有人帮助其他成员加入社区、减少技术债务或者贡献了激动人心的新功能。
但是用来确定贡献量的规则可能会有难以预料的后果。例如某些社区管理员利用如下图所示的图表来表彰贡献过度地强调了拉取请求PR以及对代码库的贡献量。
![A bar graph ranking 15 contributors according the the number of PRs merged in a year, ranging from 250 at the top to 50 at the bottom.][2]
(图源: Ray Paik, CC BY-SA 4.0
![A bar graph ranking 10 contributing organizations by number of contributions, ranging from more than 15 to less than 5][3]
(图源: Ray Paik, CC BY-SA 4.0
使用这样的方法进行表彰会产生三个问题。首先,这样过度聚焦了对代码库的贡献。早年间,开源项目主要吸引开发者参与,所以自然而然许多贡献是围绕代码的。现在,越来越多的非开发者正在积极参与社区项目(例如通过用户组、会议和用户本身生产的内容),他们的大多数贡献在代码库以外的地方。这些贡献将不会出现在诸如*年度合并PR数量*这样的表格上。
使用这样的方法进行表彰会产生三个问题。
其次,过度聚焦贡献指标(指那些易于用数字统计的),最终会演变为更大的数量甚至超越了更好的质量甚至是影响力。在上图的*贡献组织排行榜*中,大型组织因为具有更多的可用人力,相对于小型组织就会有更为显著的优势。通过对大型组织在数量上的表彰将可能导致小型组织感到权利被剥夺了
首先,这样过度关注了对代码库的贡献。早年间,开源项目主要吸引开发者参与,所以自然而然许多贡献是围绕代码的。现在,越来越多的非开发者正在积极参与社区项目(例如通过用户组、会议和用户生产的内容),他们的大多数贡献在代码库以外的地方。这些贡献将不会出现在诸如 *年度合并 PR 数量* 这样的表格上
最终,尽管本意并非如此,但许多人都会把这些数据看做对个人或组织影响力的排名。
其次,过度关注贡献指标(指那些易于用数字统计的),最终会演变为奖励数量而不是质量,甚至影响力。在上图的 *贡献组织排行榜* 中,大型组织因为具有更多的可用人力,相对于小型组织就会有更为显著的优势。通过对大型组织在数量上的表彰将可能导致小型组织的人感到权利被剥夺了。
最后,尽管本意并非如此,但许多人都会把这些数据看做对个人或组织影响力的排名。
基于此,我们最好避免仅仅通过指标数量来表彰对社区的贡献。
### 令社区表彰更有意义
如何让社区表彰更为包容并且能够覆盖不同的贡献形式呢?一些通信频道例如Discord、IRC、mailing list和Slack可以很好的表明一个成员的活跃度及其感兴趣的领域。例如每当我看到一些人热衷于解答问题或者帮助新用户时,我会十分开心。这些贡献并不会出现在社区的数据板上,但是让这些贡献得到应有的认同和感谢并广为人知是十分重要的。
如何让社区表彰更为包容并且能够覆盖不同的贡献形式呢?诸如 Discord、IRC、邮件列表和Slack 等交流渠道可以很好的表明一个成员的活跃度及其感兴趣的领域。例如每当我看到一些人热衷于解答问题或者帮助新用户时,我会十分开心。这些贡献并不会出现在社区的数据板上,但是让这些贡献得到应有的认同和感谢并广为人知是十分重要的。
社区数据板显然是开源社区重要的工具。但对于花费在建设数据板的时间上,我锱铢必较。迟早你会发现,不是所有的东西都可以有清晰的标准进行度量,即便你能够想出规则量化一件事,你也依然会发现这些规则具有局限性。
社区数据板显然是开源社区重要的工具。但是我提醒大家不要花费太多时间在建设数据板上。迟早你会发现,不是所有的东西都可以有清晰的标准进行度量,即便你能够想出规则量化一件事,你也依然会发现这些规则具有局限性。
为了获取更多的关于贡献的信息,我经常会安排社区成员茶话会。这些对话经常能够告诉我他们做出贡献的原因、有多少工作量以及谁同时也参与进来了等等。
@ -48,7 +48,7 @@
让其他成员参与到认可的过程中也是一个很好的主意。一旦社区达到了一定的规模,便很难事无巨细地知晓一切细节。如果引入一个成员提名机制则会很好地让大家注意到优秀的贡献。如果你的社区拥有十分正式的奖项,例如在年度会议或聚会上颁发的奖项,请让社区成员参与提名和投票。这不仅提供了成员参与进来的平台,也令这些来自成员投票的奖项更有意义。
最后给予认同和感谢也是一个认识成员并加深了解的重要机会。有时候颁奖仿佛在进行交易:“你做了X所以我们给你颁发了Y”。多在介绍成员上花些时间,将令成员感到更受重视并加强归属感。
最后给予认同和感谢也是一个认识成员并加深了解的重要机会。有时候颁奖仿佛在进行交易:“你做了某件事,所以我们给你颁发了某个奖励”。多在介绍成员上花些时间,将令成员感到更受重视并加强归属感。
### 社区认可令社区更为健康
@ -61,7 +61,7 @@ via: https://opensource.com/article/22/5/inclusive-community-recognition
作者:[Ray Paik][a]
选题:[lkxed][b]
译者:[PeterPan0106](https://github.com/PeterPan0106)
校对:[校对者ID](https://github.com/校对者ID)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出

View File

@ -0,0 +1,87 @@
[#]: subject: "Experiment with containers and pods on your own computer"
[#]: via: "https://opensource.com/article/22/5/containers-pods-101-ebook"
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14591-1.html"
在自己的电脑上实验容器和荚
======
> 通过这篇新的可下载指南开始探索容器技术的要领。
![](https://img.linux.net.cn/data/attachment/album/202205/14/102808n8u3pkff174431v7.jpg)
在电视剧 《<ruby>太空堡垒卡拉狄加<rt>Battlestar Galactica</rt></ruby>》中,这艘名副其实的巨型飞船其实并没有做什么。它是船员们坚定的庇护所,是战略和协调的中心联络点,也是资源管理的安全场所。而 <ruby>卡布里安毒蛇号<rt>Caprican Vipers</rt></ruby> 这种单人的独立太空船,出去对付邪恶的<ruby>赛昂人<rt>Cylons</rt></ruby>和其他太空中的危险。他们也从不只派一两艘毒蛇号出去。他们派了很多。这许许多多的冗余的飞船具有基本相同的能力和目的,但由于它们非常灵活和数量众多,它们总是能够处理每个星期都在威胁战星的任何问题。
如果你认为你感到这像是一个正在发展中的比喻,那么你是对的。现代的“云”大而无当,是分布在很远距离的大量基础设施的集合体。它具有强大的能力,但如果你将其视为普通计算机,就会浪费了它的大部分能力。当你想要处理来自数百万个输入源的大量数据时,把你的解决方案(无论它是采用应用、网站、数据库、服务器还是其他形式)打包起来,并发送该解决方案的微小镜像来处理数据集群,实际上是更有效的。当然,这些都是 “<ruby>容器<rt>container</rt></ruby>”,它们是云的劳动力。它们是你发送来处理服务请求的小型解决方案工厂,并且由于你可以根据任何给定时间传入的请求生成所需要的数量,因此理论上它们是取之不尽的。
### 在家里使用容器
如果你没有大量的传入请求需要处理,你可能会想知道容器给你带来什么好处。不过,在个人电脑上使用容器确实有其用途。
#### 容器作为虚拟环境
通过 Podman、LXC 和 Docker 等工具,你可以像以往运行虚拟机一样运行容器。不过,与虚拟机不同,容器没有因模拟固件和硬件而产生的开销。
你可以从公共仓库下载容器镜像,启动一个最小化的 Linux 环境,并将其作为命令或开发的测试场所。例如,假设你想试试你在 Slackware Linux 上构建的一个应用。首先,在仓库中搜索一个合适的镜像:
```
$ podman search slackware
```
然后选择一个镜像,作为你的容器的基础:
```
$ podman run -it --name slackware vbatts/slackware
sh-4.3# grep -i ^NAME\= /etc/os-release
NAME=Slackware
```
### 在工作中使用容器
当然,容器不只是个精简的虚拟机。它们可以是针对为非常具体的需求提供的特定解决方案。如果你不熟悉容器,那么新系统管理员最常见的入门仪式之一可能会有所帮助:启动你的第一个 Web 服务器,但是在容器中。
首先,获取一个镜像。你可以使用 `podman search` 命令来搜索你喜欢的发行版,或者直接搜索你喜欢的 httpd 服务器。当使用容器时,我倾向于信任我在裸机上使用的相同发行版。
当你你找到一个镜像作为你的容器的基础,你就可以运行你的镜像。然而,正如这个术语所暗示的,容器是*封起来的*,所以如果你只是启动一个容器,你将无法访问标准的 HTTP 端口。你可以使用 `-p` 选项将一个容器端口映射到一个标准的网络端口:
```
$ podman run -it -p 8080:80 docker.io/fedora/apache:latest
```
现在看看你本地主机上的 8080 端口:
```
$ curl localhost:8080
Apache
```
成功了。
### 了解更多
容器拥有比模仿虚拟机更多的潜力。你可以将它们分组在 “<ruby><rt>pod<rt></ruby>” 中,构建复杂应用的自动部署,启动冗余服务以满足高需求等等。如果你刚刚开始使用容器,你可以 [下载我们最新的电子书][2] 来学习该技术,甚至学习创建一个 “<ruby><rt>pod<rt></ruby>”,以便你可以运行 WordPress 和数据库。
> **[下载我们最新的电子书][2]**
LCTT 译注:容器环境中使用的 “Pod” 一词,我以前根据容器相关术语多用航海领域名词比喻来将其译做“吊舱”,但也有同学表示了不同意见。根据 Kubernetes [文档][3],这个词来自对<ruby>鲸鱼荚<rt>pod of whales</rt></ruby><ruby>豌豆荚<rt>pea pod</rt></ruby>的比喻,所以我觉得采用“荚”的翻译比较合适。—— wxy
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/5/containers-pods-101-ebook
作者:[Seth Kenlon][a]
选题:[lkxed][b]
译者:[geekpi](https://github.com/geekpi)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/seth
[b]: https://github.com/lkxed
[1]: https://opensource.com/sites/default/files/lead-images/tips_map_guide_ebook_help_troubleshooting_lightbulb_520.png
[2]: https://opensource.com/downloads/containers-pods-101-ebook
[3]: https://kubernetes.io/docs/concepts/workloads/pods/#:~:text=A%20Pod%20\(as%20in%20a,run%20in%20a%20shared%20context.

View File

@ -2,7 +2,7 @@
[#]: via: "https://twobithistory.org/2019/01/31/simula.html"
[#]: author: "Two-Bit History https://twobithistory.org"
[#]: collector: "lujun9972"
[#]: translator: " "
[#]: translator: "aREversez"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
@ -187,7 +187,7 @@ via: https://twobithistory.org/2019/01/31/simula.html
作者:[Two-Bit History][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
译者:[aREversez](https://github.com/aREversez)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出

View File

@ -0,0 +1,164 @@
[#]: subject: "Fedora Media Writer: World-Class LIVE USB Creator [Tutorial]"
[#]: via: "https://www.debugpoint.com/2022/05/fedora-media-writer/"
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lujun9972"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Fedora Media Writer: World-Class LIVE USB Creator [Tutorial]
======
A TUTORIAL ON INSTALLING AND USING FEDORA MEDIA WRITER TO CREATE LIVE
USB FROM LINUX & WINDOWS.
![Fedora Media Writer][1]
### Fedora Media Writer
The community and Fedora Linux team develop and maintain the [Fedora Media Writer app][2]. This application writes any ISO image to your flash drive (USB stick). In addition, Fedora Media Writer also has features to download the ISO file directly from the Fedora Mirrors, provided you have a stable internet connection.
Moreover, it gives you a list of options for download such as Official Editions, Emerging Editions, Spins and Fedora Labs images.
Not only that, but you can also use this nifty utility to write any other ISO images to your flash drive. It need not be the Fedora ISO always.
Although there are other popular utilities available for creating LIVE USBs, such as [Etcher][3], Ventoy, and Rufus you can still give this utility a try, considering the team develops it from mainstream Fedora Linux with contributors.
So, in summary, here are quick feature highlights of Fedora Media Writer.
#### Features Summary of Fedora Media Writer
* Available for Linux, Windows and macOS
* Directly download + write the images to a USB flash drive
* Official Editions (Workstation, IoT, Server) download
* Emerging Editions (Silverblue, Kinoite) download
* Spins (KDE Plasma, Xfce, etc)
* Labs (Fedora Astronomy, Robotic and other flavours)
* Available as Flatpak for Linux Distros
* Also, can write any other ISO images (non-Fedora) to a USB stick.
* Ability to format USB stick, restore flash drive
* Based on Qt
### How to Install
#### Linux
Fedora Media Writer is available as Flatpak for Linux Distributions. To install it in any Linux (such as Fedora, Ubuntu, or Linux Mint) [set up Flatpak by following this guide][4].
Then, click on the below link to install. This will launch the official Software application of your Linux Distro (such as Discover, GNOME Software). After installation, you can launch it via Application Menu.
[Install Fedora Media Writer as Flatpak][5]
#### Windows
If you are a Windows user and planning to migrate to Linux (or Fedora), it is a perfect tool. You need to download the exe installer from GitHub (link below) and follow the onscreen instruction for installation.
[Latest Installer for Windows (exe)][6]
After installation, you can launch it from Start Menu.
For macOS, you can get the dmg file in the above link.
### How to use Fedora Media Writer to Create LIVE USB in Linux
The first screen gives you two main options. The automatic download option is for downloading the ISO images on the fly. And the second option is to write the already downloaded ISO files from your disk directly.
If you have already plugged in the USB, you should see it as the third option. The third option is to format and delete all the data from your USB stick and restore it to its factory settings.
Furthermore, you can use this utility for just formatting your USB flash drive as well. You do not need any command or anything fancy. A point to note is that this option is only visible when your USB stick has data. If its already formatted, the tool can detect it and wont show you the option to restore it!! 😲
#### Automatic Download and Write
![First Screen][1]
The automatic Download option gives you the following screen to download any Fedora ISO you want from mirrors. This is useful for many because it eliminates the hassles of separately downloading ISO files, verifying checksum, etc.
![The automatic download options give you these options][1]
After choosing the distribution, the final screen gives you the option for version (Fedora 36, 35, etc.) and architecture (x86, ARM, etc.). Also, you should see the USB destination. Click on Download and Write to start the process.
![The final Write screen][1]
#### Write an existing ISO file from the disk.
When you choose the select iso file option, you can select the file from your system. After that, select the destination USB drive and click Write to start the process.
![Direct ISO write][1]
![Writing is in progress][1]
![Writing Complete][1]
After the write operation is finished, you can see a confirmation message shown above. It took standard time to write a 3GB~ ISO during my test, around 3 to 4 minutes.
### Using Fedora Media Writer to Create LIVE USB in Windows, macOS
The steps are the same to use this utility in Windows and macOS, as shown above for Linux. You can easily find the shortcuts after installation and launch in the same way.
![Running in Windows 11][1]
### Closing Notes
I hope this guide helps you use Fedora Media Writer for your day to day USB writing work. Also, the good thing about this utility is that you can use it for formatting/restoring your USB stick. You do not require GParted or GNOME Disks anymore.
Its such a terrific utility for Linux, Windows and macOS users.
Cheers.
* * *
We bring the latest tech, software news and stuff that matters. Stay in touch via [Telegram][7], [Twitter][8], [YouTube][9], and [Facebook][10] and never miss an update!
#### Share this:
* [Twitter][11]
* [Facebook][12]
* [Print][13]
* [LinkedIn][14]
* [Reddit][15]
* [Telegram][16]
* [WhatsApp][17]
* [Email][18]
*
--------------------------------------------------------------------------------
via: https://www.debugpoint.com/2022/05/fedora-media-writer/
作者:[Arindam][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://www.debugpoint.com/author/admin1/
[b]: https://github.com/lujun9972
[1]: data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7
[2]: https://github.com/FedoraQt/MediaWriter
[3]: https://www.debugpoint.com/2021/01/etcher-bootable-usb-linux/
[4]: https://flatpak.org/setup/
[5]: https://dl.flathub.org/repo/appstream/org.fedoraproject.MediaWriter.flatpakref
[6]: https://github.com/FedoraQt/MediaWriter/releases/latest
[7]: https://t.me/debugpoint
[8]: https://twitter.com/DebugPoint
[9]: https://www.youtube.com/c/debugpoint?sub_confirmation=1
[10]: https://facebook.com/DebugPoint
[11]: https://www.debugpoint.com/2022/05/fedora-media-writer/?share=twitter (Click to share on Twitter)
[12]: https://www.debugpoint.com/2022/05/fedora-media-writer/?share=facebook (Click to share on Facebook)
[13]: tmp.hzW8xj7tdm#print (Click to print)
[14]: https://www.debugpoint.com/2022/05/fedora-media-writer/?share=linkedin (Click to share on LinkedIn)
[15]: https://www.debugpoint.com/2022/05/fedora-media-writer/?share=reddit (Click to share on Reddit)
[16]: https://www.debugpoint.com/2022/05/fedora-media-writer/?share=telegram (Click to share on Telegram)
[17]: https://www.debugpoint.com/2022/05/fedora-media-writer/?share=jetpack-whatsapp (Click to share on WhatsApp)
[18]: https://www.debugpoint.com/2022/05/fedora-media-writer/?share=email (Click to email this to a friend)

View File

@ -2,7 +2,7 @@
[#]: via: "https://opensource.com/article/22/5/use-sudo-linux"
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: translator: "MjSeven"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "

View File

@ -0,0 +1,120 @@
[#]: subject: "sqlite-utils: a nice way to import data into SQLite for analysis"
[#]: via: "https://jvns.ca/blog/2022/05/12/sqlite-utils--a-nice-way-to-import-data-into-sqlite/"
[#]: author: "Julia Evans https://jvns.ca/"
[#]: collector: "lujun9972"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
sqlite-utils: a nice way to import data into SQLite for analysis
======
Hello! This is a quick post about a nice tool I found recently called [sqlite-utils][1], from the [tools category][2].
Recently I wanted to do some basic data analysis using data from my Shopify store. So I figured Id query the Shopify API and import my data into SQLite, and then I could make queries to get the graphs I want.
But this seemed like a lot of boring work, like Id have to write a schema and write a Python program. So I hunted around for a solution, and I found `sqlite-utils`, a tool designed to make it easy to import arbitrary data into SQLite to do data analysis on the data.
### sqlite-utils automatically generates a schema
The Shopify data has about a billion fields and I really did not want to type out a schema for it. `sqlite-utils` solves this problem: if I have an array of JSON orders, I can create a new SQLite table with that data in it like this:
```
import sqlite_utils
orders = ... # (some code to get the `orders` array here)
db = sqlite_utils.Database('orders.db')
db['shopify_orders'].insert_all(orders)
```
### you can alter the schema if there are new fields (with `alter`)
Next, I ran into a problem where on the 5th page of downloads, the JSON contained a new field that I hadnt seen before.
Luckily, `sqlite-utils` thought of that: theres an `alter` flag which will update the tables schema to include the new fields. ```
Heres what the code for that looks like
```
db['shopify_orders'].insert_all(orders, alter=True)
```
### you can deduplicate existing rows (with `upsert`)
Next I ran into a problem where sometimes when doing a sync, Id download data from the API where some of it was new and some wasnt.
So I wanted to do an “upsert” where it only created new rows if the item didnt already exist. `sqlite-utils` also thought of this, and theres an `upsert` method.
For this to work you have to specify the primary key. For me that was `pk="id"`. Heres what my final code looks like:
```
db['shopify_orders'].upsert_all(
orders,
pk="id",
alter=True
)
```
### theres also a command line tool
Ive talked about using `sqlite-utils` as a library so far, but theres also a command line tool which is really useful.
For example, this inserts the data from a `plants.csv` into a `plants` table:
```
sqlite-utils insert plants.db plants plants.csv --csv
```
### format conversions
I havent tried this yet, but heres a cool example from the help docs of how you can do format conversions, like converting a string to a float:
```
sqlite-utils insert plants.db plants plants.csv --csv --convert '
return {
"name": row["name"].upper(),
"latitude": float(row["latitude"]),
"longitude": float(row["longitude"]),
}'
```
This seems really useful for CSVs, where by default itll often interpret numeric data as strings if you dont do this conversions.
### metabase seems nice too
Once I had all the data in SQLite, I needed a way to draw graphs with it. I wanted some dashboards, so I ended up using [Metabase][3], an open source business intelligence tool. I found it very straightforward and it seems like a really easy way to turn SQL queries into graphs.
This whole setup (sqlite-utils + metabase + SQL) feels a lot easier to use than my previous setup, where I had a custom Flask website that used plotly and pandas to draw graphs.
### thats all!
I was really delighted by `sqlite-utils`, it was super easy to use and it did everything I wanted.
--------------------------------------------------------------------------------
via: https://jvns.ca/blog/2022/05/12/sqlite-utils--a-nice-way-to-import-data-into-sqlite/
作者:[Julia Evans][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://jvns.ca/
[b]: https://github.com/lujun9972
[1]: https://sqlite-utils.datasette.io
[2]: https://jvns.ca/#cool-computer-tools---features---ideas
[3]: https://www.metabase.com/

View File

@ -1,83 +0,0 @@
[#]: subject: "Experiment with containers and pods on your own computer"
[#]: via: "https://opensource.com/article/22/5/containers-pods-101-ebook"
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
在自己的电脑上实验容器和 pod
======
通过这个新的可下载指南开始探索容器技术的要领。
![Looking at a map][1]
图片由opensource.com
在电视剧 *Battlestar Galactica* (太空堡垒卡拉狄加)中,这艘名副其实的巨型飞船并没有做什么。它是船员们坚守的庇护所,是战略和协调的中心联络点,也是资源管理的安全场所。然而,卡布里安毒蛇号,一个人的独立太空船,出去对付邪恶的赛昂人和其他太空中的危险。他们也从不只派一两艘毒蛇号出去。他们派了很多。许多冗余的飞船具有基本相同的能力和目的,但由于它们非常灵活和数量众多,它们总是能够处理每周威胁战星的任何问题。
如果你认为你正在感知一个发展中的类比,那么你是对的。 现代“云”又大又笨重,是分布在很远距离的大量基础设施的融合。它具有强大的功能,但如果你将其视为普通计算机,你将浪费它的大部分功能。当你想要处理来自数百万输入源的大量数据时,捆绑你的解决方案(无论是采用应用、网站、数据库、服务器还是其他形式)并发送该解决方案的微小镜像来处理数据集群,实际上是更有效的。当然,这些将是*容器*,它们是云的劳动力。它们是你发送来处理服务请求的小型解决方案工厂,并且由于你可以根据任何给定时间传入的请求生成任意数量的解决方案,因此理论上它们是取之不尽的。
### 家中的容器
如果你没有大量的传入请求需要处理,你可能会想知道容器给你带来什么好处。不过,在个人电脑上使用容器确实有其用途。
#### 容器作为虚拟环境
通过 Podman、LXC 和 Docker 等工具,你可以像以往运行虚拟机一样运行容器。不过,与虚拟机不同,容器不需要模拟固件和硬件的开销。
你可以从公共仓库下载容器镜像,启动一个最小化的 Linux 环境,并将其作为命令或开发的测试场所。例如,假设你想试试你在 Slackware Linux 上构建的一个应用。首先,在仓库中搜索一个合适的镜像:
```
$ podman search slackware
```
然后选择一个镜像,作为你的容器的基础:
```
$ podman run -it --name slackware vbatts/slackware
sh-4.3# grep -i ^NAME\= /etc/os-release
NAME=Slackware
```
### 工作中的容器
当然,容器不只是最小的虚拟机。他们可以为非常具体的需求提供高度具体的解决方案。如果你不熟悉容器,那么对任何新系统管理员最常见的通过仪式之一开始可能会有所帮助:在容器中启动你的第一个 Web 服务器。
首先,获得一个镜像。你可以使用 `podman search` 命令来搜索你喜欢的发行版,或者直接搜索你喜欢的 httpd 服务器。当使用容器时,我倾向于信任我在裸机上信任的相同发行版。
当你你找到一个镜像作为你的容器的基础,你就可以运行你的镜像。然而,正如这个术语所暗示的,容器是*被容器化的*,所以如果你只是启动一个容器,你将无法访问标准的 HTTP 端口。你可以使用 `-p` 选项将一个容器端口映射到一个标准的网络端口:
```
$ podman run -it -p 8080:80 docker.io/fedora/apache:latest
```
现在看看你本地主机上的 8080 端口:
```
$ curl localhost:8080
Apache
```
成功了。
### 了解更多
容器拥有比模仿虚拟机更多的潜力。你可以将它们分组在 pod 中,构建复杂应用的自动部署,启动冗余服务以满足高需求等等。如果你刚刚开始使用容器,你可以[下载我们最新的电子书][2]来学习该技术,甚至学习创建一个 pod以便你可以运行 WordPress 和数据库。
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/5/containers-pods-101-ebook
作者:[Seth Kenlon][a]
选题:[lkxed][b]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/seth
[b]: https://github.com/lkxed
[1]: https://opensource.com/sites/default/files/lead-images/tips_map_guide_ebook_help_troubleshooting_lightbulb_520.png
[2]: https://opensource.com/downloads/containers-pods-101-ebook