mirror of
https://github.com/LCTT/TranslateProject.git
synced 2024-12-23 21:20:42 +08:00
translated
This commit is contained in:
parent
c81f6acedd
commit
8ca6574321
@ -1,85 +0,0 @@
|
||||
[#]: subject: (5 reasons to host your container registry with Pulp)
|
||||
[#]: via: (https://opensource.com/article/21/5/container-management-pulp)
|
||||
[#]: author: (Melanie Corr https://opensource.com/users/melanie-corr)
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
||||
5 reasons to host your container registry with Pulp
|
||||
======
|
||||
There are many compelling arguments for hosting your own container
|
||||
registry with Pulp. Here are some of them.
|
||||
![Containers for shipping overseas][1]
|
||||
|
||||
Linux containers have greatly simplified software distribution. The ability to package an application with everything it needs to run has helped increase stability and reproducibility of environments.
|
||||
|
||||
While there are many public registries where you can upload, manage, and distribute container images, there are many compelling arguments in favor of hosting your own container registry. Let's take a look at the reasons why self-hosting makes sense, and how [Pulp][2], a free and open source project, can help you manage and distribute containers in an on-premises environment.
|
||||
|
||||
### Why host your own container registry
|
||||
|
||||
There are a number of reasons why you might consider hosting your own container registry:
|
||||
|
||||
* **Size:** Some container images are quite large. If you have multiple teams downloading the same image, it can take a significant amount of time and put pressure on both your network and your budget.
|
||||
* **Bandwidth:** If you work in an area of limited bandwidth or in an organization that restricts access to the internet for security reasons, you need a reliable way of managing the containers you work with.
|
||||
* **Money:** Terms of service can change. External container registries can introduce or increase rate-limit thresholds that can become prohibitively restrictive to your operation.
|
||||
* **Stability:** Container images hosted on an external source can disappear from one day to the next for a number of reasons. Something as small as an update for a container image you rely on can introduce breaking changes that you want to avoid.
|
||||
* **Privacy:** You might also want to develop and distribute containers that you don't want to host in a public, third-party registry.
|
||||
|
||||
|
||||
|
||||
### Self-hosting with Pulp
|
||||
|
||||
Using Pulp, you can avoid these problems and take full control of your containers.
|
||||
|
||||
#### 1\. Avoid rate limits
|
||||
|
||||
Creating a local cache of container images in Pulp allows everyone in your organization to pull the container images hosted on Pulp rather than from an external registry. This means you can avoid rate limits and synchronize from an external registry only when you need something new. Whenever you do need to sync containers from an external registry, Pulp first checks if the content already exists before initiating the synchronization from the remote registry. If you are subject to registry rate limits, you're mirroring only the content you need and then distributing it throughout your organization using Pulp.
|
||||
|
||||
#### 2\. Curate your containers
|
||||
|
||||
With Pulp, you can create a repository, then mirror and synchronize containers from any registry that is Docker Registry HTTP API V2-compatible. This includes Docker, Google Container registry, Quay.io, and many more, including another Pulp server. There are no limits or restrictions to the way you combine containers that you mirror from different registries. You are free to blend containers from different sources. This allows you to curate a set of public and private containers to suit your exact requirements.
|
||||
|
||||
#### 3\. Experiment without risk
|
||||
|
||||
In Pulp, every time you make a change to the repository, a new immutable version is created. You can create multiple versions of a repository, for example, _development, test, stage_, and _production_, and promote containers across them. You are free to sync the latest updates to a container image from an external registry to Pulp, then make the latest changes consumable to a development or other environment. You can make any changes to the repositories you deem necessary, and promote the container content to be consumed by a test team or other environment. If something goes wrong, you can roll back to an earlier version.
|
||||
|
||||
#### 4\. Sync only the content you need
|
||||
|
||||
If you want to use Pulp to create a local cache of a subset of containers rather than a full container registry, you can filter a selection of containers from a remote source. With Pulp, there are multiple content synchronization options so that you store only the content you need or configure your deployment to cache content on demand.
|
||||
|
||||
#### 5\. Work with disconnected and air-gapped environments
|
||||
|
||||
If you work in a disconnected or restricted environment, you can sync updates from a connected Pulp instance to your disconnected Pulp. Currently, there are plans to implement a native air-gapped feature for Pulp to facilitate a fully disconnected workflow. In the meantime, as a workaround, you can use a tool such as [Skopeo][3] to download container images you need and then push them to your disconnected Pulp container registry.
|
||||
|
||||
#### And much more!
|
||||
|
||||
With Pulp, you can also build containers from containerfiles, push private containers to repositories, and distribute those containers throughout your organization. We will take a look at this workflow in a future article.
|
||||
|
||||
### How to get started
|
||||
|
||||
If you're interested in self-hosting your container registry, you can [install Pulp][4] today. The installation process has been heavily automated and streamlined with the addition of a Pulp Ansible installer.
|
||||
|
||||
Pulp has a plugin-based architecture. When you install Pulp, select the Container plugin and whatever other type of content plugin you want to manage. If you would prefer to take Pulp for a test drive, you can evaluate a containerized version of Pulp today.
|
||||
|
||||
If you have any questions or comments, feel free to reach out to us on the #pulp channel on Freenode IRC, and we're happy to take questions on our mailing list, [pulp-list@redhat.com][5].
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/5/container-management-pulp
|
||||
|
||||
作者:[Melanie Corr][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/melanie-corr
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/containers_2015-2-osdc-lead.png?itok=kAfHrBoy (Containers for shipping overseas)
|
||||
[2]: https://pulpproject.org/
|
||||
[3]: https://github.com/containers/skopeo
|
||||
[4]: https://pulpproject.org/installation-introduction/
|
||||
[5]: mailto:pulp-list@redhat.com
|
@ -0,0 +1,84 @@
|
||||
[#]: subject: (5 reasons to host your container registry with Pulp)
|
||||
[#]: via: (https://opensource.com/article/21/5/container-management-pulp)
|
||||
[#]: author: (Melanie Corr https://opensource.com/users/melanie-corr)
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
||||
用 Pulp 托管你的容器注册中心的5个理由
|
||||
======
|
||||
有很多令人信服的理由来用 Pulp 来托管你自己的容器注册中心。下面是其中的一些。
|
||||
![Containers for shipping overseas][1]
|
||||
|
||||
Linux 容器极大地简化了软件发布。将一个应用程序与它运行所需的一切打包的能力有助于提高环境的稳定性和可重复性。
|
||||
|
||||
虽然有许多公共注册中心可以上传、管理和分发容器镜像,但有许多令人信服的论据支持托管自己的容器注册中心。让我们来看看为什么自我托管是有意义的,以及 [Pulp][2],一个免费的开源项目,如何帮助你在企业内部环境中管理和分发容器。
|
||||
|
||||
### 为什么要托管你自己的容器注册中心
|
||||
|
||||
你可以考虑托管自己的容器注册中心,原因有很多:
|
||||
|
||||
* **体积:**一些容器镜像是相当大的。如果你有多个团队下载同一个镜像,这可能需要大量的时间,并给你的网络和预算带来压力。
|
||||
* **带宽:**如果你在一个带宽有限的地区工作,或在一个出于安全原因限制访问互联网的组织中工作,你需要一个可靠的方法来管理你工作的容器。
|
||||
* **金钱:**服务条款可以改变。外部容器注册中心可以引入或增加速率限制阈值,这可能会对你的操作造成极大的限制。
|
||||
* **稳定性:**托管在外部资源上的容器镜像可能会因为一些原因消失几天。小到你所依赖的更新容器镜像,可能会导致你想要避免的重大更改。
|
||||
* **隐私:**你可能也想开发和分发容器,但你不想在公共的第三方注册中心托管。
|
||||
|
||||
|
||||
|
||||
### 使用 Pulp 进行自我托管
|
||||
|
||||
使用 Pulp,你可以避免这些问题并完全控制你的容器。
|
||||
|
||||
#### 1\. 避免速率限制
|
||||
|
||||
在 Pulp 中创建容器镜像的本地缓存,可以让你组织中的每个人都能拉取到 Pulp 上托管的容器镜像,而不是从外部注册中心拉取。这意味着你可以避免速率限制,只有当你需要新的东西时才从外部注册中心进行同步。当你确实需要从外部注册中心同步容器时,Pulp 首先检查内容是否已经存在,然后再从远程注册中心启动同步。如果你受到注册中心的速率限制,你就只镜像你需要的内容,然后用 Pulp 在整个组织中分发它。
|
||||
|
||||
#### 2\. 整理你的容器
|
||||
|
||||
使用 Pulp,你可以创建一个仓库,然后从任何与 Docker Registry HTTP API V2 兼容的注册中心镜像和同步容器。这包括 Docker、Google Container registry、Quay.io 等,也包括另一个 Pulp 服务器。对于你结合来自不同注册中心的镜像容器的方式,没有任何限制或约束。你可以自由地混合来自不同来源的容器。这允许你整理一套公共和私人容器,以满足你的确切要求。
|
||||
|
||||
#### 3\. 无风险的实验
|
||||
|
||||
在 Pulp 中,每当你对仓库进行修改时,就会创建一个新的不可变的版本。你可以创建多个版本的仓库,例如,_开发、测试、预上线和生产_,并在它们之间推广容器。你可以自由地将容器镜像的最新更新从外部注册中心同步到 Pulp,然后让最新的变化在开发或其他环境中可用。你可以对你认为必要的仓库进行任何修改,并促进容器内容被测试团队或其他环境使用。如果出了问题,你可以回滚到早期版本。
|
||||
|
||||
#### 4\. 只同步你需要的内容
|
||||
|
||||
如果你想使用 Pulp 来创建一个容器子集的本地缓存,而不是一个完整的容器注册中心,你可以从一个远程源过滤选择容器。使用 Pulp,有多种内容同步选项,以便你只存储你需要的内容,或配置你的部署,按需缓存内容。
|
||||
|
||||
#### 5\. 在断连和 air-gap 的环境中工作
|
||||
|
||||
如果你在一个断连或受限制的环境中工作,你可以从一个连接的 Pulp 实例中同步更新到你断连的 Pulp。目前,有计划为 Pulp 实现一个原生的 air-gap 功能,以促进完全断连的工作流程。同时,作为一种变通方法,你可以使用 [Skopeo][3] 等工具来下载你需要的容器镜像,然后将它们推送到你断连的 Pulp 容器注册中心。
|
||||
|
||||
#### 还有更多!
|
||||
|
||||
通过 Pulp,你还可以从容器文件中构建容器,将私有容器推送到仓库,并在整个组织中分发这些容器。我们将在未来的文章中对这个工作流程进行介绍。
|
||||
|
||||
### 如何开始
|
||||
|
||||
如果你对自我托管你的容器注册中心感兴趣,你今天就可以[安装 Pulp][4]。随着 Pulp Ansible 安装程序的加入,安装过程已经被大量自动化和简化了。
|
||||
|
||||
Pulp 有一个基于插件的架构。当你安装 Pulp 时,选择容器插件和其他任何你想管理的内容插件类型。如果你想测试一下 Pulp,你今天就可以评估 Pulp 的容器化版本。
|
||||
|
||||
如果你有任何问题或意见,请随时在 Freenode IRC 的 #pulp 频道与我们联系,我们也很乐意在我们的邮件列表 [pulp-list@redhat.com][5] 中接受问题。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/5/container-management-pulp
|
||||
|
||||
作者:[Melanie Corr][a]
|
||||
选题:[lujun9972][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/melanie-corr
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/containers_2015-2-osdc-lead.png?itok=kAfHrBoy (Containers for shipping overseas)
|
||||
[2]: https://pulpproject.org/
|
||||
[3]: https://github.com/containers/skopeo
|
||||
[4]: https://pulpproject.org/installation-introduction/
|
||||
[5]: mailto:pulp-list@redhat.com
|
Loading…
Reference in New Issue
Block a user