From 12f34152246058353501f0b47bf0db59bb79bfb1 Mon Sep 17 00:00:00 2001 From: rieonke Date: Wed, 2 Aug 2017 23:49:59 +0800 Subject: [PATCH 001/125] translated --- ...at You Think You Know is Probably Wrong.md | 143 ------------------ ...at You Think You Know is Probably Wrong.md | 143 ++++++++++++++++++ 2 files changed, 143 insertions(+), 143 deletions(-) delete mode 100644 sources/tech/20170731 Docker vs. Kubernetes vs. Apache Mesos Why What You Think You Know is Probably Wrong.md create mode 100644 translated/tech/20170731 Docker vs. Kubernetes vs. Apache Mesos Why What You Think You Know is Probably Wrong.md diff --git a/sources/tech/20170731 Docker vs. Kubernetes vs. Apache Mesos Why What You Think You Know is Probably Wrong.md b/sources/tech/20170731 Docker vs. Kubernetes vs. Apache Mesos Why What You Think You Know is Probably Wrong.md deleted file mode 100644 index 000e6a46ce..0000000000 --- a/sources/tech/20170731 Docker vs. Kubernetes vs. Apache Mesos Why What You Think You Know is Probably Wrong.md +++ /dev/null @@ -1,143 +0,0 @@ -> translating by rieonke -Docker vs. Kubernetes vs. Apache Mesos: Why What You Think You Know is Probably Wrong -============================================================ - - -There are countless articles, discussions, and lots of social chatter comparing Docker, Kubernetes, and Mesos. If you listen to the partially-informed, you’d think that the three open source projects are in a fight-to-the death for container supremacy. You’d also believe that picking one over the other is almost a religious choice; with true believers espousing their faith and burning heretics who would dare to consider an alternative. - -That’s all bunk. - -While all three technologies make it possible to use containers to deploy, manage, and scale applications, in reality they each solve for different things and are rooted in very different contexts. In fact, none of these three widely adopted toolchains is completely like the others. - -Instead of comparing the overlapping features of these fast-evolving technologies, let’s revisit each project’s original mission, architectures, and how they can complement and interact with each other. - -### Let’s start with Docker… - -Docker Inc., today started as a Platform-as-a-Service startup named dotCloud. The dotCloud team found that managing dependencies and binaries across many applications and customers required significant effort. So they combined some of the capabilities of Linux [cgroups][1] and namespaces into a single and easy to use package so that applications can consistently run on any infrastructure. This package is [the Docker image][2], which provides the following capabilities: - -* Packages the application and the libraries in a single package (the Docker Image), so applications can consistently be deployed across many environments; - -* Provides Git-like semantics, such as “docker push”, “docker commit” to make it easy for application developers to quickly adopt the new technology and incorporate it in their existing workflows; - -* Define Docker images as immutable layers, enabling immutable infrastructure. Committed changes are stored as an individual read-only layers, making it easy to re-use images and track changes. Layers also save disk space and network traffic by only transporting the updates instead of entire images; - -* Run Docker containers by instantiating the immutable image with a writable layer that can temporarily store runtime changes, making it easy to deploy and scale multiple instances of the applications quickly. - -Docker grew in popularity, and developers started to move from running containers on their laptops to running them in production. Additional tooling was needed to coordinate these containers across multiple machines, known as container orchestration. Interestingly, one of the first container orchestrators that supported Docker images (June 2014) was [Marathon][3] on Apache Mesos (which we’ll describe in more detail below). That year, Solomon Hykes, founder and CTO of Docker, recommended Mesos as “[the gold standard for production clusters][4]”. Soon after, many container orchestration technologies in addition to Marathon on Mesos emerged: [Nomad][5], [Kubernetes][6] and, not surprisingly, Docker Swarm ([now part of Docker Engine][7]). - -As Docker moved to commercialize the open source file format, the company also started introducing tools to complement the core Docker file format and runtime engine, including: - -* Docker hub for public storage of Docker images; - -* Docker registry for storing it on-premise; - -* Docker cloud, a managed service for building and running containers; - -* Docker datacenter as a commercial offering embodying many Docker technologies. - -![Docker](https://mesosphere.com/wp-content/uploads/2017/07/docker-host.png) - -Source: www.docker.com. - -Docker’s insight to encapsulate software and its dependencies in a single package have been a game changer for the software industry; the same way mp3’s helped to reshape the music industry. The Docker file format became the industry standard, and leading container technology vendors (including Docker, Google, Pivotal, Mesosphere and many others) formed the [Cloud Native Computing Foundation (CNCF)][8] and [Open Container Initiative (OCI)][9]. Today, CNCF and OCI aim to ensure interoperability and standardized interfaces across container technologies and ensure that any Docker container, built using any tools, can run on any runtime or infrastructure. - -### Enter Kubernetes - -Google recognized the potential of the Docker image early on and sought to deliver container orchestration “as-a-service” on the Google Cloud Platform. Google had tremendous experience with containers (they introduced cgroups in Linux) but existing internal container and distributed computing tools like Borg were directly coupled to their infrastructure. So, instead of using any code from their existing systems, Google designed Kubernetes from scratch to orchestrate Docker containers. Kubernetes was released in February 2015 with the following goals and considerations: - -* Empower application developers with a powerful tool for Docker container orchestration without having to interact with the underlying infrastructure; - -* Provide standard deployment interface and primitives for a consistent app deployment experience and APIs across clouds; - -* Build on a Modular API core that allows vendors to integrate systems around the core Kubernetes technology. - -By March 2016, Google [donated Kubernetes][10] to CNCF, and remains today the lead contributor to the project (followed by Redhat, CoreOS and others). - -![Kubernetes](https://mesosphere.com/wp-content/uploads/2017/07/kubernetes-architecture.png) - -Source: wikipedia - -Kubernetes was very attractive for application developers, as it reduced their dependency on infrastructure and operations teams. Vendors also liked Kubernetes because it provided an easy way to embrace the container movement and provide a commercial solution to the operational challenges of running your own Kubernetes deployment (which remains a non-trivial exercise). Kubernetes is also attractive because it is open source under the CNCF, in contrast to Docker Swarm which, though open source, is tightly controlled by Docker, Inc. - -Kubernetes’ core strength is providing application developers powerful tools for orchestrating stateless Docker containers. While there are multiple initiatives to expand the scope of the project to more workloads (like analytics and stateful data services), these initiatives are still in very early phases and it remains to be seen how successful they may be. - -### Apache Mesos - -Apache Mesos started as a UC Berkeley project to create a next-generation cluster manager, and apply the lessons learned from cloud-scale, distributed computing infrastructures such as [Google’s Borg][11] and [Facebook’s Tupperware][12]. While Borg and Tupperware had a monolithic architecture and were closed-source proprietary technologies tied to physical infrastructure, Mesos introduced a modular architecture, an open source development approach, and was designed to be completely independent from the underlying infrastructure. Mesos was quickly adopted by [Twitter][13], [Apple(Siri)][14], [Yelp][15], [Uber][16], [Netflix][17], and many leading technology companies to support everything from microservices, big data and real time analytics, to elastic scaling. - -As a cluster manager, Mesos was architected to solve for a very different set of challenges: - -* Abstract data center resources into a single pool to simplify resource allocation while providing a consistent application and operational experience across private or public clouds; - -* Colocate diverse workloads on the same infrastructure such analytics, stateless microservices, distributed data services and traditional apps to improve utilization and reduce cost and footprint; - -* Automate day-two operations for application-specific tasks such as deployment, self healing, scaling, and upgrades; providing a highly available fault tolerant infrastructure; - -* Provide evergreen extensibility to run new application and technologies without modifying the cluster manager or any of the existing applications built on top of it; - -* Elastically scale the application and the underlying infrastructure from a handful, to tens, to tens of thousands of nodes. - -Mesos has a unique ability to individually manage a diverse set of workloads — including traditional applications such as Java, stateless Docker microservices, batch jobs, real-time analytics, and stateful distributed data services. Mesos’ broad workload coverage comes from its two-level architecture, which enables “application-aware” scheduling. Application-aware scheduling is accomplished by encapsulating the application-specific operational logic in a “Mesos framework” (analogous to a runbook in operations). Mesos Master, the resource manager, then offers these frameworks fractions of the underlying infrastructure while maintaining isolation. This approach allows each workload to have its own purpose-built application scheduler that understands its specific operational requirements for deployment, scaling and upgrade. Application schedulers are also independently developed, managed and updated, allowing Mesos to be highly extensible and support new workloads or add more operational capabilities over time. - -![Mesos two-level scheduler](https://mesosphere.com/wp-content/uploads/2017/07/mesos-two-level-scheduler.png) - -Take, for example, how a team manages upgrades. Stateless application can benefit from a [“blue/green”][18] deployment approach; where another complete version of the app is spun up while the old one is still live, and traffic switches to the new app when ready and the old app is destroyed. But upgrading a data workload like HDFS or Cassandra requires taking the nodes offline one at a time, preserving local data volumes to avoid data loss, performing the upgrade in-place with a specific sequence, and executing special checks and commands on each node type before and after the upgrade. Any of these steps are app or service specific, and may even be version specific. This makes it incredibly challenging to manage data services with a conventional container orchestration scheduler. - -Mesos’ ability to manage each workload the way it wants to be treated has led many companies to use Mesos as a single unified platform to run a combination of microservices and data services together. A common reference architecture for running data-intensive applications is the “[SMACK stack][19]”. - -### A Moment of Clarity - -Notice that we haven’t said anything about container orchestration to describe Apache Mesos. So why do people automatically associate Mesos with container orchestration? Container orchestration is one example of a workload that can run on Mesos’ modular architecture, and it’s done using a specialized orchestration “framework” built on top of Mesos called Marathon. Marathon was originally developed to orchestrate app archives (like JARs, tarballs, ZIP files) in [cgroup][20]containers, and was one of the first container orchestrators to support Docker containers in 2014. - -So when people compare Docker and Kubernetes to Mesos, they are actually comparing Kubernetes and Docker Swarm to Marathon running on Mesos. - -Why does this matter? Because Mesos frankly doesn’t care what’s running on top of it. Mesos can elastically provide cluster services for Java application servers, Docker container orchestration, Jenkins CI Jobs, Apache Spark analytics, Apache Kafka streaming, and more on shared infrastructure. Mesos could even run Kubernetes or other container orchestrators, though a public integration is not yet available. - -![Mesos Workloads](https://mesosphere.com/wp-content/uploads/2017/07/mesos-workloads.png) - -Source: Apache Mesos Survey 2016 - -Another consideration for Mesos (and why it’s attractive for many enterprise architects) is its maturity in running mission critical workloads. Mesos has been in large scale production (tens of thousands of servers) for more than 7 years, which is why it’s known to be more production ready and reliable at scale than many other container-enabling technologies in the market. - -### What does this all mean? - -In summary, all three technologies have something to do with Docker containers and give you access to container orchestration for application portability and scale. So how do you choose between them? It comes down to choosing the right tool for the job (and perhaps even different ones for different jobs). If you are an application developer looking for a modern way to build and package your application, or to accelerate microservices initiatives, the Docker container format and developer tooling is the best way to do so. - -If you are a dev/devops team and want to build a system dedicated exclusively to Docker container orchestration, and are willing to get your hands dirty integrating your solution with the underlying infrastructure (or rely on public cloud infrastructure like Google Container Engine or Azure Container Service), Kubernetes is a good technology for you to consider. - -If you want to build a reliable platform that runs multiple mission critical workloads including Docker containers, legacy applications (e.g., Java), and distributed data services (e.g., Spark, Kafka, Cassandra, Elastic), and want all of this portable across cloud providers and/or datacenters, then Mesos (or our own Mesos distribution, Mesosphere DC/OS) is the right fit for you. - -Whatever you choose, you’ll be embracing a set of tools that makes more efficient use of server resources, simplifies application portability, and increases developer agility. You really can’t go wrong. - --------------------------------------------------------------------------------- - -via: https://mesosphere.com/blog/docker-vs-kubernetes-vs-apache-mesos/?from=timeline&isappinstalled=0&nsukey=b2Ig6wj1rvlgVuEZ8ens0KVLuxYx7zv7GLuL1KBpcSWpvkfF2nHcSqeKJ7JnP%2FckIM4vBaRUkwdlUpWHNzrY8va0G14sN323y7T7OEix0DZpQOUQ%2FeiRcA7wJWN3Rws4PVSSI0wapm%2Bl5jCf%2B%2Bbj5HioS%2B%2FOeeil79KMIFrgFjKRMRWwZvlbOyq4j4iaipOi - -作者:[Amr Abdelrazik ][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://mesosphere.com/blog/author/amr-abdelrazik/ -[1]:https://en.wikipedia.org/wiki/Cgroups -[2]:https://docs.docker.com/engine/docker-overview/ -[3]:https://mesosphere.github.io/marathon/ -[4]:https://www.google.com/url?q=https://www.youtube.com/watch?v=sGWQ8WiGN8Y&feature=youtu.be&t=35m10s&sa=D&ust=1500923856666000&usg=AFQjCNFLtW96ZWnOUGFPX_XUuVOPdWrd_w -[5]:https://www.nomadproject.io/ -[6]:http://kubernetes.io/ -[7]:https://blog.docker.com/2016/06/docker-1-12-built-in-orchestration/ -[8]:https://www.cncf.io/ -[9]:https://www.opencontainers.org/ -[10]:https://www.linuxfoundation.org/news-media/announcements/2016/03/cloud-native-computing-foundation-accepts-kubernetes-first-hosted-0 -[11]:https://research.google.com/pubs/pub43438.html -[12]:https://www.youtube.com/watch?v=C_WuUgTqgOc -[13]:https://youtu.be/F1-UEIG7u5g -[14]:http://www.businessinsider.com/apple-siri-uses-apache-mesos-2015-8 -[15]:https://engineeringblog.yelp.com/2015/11/introducing-paasta-an-open-platform-as-a-service.html -[16]:http://highscalability.com/blog/2016/9/28/how-uber-manages-a-million-writes-per-second-using-mesos-and.html -[17]:https://medium.com/netflix-techblog/distributed-resource-scheduling-with-apache-mesos-32bd9eb4ca38 -[18]:https://martinfowler.com/bliki/BlueGreenDeployment.html -[19]:https://mesosphere.com/blog/2017/06/21/smack-stack-new-lamp-stack/ -[20]:https://en.wikipedia.org/wiki/Cgroups -[21]:https://mesosphere.com/blog/author/amr-abdelrazik/ diff --git a/translated/tech/20170731 Docker vs. Kubernetes vs. Apache Mesos Why What You Think You Know is Probably Wrong.md b/translated/tech/20170731 Docker vs. Kubernetes vs. Apache Mesos Why What You Think You Know is Probably Wrong.md new file mode 100644 index 0000000000..7a5063b471 --- /dev/null +++ b/translated/tech/20170731 Docker vs. Kubernetes vs. Apache Mesos Why What You Think You Know is Probably Wrong.md @@ -0,0 +1,143 @@ +Docker vs. Kubernetes vs. Apache Mesos: 为什么你认为你知道的可能是错的 +============================================================ + +有无数的文章、讨论、以及很多社区喋喋不休地比较 Docker ,Kubernetes 和 Mesos。如果你只是听信了只言片语,你可能会认为这三个开源项目正为了称霸容器界而殊死搏斗。你还相信从他们中选出一个来几乎是一种宗教选择;真正的信徒忠于他们的信仰,烧死那些异教徒,谁还敢考虑一个替代的方案。 + +那都是废话。 + +虽然所有这三种技术都使得使用容器来部署、管理和伸缩应用成为可能,但实际上它们各自解决了不同的问题,并且根植于迥异的上下文环境中。事实上,这三种被广泛采用的工具,都是有差别的。 + +让我们重新审视每个项目的原始任务,技术架构,以及他们如何相互补充和交互。而不是纠结于比较这些快速迭代的技术之间重叠的特性。 + +### 让我们从Docker开始… + +Docker 公司, 始于名为dotCloud的平台即服务(PaaS)供应商。dotCloud团队发现,在许多应用和客户之间管理依赖和二进制文件时需要付出大量的工作。因此他们将Linux cgroups和namespace的一些功能合并成一个单一且易于使用的包,以便于应用程序可以在任何基础设施上一致地运行。这个包就是Docker镜像。Docker镜像提供了如下的功能: + +* 将应用程序和依赖库封装在一个包( Docker 镜像)中, 因此应用可以被一致地部署在各个环境上; + +* 提供类似 Git 的语义, 例如“docker push”,“docker commit”等命令让应用开发者可以快速接受这门新的技术,并将其融入到现有的工作流中; + +* 定义 Docker 镜像为不可变的层, 支持不可变的基础设施。新提交的变更被分别保存为只读层,让复用镜像和追踪变更记录变得十分简单。层还通过只传输更新而不是整个镜像来节省磁盘空间和网络流量; + +* 通过实例化不可变的镜像和读写层来运行 Docker 容器,读写层可以临时地存储运行时变更,从而轻松部署和扩展应用程序的多个实例; + +Docker 变得越来越受欢迎,开发者们开始从笔记本电脑上运行容器迁移到生产环境中。 跨多个机器之间协调这些容器需要额外的工具,称之为容器编排。有趣的是,第一个支持 Docker 镜像(2014 年 6月)的容器编排工具是 Apache Mesos(后面会有详细介绍) 的[Marathon][3]。那年,Docker的创始人兼首席技术官Solomon Hykes将Mesos推荐为“[生产集群的黄金标准][4]”。不久之后,除了Mesos 的Marathon 之外,还有出现了许多的容器编排技术:[Nomad][4],[Kubernetes][5],不出所料还有Docker Swarm([如今是Docker 引擎的一部分][7])。 + +随着Docker开始将其开源产品商业化,该公司还开始引入工具来补充Docker核心和运行时引擎,包括: + +* 为存储公共Docker镜像的而生的Docker hub; + +* 存储私有镜像的 Docker 仓库(Docker registry); + +* Docker cloud,用于构建和运行容器的服务; + +* Docker 数据中心作为一种商业产品体现了许多Docker技术; + +![Docker](https://mesosphere.com/wp-content/uploads/2017/07/docker-host.png) + +来源: www.docker.com. + +Docker 将软件及其以来关系封装在一个软件包中的洞察力改变了软件行业的游戏规则,正如mp3的出现重塑了音乐行业一般。Docker 成为行业标准,领先的容器技术供应商(包括Docker,Google,Pivotal,Mesosphere 等) 组建了 [Cloud Native Computing Foundation (CNCF)][8] 和 [Open Container Initiative (OCI)][9]。如今, CNCF 和 OCI 旨在确保容器技术之间的互操性和标准化接口,并确保使用任何工具构建的任何Docker容器都可以在任何运行时或基础架构上运行。 + +### 进入 Kubernetes + +Google很早就认识到了Docker的潜力,并试图在Google Cloud Platform上提供容器业务流程“即服务”。 Google在容器方面拥有丰富的经验(他们在Linux中引入了cgroups),但现有的内部容器和Borg等分布式计算工具直接与其原有基础架构相耦合。所以,Google没有使用原有系统的任何代码,而是从头开始设计Kubernetes来编排Docker容器。 Kubernetes于2015年2月发布,目标和考虑如下: + +* 为应用程序开发人员提供编排Docker容器的强大工具,而无需与底层基础设施交互; + +* 提供标准部署接口和原语 ,以实现云端一致的应用部署体验和API; + +* 基于模块化API核心,允许供应商围绕Kubernetes的核心技术集成其系统。 + +2016年3月,Google[将Kubernetes捐赠][10]给了CNCF,今天仍然是该项目的主要负责人(其次是Redhat,CoreOS等)。 + +![Kubernetes](https://mesosphere.com/wp-content/uploads/2017/07/kubernetes-architecture.png) + +来源: wikipedia + +Kubernetes对应用程序开发人员非常有吸引力,因为它减轻了对基础架构和运营团队的依赖程度。供应商也喜欢Kubernetes,因为它提供了一个容易的方式来拥抱容器化运动,并为客户部署Kubernetes(这仍然是一个非常重要的工作)提供商业解决方案。 Kubernetes也是有吸引力的,因为它是CNCF旗下的开源项目,与Docker Swarm相反,Docker Swarm尽管是开源的,但是被Docker公司紧紧地掌控着。 + + +Kubernetes的核心优势是为应用程序开发人员提供了用于编排无状态Docker容器的强大工具。 虽然有多个扩大项目范围的提议,以提供更多的功能(例如分析和有状态数据服务)。虽然这些提议仍处于非常早期的阶段,他们能取得多大的成功还有待观察。 + +### Apache Mesos + +Apache Mesos 始于加州大学伯克利分校(UC Berkeley)的下一代容器集群管理器项目,并应用了从云计算分布式计算基础架构(如[Google的Borg][11]和[Facebook的Tupperware][12])中习得的经验和教训。 虽然Borg和Tupperware具有单一的架构,并且是与物理基础架构紧密结合的闭源专有技术,但Mesos推出了一种模块化架构,一种开源开发方法,旨在完全独立于基础架构。Mesos迅速被 [Twitter][13],[Apple(Siri)][14], [Yelp][15], [Uber][16], [Netflix][17] 和许多领先的技术公司采用,支持从微服务,大数据和实时分析到弹性扩展的一切。 + +作为集群管理器,Mesos被设计用来解决一系列不同的挑战: + +* 将数据中心资源抽象为单个池来简化资源分配,同时在私有云或公有云中提供一致的应用和运维体验; + +* 在相同的基础架构上协调多个工作负载,如分析、无状态微服务、分布式数据服务和传统应用程序,以提高利用率,降低成本和台面空间; + +* 为应用程序特定的任务(如部署,自我修复,扩展和升级),自动执行第二天的操作;提供高度可用的容错基础设施; + +* 提供持久的可扩展性来运行新的应用程序和技术,而无需修改集群管理器或其上构建的任何现有应用程序;提供常规的可扩展性来运行新的应用程序和技术,而无需修改集群管理器或其上构建的任何现有应用程序; + +* 弹性扩展,将应用程序和底层基础设施从少量扩展到数十到数万个节点。 + + +Mesos独有的独立管理各种工作负载的能力 - 包括传统应用程序,如Java,无状态Docker微服务,批处理作业,实时分析和有状态的分布式数据服务。Mesos广泛的工作负载覆盖来自于其两级架构,从而实现了“应用感知”调度。 通过将应用程序特定的操作逻辑封装在“Mesos框架”(类似于操作中的运行手册)中来实现应用程序感知调度。资源管理器Mesos Master提供这些框架基础架构的部分,同时保持隔离。这种方法允许每个工作负载都有自己的专门构建的应用程序调度程序,可以了解其部署,扩展和升级的特定操作要求。 应用程序调度程序也是独立开发,管理和更新的,这让Mesos拥有高可扩展的能力,支持新的工作负载或随着时间的推移增加更多的操作功能。 + +![Mesos two-level scheduler](https://mesosphere.com/wp-content/uploads/2017/07/mesos-two-level-scheduler.png) + +举一个例子,团队如何管理应用软件升级。 无状态应用程序可以从[“蓝/绿”][18]部署方案中受益;当新版本的应用运行起来时,原先旧版本的软件依然还正常运转着,然后当旧应用被销毁时流量将会切换到新的应用上。但是升级数据工作负载例如 HDFS 或者 Cassandra 要求节点停机一次,此时需要持久化本地数据以防止数据丢失,并且按照特定的顺序执行原位升级,在升级之前和升级完成之后,都要在每一个节点类型上执行特定的检查和命令。任何这些步骤都是应用程序或服务特定的,甚至可能是版本特定的。 这让使用常规容器编排调度程序来管理数据服务变得非常困难。 +Mesos以每一个工作负载所需的特定方式管理各种工作负载,使得许多公司将Mesos作为一个统一的平台,将微服务和数据服务结合在一起。数据密集型应用程序的通用参考架构是[“SMACK”][19](译者按:SMACK即Spark,Mesos,Akka,Cassandra,Kafka)。 + +### 是时候搞清楚这些了 + +请注意,我们尚未对Apache Mesos的容器编排有任何描述。所以为什么人们会自动地将Mesos和容器编排联系起来呢?容器编排是可以在Mesos的模块化架构上运行的工作负载的一个例子,它是通过一个专门的编排“框架”来完成的,这个框架就Marathon,一个构建于Mesos之上的工具。 Marathon最初是为了在[cgroup][20] 容器中编排应用文档(如JAR,tarballs,ZIP文件)而开发的,是2014年最先支持Docker容器的编排工具之一。 + +所以当人们将Docker和Kubernetes与Mesos进行比较时,他们实际上是将Kubernetes和Docker Swarm与在Mesos上运行的Marathon进行了比较。 + +为什么搞清楚这一点很重要? 因为Mesos坦率地讲并不在乎它上面运行了什么。 Mesos可以在共享的基础设施上弹性地为Java应用服务器提供集群服务,Docker容器编排,Jenkins 持续集成任务,Apache Spark分析,Apache Kafka 流,以及更多其他的服务。Mesoss甚至可以运行Kubernetes 或者其他的容器编排工具,即使公共的集成目前还不可用。 + +![Mesos Workloads](https://mesosphere.com/wp-content/uploads/2017/07/mesos-workloads.png) + +来源: Apache Mesos 调查 2016 + +Mesos的另一个考虑因素(也是为什么它对许多企业架构师来说如此有吸引力)是运行关键任务工作负载的成熟度。 Mesos已经在大规模生产环境下(成千上万台服务器)运行了超过7年的时间,这就是为什么它比市场上许多其他的容器技术更具有生产上的可行性和扩展上的可靠性。 + +### 我所说的这些什么意思? + +总而言之,所有这三种技术都与Docker容器有关,可以让你在容器编排上实现应用程序的可移植性和扩展性。那么你在它们之间如何选择呢? 归根到底是为工作选择合适的工具(也可能是为不同的工作选择不同的工具)。如果您是一个应用开发人员,正在寻找现代化的方式来构建和打包你的应用程序,或者加速你的微服务计划,Docker容器和开发工具就是最好的选择。 + +如果你们是一个dev / devops团队,并希望构建一个专门用于Docker容器编排的系统,而且愿意花时间折腾集成解决方案与底层基础设施(或依靠公共云基础架构,如Google容器引擎或Azure容器服务),Kubernetes是一个可以考虑的好技术。 + +如果你们需要建立一个运行多个关键任务工作负载的可靠平台,包括Docker容器,旧的应用程序(例如Java)和分布式数据服务(例如Spark,Kafka,Cassandra,Elastic),并希望所有这些可依移植到云端提供商或者数据中心,那么Mesos(或我们自己的Mesos发行版,Mesosphere DC / OS)更适合你们的需求。 + +无论您选择什么,您都将拥抱一套可以更有效地利用服务器资源的工具,简化应用程序的可移植性,并提高开发人员的敏捷性。 你的选择真的不会有错。 + +-------------------------------------------------------------------------------- + +via: https://mesosphere.com/blog/docker-vs-kubernetes-vs-apache-mesos/?from=timeline&isappinstalled=0&nsukey=b2Ig6wj1rvlgVuEZ8ens0KVLuxYx7zv7GLuL1KBpcSWpvkfF2nHcSqeKJ7JnP%2FckIM4vBaRUkwdlUpWHNzrY8va0G14sN323y7T7OEix0DZpQOUQ%2FeiRcA7wJWN3Rws4PVSSI0wapm%2Bl5jCf%2B%2Bbj5HioS%2B%2FOeeil79KMIFrgFjKRMRWwZvlbOyq4j4iaipOi + +作者:[Amr Abdelrazik ][a] +译者:[rieonke](https://github.com/rieonke) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://mesosphere.com/blog/author/amr-abdelrazik/ +[1]:https://en.wikipedia.org/wiki/Cgroups +[2]:https://docs.docker.com/engine/docker-overview/ +[3]:https://mesosphere.github.io/marathon/ +[4]:https://www.google.com/url?q=https://www.youtube.com/watch?v=sGWQ8WiGN8Y&feature=youtu.be&t=35m10s&sa=D&ust=1500923856666000&usg=AFQjCNFLtW96ZWnOUGFPX_XUuVOPdWrd_w +[5]:https://www.nomadproject.io/ +[6]:http://kubernetes.io/ +[7]:https://blog.docker.com/2016/06/docker-1-12-built-in-orchestration/ +[8]:https://www.cncf.io/ +[9]:https://www.opencontainers.org/ +[10]:https://www.linuxfoundation.org/news-media/announcements/2016/03/cloud-native-computing-foundation-accepts-kubernetes-first-hosted-0 +[11]:https://research.google.com/pubs/pub43438.html +[12]:https://www.youtube.com/watch?v=C_WuUgTqgOc +[13]:https://youtu.be/F1-UEIG7u5g +[14]:http://www.businessinsider.com/apple-siri-uses-apache-mesos-2015-8 +[15]:https://engineeringblog.yelp.com/2015/11/introducing-paasta-an-open-platform-as-a-service.html +[16]:http://highscalability.com/blog/2016/9/28/how-uber-manages-a-million-writes-per-second-using-mesos-and.html +[17]:https://medium.com/netflix-techblog/distributed-resource-scheduling-with-apache-mesos-32bd9eb4ca38 +[18]:https://martinfowler.com/bliki/BlueGreenDeployment.html +[19]:https://mesosphere.com/blog/2017/06/21/smack-stack-new-lamp-stack/ +[20]:https://en.wikipedia.org/wiki/Cgroups +[21]:https://mesosphere.com/blog/author/amr-abdelrazik/ + From d87bda70d554f52f8a7ca4a39eecfccec61cc6ec Mon Sep 17 00:00:00 2001 From: Rieon Date: Thu, 3 Aug 2017 00:08:21 +0800 Subject: [PATCH 002/125] fix spelling mistake --- ...pache Mesos Why What You Think You Know is Probably Wrong.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/tech/20170731 Docker vs. Kubernetes vs. Apache Mesos Why What You Think You Know is Probably Wrong.md b/translated/tech/20170731 Docker vs. Kubernetes vs. Apache Mesos Why What You Think You Know is Probably Wrong.md index 7a5063b471..356436b3f8 100644 --- a/translated/tech/20170731 Docker vs. Kubernetes vs. Apache Mesos Why What You Think You Know is Probably Wrong.md +++ b/translated/tech/20170731 Docker vs. Kubernetes vs. Apache Mesos Why What You Think You Know is Probably Wrong.md @@ -37,7 +37,7 @@ Docker 变得越来越受欢迎,开发者们开始从笔记本电脑上运行 来源: www.docker.com. -Docker 将软件及其以来关系封装在一个软件包中的洞察力改变了软件行业的游戏规则,正如mp3的出现重塑了音乐行业一般。Docker 成为行业标准,领先的容器技术供应商(包括Docker,Google,Pivotal,Mesosphere 等) 组建了 [Cloud Native Computing Foundation (CNCF)][8] 和 [Open Container Initiative (OCI)][9]。如今, CNCF 和 OCI 旨在确保容器技术之间的互操性和标准化接口,并确保使用任何工具构建的任何Docker容器都可以在任何运行时或基础架构上运行。 +Docker 将软件及其依赖关系封装在一个软件包中的洞察力改变了软件行业的游戏规则,正如mp3的出现重塑了音乐行业一般。Docker 成为行业标准,领先的容器技术供应商(包括Docker,Google,Pivotal,Mesosphere 等) 组建了 [Cloud Native Computing Foundation (CNCF)][8] 和 [Open Container Initiative (OCI)][9]。如今, CNCF 和 OCI 旨在确保容器技术之间的互操性和标准化接口,并确保使用任何工具构建的任何Docker容器都可以在任何运行时或基础架构上运行。 ### 进入 Kubernetes From b5b71e0501d745169547d344fee6cf11e2acdee3 Mon Sep 17 00:00:00 2001 From: Rieon Date: Thu, 3 Aug 2017 00:10:39 +0800 Subject: [PATCH 003/125] remove url parameters appended by mobile QQ --- ...pache Mesos Why What You Think You Know is Probably Wrong.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/tech/20170731 Docker vs. Kubernetes vs. Apache Mesos Why What You Think You Know is Probably Wrong.md b/translated/tech/20170731 Docker vs. Kubernetes vs. Apache Mesos Why What You Think You Know is Probably Wrong.md index 356436b3f8..7fc838b30f 100644 --- a/translated/tech/20170731 Docker vs. Kubernetes vs. Apache Mesos Why What You Think You Know is Probably Wrong.md +++ b/translated/tech/20170731 Docker vs. Kubernetes vs. Apache Mesos Why What You Think You Know is Probably Wrong.md @@ -110,7 +110,7 @@ Mesos的另一个考虑因素(也是为什么它对许多企业架构师来说 -------------------------------------------------------------------------------- -via: https://mesosphere.com/blog/docker-vs-kubernetes-vs-apache-mesos/?from=timeline&isappinstalled=0&nsukey=b2Ig6wj1rvlgVuEZ8ens0KVLuxYx7zv7GLuL1KBpcSWpvkfF2nHcSqeKJ7JnP%2FckIM4vBaRUkwdlUpWHNzrY8va0G14sN323y7T7OEix0DZpQOUQ%2FeiRcA7wJWN3Rws4PVSSI0wapm%2Bl5jCf%2B%2Bbj5HioS%2B%2FOeeil79KMIFrgFjKRMRWwZvlbOyq4j4iaipOi +via: https://mesosphere.com/blog/docker-vs-kubernetes-vs-apache-mesos/ 作者:[Amr Abdelrazik ][a] 译者:[rieonke](https://github.com/rieonke) From 61298933a545118c8bf25e5c8825f0222fa7d6ab Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 3 Aug 2017 08:40:14 +0800 Subject: [PATCH 004/125] translated --- ...70705 IoT Fuels Growth of Linux Malware.md | 101 ------------------ ...70705 IoT Fuels Growth of Linux Malware.md | 91 ++++++++++++++++ 2 files changed, 91 insertions(+), 101 deletions(-) delete mode 100644 sources/tech/20170705 IoT Fuels Growth of Linux Malware.md create mode 100644 translated/tech/20170705 IoT Fuels Growth of Linux Malware.md diff --git a/sources/tech/20170705 IoT Fuels Growth of Linux Malware.md b/sources/tech/20170705 IoT Fuels Growth of Linux Malware.md deleted file mode 100644 index 22d8990dbb..0000000000 --- a/sources/tech/20170705 IoT Fuels Growth of Linux Malware.md +++ /dev/null @@ -1,101 +0,0 @@ -translating---geekpi - -IoT Fuels Growth of Linux Malware -============================================================ -![linus-iot-security](http://www.linuxinsider.com/article_images/story_graphics_xlarge/xl-2016-internet-of-things-1.jpg) - -![](http://www.linuxinsider.com/images/2015/image-credit-adobe-stock_130x15.gif) - -![](http://www.linuxinsider.com/images/2008/atab.gif) - -[**Managing Your Intellectual Property Integrity During M&A Transactions**][7] -[][8]Flexera Software presents best practices and methodology for the technical due diligence auditing process. -**[Download the White Paper][3]** - -Malware targeting Linux systems is growing, largely due to a proliferation of devices created to connect to the Internet of Things. - -That is one of the findings in a report [WatchGuard Technologies][4], a maker of network security appliances, released last week. - -The report, which analyzes data gathered from more than 26,000 appliances worldwide, found three Linux malware programs in the top 10 for the first quarter of the year, compared with only one during the previous period. - -"Linux attacks and malware are on the rise," wrote WatchGuard CTO Corey Nachreiner and Security Threat Analyst Marc Laliberte, coauthors of the report. "We believe this is because systemic weaknesses in IoT devices, paired with their rapid growth, are steering botnet authors towards the Linux platform." - -However, "blocking inbound Telnet and SSH, along with using complex administrative passwords, can prevent the vast majority of potential attacks," they suggested. - -### New Avenue for Hackers - -Linux malware began growing at the end of last year with the Mirai botnet, observed Laliberte. Mirai made a splash in September when it was used to attack part of the Internet's infrastructure and knock millions of users offline. - -"Now, with IoT devices skyrocketing, a whole new avenue is opening up to attackers," he told LinuxInsider. "It's our belief that the rise we're seeing in Linux malware is going hand in hand with that new target on the Internet." - -Makers of IoT devices haven't been showing a great deal of concern about security, Laliberte continued. Their goals are to make their devices work, make them cheap, and make them quickly. - -"They really don't care about security during the development process," he said. - -### Trivial Pursuits - -Most IoT manufacturers use stripped down versions of Linux because the operating system requires minimal system resources to operate, said Paul Fletcher, cybersecurity evangelist at [Alert Logic][5]. - -"When you combine that with the large quantity of IoT devices being connected to the Internet, that equals a large volume of Linux systems online and available for attack," he told LinuxInsider. - -In their desire to make their devices easy to use, manufacturers use protocols that are also user-friendly for hackers. - -"Attackers can gain access to these vulnerable interfaces, then upload and execute the malicious code of their choice," Fletcher said. - -Manufacturers frequently have poor default settings for their devices, he pointed out. - -"Often, admin accounts have blank passwords or easy-to-guess default passwords, such as 'password123,'" Fletcher said. - -The security problems often are "nothing Linux-specific per se," said Johannes B. Ullrich, chief research officer at the [SANS Institute][6]. - -"The manufacturer is careless on how they configured the device, so they make it trivial to exploit these devices," he told LinuxInsider. - -### Malware in Top 10 - -These Linux malware programs cracked the top 10 in WatchGuard's tally for the first quarter: - -* Linux/Exploit, which catches several malicious trojans used to scan systems for devices that can be enlisted into a botnet. - -* Linux/Downloader, which catches malevolent Linux shell scripts. Linux runs on many different architectures, such as ARM, MIPS and traditional x86 chipsets. An executable compiled for one architecture will not run on a device running a different one, the report explains. Thus, some Linux attacks exploit dropper shell scripts to download and install the proper malicious components for the architecture they are infecting. - -* Linux/Flooder, which catches Linux distributed-denial-of-service tools, such as Tsunami, used to perform DDoS amplification attacks, as well as DDoS tools used by Linux botnets like Mirai. "As the Mirai botnet showed us, Linux-based IoT devices are a prime target for botnet armies," the report notes. - -### Web Server Battleground - -A shift in how adversaries are attacking the Web has occurred, the WatchGuard report notes. - -At the end of 2016, 73 percent of Web attacks targeted clients -- browsers and supporting software, the company found. That radically changed during the first three months of this year, with 82 percent of Web attacks focused on Web servers or Web-based services. - -"We don't think drive-by download style attacks will go away, but it appears attackers have focused their efforts and tools on trying to exploit Web server attacks," report coauthors Nachreiner and Laliberte wrote. - -There's been a decline in the effectiveness of antivirus software since the end of 2016, they also found. - -"For the second quarter in a row, we have seen our legacy AV solution miss a lot of malware that our more advanced solution can catch. In fact, it has gone up from 30 percent to 38 percent," Nachreiner and Laliberte reported. - -"Nowadays, cyber criminals use many subtle tricks to repack their malware so that it evades signature-based detection," they noted. "This is why so many networks that use basic AV become victims of threats like ransomware." - --------------------------------------------------------------------------------- - -作者简介: - -John P. Mello Jr. has been an ECT News Network reporter since 2003. His areas of focus include cybersecurity, IT issues, privacy, e-commerce, social media, artificial intelligence, big data and consumer electronics. He has written and edited for numerous publications, including the Boston Business Journal, the Boston Phoenix, Megapixel.Net and Government Security News. Email John. - -------------- - -via: http://www.linuxinsider.com/story/84652.html - -作者:[John P. Mello Jr ][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:john.mello@newsroom.ectnews.com -[1]:http://www.linuxinsider.com/story/84652.html?rss=1# -[2]:http://www.linuxinsider.com/perl/mailit/?id=84652 -[3]:http://www.linuxinsider.com/story/84652.html?rss=1 -[4]:http://www.watchguard.com/ -[5]:http://www.alertlogic.com/ -[6]:http://www.sans.org/ -[7]:http://www.linuxinsider.com/story/84652.html?rss=1 -[8]:http://www.linuxinsider.com/story/84652.html?rss=1 diff --git a/translated/tech/20170705 IoT Fuels Growth of Linux Malware.md b/translated/tech/20170705 IoT Fuels Growth of Linux Malware.md new file mode 100644 index 0000000000..f1a172fdbb --- /dev/null +++ b/translated/tech/20170705 IoT Fuels Growth of Linux Malware.md @@ -0,0 +1,91 @@ +物联网对 Linux 恶意软件的助长 +============================================================ +![linus-iot-security](http://www.linuxinsider.com/article_images/story_graphics_xlarge/xl-2016-internet-of-things-1.jpg) + +针对 Linux 系统的恶意软件正在增长,这主要是由于连接到物联网设备的激增。 + +这是上周发布的网络安全设备制造商 [WatchGuard Technologies][4] 的一篇报告。 + +该报告分析了全球 26,000 多件设备收集到的数据,今年第一季度的前 10 中发现了三个针对 Linux 的恶意软件,而上一季度仅有一个。 + +WatchGuard 的 CTO Corey Nachreiner 和安全威胁分析师 Marc Laliberte 写道:“Linux 攻击和恶意软件正在兴起。我们相信这是因为 IoT 设备的系统性弱点与其快速增长相结合,它正在将僵尸网络作者转向 Linux 平台。” + +但是,他们建议“阻止入站 Telnet 和 SSH,以及使用复杂的管理密码,可以防止绝大多数潜在的攻击”。 + +### 黑客的新大道 + +Laliberte 观察到,Linux 恶意软件在去年年底随着 Mirai 僵尸网络开始增长。Mirai 在九月份曾经用来攻击部分互联网的基础设施,使数百万用户离线。 + +他告诉 LinuxInsider,“现在,随着物联网设备的飞速发展,一条全新的大道正在向攻击者开放。我们相信,随着互联网上新目标的出现,Linux 恶意软件会逐渐增多。” + +Laliberte 继续说,物联网设备制造商并没有对安全性表现出很大的关注。他们的目标是使他们的设备能够使用、便宜,制造快速。 + +他说:“他们真的不关心开发过程中的安全。” + +### 微不足道的追求 + +[Alert Logic][5] 的网络安全宣传员 Paul Fletcher说,大多数物联网制造商都使用 Linux 的裁剪版本,因为操作系统需要最少的系统资源来运行。 + +他告诉 LinuxInsider,“当你将大量与互联网连接的物联网设备结合在一起时,这相当于在线大量的 Linux 系统,它们可用于攻击。” + +为了使设备易于使用,制造商使用的协议对黑客也是友好的。 + +Fletcher 说:“攻击者可以访问这些易受攻击的接口,然后上传并执行他们选择的恶意代码。” + +他指出,厂商经常对设备的默认设置很差。 + +Fletcher说:“通常,管理员帐户是空密码或易于猜测的默认密码,例如‘password123’。” + +[SANS 研究所][6] 首席研究员 Johannes B. Ullrich 表示,安全问题通常是“本身不限定 Linux”。 + +他告诉L inuxInsider,“制造商对他们如何配置设备不屑一顾,所以他们使这些设备的利用变得微不足道。” + +### 10 大恶意软件 + +这些 Linux 恶意软件在 WatchGuard 的第一季度的统计数据中占据了前 10 名: + +* Linux/Exploit,它使用几种木马来扫描可以列入僵尸网络的设备。 + +* Linux/Downloader,它使用恶意的 Linux shell 脚本。Linux 运行在许多不同的架构上,如 ARM、MIPS 和传统的 x8 6芯片组。报告解释说,一个根据架构编译的可执行文件不能在不同架构的设备上运行。因此,一些 Linux 攻击利用 dropper shell 脚本下载并安装它们所感染的体系架构的适当恶意组件。 + +* Linux/Flooder,它使用了 Linux 分布式拒绝服务工具,如 Tsunami,用于执行 DDoS 放大攻击,以及 Linux 僵尸网络(如 Mirai)使用的 DDoS 工具。报告指出:“正如 Mirai 僵尸网络向我们展示的,基于 Linux 的物联网设备是僵尸网络军队的主要目标。 + +### Web 服务器战场 + +WatchGuard 报告指出,敌人攻击网络的方式发生了变化。 + +公司发现,到 2016 年底,73% 的 Web 攻击针对客户端 - 浏览器和配套软件。今年头三个月发生了彻底改变,82% 的 Web 攻击集中在 Web 服务器或基于 Web 的服务上。 + +报告合著者 Nachreiner 和 Laliberte 写道:“我们不认为下载风格的攻击将会消失,但似乎攻击者已经集中力量和工具来试图利用 Web 服务器攻击。” + +他们也发现,自 2006 年底以来,杀毒软件的有效性有所下降。 + +Nachreiner 和 Laliberte 报道说:“连续的第二季,我们看到使用传统的杀毒软件解决方案漏掉了使用我们更先进的解决方案可以捕获的大量恶意软件,实际上已经从 30% 上升到了 38%。” + +他说:“如今网络犯罪分子使用许多精妙的技巧来重新包装恶意软件,从而避免了基于签名的检测。这就是为什么使用基本杀毒的许多网络成为诸如赎金软件之类威胁的受害者。” + +-------------------------------------------------------------------------------- + +作者简介: + +John P. Mello Jr.自 2003 年以来一直是 ECT 新闻网记者。他的重点领域包括网络安全、IT问题、隐私权、电子商务、社交媒体、人工智能、大数据和消费电子。 他撰写和编辑了众多出版物,包括“波士顿商业杂志”、“波士顿凤凰”、“Megapixel.Net” 和 “政府安全新闻”。给 John 发邮件。 + +------------- + +via: http://www.linuxinsider.com/story/84652.html + +作者:[John P. Mello Jr ][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:john.mello@newsroom.ectnews.com +[1]:http://www.linuxinsider.com/story/84652.html?rss=1# +[2]:http://www.linuxinsider.com/perl/mailit/?id=84652 +[3]:http://www.linuxinsider.com/story/84652.html?rss=1 +[4]:http://www.watchguard.com/ +[5]:http://www.alertlogic.com/ +[6]:http://www.sans.org/ +[7]:http://www.linuxinsider.com/story/84652.html?rss=1 +[8]:http://www.linuxinsider.com/story/84652.html?rss=1 From b9068e8854e1429a45afc864555c286645350eae Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 3 Aug 2017 08:42:26 +0800 Subject: [PATCH 005/125] translating --- sources/tech/20170120 lxc exec vs ssh.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20170120 lxc exec vs ssh.md b/sources/tech/20170120 lxc exec vs ssh.md index fa74a587c0..eba94834fc 100644 --- a/sources/tech/20170120 lxc exec vs ssh.md +++ b/sources/tech/20170120 lxc exec vs ssh.md @@ -1,3 +1,5 @@ +translating----geekpi + lxc exec vs ssh ============================================================ From 168362279a38343da746869968ca5a4898d3af0a Mon Sep 17 00:00:00 2001 From: WangYue <815420852@qq.com> Date: Thu, 3 Aug 2017 09:45:49 +0800 Subject: [PATCH 006/125] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E5=AE=8C=E6=88=90?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=8E=9F=E6=96=8720170113=203=20open=20sourc?= =?UTF-8?q?e=20music=20players.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 翻译完成删除原文20170113 3 open source music players.md --- .../20170113 3 open source music players.md | 144 ------------------ 1 file changed, 144 deletions(-) delete mode 100644 sources/tech/20170113 3 open source music players.md diff --git a/sources/tech/20170113 3 open source music players.md b/sources/tech/20170113 3 open source music players.md deleted file mode 100644 index 6b96ed1ec0..0000000000 --- a/sources/tech/20170113 3 open source music players.md +++ /dev/null @@ -1,144 +0,0 @@ -翻译中 by  WangYueScream -=========================================================== -3 open source music players: Aqualung, Lollypop, and GogglesMM -============================================================ - ![3 open source music players: Aqualung, Lollypop, and GogglesMM](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/music-birds-recording-520.png?itok=wvh1g4Lw "3 open source music players: Aqualung, Lollypop, and GogglesMM") -Image by :  - -[Internet Archive][2] book images; modified by Opensource.com. [CC BY-SA 4.0][3] - -Music is a part of life. [Wikipedia's article on the history of music][4] contains this great phrase: "Since all people of the world, including the most isolated tribal groups, have a form of music...." Well, we open source folk form a tribe—that's for sure. I propose that our "form of music" includes open music players. Over the past year, I've been taking a look at the various players available; in [December 2016][5] I summarized my ongoing evaluation of open music players using these six criteria: - -1. Must be configurable to pass the music through unchanged to [ALSA][1]. (max 5 marks) -2. Should have a good "smart playlist" feature. (1 mark) -3. Should not force the user to always interact through playlists. (1 mark) -4. Should provide a simple approach to cover art—use the embedded cover art or fall back to cover.jpg (or .png) in the music directory. (1 mark) -5. Should show the signal level and effective bit rate as the music plays. (1 mark) -6. Should present good-to-great overall organization, layout, and performance. (1 mark) - -Three players suggested to me by kind readers were not available in my repositories: [Aqualung][6], [Lollypop][7], and [GogglesMM][8]. Not wanting to install stuff from the wild on my work computer, I promised to configure a "test bed" for this purpose and detail the results. - -### Aqualung - -[Aqualung][9] has a clearly written website that explains its various features. One of the comments there I found interesting was this one: - -"You can (and should) organize your music into a tree of Artists/Records/Tracks, thereby making life easier than with the all-in-one Winamp/XMMS playlist." - -This puzzled me because I think I have always had my music organized into a tree of artists, albums, and tracks. But maybe this explains why I find the XMMS-derived players to be a bit odd in terms of their music browsing capability. - -According to the Aqualung download page, the official release is source-only. While the comments there suggest that most major Linux distributions include a built copy of Aqualung, this is not the case with the distro I'm currently using on my work computer, Ubuntu 16.10. [Launchpad.net][10] does have personal package archives (PPAs), but they seem a bit out of date, so why not build from source? - -I installed **pkgconf** and dev versions of **libasound**, **libflac**, **libmp3lame**, **libvorbis**, **libxml2**, **libglib2.0**, and **libgtk+-2.0**, generally following the suggestions of the compiling page on the site and the usual "hints" from the configure script. Next, I was able to **configure** cleanly and do a **make** and a **make install**. And from there, I was able to execute **/usr/local/bin/aqualung**. - - ![Aqualung](https://opensource.com/sites/default/files/aqualung.png "Aqualung") - -Aqualung, unable to switch resolution. - -Once Aqualung was up and running, I saw a straightforward and relatively barebones two-window user interface, the player itself and the "Music Store." I opened Preferences by right-clicking on the music pane of the player and looked around to see where I could select my AudioQuest DragonFly digital-to-analog converter, but I saw no sign of anything there. However, the site notes that you can specify the output device on the command line. I ended up needing to use the **plughw** device to get Aqualung to start. - -At that point, I was disappointed to discover that Aqualung seems to require a fixed output sample rate. I could play my 44.1-KHz files just fine with the default setting, but to play my 96-KHz files, I had to stop and restart with that sample rate. Aqualung will not pass the bit stream unchanged through to the digital-to-analog converter. With that, I did not bother to continue my evaluation. - -**Not rated.** - -### Lollypop - - ![Lollypop interface](https://opensource.com/sites/default/files/lollypop_interface.png "Lollypop interface") - -The lovely Lollypop user interface. - -[Lollypop][11] has a gorgeous website. Although it's not in my work computer's repositories, there is a "Download Ubuntu/Debian" link that points to an [up-to-date PPA on launchpad.net][12]. The site offers other downloads for Flatpak, Arch Linux, Fedora, FreeBSD, and OpenSUSE. Out of curiosity, I took a look at the [Fedora link on Fedora COPR][13], and it also looks quite up-to-date, offering builds for Fedora 23–26. - -One build from source was enough excitement for that day, so I decided to try the PPA. I was able to execute Lollypop from the command line. The Settings menu was obvious in the upper right of the screen. After updating my music, I went looking for my output device configuration, but after some poking around, I couldn't find how to select the output device. Even executing on the command line with **–help** did not enlighten me. - -After some searching on the Internet I found a Lollypop developer stating that I needed **gstreamer libav** to get Lollypop to work. From this I have tentatively concluded that there may be a **gstreamer** configuration possibility to make this work, but I'm not going to pursue that for now, at least. - -Lollypop has a lovely user interface to match its lovely web page, but for now, I did not rate it. I have another reason to learn more about **gstreamer**. - -**Not rated.** - -### GogglesMM - -[Goggles Music Manager][14] also has an [up-to-date PPA on launchpad.net][15]; the installation was straightforward and I was able to execute **gogglesmm** from the command line. - -GogglesMM, out of the box, looks somewhat like Rhythmbox. I found the Audio tab under Settings > Preferences, which let me select ALSA and set my output device. I confirmed that I can play MP3, 44.1-KHz / 24-bit and 96-KHz / 24-bit music by looking at **/proc/asound/DragonFly/stream0** and the LED color on the DragonFly itself; therefore, 5 points for "rate/depth passthrough." - - ![GogglesMM](https://opensource.com/sites/default/files/gogglesmm.png "GogglesMM") - -GogglesMM playing at 96/24, showing output device. - -The documentation for GogglesMM is not largely detailed at this point, but as far as I am able to tell, the developers use filters to implement something like "smart playlists." I reviewed the functioning of filters as best as I could with the three albums installed on my test bed, and while I like what I see (especially being able to define selection criteria for songs based on a broad range of criteria), this is not what I mean when I use the term "smart playlists," which I think of as using some kind of community database of "songs like the current one." Maybe I should call this "automatic DJ" instead, but as far as I am able to determine, this feature does not exist in the current version of GogglesMM, so 0 points for "smart playlist." - -As for the queue versus playlist operation, the application supports either playing through the selected songs both in order or randomly or putting songs in a playlist, so 1 for "queue option to playlist." - -Similarly, it seemed to manage my cover art well without extra intervention (each album contained the appropriate cover art, which was recognized automatically by GogglesMM), so 1 for "embedded cover art or cover.jpg." - -I could not find any way to show signal level or effective bit rate. Nor could I find any way of seeing the bit rate and bit depth; although the application can display a "format" column, it doesn't show anything in that field on my music, so 0 for "signal level and effective bit rate." - -With respect to overall organization, GogglesMM hits all the right buttons for me. I can see what's in the play queue, the time and proportion of song played and left to play, album cover, song name, album title, and artist. Also, the available display column list seems quite large and useful, including composer for example. Finally, a really wonderful thing, the volume control actually controls the ALSA volume. If I bring up alsamixer and adjust the volume in either GogglesMM or alsamixer, the other's volume control moves and the volume adjusts. This is pretty cool and surprisingly not all that common, so 1 for overall organization. - -In total, then, GogglesMM merits an 8\. Excellent performance indeed. - -**Rating: 8** - -### The ratings so far - -As I've mentioned in the past, my favorite player is [Guayadeque][16], which gets a perfect 10, according to my ranking. Take a look at a summary of my ratings to date (N/R meaning "not rated," because I was unable to determine how to configure those players to work in bit-perfect, passthrough mode so that my digital-to-analog converter receives the PCM data at the bit rate and bit depth of the source): - - ![Open source audio players](https://opensource.com/sites/default/files/open_source_audio.png "Open source audio players") - -Please note that my ranking scheme is not for everyone. In particular, many people don't find value in music files at higher-than-CD resolution, and many people are happy with proprietary formats that promise better audio quality. - -Meanwhile, I will continue to evaluate some of the promising non-rated options. I especially like the look of Lollypop, and I feel that there is a secret spell for **gstreamer** just waiting to be unlocked that will let **gstreamer**-based players pass their data through without conversions. - -### And the music... - -My vinyl buying spree continues, and I have some great recommendations. - -First is Nils Frahm's album, [Felt][17], which was a very thoughtful gift from my daughter. I really, really like this album, which was largely recorded late at night with microphones very close to the piano strings and lots of interesting ambient piano noise—really beautiful music. Like other Nils Frahm music, the vinyl comes with a download code that allows the downloading of the album in up to 96-KHz, 24-bit FLAC format. - -The second is [Mad Professor's remix][18] of Massive Attack's album, Protection, titled No Protection. You can [get an idea of it here][19], and if you would like to try out the original, [here is what it's all about][20]. Originally released in the 1990s, this album is back on vinyl and it sounds fantastic. Unfortunately, no download code accompanies it. - -The third is [Primitives][21] by Bayonne. [Here is an idea][22] of what it's like. The Guardian newspaper has lumped this in with "the new boring," how's that for a genre? Really, if it's all so boring, maybe it's time for a career change, Anyway, give this one a whirl; maybe you'll find it boring, or maybe, like me, you'll like it! - --------------------------------------------------------------------------------- - - -作者简介: - -![](https://opensource.com/sites/default/files/styles/profile_pictures/public/clh_portrait2.jpg?itok=V1V-YAtY) - -Chris Hermansen - Engaged in computing since graduating from the University of British Columbia in 1978, I have been a full-time Linux user since 2005 and a full-time Solaris, SunOS and UNIX System V user before that. On the technical side of things, I have spent a great deal of my career doing data analysis; especially spatial data analysis. I have a substantial amount of programming experience in relation to data analysis, using awk, Python, PostgreSQL, PostGIS and lately Groovy - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/17/1/open-source-music-players - -作者:[Chris Hermansen][a] -译者:[译者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/clhermansen -[1]:http://www.alsa-project.org/main/index.php/Main_Page -[2]:https://www.flickr.com/photos/internetarchivebookimages/14565158187/in/photolist-ocoBRG-ocqdPM-ot9YYX-ovb7SE-oroqfj-ot8Sfi-of1HoD-oc5c28-otBk3B-foZxvq-ocoUvo-4TqEKE-otsG7t-oeYo4w-ornGMQ-orpD9y-wLDBUf-outZV7-oc26Ui-ortZpW-ocpWLH-ocoK6c-ocYDY1-od6ADb-xxAKyY-ocofDx-oc4Jr5-otyT2E-ocpUyu-xqTAb6-oc8gK1-otdsK5-ovhkz2-ocpcHj-oc8xwk-otgmZG-otr595-otnv4o-otvdRs-ovfYEt-ovDXUV-obUPJ6-oc2MuJ-oc4zLE-oruPbN-oc1P2H-ouRk93-otaGd3-otTmwB-oc5f62 -[3]:http://creativecommons.org/licenses/by-sa/4.0/ -[4]:https://en.wikipedia.org/wiki/History_of_music -[5]:https://opensource.com/article/16/12/soundtrack-open-source-music-players -[6]:http://aqualung.jeremyevans.net/ -[7]:https://gnumdk.github.io/lollypop-web/ -[8]:https://gogglesmm.github.io/ -[9]:http://aqualung.jeremyevans.net/ -[10]:https://launchpad.net/+search?field.text=aqualung+ppa -[11]:https://gnumdk.github.io/lollypop-web/ -[12]:https://launchpad.net/~gnumdk/+archive/ubuntu/lollypop -[13]:https://copr.fedorainfracloud.org/coprs/gnumdk/lollypop/ -[14]:https://gogglesmm.github.io/ -[15]:https://launchpad.net/~s.jansen/+archive/ubuntu/gogglesmm -[16]:http://www.guayadeque.org/ -[17]:http://www.nilsfrahm.com/works/felt/ -[18]:https://en.wikipedia.org/wiki/No_Protection_(Massive_Attack_album) -[19]:https://www.youtube.com/watch?v=9TvgRb4wiB0 -[20]:https://www.youtube.com/watch?v=LCUv-hLN71c -[21]:https://musicglue.com/bayonne/products/primitives---vinyl--/ -[22]:https://www.youtube.com/watch?v=WZ6xl6CKITE From f01ab94f53cdbabae18c4b3fcd34db361dcaa341 Mon Sep 17 00:00:00 2001 From: WangYue <815420852@qq.com> Date: Thu, 3 Aug 2017 09:53:21 +0800 Subject: [PATCH 007/125] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E5=AE=8C=E6=88=90?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=AF=91=E6=96=8720170113=203=20open=20sourc?= =?UTF-8?q?e=20music=20players.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 翻译完成添加译文20170113 3 open source music players.md --- .../20170113 3 open source music players.md | 189 ++++++++++++++++++ 1 file changed, 189 insertions(+) create mode 100644 translated/tech/20170113 3 open source music players.md diff --git a/translated/tech/20170113 3 open source music players.md b/translated/tech/20170113 3 open source music players.md new file mode 100644 index 0000000000..840a351eb8 --- /dev/null +++ b/translated/tech/20170113 3 open source music players.md @@ -0,0 +1,189 @@ + +3 个开源的音乐播放器:Aqulung,Lollypop,和 GogglesMM +============================================================ + + + ![3 open source music players: Aqualung, Lollypop, and GogglesMM](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/music-birds-recording-520.png?itok=wvh1g4Lw "3 open source music players: Aqualung, Lollypop, and GogglesMM") + + +图片来源:[互联网档案馆][2]书中的图片;由 Opensource.com 编辑发布。遵循 [CC BY-SA 4.0][3] 协议。 + + +音乐是生活的一部分。[维基百科关于音乐发展历史的文章][4]有这样一段不错的描述说:“全世界所有的人们,包括哪怕是最孤立、与世隔绝的部落,都会有自己的特色音乐...”好吧,能够确定的是我们已经把那种部落的民乐推广出来广为人知。我建议我们对于“音乐形式”的划分也应该包括开源音乐播放器。在过去几年里,我已经使用体验过不少我能接触到的音乐播放器;[2016 年 12 月份][5]我根据这六个标准来总结概括分享我使用开源音乐播放器的经验感受: + + +1. 必须是能够通过设置让音乐从一成不变转换到 [ALSA][1]。(最高分 5分) +2. 应该有一个不错的“智能播放列表”。(1 分) +3. 不应该强迫用户总是只能通过播放列表来进行交互。(1 分) +4. 应该能够提供一个简单的方法来覆盖掉歌曲内嵌的图片或者在音乐目录里后退到 cover.jpg(或者 .png)。 +5. 应该能够在音乐播放的时候显示信号级别和实际的比特率。(1 分) +6. 能够呈现出不错的整体组织,结构布局和执行性能。(1 分) + + +热心的读者让我想起来有三个播放器是在我的资源仓库里找不到的:[Aqualung][6],[Lollypop][7],和 [GogglesMM][8]。我并不想在我办公用的电脑里面安装不必要的非办公需要的软件,我向大家承诺到时候我会配置一个“试验台”来达到测试这三个音乐播放器用户体验的目的并详细描述最终结果。 + +### Aqualung + + +[Aqualung][9] 有一个清晰明了的文字描述站点来解释它众多的特点。站点提供的说明中我发现其中一点特别有趣: + + +“你能够(也应该)将你的所有音乐按照艺术家/档案/声轨这样的分类标准系统化归类成一个树型结构,从而生成一个一体的 Winamp/XMMS 播放列表来让你的生活更简单。” + + +这点让我有些困惑因为我印象中我一直总是把我的音乐按照艺术家,专辑和声轨这样的分类标准系统归类。但这就可能解释了为什么我有时发现我的 XMMS-derived 播放器运行的时候有一点古怪,与这种音乐分类标准下播放器的浏览音乐的性能有关。 + + +根据在 Aqualung 官网下载的参考文档说明,官方发布的只有源代码。但是文档上的说明暗示了绝大多数主流的 Linux 发行版本都内置的有一份复制的编译后的 Aqualung,我当前用的办公电脑所使用的 Linux 发行版本并不在此范围内,Ubuntu 16.10。[Launchpad.net][10] 提供的有个人软件包库(PPAs),但那些软件看起来都有些过时了,版本比较老,所以为什么不试试编译源码安装软件呢? + + +我根据官网上编译文档的建议和配置脚本的提示安装了 **pkgconf** 以及 **libasound**,**libflac**,**libmp3lame**,**libvorbis**,**libxml2**,**libglib2.0** 和 **libgtk+-2.0** 的开发版。接下来,我就能够干净利索的进行**配置**然后进行**编译**和**编译安装**。最终我是通过执行 **/usr/local/bin/aqualung** 这个文件来进行 aqualung 的安装。 + + + ![Aqualung](https://opensource.com/sites/default/files/aqualung.png "Aqualung") + + +Aqualung,不能切换音乐播放的码率。 + + +一旦 Aqualung 启动运行,我就能看到两个相当简洁直接的窗口用户界面,播放器本身和“音乐商店”。我通过右键点击播放器的音乐面板打开参数设置查看这些可设置的参数看是否能找到 AudioQuest DragonFly 这个数字模拟转换器,但我没有找到任何相关的参数。然而,站点上的说明指出你可以通过命令行指定输出设备。最终我用 **plughw** 外置声卡设备来让 Aqualung 启动。 + + +在那个时候,真正让我对 Aqualung 感到失望的是 Aqualung 似乎是需要一个固定的输出设备来抽样检查频率。我能够用 Aqualung 播放器的默认设置来正常播放我的 44.1 Khz 文件,但是同样的抽样检查频率播放 96 Khz 的音乐文件时,我不得不关闭软件并重新启动。也正是因为这一点,我不会再继续进行对 Aqualung 的使用测评。 + + +**不作进一步的评论。** + + +### Lollypop + + + ![Lollypop interface](https://opensource.com/sites/default/files/lollypop_interface.png "Lollypop interface") + + +优美的 Lollypop 用户界面。 + + +[Lollypop][11] 有一个华丽的网站。尽管它不在我办公专用的电脑的软件仓库里面,但是有一个“针对 Ubuntu/Debian 用户的下载”链接带你跳转到 [launchpad.net 站点提供的最新的 PPA][12]。这个站点还提供针对 Flatpak,Arch Linux,Fedora,和 OpenSUSE 这些系统的 Lollypop 软件包的下载。我看了下[Fedora COPR 上针对各个 Fedora 版本的 Lollypop 下载链接][13],看起来 Lollypop 更新的比较及时而且从 Fedora 版本的 23 到 26 都有对应的软件包提供下载安装。 + + +就一天内从源码编译安装 Lollypop 软件是一件非常刺激的事,所以我决定试试从 PPA 安装这款软件。我通过命令行来安装执行 Lollypop 软件。设置菜单能够在 Lollypop 界面的右上方很明显地看见。更新完音乐后,我开始找电脑的输出设备设置,但是在一番查看后,我不知道如何针对 Lollypop 选择合适正确的输出设备。即便我在命令行通过 **-help** 也找不到有用的帮助信息。 + + +经过一番网上搜索后我找到一个 Lollypop 的开发者的描述说明才知道我需要 **gstreamer libav** 来让 Lollypop 工作。通过这个说明我暂时推断出可能还需要一个 **gstreamer** 相关配置才有可能让 Lollypop 成功正常运行工作,但是我至少现在不会去继续尝试。 + + +Lollypop 有一个优美的用户交互界面和它的优美的网站相得益彰,但是我现在不会进一步对它进行测评。否则我就又多了一个进一步去学习了解 **gstreamer** 的理由。 + + +**不作进一步的评论。** + +### GogglesMM + + +[Goggles Music Manager][14] 也有一个[在 launchpad.net 及时更新的 PPA][15];安装流程简单明了,我可以在命令行通过执行 **gogglesmm** 来完成安装。 + + +GogglesMM,非常容易上手使用,看上去和 Rhythmbox 有点像。我在 GogglesMM 的设置里面的参数设置中找到了音频选项设置,能够让我选择 ALSA 和设置音频输出用哪块输出设备。通过查看 **/proc/asound/DragonFly/stream0** 文件和 DragonFly 设备上 LED 的颜色我确定我能够用 GogglesMM 播放 44.1-KHz/21-bit 和 96-KHz/24-bit 这两种规格的音乐;因此,就凭“rate/depth passthrough”我给 GogglesMM 打 5 分。 + + + ![GogglesMM](https://opensource.com/sites/default/files/gogglesmm.png "GogglesMM") + + +上图是 GogglesMM 在播放 96/24 这种规格的音乐,显示音频输出设备选择。 + + +GogglesMM 的说明文档并没有大量的细节介绍,但是我尽可能能够说明的是,开发者们使用了不少过滤条件来实现类似“智能播放列表”的功能。我在我的测试环境下使用三张专辑来尽我所能检测过滤功能,当我使用“智能播放列表”功能的时候尽管我喜欢我看到的通过过滤筛选出来的歌曲(特别是能够基于广泛的标准来针对歌曲定义筛选条件),但这并不是我认为的“智能播放列表”,对我来说我认为“智能播放列表”应该是这样的,通过借助一些社区数据库来推荐提供和你近期播放的歌曲类似的曲目。或者我该把这个叫作“自动的 DJ”而不是“智能播放列表”,但是通过测试我最终能够确定的是,这个特性并不会在近期版本的 GogglesMM 中出现,所以我给它这个所谓的“智能播放列表”打 0 分。 + + +至于播放列表队列的操作,这款应用能够支持播放你选中的音乐也能够随机播放音乐或者把一些音乐整合到一个播放列表里面,所以我因为“播放列表的队列选项”给它打 1 分。 + + +同样的,它看起来也能够很好地不需要额外的干预来管理我的音乐艺术封面(每个专辑都包含一张合适的由 GogglesMM 自动识别的艺术封面),所以为“内嵌的艺术封面或者封面图片”打 1 分。 + + +我找不到任何方法来让 GogglesMM 显示信号级别或者实际的比特率。我也不能找到显示比特率和位深度的方法;尽管这款应用能够在一个列表里面显示所有的音乐“格式”,但是在我的音乐栏里面除了显示音乐格式不会显示其他的信息了,所以为 GogglesMM 的“信号级别和有效比特率”打 0 分。 + + +至于 GogglesMM 的整体结构,它设计的所有按钮选项都正好完全符合我的使用习惯。我能够在播放队列里面看到歌曲的时间和歌曲当前已播放的时间所占歌曲总体时间的比例,专辑封面,歌曲名,专辑名和歌唱者。可用的播放栏列表看起来相当的大容量有用,比如也包括了作曲者。最后,一个真正让我眼前一亮的特点是,音量控制竟然包含了 ALSA 音量。也就是如果我启动控制台调整音量的话然后不管是在控制台还是在 GogglesMM 里面调整音量,另一个音量控制也会做相应的音量调整。这个出乎我意外之外的功能相当的酷而且这个功能在其他的音乐播放器上也不常见,因此为它的整体架构给 GogglesMM 加 1 分。 + + +最终 GogglesMM 的这些优点共计得分 8。所表现出来的特点确实很优秀。 + + +**评分:8** + + +### 到目前为止所给出的评分 + + +我所提到的这几个开源音乐播放器中,我最喜欢的还是 [Guayadeque][16],根据我制定的标准来进行排名的话,我给 Guayadeque 打满分 10 分。来看下我对这三个开源音乐播放器的评分总结吧(N/R 代表“不作评论”,因为我不确定如何配置这些播放器来让它们以完美的码率和贯穿模式工作以便我的数字模拟信号转换器在相应源的码率和位深度接收 PCM 数据): + + + ![Open source audio players](https://opensource.com/sites/default/files/open_source_audio.png "Open source audio players") + + +请注意下我用的这个排名方法不是针对所有音乐播放器通用的。特别是很多人并不清楚高品质音乐的价值,他们更高兴专有格式的音乐能够给他们带来更好的音乐品质。 + + +与此同时,我会继续评测一些之前向大家承诺的音乐播放器一些和评测评分无关的特性。我特别喜欢 Lollypop 的外观,我也觉得待解锁的 **gstreamer** 有一种神秘的魅力,他能让基于 **gstreamer** 的音乐播放器不用通过转换就能传输他们的数据。 + + +### 关于音乐的部分... + + +我还在保持继续购买唱片的习惯,对于唱片的购买我有些不错的推荐。 + + +第一个就是 Nils Frahm 的专辑,[Felt][17],是我女儿送我的一份非常贴心的礼物。我真的真的很喜欢这张专辑,它的绝大部分歌曲都是在深夜用电麦录制的非常接近钢琴的弦乐而且也有不少有趣的钢琴演奏的背景音乐,真的是很棒的音乐。至于 Nils Frahm 其他的音乐,这些唱片也提供的有下载链接允许你下载质量高达 96-KHz,24-bit FLAC 格式的音乐。 + + +第二个就是 Massive Attack 的 [Mad Professor's remix][18] 这份专辑。你可以[在这里了解这份专辑][19],并且如果你想要尝试这份专辑最原始的版本,[这里是汇总的它的所有相关信息][20]。最原始的版本诞生于 20 世纪 90 年代,这份专辑刻录在唱片上面而且听起来非常奇幻。遗憾的是,不提供下载链接。 + + +第三个就是 Bayonne 的 [Primitives][21]。[这是专辑要表达的想法][22]。Guardian 报社把这份专辑称作是“新花样的无聊”。那么这种类型的音乐到底怎么样呢?如果这些音乐真的是非常令人乏味的,或许是时候来换份工作了,无论如何你可以试试听这些音乐;或许你会觉得它确实很乏味或者你会像我一样喜欢上这份音乐。 + +-------------------------------------------------------------------------------- + + +作者简介: + +![](https://opensource.com/sites/default/files/styles/profile_pictures/public/clh_portrait2.jpg?itok=V1V-YAtY) + + +Chris Hermansen - 自 1978 年毕业于 British Columbia 大学后一直从事计算机相关工作,2005 年之前是 Solaris,SunOS,UNIX System V 的忠实用户,之后是 Linux 的忠实用户。在技术方面,我的职业生涯大部分时间都是在做数据分析;特别是空间数据分析。拥有丰富的和数据分析相关的编程经验,用过的编程语言有 awk,Python,PostgreSQL, PostGIS 和 最新的 Groovy。 + + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/17/1/open-source-music-players + +作者:[Chris Hermansen][a] +译者:[WangYueScream](https://github.com/WangYueScream) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://opensource.com/users/clhermansen +[1]:http://www.alsa-project.org/main/index.php/Main_Page +[2]:https://www.flickr.com/photos/internetarchivebookimages/14565158187/in/photolist-ocoBRG-ocqdPM-ot9YYX-ovb7SE-oroqfj-ot8Sfi-of1HoD-oc5c28-otBk3B-foZxvq-ocoUvo-4TqEKE-otsG7t-oeYo4w-ornGMQ-orpD9y-wLDBUf-outZV7-oc26Ui-ortZpW-ocpWLH-ocoK6c-ocYDY1-od6ADb-xxAKyY-ocofDx-oc4Jr5-otyT2E-ocpUyu-xqTAb6-oc8gK1-otdsK5-ovhkz2-ocpcHj-oc8xwk-otgmZG-otr595-otnv4o-otvdRs-ovfYEt-ovDXUV-obUPJ6-oc2MuJ-oc4zLE-oruPbN-oc1P2H-ouRk93-otaGd3-otTmwB-oc5f62 +[3]:http://creativecommons.org/licenses/by-sa/4.0/ +[4]:https://en.wikipedia.org/wiki/History_of_music +[5]:https://opensource.com/article/16/12/soundtrack-open-source-music-players +[6]:http://aqualung.jeremyevans.net/ +[7]:https://gnumdk.github.io/lollypop-web/ +[8]:https://gogglesmm.github.io/ +[9]:http://aqualung.jeremyevans.net/ +[10]:https://launchpad.net/+search?field.text=aqualung+ppa +[11]:https://gnumdk.github.io/lollypop-web/ +[12]:https://launchpad.net/~gnumdk/+archive/ubuntu/lollypop +[13]:https://copr.fedorainfracloud.org/coprs/gnumdk/lollypop/ +[14]:https://gogglesmm.github.io/ +[15]:https://launchpad.net/~s.jansen/+archive/ubuntu/gogglesmm +[16]:http://www.guayadeque.org/ +[17]:http://www.nilsfrahm.com/works/felt/ +[18]:https://en.wikipedia.org/wiki/No_Protection_(Massive_Attack_album) +[19]:https://www.youtube.com/watch?v=9TvgRb4wiB0 +[20]:https://www.youtube.com/watch?v=LCUv-hLN71c +[21]:https://musicglue.com/bayonne/products/primitives---vinyl--/ +[22]:https://www.youtube.com/watch?v=WZ6xl6CKITE From cda92f1f4d9d0fe0c8eae63ccae042b16fe4df44 Mon Sep 17 00:00:00 2001 From: rieonke Date: Thu, 3 Aug 2017 10:16:14 +0800 Subject: [PATCH 008/125] apply for translating a new article --- .../20170801 Deploy Kubernetes cluster for Linux containers.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20170801 Deploy Kubernetes cluster for Linux containers.md b/sources/tech/20170801 Deploy Kubernetes cluster for Linux containers.md index 8631d73edb..58e87796c7 100644 --- a/sources/tech/20170801 Deploy Kubernetes cluster for Linux containers.md +++ b/sources/tech/20170801 Deploy Kubernetes cluster for Linux containers.md @@ -1,3 +1,5 @@ +> translating by rieon + Deploy Kubernetes cluster for Linux containers ============================================================ From f39c711e9e735286282c33aee4752e336cd876fe Mon Sep 17 00:00:00 2001 From: firmianay Date: Thu, 3 Aug 2017 13:20:56 +0800 Subject: [PATCH 009/125] translated --- ...ORWARDING MOUNT A SOCKS SERVER WITH SSH.md | 166 ------------------ ...ORWARDING MOUNT A SOCKS SERVER WITH SSH.md | 164 +++++++++++++++++ 2 files changed, 164 insertions(+), 166 deletions(-) delete mode 100644 sources/tech/20170715 DYNAMIC PORT FORWARDING MOUNT A SOCKS SERVER WITH SSH.md create mode 100644 translated/tech/20170715 DYNAMIC PORT FORWARDING MOUNT A SOCKS SERVER WITH SSH.md diff --git a/sources/tech/20170715 DYNAMIC PORT FORWARDING MOUNT A SOCKS SERVER WITH SSH.md b/sources/tech/20170715 DYNAMIC PORT FORWARDING MOUNT A SOCKS SERVER WITH SSH.md deleted file mode 100644 index d393ad4749..0000000000 --- a/sources/tech/20170715 DYNAMIC PORT FORWARDING MOUNT A SOCKS SERVER WITH SSH.md +++ /dev/null @@ -1,166 +0,0 @@ -translating by firmianay - -DYNAMIC PORT FORWARDING / MOUNT A SOCKS SERVER WITH SSH -================= - -In the previous entry, [Creating TCP / IP (port forwarding) tunnels with SSH: The 8 scenarios possible using OpenSSH][17], we saw all the possibilities we have at our disposal for  _port forwarding_ … but for static port forwarding. That is, we only saw cases where we wanted to access only a port of another system by chan- ging it through the SSH connection. - -However, in that entry we left in the forefront the dynamic forwarding of ports and several, eral readers missed it, so that this entry will try to complement it (thanks to those who suggest this). - -When we talk about doing  _dynamic port forwarding_  with SSH, what we are talking about is exactly converting SSH into a [SOCKS][2] server. And what is a SOCKS server? - -Do you know what a[web proxy is for][3]? Probably yes, many companies use one. It is a system directly connected to the Internet that allows clients of an [intranet][4] without Internet access to navigate the web if they configure their browsers to make their requests through the proxy ( [although there are also transparent proxies][5] ). A web proxy, besides allowing the output to the Internet, will also cache pages, images, etc. Already downloaded by some client so you do not have to download them for another client. In addition, it allows to filter the contents and to monitor the activity of the users. However, its basic function is to forward HTTP and HTTPS traffic. - -A SOCKS server would give a service similar to the intranet of a company that provides a proxy server but is not limited to HTTP / HTTPS, but allows to forward any TCP / IP traffic (with SOCKS 5 also UDP). - -For example, imagine that we want to use our mail using POP3 or ICMP and SMTP with Thunderbird from an intranet without direct Internet access. If we only have a web proxy available, the only simple one we would use would be to use some webmail (although if it is a webmail we could also use the [Thunderbird Webmail extension][6]). We could also take advantage of the proxy by [tunneling over HTTP][7]. But the simplest thing would be that the network had a SOCKS server available that would allow us to use POP3, ICMP and SMTP through it without any inconvenience. - -Although there is a lot of software to configure very specialized SOCKS servers, setting up one with OpenSSH could be as simple as: - -> ``` -> Clientessh $ ssh -D 1080 user @ servidorssh -> ``` - -Or we could improve it a bit with: - -> ``` -> Clientessh $ ssh -fN -D 0.0.0.0:1080 user @ servidorssh -> ``` - -Where: - -* The option `-D`is similar to the options `-L`and `-R`static port forwarding. Like these, with this we can make the client listen only the local requests or those arriving from other nodes, depending on which address we associate the request: - - > ``` - > -D [bind_address:] port - > ``` - - While in static port forwarding we saw that we could do reverse port forwarding with the option `-R`, with dynamic forwarding is not possible. We can only create the SOCKS server on the SSH client side, not on the SSH server side. - -* 1080 is the typical port for SOCKS servers, just as 8080 is typical for web proxy servers. - -* The option `-N`prevents a remote shell interactive session from actually being launched. It is useful when we only do the `ssh`to establish this tunnel. - -* The option `-f`causes `ssh`it to stay in the background and disassociates itself from the current shell, so that the process becomes a daemon. It does not work without the option `-N`(or without specifying a command), otherwise an interactive shell would be incompatible with the process being in the background. - -Using [PuTTY][8] is also very simple to redirect ports. The equivalent of a ” `ssh -D 0.0.0.0:1080`” would be to use this configuration: - -![PuTTY SOCKS](https://wesharethis.com/wp-content/uploads/2017/07/putty_socks.png) - -For an application to access another network through a SOCKS server, it is convenient (although not necessary) that the application specifically supports it, just as browsers support using a proxy server. Browsers, such as Firefox or Internet Explorer, are examples of applications prepared to use a SOCKS server to access another network: - -![Firefox SOCKS](https://wesharethis.com/wp-content/uploads/2017/07/firefox_socks.png) - -![Internet Explorer SOCKS](https://wesharethis.com/wp-content/uploads/2017/07/internetexplorer_socks.png) - -Note: Capture has been obtained using [IEs 4 Linux][1] : Highly recommended if you need Internet Explorer and use Linux! - -However, it is not precisely the browsers that most often require a SOCKS server, since they usually are better arranged with the proxy server. - -But for example, the Thunderbird also allows and that is useful: - -![Thunderbird SOCKS](https://wesharethis.com/wp-content/uploads/2017/07/thunderbird_socks.png) - -Another example: the [Spotify][9] client also supports SOCKS: - -![Spotify SOCKS](https://wesharethis.com/wp-content/uploads/2017/07/spotify_socks.png) - -Something to keep in mind is name resolution. Sometimes we will find that in the current network we can not resolve the names of the systems that we want to access on the other side of the SOCKS server. SOCKS 5 also allows us to tunnel DNS requests (as is UDP allows us to SOCKS 5) and send them to the other end: It is possible to specify if we want to resolve locally or remotely (or maybe test both). Applications that support this also have to take this into account. For example, Firefox has the parameter network.proxy.socks_remote_dns (in it `about:config`) that allows us to specify that it is resolved remotely. By default it is resolved locally. - -Thunderbird also supports the parameter `network.proxy.socks_remote_dns`, but since we do not have an address bar to place `about:config`, we can change it, as we read in [MozillaZine: about: config][10], in Tools → Options → Advanced → General → Config Editor (button). - -Applications that do not specifically support SOCKS can be “socksified”. This will work well with many applications that use TCP / IP without problems, but not with all. “Socksifier” consists of loading an additional library that detects requests to the TCP / IP stack and modifying them to redirect them through the SOCKS server, so that the communication goes through without the application being specifically programmed with SOCKS support . - -There are “Socksifiers” for Windows and for [Linux.][18] - -For Windows we have for example the SocksCap, a closed but free product for non-commercial use that I have used very satisfactorily for a long time. SocksCap was made by a company called Permeo which was the company that created SOCKS reference technology. Permeo was bought by [Blue Coat][11] and it [discontinued the SocksCap][12]. You can still find the file very well `sc32r240.exe`on the Internet. Also for Windows, and free code, there is the [FreeCap][13], of appearance and use very, very similar to the SocksCap. However, it works much worse and has been maintenance-free for years. It seems that its author has preferred to dedicate his efforts to a new product this time of payment, the [WideCap][14]. - -This is the aspect of the SocksCap when we have “socksified” several applications. These applications will access the network through the SOCKS server when we launch them from here: - -![SocksCap](https://wesharethis.com/wp-content/uploads/2017/07/sockscap.png) - -In the configuration dialog we will see that if we choose the protocol SOCKS 5, we can choose where the names have to be resolved, locally or remotely: - -![SocksCap settings](https://wesharethis.com/wp-content/uploads/2017/07/sockscap_settings.png) - -On Linux, as always, we have many alternatives to a single remote command. In Debian / Ubuntu, the output of the command: - -> ``` -> $ Apt-cache search socks -> ``` - -Will show us many of them - -The best known to me are the [tsocks][15] and the [proxychains][16]. They work in much the same way: Just launch the application that we want to “socksify” with them and that’s it. An example using `proxychains`y `wget`: - -> ``` -> $ Proxychains wget http://www.google.com -> ProxyChains-3.1 (http://proxychains.sf.net) -> --19: 13: 20-- http://www.google.com/ -> Resolving www.google.com ... -> DNS-request | Www.google.com -> | S-chain | - <- - 10.23.37.3:1080-<><>-4.2.2.2:53-<><>-OK -> | DNS-response | Www.google.com is 72.14.221.147 -> 72.14.221.147 -> Connecting to www.google.com | 72.14.221.147 |: 80 ... -> | S-chain | - <- - 10.23.37.3:1080-<><>-72.14.221.147:80-<><>-OK -> Connected. -> HTTP request sent, awaiting response ... 200 OK -> Length: unspecified [text / html] -> Saving to: `index.html ' -> -> [<=>] 6,016 24.0K / s in 0.2s -> -> 19:13:21 (24.0 KB / s) - `index.html 'saved [6016] -> ``` - -For this to work, you must specify the proxy server that we want to use in `/etc/proxychains.conf`: - -> ``` -> [ProxyList] -> Socks5 clientessh 1080 -> ``` - -We can also tell you that DNS requests are made remotely: - -> ``` -> # Proxy DNS requests - no leak for DNS data -> Proxy_dns -> ``` - -Also, in the previous output, we have seen several informative messages of the same `proxychains`, not `wget`in lines marked with strings `|DNS-request|`, `|S-chain|`or `|DNS-response|`. If we do not want to see them, we can also adjust it in the configuration: - -> ``` -> # Quiet mode (no output from library) -> Quiet_mode -> ``` - --------------------------------------------------------------------------------- - -via: https://wesharethis.com/2017/07/15/dynamic-port-forwarding-mount-socks-server-ssh/ - -作者:[Ahmad][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://wesharethis.com/author/ahmad/ -[1]:https://wesharethis.com/goto/http://www.tatanka.com.br/ies4linux/page/Main_Page -[2]:https://wesharethis.com/goto/http://en.wikipedia.org/wiki/SOCKS -[3]:https://wesharethis.com/goto/http://en.wikipedia.org/wiki/Proxy_server -[4]:https://wesharethis.com/goto/http://en.wikipedia.org/wiki/Intranet -[5]:https://wesharethis.com/goto/http://en.wikipedia.org/wiki/Proxy_server#Transparent_and_non-transparent_proxy_server -[6]:https://wesharethis.com/goto/http://webmail.mozdev.org/ -[7]:https://wesharethis.com/goto/http://en.wikipedia.org/wiki/HTTP_tunnel_(software) -[8]:https://wesharethis.com/goto/http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html -[9]:https://wesharethis.com/goto/https://www.spotify.com/int/download/linux/ -[10]:https://wesharethis.com/goto/http://kb.mozillazine.org/About:config -[11]:https://wesharethis.com/goto/http://www.bluecoat.com/ -[12]:https://wesharethis.com/goto/http://www.bluecoat.com/products/sockscap -[13]:https://wesharethis.com/goto/http://www.freecap.ru/eng/ -[14]:https://wesharethis.com/goto/http://widecap.ru/en/support/ -[15]:https://wesharethis.com/goto/http://tsocks.sourceforge.net/ -[16]:https://wesharethis.com/goto/http://proxychains.sourceforge.net/ -[17]:https://wesharethis.com/2017/07/14/creating-tcp-ip-port-forwarding-tunnels-ssh-8-possible-scenarios-using-openssh/ -[18]:https://wesharethis.com/2017/07/10/linux-swap-partition/ diff --git a/translated/tech/20170715 DYNAMIC PORT FORWARDING MOUNT A SOCKS SERVER WITH SSH.md b/translated/tech/20170715 DYNAMIC PORT FORWARDING MOUNT A SOCKS SERVER WITH SSH.md new file mode 100644 index 0000000000..8767ee8c99 --- /dev/null +++ b/translated/tech/20170715 DYNAMIC PORT FORWARDING MOUNT A SOCKS SERVER WITH SSH.md @@ -0,0 +1,164 @@ +动态端口转发:安装带有SSH的SOCKS服务器 +================= + +在上一篇文章中([Creating TCP / IP (port forwarding) tunnels with SSH: The 8 scenarios possible using OpenSSH][17]),我们看到了处理端口转发的所有可能情况。但是对于静态端口转发,我们只介绍了通过 SSH 连接来访问另一个系统的端口的情况。 + +在这篇文章中,我们脱离动态端口转发的前端,而尝试补充它。 + +当我们谈论使用 SSH 进行动态端口转发时,我们谈论的是将 SSH 服务器 转换为 [SOCKS][2] 服务器。那么什么是 SOCKS 服务器? + +你知道 [Web 代理][3]是用来做什么的吗?答案可能是肯定的,因为很多公司都在使用它。它是一个直接连接到互联网的系统,允许没有互联网访问的[内部网][4]客户端通过配置浏览器的代理来请求(尽管也有[透明代理][5])浏览网页。Web 代理除了允许输出到 Internet 之外,还可以缓存页面,图像等。资源已经由某些客户端下载,所以您不必为另一个客户端而下载它们。此外,它允许过滤内容并监视用户的活动。当然了,它的基本功能是转发 HTTP 和 HTTPS 流量。 + +一个 SOCKS 服务器提供的服务类似于公司内部网络提供的代理服务器服务,但不限于 HTTP/HTTPS,它还允许转发任何 TCP/IP 流量(SOCKS 5 也是 UDP)。 + +例如,假设我们希望在一个没有直接连接到互联网的内部网上使用基于 POP3 或 ICMP 的邮件服务和 Thunderbird 的 SMTP 服务。如果我们只有一个 web 代理可以用,我们可以使用的唯一的简单方式是使用一些 webmail(也可以使用 [Thunderbird 的 Webmail 扩展][6])。我们还可以[通过 HTTP 进行隧道传递][7]来利用代理。但最简单的方式是在网络中设置一个可用的 SOCKS 服务器,它可以让我们使用 POP3、ICMP 和 SMTP,而不会造成任何的不便。 + +虽然有很多软件可以配置非常专业的 SOCKS 服务器,我们这里使用 OpenSSH 简单地设置一个: + +> ``` +> Clientessh $ ssh -D 1080 user @ servidorssh +> ``` + +或者我们可以改进一下: + +> ``` +> Clientessh $ ssh -fN -D 0.0.0.0:1080 user @ servidorssh +> ``` + +其中: + +* 选项 `-D` 类似于选项为 `-L` 和 `-R` 的静态端口转发。像这样,我们就可以让客户端只监听本地请求或从其他节点到达的请求,具体的取决于我们将请求关联到哪个地址: + + > ``` + > -D [bind_address:] port + > ``` + + 在静态端口转发中可以看到,我们使用选项 `-R` 进行反向端口转发,而动态转发是不可能的。我们只能在 SSH 客户端创建 SOCKS 服务器,而不能在 SSH 服务器端创建。 + +* 1080 是 SOCKS 服务器的典型端口,正如 8080 是 Web 代理服务器的典型端口一样。 + +* 选项 `-N` 防止了远程 shell 交互式会话的实际启动。当我们只使用 `ssh` 来建立隧道时很有用。 + +* 选项 `-f` 会使 `ssh` 停留在后台并将其与当前 `shell` 分离,以便使进程成为守护进程。如果没有选项 `-N`(或不指定命令),则不起作用,否则交互式 shell 将与后台进程不兼容。 + + 使用 [PuTTY][8] 也可以非常简单地进行端口重定向。相当于 `ssh -D 0.0.0.0:1080` 使用此配置: + +![PuTTY SOCKS](https://wesharethis.com/wp-content/uploads/2017/07/putty_socks.png) + +对于通过 SOCKS 服务器访问另一个网络的应用程序,如果应用程序提供了特殊的支持,就会非常方便(虽然不是必需的),就像浏览器支持使用代理服务器一样。浏览器(如 Firefox 或 Internet Explorer)是使用 SOCKS 服务器访问另一个网络的应用程序示例: + +![Firefox SOCKS](https://wesharethis.com/wp-content/uploads/2017/07/firefox_socks.png) + +![Internet Explorer SOCKS](https://wesharethis.com/wp-content/uploads/2017/07/internetexplorer_socks.png) + +注意:使用 [IEs 4 Linux][1] 进行捕获:如果您需要 Internet Explorer 并使用 Linux,强烈推荐! + +然而,最常见的浏览器并不要求 SOCKS 服务器,因为它们通常与代理服务器配合得更好。 + +Thunderbird 也允许这样做,而且很有用: + +![Thunderbird SOCKS](https://wesharethis.com/wp-content/uploads/2017/07/thunderbird_socks.png) + +另一个例子:[Spotify][9] 客户端同样支持 SOCKS: + +![Spotify SOCKS](https://wesharethis.com/wp-content/uploads/2017/07/spotify_socks.png) + +我们需要记住的是名称解析。有时我们会发现,在目前的网络中,我们无法解析 SOCKS 服务器另一端所要访问的系统的名称。SOCKS 5 还允许我们传播 DNS 请求(UDP 允许我们使用 SOCKS 5)并将它们发送到另一端:可以指定是否要本地或远程解析(或者也可以测试两者)。支持这一点的应用程序也必须考虑到这一点。例如,Firefox 具有参数 `network.proxy.socks_remote_dns`(在 `about:config` 中),允许我们指定远程解析。默认情况下,它在本地解析。 + +Thunderbird 也支持参数 `network.proxy.socks_remote_dns`,但由于没有地址栏来放置 `about:config`,我们需要改变它,就像在 [MozillaZine:about:config][10] 中读到的,依次点击工具→选项→高级→常规→配置编辑器(按钮)。 + +没有对 SOCKS 特殊支持的应用程序可以被 “socksified”。这对于使用 TCP/IP 的许多应用程序都没有问题,但并不是全部,这将很好地工作。“Socksifier” 包括加载一个额外的库,它可以检测对 TCP/IP 堆栈的请求,并修改它们以通过 SOCKS 服务器重定向它们,以便通信中不需要使用 SOCKS 支持进行特殊的编程。 + +在 Windows 和 [Linux.][18] 上都有 “Socksifiers”。 + +对于 Windows,我们举个例子,SocksCap 是一种非商业用途的闭源但免费的产品,我使用了很长时间都十分满意。SocksCap 由一家名为 Permeo 的公司制造,该公司是创建 SOCKS 参考技术的公司。Permeo 被 [Blue Coat][11] 买下后,它[停止了 SocksCap 项目][12]。现在你仍然可以在互联网上找到 `sc32r240.exe` 文件。[FreeCap][13] 也是面向 Windows 的免费代码项目,外观和使用都非常类似于 SocksCap。然而,它工作起来更加糟糕,多年来一直没有维护。看起来,它的作者倾向于推出需要付款的新产品 [WideCap][14]。 + +这是 SocksCap 的一个方面,当我们 “socksified” 了几个应用程序。当我们从这里启动它们时,这些应用程序将通过 SOCKS 服务器访问网络: + +![SocksCap](https://wesharethis.com/wp-content/uploads/2017/07/sockscap.png) + +在配置对话框中可以看到,如果选择了协议 SOCKS 5,我们必须选择在本地或远程解析名称: + +![SocksCap settings](https://wesharethis.com/wp-content/uploads/2017/07/sockscap_settings.png) + +在 Linux 上,一直以来我们都有许多方案来替换一个单一的远程命令。在 Debian/Ubuntu 中,命令行输出: + +> ``` +> $ Apt-cache search socks +> ``` + +输出会告诉我们很多东西 + +最著名的是 [tsocks][15] 和 [proxychains][16]。他们的工作方式大致相同:只需启动我们想要与他们 “socksify” 的应用程序,就是这样。使用 `proxychains` 的 `wget` 的例子: + +> ``` +> $ Proxychains wget http://www.google.com +> ProxyChains-3.1 (http://proxychains.sf.net) +> --19: 13: 20-- http://www.google.com/ +> Resolving www.google.com ... +> DNS-request | Www.google.com +> | S-chain | - <- - 10.23.37.3:1080-<><>-4.2.2.2:53-<><>-OK +> | DNS-response | Www.google.com is 72.14.221.147 +> 72.14.221.147 +> Connecting to www.google.com | 72.14.221.147 |: 80 ... +> | S-chain | - <- - 10.23.37.3:1080-<><>-72.14.221.147:80-<><>-OK +> Connected. +> HTTP request sent, awaiting response ... 200 OK +> Length: unspecified [text / html] +> Saving to: `index.html ' +> +> [<=>] 6,016 24.0K / s in 0.2s +> +> 19:13:21 (24.0 KB / s) - `index.html 'saved [6016] +> ``` + +为此,我们必须指定要在 `/etc/proxychains.conf` 中使用的代理服务器: + +> ``` +> [ProxyList] +> Socks5 clientessh 1080 +> ``` + +DNS 请求是远程进行的: + +> ``` +> # Proxy DNS requests - no leak for DNS data +> Proxy_dns +> ``` + +另外,在前面的输出中,我们已经看到了同一个 `proxychains` 的几条信息性的消息,而不是标有字符串 `|DNS-request|`、`|S-chain|` 或 `|DNS-response|` 行中的 `wget`。如果我们不想看到它们,也可以在配置中进行调整: + +> ``` +> # Quiet mode (no output from library) +> Quiet_mode +> ``` + +-------------------------------------------------------------------------------- + +via: https://wesharethis.com/2017/07/15/dynamic-port-forwarding-mount-socks-server-ssh/ + +作者:[Ahmad][a] +译者:[firmianay](https://github.com/firmianay) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://wesharethis.com/author/ahmad/ +[1]:https://wesharethis.com/goto/http://www.tatanka.com.br/ies4linux/page/Main_Page +[2]:https://wesharethis.com/goto/http://en.wikipedia.org/wiki/SOCKS +[3]:https://wesharethis.com/goto/http://en.wikipedia.org/wiki/Proxy_server +[4]:https://wesharethis.com/goto/http://en.wikipedia.org/wiki/Intranet +[5]:https://wesharethis.com/goto/http://en.wikipedia.org/wiki/Proxy_server#Transparent_and_non-transparent_proxy_server +[6]:https://wesharethis.com/goto/http://webmail.mozdev.org/ +[7]:https://wesharethis.com/goto/http://en.wikipedia.org/wiki/HTTP_tunnel_(software) +[8]:https://wesharethis.com/goto/http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html +[9]:https://wesharethis.com/goto/https://www.spotify.com/int/download/linux/ +[10]:https://wesharethis.com/goto/http://kb.mozillazine.org/About:config +[11]:https://wesharethis.com/goto/http://www.bluecoat.com/ +[12]:https://wesharethis.com/goto/http://www.bluecoat.com/products/sockscap +[13]:https://wesharethis.com/goto/http://www.freecap.ru/eng/ +[14]:https://wesharethis.com/goto/http://widecap.ru/en/support/ +[15]:https://wesharethis.com/goto/http://tsocks.sourceforge.net/ +[16]:https://wesharethis.com/goto/http://proxychains.sourceforge.net/ +[17]:https://wesharethis.com/2017/07/14/creating-tcp-ip-port-forwarding-tunnels-ssh-8-possible-scenarios-using-openssh/ +[18]:https://wesharethis.com/2017/07/10/linux-swap-partition/ From 9ea4734385e230f0b20ccdb1d3e38f1d85045183 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 3 Aug 2017 18:17:59 +0800 Subject: [PATCH 010/125] PRF&PUB:20170712 Robot development made easy with Husarion CORE2-ROS running Ubuntu.md @geekpi --- ... with Husarion CORE2-ROS running Ubuntu.md | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) rename {translated/tech => published}/20170712 Robot development made easy with Husarion CORE2-ROS running Ubuntu.md (68%) diff --git a/translated/tech/20170712 Robot development made easy with Husarion CORE2-ROS running Ubuntu.md b/published/20170712 Robot development made easy with Husarion CORE2-ROS running Ubuntu.md similarity index 68% rename from translated/tech/20170712 Robot development made easy with Husarion CORE2-ROS running Ubuntu.md rename to published/20170712 Robot development made easy with Husarion CORE2-ROS running Ubuntu.md index 72d1a8606e..ac8af33325 100644 --- a/translated/tech/20170712 Robot development made easy with Husarion CORE2-ROS running Ubuntu.md +++ b/published/20170712 Robot development made easy with Husarion CORE2-ROS running Ubuntu.md @@ -2,28 +2,27 @@ ============================================================ +_这是游客投稿的本系列两篇中的第一篇;作者:Dominik Nowak,Husarion 的 CEO _ -### 分享或保存 +过去十年,我们见证了 IT 行业的许多突破。可以说对消费者最有意义的一个方面是智能手机和移动开发的普及。接下来的大事件是什么,现在智能手机是如此常见,我们天天对着它,是不是有点无聊吗?所以,我们猜是:机器人。 -_这是游客投稿的本系列两篇中的第一篇;Dominik Nowak,Husarion 的 CEO _ +众所周知,许多生产线完全由机器人运行。但在消费者和服务方面,还没有看到巨大的突破。我们认为这是一个可达性和降低开发人员进入的门槛的问题。只需要有好的、简单的工具来快速做出原型和开发机器人。为了测试新的想法并赋予工程师们更多能力,以便他们可以解决许多人类仍然面临的问题,那些比在应用中的点按一下更棘手的问题。 -过去十年,我们见证了 IT 行业的许多突破。可以说对消费者最有意义的一个方面是智能手机和移动开发的普及。接下来的大事件是什么,现在智能手机是如此常见,让我们面对它,有点无聊吗?我们猜是:机器人。 - -众所周知,许多生产线完全由机器人运行。但在消费者和服务方面,还没有看到巨大的突破。我们认为这是一个无障碍的问题,并降低开发人员进入的门槛。这只需要好的,简单的工具来快速做出原型和开发机器人。为了测试新的想法并赋予工程师权利,所以他们可以解决许多人类仍然面临的问题。比应用中的点按更棘手的问题。 - -构建机器人是一个具有挑战性的任务,[Husarion][2] 团队正在努力使其更容易。Husarion 是一家从事机器人快速开发平台的机器人公司。该公司的产品是 CORE2 机器人控制器和云平台,它用于管理所有基于 CORE2 的机器人。CORE2 是第二代 Husarion 机器人控制器,它可在[这里][3]看到。 +构建机器人是一个具有挑战性的任务,[Husarion][2] 团队正在努力使其更容易。Husarion 是一家从事于机器人快速开发平台的机器人公司。该公司的产品是 CORE2 机器人控制器和用于管理所有基于 CORE2 的机器人的云平台。CORE2 是第二代 Husarion 机器人控制器,它可在[这里][3]找到。 CORE2 结合了实时微控制器板和运行 Ubuntu 的单板计算机。Ubuntu 是最受欢迎的 Linux 发行版,不仅适用于[桌面][4],还适用于物联网和 [机器人][5]程序中的嵌入式硬件。 ![](https://insights.ubuntu.com/wp-content/uploads/2c47/husarion.png) -CORE2 控制器有两种配置。第一款采用 ESP32 Wi-Fi 模块的专用于需要低功耗和实时、安全遥控的机器人应用。第二个,称为 CORE2-ROS,基本来讲集成了两块板: +CORE2 控制器有两种配置。第一款是采用 ESP32 Wi-Fi 模块的,专用于需要低功耗和实时、安全遥控的机器人应用。第二款,称为 CORE2-ROS,基本上是将两块板子集成到了一起: + - 使用实时操作系统(RTOS)的实时微控制器并集成电机、编码器和传感器接口的电路板 - 带有 ROS([Robot Operating System] [6])包的运行 Linux 的单板计算机(SBC)和其他软件工具。 -“实时”电路板做底层工作。它包含高效的 STM32F4 系列微控制器,非常适用于驱动电机、读码器、与传感器通信,并控制整个机电或机器人系统。在大多数应用中,CPU 负载不超过几个百分点,实时操作由基于 RTOS 的专用编程框架保证。我们还保证与 Arduino 库的兼容性。大多数任务都在微控制器外设中处理,如定时器、通信接口、ADC 等,它具有中断和 DMA 通道的强大支持。简而言之,对于具有其他任务的单板计算机来说,这不是一项任务。 +“实时”电路板做底层工作。它包含高效的 STM32F4 系列微控制器,非常适用于驱动电机、读码器、与传感器通信,并控制整个机电或机器人系统。在大多数应用中,CPU 负载不超过几个百分点,实时操作由基于 RTOS 的专用编程框架支持。我们还保证与 Arduino 库的兼容性。大多数任务都在微控制器外设中处理,如定时器、通信接口、ADC 等,它具有中断和 DMA 通道的强大支持。简而言之,对于具有其他任务的单板计算机来说,这不是一项任务。 + +另一方面,很显然,现代先进的机器人程序不能仅仅基于微控制器,原因如下: -另一方面,很显然,现代和先进的机器人程序不能仅仅基于微控制器,原因如下: - 自动机器人需要大量的处理能力来执行导航、图像和声音识别、移动等等, - 编写先进的软件需要标准化才能有效 - SBC 在行业中越来越受欢迎,而对于为 SBC 编写的软件也是如此,这与 PC 电脑非常相似 - SBC 每年都变得越来越便宜 @@ -31,15 +30,15 @@ CORE2 控制器有两种配置。第一款采用 ESP32 Wi-Fi 模块的专用于 CORE2-ROS 控制器有两种配置:[Raspberry Pi 3][7] 或 [ASUS Tinker Board][8]。CORE-ROS 运行于 Ubuntu、Husarion 开发和管理工具以及 ROS 软件包上。 -下篇文章将发现为何 Husarion 决定使用 Ubuntu +下篇文章将介绍为何 Husarion 决定使用 Ubuntu 。 -------------------------------------------------------------------------------- via: https://insights.ubuntu.com/2017/07/12/robot-development-made-easy-with-husarion-core2-ros-running-ubuntu/ -作者:[Guest ][a] +作者:[Dominik Nowak][a] 译者:[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/) 荣誉推出 From cfaa4631146d6d4aa89c6853b1875e1847e2b692 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 3 Aug 2017 19:56:22 +0800 Subject: [PATCH 011/125] PRF&PUB:20170712 Storage management in LXD 2.15.md @geekpi --- ...20170712 Storage management in LXD 2.15.md | 27 ++++++++----------- 1 file changed, 11 insertions(+), 16 deletions(-) rename {translated/tech => published}/20170712 Storage management in LXD 2.15.md (83%) diff --git a/translated/tech/20170712 Storage management in LXD 2.15.md b/published/20170712 Storage management in LXD 2.15.md similarity index 83% rename from translated/tech/20170712 Storage management in LXD 2.15.md rename to published/20170712 Storage management in LXD 2.15.md index 9bd6b2483b..16e4ec9c3c 100644 --- a/translated/tech/20170712 Storage management in LXD 2.15.md +++ b/published/20170712 Storage management in LXD 2.15.md @@ -1,31 +1,27 @@ LXD 2.15 中的存储管理 ============================================================ - -### 分享或保存 - ![containers](https://cbrauner.files.wordpress.com/2017/07/containers.png?w=1008) -长久以来 LXD 已经支持多种存储驱动。用户可以在 zfs、btrfs、lvm 或纯目录存储池之间进行选择,但它们只能使用单个存储池。一个被频繁被提到的需求是不仅支持单个存储池,还支持多个存储池。这样,用户可以维护一个由 SSD 支持的 zfs 存储池用于 I/O 密集型容器,另一个简单的基于目录的存储池用于其他容器。幸运的是,现在这是可能的,因为 LXD 在几个版本后有了自己的存储管理 API。 +长久以来 LXD 已经支持多种存储驱动。用户可以在 zfs、btrfs、lvm 或纯目录存储池之间进行选择,但他们只能使用单个存储池。一个被频繁被提到的需求是不仅支持单个存储池,还支持多个存储池。这样,用户可以维护一个由 SSD 支持的 zfs 存储池用于 I/O 密集型容器,另一个简单的基于目录的存储池用于其他容器。幸运的是,现在这是可能的,因为 LXD 在几个版本后有了自己的存储管理 API。 ### 创建存储池 新安装 LXD 没有定义任何存储池。如果你运行 `lxd init` ,LXD 将提供为你创建一个存储池。由 `lxd init` 创建的存储池将是创建容器的默认存储池。 - - [![asciicast](https://asciinema.org/a/126892.png)][2] +[![asciicast](https://asciinema.org/a/126892.png)][2] ### 创建更多的存储池 我们的客户端工具使得创建额外的存储池变得非常简单。为了创建和管理新的存储池,你可以使用 `lxc storage` 命令。所以如果你想在块设备 `/dev/sdb` 上创建一个额外的 btrfs 存储池,你只需使用 `lxc storage create my-btrfs btrfs source=/dev/sdb`。让我们来看看: - [![asciicast](https://asciinema.org/a/128580.png)][3] +[![asciicast](https://asciinema.org/a/128580.png)][3] ### 在默认存储池上创建容器 -如果你从全新安装的 LXD 开始,并通过 `lxd init` 创建了一个存储池,LXD 将使用此池作为默认存储池。这意味着如果你执行 `lxc launch images:ubuntu/xenial xen1`,LXD 将为此存储池上的容器的根文件系统创建一个存储卷。在示例中,我们使用 `my-first-zfs-pool` 作为默认存储池 +如果你从全新安装的 LXD 开始,并通过 `lxd init` 创建了一个存储池,LXD 将使用此池作为默认存储池。这意味着如果你执行 `lxc launch images:ubuntu/xenial xen1`,LXD 将为此存储池上的容器的根文件系统创建一个存储卷。在示例中,我们使用 `my-first-zfs-pool` 作为默认存储池。 - [![asciicast](https://asciinema.org/a/128582.png)][4] +[![asciicast](https://asciinema.org/a/128582.png)][4] ### 在特定存储池上创建容器 @@ -37,24 +33,23 @@ LXD 2.15 中的存储管理 如果你其中一个容器需要额外的空间存储额外的数据,那么新的存储 API 将允许你创建可以连接到容器的存储卷。只需要 `lxc storage volume create my-btrfs my-custom-volume`: - [![asciicast](https://asciinema.org/a/128584.png)][6] +[![asciicast](https://asciinema.org/a/128584.png)][6] ### 连接自定义卷到容器中 -Of course this feature is only helpful because the storage API let’s you attach those storage volume to containers. To attach a storage volume to a container you can use `lxc storage volume attach my-btrfs my-custom-volume xen1 data /opt/my/data`: 当然,这个功能是有用的,因为存储 API 让你把这些存储卷连接到容器。要将存储卷连接到容器,可以使用 `lxc storage volume attach my-btrfs my-custom-volume xen1 data /opt/my/data`: - [![asciicast](https://asciinema.org/a/128585.png)][7] +[![asciicast](https://asciinema.org/a/128585.png)][7] ### 在容器之间共享自定义存储卷 默认情况下,LXD 将使连接的存储卷由其所连接的容器写入。这意味着它会将存储卷的所有权更改为容器的 id 映射。但存储卷也可以同时连接到多个容器。这对于在多个容器之间共享数据是非常好的。但是,这有一些限制。为了将存储卷连接到多个容器,它们必须共享相同的 id 映射。让我们创建一个额外的具有一个隔离的 id 映射的容器 `xen-isolated`。这意味着它的 id 映射在这个 LXD 实例中将是唯一的,因此没有其他容器具有相同的id映射。将相同的存储卷 `my-custom-volume` 连接到此容器现在将会失败: - [![asciicast](https://asciinema.org/a/128588.png)][8] +[![asciicast](https://asciinema.org/a/128588.png)][8] 但是我们让 `xen-isolated` 与 `xen1` 有相同的映射,并把它重命名为 `xen2` 来反映这个变化。现在我们可以将 `my-custom-volume` 连接到 `xen1` 和 `xen2` 而不会有问题: - [![asciicast](https://asciinema.org/a/128593.png)][9] +[![asciicast](https://asciinema.org/a/128593.png)][9] ### 总结 @@ -66,9 +61,9 @@ Of course this feature is only helpful because the storage API let’s you attac via: https://insights.ubuntu.com/2017/07/12/storage-management-in-lxd-2-15/ -作者:[Christian Brauner ][a] +作者:[Christian Brauner][a] 译者:[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/) 荣誉推出 From e3d74c0a1473863784a89fe42b1219d5f80e521e Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 3 Aug 2017 22:58:27 +0800 Subject: [PATCH 012/125] PRF:20170731 Docker vs. Kubernetes vs. Apache Mesos Why What You Think You Know is Probably Wrong.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @rieonke 翻译的很好很流畅! --- ...at You Think You Know is Probably Wrong.md | 109 ++++++++---------- 1 file changed, 48 insertions(+), 61 deletions(-) diff --git a/translated/tech/20170731 Docker vs. Kubernetes vs. Apache Mesos Why What You Think You Know is Probably Wrong.md b/translated/tech/20170731 Docker vs. Kubernetes vs. Apache Mesos Why What You Think You Know is Probably Wrong.md index 7fc838b30f..a405e18300 100644 --- a/translated/tech/20170731 Docker vs. Kubernetes vs. Apache Mesos Why What You Think You Know is Probably Wrong.md +++ b/translated/tech/20170731 Docker vs. Kubernetes vs. Apache Mesos Why What You Think You Know is Probably Wrong.md @@ -1,120 +1,107 @@ -Docker vs. Kubernetes vs. Apache Mesos: 为什么你认为你知道的可能是错的 +Docker、Kubernetes 和 Apache Mesos 对比中的一些误区 ============================================================ -有无数的文章、讨论、以及很多社区喋喋不休地比较 Docker ,Kubernetes 和 Mesos。如果你只是听信了只言片语,你可能会认为这三个开源项目正为了称霸容器界而殊死搏斗。你还相信从他们中选出一个来几乎是一种宗教选择;真正的信徒忠于他们的信仰,烧死那些异教徒,谁还敢考虑一个替代的方案。 +有无数的文章、讨论、以及很多社区喋喋不休地比较 Docker、Kubernetes 和 Mesos。如果你只是听信了只言片语,你可能会认为这三个开源项目正为了称霸容器界而殊死搏斗。你可能还相信从他们中选出一个如宗教信仰般神圣——真正的信徒会忠于他们的信仰,而且会烧死那些敢于考虑替代方案的异教徒。 那都是废话。 -虽然所有这三种技术都使得使用容器来部署、管理和伸缩应用成为可能,但实际上它们各自解决了不同的问题,并且根植于迥异的上下文环境中。事实上,这三种被广泛采用的工具,都是有差别的。 +虽然所有这三种技术都使得使用容器来部署、管理和伸缩应用成为可能,但实际上它们各自解决了不同的问题,并且根植于迥异的上下文环境中。事实上,这三种被广泛采用的工具链,都是有差别的。 -让我们重新审视每个项目的原始任务,技术架构,以及他们如何相互补充和交互。而不是纠结于比较这些快速迭代的技术之间重叠的特性。 +让我们重新审视每个项目的原始任务、技术架构,以及它们是如何相互补充和交互的,而不是纠结于比较这些快速迭代的技术之间重叠的特性。 -### 让我们从Docker开始… +### 让我们从 Docker 开始…… -Docker 公司, 始于名为dotCloud的平台即服务(PaaS)供应商。dotCloud团队发现,在许多应用和客户之间管理依赖和二进制文件时需要付出大量的工作。因此他们将Linux cgroups和namespace的一些功能合并成一个单一且易于使用的包,以便于应用程序可以在任何基础设施上一致地运行。这个包就是Docker镜像。Docker镜像提供了如下的功能: +Docker 公司,始于名为 dotCloud 的平台即服务(PaaS)供应商。dotCloud 团队发现,在许多应用和客户之间管理依赖和二进制文件时需要付出大量的工作。因此他们将 Linux 的 [cgroups][1] 和 namespace 的一些功能合并成一个单一且易于使用的软件包,以便于应用程序可以一致地运行在任何基础设施上。这个软件包就是所谓的 [Docker 镜像][2],它提供了如下的功能: -* 将应用程序和依赖库封装在一个包( Docker 镜像)中, 因此应用可以被一致地部署在各个环境上; +* **将应用程序和依赖库封装在一个软件包**(即 Docker 镜像)中,因此应用可以被一致地部署在各个环境上; +* **提供类似 Git 的语义**,例如 `docker push`,`docker commit` 等命令让应用开发者可以快速接受这门新的技术,并将其融入到现有的工作流中; +* **定义 Docker 镜像为不可变的层**,支持不可变的基础设施。新提交的变更被分别保存为只读层,让复用镜像和追踪变更记录变得十分简单。层还通过只传输更新而不是整个镜像来节省磁盘空间和网络流量; +* **通过实例化不可变的镜像**和读写层来运行 Docker 容器,读写层可以临时地存储运行时变更,从而轻松部署和扩展应用程序的多个实例。 -* 提供类似 Git 的语义, 例如“docker push”,“docker commit”等命令让应用开发者可以快速接受这门新的技术,并将其融入到现有的工作流中; +Docker 变得越来越受欢迎,开发者们开始从在笔记本电脑上运行容器转而在生产环境中运行容器。跨多个机器之间协调这些容器需要额外的工具,这称之为容器编排container orchestration。有趣的是,第一个支持 Docker 镜像的容器编排工具(2014 年 6月)是 Apache Mesos 的 [Marathon][3](后面会有详细介绍) 。那年,Docker 的创始人兼首席技术官 Solomon Hykes 将 Mesos 推荐为“[生产集群的黄金标准][4]”。不久之后,除了 Mesos 的 Marathon 之外,还出现了许多的容器编排技术:[Nomad][4]、[Kubernetes][5],不出所料还有 Docker Swarm ([它如今是 Docker 引擎的一部分][7])。 -* 定义 Docker 镜像为不可变的层, 支持不可变的基础设施。新提交的变更被分别保存为只读层,让复用镜像和追踪变更记录变得十分简单。层还通过只传输更新而不是整个镜像来节省磁盘空间和网络流量; +随着 Docker 开始商业化其开源的文件格式(LCTT 译注:指 Docker 镜像的 dockerfile 文件格式),该公司还开始引入工具来完善其核心的 Docker 文件格式和运行时引擎,包括: -* 通过实例化不可变的镜像和读写层来运行 Docker 容器,读写层可以临时地存储运行时变更,从而轻松部署和扩展应用程序的多个实例; - -Docker 变得越来越受欢迎,开发者们开始从笔记本电脑上运行容器迁移到生产环境中。 跨多个机器之间协调这些容器需要额外的工具,称之为容器编排。有趣的是,第一个支持 Docker 镜像(2014 年 6月)的容器编排工具是 Apache Mesos(后面会有详细介绍) 的[Marathon][3]。那年,Docker的创始人兼首席技术官Solomon Hykes将Mesos推荐为“[生产集群的黄金标准][4]”。不久之后,除了Mesos 的Marathon 之外,还有出现了许多的容器编排技术:[Nomad][4],[Kubernetes][5],不出所料还有Docker Swarm([如今是Docker 引擎的一部分][7])。 - -随着Docker开始将其开源产品商业化,该公司还开始引入工具来补充Docker核心和运行时引擎,包括: - -* 为存储公共Docker镜像的而生的Docker hub; - -* 存储私有镜像的 Docker 仓库(Docker registry); - -* Docker cloud,用于构建和运行容器的服务; - -* Docker 数据中心作为一种商业产品体现了许多Docker技术; +* 为公开存储 Docker 镜像的而生的 Docker hub; +* 存储私有镜像的 Docker 仓库(Docker registry); +* Docker cloud,用于构建和运行容器的管理性服务; +* Docker 数据中心作为一种商业产品体现了许多 Docker 技术; ![Docker](https://mesosphere.com/wp-content/uploads/2017/07/docker-host.png) -来源: www.docker.com. +*来源: www.docker.com* -Docker 将软件及其依赖关系封装在一个软件包中的洞察力改变了软件行业的游戏规则,正如mp3的出现重塑了音乐行业一般。Docker 成为行业标准,领先的容器技术供应商(包括Docker,Google,Pivotal,Mesosphere 等) 组建了 [Cloud Native Computing Foundation (CNCF)][8] 和 [Open Container Initiative (OCI)][9]。如今, CNCF 和 OCI 旨在确保容器技术之间的互操性和标准化接口,并确保使用任何工具构建的任何Docker容器都可以在任何运行时或基础架构上运行。 +Docker 将软件及其依赖关系封装在一个软件包中的洞察力改变了软件行业的游戏规则,正如 mp3 的出现重塑了音乐行业一般。Docker 文件格式成为行业标准,领先的容器技术供应商(包括 Docker、Google、Pivotal、Mesosphere 等) 组建了 [云计算基金会Cloud Native Computing Foundation (CNCF)][8] 和 [开放容器推进联盟Open Container Initiative (OCI)][9]。如今,CNCF 和 OCI 旨在确保容器技术之间的互操性和标准化接口,并确保使用任何工具构建的任何 Docker 容器都可以在任何运行时或基础架构上运行。 ### 进入 Kubernetes -Google很早就认识到了Docker的潜力,并试图在Google Cloud Platform上提供容器业务流程“即服务”。 Google在容器方面拥有丰富的经验(他们在Linux中引入了cgroups),但现有的内部容器和Borg等分布式计算工具直接与其原有基础架构相耦合。所以,Google没有使用原有系统的任何代码,而是从头开始设计Kubernetes来编排Docker容器。 Kubernetes于2015年2月发布,目标和考虑如下: +Google 很早就认识到了 Docker 的潜力,并试图在 Google Cloud Platform (GCP)上提供容器编排“即服务”。 Google 在容器方面拥有丰富的经验(是他们在 Linux 中引入了 cgroups),但现有的内部容器和 Borg 等分布式计算工具直接与其基础架构相耦合。所以,Google 没有使用原有系统的任何代码,而是从头开始设计 Kubernetes (K8S)来编排 Docker 容器。 Kubernetes 于 2015 年 2 月发布,其目标和考虑如下: -* 为应用程序开发人员提供编排Docker容器的强大工具,而无需与底层基础设施交互; +* **为应用程序开发人员提供**编排 Docker 容器的强大工具,而无需与底层基础设施交互; +* **提供标准部署接口**和原语,以实现云端一致的应用部署体验和 API; +* **基于模块化 API 核心**,允许供应商围绕 Kubernetes 的核心技术集成其系统。 -* 提供标准部署接口和原语 ,以实现云端一致的应用部署体验和API; - -* 基于模块化API核心,允许供应商围绕Kubernetes的核心技术集成其系统。 - -2016年3月,Google[将Kubernetes捐赠][10]给了CNCF,今天仍然是该项目的主要负责人(其次是Redhat,CoreOS等)。 +2016 年 3 月,Google [将 Kubernetes 捐赠][10]给了 CNCF,并且直到今天仍然是该项目的主要贡献者(其次是Redhat,CoreOS 等)。 ![Kubernetes](https://mesosphere.com/wp-content/uploads/2017/07/kubernetes-architecture.png) -来源: wikipedia +*来源: wikipedia* -Kubernetes对应用程序开发人员非常有吸引力,因为它减轻了对基础架构和运营团队的依赖程度。供应商也喜欢Kubernetes,因为它提供了一个容易的方式来拥抱容器化运动,并为客户部署Kubernetes(这仍然是一个非常重要的工作)提供商业解决方案。 Kubernetes也是有吸引力的,因为它是CNCF旗下的开源项目,与Docker Swarm相反,Docker Swarm尽管是开源的,但是被Docker公司紧紧地掌控着。 +Kubernetes 对应用程序开发人员非常有吸引力,因为它减轻了对基础架构和运营团队的依赖程度。供应商也喜欢 Kubernetes,因为它提供了一个容易的方式来拥抱容器化运动,并为客户部署自己的 Kubernetes(这仍然是一个值得重视的挑战)提供商业解决方案。 Kubernetes 也是有吸引力的,因为它是 CNCF 旗下的开源项目,与 Docker Swarm 相反,Docker Swarm 尽管是开源的,但是被 Docker 公司紧紧地掌控着。 - -Kubernetes的核心优势是为应用程序开发人员提供了用于编排无状态Docker容器的强大工具。 虽然有多个扩大项目范围的提议,以提供更多的功能(例如分析和有状态数据服务)。虽然这些提议仍处于非常早期的阶段,他们能取得多大的成功还有待观察。 +Kubernetes 的核心优势是为应用程序开发人员提供了用于编排无状态 Docker 容器的强大工具。 虽然有多个扩大项目范围的提议,以提供更多的功能(例如分析和有状态数据服务),但这些提议仍处于非常早期的阶段,它们能取得多大的成功还有待观察。 ### Apache Mesos -Apache Mesos 始于加州大学伯克利分校(UC Berkeley)的下一代容器集群管理器项目,并应用了从云计算分布式计算基础架构(如[Google的Borg][11]和[Facebook的Tupperware][12])中习得的经验和教训。 虽然Borg和Tupperware具有单一的架构,并且是与物理基础架构紧密结合的闭源专有技术,但Mesos推出了一种模块化架构,一种开源开发方法,旨在完全独立于基础架构。Mesos迅速被 [Twitter][13],[Apple(Siri)][14], [Yelp][15], [Uber][16], [Netflix][17] 和许多领先的技术公司采用,支持从微服务,大数据和实时分析到弹性扩展的一切。 +Apache Mesos 始于加州大学伯克利分校UC Berkeley的下一代容器集群管理器项目,并应用了从云计算级别的分布式基础架构(如 [Google 的 Borg][11] 和 [Facebook 的 Tupperware][12])中习得的经验和教训。 虽然 Borg 和 Tupperware 具有单一的架构,并且是与物理基础架构紧密结合的闭源专有技术,但 Mesos 推出了一种模块化架构,一种开源的开发方法,旨在完全独立于基础架构。Mesos 迅速被 [Twitter][13]、[Apple(Siri 中)][14]、[Yelp][15]、[Uber][16]、[Netflix][17] 和许多领先的技术公司采用,支持从微服务、大数据和实时分析到弹性扩展的一切。 -作为集群管理器,Mesos被设计用来解决一系列不同的挑战: +作为集群管理器,Mesos 被设计用来解决一系列不同的挑战: -* 将数据中心资源抽象为单个池来简化资源分配,同时在私有云或公有云中提供一致的应用和运维体验; +* **将数据中心资源抽象**为单个池来简化资源分配,同时在私有云或公有云中提供一致的应用和运维体验; +* 在相同的基础架构上**协调多个工作负载**,如分析、无状态微服务、分布式数据服务和传统应用程序,以提高利用率,降低成本和台面空间; +* 为应用程序特定的任务(如部署、自我修复、扩展和升级),**自动执行第二天的操作**;提供高度可用的容错基础设施; +* **提供持久的可扩展性**来运行新的应用程序和技术,而无需修改集群管理器或其上构建的任何现有应用程序; +* **弹性扩展**可以将应用程序和底层基础设施从少量扩展到数十到数万个节点。 -* 在相同的基础架构上协调多个工作负载,如分析、无状态微服务、分布式数据服务和传统应用程序,以提高利用率,降低成本和台面空间; - -* 为应用程序特定的任务(如部署,自我修复,扩展和升级),自动执行第二天的操作;提供高度可用的容错基础设施; - -* 提供持久的可扩展性来运行新的应用程序和技术,而无需修改集群管理器或其上构建的任何现有应用程序;提供常规的可扩展性来运行新的应用程序和技术,而无需修改集群管理器或其上构建的任何现有应用程序; - -* 弹性扩展,将应用程序和底层基础设施从少量扩展到数十到数万个节点。 - - -Mesos独有的独立管理各种工作负载的能力 - 包括传统应用程序,如Java,无状态Docker微服务,批处理作业,实时分析和有状态的分布式数据服务。Mesos广泛的工作负载覆盖来自于其两级架构,从而实现了“应用感知”调度。 通过将应用程序特定的操作逻辑封装在“Mesos框架”(类似于操作中的运行手册)中来实现应用程序感知调度。资源管理器Mesos Master提供这些框架基础架构的部分,同时保持隔离。这种方法允许每个工作负载都有自己的专门构建的应用程序调度程序,可以了解其部署,扩展和升级的特定操作要求。 应用程序调度程序也是独立开发,管理和更新的,这让Mesos拥有高可扩展的能力,支持新的工作负载或随着时间的推移增加更多的操作功能。 +Mesos 独有的独立管理各种工作负载的能力 —— 包括 Java 这样的传统应用程序、无状态 Docker 微服务、批处理作业、实时分析和有状态的分布式数据服务。Mesos 广泛的工作负载覆盖来自于其两级架构,从而实现了“应用感知”调度。通过将应用程序特定的操作逻辑封装在“Mesos 框架”(类似于操作中的运行手册)中来实现应用程序感知调度。资源管理器 Mesos Master 提供了这些框架基础架构的部分,同时保持隔离。这种方法允许每个工作负载都有自己的专门构建的应用程序调度程序,可以了解其部署、扩展和升级的特定操作要求。应用程序调度程序也是独立开发、管理和更新的,这让 Mesos 拥有高度可扩展的能力,支持新的工作负载或随着时间的推移而增加更多的操作功能。 ![Mesos two-level scheduler](https://mesosphere.com/wp-content/uploads/2017/07/mesos-two-level-scheduler.png) -举一个例子,团队如何管理应用软件升级。 无状态应用程序可以从[“蓝/绿”][18]部署方案中受益;当新版本的应用运行起来时,原先旧版本的软件依然还正常运转着,然后当旧应用被销毁时流量将会切换到新的应用上。但是升级数据工作负载例如 HDFS 或者 Cassandra 要求节点停机一次,此时需要持久化本地数据以防止数据丢失,并且按照特定的顺序执行原位升级,在升级之前和升级完成之后,都要在每一个节点类型上执行特定的检查和命令。任何这些步骤都是应用程序或服务特定的,甚至可能是版本特定的。 这让使用常规容器编排调度程序来管理数据服务变得非常困难。 -Mesos以每一个工作负载所需的特定方式管理各种工作负载,使得许多公司将Mesos作为一个统一的平台,将微服务和数据服务结合在一起。数据密集型应用程序的通用参考架构是[“SMACK”][19](译者按:SMACK即Spark,Mesos,Akka,Cassandra,Kafka)。 +举一个团队如何管理应用软件升级的例子。无状态应用程序可以从[“蓝/绿”][18]部署方案中受益;当新版本的应用运行起来时,原先旧版本的软件依然还正常运转着,然后当旧应用被销毁时流量将会切换到新的应用上。但是升级数据工作负载例如 HDFS 或者 Cassandra 要求节点停机一次,此时需要持久化本地数据卷以防止数据丢失,并且按照特定的顺序执行原位升级,在升级之前和升级完成之后,都要在每一个节点类型上执行特定的检查和命令。任何这些步骤都是应用程序或服务特定的,甚至可能是版本特定的。这让使用常规容器编排调度程序来管理数据服务变得非常困难。 + +Mesos 以每一个工作负载所需的特定方式管理各种工作负载,使得许多公司将 Mesos 作为一个统一的平台,将微服务和数据服务结合在一起。数据密集型应用程序的通用参考架构是 [“SMACK 家族”][19](LCTT 译注:SMACK 即Spark、Mesos、Akka、Cassandra、Kafka)。 ### 是时候搞清楚这些了 -请注意,我们尚未对Apache Mesos的容器编排有任何描述。所以为什么人们会自动地将Mesos和容器编排联系起来呢?容器编排是可以在Mesos的模块化架构上运行的工作负载的一个例子,它是通过一个专门的编排“框架”来完成的,这个框架就Marathon,一个构建于Mesos之上的工具。 Marathon最初是为了在[cgroup][20] 容器中编排应用文档(如JAR,tarballs,ZIP文件)而开发的,是2014年最先支持Docker容器的编排工具之一。 +请注意,我们尚未对 Apache Mesos 的容器编排有任何描述。所以为什么人们会自动地将 Mesos 和容器编排联系起来呢?容器编排是可以在 Mesos 的模块化架构上运行的工作负载的一个例子,它是通过一个专门的编排“框架”来完成的,这个框架就 Marathon,一个构建于 Mesos 之上的工具。 Marathon 最初是为了在 [cgroup][20] 容器中编排应用归档(如 JAR、tarball、ZIP 文件)而开发的,是 2014 年最先支持 Docker 容器的编排工具之一。 -所以当人们将Docker和Kubernetes与Mesos进行比较时,他们实际上是将Kubernetes和Docker Swarm与在Mesos上运行的Marathon进行了比较。 +所以当人们将 Docker 和 Kubernetes 与 Mesos 进行比较时,他们实际上是将 Kubernetes 和 Docker Swarm 与在 Mesos 上运行的 Marathon 进行比较。 -为什么搞清楚这一点很重要? 因为Mesos坦率地讲并不在乎它上面运行了什么。 Mesos可以在共享的基础设施上弹性地为Java应用服务器提供集群服务,Docker容器编排,Jenkins 持续集成任务,Apache Spark分析,Apache Kafka 流,以及更多其他的服务。Mesoss甚至可以运行Kubernetes 或者其他的容器编排工具,即使公共的集成目前还不可用。 +为什么搞清楚这一点很重要? 因为 Mesos 坦率地讲并不在乎它上面运行了什么。 Mesos 可以在共享的基础设施上弹性地为 Java 应用服务器提供集群服务、Docker 容器编排、Jenkins 持续集成任务、Apache Spark 分析、Apache Kafka 流,以及更多其他的服务。Mesos 甚至可以运行 Kubernetes 或者其他的容器编排工具,即使公共的集成目前还不可用。 ![Mesos Workloads](https://mesosphere.com/wp-content/uploads/2017/07/mesos-workloads.png) -来源: Apache Mesos 调查 2016 +*来源: Apache Mesos 2016 调查问卷* -Mesos的另一个考虑因素(也是为什么它对许多企业架构师来说如此有吸引力)是运行关键任务工作负载的成熟度。 Mesos已经在大规模生产环境下(成千上万台服务器)运行了超过7年的时间,这就是为什么它比市场上许多其他的容器技术更具有生产上的可行性和扩展上的可靠性。 +Mesos 的另一个考虑因素(也是为什么它对许多企业架构师来说如此有吸引力)是运行关键任务工作负载的成熟度。 Mesos 已经在大规模生产环境下(成千上万台服务器)运行了超过 7 年的时间,这就是为什么它比市场上许多其他的容器技术更具有生产上的可行性和扩展上的可靠性。 ### 我所说的这些什么意思? -总而言之,所有这三种技术都与Docker容器有关,可以让你在容器编排上实现应用程序的可移植性和扩展性。那么你在它们之间如何选择呢? 归根到底是为工作选择合适的工具(也可能是为不同的工作选择不同的工具)。如果您是一个应用开发人员,正在寻找现代化的方式来构建和打包你的应用程序,或者加速你的微服务计划,Docker容器和开发工具就是最好的选择。 +总而言之,所有这三种技术都与 Docker 容器有关,可以让你在容器编排上实现应用程序的可移植性和扩展性。那么你在它们之间如何选择呢? 归根到底是为工作选择合适的工具(也可能是为不同的工作选择不同的工具)。如果您是一个应用开发人员,正在寻找现代化的方式来构建和打包你的应用程序,或者想加速你的微服务计划,Docker 容器和开发工具就是最好的选择。 -如果你们是一个dev / devops团队,并希望构建一个专门用于Docker容器编排的系统,而且愿意花时间折腾集成解决方案与底层基础设施(或依靠公共云基础架构,如Google容器引擎或Azure容器服务),Kubernetes是一个可以考虑的好技术。 +如果你们是一个开发人员或者 DevOps 的团队,并希望构建一个专门用于 Docker 容器编排的系统,而且愿意花时间折腾集成解决方案与底层基础设施(或依靠公共云基础架构,如 Google 容器引擎(GCE)或 Azure 容器服务(ACS)),Kubernetes 是一个可以考虑的好技术。 -如果你们需要建立一个运行多个关键任务工作负载的可靠平台,包括Docker容器,旧的应用程序(例如Java)和分布式数据服务(例如Spark,Kafka,Cassandra,Elastic),并希望所有这些可依移植到云端提供商或者数据中心,那么Mesos(或我们自己的Mesos发行版,Mesosphere DC / OS)更适合你们的需求。 +如果你们想要建立一个运行多个关键任务工作负载的可靠平台,包括 Docker 容器、传统应用程序(例如 Java)和分布式数据服务(例如 Spark、Kafka、Cassandra、Elastic),并希望所有这些可依移植到云端提供商或者数据中心,那么 Mesos(或我们自己的 Mesos 发行版,Mesosphere DC/OS)更适合你们的需求。 -无论您选择什么,您都将拥抱一套可以更有效地利用服务器资源的工具,简化应用程序的可移植性,并提高开发人员的敏捷性。 你的选择真的不会有错。 +无论您选择什么,您都将拥抱一套可以更有效地利用服务器资源的工具,简化应用程序的可移植性,并提高开发人员的敏捷性。你的选择真的不会有错。 -------------------------------------------------------------------------------- via: https://mesosphere.com/blog/docker-vs-kubernetes-vs-apache-mesos/ -作者:[Amr Abdelrazik ][a] +作者:[Amr Abdelrazik][a] 译者:[rieonke](https://github.com/rieonke) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From de6e10bdfce6e20c420cd1dbdf71344ee8cbbaff Mon Sep 17 00:00:00 2001 From: Snaplee <30320680+Snaplee@users.noreply.github.com> Date: Thu, 3 Aug 2017 23:20:03 +0800 Subject: [PATCH 013/125] =?UTF-8?q?Snaplee=E7=BF=BB=E8=AF=91=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...711 Ubuntu Core Making a factory image with private snaps.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20170711 Ubuntu Core Making a factory image with private snaps.md b/sources/tech/20170711 Ubuntu Core Making a factory image with private snaps.md index a5938fcf75..40ec62e68b 100644 --- a/sources/tech/20170711 Ubuntu Core Making a factory image with private snaps.md +++ b/sources/tech/20170711 Ubuntu Core Making a factory image with private snaps.md @@ -1,4 +1,4 @@ -Ubuntu Core: Making a factory image with private snaps +【Snaplee翻译中】Ubuntu Core: Making a factory image with private snaps ============================================================ From cbaab3384b48a662cccd75e2b0246b46bf52fd10 Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 4 Aug 2017 08:45:13 +0800 Subject: [PATCH 014/125] translating --- sources/tech/20170120 lxc exec vs ssh.md | 103 ------------------- translated/tech/20170120 lxc exec vs ssh.md | 104 ++++++++++++++++++++ 2 files changed, 104 insertions(+), 103 deletions(-) delete mode 100644 sources/tech/20170120 lxc exec vs ssh.md create mode 100644 translated/tech/20170120 lxc exec vs ssh.md diff --git a/sources/tech/20170120 lxc exec vs ssh.md b/sources/tech/20170120 lxc exec vs ssh.md deleted file mode 100644 index eba94834fc..0000000000 --- a/sources/tech/20170120 lxc exec vs ssh.md +++ /dev/null @@ -1,103 +0,0 @@ -translating----geekpi - -lxc exec vs ssh -============================================================ - - -Recently, I’ve implemented several improvements for `lxc exec`. In case you didn’t know, `lxc exec` is [LXD][1]‘s client tool that uses the [LXD][2] [client api][3] to talk to the LXD daemon and execute any program the user might want. Here is a small example of what you can do with it: - - [![asciicast](https://asciinema.org/a/100035.png)][4] - -One of our main goals is to make `lxc exec` feel as similar to `ssh` as possible since this is the standard of running commands interactively or non-interactively remotely. Making `lxc exec` behave nicely was tricky. - -### 1\. Handling background tasks - -A long-standing problem was certainly how to correctly handle background tasks. Here’s an asciinema illustration of the problem with a pre [LXD][5] 2.7 instance: - - [![asciicast](https://asciinema.org/a/100040.png)][6] - -What you can see there is that putting a task in the background will lead to `lxc exec` not being able to exit. A lot of sequences of commands can trigger this problem: - -``` -chb@conventiont|~ -> lxc exec zest1 bash -root@zest1:~# yes & -y -y -y -. -. -. -``` - -Nothing would save you now. `yes` will simply write to `stdout` till the end of time as quickly as it can… -The root of the problem lies with `stdout` being kept open which is necessary to ensure that any data written by the process the user has started is actually read and sent back over the websocket connection we established. -As you can imagine this becomes a major annoyance when you e.g. run a shell session in which you want to run a process in the background and then quickly want to exit. Sorry, you are out of luck. Well, you were. -The first, and naive approach is obviously to simply close `stdout` as soon as you detect that the foreground program (e.g. the shell) has exited. Not quite as good as an idea as one might think… The problem becomes obvious when you then run quickly executing programs like: - -``` -lxc exec -- ls -al /usr/lib -``` - -where the `lxc exec` process (and the associated `forkexec` process (Don’t worry about it now. Just remember that `Go` + `setns()` are not on speaking terms…)) exits before all  _buffered_  data in `stdout` was read. In this case you will cause truncated output and no one wants that. After a few approaches to the problem that involved, disabling pty buffering (Wasn’t pretty I tell you that and also didn’t work predictably.) and other weird ideas I managed to solve this by employing a few `poll()` “tricks” (In some sense of the word “trick”.). Now you can finally run background tasks and cleanly exit. To wit: - [![asciicast](https://asciinema.org/a/100043.png)][7] - -### 2\. Reporting exit codes caused by signals - -`ssh` is a wonderful tool. One thing however, I never really liked was the fact that when the command that was run by ssh received a signal `ssh` would always report `-1` aka exit code `255`. This is annoying when you’d like to have information about what signal caused the program to terminate. This is why I recently implemented the standard shell convention of reporting any signal-caused exits using the standard convention `128 + n` where `n` is defined as the signal number that caused the executing program to exit. For example, on `SIGKILL` you would see `128 + SIGKILL = 137` (Calculating the exit codes for other deadly signals is left as an exercise to the reader.). So you can do: - -``` -chb@conventiont|~ -> lxc exec zest1 sleep 100 -``` - - -Now, send `SIGKILL` to the executing program (Not to `lxc exec` itself, as `SIGKILL`is not forwardable.): - -``` -kill -KILL $(pidof sleep 100) -``` - -and finally retrieve the exit code for your program: - -``` -chb@conventiont|~ -> echo $? -137 -``` - -Voila. This obviously only works nicely when a) the exit code doesn’t breach the `8`-bit wall-of-computing and b) when the executing program doesn’t use `137` to indicate success (Which would be… interesting(?).). Both arguments don’t seem too convincing to me. The former because most deadly signals  _should_  not breach the range. The latter because (i) that’s the users problem, (ii) these exit codes are actually reserved (I  _think_ .), (iii) you’d have the same problem running the program locally or otherwise. -The main advantage I see in this is the ability to report back fine-grained exit statuses for executing programs. Note, by no means can we report back  _all_ instances where the executing program was killed by a signal, e.g. when your program handles `SIGTERM` and exits cleanly there’s no easy way for [LXD][8] to detect this and report back that this program was killed by signal. You will simply receive success aka exit code `0`. - -### 3\. Forwarding signals - -This is probably the least interesting (or maybe it isn’t, no idea) but I found it quite useful. As you saw in the `SIGKILL` case before, I was explicit in pointing out that one must send `SIGKILL` to the executing program not to the `lxc exec`command itself. This is due to the fact that `SIGKILL` cannot be handled in a program. The only thing the program can do is die… like right now… this instance… sofort… (You get the idea…). But a lot of other signals `SIGTERM`, `SIGHUP`, and of course `SIGUSR1` and `SIGUSR2` can be handled. So when you send signals that can be handled to `lxc exec` instead of the executing program, newer versions of [LXD][9] will forward the signal to the executing process. This is pretty convenient in scripts and so on. - -In any case, I hope you found this little `lxc exec` post/rant useful. Enjoy [LXD][10]it’s a crazy beautiful beast to play with. Give it a try online [https://linuxcontainers.org/lxd/try-it/][11] and for all you developers out there: Checkout [https://github.com/lxc/lxd][12] and send us patches.  - - - We don’t require any `CLA` to be signed, we simply follow the kernel style of requiring a `Signed-off-by` line. - --------------------------------------------------------------------------------- - -via: https://cbrauner.wordpress.com/2017/01/20/lxc-exec-vs-ssh/ - -作者:[brauner][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://cbrauner.wordpress.com -[1]:https://github.com/lxc/lxd -[2]:https://github.com/lxc/lxd -[3]:https://github.com/lxc/lxd/blob/master/client.go -[4]:https://asciinema.org/a/100035?autoplay=1 -[5]:https://github.com/lxc/lxd -[6]:https://asciinema.org/a/100040?autoplay=1 -[7]:https://asciinema.org/a/100043?autoplay=1 -[8]:https://github.com/lxc/lxd -[9]:https://github.com/lxc/lxd -[10]:https://github.com/lxc/lxd -[11]:https://linuxcontainers.org/lxd/try-it/ -[12]:https://github.com/lxc/lxd diff --git a/translated/tech/20170120 lxc exec vs ssh.md b/translated/tech/20170120 lxc exec vs ssh.md new file mode 100644 index 0000000000..c818563af0 --- /dev/null +++ b/translated/tech/20170120 lxc exec vs ssh.md @@ -0,0 +1,104 @@ +lxc exec vs ssh +============================================================ + + +最近,我对 `lxc exec` 进行了几个改进。以防你不知道,`lxc exec` 是 [LXD][1] 的客户端工具,使用 [LXD][2] [client api][3] 与 LXD 守护程序通信并执行任何用户想要的程序,以下是你可以使用的一个例子: + + [![asciicast](https://asciinema.org/a/100035.png)][4] + +我们的主要目标之一就是使 `lxc exec` 与 `ssh` 类似,因为它是交互式或非交互式远程运行命令的标准。这使得 `lxc exec` 做得很好变得棘手。 + +### 1\. 处理后台任务 + +一个长期存在的问题当然是如何正确处理后台任务。这是一个关于 [LXD][5] 2.7 实例的问题的 asciinema 中的插图: + + [![asciicast](https://asciinema.org/a/100040.png)][6] + +你可以看到,在后台执行任务将导致 `lxc exec` 无法退出。许多命令可以触发此问题: + +``` +chb@conventiont|~ +> lxc exec zest1 bash +root@zest1:~# yes & +y +y +y +. +. +. +``` + +现在没有什么能救你。`yes` 将会永远直接写入`stdout`。 + +问题的根源在于 `stdout` 被保持打开,但这是必要的,它用以确保用户启动的进程写入的任何数据实际上是通过我们建立的 websocket 连接读取并发回的。 + +你可以想象,比如当你运行一个 shell 会话,你希望在后台运行一个进程,然后快速退出。对不起,你运气不好。 + +第一种并且原始的方法是一旦你检测到前台程序(例如 shell)已经退出就直接关闭 `stdout`。但这不像想得那么好,当你运行快速执行程序时,这个问题会变得明显,比如: + +``` +lxc exec -- ls -al /usr/lib +``` + +所有 `lxc exec` 进程(和相关的 `forkexec` 进程(现在不要担心)只要记住 `Go` + `setns()` 不是在发送...))在所有 `stdout` 中的_缓冲_数据被读取之前退出。这种情况下,将会导致截断输出,没有人想要这样。在尝试使用几个方法来后,禁用 pty 缓冲(我告诉你,这不太漂亮,也没有如预期工作。)和其他奇怪的想法,我设法通过几个 `poll()` “技巧”(tricks)(在某种意义上说一个技巧(“trick”))解决了这个问题。现在你终于可以运行后台任务,并且可以完全退出了。如图: + [![asciicast](https://asciinema.org/a/100043.png)][7] + +### 2\. 报告由信号引起的退出码 + +`ssh` 是一个很棒的工具。但有一件事,我一直以来不喜欢的是当 ssh 运行的命令接收到一个信号 `ssh` 时,总是会报告 `-1`,也就是退出码 `255`。当你想要了解导致程序终止的信号时,这很烦人。这就是为什么我最近实施标准 shell 中使用标准惯例 `128 + n`,其中 `n`被定义为导致执行程序退出的信号号码,来报告任何由信号导致的退出。例如,在 `SIGKILL` 信号上,你会看到 `128 + SIGKILL = 137`(计算其他致命信号的退出码作为读者的练习)。所以你可以这么做: + +``` +chb@conventiont|~ +> lxc exec zest1 sleep 100 +``` + + +现在,将 `SIGKILL` 发送到执行程序(不是 `lxc exec`本身,因为 `SIGKILL` 不可转发)。 + +``` +kill -KILL $(pidof sleep 100) +``` + +最后检查你程序的退出码: + +``` +chb@conventiont|~ +> echo $? +137 +``` + +瞧。这显然只有当 a) 退出码没有超过 `8`-位计算壁垒,b)当执行程序不使用 `137` 来表示成功(这将是...有趣的( ?))。这两个论点似乎对我来说都不太有说服力。前者因为最致命的信号不_应该_超过这个范围。后者因为(i)这是用户问题,(ii)这些退出代码实际上是保留的(我 _认为_。),(iii)你在本地或其他上面运行程序时会遇到同样的问题。 + +我看到的主要优点是这能够回报执行程序的细粒度的退出状态。注意,我们不会报告_所有_被一个这个信号杀死的程序的实例。当你的程序处理 `SIGTERM` 并且完全退出时,[LXD][8] 没有简单的方法来检测到这个并报告说这个程序被信号杀死了。你只会简单地收到退出码 `0`。 + +### 3\. 转发信号 + +这可能是最不有趣的(或者也许不是,不知道),但我发现它非常有用。正如你在 `SIGKILL` 案例中看到的那样,我明确地指出,必须将 `SIGKILL` 发送到执行程序,而不是 `lxc exec`命令本身。这是因为 `SIGKILL` 在程序中无法处理。程序可以做的唯一的事情就是像现在这样...像这个例子...(你知道了吧...)。但是程序可以处理很多其他信号 `SIGTERM`、`SIGHUP',当然也可以处理 `SIGUSR1` 和 `SIGUSR2`。因此,当你发送可以被 `lxc exec` 处理而不是被执行程序处理的信号时,较新版本的 [LXD][9] 会将信号转发到执行进程。这在脚本中非常方便。 + +无论如何,我希望你觉得这篇小小的 `lxc exec` 文章/胡言乱语有用。享受[LXD][10]吧,这是与一只疯狂的美丽的野兽玩耍。请试试在线实验:[https://linuxcontainers.org/lxd/try-it/][11],对于开发人员看看这里:[https://github.com/lxc/lxd][12] 并给我们补丁。 + +我们不要求签名任何 `CLA`,我们只要在核心风格中遵循取其中有 "Signed-off-by" 这行。 + +-------------------------------------------------------------------------------- + +via: https://cbrauner.wordpress.com/2017/01/20/lxc-exec-vs-ssh/ + +作者:[brauner][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://cbrauner.wordpress.com +[1]:https://github.com/lxc/lxd +[2]:https://github.com/lxc/lxd +[3]:https://github.com/lxc/lxd/blob/master/client.go +[4]:https://asciinema.org/a/100035?autoplay=1 +[5]:https://github.com/lxc/lxd +[6]:https://asciinema.org/a/100040?autoplay=1 +[7]:https://asciinema.org/a/100043?autoplay=1 +[8]:https://github.com/lxc/lxd +[9]:https://github.com/lxc/lxd +[10]:https://github.com/lxc/lxd +[11]:https://linuxcontainers.org/lxd/try-it/ +[12]:https://github.com/lxc/lxd From 3987293d7839a45bfde4f78d3143fe779148d23e Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 4 Aug 2017 08:47:15 +0800 Subject: [PATCH 015/125] translating --- sources/tech/20170712 How To Setup Apache Hadoop On CentOS.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20170712 How To Setup Apache Hadoop On CentOS.md b/sources/tech/20170712 How To Setup Apache Hadoop On CentOS.md index a61a4eb192..0345c5b29f 100644 --- a/sources/tech/20170712 How To Setup Apache Hadoop On CentOS.md +++ b/sources/tech/20170712 How To Setup Apache Hadoop On CentOS.md @@ -1,3 +1,5 @@ +translating-----geekpi + How To Setup Apache Hadoop On CentOS ============================================================ From dd1611e8accd2ed1185283dc7028cbc75b63e899 Mon Sep 17 00:00:00 2001 From: firmianay Date: Fri, 4 Aug 2017 10:16:07 +0800 Subject: [PATCH 016/125] translating by firmianay --- ...tem Hierarchy Standard Shows Which Bits Are Boss.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sources/tech/20170711 The Filesystem Hierarchy Standard Shows Which Bits Are Boss.md b/sources/tech/20170711 The Filesystem Hierarchy Standard Shows Which Bits Are Boss.md index c60de652f5..98d65db123 100644 --- a/sources/tech/20170711 The Filesystem Hierarchy Standard Shows Which Bits Are Boss.md +++ b/sources/tech/20170711 The Filesystem Hierarchy Standard Shows Which Bits Are Boss.md @@ -1,3 +1,5 @@ +Translating by firmianay + The Filesystem Hierarchy Standard Shows Which Bits Are Boss ============================================================ ![linux](http://www.linuxinsider.com/article_images/story_graphics_xlarge/xl-2016-linux-1.jpg) @@ -17,19 +19,19 @@ Before we embark, here are a couple of tools that are worth getting familiar wit The most useful tool is "ls" -- it lists the contents of any directory given with a full or relative path (i.e., one starting from the current directory) as an argument. -$ ls  _path_ +$ ls  _path_ As you progress deeper into the filesystem, it might get cumbersome to type long paths repeatedly, so if you get to that point, you can replace "ls" with "cd" to change the current working directory (the one your terminal is currently "in") to that directory. As with "ls", just give "cd" a directory path as an argument. -$ cd  _path_ +$ cd  _path_ If you're not sure what kind of file something is, use the "file" command on it by running "file" and the filename as an argument. -$ file  _filename_ +$ file  _filename_ Finally, if the file seems like it could be human-readable, use "less" to look at it (again, with no fear of making changes). As with the last tool, give a filename as an argument to view it. -$ less  _filename_ +$ less  _filename_ When you're done scanning through the file, hit "q" to quit, which returns you to your terminal. From 956ac905dbca3bb15e61b64ff57e3d8fb9bfabff Mon Sep 17 00:00:00 2001 From: firmianay Date: Fri, 4 Aug 2017 11:53:57 +0800 Subject: [PATCH 017/125] translated --- ...rchy Standard Shows Which Bits Are Boss.md | 101 ------------------ ...rchy Standard Shows Which Bits Are Boss.md | 91 ++++++++++++++++ 2 files changed, 91 insertions(+), 101 deletions(-) delete mode 100644 sources/tech/20170711 The Filesystem Hierarchy Standard Shows Which Bits Are Boss.md create mode 100644 translated/tech/20170711 The Filesystem Hierarchy Standard Shows Which Bits Are Boss.md diff --git a/sources/tech/20170711 The Filesystem Hierarchy Standard Shows Which Bits Are Boss.md b/sources/tech/20170711 The Filesystem Hierarchy Standard Shows Which Bits Are Boss.md deleted file mode 100644 index 98d65db123..0000000000 --- a/sources/tech/20170711 The Filesystem Hierarchy Standard Shows Which Bits Are Boss.md +++ /dev/null @@ -1,101 +0,0 @@ -Translating by firmianay - -The Filesystem Hierarchy Standard Shows Which Bits Are Boss -============================================================ -![linux](http://www.linuxinsider.com/article_images/story_graphics_xlarge/xl-2016-linux-1.jpg) - - -[**The State of Open Source Software: Year in Review | Webinar**][5] -[][6]Flexera Software's VP of Product Management discusses the compliance and vulnerability events and trends from 2016 impacting organizations using open source software.  -**[Watch Now!][3]** - -If you've ever been curious enough to look through your system's root directory ("/"), you may have found yourself a little overwhelmed. Most of the three-letter directory names don't tell you much about what they do, and if you ever needed to make important modifications, it would be tough to know where to look. - -I'd like to take those of you who haven't ventured much into your root directory on a brief tour. - -### Helpful Tools - -Before we embark, here are a couple of tools that are worth getting familiar with, as they will allow you to dig through anything interesting you find on your own later. None of these programs will make any changes to your files. - -The most useful tool is "ls" -- it lists the contents of any directory given with a full or relative path (i.e., one starting from the current directory) as an argument. - -$ ls  _path_ - -As you progress deeper into the filesystem, it might get cumbersome to type long paths repeatedly, so if you get to that point, you can replace "ls" with "cd" to change the current working directory (the one your terminal is currently "in") to that directory. As with "ls", just give "cd" a directory path as an argument. - -$ cd  _path_ - -If you're not sure what kind of file something is, use the "file" command on it by running "file" and the filename as an argument. - -$ file  _filename_ - -Finally, if the file seems like it could be human-readable, use "less" to look at it (again, with no fear of making changes). As with the last tool, give a filename as an argument to view it. - -$ less  _filename_ - -When you're done scanning through the file, hit "q" to quit, which returns you to your terminal. - -### Root Directory Road Trip - -Now we can begin our journey. I'm going to proceed in alphabetical order through the directories directly within the root directory. This is by no means an exhaustive catalog, but by the end, we will have hit the highlights. - -All of the classifications and functions of the directories we will go over are based on the Linux Filesystem Hierarchy Standard, or FHS. The Linux FHS, maintained by the [Linux Foundation][4], assists designers and developers of distributions and programs by structuring where the various components of their tools should go. - -By keeping all of the files, binaries, and manuals in a consistent organization across programs, the FHS makes learning, debugging, or modifying them much easier. Imagine how tedious it would be if instead of using the "man" command to find usage guides, you had to hunt for the manual for every program. - -Alphabetically, and structurally, it is fitting that we start with **"/bin"**. This directory is where all the core system binary files containing commands for the shell (the program that interprets terminal instructions) are found. Without the contents of this directory, your system wouldn't do much. - -Next is the **"/boot"** directory, where all the stuff your computer needs to boot up is stored. Among these things, the most important ones are your bootloader and kernel. The bootloader is the program that initializes a few basic utilities to allow the boot process to continue. At the end of its initialization, the bootloader loads the kernel, which allows the computer to interface with all other hardware and firmware. From this point, it can proceed to bring the entire operating system online. - -The **"/dev"** directory is where file-like objects representing everything your system recognizes as a "device" are stored. These includes obvious devices such as the hardware components of your computer: your keyboard, screen, hard drive, etc. - -Additionally, "/dev" contains pseudo-files signifying streams of data that your system treats as "devices." One example is the data that goes in and out of your terminal, which is divided into three "streams." Information it reads coming in is called "standard input." The output of commands or processes is "standard output." Finally, an auxiliary output classified as debugging information is directed to "standard error." Terminals themselves are also found as files here. - -**"/etc"** (pronounced like the craft commerce site "Etsy," if you want to impress Linux veterans), is where many programs store their configuration files, which are used to change their settings. Some programs store copies of default configurations here, which are to be copied to another location before modification. Others store the one and only copy of the configuration here and expect users to modify it directly. Many programs reserved for the root user depend on this latter mode of configuration. - -The **"/home"** directory is where users' personal files reside. For desktop users, this is where you spend most of your time. For every unprivileged user, there is a directory with corresponding name here. - -**"/lib"** is home to the many libraries that your system depends on to run. Many programs employ one or more functions or subroutines that are common across dozens or hundreds of programs. So, instead of each program reproducing every component it needs within its binary, which would result in comparatively massive and inefficient programs, it references one or more of these libraries by making a "library call." - -Removable media like USB flash drives or cameras are made accessible in the **"/media"** directory. While it is not present on all systems, it is common in distributions specializing in intuitive desktop systems, like Ubuntu. Media that has storage is "mounted" here, meaning that while the raw stream of bits from the device are found under "/dev", the file objects that users usually interact with are accessible here. - -The **"/proc"** directory is a virtual filesystem that dynamically displays system data. What this means is that the system creates the contents of "/proc" on the fly, populating it with files that hold information about the system (such as hardware statistics) that is generated by virtue of running. - -**"/tmp"** is, aptly enough, where temporary information like cached data is sent. There's really not much more to it than that. - -Most program binaries on modern Linux systems are kept in the **"/usr"**directory. To unify the various directories containing binaries, "/usr" contains a copy of everything in "/bin", "/sbin", and "/lib". - -Finally, **"/var"** is where data of "variable" length is kept. The kind of variable-length data found here is generally data that is expected to keep accumulating, like logs and caches. One example is the log your kernel keeps. - -To keep your hard drive from filling up and crashing, "/var" has a built in "log rotate" function that deletes old information to make room for new information, maintaining a fixed maximum size. - -### Poke Around - -As I said, this is definitely not everything you'll find in the root directory, but it is a good start toward figuring out where your system's core functions reside -- and, moreover, what those functions are. - -So, if you weren't sure what there was to learn, you probably have plenty of ideas now. If you want an even better idea, poke around in these directories for yourself! - --------------------------------------------------------------------------------- - -作者简介: - -Jonathan Terrasi has been an ECT News Network columnist since 2017. His main interests are computer security (particularly with the Linux desktop), encryption, and analysis of politics and current affairs. He is a full-time freelance writer and musician. His background includes providing technical commentaries and analyses in articles published by the Chicago Committee to Defend the Bill of Rights. - ------- - - -via: http://www.linuxinsider.com/story/84658.html - -作者:[Jonathan Terrasi ][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.linuxinsider.com/perl/mailit/?id=84658 -[1]:http://www.linuxinsider.com/story/84658.html?rss=1# -[2]:http://www.linuxinsider.com/perl/mailit/?id=84658 -[3]:http://www.linuxinsider.com/story/84658.html?rss=1 -[4]:http://www.linuxfoundation.org/ -[5]:http://www.linuxinsider.com/story/84658.html?rss=1 -[6]:http://www.linuxinsider.com/story/84658.html?rss=1 diff --git a/translated/tech/20170711 The Filesystem Hierarchy Standard Shows Which Bits Are Boss.md b/translated/tech/20170711 The Filesystem Hierarchy Standard Shows Which Bits Are Boss.md new file mode 100644 index 0000000000..15f1cec927 --- /dev/null +++ b/translated/tech/20170711 The Filesystem Hierarchy Standard Shows Which Bits Are Boss.md @@ -0,0 +1,91 @@ +文件系统层次标准(FHS)简介 +============================================================ +![linux](http://www.linuxinsider.com/article_images/story_graphics_xlarge/xl-2016-linux-1.jpg) + +当你好奇地看着系统的根目录(“/”)的时候,可能会发现自己有点不知所措。大多数三个字母的目录名称并没有告诉你他们是做什么的,如果你需要做出一些重要的修改,那就很难知道在哪里可以查看。 + +我想给大家简单地介绍下根目录。 + +### 有用的工具 + +在我们开始之前,这里有几个值得熟悉的工具,它们可以让您随时挖掘您自己找到的有趣的东西。这些程序都不会对您的文件进行任何更改。 + +最有用的工具是 “ls” -- 它列出了使用完整路径或相对路径(即从当前目录开始的路径)作为参数给出的任何目录的内容。 + +$ ls  _path_ + +当您进一步深入文件系统时,重复输入长路径可能会变得很麻烦,所以如果您想简化这一操作,可以用 “cd” 替换 “ls” 来更改当前的工作目录到该目录。与 “ls” 一样,只需将目录路径作为 “cd” 的参数。 + +$ cd  _path_ + +如果您不确定某个文件是什么文件类型的,可以通过运行 “file” 并且将文件名作为“file” 命令的参数。 + +$ file  _filename_ + +最后,如果这个文件看起来像是人可读的,那么用 “less” 来看看(不用担心文件有改变)。与最后一个工具一样,给出一个文件名作为参数来查看它。 + +$ less  _filename_ + +完成文件扫描后,点击 “q” 退出,即可返回到您的终端。 + +### 根目录之旅 + +现在就开始我们的旅程。我将按照字母顺序介绍直接在根目录下的目录。这里并没有介绍所有的目录,但到最后,我们会突出其中的亮点。 + +我们将要完成的目录的所有分类和功能都基于 Linux 文件系统层次标准(FHS)。[Linux基金会][4]维护的 Linux FHS 通过规定其工具的各个组件应该存放的位置,帮助设计师和开发人员进行发行版和程序的开发。 + +通过将所有文件,二进制文件和手册保存在程序中的一致性组织中,FHS 让学习、调试或修改更加容易。想象一下,如果不是使用 “man” 命令找到使用指南,那么你就不得不寻找每个程序的手册。 + +按照字母顺序和结构顺序,我们从 “**/bin**” 开始。该目录是包含 shell 命令的所有核心系统二进制文件(解释终端指令的程序)。没有这个目录的内容,你的系统就不能做很多事情。 + +接下来是 “**/boot**” 目录,它存储了您的计算机需要启动的所有东西。其中最重要的是引导程序和内核。引导程序是一个通过初始化一些基础工具,使引导过程继续进行的程序。在初始化结束时,引导程序会加载内核,内核允许计算机与所有其他硬件和固件进行接口。从这一点看,它可以持续地使整个操作系统工作。 + +“**/dev**” 目录是表示被系统识别为“设备”的所有文件的对象。这里包括许多显式的设备,如计算机的硬件组件:键盘,屏幕,硬盘驱动器等。 + +此外,“/dev” 还包含被系统视为“设备”的数据流的伪文件。一个例子是流入和流出您的终端的数据,可以分为三个“流”。它读取的信息被称为“标准输入”。命令或进程的输出是“标准输出”。最后,分类为调试信息的辅助输出指向“标准错误”。终端本身作为文件也可以在这里找到。 + +“**/etc**”(发音类似工艺商业网站 “Etsy”,如果你想打动 Linux 老用户的话),许多程序在这里存储他们的配置文件,用于改变他们的设置。一些程序存储这里的是默认配置的副本,这些副本将在修改之前复制到另一个位置。其他的程序在这里存储配置的唯一副本,并期望用户可以直接修改。为 root 用户保留的许多程序取决于后一种配置模式。 + +“**/home**” 目录是用户个人文件所在的位置。对于桌面用户来说,这是您花费大部分时间的地方。对于每个非特权用户,这里都有一个具有相应名称的目录。 + +“**/lib**” 是您的系统依赖运行的许多库的所在地。许多程序都会重复使用一个或多个在几十上百个程序中常见的功能或子程序。所以,如果每个程序在其二进制文件中重写它需要的每一个组件,结果会是产生出一些大而无用的程序,作为更好的替代方案,我们可以通过进行“库调用”来引用这些库中的一个或多个。 + +在 “**/media**” 目录中可以访问像 USB 闪存驱动器或摄像机这样的可移动媒体。虽然它不存在于所有系统上,但在一些专注于直观桌面的系统中还是比较普遍的,如 Ubuntu。具有存储能力的媒体在此处被“挂载”,这意味着当设备中的原始位流位于 “/dev” 目录下时,用户通常可以在这里访问那些可交互的文件对象。 + +“**/proc**” 目录是一个动态显示系统数据的虚拟文件系统。这意味着系统可以即时地创建 “/proc” 的内容,用包含运行时生成系统信息(如硬件统计信息)的文件进行填充。 + +“**/tmp**” 恰好足够的用于发送缓存数据等临时信息。这个目录不做其他更多的事情。 + +现代 Linux 系统上大多数程序的二进制文件保存在 “**/usr**” 目录中。为了统一包含二进制文件的各种目录,“/usr” 包含 “/bin”、“/sbin” 和 “/lib” 中的所有内容的副本。 + +最后,“**/var**” 里保存“可变”长度的数据。这里的可变长度数据的类型通常是会累积的数据,就像日志和缓存一样。一个例子是你的内核保留的日志。 + +为了保持硬盘远离空间用尽和崩溃的情况,“/var” 内置了“日志旋转”功能,可删除旧信息,为新信息腾出空间,维持固定的最大大小。 + +### 结尾 + +正如我所说,这里介绍的绝对不是您在根目录中可以找到的一切,但是确定系统核心功能所在地是一个很好的开始,而且可以更深入地研究这些功能是什么。 + +所以,如果你不知道要学习什么,就可能有很多的想法。如果你想得到一个更好的想法,就在这些目录中折腾自己吧! + +-------------------------------------------------------------------------------- + +作者简介: + +自 2017 年以来 Jonathan Terrasi 一直是 ECT 新闻网的专栏作家。他的主要兴趣是计算机安全(特别是 Linux 桌面),加密和分析政治和时事。他是全职自由作家和音乐家。他的背景包括在芝加哥委员会发表的保卫人权法案文章中提供技术评论和分析。 + +------ + + +via: http://www.linuxinsider.com/story/84658.html + +作者:[Jonathan Terrasi ][a] +译者:[firmianay](https://github.com/firmianay) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.linuxinsider.com/perl/mailit/?id=84658 +[1]:http://www.linuxinsider.com/story/84658.html?rss=1# +[2]:http://www.linuxinsider.com/perl/mailit/?id=84658 +[4]:http://www.linuxfoundation.org/ From 2f6a61c70aa86dd054046a202da3ebd47e34c0ee Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 4 Aug 2017 16:30:54 +0800 Subject: [PATCH 018/125] PUB:20170731 Docker vs. Kubernetes vs. Apache Mesos Why What You Think You Know is Probably Wrong.md @rieonke --- ... Apache Mesos Why What You Think You Know is Probably Wrong.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {translated/tech => published}/20170731 Docker vs. Kubernetes vs. Apache Mesos Why What You Think You Know is Probably Wrong.md (100%) diff --git a/translated/tech/20170731 Docker vs. Kubernetes vs. Apache Mesos Why What You Think You Know is Probably Wrong.md b/published/20170731 Docker vs. Kubernetes vs. Apache Mesos Why What You Think You Know is Probably Wrong.md similarity index 100% rename from translated/tech/20170731 Docker vs. Kubernetes vs. Apache Mesos Why What You Think You Know is Probably Wrong.md rename to published/20170731 Docker vs. Kubernetes vs. Apache Mesos Why What You Think You Know is Probably Wrong.md From d78418ad16a534a8160277b57fb1e06277ef5e76 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 4 Aug 2017 23:46:15 +0800 Subject: [PATCH 019/125] PRF&PUB:20170113 3 open source music players.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @WangYueScream 感觉不必要的文字补充有点多。 --- .../20170113 3 open source music players.md | 145 ++++++++++++++ .../20170113 3 open source music players.md | 189 ------------------ 2 files changed, 145 insertions(+), 189 deletions(-) create mode 100644 published/20170113 3 open source music players.md delete mode 100644 translated/tech/20170113 3 open source music players.md diff --git a/published/20170113 3 open source music players.md b/published/20170113 3 open source music players.md new file mode 100644 index 0000000000..0080d5ada4 --- /dev/null +++ b/published/20170113 3 open source music players.md @@ -0,0 +1,145 @@ +3 个开源的音乐播放器:Aqulung、Lollypop 和 GogglesMM +============================================================ + +![3 open source music players: Aqualung, Lollypop, and GogglesMM](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/music-birds-recording-520.png?itok=wvh1g4Lw "3 open source music players: Aqualung, Lollypop, and GogglesMM") + + +音乐是生活的一部分。[维基百科关于音乐发展历史的文章][4]有这样一段不错的描述说:“全世界所有的人们,包括哪怕是最孤立、与世隔绝的部落,都会有自己的特色音乐……”好吧,我们开源人就构成了一个部落。我建议我们的“音乐形式”应该包括开源音乐播放器。在过去几年里,我已经使用体验过不少我能接触到的音乐播放器;[2016 年 12 月份][5]我根据这六个标准来总结概括了我使用开源音乐播放器的感受: + +1. 必须是能够通过设置让音乐一成不变地转换到 [ALSA][1]。(最高分 5分) +2. 应该有一个不错的“智能播放列表”。(1 分) +3. 不应该强迫用户只能通过播放列表来进行交互。(1 分) +4. 应该能够提供一个简单的方法来显示歌曲的封面图片——使用内嵌的封面图或使用在音乐目录里面 cover.jpg(或者 .png)文件替代。 +5. 应该能够在音乐播放的时候显示信号级别和实际比特率。(1 分) +6. 能够呈现出不错的整体组织,结构布局和执行性能。(1 分) + +热心的读者让告诉我有三个播放器是在我的资源仓库里没有的:[Aqualung][6]、[Lollypop][7] 和 [GogglesMM][8]。我并不想在我办公用的电脑里面安装那些来自外面的软件,我承诺过我会配置一个“试验台”来测试这三个音乐播放器,并给出测试的细节。 + +### Aqualung + +[Aqualung][9] 有一个写的清晰明了的网站来解释它众多的特点。其上提供的说明中我发现其中一点特别有趣: + +“你能够(也应该)将你的所有音乐按照艺术家/档案/声轨这样组织成一个树型结构,这样比生成一个一体化的 Winamp/XMMS 播放列表更舒服。” + +这点让我有些困惑,因为我总是把我的音乐按照艺术家、专辑和声轨这样组织成树状。但这就可能解释了为什么我有时发现 XMMS 流派的播放器在浏览音乐时有一点古怪。 + +根据 Aqualung 官网的下载页面说明,官方发布的只有源代码。但是文档上的说明暗示了绝大多数主流的 Linux 发行版本都包括一份 Aqualung 的构建副本,但我当前用的办公电脑所使用的 Linux 发行版 Ubuntu 16.10 并不在此范围内。[Launchpad.net][10] 提供有 PPA,但那些软件看起来都有些过时了,所以为什么不试试编译源码安装软件呢? + +我根据官网上编译文档的建议和配置脚本的提示安装了 **pkgconf** 以及 **libasound**、**libflac**、**libmp3lame**、**libvorbis**、**libxml2**、**libglib2.0** 和 **libgtk+-2.0** 的开发库。接下来,我就能够干净利索的进行 `configure` 然后进行 `make` 和 `make install`。最终我可以执行 `/usr/local/bin/aqualung` 了。 + + +![Aqualung](https://opensource.com/sites/default/files/aqualung.png "Aqualung") + +*Aqualung,不能切换音乐播放的码率。* + +一旦 Aqualung 启动运行,我就能看到相当简洁直接的两窗口界面:播放器本身和“音乐商店”。我通过右键点击播放器的音乐面板打开参数设置查看这些可设置的参数,看是否能找到 AudioQuest DragonFly 这个数模转换器,但我没有找到任何相关的迹象。然而,站点上的说明指出可以通过命令行指定输出设备。最终我用 **plughw** 设备才让 Aqualung 启动起来。 + +在那个时候,真正让我对 Aqualung 感到失望的是 Aqualung 似乎是需要一个固定的输出采样频率。我能够用 Aqualung 播放器的默认设置来正常播放我的 44.1 Khz 文件,但是同样的采样频率播放 96 Khz 的音乐文件时,我不得不关闭软件并重新启动。也正是因为这一点,我不会再继续对 Aqualung 进行使用测评。 + +**无评分。** + +### Lollypop + +![Lollypop interface](https://opensource.com/sites/default/files/lollypop_interface.png "Lollypop interface") + +*优美的 Lollypop 用户界面。* + +[Lollypop][11] 有一个华丽的网站。尽管它不在我办公专用的电脑的软件仓库里面,但是有一个“针对 Ubuntu/Debian 用户的下载”链接带你跳转到 [launchpad.net 站点提供的最新的 PPA][12]。这个站点还提供针对 Flatpak、Arch Linux、Fedora 和 OpenSUSE 这些系统的 Lollypop 软件包的下载。我看了下 [Fedora COPR 上针对各个 Fedora 版本的 Lollypop 下载链接][13],看起来 Lollypop 更新的比较及时而且从 Fedora 版本的 23 到 26 都有对应的软件包提供下载安装。 + +一天内做一次源码编译就足够了,所以我决定试试从 PPA 安装这款软件。我通过命令行来执行 Lollypop 软件。设置菜单能够在 Lollypop 界面的右上方很显眼地看见。更新完我的音乐后,我开始找电脑的输出设备设置,但是在一番查看后,我不知道该怎么选择合适的输出设备。即便我在命令行通过 **-help** 也找不到有用的帮助信息。 + +经过一番网上搜索后我找到一个 Lollypop 的开发者的提示才知道我需要 **gstreamer libav** 来让 Lollypop 工作。通过这个说明我决定停止,因为这可能需要一个 **gstreamer** 相关配置才有能工作,但是我不太想继续尝试了。 + +Lollypop 有一个优美的用户交互界面和它的优美的网站相得益彰,但是我现在不会进一步对它进行测评,否则我就又多了一个进一步去学习了解 **gstreamer** 的理由。 + +**无评分。** + +### GogglesMM + +[Goggles Music Manager][14] 也有一个[在 launchpad.net 及时更新的 PPA][15];安装流程简单明了,我现在可以在命令行执行 **gogglesmm** 了。 + +GogglesMM,非常容易上手使用,看上去和 Rhythmbox 有点像。我在 GogglesMM 的设置里面的参数设置中找到了音频选项设置,能够让我选择 ALSA 和设置音频输出设备。通过查看 **/proc/asound/DragonFly/stream0** 文件和 DragonFly 自己的 LED 颜色,我确定我能够用 GogglesMM 播放 44.1-KHz/21-bit 和 96-KHz/24-bit 这两种规格的 mp3;因此,就凭 “rate/depth passthrough” 我给 GogglesMM 打 5 分。 + +![GogglesMM](https://opensource.com/sites/default/files/gogglesmm.png "GogglesMM") + +*GogglesMM 在播放 96/24 这种规格的音乐,显示音频输出设备选择。 * + +GogglesMM 的说明文档并没有大量的细节介绍,但是我尽可能说明的是,开发者们使用了过滤器来实现类似“智能播放列表”的功能。我在我的测试环境下使用三张专辑来尽我所能检测过滤功能,当我使用“智能播放列表”功能的时候尽管我喜欢我看到的通过过滤筛选出来的歌曲(特别是能够基于广泛的标准来针对歌曲定义筛选条件),但这并不是我认为的“智能播放列表”,对我来说我认为“智能播放列表”应该是这样的,通过借助一些社区数据库来推荐提供和你近期播放的歌曲类似的曲目。或者我该把这个叫作“自动的 DJ”而不是“智能播放列表”,但是通过测试我最终能够确定的是,这个特性并不会在近期版本的 GogglesMM 中出现,所以我给它这个所谓的“智能播放列表”打 0 分。 + +至于播放列表队列的操作,这款应用能够支持播放你选中的音乐,也能够随机播放音乐或者把一些音乐整合到一个播放列表里面,所以我因为“播放列表的队列选项”给它打 1 分。 + +同样的,它看起来也能够很好地不需要额外的干预来管理我的音乐艺术封面(每个专辑都包含一张合适的艺术封面, GogglesMM 可以自动识别),所以为“内嵌的艺术封面或者封面图片”打 1 分。 + +我找不到任何方法来让 GogglesMM 显示信号级别或者实际的比特率。我也不能找到显示比特率和位深度的方法;尽管这款应用能够显示一个“格式”列,但是在我的音乐栏里面除了显示音乐格式不会显示其他的信息了,所以为 GogglesMM 的“信号级别和有效比特率”打 0 分。 + +至于 GogglesMM 的整体结构,它的所有按钮选项都正好完全符合我的使用习惯。我能够在播放队列里面看到歌曲的时间和歌曲当前已播放的时间所占歌曲总体时间的比例,专辑封面,歌曲名,专辑名和歌唱者。可用的播放栏列表看起来相当大而有用,比如也包括了作曲者。最后,一个真正让我眼前一亮的特点是,音量控制竟然包含了 ALSA 音量。也就是如果我启动 alsamixer 的话,然后不管是在 alsamixer 还是在 GogglesMM 里面调整音量,另一个音量控制也会做相应的音量调整。这个出乎我意外之外的功能相当的酷而且这个功能在其他的音乐播放器上也不常见,因此为它的整体架构给 GogglesMM 加 1 分。 + +最终 GogglesMM 的这些优点共计得分 8。所表现出来的特点确实很优秀。 + +**评分:8** + +### 到目前为止所给出的评分 + +我之前所提到的这几个开源音乐播放器中,我最喜欢的还是 [Guayadeque][16],根据我制定的标准来进行排名的话,我给 Guayadeque 打满分 10 分。来看下我对这三个开源音乐播放器的评分总结吧(N/R 代表“无评分”,因为我不确定如何配置这些播放器来让它们以完美的码率和贯穿模式工作,以便我的数模信号转换器在相应源的码率和位深度接收 PCM 数据): + +![Open source audio players](https://opensource.com/sites/default/files/open_source_audio.png "Open source audio players") + +请注意下我用的这个排名方法并不适合每个人。特别是很多人并不清楚高品质音乐的价值,他们更喜欢专有格式的音乐能够给他们带来更好的音乐品质。 + +与此同时,我会继续评测一些之前向大家承诺的音乐播放器一些和评测评分无关的特性。我特别喜欢 Lollypop 的外观,我也觉得待揭秘的 **gstreamer** 有一种神秘的魅力,它能让基于 **gstreamer** 的音乐播放器不用通过转换就能传输它们的数据。 + +### 关于音乐的部分…… + +我还在保持继续购买唱片的习惯,对于唱片的购买我有些不错的推荐。 + +第一个就是 Nils Frahm 的专辑 [Felt][17],这是我女儿送我的一份非常贴心的礼物。我真的真的很喜欢这张专辑,它的绝大部分歌曲都是在深夜用电麦录制的非常接近钢琴的弦乐,而且也有不少有趣的钢琴演奏的背景音乐,真的是很棒的音乐。至于 Nils Frahm 其他的音乐,这些唱片提供的下载链接允许你下载质量高达 96-KHz,24-bit FLAC 格式的音乐。 + +第二个就是 Massive Attack 的专辑 Protection 的 [Mad Professor 的重混版][18],专辑名是 No Protection。你可以[在这里了解这份专辑][19],并且如果你想要尝试这份专辑最原始的版本,[这里是它的所有汇总信息][20]。该专辑最初发布于 20 世纪 90 年代,这份专辑刻录在唱片上面而且听起来非常奇幻。遗憾的是,不提供下载链接。 + +第三个就是 Bayonne 的 [Primitives][21]。[这是专辑要表达的想法][22]。Guardian 报社把这份专辑称作是“新式无聊”。那么这种类型的音乐到底怎么样呢?如果这些音乐真的是非常令人乏味的,或许是时候来换份工作了,无论如何你可以试试听这些音乐;或许你会觉得它确实很乏味或者你会像我一样喜欢上这份音乐。 + +(图片来源:[互联网档案馆][2]书中的图片;由 Opensource.com 编辑发布。遵循 [CC BY-SA 4.0][3] 协议。) + +-------------------------------------------------------------------------------- + + +作者简介: + +![](https://opensource.com/sites/default/files/styles/profile_pictures/public/clh_portrait2.jpg?itok=V1V-YAtY) + + +Chris Hermansen - 自 1978 年毕业于 British Columbia 大学后一直从事计算机相关工作,2005 年之前是 Solaris、SunOS、UNIX System V 的忠实用户,之后是 Linux 的忠实用户。在技术方面,我的职业生涯大部分时间都是在做数据分析;特别是空间数据分析。拥有丰富的和数据分析相关的编程经验,用过的编程语言有 awk,Python、PostgreSQL、 PostGIS 和 最新的 Groovy。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/17/1/open-source-music-players + +作者:[Chris Hermansen][a] +译者:[WangYueScream](https://github.com/WangYueScream) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://opensource.com/users/clhermansen +[1]:http://www.alsa-project.org/main/index.php/Main_Page +[2]:https://www.flickr.com/photos/internetarchivebookimages/14565158187/in/photolist-ocoBRG-ocqdPM-ot9YYX-ovb7SE-oroqfj-ot8Sfi-of1HoD-oc5c28-otBk3B-foZxvq-ocoUvo-4TqEKE-otsG7t-oeYo4w-ornGMQ-orpD9y-wLDBUf-outZV7-oc26Ui-ortZpW-ocpWLH-ocoK6c-ocYDY1-od6ADb-xxAKyY-ocofDx-oc4Jr5-otyT2E-ocpUyu-xqTAb6-oc8gK1-otdsK5-ovhkz2-ocpcHj-oc8xwk-otgmZG-otr595-otnv4o-otvdRs-ovfYEt-ovDXUV-obUPJ6-oc2MuJ-oc4zLE-oruPbN-oc1P2H-ouRk93-otaGd3-otTmwB-oc5f62 +[3]:http://creativecommons.org/licenses/by-sa/4.0/ +[4]:https://en.wikipedia.org/wiki/History_of_music +[5]:https://opensource.com/article/16/12/soundtrack-open-source-music-players +[6]:http://aqualung.jeremyevans.net/ +[7]:https://gnumdk.github.io/lollypop-web/ +[8]:https://gogglesmm.github.io/ +[9]:http://aqualung.jeremyevans.net/ +[10]:https://launchpad.net/+search?field.text=aqualung+ppa +[11]:https://gnumdk.github.io/lollypop-web/ +[12]:https://launchpad.net/~gnumdk/+archive/ubuntu/lollypop +[13]:https://copr.fedorainfracloud.org/coprs/gnumdk/lollypop/ +[14]:https://gogglesmm.github.io/ +[15]:https://launchpad.net/~s.jansen/+archive/ubuntu/gogglesmm +[16]:http://www.guayadeque.org/ +[17]:http://www.nilsfrahm.com/works/felt/ +[18]:https://en.wikipedia.org/wiki/No_Protection_(Massive_Attack_album) +[19]:https://www.youtube.com/watch?v=9TvgRb4wiB0 +[20]:https://www.youtube.com/watch?v=LCUv-hLN71c +[21]:https://musicglue.com/bayonne/products/primitives---vinyl--/ +[22]:https://www.youtube.com/watch?v=WZ6xl6CKITE diff --git a/translated/tech/20170113 3 open source music players.md b/translated/tech/20170113 3 open source music players.md deleted file mode 100644 index 840a351eb8..0000000000 --- a/translated/tech/20170113 3 open source music players.md +++ /dev/null @@ -1,189 +0,0 @@ - -3 个开源的音乐播放器:Aqulung,Lollypop,和 GogglesMM -============================================================ - - - ![3 open source music players: Aqualung, Lollypop, and GogglesMM](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/music-birds-recording-520.png?itok=wvh1g4Lw "3 open source music players: Aqualung, Lollypop, and GogglesMM") - - -图片来源:[互联网档案馆][2]书中的图片;由 Opensource.com 编辑发布。遵循 [CC BY-SA 4.0][3] 协议。 - - -音乐是生活的一部分。[维基百科关于音乐发展历史的文章][4]有这样一段不错的描述说:“全世界所有的人们,包括哪怕是最孤立、与世隔绝的部落,都会有自己的特色音乐...”好吧,能够确定的是我们已经把那种部落的民乐推广出来广为人知。我建议我们对于“音乐形式”的划分也应该包括开源音乐播放器。在过去几年里,我已经使用体验过不少我能接触到的音乐播放器;[2016 年 12 月份][5]我根据这六个标准来总结概括分享我使用开源音乐播放器的经验感受: - - -1. 必须是能够通过设置让音乐从一成不变转换到 [ALSA][1]。(最高分 5分) -2. 应该有一个不错的“智能播放列表”。(1 分) -3. 不应该强迫用户总是只能通过播放列表来进行交互。(1 分) -4. 应该能够提供一个简单的方法来覆盖掉歌曲内嵌的图片或者在音乐目录里后退到 cover.jpg(或者 .png)。 -5. 应该能够在音乐播放的时候显示信号级别和实际的比特率。(1 分) -6. 能够呈现出不错的整体组织,结构布局和执行性能。(1 分) - - -热心的读者让我想起来有三个播放器是在我的资源仓库里找不到的:[Aqualung][6],[Lollypop][7],和 [GogglesMM][8]。我并不想在我办公用的电脑里面安装不必要的非办公需要的软件,我向大家承诺到时候我会配置一个“试验台”来达到测试这三个音乐播放器用户体验的目的并详细描述最终结果。 - -### Aqualung - - -[Aqualung][9] 有一个清晰明了的文字描述站点来解释它众多的特点。站点提供的说明中我发现其中一点特别有趣: - - -“你能够(也应该)将你的所有音乐按照艺术家/档案/声轨这样的分类标准系统化归类成一个树型结构,从而生成一个一体的 Winamp/XMMS 播放列表来让你的生活更简单。” - - -这点让我有些困惑因为我印象中我一直总是把我的音乐按照艺术家,专辑和声轨这样的分类标准系统归类。但这就可能解释了为什么我有时发现我的 XMMS-derived 播放器运行的时候有一点古怪,与这种音乐分类标准下播放器的浏览音乐的性能有关。 - - -根据在 Aqualung 官网下载的参考文档说明,官方发布的只有源代码。但是文档上的说明暗示了绝大多数主流的 Linux 发行版本都内置的有一份复制的编译后的 Aqualung,我当前用的办公电脑所使用的 Linux 发行版本并不在此范围内,Ubuntu 16.10。[Launchpad.net][10] 提供的有个人软件包库(PPAs),但那些软件看起来都有些过时了,版本比较老,所以为什么不试试编译源码安装软件呢? - - -我根据官网上编译文档的建议和配置脚本的提示安装了 **pkgconf** 以及 **libasound**,**libflac**,**libmp3lame**,**libvorbis**,**libxml2**,**libglib2.0** 和 **libgtk+-2.0** 的开发版。接下来,我就能够干净利索的进行**配置**然后进行**编译**和**编译安装**。最终我是通过执行 **/usr/local/bin/aqualung** 这个文件来进行 aqualung 的安装。 - - - ![Aqualung](https://opensource.com/sites/default/files/aqualung.png "Aqualung") - - -Aqualung,不能切换音乐播放的码率。 - - -一旦 Aqualung 启动运行,我就能看到两个相当简洁直接的窗口用户界面,播放器本身和“音乐商店”。我通过右键点击播放器的音乐面板打开参数设置查看这些可设置的参数看是否能找到 AudioQuest DragonFly 这个数字模拟转换器,但我没有找到任何相关的参数。然而,站点上的说明指出你可以通过命令行指定输出设备。最终我用 **plughw** 外置声卡设备来让 Aqualung 启动。 - - -在那个时候,真正让我对 Aqualung 感到失望的是 Aqualung 似乎是需要一个固定的输出设备来抽样检查频率。我能够用 Aqualung 播放器的默认设置来正常播放我的 44.1 Khz 文件,但是同样的抽样检查频率播放 96 Khz 的音乐文件时,我不得不关闭软件并重新启动。也正是因为这一点,我不会再继续进行对 Aqualung 的使用测评。 - - -**不作进一步的评论。** - - -### Lollypop - - - ![Lollypop interface](https://opensource.com/sites/default/files/lollypop_interface.png "Lollypop interface") - - -优美的 Lollypop 用户界面。 - - -[Lollypop][11] 有一个华丽的网站。尽管它不在我办公专用的电脑的软件仓库里面,但是有一个“针对 Ubuntu/Debian 用户的下载”链接带你跳转到 [launchpad.net 站点提供的最新的 PPA][12]。这个站点还提供针对 Flatpak,Arch Linux,Fedora,和 OpenSUSE 这些系统的 Lollypop 软件包的下载。我看了下[Fedora COPR 上针对各个 Fedora 版本的 Lollypop 下载链接][13],看起来 Lollypop 更新的比较及时而且从 Fedora 版本的 23 到 26 都有对应的软件包提供下载安装。 - - -就一天内从源码编译安装 Lollypop 软件是一件非常刺激的事,所以我决定试试从 PPA 安装这款软件。我通过命令行来安装执行 Lollypop 软件。设置菜单能够在 Lollypop 界面的右上方很明显地看见。更新完音乐后,我开始找电脑的输出设备设置,但是在一番查看后,我不知道如何针对 Lollypop 选择合适正确的输出设备。即便我在命令行通过 **-help** 也找不到有用的帮助信息。 - - -经过一番网上搜索后我找到一个 Lollypop 的开发者的描述说明才知道我需要 **gstreamer libav** 来让 Lollypop 工作。通过这个说明我暂时推断出可能还需要一个 **gstreamer** 相关配置才有可能让 Lollypop 成功正常运行工作,但是我至少现在不会去继续尝试。 - - -Lollypop 有一个优美的用户交互界面和它的优美的网站相得益彰,但是我现在不会进一步对它进行测评。否则我就又多了一个进一步去学习了解 **gstreamer** 的理由。 - - -**不作进一步的评论。** - -### GogglesMM - - -[Goggles Music Manager][14] 也有一个[在 launchpad.net 及时更新的 PPA][15];安装流程简单明了,我可以在命令行通过执行 **gogglesmm** 来完成安装。 - - -GogglesMM,非常容易上手使用,看上去和 Rhythmbox 有点像。我在 GogglesMM 的设置里面的参数设置中找到了音频选项设置,能够让我选择 ALSA 和设置音频输出用哪块输出设备。通过查看 **/proc/asound/DragonFly/stream0** 文件和 DragonFly 设备上 LED 的颜色我确定我能够用 GogglesMM 播放 44.1-KHz/21-bit 和 96-KHz/24-bit 这两种规格的音乐;因此,就凭“rate/depth passthrough”我给 GogglesMM 打 5 分。 - - - ![GogglesMM](https://opensource.com/sites/default/files/gogglesmm.png "GogglesMM") - - -上图是 GogglesMM 在播放 96/24 这种规格的音乐,显示音频输出设备选择。 - - -GogglesMM 的说明文档并没有大量的细节介绍,但是我尽可能能够说明的是,开发者们使用了不少过滤条件来实现类似“智能播放列表”的功能。我在我的测试环境下使用三张专辑来尽我所能检测过滤功能,当我使用“智能播放列表”功能的时候尽管我喜欢我看到的通过过滤筛选出来的歌曲(特别是能够基于广泛的标准来针对歌曲定义筛选条件),但这并不是我认为的“智能播放列表”,对我来说我认为“智能播放列表”应该是这样的,通过借助一些社区数据库来推荐提供和你近期播放的歌曲类似的曲目。或者我该把这个叫作“自动的 DJ”而不是“智能播放列表”,但是通过测试我最终能够确定的是,这个特性并不会在近期版本的 GogglesMM 中出现,所以我给它这个所谓的“智能播放列表”打 0 分。 - - -至于播放列表队列的操作,这款应用能够支持播放你选中的音乐也能够随机播放音乐或者把一些音乐整合到一个播放列表里面,所以我因为“播放列表的队列选项”给它打 1 分。 - - -同样的,它看起来也能够很好地不需要额外的干预来管理我的音乐艺术封面(每个专辑都包含一张合适的由 GogglesMM 自动识别的艺术封面),所以为“内嵌的艺术封面或者封面图片”打 1 分。 - - -我找不到任何方法来让 GogglesMM 显示信号级别或者实际的比特率。我也不能找到显示比特率和位深度的方法;尽管这款应用能够在一个列表里面显示所有的音乐“格式”,但是在我的音乐栏里面除了显示音乐格式不会显示其他的信息了,所以为 GogglesMM 的“信号级别和有效比特率”打 0 分。 - - -至于 GogglesMM 的整体结构,它设计的所有按钮选项都正好完全符合我的使用习惯。我能够在播放队列里面看到歌曲的时间和歌曲当前已播放的时间所占歌曲总体时间的比例,专辑封面,歌曲名,专辑名和歌唱者。可用的播放栏列表看起来相当的大容量有用,比如也包括了作曲者。最后,一个真正让我眼前一亮的特点是,音量控制竟然包含了 ALSA 音量。也就是如果我启动控制台调整音量的话然后不管是在控制台还是在 GogglesMM 里面调整音量,另一个音量控制也会做相应的音量调整。这个出乎我意外之外的功能相当的酷而且这个功能在其他的音乐播放器上也不常见,因此为它的整体架构给 GogglesMM 加 1 分。 - - -最终 GogglesMM 的这些优点共计得分 8。所表现出来的特点确实很优秀。 - - -**评分:8** - - -### 到目前为止所给出的评分 - - -我所提到的这几个开源音乐播放器中,我最喜欢的还是 [Guayadeque][16],根据我制定的标准来进行排名的话,我给 Guayadeque 打满分 10 分。来看下我对这三个开源音乐播放器的评分总结吧(N/R 代表“不作评论”,因为我不确定如何配置这些播放器来让它们以完美的码率和贯穿模式工作以便我的数字模拟信号转换器在相应源的码率和位深度接收 PCM 数据): - - - ![Open source audio players](https://opensource.com/sites/default/files/open_source_audio.png "Open source audio players") - - -请注意下我用的这个排名方法不是针对所有音乐播放器通用的。特别是很多人并不清楚高品质音乐的价值,他们更高兴专有格式的音乐能够给他们带来更好的音乐品质。 - - -与此同时,我会继续评测一些之前向大家承诺的音乐播放器一些和评测评分无关的特性。我特别喜欢 Lollypop 的外观,我也觉得待解锁的 **gstreamer** 有一种神秘的魅力,他能让基于 **gstreamer** 的音乐播放器不用通过转换就能传输他们的数据。 - - -### 关于音乐的部分... - - -我还在保持继续购买唱片的习惯,对于唱片的购买我有些不错的推荐。 - - -第一个就是 Nils Frahm 的专辑,[Felt][17],是我女儿送我的一份非常贴心的礼物。我真的真的很喜欢这张专辑,它的绝大部分歌曲都是在深夜用电麦录制的非常接近钢琴的弦乐而且也有不少有趣的钢琴演奏的背景音乐,真的是很棒的音乐。至于 Nils Frahm 其他的音乐,这些唱片也提供的有下载链接允许你下载质量高达 96-KHz,24-bit FLAC 格式的音乐。 - - -第二个就是 Massive Attack 的 [Mad Professor's remix][18] 这份专辑。你可以[在这里了解这份专辑][19],并且如果你想要尝试这份专辑最原始的版本,[这里是汇总的它的所有相关信息][20]。最原始的版本诞生于 20 世纪 90 年代,这份专辑刻录在唱片上面而且听起来非常奇幻。遗憾的是,不提供下载链接。 - - -第三个就是 Bayonne 的 [Primitives][21]。[这是专辑要表达的想法][22]。Guardian 报社把这份专辑称作是“新花样的无聊”。那么这种类型的音乐到底怎么样呢?如果这些音乐真的是非常令人乏味的,或许是时候来换份工作了,无论如何你可以试试听这些音乐;或许你会觉得它确实很乏味或者你会像我一样喜欢上这份音乐。 - --------------------------------------------------------------------------------- - - -作者简介: - -![](https://opensource.com/sites/default/files/styles/profile_pictures/public/clh_portrait2.jpg?itok=V1V-YAtY) - - -Chris Hermansen - 自 1978 年毕业于 British Columbia 大学后一直从事计算机相关工作,2005 年之前是 Solaris,SunOS,UNIX System V 的忠实用户,之后是 Linux 的忠实用户。在技术方面,我的职业生涯大部分时间都是在做数据分析;特别是空间数据分析。拥有丰富的和数据分析相关的编程经验,用过的编程语言有 awk,Python,PostgreSQL, PostGIS 和 最新的 Groovy。 - - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/17/1/open-source-music-players - -作者:[Chris Hermansen][a] -译者:[WangYueScream](https://github.com/WangYueScream) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://opensource.com/users/clhermansen -[1]:http://www.alsa-project.org/main/index.php/Main_Page -[2]:https://www.flickr.com/photos/internetarchivebookimages/14565158187/in/photolist-ocoBRG-ocqdPM-ot9YYX-ovb7SE-oroqfj-ot8Sfi-of1HoD-oc5c28-otBk3B-foZxvq-ocoUvo-4TqEKE-otsG7t-oeYo4w-ornGMQ-orpD9y-wLDBUf-outZV7-oc26Ui-ortZpW-ocpWLH-ocoK6c-ocYDY1-od6ADb-xxAKyY-ocofDx-oc4Jr5-otyT2E-ocpUyu-xqTAb6-oc8gK1-otdsK5-ovhkz2-ocpcHj-oc8xwk-otgmZG-otr595-otnv4o-otvdRs-ovfYEt-ovDXUV-obUPJ6-oc2MuJ-oc4zLE-oruPbN-oc1P2H-ouRk93-otaGd3-otTmwB-oc5f62 -[3]:http://creativecommons.org/licenses/by-sa/4.0/ -[4]:https://en.wikipedia.org/wiki/History_of_music -[5]:https://opensource.com/article/16/12/soundtrack-open-source-music-players -[6]:http://aqualung.jeremyevans.net/ -[7]:https://gnumdk.github.io/lollypop-web/ -[8]:https://gogglesmm.github.io/ -[9]:http://aqualung.jeremyevans.net/ -[10]:https://launchpad.net/+search?field.text=aqualung+ppa -[11]:https://gnumdk.github.io/lollypop-web/ -[12]:https://launchpad.net/~gnumdk/+archive/ubuntu/lollypop -[13]:https://copr.fedorainfracloud.org/coprs/gnumdk/lollypop/ -[14]:https://gogglesmm.github.io/ -[15]:https://launchpad.net/~s.jansen/+archive/ubuntu/gogglesmm -[16]:http://www.guayadeque.org/ -[17]:http://www.nilsfrahm.com/works/felt/ -[18]:https://en.wikipedia.org/wiki/No_Protection_(Massive_Attack_album) -[19]:https://www.youtube.com/watch?v=9TvgRb4wiB0 -[20]:https://www.youtube.com/watch?v=LCUv-hLN71c -[21]:https://musicglue.com/bayonne/products/primitives---vinyl--/ -[22]:https://www.youtube.com/watch?v=WZ6xl6CKITE From 33127f35bb1165725b729b3ee02dfd9225877911 Mon Sep 17 00:00:00 2001 From: Snaplee Date: Sat, 5 Aug 2017 12:55:05 +0800 Subject: [PATCH 020/125] [translated by Snaplee] 20170711 Ubuntu Core Making a factory image with private snaps.md --- ...king a factory image with private snaps.md | 167 ------------------ ...king a factory image with private snaps.md | 147 +++++++++++++++ 2 files changed, 147 insertions(+), 167 deletions(-) delete mode 100644 sources/tech/20170711 Ubuntu Core Making a factory image with private snaps.md create mode 100644 translated/tech/20170711 Ubuntu Core Making a factory image with private snaps.md diff --git a/sources/tech/20170711 Ubuntu Core Making a factory image with private snaps.md b/sources/tech/20170711 Ubuntu Core Making a factory image with private snaps.md deleted file mode 100644 index 40ec62e68b..0000000000 --- a/sources/tech/20170711 Ubuntu Core Making a factory image with private snaps.md +++ /dev/null @@ -1,167 +0,0 @@ -【Snaplee翻译中】Ubuntu Core: Making a factory image with private snaps -============================================================ - - - -### Share or save - -This is a follow-up to the [ROS prototype to production on Ubuntu Core][3] series to answer a question I received: “What if I want to make an image for the factory, but don’t want to make my snaps public?” This question is of course not robotics-specific, and neither is its answer. In this post we’ll cover two ways to do this. - -Before we start, you’ll need a little bit of an Ubuntu Core imaging background. If you followed the ROS prototype to production series ([part 5][4] specifically) you already have the required background, but if you didn’t, check out the [tutorial for creating your own Ubuntu Core image][5]. - -Assuming you’re up-to-speed and know what I’m talking about when I say “model definition” or “model assertion,” let’s get started on a few different methods for creating an Ubuntu Core image with private snaps. - -### Method 1: Don’t put your snap in the store at all - -It really doesn’t get simpler. Take a look at this example model definition, **amd64-model.json**: - -``` -{ - "type": "model", - "series": "16", - "model": "custom-amd64", - "architecture": "amd64", - "gadget": "pc", - "kernel": "pc-kernel", - "authority-id": "4tSgWHfAL1vm9l8mSiutBDKnnSQBv0c8", - "brand-id": "4tSgWHfAL1vm9l8mSiutBDKnnSQBv0c8", - "timestamp": "2017-06-23T21:03:24+00:00", - "required-snaps": ["kyrofa-test-snap"] -} -``` - -Let’s go ahead and turn that into a model assertion: - -``` -$ cat amd64-model.json | snap sign -k my-key-name > amd64.model -You need a passphrase to unlock the secret key for -user: "my-key-name" -4096-bit RSA key, ID 0B79B865, created 2016-01-01 -... -``` - -Now you have your model assertion: **amd64.model**. If you hand that to **ubuntu-image** right now you’ll run into a problem: - -``` -$ sudo ubuntu-image -c stable amd64.model -Fetching core -Fetching pc-kernel -Fetching pc -Fetching kyrofa-test-snap -error: cannot find snap "kyrofa-test-snap": snap not found -COMMAND FAILED: snap prepare-image --channel=stable amd64.model /tmp/tmp6p453gk9/unpack -``` - -The snap with the name **kyrofa-test-snap** isn’t actually in the store. But that’s important to note: the model definition (and thus assertion) only contains a list of snap names. If you have a snap locally with that name, even if it’s not in the store, you can tell **ubuntu-image** to use it to satisfy that name in the assertion with the **–extra-snaps** option: - -``` -$ sudo ubuntu-image -c stable \ - --extra-snaps /path/to/kyrofa-test-snap_0.1_amd64.snap \ - amd64.model -Fetching core -Fetching pc-kernel -Fetching pc -Copying "/path/to/kyrofa-test-snap_0.1_amd64.snap" (kyrofa-test-snap) -kyrofa-test-snap already prepared, skipping -WARNING: "kyrofa-test-snap" were installed from local snaps -disconnected from a store and cannot be refreshed subsequently! -Partition size/offset need to be a multiple of sector size (512). -The size/offset will be rounded up to the nearest sector. -``` - -There. You now have an Ubuntu Core image (named **pc.img**) with your snap preinstalled, without the snap ever needing to be in the store. This works, but it has a big disadvantage which **ubuntu-image** points out with a warning: preinstalling a snap that isn’t connected to the store means you have no way to update it once devices are flashed with this image. Your only update mechanism would be to ship new images to be flashed. - -### Method 2: Use a brand store - -When you create a store account and visit [dashboard.snapcraft.io][6], you’re viewing your snaps in the standard Ubuntu store. If you install snapd fresh on your system, this is the store it uses by default. While you can release snaps privately on the Ubuntu store, you [can’t preinstall those in an image][7] because only you (and the collaborators you’ve added) can obtain access to it. The only way you can make an image in this case would be to make the snaps publicly available, which defeats the whole purpose of this post. - -For this use-case, we have what are called [**brand stores**][8]. Brand stores are still hosted in the Ubuntu store, but they’re a custom, curated version of it, meant to be specific to a given company or device. They can inherit (or not) from the standard Ubuntu store, and be open to all developers or locked down to a specific group (which is what we want in our case, to keep things private). - -Note that this is a paid feature. You need to [request a brand store][9]. Once your request has been granted, you’ll see your new store by visiting “stores you can access” under your name. - -![](https://insights.ubuntu.com/wp-content/uploads/1a62/stores_you_can_access.jpg) - -There you’ll see the various stores to which you have access. You’ll have at least two: the normal Ubuntu store, and your new brand store. Select the brand store (red rectangle). While you’re here, record your store ID (blue rectangle): you’ll need it in a moment. - -![](https://insights.ubuntu.com/wp-content/uploads/b10c/Screenshot-from-2017-07-06-15-16-32.png) - -From there, registering names/uploading snaps works the same way, but now they go into your brand store instead of the standard one, and assuming you have it unlisted, those snaps are not available to external users. The only caveat today is that at least the first upload for the snap needs to be via the web interface. After that, you can continue to use Snapcraft like normal. - -So how does this change things? My “kyrofa-store” inherits snaps from the Ubuntu store, and also contains a “kyrofa-branded-test-snap” published into the stable channel. This snap isn’t available in the Ubuntu store, as you can see if you search for it: - -``` -$ snap find kyrofa-branded -The search "kyrofa-branded" returned 0 snaps -``` - -But using the store ID we recorded earlier, we can make a model assertion that pulls from the brand store instead of the Ubuntu store. We just need to add the “store” key to the JSON document, making it look like this: - -``` -{ - "type": "model", - "series": "16", - "model": "custom-amd64", - "architecture": "amd64", - "gadget": "pc", - "kernel": "pc-kernel", - "authority-id": "4tSgWHfAL1vm9l8mSiutBDKnnSQBv0c8", - "brand-id": "4tSgWHfAL1vm9l8mSiutBDKnnSQBv0c8", - "timestamp": "2017-06-23T21:03:24+00:00", - "required-snaps": ["kyrofa-branded-test-snap"], - "store": "kyek" -} -``` - -Sign it just as we did in **Method 1**, and we can create an Ubuntu Core image with our private, brand-store snap preinstalled as simply as: - -``` -$ sudo ubuntu-image -c stable amd64.model -Fetching core -Fetching pc-kernel -Fetching pc -Fetching kyrofa-branded-test-snap -Partition size/offset need to be a multiple of sector size (512). -The size/offset will be rounded up to the nearest sector. -``` - -Now, like at the end of **Method 1**, you have a **pc.img** ready for the factory. However, with this method, the snaps in the image are all coming from the store, which means they will automatically update as usual. - -### Conclusion - -These are the only two options for doing this today. When I started writing this post I thought there was a third (keeping one’s snap private and creating an image with it), but that turns out to [not be the case][10]. - -Note that we’ve also received numerous requests for some sort of on-premises/enterprise store, and while such a product is not yet available, the store team is working on it. Once this is available, I’ll write a new post about it. - -I hope this proves useful! - - _Original post can be found [here][1]._ - --------------------------------------------------------------------------------- - -作者简介: - -Kyle is a member of the Snapcraft team, and is also Canonical's resident roboticist. He focuses on snaps and the snap developer experience, as well as robotics enablement for snaps and Ubuntu Core. - - - ------ - -via: https://insights.ubuntu.com/2017/07/11/ubuntu-core-making-a-factory-image-with-private-snaps/ - -作者:[Kyle Fazzari ][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://insights.ubuntu.com/author/kyrofa/ -[1]:http://bit.ly/2sS7M1i -[2]:https://insights.ubuntu.com/author/kyrofa/ -[3]:https://insights.ubuntu.com/2017/04/06/from-ros-prototype-to-production-on-ubuntu-core/ -[4]:https://insights.ubuntu.com/2017/05/09/ros-production-create-ubuntu-core-image-with-snap-preinstalled-55/ -[5]:https://tutorials.ubuntu.com/tutorial/create-your-own-core-image -[6]:http://dashboard.snapcraft.io/ -[7]:https://forum.snapcraft.io/t/unable-to-create-an-image-that-uses-private-snaps -[8]:https://docs.ubuntu.com/core/en/build-store/index -[9]:https://docs.ubuntu.com/core/en/create -[10]:https://forum.snapcraft.io/t/unable-to-create-an-image-that-uses-private-snaps diff --git a/translated/tech/20170711 Ubuntu Core Making a factory image with private snaps.md b/translated/tech/20170711 Ubuntu Core Making a factory image with private snaps.md new file mode 100644 index 0000000000..1dc0ed53b8 --- /dev/null +++ b/translated/tech/20170711 Ubuntu Core Making a factory image with private snaps.md @@ -0,0 +1,147 @@ +# Ubuntu Core: 制作包含私有 snaps 的工厂镜像 +--- +这篇帖子是有关 [ROS prototype to production on Ubuntu Core][1] 系列的补充,用来回答我接收到的一个问题: “如何在不公开发布 snaps 的情况下制作一个工厂镜像?” 当然,问题和回答都不只是针对于机器人技术。在这篇帖子中,我将会通过两种方法来回答这个问题。 + +开始之前,你需要了解一些制作 Ubuntu Core 镜像的背景知识,如果你已经看过 [ROS prototype to production on Ubuntu Core][3] 系列文章(具体是第 5 部分),你就已经有了需要的背景知识,如果没有看过的话,可以查看有关 [制作你的 Ubuntu Core 镜像][5] 的教程。 + +如果你已经了解了最新的情况并且当我说 “模型定义” 或者 “模型断言” 时知道我在谈论什么,那就让我们开始通过不同的方法使用私有 sanps 来制作 Ubuntu Core 镜像吧。 + +### 方法 1: 无需上传你的 snap 到商店 +这是最简单的方法了。首先看一下这个有关模型定义的例子——**amd64-model.json**: +``` +{ + "type": "model", + "series": "16", + "model": "custom-amd64", + "architecture": "amd64", + "gadget": "pc", + "kernel": "pc-kernel", + "authority-id": "4tSgWHfAL1vm9l8mSiutBDKnnSQBv0c8", + "brand-id": "4tSgWHfAL1vm9l8mSiutBDKnnSQBv0c8", + "timestamp": "2017-06-23T21:03:24+00:00", + "required-snaps": ["kyrofa-test-snap"] +} +``` +让我们将它转换成模型断言 +``` +$ cat amd64-model.json | snap sign -k my-key-name > amd64.model +You need a passphrase to unlock the secret key for +user: "my-key-name" +4096-bit RSA key, ID 0B79B865, created 2016-01-01 +... +``` +获得模型断言:**amd64.model** 后,如果你现在就把它交给 **ubuntu-image** 使用,你将会碰钉子: +``` +$ sudo ubuntu-image -c stable amd64.model +Fetching core +Fetching pc-kernel +Fetching pc +Fetching kyrofa-test-snap +error: cannot find snap "kyrofa-test-snap": snap not found +COMMAND FAILED: snap prepare-image --channel=stable amd64.model /tmp/tmp6p453gk9/unpack +``` +实际上商店中并没有名为 **kyrofa-test-snap** 的 snap。这里需要重点说明的是:模型定义(以及转换后的断言)会包含一列 snap 的名字。如果你在本地有个名字相同的 snap,即使它没有存在于商店中,你也可以通过 **--extra-snaps** 选项告诉 **ubuntu-image** 在断言中增加这个名字的来使用它: +``` +$ sudo ubuntu-image -c stable \ + --extra-snaps /path/to/kyrofa-test-snap_0.1_amd64.snap \ + amd64.model +Fetching core +Fetching pc-kernel +Fetching pc +Copying "/path/to/kyrofa-test-snap_0.1_amd64.snap" (kyrofa-test-snap) +kyrofa-test-snap already prepared, skipping +WARNING: "kyrofa-test-snap" were installed from local snaps +disconnected from a store and cannot be refreshed subsequently! +Partition size/offset need to be a multiple of sector size (512). +The size/offset will be rounded up to the nearest sector. +``` +现在,在 snap 并没有上传到商店的情况下,你已经获得一个预装了私有 snap 的 Ubuntu Core 镜像(名为 pc.img)。但是这样做有一个很大的问题,ubuntu-image 会提示一个警告:不通过连接商店预装 snap 意味着你没有办法在烧录了这些镜像的设备上更新它。你只能通过制作新的镜像并重新烧录到设备的方式来更新它。 + +### 方法 2: 使用品牌商店 +当你注册了一个商店账号并访问 [dashboard.snapcraft.io][6] 时,你其实是在标准的 Ubuntu 商店中查看你的 snaps。如果你在系统中安装 snap(原文是:If you install snapd fresh on your system,但是 snapd 并不是从 Ubuntu 商城安装的,而是通过 apt-get 命令 安装的),默认会从这个商店下载。虽然你可以在 Ubuntu 商店中发布私有的 snaps,但是你 [不能将它们预装到镜像中][7],因为只有你(以及你添加的合作者)才有权限去使用它。在这种情况下制作镜像的唯一方式就是公开发布你的 snaps,然而这并不符合这篇帖子的目的(原文是:which defeats the whole purpose of this post)。 + +对于这种用例,我们有所谓的 **[品牌商店][8]**。品牌商店仍然在 Ubuntu 商店里托管,但是它们是针对于某一特定公司或设备的一个可定制的策划(curated)版本。品牌商店可以继承或者不继承标准的 Ubuntu 商店,品牌商店也可以选择开放给所有的开发者或者将其限制在一个特定的组内(保持私有正是我们想要的)。 + +请注意,这是一个付费功能。你需要 [申请一个品牌商店][9]。请求通过后,你将可以通过访问用户名下的“stores you can access” 看到你的新商店。 +![图片.png-78.9kB][10] + +在那里你可以看到多个有权使用的商店。最少的情况下也会有两个: 标准的 Ubuntu 商店以及你的新的品牌商店。选择品牌商店(红色矩形),进去后记录下你的商店 ID(蓝色矩形):等下你将会用到它。 +![图片.png-43.9kB][11] + + +在品牌商店里注册名字或者上传 snaps 和标准的商店使用的方法是一样的,只是它们现在是上传到你的品牌商店而不是标准的那个。如果你没有将品牌商店列出来,那么这些 snaps 对外部用户是不可见。但是这里需要注意的是第一次上传 snap 的时候需要通过web界面来操作。在那之后,你可以继续像往常一样使用 Snapcraft 。 + +那么这些是如何改变的呢?我的 “kyrofal-store” 从 Ubuntu 商店继承了 snaps,并且还包含一个发布在稳定通道中的 “kyrofa-bran-test-snap” 。这个 snap 在 Ubuntu 商店里是使用不了的,如果你去搜索它,你是找不到的: +``` +$ snap find kyrofa-branded +The search "kyrofa-branded" returned 0 snaps +``` + +但是使用我们前面记录的商店 ID,我们可以创建一个从品牌商店而不是 Ubuntu 商店下载 snaps 的模型断言。我们只需要将 “store” 键添加到 JSON 文件中,就像这样: +``` +{ + "type": "model", + "series": "16", + "model": "custom-amd64", + "architecture": "amd64", + "gadget": "pc", + "kernel": "pc-kernel", + "authority-id": "4tSgWHfAL1vm9l8mSiutBDKnnSQBv0c8", + "brand-id": "4tSgWHfAL1vm9l8mSiutBDKnnSQBv0c8", + "timestamp": "2017-06-23T21:03:24+00:00", + "required-snaps": ["kyrofa-branded-test-snap"], + "store": "kyek" +} +``` +使用方法 1 中的方式对它签名,然后我们就可以像这样很简单的制作一个预装有我们品牌商店私有 snap 的 Ubuntu Core 镜像: +``` +$ sudo ubuntu-image -c stable amd64.model +Fetching core +Fetching pc-kernel +Fetching pc +Fetching kyrofa-branded-test-snap +Partition size/offset need to be a multiple of sector size (512). +The size/offset will be rounded up to the nearest sector. +``` +现在,和方法 1 的最后一样,你获得了一个为工厂准备的 pc.img。并且使用这种方法制作的镜像中的所有 snaps 都从商店下载的,这意味着它们将能像平常一样自动更新。 + +### 结论 + +到目前为止,做这个只有两种方法。当我开始写这篇帖子的时候,我想过可能还有第三种(将 snap 设置为私有然后使用它制作镜像),[但最后证明是不行的][12]。 + +另外,我们也收到很多内部部署或者企业商店的请求,虽然这样的产品还没有公布,但是商店团队正在从事这项工作。一旦可用,我将会写一篇有关它的文章。 + +希望能帮助到您! + + +--- +关于作者 +Kyle 的图片 + +![Kyle_Fazzari.jpg-12kB][13] + +Kyle 是 Snapcraft 团队的一员,也是 Canonical 公司的常驻机器人专家,他专注于 snaps 和 snap 开发实践,以及 snaps 和 Ubuntu Core 的机器人技术实现。 + +- - - +via: https://insights.ubuntu.com/2017/07/11/ubuntu-core-making-a-factory-image-with-private-snaps/ + +作者:[Kyle Fazzari][a] +译者:[Snaplee](https://github.com/Snaplee) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + + [1]: https://insights.ubuntu.com/2017/04/06/from-ros-prototype-to-production-on-ubuntu-core/ + [2]: https://insights.ubuntu.com/2017/04/06/from-ros-prototype-to-production-on-ubuntu-core/ + [3]: https://insights.ubuntu.com/2017/04/06/from-ros-prototype-to-production-on-ubuntu-core/ + [4]: https://insights.ubuntu.com/2017/04/06/from-ros-prototype-to-production-on-ubuntu-core/ + [5]: https://tutorials.ubuntu.com/tutorial/create-your-own-core-image + [6]: https://dashboard.snapcraft.io/dev/snaps/ + [7]: https://forum.snapcraft.io/t/unable-to-create-an-image-that-uses-private-snaps + [8]: https://docs.ubuntu.com/core/en/build-store/index?_ga=2.103787520.1269328701.1501772209-778441655.1499262639 + [9]: https://docs.ubuntu.com/core/en/build-store/create + [10]: http://static.zybuluo.com/apollomoon/hzffexclyv4srqsnf52a9udc/%E5%9B%BE%E7%89%87.png + [11]: http://static.zybuluo.com/apollomoon/9gevrgmq01s3vdtp5qfa8tp7/%E5%9B%BE%E7%89%87.png + [12]: https://forum.snapcraft.io/t/unable-to-create-an-image-that-uses-private-snaps/1115 + [13]: http://static.zybuluo.com/apollomoon/xaxxjof19s7cbgk00xntgmqa/Kyle_Fazzari.jpg + [14]: https://insights.ubuntu.com/2017/04/06/from-ros-prototype-to-production-on-ubuntu-core/ From a6a0ede6bfdd2f87010c1c8ccad9b57667788119 Mon Sep 17 00:00:00 2001 From: Snaplee <30320680+Snaplee@users.noreply.github.com> Date: Sat, 5 Aug 2017 12:56:30 +0800 Subject: [PATCH 021/125] Update 20170711 Ubuntu Core Making a factory image with private snaps.md --- ...711 Ubuntu Core Making a factory image with private snaps.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/tech/20170711 Ubuntu Core Making a factory image with private snaps.md b/translated/tech/20170711 Ubuntu Core Making a factory image with private snaps.md index 1dc0ed53b8..efe9af6af6 100644 --- a/translated/tech/20170711 Ubuntu Core Making a factory image with private snaps.md +++ b/translated/tech/20170711 Ubuntu Core Making a factory image with private snaps.md @@ -40,7 +40,7 @@ Fetching kyrofa-test-snap error: cannot find snap "kyrofa-test-snap": snap not found COMMAND FAILED: snap prepare-image --channel=stable amd64.model /tmp/tmp6p453gk9/unpack ``` -实际上商店中并没有名为 **kyrofa-test-snap** 的 snap。这里需要重点说明的是:模型定义(以及转换后的断言)会包含一列 snap 的名字。如果你在本地有个名字相同的 snap,即使它没有存在于商店中,你也可以通过 **--extra-snaps** 选项告诉 **ubuntu-image** 在断言中增加这个名字的来使用它: +实际上商店中并没有名为 **kyrofa-test-snap** 的 snap。这里需要重点说明的是:模型定义(以及转换后的断言)会包含一列 snap 的名字。如果你在本地有个名字相同的 snap,即使它没有存在于商店中,你也可以通过 **--extra-snaps** 选项告诉 **ubuntu-image** 在断言中增加这个名字来使用它: ``` $ sudo ubuntu-image -c stable \ --extra-snaps /path/to/kyrofa-test-snap_0.1_amd64.snap \ From 117c0db7be1789f7cf4ff3ed77aa938d51e5495d Mon Sep 17 00:00:00 2001 From: Snaplee <30320680+Snaplee@users.noreply.github.com> Date: Sat, 5 Aug 2017 23:42:03 +0800 Subject: [PATCH 022/125] =?UTF-8?q?Snaplee=20=E5=87=86=E5=A4=87=E5=BC=80?= =?UTF-8?q?=E5=A7=8B=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...0628 Build test and publish snap packages using snapcraft.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20170628 Build test and publish snap packages using snapcraft.md b/sources/tech/20170628 Build test and publish snap packages using snapcraft.md index dbb86e5ee6..0df0b5db6c 100644 --- a/sources/tech/20170628 Build test and publish snap packages using snapcraft.md +++ b/sources/tech/20170628 Build test and publish snap packages using snapcraft.md @@ -1,4 +1,4 @@ -Build, test, and publish snap packages using snapcraft +【Snaplee准备翻译】Build, test, and publish snap packages using snapcraft ============================================================ From 5c39bac6332ce9606ccc614de1d3b57946e318f4 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 6 Aug 2017 09:29:55 +0800 Subject: [PATCH 023/125] PRF&PUB:20170120 lxc exec vs ssh.md @geekpi --- published/20170120 lxc exec vs ssh.md | 103 +++++++++++++++++++ translated/tech/20170120 lxc exec vs ssh.md | 104 -------------------- 2 files changed, 103 insertions(+), 104 deletions(-) create mode 100644 published/20170120 lxc exec vs ssh.md delete mode 100644 translated/tech/20170120 lxc exec vs ssh.md diff --git a/published/20170120 lxc exec vs ssh.md b/published/20170120 lxc exec vs ssh.md new file mode 100644 index 0000000000..33520cc2a3 --- /dev/null +++ b/published/20170120 lxc exec vs ssh.md @@ -0,0 +1,103 @@ +lxc exec 介绍 +============================================================ + +最近,我对 `lxc exec` 进行了几个改进。如果你不知道它的话我介绍一下,`lxc exec` 是 [LXD][1] 的客户端工具,使用 [LXD][2] [客户端 api][3] 与 LXD 守护程序通信,并执行用户想要执行的各种程序,以下是你可以使用的一个例子: + +[![asciicast](https://asciinema.org/a/100035.png)][4] + +我们的主要目标之一就是使 `lxc exec` 与 `ssh` 类似,因为它是交互式或非交互式远程运行命令的标准。这使得 把 `lxc exec` 做得很好变得有点棘手。 + +### 1、 处理后台任务 + +一个长期存在的问题当然是如何正确处理后台任务。这是一个关于 [LXD][5] 2.7 实例的问题的例子: + +[![asciicast](https://asciinema.org/a/100040.png)][6] + +你可以看到,在后台执行任务将导致 `lxc exec` 无法退出。许多命令可以触发此问题: + +``` +chb@conventiont|~ +> lxc exec zest1 bash +root@zest1:~# yes & +y +y +y +. +. +. +``` + +现在没有什么能救你了。`yes` 将会永远直接写入`stdout`。 + +问题的根源在于 `stdout` 是一直打开着的,但这是必要的,因为它用以确保用户所启动的进程写入的任何数据实际上都是通过我们建立的 websocket 连接读取并发回的。 + +假如你想这样,运行一个 shell 会话,然后在后台运行一个进程,并马上退出 shell。对不起,它并不能如预期那样。 + +第一种并且原始的方法是一旦你检测到前台程序(例如 shell)已经退出就直接关闭 `stdout`。但这不像想得那么好,当你运行快速执行程序时,这个问题会变得明显,比如: + +``` +lxc exec -- ls -al /usr/lib +``` + +这里 `lxc exec` 进程(和相关的 `forkexec` 进程。但现在不要考虑它,只要记住 `Go` + `setns()` 不相往来就行了……)会在 `stdout` 中所有的_缓冲_数据被读取之前退出。这种情况下将会导致截断输出,没有人想要这样。在尝试使用几个方法来解决问题之后,包括禁用 pty 缓冲(我告诉你,这不太漂亮,也没有如预期工作。)和其他奇怪的思路,我设法通过几个 `poll()` “技巧”(在某种意义上说一个“技巧”)解决了这个问题。现在你终于可以运行后台任务,并且可以完全退出了。如图: + +[![asciicast](https://asciinema.org/a/100043.png)][7] + +### 2、 报告由信号引起的退出码 + +`ssh` 是一个很棒的工具。但有一件事,我一直以来不喜欢当 ssh 运行的命令接收到一个信号时, `ssh` 总是会报告 `-1`,也就是退出码 `255`。当你想要了解导致程序终止的信号时,这很烦人。这就是为什么我最近实施标准 shell 所使用的惯例 `128 + n` 来报告任何由信号导致的退出,其中 `n` 被定义为导致执行程序退出的信号量。例如,在 `SIGKILL` 信号上,你会看到 `128 + SIGKILL = 137`(计算其他致命信号的退出码作为读者的练习)。所以你可以这么做: + +``` +chb@conventiont|~ +> lxc exec zest1 sleep 100 +``` + +现在,将 `SIGKILL` 发送到执行程序(不是 `lxc exec`本身,因为 `SIGKILL` 不可转发)。 + +``` +kill -KILL $(pidof sleep 100) +``` + +最后检查你程序的退出码: + +``` +chb@conventiont|~ +> echo $? +137 +``` + +瞧。这显然只有当 a) 退出码没有超过 `8` 位计算壁垒,b)当执行程序不使用 `137` 来表示成功(这可真……有趣?!)。这两个论点似乎对我来说都不太有说服力。前者因为致命信号量不_应该_超过这个范围。后者因为(i)这是用户问题,(ii)这些退出代码实际上是保留的(我是_这样认为_。),(iii)你在本地或其他上面运行程序时会遇到同样的问题。 + +我看到的主要优点是这能够回报执行程序细粒度的退出状态。注意,我们不会报告_所有_被信号杀死的程序实例。比如说,当你的程序能够处理 `SIGTERM` 并且完全退出时,[LXD][8] 没有简单的方法来检测到这个情况并报告说这个程序被信号杀死了。你只会简单地收到退出码 `0`。 + +### 3、 转发信号 + +这可能不太有趣(或者也许不是,谁知道呢),但我发现它非常有用。正如你在 `SIGKILL` 案例中看到的那样,我明确地指出,必须将 `SIGKILL` 发送到执行程序,而不是 `lxc exec`命令本身。这是因为 `SIGKILL` 在程序中无法处理。程序可以做的唯一的事情就是去死,像现在这样……像这个例子……马上(你明白了了吧……)。但是程序可以处理很多其他信号 `SIGTERM`、`SIGHUP',当然也可以处理 `SIGUSR1` 和 `SIGUSR2`。因此,当你发送可以被 `lxc exec` 处理而不是被执行程序处理的信号时,较新版本的 [LXD][9] 会将信号转发到执行进程。这在脚本中非常方便。 + +无论如何,我希望你觉得这篇小小的 `lxc exec` 文章/胡言乱语有用。享受 [LXD][10] 吧,这是与一只疯狂的美丽的野兽玩耍。请试试在线实验:[https://linuxcontainers.org/lxd/try-it/][11],对于开发人员看看这里:[https://github.com/lxc/lxd][12] 并给我们补丁。 + +我们不要求签署任何 CLA,我们遵循内核风格,只要其中有 “Signed-off-by” 这行就好。 + +-------------------------------------------------------------------------------- + +via: https://cbrauner.wordpress.com/2017/01/20/lxc-exec-vs-ssh/ + +作者:[brauner][a] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://cbrauner.wordpress.com +[1]:https://github.com/lxc/lxd +[2]:https://github.com/lxc/lxd +[3]:https://github.com/lxc/lxd/blob/master/client.go +[4]:https://asciinema.org/a/100035?autoplay=1 +[5]:https://github.com/lxc/lxd +[6]:https://asciinema.org/a/100040?autoplay=1 +[7]:https://asciinema.org/a/100043?autoplay=1 +[8]:https://github.com/lxc/lxd +[9]:https://github.com/lxc/lxd +[10]:https://github.com/lxc/lxd +[11]:https://linuxcontainers.org/lxd/try-it/ +[12]:https://github.com/lxc/lxd diff --git a/translated/tech/20170120 lxc exec vs ssh.md b/translated/tech/20170120 lxc exec vs ssh.md deleted file mode 100644 index c818563af0..0000000000 --- a/translated/tech/20170120 lxc exec vs ssh.md +++ /dev/null @@ -1,104 +0,0 @@ -lxc exec vs ssh -============================================================ - - -最近,我对 `lxc exec` 进行了几个改进。以防你不知道,`lxc exec` 是 [LXD][1] 的客户端工具,使用 [LXD][2] [client api][3] 与 LXD 守护程序通信并执行任何用户想要的程序,以下是你可以使用的一个例子: - - [![asciicast](https://asciinema.org/a/100035.png)][4] - -我们的主要目标之一就是使 `lxc exec` 与 `ssh` 类似,因为它是交互式或非交互式远程运行命令的标准。这使得 `lxc exec` 做得很好变得棘手。 - -### 1\. 处理后台任务 - -一个长期存在的问题当然是如何正确处理后台任务。这是一个关于 [LXD][5] 2.7 实例的问题的 asciinema 中的插图: - - [![asciicast](https://asciinema.org/a/100040.png)][6] - -你可以看到,在后台执行任务将导致 `lxc exec` 无法退出。许多命令可以触发此问题: - -``` -chb@conventiont|~ -> lxc exec zest1 bash -root@zest1:~# yes & -y -y -y -. -. -. -``` - -现在没有什么能救你。`yes` 将会永远直接写入`stdout`。 - -问题的根源在于 `stdout` 被保持打开,但这是必要的,它用以确保用户启动的进程写入的任何数据实际上是通过我们建立的 websocket 连接读取并发回的。 - -你可以想象,比如当你运行一个 shell 会话,你希望在后台运行一个进程,然后快速退出。对不起,你运气不好。 - -第一种并且原始的方法是一旦你检测到前台程序(例如 shell)已经退出就直接关闭 `stdout`。但这不像想得那么好,当你运行快速执行程序时,这个问题会变得明显,比如: - -``` -lxc exec -- ls -al /usr/lib -``` - -所有 `lxc exec` 进程(和相关的 `forkexec` 进程(现在不要担心)只要记住 `Go` + `setns()` 不是在发送...))在所有 `stdout` 中的_缓冲_数据被读取之前退出。这种情况下,将会导致截断输出,没有人想要这样。在尝试使用几个方法来后,禁用 pty 缓冲(我告诉你,这不太漂亮,也没有如预期工作。)和其他奇怪的想法,我设法通过几个 `poll()` “技巧”(tricks)(在某种意义上说一个技巧(“trick”))解决了这个问题。现在你终于可以运行后台任务,并且可以完全退出了。如图: - [![asciicast](https://asciinema.org/a/100043.png)][7] - -### 2\. 报告由信号引起的退出码 - -`ssh` 是一个很棒的工具。但有一件事,我一直以来不喜欢的是当 ssh 运行的命令接收到一个信号 `ssh` 时,总是会报告 `-1`,也就是退出码 `255`。当你想要了解导致程序终止的信号时,这很烦人。这就是为什么我最近实施标准 shell 中使用标准惯例 `128 + n`,其中 `n`被定义为导致执行程序退出的信号号码,来报告任何由信号导致的退出。例如,在 `SIGKILL` 信号上,你会看到 `128 + SIGKILL = 137`(计算其他致命信号的退出码作为读者的练习)。所以你可以这么做: - -``` -chb@conventiont|~ -> lxc exec zest1 sleep 100 -``` - - -现在,将 `SIGKILL` 发送到执行程序(不是 `lxc exec`本身,因为 `SIGKILL` 不可转发)。 - -``` -kill -KILL $(pidof sleep 100) -``` - -最后检查你程序的退出码: - -``` -chb@conventiont|~ -> echo $? -137 -``` - -瞧。这显然只有当 a) 退出码没有超过 `8`-位计算壁垒,b)当执行程序不使用 `137` 来表示成功(这将是...有趣的( ?))。这两个论点似乎对我来说都不太有说服力。前者因为最致命的信号不_应该_超过这个范围。后者因为(i)这是用户问题,(ii)这些退出代码实际上是保留的(我 _认为_。),(iii)你在本地或其他上面运行程序时会遇到同样的问题。 - -我看到的主要优点是这能够回报执行程序的细粒度的退出状态。注意,我们不会报告_所有_被一个这个信号杀死的程序的实例。当你的程序处理 `SIGTERM` 并且完全退出时,[LXD][8] 没有简单的方法来检测到这个并报告说这个程序被信号杀死了。你只会简单地收到退出码 `0`。 - -### 3\. 转发信号 - -这可能是最不有趣的(或者也许不是,不知道),但我发现它非常有用。正如你在 `SIGKILL` 案例中看到的那样,我明确地指出,必须将 `SIGKILL` 发送到执行程序,而不是 `lxc exec`命令本身。这是因为 `SIGKILL` 在程序中无法处理。程序可以做的唯一的事情就是像现在这样...像这个例子...(你知道了吧...)。但是程序可以处理很多其他信号 `SIGTERM`、`SIGHUP',当然也可以处理 `SIGUSR1` 和 `SIGUSR2`。因此,当你发送可以被 `lxc exec` 处理而不是被执行程序处理的信号时,较新版本的 [LXD][9] 会将信号转发到执行进程。这在脚本中非常方便。 - -无论如何,我希望你觉得这篇小小的 `lxc exec` 文章/胡言乱语有用。享受[LXD][10]吧,这是与一只疯狂的美丽的野兽玩耍。请试试在线实验:[https://linuxcontainers.org/lxd/try-it/][11],对于开发人员看看这里:[https://github.com/lxc/lxd][12] 并给我们补丁。 - -我们不要求签名任何 `CLA`,我们只要在核心风格中遵循取其中有 "Signed-off-by" 这行。 - --------------------------------------------------------------------------------- - -via: https://cbrauner.wordpress.com/2017/01/20/lxc-exec-vs-ssh/ - -作者:[brauner][a] -译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://cbrauner.wordpress.com -[1]:https://github.com/lxc/lxd -[2]:https://github.com/lxc/lxd -[3]:https://github.com/lxc/lxd/blob/master/client.go -[4]:https://asciinema.org/a/100035?autoplay=1 -[5]:https://github.com/lxc/lxd -[6]:https://asciinema.org/a/100040?autoplay=1 -[7]:https://asciinema.org/a/100043?autoplay=1 -[8]:https://github.com/lxc/lxd -[9]:https://github.com/lxc/lxd -[10]:https://github.com/lxc/lxd -[11]:https://linuxcontainers.org/lxd/try-it/ -[12]:https://github.com/lxc/lxd From cdae917eb32bb81f05585edb1e6782e0480fc9ac Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 6 Aug 2017 11:28:40 +0800 Subject: [PATCH 024/125] PRF:20170720 CoreOS OCI Unveil Controversial Open Container Industry Standard.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @LHRchina 恭喜你完成了第一篇翻译贡献! --- ...ersial Open Container Industry Standard.md | 99 +++++++++---------- 1 file changed, 45 insertions(+), 54 deletions(-) diff --git a/translated/tech/20170720 CoreOS OCI Unveil Controversial Open Container Industry Standard.md b/translated/tech/20170720 CoreOS OCI Unveil Controversial Open Container Industry Standard.md index ed5a27cae7..4244b4c4ff 100644 --- a/translated/tech/20170720 CoreOS OCI Unveil Controversial Open Container Industry Standard.md +++ b/translated/tech/20170720 CoreOS OCI Unveil Controversial Open Container Industry Standard.md @@ -1,111 +1,102 @@ -CoreOs , OCI(Open Container Initiative) 标准揭开了容器工业标准论战 +CoreOS 和 OCI 揭开了容器工业标准的论战 ============================================================ + ![coreos-oci-open-container-industry-standard](http://www.linuxinsider.com/article_images/story_graphics_xlarge/xl-2017-core-os-1.jpg) -[**在并购交易中保护知识产权完整性**][12][][13]。Flexera 软件公司 提供卓越的技术尽职调查审计过程的实践和方案 -**[Download the White Paper][3]** +[CoreOS][4] 和 [开放容器联盟(OCI)][5] 周三(2017 年 7 月 19 日)发布的镜像和运行时标准主要参照了 Docker 的镜像格式技术。 -[CoreOS][4] 和 [OCI标准][5] 本周三发布的镜像和运行时标准主要参照了Docker的镜像格式技术 +然而,OCI 决定在 Docker 的事实标准平台上建立模型引发了一些问题。一些批评者提出其他方案。 -然而,OCI对docker的de facto 平台标准的模仿的决定引发了一些问题。一些批评者提出其他方案 +CoreOS 的 CTO 及 OCI 技术管理委员会主席 Brandon Philips 说, 1.0版本为应用容器提供了一个稳定标准。他说,拥有产业领导者所创造的标准,应能激发 OCI 合作伙伴进一步地发展标准和创新。Philips 补充道,OCI 完成 1.0 版本意味着 OCI 运行时规范和 OCI 镜像格式标准现在已经可以广泛使用。此外,这一成就将推动 OCI 社区稳固日益增长的可互操作的可插拔工具集市场。 -CoreOs的CTO及OCI技术管理委员会主席Brandon Philips说 1.0版本 为应用容器提供了一个稳定标准 +产业支持的标准将提供一种信心:容器已被广泛接受,并且 Kubernetes 用户将获得更进一步的支持。 -他说,产业领导者所创造的标准激发了OCI标准参与者创造出更深层的标准和创新。 +Philips 告诉 LinuxInsider,结果是相当不错的,认证流程已经开始。 +### 合作挑战 -Philips补充道,OCI完成1.0版本意味着 OCI运行时规范和OCI镜像格式标准现在已经可以广泛使用。 -此外,现在取得的成就将推动OCI社区稳固一个成长中的互操作可插拔工具集市场 +Philips 说,开放标准是容器生态系统取得成功的关键,构建标准的最好方式是与社区密切协作。然而,在 1.0 版本上达成共识所花费的时间超出了预期。 -产业支持的标准将提供一种信心:容器将被留存并且Kubernetes(Kubernetes是Google开源的Docker容器集群管理系统)用户将获得更进一步的支持 +“早期,最大的挑战在于如今解决项目的发布模式及如何实施该项目”,他追述道,”每个人都低估了项目所要花费的时间。“ -Philips告诉LinuxInsider:结果是相当不错的,证明过程已经开始. - -### 合作和挑战 - -开放标准是容器生态系统取得成功的关键 Philips说,最好的实现标准的方式是与社区协作。然而,在1.0版本上达成共识所花费的时间超出了预期。 - -"早期,最大的挑战在于处理项目的发布模式及如何实施该项目",他追述道,”每个人都低估了项目所要花费的时间。“ - -他说,合作者面对着和他们想做的不一致的预期,但是在过去的一年前后,小组达到了他们的期望并且经历了更多的实验 +他说,OCI 联盟成员对他们想做的事情抱有不相匹配的预期,但是在过去的一年中,该组织了解了期望程度,并且经历了更多的测试。 ### 追逐标准 -CoreOS 官方在几年前就开始讨论这个想法:行业支持的开源容器镜像和运行时规范标准,Phillips说,早期的探索使我们认识到:在标准镜像格式上达成一致是决定性的。 +CoreOS 官方在几年前就开始讨论行业支持的容器镜像和运行时规范的开放标准的想法,Phillips 说,早期的探索使我们认识到:在标准镜像格式上达成一致是至关重要的。 -CoreOS和容器技术创造者[Docker][6] 在2015年6月宣布OCI的开始。合作起始于 21个行业领导者制定开源容器计划(OCP)。它作为一个非营利组织,旨在建立云存储软件容器的最低通用标准 +CoreOS 和容器技术创造者 [Docker][6] 在 2015 年 6 月宣布 OCI 成立。合作起始于 21 个行业领导者制定开放容器计划(OCP)。它作为一个非营利组织,旨在建立云存储软件容器的最低通用标准。 -联盟包括容器业界的领导者:Docker、微软、红帽、IBM、谷歌和linux基金会 +联盟包括容器业界的领导者:Docker、微软、红帽、IBM、谷歌和 Linux 基金会。 -OCI标准的目的是让应用开发者相信:新的规范并开发新出工具时,部署在容器上的软件仍然能够持续运转。这种信心必须同时满足所有私有和开源软件 +OCI 的目的是让应用开发者相信:当新的规范出来并开发出新的工具时,部署在容器上的软件仍然能够持续运行。这种信心必须同时满足所有私有和开源软件。 -工具和应用是私有还是开源的并没有什么关系。当规范开始应用,产品会被设计成与任何容器配置相适应,Philips说。 +工具和应用是私有还是开源的并没有什么关系。当规范开始应用,产品可以被设计成与任何容器配置相适应,Philips 说。 -你需要有意识地超越编写代码的人能力之外创建标准。它是一个额外的功夫。他补充道 +“你需要有意识地超越编写代码的人能力之外创建标准。它是一个额外的付出。”他补充道。 -作为联盟的一部分,Docker向OCP(开源容器计划)贡献出它的de facto 镜像格式标准技术。 +作为联盟的一部分,Docker 向 OCP(开放容器计划)捐献出它的镜像格式的事实标准技术。它包括该公司的容器格式、运行时代码和规范。建立 OCI 镜像标准的工作起始于去年。 -它包括公司的容器格式、运行时代码和规范。建立开源容器首创镜像标准的工作起始于去年。 +标准的里程碑给予容器使用者开发、打包、签名应用容器的能力。他们也能够在各种容器引擎上运行容器,Philips 强调。 -标准的里程碑给予容器使用者开发、打包、签名应用容器的能力。他们也能够在各种容器引擎上运行容器,Philips强调 +### 唯一选择? -### 唯一的选择? +[Pund-IT][7] 的首席分析师 Charles King 表示:联盟面临着两种实现标准的方式。第一种选择是汇集相同意向的人员来避免分歧从零开始建立标准。 -[Pund-IT][7]的首席分析师Charles King表示:联盟面临着两种实现标准的方式。第一种选择是汇集相同意向的人员来避免分歧从零开始建立标准。 +但是联盟成员似乎满足于第二种方案:采用一种强大的市场领先的平台作为一个有效的标准。 -但是联盟成员似乎满足于第二种方案:采用一种强大的以市场为导向的平台作为一个有效的标准。 +“Docker 对 [Linux 基金会][8]的贡献使 OCI 坚定的选择了第二种方案。但是那些关注于 Docker 的做法和它的市场地位的人也许感觉应该有更好的选择。”King 对 LinuxInsider 说。 -Docker对[Linux Foundation][8](linux基金会)的贡献使OCI坚定的选择了第二种方案。但是那些关注于Docker的实现途径或者它的市场地位的人也许感觉应该有更好的选择。King对LinuxInsider讲述 +事实上,有个 OCI 成员 CoreOS 在开始的时候对该组织的总体方向进行了一些强烈的批评。他说,“所以看看 V1.0 版本是否处理或不处理那些关注点将是很有趣的事情。” -事实上,一个OCI成员--CoreOs --在开始的时候对该组织的总体方向进行了一些强烈的批评。拭目以待V1.0版本是否处理了那些关注点将是很有趣的事情 +### 更快之路 +Docker 已经被广泛部署的运行时实现是建立开放标准的合适基础。据 [Cloud Technology Partners][9] 的高级副总裁 David Linthicum 所说,Docker 已经是一个事实标准。 -### 更快的路径 +“我们能很快就让它们工作起来也是很重要的。但是一次次的标准会议、处理政治因素以及诸如此类的事情只是浪费时间” 。他告诉 LinuxInsider。 -Docker已经被广泛的部署运行时实现是建立开放标准的合适基础。据[Cloud Technology Partners][9] 的高级副总裁David Linthicum所说,Docker已经是一个de facto 标准 +但是现在没有更好的选择,他补充道。 -“我们能很快就能实现这些想法也是很重要的。但是前后的标准会议、处理政治因素等事情只是浪费时间” 。他对LinuxInsider采访者说 +据 RedHat 公司的 Linux 容器技术高级布道者 Joe Brockmeier 所说,Docker 的运行时是 runC 。它是 OCI 运行时标准的一种实现。 -但是现在没有更好的选择,他告诉LinuxInsider采访者 +“因此,runC 是一个合适的运行时标准的基础。它被广泛的接受并成为了大多数容器技术实现的基础。他说。 -据RedHat公司的linux容器技术高级布道者Joe Brockmeier所说,Docker的运行时是 runC 。 它是OCI运行时标准的一种实现。 - -因此,runC 是一个合适的运行时标准的基础。它被广泛的接受并成为了大多数容器技术实现的基础。他告诉LinuxInsider - -OCI是比Docker更进一步的标准。尽管Docker确实提交了遵循OCI规范的底层代码,然而这一谱系就此停止,并且没真正的可行替代方案存在。 +OCI 是比 Docker 更进一步的标准。尽管 Docker 确实提交了遵循 OCI 规范的底层代码,然而这一系列代码就此停止,并且没真正的可行替代方案存在。 ### 对接问题 -Pund-IT的领导建议:采用一种广泛使用的产业标准将简化和加速许多公司对容器技术的采纳和管理。也有可能一些关键的供应商将继续关注他们自己的专有容器技术 +Pund-IT 的 King 建议:采用一种广泛使用的产业标准将简化和加速许多公司对容器技术的采纳和管理。也有可能一些关键的供应商将继续关注他们自己的专有容器技术。 -他们辩称他们的做法是一个更好的方式但这将有效的阻止OCI取得市场的主导地位。从一个大体上实现的标准开始,就像OCI所做的那样,也许并不能完美的使所有人满意。但是这也许能比其他方案更加快速有效的实现目标 +“他们辩称他们的做法是一个更好的方式,但这将有效的阻止 OCI 取得市场的主导地位。”他说,“从一个大体上实现的标准开始,就像 OCI 所做的那样,也许并不能完美的使所有人满意,但是这也许能比其他方案更加快速有效的实现目标。” -容器已经标准化的部署到了云上,Docker显然是领先的。[Semaphore][10]联合创始人Marko Anastasov说。Docker的de facto标准容器代表了开发开放标准的的最佳基础。Docker的商业利益将如何影响其参与OCI的规模还有待观察 +容器已经标准化的部署到了云上,Docker 显然是领先的。[Semaphore][10] 联合创始人 Marko Anastasov 说。 -### 反对的观点 +他说,Docker 事实标准的容器代表了开发开放标准的的最佳基础。Docker 的商业利益将如何影响其参与 OCI 的规模还有待观察。 -开放标准并不是在云部署中采用更多的容器的最终目标。[ThoughtWorks][11]的首席顾问Nic Cheneweth 主张。更好的的方法是查看IT行业的服务器虚拟化部分的影响 +### 反对观点 -Cheneweth对LinuxInsider说:“持续增长和广泛采用的主要动力不是在行业标准的声明中,而是在使用任何竞争技术的潜在和实现的效率方面,比如VMware、Xen等。” +开放标准并不是在云部署中采用更多的容器的最终目标。[ThoughtWorks][11] 的首席顾问 Nic Cheneweth 表示。更好的的方法是查看 IT 行业的服务器虚拟化部分的影响。 -容器技术的某些方面,例如容器本身,可以根据标准来定义。他说,在此之前,由深度开源软件参与引导的健康竞争将有助于成为一个更好的标准。 +Cheneweth 对 LinuxInsider 说:“持续增长和广泛采用的主要动力不是在行业标准的声明中,而是通过使用任何竞争技术所获得的潜在的和实现的效率,比如 VMware、Xen 等。” -据Cheneweth说,关于容器的编制标准对空间的持续增长并不特别重要。 +容器技术的某些方面,例如容器本身,可以根据标准来定义。他说,在此之前,深入开源软件参与引导的健康竞争将有助于成为一个更好的标准。 -不过,他表示,如果行业坚持锁定de facto容器标准,那么OCI所选择的模型是一个很好的起点。“我不知道是否有更好的选择,但更糟糕的选择是存在的。” +据 Cheneweth 说,容器编排标准对该领域的持续增长并不特别重要。 + +不过,他表示,如果行业坚持锁定容器事实标准,那么 OCI 所选择的模型是一个很好的起点。“我不知道是否有更好的选择,但肯定这不是最糟糕的选择。” 作者简介: -自2003年以来,Jack M.Germain一直是一个新闻网络记者。他主要关注的领域是企业IT、Linux和开源技术。他已经写了很多关于Linux发行版和其他开源软件的评论。 +自 2003 年以来,Jack M.Germain一直是一个新闻网络记者。他主要关注的领域是企业 IT、Linux 和开源技术。他已经写了很多关于 Linux 发行版和其他开源软件的评论。 ---- via: http://www.linuxinsider.com/story/84689.html -作者:[Jack M. Germain ][a] +作者:[Jack M. Germain][a] 译者:[LHRchina](https://github.com/LHRchina) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 5c61d34681429dd417a2a5bf2a9f20c31be66d1f Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 6 Aug 2017 11:29:16 +0800 Subject: [PATCH 025/125] PUB:20170720 CoreOS OCI Unveil Controversial Open Container Industry Standard.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @LHRchina 发布后地址:https://linux.cn/article-8756-1.html ,你的个人 LCTT 页面:https://linux.cn/lctt/LHRchina --- ...S OCI Unveil Controversial Open Container Industry Standard.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {translated/tech => published}/20170720 CoreOS OCI Unveil Controversial Open Container Industry Standard.md (100%) diff --git a/translated/tech/20170720 CoreOS OCI Unveil Controversial Open Container Industry Standard.md b/published/20170720 CoreOS OCI Unveil Controversial Open Container Industry Standard.md similarity index 100% rename from translated/tech/20170720 CoreOS OCI Unveil Controversial Open Container Industry Standard.md rename to published/20170720 CoreOS OCI Unveil Controversial Open Container Industry Standard.md From e283f2ec2a0fd851187bf629d655cdbacf1b7e62 Mon Sep 17 00:00:00 2001 From: rieonke Date: Sun, 6 Aug 2017 22:28:45 +0800 Subject: [PATCH 026/125] translated --- ...Kubernetes cluster for Linux containers.md | 86 +++++++++---------- 1 file changed, 42 insertions(+), 44 deletions(-) rename {sources => translated}/tech/20170801 Deploy Kubernetes cluster for Linux containers.md (52%) diff --git a/sources/tech/20170801 Deploy Kubernetes cluster for Linux containers.md b/translated/tech/20170801 Deploy Kubernetes cluster for Linux containers.md similarity index 52% rename from sources/tech/20170801 Deploy Kubernetes cluster for Linux containers.md rename to translated/tech/20170801 Deploy Kubernetes cluster for Linux containers.md index 58e87796c7..756b5442a9 100644 --- a/sources/tech/20170801 Deploy Kubernetes cluster for Linux containers.md +++ b/translated/tech/20170801 Deploy Kubernetes cluster for Linux containers.md @@ -1,33 +1,31 @@ -> translating by rieon - Deploy Kubernetes cluster for Linux containers +部署Kubernetes 容器集群 ============================================================ -In this quick start, a Kubernetes cluster is deployed using the Azure CLI. A multi-container application consisting of web front-end and a Redis instance is then deployed and run on the cluster. Once completed, the application is accessible over the internet. +在这个快速入门教程中,我们使用 Azure CLI 创建 Kubernetes 集群。 然后在集群上部署并运行由 Web 前端和 Redis 实例组成的多容器应用程序。 一旦部署完成,应用程序可以通过互联网访问。 +![示例应用截图](https://docs.microsoft.com/en-us/azure/container-service/kubernetes/media/container-service-kubernetes-walkthrough/azure-vote.png) -![Image of browsing to Azure Vote](https://docs.microsoft.com/en-us/azure/container-service/kubernetes/media/container-service-kubernetes-walkthrough/azure-vote.png) +这个快速入门教程假设你已经基本了解了Kubernetes 的概念,有关 Kubernetes 的详细信息,请参阅[ Kubernetes 文档] [3]。 -This quick start assumes a basic understanding of Kubernetes concepts, for detailed information on Kubernetes see the [Kubernetes documentation][3]. +如果您没有 Azure 账号订阅,请在开始之前创建一个[免费帐户] [4]。 -If you don't have an Azure subscription, create a [free account][4] before you begin. +### 登陆Azure 云控制台 -### Launch Azure Cloud Shell - -The Azure Cloud Shell is a free Bash shell that you can run directly within the Azure portal. It has the Azure CLI preinstalled and configured to use with your account. Click the Cloud Shell button on the menu in the upper-right of the [Azure portal][5]. +Azure 云控制台是一个免费的 Bash shell ,你可以直接在 Azure 网站上运行。 它已经在你的账户中预先配置好了, 单击[ Azure 门户] [5]右上角菜单上的 “Cloud Shell” 按钮; [![Cloud Shell](https://docs.microsoft.com/en-us/azure/includes/media/cloud-shell-try-it/cloud-shell-menu.png)][6] -The button launches an interactive shell that you can use to run all of the steps in this topic: + 该按钮启动一个交互式 shell,您可以使用它来运行本教程中的所有操作步骤。 - [![Screenshot showing the Cloud Shell window in the portal](https://docs.microsoft.com/en-us/azure/includes/media/cloud-shell-try-it/cloud-shell-safari.png)][7] + [![ Cloud Shell 截图](https://docs.microsoft.com/en-us/azure/includes/media/cloud-shell-try-it/cloud-shell-safari.png)][7] -If you choose to install and use the CLI locally, this quickstart requires that you are running the Azure CLI version 2.0.4 or later. Run `az --version` to find the version. If you need to install or upgrade, see [Install Azure CLI 2.0][8]. +此快速入门教程所用的 Azure CLI 的版本最低要求为 2.0.4 。如果您选择在本地安装和使用 CLI 工具,请运行`az --version' 来检查已安装的版本。 如果您需要安装或升级请参阅[安装 Azure CLI 2.0 ] [8]。 -### Create a resource group +### 创建一个资源组 -Create a resource group with the [az group create][9] command. An Azure resource group is a logical group in which Azure resources are deployed and managed. +使用 [az group create] 命令[9]创建一个资源组,一个 Azure 资源组是 Azure 资源部署和管理的逻辑组。 -The following example creates a resource group named  _myResourceGroup_  in the  _eastus_  location. +以下示例在 _eastus_ 位置中创建名为 _myResourceGroup_ 的资源组。 Azure CLICopyTry It @@ -36,7 +34,7 @@ az group create --name myResourceGroup --location eastus ``` -Output: +输出: JSONCopy @@ -54,9 +52,9 @@ JSONCopy ``` -### Create Kubernetes cluster +### 创建一个 Kubernetes 集群 -Create a Kubernetes cluster in Azure Container Service with the [az acs create][10]command. The following example creates a cluster named  _myK8sCluster_  with one Linux master node and three Linux agent nodes. +使用 [az acs create] [10]命令在 Azure 容器服务中创建 Kubernetes 集群。 以下示例使用一个 Linux 主节点和三个 Linux 代理节点创建一个名为 _myK8sCluster_ 的集群。 Azure CLICopyTry It @@ -64,16 +62,15 @@ Azure CLICopyTry It az acs create --orchestrator-type=kubernetes --resource-group myResourceGroup --name=myK8sCluster --generate-ssh-keys ``` +几分钟后,命令将完成并返回有关该集群的json格式的信息。 -After several minutes, the command completes and returns json formatted information about the cluster. +### 连接到 Kubernetes 集群 -### Connect to the cluster +要管理 Kubernetes 群集,可以使用 Kubernetes 命令行工具 [kubectl] [11]。 -To manage a Kubernetes cluster, use [kubectl][11], the Kubernetes command-line client. +如果您使用 Azure CloudShell ,则已经安装了 kubectl 。 如果要在本地安装,可以使用[az acs kubernetes install-cli] [12]命令。 -If you're using Azure CloudShell, kubectl is already installed. If you want to install it locally, you can use the [az acs kubernetes install-cli][12] command. - -To configure kubectl to connect to your Kubernetes cluster, run the [az acs kubernetes get-credentials][13] command. This steps downloads credentials and configures the Kubernetes CLI to use them. +要配置 kubectl 连接到您的 Kubernetes 群集,请运行 [az acs kubernetes get-credentials] [13] 命令下载凭据并配置 Kubernetes CLI 以使用它们。 Azure CLICopyTry It @@ -82,7 +79,7 @@ az acs kubernetes get-credentials --resource-group=myResourceGroup --name=myK8sC ``` -To verify the connection to your cluster, use the [kubectl get][14] command to return a list of the cluster nodes. +要验证与集群的连接,请使用 [kubectl get] [14] 命令查看集群节点的列表。 Azure CLICopyTry It @@ -91,7 +88,7 @@ kubectl get nodes ``` -Output: +输出: bashCopy @@ -104,11 +101,11 @@ k8s-master-14ad53a1-0 Ready,SchedulingDisabled 10m v1.6.6 ``` -### Run the application +### 运行应用程序 -A Kubernetes manifest file defines a desired state for the cluster, including things like what container images should be running. For this example, a manifest is used to create all object needed to run the Azure Vote application. +Kubernetes 清单文件为集群定义了一个所需的状态,包括了集群中应该运行什么样的容器镜像。 对于此示例,清单用于创建运行 Azure Vote 应用程序所需的所有对象。 -Create a file named `azure-vote.yaml` and copy into it the following YAML. +创建一个名为 `azure-vote.yaml` ,将下面的内容拷贝到 YAML 中。 yamlCopy @@ -174,7 +171,7 @@ spec: ``` -Use the [kubectl create][15] command to run the application. +使用 [kubectl create][15] 命令来运行该应用程序。 Azure CLICopyTry It @@ -183,7 +180,7 @@ kubectl create -f azure-vote.yaml ``` -Output: +输出: bashCopy @@ -195,11 +192,11 @@ service "azure-vote-front" created ``` -### Test the application +### 测试应用程序 -As the application is run, a [Kubernetes service][16] is created that exposes the application front-end to the internet. This process can take a few minutes to complete. +当应用程序的跑起来之后,需要创建一个[ Kubernetes 服务] [16],将应用程序前端暴露在互联网上。 此过程可能需要几分钟才能完成。 -To monitor progress, use the [kubectl get service][17] command with the `--watch`argument. +要监控这个进程,使用 [kubectl get service][17] 命令时加上 `--watch` 参数。 Azure CLICopyTry It @@ -209,6 +206,7 @@ kubectl get service azure-vote-front --watch ``` Initially the EXTERNAL-IP for the  _azure-vote-front_  service appears as  _pending_ . Once the EXTERNAL-IP address has changed from  _pending_  to an  _IP address_ , use `CTRL-C` to stop the kubectl watch process. +最初,_azure-vote-front_ 服务的 EXTERNAL-IP 显示为 _pending_ 。 一旦 EXTERNAL-IP 地址从 _pending_ 变成一个具体的IP地址,请使用 “CTRL-C” 来停止 kubectl 监视进程。 bashCopy @@ -219,12 +217,13 @@ azure-vote-front 10.0.34.242 52.179.23.131 80:30676/TCP 2m ``` You can now browse to the external IP address to see the Azure Vote App. +现在你可以通过这个外网 IP 地址访问到 Azure Vote 这个应用了。 -![Image of browsing to Azure Vote](https://docs.microsoft.com/en-us/azure/container-service/kubernetes/media/container-service-kubernetes-walkthrough/azure-vote.png) +![浏览 Azure Vote 应用截图 ](https://docs.microsoft.com/en-us/azure/container-service/kubernetes/media/container-service-kubernetes-walkthrough/azure-vote.png) -### Delete cluster +### 删除集群 -When the cluster is no longer needed, you can use the [az group delete][18]command to remove the resource group, container service, and all related resources. +当不再需要集群时,可以使用 [az group delete] [18]命令删除资源组,容器服务和所有相关资源。 Azure CLICopyTry It @@ -233,24 +232,23 @@ az group delete --name myResourceGroup --yes --no-wait ``` -### Get the code +### 获取示例代码 -In this quick start, pre-created container images have been used to create a Kubernetes deployment. The related application code, Dockerfile, and Kubernetes manifest file are available on GitHub.+ +在这个快速入门教程中,预先创建的容器镜像已被用于部署 Kubernetes 。相关应用程序代码 Dockerfile 和 Kubernetes 清单文件可在 GitHub 中获得。Github 仓库地址是 [https://github.com/Azure-Samples/azure-voting-app-redis][19] -[https://github.com/Azure-Samples/azure-voting-app-redis][19] -### Next steps +### 下一步 -In this quick start, you deployed a Kubernetes cluster and deployed a multi-container application to it. +在这个快速入门教程中,您部署了一个 Kubernetes 集群,并部署了一个多容器应用程序。 -To learn more about Azure Container Service, and walk through a complete code to deployment example, continue to the Kubernetes cluster tutorial. +要了解有关 Azure 容器服务的更多信息,走完一个完整的从代码到部署的全流程,请继续阅读 Kubernetes 集群教程。 -------------------------------------------------------------------------------- via: https://docs.microsoft.com/en-us/azure/container-service/kubernetes/container-service-kubernetes-walkthrough 作者:[neilpeterson ][a],[mmacy][b] -译者:[译者ID](https://github.com/译者ID) +译者:[rieonke](https://github.com/rieonke) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 37918dbff780a30c7acbca6180a79b0780b851f4 Mon Sep 17 00:00:00 2001 From: Rieon Date: Sun, 6 Aug 2017 22:34:47 +0800 Subject: [PATCH 027/125] fix some styling error --- ...Kubernetes cluster for Linux containers.md | 37 ++++++------------- 1 file changed, 12 insertions(+), 25 deletions(-) diff --git a/translated/tech/20170801 Deploy Kubernetes cluster for Linux containers.md b/translated/tech/20170801 Deploy Kubernetes cluster for Linux containers.md index 756b5442a9..827449b302 100644 --- a/translated/tech/20170801 Deploy Kubernetes cluster for Linux containers.md +++ b/translated/tech/20170801 Deploy Kubernetes cluster for Linux containers.md @@ -5,13 +5,13 @@ Deploy Kubernetes cluster for Linux containers 在这个快速入门教程中,我们使用 Azure CLI 创建 Kubernetes 集群。 然后在集群上部署并运行由 Web 前端和 Redis 实例组成的多容器应用程序。 一旦部署完成,应用程序可以通过互联网访问。 ![示例应用截图](https://docs.microsoft.com/en-us/azure/container-service/kubernetes/media/container-service-kubernetes-walkthrough/azure-vote.png) -这个快速入门教程假设你已经基本了解了Kubernetes 的概念,有关 Kubernetes 的详细信息,请参阅[ Kubernetes 文档] [3]。 +这个快速入门教程假设你已经基本了解了Kubernetes 的概念,有关 Kubernetes 的详细信息,请参阅[ Kubernetes 文档][3]。 -如果您没有 Azure 账号订阅,请在开始之前创建一个[免费帐户] [4]。 +如果您没有 Azure 账号订阅,请在开始之前创建一个[免费帐户][4]。 ### 登陆Azure 云控制台 -Azure 云控制台是一个免费的 Bash shell ,你可以直接在 Azure 网站上运行。 它已经在你的账户中预先配置好了, 单击[ Azure 门户] [5]右上角菜单上的 “Cloud Shell” 按钮; +Azure 云控制台是一个免费的 Bash shell ,你可以直接在 Azure 网站上运行。 它已经在你的账户中预先配置好了, 单击[ Azure 门户][5]右上角菜单上的 “Cloud Shell” 按钮; [![Cloud Shell](https://docs.microsoft.com/en-us/azure/includes/media/cloud-shell-try-it/cloud-shell-menu.png)][6] @@ -19,16 +19,14 @@ Azure 云控制台是一个免费的 Bash shell ,你可以直接在 Azure 网 [![ Cloud Shell 截图](https://docs.microsoft.com/en-us/azure/includes/media/cloud-shell-try-it/cloud-shell-safari.png)][7] -此快速入门教程所用的 Azure CLI 的版本最低要求为 2.0.4 。如果您选择在本地安装和使用 CLI 工具,请运行`az --version' 来检查已安装的版本。 如果您需要安装或升级请参阅[安装 Azure CLI 2.0 ] [8]。 +此快速入门教程所用的 Azure CLI 的版本最低要求为 2.0.4 。如果您选择在本地安装和使用 CLI 工具,请运行 `az --version` 来检查已安装的版本。 如果您需要安装或升级请参阅[安装 Azure CLI 2.0 ][8]。 ### 创建一个资源组 -使用 [az group create] 命令[9]创建一个资源组,一个 Azure 资源组是 Azure 资源部署和管理的逻辑组。 +使用 [az group create][9] 命令创建一个资源组,一个 Azure 资源组是 Azure 资源部署和管理的逻辑组。 以下示例在 _eastus_ 位置中创建名为 _myResourceGroup_ 的资源组。 -Azure CLICopyTry It - ``` az group create --name myResourceGroup --location eastus @@ -36,7 +34,6 @@ az group create --name myResourceGroup --location eastus 输出: -JSONCopy ``` { @@ -54,7 +51,7 @@ JSONCopy ### 创建一个 Kubernetes 集群 -使用 [az acs create] [10]命令在 Azure 容器服务中创建 Kubernetes 集群。 以下示例使用一个 Linux 主节点和三个 Linux 代理节点创建一个名为 _myK8sCluster_ 的集群。 +使用 [az acs create][10] 命令在 Azure 容器服务中创建 Kubernetes 集群。 以下示例使用一个 Linux 主节点和三个 Linux 代理节点创建一个名为 _myK8sCluster_ 的集群。 Azure CLICopyTry It @@ -66,22 +63,20 @@ az acs create --orchestrator-type=kubernetes --resource-group myResourceGroup -- ### 连接到 Kubernetes 集群 -要管理 Kubernetes 群集,可以使用 Kubernetes 命令行工具 [kubectl] [11]。 +要管理 Kubernetes 群集,可以使用 Kubernetes 命令行工具 [kubectl][11]。 -如果您使用 Azure CloudShell ,则已经安装了 kubectl 。 如果要在本地安装,可以使用[az acs kubernetes install-cli] [12]命令。 +如果您使用 Azure CloudShell ,则已经安装了 kubectl 。 如果要在本地安装,可以使用 [az acs kubernetes install-cli][12] 命令。 -要配置 kubectl 连接到您的 Kubernetes 群集,请运行 [az acs kubernetes get-credentials] [13] 命令下载凭据并配置 Kubernetes CLI 以使用它们。 +要配置 kubectl 连接到您的 Kubernetes 群集,请运行 [az acs kubernetes get-credentials][13] 命令下载凭据并配置 Kubernetes CLI 以使用它们。 -Azure CLICopyTry It ``` az acs kubernetes get-credentials --resource-group=myResourceGroup --name=myK8sCluster ``` -要验证与集群的连接,请使用 [kubectl get] [14] 命令查看集群节点的列表。 +要验证与集群的连接,请使用 [kubectl get][14] 命令查看集群节点的列表。 -Azure CLICopyTry It ``` kubectl get nodes @@ -90,7 +85,6 @@ kubectl get nodes 输出: -bashCopy ``` NAME STATUS AGE VERSION @@ -107,7 +101,6 @@ Kubernetes 清单文件为集群定义了一个所需的状态,包括了集群 创建一个名为 `azure-vote.yaml` ,将下面的内容拷贝到 YAML 中。 -yamlCopy ``` apiVersion: apps/v1beta1 @@ -173,8 +166,6 @@ spec: 使用 [kubectl create][15] 命令来运行该应用程序。 -Azure CLICopyTry It - ``` kubectl create -f azure-vote.yaml @@ -182,7 +173,6 @@ kubectl create -f azure-vote.yaml 输出: -bashCopy ``` deployment "azure-vote-back" created @@ -194,7 +184,7 @@ service "azure-vote-front" created ### 测试应用程序 -当应用程序的跑起来之后,需要创建一个[ Kubernetes 服务] [16],将应用程序前端暴露在互联网上。 此过程可能需要几分钟才能完成。 +当应用程序的跑起来之后,需要创建一个 [Kubernetes 服务][16],将应用程序前端暴露在互联网上。 此过程可能需要几分钟才能完成。 要监控这个进程,使用 [kubectl get service][17] 命令时加上 `--watch` 参数。 @@ -208,8 +198,6 @@ kubectl get service azure-vote-front --watch Initially the EXTERNAL-IP for the  _azure-vote-front_  service appears as  _pending_ . Once the EXTERNAL-IP address has changed from  _pending_  to an  _IP address_ , use `CTRL-C` to stop the kubectl watch process. 最初,_azure-vote-front_ 服务的 EXTERNAL-IP 显示为 _pending_ 。 一旦 EXTERNAL-IP 地址从 _pending_ 变成一个具体的IP地址,请使用 “CTRL-C” 来停止 kubectl 监视进程。 -bashCopy - ``` azure-vote-front 10.0.34.242 80:30676/TCP 7s azure-vote-front 10.0.34.242 52.179.23.131 80:30676/TCP 2m @@ -223,9 +211,8 @@ You can now browse to the external IP address to see the Azure Vote App. ### 删除集群 -当不再需要集群时,可以使用 [az group delete] [18]命令删除资源组,容器服务和所有相关资源。 +当不再需要集群时,可以使用 [az group delete][18] 命令删除资源组,容器服务和所有相关资源。 -Azure CLICopyTry It ``` az group delete --name myResourceGroup --yes --no-wait From 829ac11331b43903aecf057fdd8c2de785877552 Mon Sep 17 00:00:00 2001 From: XYenChi <466530436@qq.com> Date: Sun, 6 Aug 2017 22:45:42 +0800 Subject: [PATCH 028/125] XYenChi translating --- ...nners guide to collecting and mapping Twitter data using R.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20170620 A beginners guide to collecting and mapping Twitter data using R.md b/sources/tech/20170620 A beginners guide to collecting and mapping Twitter data using R.md index ec00ced6f3..06d298180b 100644 --- a/sources/tech/20170620 A beginners guide to collecting and mapping Twitter data using R.md +++ b/sources/tech/20170620 A beginners guide to collecting and mapping Twitter data using R.md @@ -1,3 +1,4 @@ +XYenChi is translating A beginner's guide to collecting and mapping Twitter data using R ============================================================ From 38c07781e2e15c70a362924335212f9864e817c9 Mon Sep 17 00:00:00 2001 From: WangYue <815420852@qq.com> Date: Mon, 7 Aug 2017 01:04:55 +0800 Subject: [PATCH 029/125] =?UTF-8?q?=E7=94=B3=E8=AF=B7=E7=BF=BB=E8=AF=91=20?= =?UTF-8?q?20160616=20The=20Children=20s=20Illustrated=20Guide=20to=20Kube?= =?UTF-8?q?rnetes.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 申请翻译 20160616 The Children s Illustrated Guide to Kubernetes.md --- .../20160616 The Children s Illustrated Guide to Kubernetes.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sources/tech/20160616 The Children s Illustrated Guide to Kubernetes.md b/sources/tech/20160616 The Children s Illustrated Guide to Kubernetes.md index f398ef2e57..27d520735b 100644 --- a/sources/tech/20160616 The Children s Illustrated Guide to Kubernetes.md +++ b/sources/tech/20160616 The Children s Illustrated Guide to Kubernetes.md @@ -1,3 +1,6 @@ +申请翻译 by WangYueScream +========================= + The Children's Illustrated Guide to Kubernetes ============================================================ From d920e9d1838026728e470da986c601d56dae5421 Mon Sep 17 00:00:00 2001 From: WangYue <815420852@qq.com> Date: Mon, 7 Aug 2017 01:06:06 +0800 Subject: [PATCH 030/125] =?UTF-8?q?=E7=94=B3=E8=AF=B7=E7=BF=BB=E8=AF=91=20?= =?UTF-8?q?=20=2020170421=20A=20Window=20Into=20the=20Linux=20Desktop.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 申请翻译 20170421 A Window Into the Linux Desktop.md --- sources/talk/20170421 A Window Into the Linux Desktop.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sources/talk/20170421 A Window Into the Linux Desktop.md b/sources/talk/20170421 A Window Into the Linux Desktop.md index 917d718aa5..b548b6ef80 100644 --- a/sources/talk/20170421 A Window Into the Linux Desktop.md +++ b/sources/talk/20170421 A Window Into the Linux Desktop.md @@ -1,3 +1,7 @@ +申请翻译    by  WangYueScream +================================== + + A Window Into the Linux Desktop ============================================================ From d344eff4d93358836c8f774a350704f162e1cefd Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 7 Aug 2017 08:44:19 +0800 Subject: [PATCH 031/125] translated --- ...12 How To Setup Apache Hadoop On CentOS.md | 82 +++++++++---------- 1 file changed, 40 insertions(+), 42 deletions(-) rename {sources => translated}/tech/20170712 How To Setup Apache Hadoop On CentOS.md (57%) diff --git a/sources/tech/20170712 How To Setup Apache Hadoop On CentOS.md b/translated/tech/20170712 How To Setup Apache Hadoop On CentOS.md similarity index 57% rename from sources/tech/20170712 How To Setup Apache Hadoop On CentOS.md rename to translated/tech/20170712 How To Setup Apache Hadoop On CentOS.md index 0345c5b29f..1e008a5d6c 100644 --- a/sources/tech/20170712 How To Setup Apache Hadoop On CentOS.md +++ b/translated/tech/20170712 How To Setup Apache Hadoop On CentOS.md @@ -1,27 +1,25 @@ -translating-----geekpi - -How To Setup Apache Hadoop On CentOS +如何在 CentOS 上安装 Apache Hadoop ============================================================ [![](https://www.unixmen.com/wp-content/uploads/2015/06/hadoop1-696x249.png "hadoop1")][2] -The **Apache Hadoop** software library is a framework that allows for the distributed processing of large data sets across clusters of computers using simple programming models The Apache™ Hadoop® project develops open-source software for reliable, scalable, distributed computing. +**Apache Hadoop** 软件库是一个框架,它允许使用简单的编程模型在计算机集群上对大型数据集进行分布式处理。Apache™ Hadoop® 是可靠、可扩展、分布式计算的开源软件。 -The project includes these modules: +该项目包括以下模块: -* **Hadoop Common**: The common utilities that support the other Hadoop modules. +* **Hadoop Common**:支持其他 Hadoop 模块的常用工具 -* **Hadoop Distributed File System (HDFS™)**: A distributed file system that provides high-throughput access to application data. +* **Hadoop 分布式文件系统 (HDFS™)**:分布式文件系统,可提供对应用程序数据的高吞吐量访问 -* **Hadoop YARN**: A framework for job scheduling and cluster resource management. +* **Hadoop YARN**:作业调度和集群资源管理框架。 -* **Hadoop MapReduce**: A YARN-based system for parallel processing of large data sets. +* **Hadoop MapReduce**:一个基于 YARN 的大型数据集并行处理系统。 -This article will help you for step by step install and configure single node hadoop cluster using Hadoop on centos. +本文将帮助你逐步在 CentOS 上安装 hadoop 并配置单节点 hadoop 集群。 -### Install Java +### 安装 Java -Before installing hadoop make sure you have java installed on your system. Use this command to check the version of the installed Java. +在安装 hadoop 之前,请确保你的系统上安装了 Java。使用此命令检查已安装 Java 的版本。 ``` java -version @@ -30,9 +28,9 @@ Java(TM) SE Runtime Environment (build 1.7.0_75-b13) Java HotSpot(TM) 64-Bit Server VM (build 24.75-b04, mixed mode) ``` -To install or update Java use following step by step instructions. +要安装或更新 Java,请参考下面逐步的说明。 -First step is to download latest version of java from the [Oracle official website][3]. +第一步是从[ Oracle 官方网站][3]下载最新版本的 java。 ``` cd /opt/ @@ -40,7 +38,7 @@ wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2F tar xzf jdk-7u79-linux-x64.tar.gz ``` -Need to set up to use newer version of Java using alternatives. Use the following commands to do it. +需要设置使用更新版本的 Java 作为替代。使用以下命令来执行此操作。 ``` cd /opt/jdk1.7.0_79/ @@ -60,7 +58,7 @@ There are 3 programs which provide 'java'. Enter to keep the current selection[+], or type selection number: 3 [Press Enter] ``` -Now you may also required to set up javac and jar commands path using alternatives command. +现在你可能还需要使用alternatives 命令设置 javac 和 jar 命令路径。 ``` alternatives --install /usr/bin/jar jar /opt/jdk1.7.0_79/bin/jar 2 @@ -69,38 +67,38 @@ alternatives --set jar /opt/jdk1.7.0_79/bin/jar alternatives --set javac /opt/jdk1.7.0_79/bin/javac ``` -The next step is to configure environment variables. Use following commands to set up these variable properly +下一步是配置环境变量。使用以下命令正确设置这些变量。 -* Setup **JAVA_HOME** Variable +* 设置 **JAVA_HOME** 变量 ``` export JAVA_HOME=/opt/jdk1.7.0_79 ``` -* Setup **JRE_HOME** Variable +* 设置 **JRE_HOME** 变量 ``` export JRE_HOME=/opt/jdk1.7.0_79/jre ``` -* Setup **PATH** Variable +* 设置 **PATH** 变量 ``` export PATH=$PATH:/opt/jdk1.7.0_79/bin:/opt/jdk1.7.0_79/jre/bin ``` -### Installing **Apache Hadoop** +### 安装 **Apache Hadoop** -After setting up the java environment. Let stat installing **Apache Hadoop.** +设置好 java 环境后。开始安装 **Apache Hadoop**。 -The first step is to create a system user account to use for hadoop installation. +第一步是创建用于 hadoop 安装的系统用户帐户。 ``` useradd hadoop passwd hadoop ``` -Now you need to configure the ssh keys for the user hadoop. Using following command to enable ssh login without password. +现在你需要配置用户 hadoop 的 ssh 密钥。使用以下命令启用无需密码的 ssh 登录。 ``` su - hadoop @@ -110,7 +108,7 @@ chmod 0600 ~/.ssh/authorized_keys exit ``` -Now download hadoop latest available version from its official site [hadoop.apache.org][4]. +现在从官方网站 [hadoop.apache.org][4] 下载 hadoop 最新的可用版本。 ``` cd ~ @@ -119,9 +117,9 @@ tar xzf hadoop-2.6.0.tar.gz mv hadoop-2.6.0 hadoop ``` -Now the next step is to set environment variable uses by hadoop. +下一步是设置 hadoop 使用的环境变量。 -Edit **~/.bashrc** file and add the following listes of  values at end of file. +编辑 **~/.bashrc**,并在文件末尾添加以下这些值。 ``` export HADOOP_HOME=/home/hadoop/hadoop @@ -134,27 +132,27 @@ export HADOOP_COMMON_LIB_NATIVE_DIR=$HADOOP_HOME/lib/native export PATH=$PATH:$HADOOP_HOME/sbin:$HADOOP_HOME/bin ``` -Then apply the changes in current running environment +在当前运行环境中应用更改。 ``` source ~/.bashrc ``` -edit **$HADOOP_HOME/etc/hadoop/hadoop-env.sh** file and set **JAVA_HOME**environment variable +编辑 **$HADOOP_HOME/etc/hadoop/hadoop-env.sh** 并设置 **JAVA_HOME** 环境变量。 ``` export JAVA_HOME=/opt/jdk1.7.0_79/ ``` -Now you start with the configuration with basic hadoop single node cluster setup. +现在,先从配置基本的 hadoop 单节点集群开始。 -First edit hadoop configuration files and make following changes. +首先编辑 hadoop 配置文件并进行以下更改。 ``` cd /home/hadoop/hadoop/etc/hadoop ``` -Let’s start by editing core-site.xml +让我们编辑 core-site.xml。 ``` @@ -165,7 +163,7 @@ Let’s start by editing core-site.xml ``` -Then Edit hdfs-site.xml: +接着编辑 hdfs-site.xml: ``` @@ -186,7 +184,7 @@ Then Edit hdfs-site.xml: ``` -and edit mapred-site.xml: +并编辑 mapred-site.xml: ``` @@ -197,7 +195,7 @@ and edit mapred-site.xml: ``` -finally edit yarn-site.xml: +最后编辑 yarn-site.xml: ``` @@ -208,13 +206,13 @@ finally edit yarn-site.xml: ``` -Now format the namenode using following command: +现在使用以下命令格式化 namenode: ``` hdfs namenode -format ``` -To start all hadoop services use the following command: +要启动所有 hadoop 服务,请使用以下命令: ``` cd /home/hadoop/hadoop/sbin/ @@ -222,13 +220,13 @@ start-dfs.sh start-yarn.sh ``` -To check if all services are started well use ‘jps‘ command: +要检查所有服务是否正常启动,请使用 “jps” 命令: ``` jps ``` -You should see like this output. +你应该看到这样的输出。 ``` 26049 SecondaryNameNode @@ -239,18 +237,18 @@ You should see like this output. 25807 NameNode ``` -Now you can access to Hadoop Services in your Browser at: **http://your-ip-address:8088/.** +现在,你可以在浏览器中访问 Hadoop 服务:**http://your-ip-address:8088/**。 [![hadoop](http://www.unixmen.com/wp-content/uploads/2015/06/hadoop.png)][5] -Thanks!!! +谢谢!!! -------------------------------------------------------------------------------- via: https://www.unixmen.com/setup-apache-hadoop-centos/ 作者:[anismaj ][a] -译者:[译者ID](https://github.com/译者ID) +译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 7ce7b5f279ce059a1ca5f03982fabe38d9c6951c Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 7 Aug 2017 08:48:22 +0800 Subject: [PATCH 032/125] translating --- ...onitoring Server Install Zabbix on an Ubuntu 16.04 Server.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20170705 Monitoring Server Install Zabbix on an Ubuntu 16.04 Server.md b/sources/tech/20170705 Monitoring Server Install Zabbix on an Ubuntu 16.04 Server.md index 235fe15048..2e30a1a72a 100644 --- a/sources/tech/20170705 Monitoring Server Install Zabbix on an Ubuntu 16.04 Server.md +++ b/sources/tech/20170705 Monitoring Server Install Zabbix on an Ubuntu 16.04 Server.md @@ -1,3 +1,5 @@ +translating----geekpi + Monitoring Server: Install Zabbix on an Ubuntu 16.04 Server ============================================================ From 72872ff19d85666d42be9b421bbfd4f24c15b7a2 Mon Sep 17 00:00:00 2001 From: penghuster Date: Mon, 7 Aug 2017 10:36:27 +0800 Subject: [PATCH 033/125] translated by penghuster (#5897) * Delete 20170724 IoT Framework for Edge Computing Gains Ground.md * Add files via upload * Add files via upload * Delete IoT Framework for Edge Computing Gains Ground.md --- ...amework for Edge Computing Gains Ground.md | 78 ------------------- ...amework for Edge Computing Gains Ground.md | 51 ++++++++++++ 2 files changed, 51 insertions(+), 78 deletions(-) delete mode 100644 sources/tech/20170724 IoT Framework for Edge Computing Gains Ground.md create mode 100644 translated/tech/IoT Framework for Edge Computing Gains Ground.md diff --git a/sources/tech/20170724 IoT Framework for Edge Computing Gains Ground.md b/sources/tech/20170724 IoT Framework for Edge Computing Gains Ground.md deleted file mode 100644 index 1d9ab94eed..0000000000 --- a/sources/tech/20170724 IoT Framework for Edge Computing Gains Ground.md +++ /dev/null @@ -1,78 +0,0 @@ -translating by penghuster - -IoT Framework for Edge Computing Gains Ground -============================================================ - -![EdgeX](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/edgex_0.png?itok=DUnFipVf "EdgeX") -The open source EdgeX Foundry project is developing a standardized interoperability framework for Internet of Things (IoT) edge computing.[Used with permission][1] - -In April, The Linux Foundation [launched][3] the open source [EdgeX Foundry][4] project to develop a standardized interoperability framework for Internet of Things (IoT) edge computing. Recently, EdgeX Foundry [announced][5] eight new members, bringing the total membership to 58. - -The new members are Absolute, IoT Impact LABS, inwinSTACK, Parallel Machines, Queen’s University Belfast, RIOT, Toshiba Digital Solutions Corporation, and Tulip Interfaces. They join a roster that includes AMD, Analog Devices, Canonical/Ubuntu, Cloud Foundry, Dell, Linaro, Mocana, NetFoundry, Opto 22, RFMicron, and VMWare, among others. - -EdgeX Foundry is built around Dell’s early stage, Apache 2.0 licensed [FUSE][6] IoT middleware framework, which offers more than a dozen microservices comprising over 125,000 lines of code. The Linux Foundation worked with Dell to launch the EdgeX Foundry after the FUSE project merged with a similar AllJoyn-compliant IoTX project led by current EdgeX members Two Bulls and Beechwood. - -EdgeX Foundry will create and certify an ecosystem of interoperable, plug-and-play components. The open source EdgeX stack will mediate between a variety of sensor network messaging protocols and multiple cloud and analytics platforms. The framework is designed to help facilitate interoperability code that spans edge analytics, security, system management, and services. - -The key benefit for members and their customers is the potential to more easily integrating pre-certified software for IoT gateways and smart edge devices. “EdgeX Foundry reduces the challenges that we face in deploying multi-vendor solutions in the real world,” said Dan Mahoney, Lead Engineer for [IoT Impact LABS][7], in an interview with Linux.com. - -Why would The Linux Foundation launch another IoT standardization group while it’s still consolidating its AllSeen Alliance project’s AllJoyn spec into its [IoTivity standard][8]? For one thing, EdgeX Foundry differs from IoTivity in that for now it’s focused exclusively on industrial rather than both consumer and industrial IoT. Even more specifically, it targets middleware for gateways and smart endpoints. The projects also differ in that IoTivity is more about interoperability of existing products while EdgeX hopes to shape new products with pre-certified building blocks. - -“IoTivity provides a device protocol enabling seamless device-to-device connectivity, while EdgeX Foundry provides a framework for edge computing,” said Philip DesAutels, PhD Senior Director of IoT at The Linux Foundation. “With EdgeX Foundry, any protocol -- IoTivity, BacNet, EtherCat, etc. -- can be integrated to enable multi-protocol communications between devices implementing a variety of protocols and a common edge framework. The goal is to create an ecosystem of interoperable components to reduce uncertainty, accelerate time to market, and facilitate scale.” - -Last month, the IoTivity project, which is backed by the [Open Connectivity Foundation][9] (OCF), as well as The Linux Foundation, released [IoTivity 1.3][10], which adds bridges to the once rival AllJoyn spec backed by the Allseen Alliance, and also adds hooks to the OCF’s UPnP device discovery standard. The IoTivity and AllJoyn standards should achieve even greater integration in [IoTivity 2.0][11]. - -IoTivity and EdgeX are “highly complementary,” DesAutels told Linux.com. “Since there are several members of EdgeX Foundry that are also involved in either IoTivity or OCF, the project anticipates strong partnerships between IoTivity and EdgeX.” - -Although both EdgeX and IoTivity are billed as being cross-platform in both CPU architecture and OS, IoTivity is still primarily a Linux driven effort -- spanning Ubuntu, Tizen, and Android -- that is now expanding to Windows and iOS. By comparison, EdgeX Foundry is designed from the start to be fully cross-platform, regardless of CPU architecture or OS, including Linux, Windows, and Mac OS, and potentially real-time operating systems (RTOSes). - -One of the new EdgeX members is the [RIOT][12] project, which offers an open source, IoT-oriented RIOT RTOS. “RIOT starts where Linux doesn’t fit so it is natural for the RIOT community to participate and support complementary open-source initiatives like EdgeX Foundry for edge computing,” stated RIOT’s Thomas Eichinger in a testimonial quote. - -### Easing sensor integration - -IoT Impact LABS (aka Impact LABS or just plain LABS) is another new EdgeX member. The company has a novel business model of helping small-to-medium sized businesses live pilot IoT solutions. Most of its clients, which include several EdgeX Foundry members, are working on projects for enabling smart cities, resilient infrastructure, improved food security, as well as solutions designed for communities facing natural resource challenges. - -“At LABS we spend a lot of time troubleshooting new solutions for our pilot hosts,” said Dan Mahoney. “EdgeX Foundry will let us deploy faster with high-quality solutions by keeping the edge software development efforts to a minimum.” - -The framework will be especially helpful in projects that involve many types of sensors from multiple vendors. “EdgeX Foundry gives us the ability to rapidly build gateway software to handle all the sensors being deployed,” added Mahoney. Sensor manufacturers will be able to use the EdgeX SDK to write a single application-level device driver for a given protocol that can then be used by multiple vendors and solutions. - -### Bringing analytics to the edge - -When asked how his company would like to see the EdgeX framework evolve, Mahoney said: “A goal we would like to encourage is to have multiple industrial protocols available as device services -- and a clear path for implementing edge analytics.” - -Edge computing analytics is a growing trend in both industrial and consumer IoT. In the latter, we’ve already seen several smart home [hubs integrating analytics][13] technology such as Alexa voice activated AI support or video analytics. This typically requires offloading processing to cloud services, which poses challenges in security and privacy, potential service loss due to provider outages, and latency issues. - -With industrial IoT gateways, latency is the most important issue. As a result, there’s growing interest in adding more cloud-like intelligence to IoT gateways. One solution is to securely bring cloud-like applications to embedded devices via containers, as with [ResinOS and Ubuntu Core’s snap mechanisms][14]. Another approach is to develop IoT ecosystems that shift more cloud intelligence to the edge. Last month, Amazon released its AWS Lambda based [AWS Greengrass][15]IoT stack for Linux based gateways. The software enables AWS compute, messaging, data caching, and sync capabilities to run on connected devices such as IoT gateways.  - -Analytics is a key element of the EdgeX Foundry roadmap. One founding member is Cloud Foundry, which is aiming to integrate its industry leading cloud application platform with edge devices. Another new member -- [Parallel Machines][16] -- plans to leverage EdgeX to help it bring AI to the edge. - -It’s still early days at EdgeX Foundry. The software is still in alpha stage, and the company had its first big meeting only last month. The project has initiated a series of “Tech Talks” training sessions for new developers. More information may be found [here][17]. - --------------------------------------------------------------------------------- - -via: https://www.linux.com/blog/2017/7/iot-framework-edge-computing-gains-ground - -作者:[ ERIC BROWN][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://www.linux.com/users/ericstephenbrown -[1]:https://www.linux.com/licenses/category/used-permission -[2]:https://www.linux.com/files/images/edgexpng-0 -[3]:http://linuxgizmos.com/open-source-group-focuses-on-industrial-iot-gateway-middleware/ -[4]:https://www.edgexfoundry.org/ -[5]:https://www.edgexfoundry.org/announcement/2017/07/17/edgex-foundry-builds-momentum-for-a-iot-interoperability-and-a-unified-marketplace-with-eight-new-members/ -[6]:https://medium.com/@gigastacey/dell-plans-an-open-source-iot-stack-3dde43f24feb -[7]:https://iotimpactlabs.com/ -[8]:https://www.linux.com/news/how-iotivity-and-alljoyn-could-combine -[9]:https://openconnectivity.org/developer/specifications/international-standards -[10]:https://wiki.iotivity.org/release_note_1.3.0 -[11]:https://www.linux.com/news/iotivity-20-whats-store -[12]:https://riot-os.org/ -[13]:https://www.linux.com/news/smart-linux-home-hubs-mix-iot-ai -[14]:https://www.linux.com/news/future-iot-containers-aim-solve-security-crisis -[15]:http://linuxgizmos.com/amazon-releases-aws-greengrass-for-local-iot-processing-on-linux-devices/ -[16]:https://www.parallelmachines.com/ -[17]:https://wiki.edgexfoundry.org/ diff --git a/translated/tech/IoT Framework for Edge Computing Gains Ground.md b/translated/tech/IoT Framework for Edge Computing Gains Ground.md new file mode 100644 index 0000000000..1f7ea19a6e --- /dev/null +++ b/translated/tech/IoT Framework for Edge Computing Gains Ground.md @@ -0,0 +1,51 @@ +#IoT边缘计算框架的新进展 +--- +![](http://i.imgur.com/sZvQOVz.png) + +开源项目 EdgeX Foundry 旨在开发一个标准化的互操作物联网边缘计算框架.[使用权限获取](https://www.linux.com/licenses/category/used-permission). + +在4月, Linux 基金组织[启动](http://linuxgizmos.com/open-source-group-focuses-on-industrial-iot-gateway-middleware/)了开发一个标准化互操作物联网边缘计算框架的开源项目[EdgeX Foundry](https://www.edgexfoundry.org/). 就在最近, EdgeX Foundry 又[宣布](https://www.edgexfoundry.org/announcement/2017/07/17/edgex-foundry-builds-momentum-for-a-iot-interoperability-and-a-unified-marketplace-with-eight-new-members/)新增 8 个成员, 其总成员达到 58. + +这些新成员是 Absolute, IoT Impact LABS, inwinStack, Parallel Machines, Queen's University Belfast, RIOT, Toshiba Digital Solutions Corporation, 和 Tulip Interfaces. 其原有成员包括 AMD, Analog Devices, Canonical/Ubuntu, Cloud Foundry, Dell, Linaro, Mocana, NetFoundry, Opto 22, RFMicron 和 VMWare 等其他公司或组织. + +戴尔贡献出其基于 Apache2.0 协议的[FUSE](https://medium.com/@gigastacey/dell-plans-an-open-source-iot-stack-3dde43f24feb)框架源码作为 EdgeX Foundry 项目的种子,其中包括十几个微服务和超过 12.5 万行代码. Linux 基金会和 Dell 将合并 FUSE 和 AllJoyn-compliant IoTX 项目, 后者是由现有 EdgeX Foundry 成员 Two Bulls 和 Beechwood 发起的与 FUSE 相似的一个项目. 待合并完成 Linux 基金组织将正式宣布启动 EdgeX Foundry 项目. + +EdgeX Foundry 将创造一个互操作性的, 即插即用的物联网边缘计算组件生态系统. 开源 EdgeX 栈将协调多样的传感器网络与后台数据处理云平台间的消息协议. 该框架旨在充分挖掘横跨边缘计算, 安全, 系统管理和微服务等模块间的通用代码. + +对于项目成员及其客户来说, 其关注焦点在于借助于 IoT 网关和智能边缘设备,预认证的软件可方便集成的可能性. 在 Linux.com 的一次采访中, [IoT Impact LABS](https://iotimpactlabs.com/) 的首席工程师, Dan Mahoney 说:"现实中, EdgeX Foundry 降低我们在部署囊括多供应商解决方案时所面对的挑战." + +Linux 基金组织,在将 AllSeen Alliance 的 AllJoyn 项目合并到 [IoTivity](https://www.linux.com/news/how-iotivity-and-alljoyn-could-combine) 的情况下, 为什么Linux基金组织发起了另外一个物联网标准化项目 (EdgeX Foundry)? 原因之一, EdgeX Foundry 不同于 IoTivity, IoTivity 主要解决工业物联网问题, 而 EdgeX Foundry 旨在一站解决消费级和工业级物联网全部的问题. 更具体来说, EdgeX Foundry 旨在成为网关和智能终端的通用中间件. EdgeX Foundry 与 IoTivity 的另一个不同在于, 前者希望借助预连接的终端塑造一种新产品, 后者更多解决现存产品之间的互操作性. + +Linux 基金会 IoT 高级总监 Philip DesAutels 说:"IoTivity 提供实现设备之间无缝连接的协议, 而 EdgeX Foundry 提供了一个边缘计算框架. EdgeX Foundry 能够兼容如 IoTivity, BacNet, EtherCat 等任何协议设备, 从而实现集成多协议通信系统的通用边缘计算框架, 该项目的目标是为构建互操作组件的生态系统的过程中, 降低不确定性, 缩短市场化时间, 更好地产生规模效应." + +上个月, 由 [Open Connectivity Foundation](https://openconnectivity.org/developer/specifications/international-standards) (OCF) 和 Linux 基金组织共同发起的 IoTivity项目发布了 [IoTivity 1.3](https://wiki.iotivity.org/release_note_1.3.0), 该版本增加 了与其曾经的对手 AllJoyn spec 的纽带, 也增加了对于 OCF 的 UPnP 设备的接口. 预计在 [IoTivity 2.0](https://www.linux.com/news/iotivity-20-whats-store) 中, IoTivity 和 AllJoyn 将会更进一步深入集成. + +DesAutels 告诉 linux.com, IoTivity 和 EdgeX 是高度互补的, 其原因是 EdgeX 项目和IoTivity 项目有好几个共同成员, 如此更强化了 IoTivity 和 EdgeX 的互补关系. + +尽管 IoTivity 和 EdgeX 都宣称是跨平台,包括 CPU 架构和 OS, 但是二者还是存在一定区别. IoTivity 最初是基于 Linux 平台设计, 兼容 Ubuntu, Tizen 和 Android 等 Linux 系列 OS, 后来逐步扩展到 Windows 和 IOS 操作系统. 与之对应的 EdgeX 设计之初就是基于跨平台的理念, 其完美兼容于各种 CPU 架构, 以及 Linux, Windows 和 Mac OS 等操作系统. 未来还将兼容于实时操作系统(RTOSes). + +EdgeX 的新成员 [RIOT](https://riot-os.org/) 提供了一个开源项目 RIOT RTOS. RIOT 的主要维护者 Thomas Eichinger 在一次重要报告时说:"由于 RIOT 初衷就是致力于解决 linux 不太适应的问题, 故对于 RIOT 社区来说,参加和支持类似于 EdgeX Foundry 等与 Linux 互补性社区的积极性是自然而然的." + +##传感器集成的简化 +IoT Impact LABS (也叫aka impact LABS 或直接称为 LABS) 是另一个 EdgeX 新成员. 该公司推出了一个独特的业务, 旨在帮助中小企业度过物联网解决方案的试用阶段. 该公司的大部分客户, 其中包括几个 EdgeX Foundry 的项目成员, 是致力于建设智慧城市, 基础设施再利用, 提高食品安全, 以及解决会社面临的自然资源缺乏的挑战. + +Dan Mahoney 说:"在 LABS 我们花费了很多时间来调和试点客户的解决方案之间的差异性. EdgeX Foundry 可以最小化部署边缘软件系统的工作量,从而使我们能够更快更好地部署高质量的解决方案." + +该框架在涉及多个供应商, 多种类型传感器的场景尤其凸显优势. "Edgex Foundry 将为我们提供快速构建网关的能力, 以及快速部署传感器的能力." Mahoney 补充说到. 传感器制造商将借助 EdgeX SDK 烧写应用层协议驱动到边缘设备, 该协议能够兼容多供应商和解决方案. + +##边缘分析能力的构建 +当我们问到, Mahoney 的公司想要见到 EdgeX Foundry 怎样的发展时, 他说:"我们喜见乐闻的一个目标是有更多有效的工业协议作为设备服务出现, 一个更清晰的边缘计算实现路径." + +在工业物联网和消费级物联网中边缘计算都呈现增长趋势. 在后者, 我们已经看到如 Alexa 的智能声控以及录像分析等几个智能家居系统集成了边缘计算分析技术. 这减轻了云服务平台的计算负荷, 但同时也带来了安全, 隐私, 以及由于政策和供应商中断引起的服务中断问题. + +对于工业物联网网关, 隐私问题成为首要的问题. 因此, 在物联网网关方面出现了一些类似于云服务功能的扩展. 其中一个解决方案是, 为了安全将一些云服务上的安全保障应用借助容器如 [RIOS 与 Ubuntu 内核快照机制](https://www.linux.com/news/future-iot-containers-aim-solve-security-crisis)等方式集成到嵌入式设备. 另一种方案是, 开发 IoT 系统迁移云功能到边缘. 上个月, Amazon 为基于 linux 的网关发布了实现 [AWS Greengrass](http://linuxgizmos.com/amazon-releases-aws-greengrass-for-local-iot-processing-on-linux-devices/) 物联网协议栈的 AWS lambda. 该软件能够使计算, 消息路由, 数据收集和同步能力在边缘设备上完成,如物联网网关. + +分析能力是 EdgeX Foundry 的一个关键功能要点. 发起成员 Cloud Foundry 是旨在集成其主要的工业应用平台到边缘设备. 另一个新成员 [Parallel Machines](https://www.parallelmachines.com/) 计划利用EdgeX将AI带到边缘设备. + +EdgeX Foundry 仍然在项目早期, 软件仍然在 α 阶段, 其成员在上个月才刚刚进行了第一次全体成员大会. 同时项目已经为新开发者准备了一些初始训练课程, 另外从[这里](https://wiki.edgexfoundry.org/)也能获取更多的信息. + +原文连接: [https://www.linux.com/blog/2017/7/iot-framework-edge-computing-gains-ground](https://www.linux.com/blog/2017/7/iot-framework-edge-computing-gains-ground) + +作者: [ERIC BROWN](https://www.linux.com/users/ericstephenbrown) 译者:penghuster 校对:校对者ID + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 \ No newline at end of file From bd52ac07df1a0331448362e8eee77d2959aa9b0f Mon Sep 17 00:00:00 2001 From: rieonke Date: Mon, 7 Aug 2017 10:57:23 +0800 Subject: [PATCH 034/125] apply for translating --- ...STIFYING THE OPEN CONTAINER INITIATIVE OCI SPECIFICATIONS.md | 2 ++ ...I RELEASE OF V1.0 RUNTIME AND IMAGE FORMAT SPECIFICATIONS.md | 2 ++ 2 files changed, 4 insertions(+) diff --git a/sources/tech/20170719 DEMYSTIFYING THE OPEN CONTAINER INITIATIVE OCI SPECIFICATIONS.md b/sources/tech/20170719 DEMYSTIFYING THE OPEN CONTAINER INITIATIVE OCI SPECIFICATIONS.md index d107eb66d1..a05fe75cbd 100644 --- a/sources/tech/20170719 DEMYSTIFYING THE OPEN CONTAINER INITIATIVE OCI SPECIFICATIONS.md +++ b/sources/tech/20170719 DEMYSTIFYING THE OPEN CONTAINER INITIATIVE OCI SPECIFICATIONS.md @@ -1,3 +1,5 @@ +> translating by rieon + DEMYSTIFYING THE OPEN CONTAINER INITIATIVE (OCI) SPECIFICATIONS ============================================================ diff --git a/sources/tech/20170719 DOCKER LEADS OCI RELEASE OF V1.0 RUNTIME AND IMAGE FORMAT SPECIFICATIONS.md b/sources/tech/20170719 DOCKER LEADS OCI RELEASE OF V1.0 RUNTIME AND IMAGE FORMAT SPECIFICATIONS.md index 9e2fc78628..21117c34f6 100644 --- a/sources/tech/20170719 DOCKER LEADS OCI RELEASE OF V1.0 RUNTIME AND IMAGE FORMAT SPECIFICATIONS.md +++ b/sources/tech/20170719 DOCKER LEADS OCI RELEASE OF V1.0 RUNTIME AND IMAGE FORMAT SPECIFICATIONS.md @@ -1,3 +1,5 @@ +> translating by rieon + DOCKER LEADS OCI RELEASE OF V1.0 RUNTIME AND IMAGE FORMAT SPECIFICATIONS ============================================================ From d46e3e6349aa6b685a7310ab353b0115409b9c5d Mon Sep 17 00:00:00 2001 From: penghuster Date: Mon, 7 Aug 2017 11:34:03 +0800 Subject: [PATCH 035/125] Rename IoT Framework for Edge Computing Gains Ground.md to 20170724 IoT Framework for Edge Computing Gains Ground.md --- ...> 20170724 IoT Framework for Edge Computing Gains Ground.md} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename translated/tech/{IoT Framework for Edge Computing Gains Ground.md => 20170724 IoT Framework for Edge Computing Gains Ground.md} (98%) diff --git a/translated/tech/IoT Framework for Edge Computing Gains Ground.md b/translated/tech/20170724 IoT Framework for Edge Computing Gains Ground.md similarity index 98% rename from translated/tech/IoT Framework for Edge Computing Gains Ground.md rename to translated/tech/20170724 IoT Framework for Edge Computing Gains Ground.md index 1f7ea19a6e..4c0390c65d 100644 --- a/translated/tech/IoT Framework for Edge Computing Gains Ground.md +++ b/translated/tech/20170724 IoT Framework for Edge Computing Gains Ground.md @@ -48,4 +48,4 @@ EdgeX Foundry 仍然在项目早期, 软件仍然在 α 阶段, 其成员在上 作者: [ERIC BROWN](https://www.linux.com/users/ericstephenbrown) 译者:penghuster 校对:校对者ID -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 \ No newline at end of file +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 0f19f709d1faaf04ca686aeedecb8022df6c455c Mon Sep 17 00:00:00 2001 From: rieonke Date: Mon, 7 Aug 2017 16:19:05 +0800 Subject: [PATCH 036/125] translated --- ...CONTAINER INITIATIVE OCI SPECIFICATIONS.md | 91 ------------------- ...CONTAINER INITIATIVE OCI SPECIFICATIONS.md | 88 ++++++++++++++++++ 2 files changed, 88 insertions(+), 91 deletions(-) delete mode 100644 sources/tech/20170719 DEMYSTIFYING THE OPEN CONTAINER INITIATIVE OCI SPECIFICATIONS.md create mode 100644 translated/tech/20170719 DEMYSTIFYING THE OPEN CONTAINER INITIATIVE OCI SPECIFICATIONS.md diff --git a/sources/tech/20170719 DEMYSTIFYING THE OPEN CONTAINER INITIATIVE OCI SPECIFICATIONS.md b/sources/tech/20170719 DEMYSTIFYING THE OPEN CONTAINER INITIATIVE OCI SPECIFICATIONS.md deleted file mode 100644 index a05fe75cbd..0000000000 --- a/sources/tech/20170719 DEMYSTIFYING THE OPEN CONTAINER INITIATIVE OCI SPECIFICATIONS.md +++ /dev/null @@ -1,91 +0,0 @@ -> translating by rieon - -DEMYSTIFYING THE OPEN CONTAINER INITIATIVE (OCI) SPECIFICATIONS -============================================================ - - -The Open Container Initiative (OCI) announced the completion of the first versions of the container runtime and image specifications this week. The OCI is an effort under the auspices of the Linux Foundation to develop specifications and standards to support container solutions. A lot of effort has gone into the [building of these specifications][12] over the past two years. With that in mind, let’s take a look at some of the myths that have arisen over the past two years. - -![OCI](https://i1.wp.com/blog.docker.com/wp-content/uploads/logo_oci.png?resize=800%2C180&ssl=1) - -Myth: The OCI is a replacement for Docker - -Standards are important, but they are far from a complete production platform. Take for example, the World Wide Web. It  has evolved over the last 25 years and was built on core dependable standards like TCP/IP, HTTP and HTML. Using TCP/IP as an example, when enterprises coalesced around TCP/IP as a common protocol, it fueled the growth of routers and in particular – Cisco. However, Cisco became a leader in its market by focusing on differentiated features on its routing platform. We believe the parallel exists with the OCI specifications and Docker. - -[Docker is a complete production platform][13] for developing, distributing, securing and orchestrating container-based solutions. The OCI specification is used by Docker, but it represents only about five percent of our code and a small part of the Docker platform concerned with the runtime behavior of a container and the layout of a container image.  - -Myth: Products and projects already are certified to the OCI specifications - -The runtime and image specifications have just released as 1.0 this week. However, the OCI certification program is still in development so companies cannot claim compliance, conformance or compatibility until certification is formally rolled out later this year. - -The OCI [certification working group][14] is currently defining the standard so that products and open source projects can demonstrate conformance to the specifications. Standards and specifications are important for engineers implementing solutions, but formal certification is the only way to reassure customers that the technology they are working with is truly conformant to the standard. - -Myth: Docker doesn’t support the OCI specifications work - -Docker has a long history with contributing to the OCI. We developed and donated a majority of the OCI code and have been instrumental in defining the OCI runtime and image specifications as maintainers of the project. When the Docker runtime and image format quickly became the de facto standards after being released as open source in 2013, we thought it would be beneficial to donate the code to a neutral governance body to avoid fragmentation and encourage innovation. The goal was to provide a dependable and standardized specification so Docker contributed runc, a simple container runtime, as the basis of the runtime specification work, and later contributed the Docker V2 image specification as the basis for the OCI image specification work. - -Docker developers like Michael Crosby and Stephen Day have been key contributors from the beginning of this work, ensuring Docker’s experience hosting and running billions of container images carries through to the OCI. When the certification working group completes its work, Docker will bring its products through the OCI certification process to demonstrate OCI conformance. - -Myth: The OCI specifications are about Linux containers  - -There is a misperception that the OCI is only applicable to Linux container technologies because it is under the aegis of the Linux Foundation. The reality is that although Docker technology started in the Linux world, Docker has been collaborating with Microsoft to bring our container technology, platform and tooling to the world of Windows Server. Additionally, the underlying technology that Docker has donated to the OCI is broadly applicable to  multi-architecture environments including Linux, Windows and Solaris and covers x86, ARM and IBM zSeries.  - -Myth: Docker was just one of many contributors to the OCI - -The OCI as an organization has a lot of supporting members representing the breadth of the container industry. That said, it has been a small but dedicated group of individual technologists that have contributed the time and technology to the efforts that have produced the initial specifications. Docker was a founding member of the OCI, contributing the initial code base that would form the basis of the runtime specification and later the reference implementation itself. Likewise, Docker contributed the Docker V2 Image specification to act as the basis of the OCI image specification. - -Myth: CRI-O is an OCI project - -CRI-O is an open source project in the Kubernetes incubator in the Cloud Native Computing Foundation (CNCF) – it is not an OCI project. It is based on an earlier version of the Docker architecture, whereas containerd is a direct CNCF project that is a larger container runtime that includes the runc reference implementation. containerd is responsible for image transfer and storage, container execution and supervision, and low-level functions to support storage and network attachments. Docker donated containerd to the CNCF with the support of the five largest cloud providers: Alibaba Cloud, AWS, Google Cloud Platform, IBM Softlayer and Microsoft Azure with a charter of being a core container runtime for multiple container platforms and orchestration systems.   - -Myth: The OCI specifications are now complete  - -While the release of the runtime and image format specifications is an important milestone, there’s still work to be done. The initial scope of the OCI was to define a narrow specification on which developers could depend for the runtime behavior of a container, preventing fragmentation in the industry, and still allowing innovation in the evolving container domain. This was later expanded to include a container image specification. - -As the working groups complete the first stable specifications for runtime behavior and image format, new work is under consideration. Ideas for future work include distribution and signing. The next most important work for the OCI, however, is delivering on a certification process backed by a test suite now that the first specifications are stable. - -**Learn more about OCI and Open Source at Docker:** - -* Read the blog post about the [OCI Release of v1.0 Runtime and Image Format Specifications][1] - -* Visit the [Open Container Initiative website][2] - -* Visit the [Moby Project website][3] - -* Attend [DockerCon Europe 2017][4] - -* Attend the [Moby Summit LA][5] alongside OSS NA - --------------------------------------------------------------------------------- - -作者简介: - -Stephen is Director, Open Source Programs at Docker. He has been a Director and Distinguished Technologist at Hewlett-Packard Enterprise. He blogs about open source software and business at “Once More Unto The Breach” (http://stephesblog.blogs.com) and opensource.com. - - - ------------------ - -via: https://blog.docker.com/2017/07/demystifying-open-container-initiative-oci-specifications/ - -作者:[Stephen ][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: -[1]:https://blog.docker.com/2017/07/oci-release-of-v1-0-runtime-and-image-format-specifications -[2]:https://www.opencontainers.org/join -[3]:http://mobyproject.org/ -[4]:https://europe-2017.dockercon.com/ -[5]:https://www.eventbrite.com/e/moby-summit-los-angeles-tickets-35930560273 -[6]:https://blog.docker.com/author/stephen-walli/ -[7]:https://blog.docker.com/tag/containerd/ -[8]:https://blog.docker.com/tag/cri-o/ -[9]:https://blog.docker.com/tag/linux-containers/ -[10]:https://blog.docker.com/tag/linux-foundation/ -[11]:https://blog.docker.com/tag/oci/ -[12]:https://blog.docker.com/2017/07/oci-release-of-v1-0-runtime-and-image-format-specifications -[13]:https://www.docker.com/ -[14]:https://github.com/opencontainers/certification diff --git a/translated/tech/20170719 DEMYSTIFYING THE OPEN CONTAINER INITIATIVE OCI SPECIFICATIONS.md b/translated/tech/20170719 DEMYSTIFYING THE OPEN CONTAINER INITIATIVE OCI SPECIFICATIONS.md new file mode 100644 index 0000000000..c9719623e5 --- /dev/null +++ b/translated/tech/20170719 DEMYSTIFYING THE OPEN CONTAINER INITIATIVE OCI SPECIFICATIONS.md @@ -0,0 +1,88 @@ +解密开放容器计划(OCI)规范 +============================================================ + + +开放容器计划(OCI)宣布本周完成容器运行时和镜像的第一版规范。OCI 在是 Linux 基金会支持下的容器解决方案标准化的成果。两年来,为了[建立这些规范][12]已经付出了大量的努力。 考虑到这一点,让我们来看看过去两年来出现的一些误区。 + +![OCI](https://i1.wp.com/blog.docker.com/wp-content/uploads/logo_oci.png?resize=800%2C180&ssl=1) + +误区:OCI 是 Docker 的替代品 + +诚然标准非常重要,但它们远非一个完整的生产平台。 以万维网为例,它25年来一路演进,建立在诸如 TCP/IP ,HTTP 和 HTML 等核心可靠的标准之上。再以 TCP/IP 为例,当企业将 TCP/IP 合并为一种通用协议时,它推动了路由器行业,尤其是思科的发展。 然而,思科通过专注于在其路由平台上提供差异化的功能,而成为市场的领导者。我们认为 OCI 规范和 Docker 也是类似这样并行存在的。 + +[Docker 是一个完整的生产平台][13],提供了基于容器的开发、分发、安全、编排的一体化解决方案。Docker 使用了 OCI 规范,但它大约只占总代码的 5%,而且 Docker 平台只有一小部分涉及容器的运行时行为和容器镜像的布局。 + +误区:产品和项目已经通过了 OCI 规范认证 + +运行时和镜像规范本周刚发布1.0的版本。 而且 OCI 认证计划仍在开发阶段,所以企业在认证正式推出之前(今年晚些时候),没法要求容器产品的合规性,一致性或兼容性。 + +OCI [认证工作组][14] 目前正在制定标准,使容器产品和开源项目能够符合规范的要求。标准和规范对于实施解决方案的工程师很重要,但正式认证是向客户保证其正在使用的技术真正符合标准的唯一方式。 + +误区:Docker不支持 OCI 规范的工作 + +Docker 很早就开始为 OCI 做出贡献。 我们向 OCI 贡献了大部分的代码,作为 OCI 项目的维护者,为OCI运行时和镜像规范定义提供了积极的帮助。当 Docker 运行时和镜像格式在 2013 年开源发布之后,迅速成为事实上的标准,我们认为将代码捐赠给中立的管理机构,对于避免容器行业的碎片化和鼓励行业创新将是有益的。我们的目标是提供一个可靠和标准化的规范,因此 Docker 提供了一个简单的容器运行时 runc 作为运行时规范工作的基础,后来提供了 Docker V2 镜像规范作为 OCI 镜像规范工作的基础。 + +Docker 的开发人员如 Michael Crosby 和 Stephen Day 从一开始就是这项工作的关键贡献者,确保能将 Docker 的托管和运行数十亿个容器镜像的经验带给 OCI。 等认证工作组完成(制定认证规范的)工作后,Docker将通过OCI认证过程将其产品展示出来,以证明OCI的一致性。 + +误区:OCI 仅用于 Linux 容器技术 + +因为 OCI 是由 Linux 基金会 (Linux Foundation) 由负责制定的,所以很容易让人误解为,OCI 仅适用于 Linux 容器技术。 而实际上并非如此,尽管 Docker 技术始于 Linux 世界,但 Docker 也一直在与微软合作,将我们的容器技术,平台和工具带入 Windows Server 的世界。 此外,Docker 向 OCI 捐赠的基础技术广泛适用于包括 Linux ,Windows 和 Solaris 在内的多种操作系统环境,涵盖了 x86,ARM 和 IBM zSeries 等多种架构环境。 + +误区:Docker只是OCI的众多贡献者之一 + +OCI 作为一个组织有很多支持成员,代表了容器行业的广度。 也就是说,它是一个小而专业的个人技术专家组,为制作初始规范的工作贡献了大量的时间和技术。 Docker 是 OCI 的创始成员,贡献了初始代码库,构成了运行时规范的基础,后来引入了参考实现。 同样地,Docker 也将 Docker V2 镜像规范贡献给 OCI 作为镜像规范的基础。 + +误区:CRI-O 是 OCI 项目 + +CRI-O 是云计算基金会(CNCF)Kubernetes 孵化器的开源项目 -- 它不是 OCI 项目。 它基于早期版本的 Docker 体系结构,而 containerd 是一个直接的 CNCF 项目,它是一个包括 runc 参考实现的更大的容器运行时。 containerd 负责镜像传输和存储,容器运行和监控,以及支持存储和网络附件的底层功能。 Docker 在五个最大的云提供商(阿里云,AWS,Google Cloud Platform (GCP),IBM Softlayer 和 Microsoft Azure)的支持下,将 containerd 捐赠给了云计算基金会(CNCF),作为多个容器平台和编排系统的核心容器运行时。 + +规格:OCI 规范现在已经完成了 + +虽然首版运行时和镜像格式规范的发布是一个重要的里程碑,但还有许多工作有待完成。 OCI 的一开始着眼于定义一个狭窄的规范:开发人员可以依赖于容器的运行时行为,防止容器行业碎片化,并且仍然允许在不断变化的容器域中进行创新。之后才将含容器镜像规范囊括其中。 + +随着工作组完成运行时行为和镜像格式的第一个稳定规范,新的工作考量也已经同步展开。未来的新特性包括分发和签名。 然而,OCI 的下一个最重要的工作是提供一个由测试套件支持的认证过程,因为第一个规范已经稳定了。 + +** 在 Docker 了解更多关于 OCI 和开源的信息:** + +* 阅读关于[OCI v1.0 版本的运行时和镜像格式规范]的博文[1] + +* 访问 [OCI 的网站][2] + +* 访问 [Moby 项目网站][3] + +* 参加 [DockerCon Europe 2017][4] + +* 参加 [Moby Summit LA][5]  + +-------------------------------------------------------------------------------- + +作者简介: + +Stephen 是 Docker 开源项目总监。 他曾在 Hewlett-Packard Enterprise (惠普企业)担任董事和杰出技术专家。 他的关于开源软件和商业的博客“再次违约”(http://stephesblog.blogs.com)和网站 opensource.com。 + + +----------------- + +via: https://blog.docker.com/2017/07/demystifying-open-container-initiative-oci-specifications/ + +作者:[Stephen ][a] +译者:[rieonke](https://github.com/rieonke) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: +[1]:https://blog.docker.com/2017/07/oci-release-of-v1-0-runtime-and-image-format-specifications +[2]:https://www.opencontainers.org/join +[3]:http://mobyproject.org/ +[4]:https://europe-2017.dockercon.com/ +[5]:https://www.eventbrite.com/e/moby-summit-los-angeles-tickets-35930560273 +[6]:https://blog.docker.com/author/stephen-walli/ +[7]:https://blog.docker.com/tag/containerd/ +[8]:https://blog.docker.com/tag/cri-o/ +[9]:https://blog.docker.com/tag/linux-containers/ +[10]:https://blog.docker.com/tag/linux-foundation/ +[11]:https://blog.docker.com/tag/oci/ +[12]:https://blog.docker.com/2017/07/oci-release-of-v1-0-runtime-and-image-format-specifications +[13]:https://www.docker.com/ +[14]:https://github.com/opencontainers/certification From 777e19c50db48a00ebcd426cdc51c99c64fa4711 Mon Sep 17 00:00:00 2001 From: Rieon Date: Mon, 7 Aug 2017 16:39:03 +0800 Subject: [PATCH 037/125] enhanced --- ...CONTAINER INITIATIVE OCI SPECIFICATIONS.md | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/translated/tech/20170719 DEMYSTIFYING THE OPEN CONTAINER INITIATIVE OCI SPECIFICATIONS.md b/translated/tech/20170719 DEMYSTIFYING THE OPEN CONTAINER INITIATIVE OCI SPECIFICATIONS.md index c9719623e5..cd7a55997e 100644 --- a/translated/tech/20170719 DEMYSTIFYING THE OPEN CONTAINER INITIATIVE OCI SPECIFICATIONS.md +++ b/translated/tech/20170719 DEMYSTIFYING THE OPEN CONTAINER INITIATIVE OCI SPECIFICATIONS.md @@ -2,45 +2,45 @@ ============================================================ -开放容器计划(OCI)宣布本周完成容器运行时和镜像的第一版规范。OCI 在是 Linux 基金会支持下的容器解决方案标准化的成果。两年来,为了[建立这些规范][12]已经付出了大量的努力。 考虑到这一点,让我们来看看过去两年来出现的一些误区。 +开放容器计划(OCI)宣布本周完成容器运行时和镜像的第一版规范。OCI 在是 Linux 基金会(Linux Foundation)支持下的容器解决方案标准化的成果。两年来,为了[建立这些规范][12]已经付出了大量的努力。 由此,让我们一起来回顾过去两年中出现的一些误区。 ![OCI](https://i1.wp.com/blog.docker.com/wp-content/uploads/logo_oci.png?resize=800%2C180&ssl=1) -误区:OCI 是 Docker 的替代品 +** 误区:OCI 是 Docker 的替代品 ** 诚然标准非常重要,但它们远非一个完整的生产平台。 以万维网为例,它25年来一路演进,建立在诸如 TCP/IP ,HTTP 和 HTML 等核心可靠的标准之上。再以 TCP/IP 为例,当企业将 TCP/IP 合并为一种通用协议时,它推动了路由器行业,尤其是思科的发展。 然而,思科通过专注于在其路由平台上提供差异化的功能,而成为市场的领导者。我们认为 OCI 规范和 Docker 也是类似这样并行存在的。 [Docker 是一个完整的生产平台][13],提供了基于容器的开发、分发、安全、编排的一体化解决方案。Docker 使用了 OCI 规范,但它大约只占总代码的 5%,而且 Docker 平台只有一小部分涉及容器的运行时行为和容器镜像的布局。 -误区:产品和项目已经通过了 OCI 规范认证 +** 误区:产品和项目已经通过了 OCI 规范认证 ** 运行时和镜像规范本周刚发布1.0的版本。 而且 OCI 认证计划仍在开发阶段,所以企业在认证正式推出之前(今年晚些时候),没法要求容器产品的合规性,一致性或兼容性。 OCI [认证工作组][14] 目前正在制定标准,使容器产品和开源项目能够符合规范的要求。标准和规范对于实施解决方案的工程师很重要,但正式认证是向客户保证其正在使用的技术真正符合标准的唯一方式。 -误区:Docker不支持 OCI 规范的工作 +** 误区:Docker不支持 OCI 规范的工作 ** -Docker 很早就开始为 OCI 做出贡献。 我们向 OCI 贡献了大部分的代码,作为 OCI 项目的维护者,为OCI运行时和镜像规范定义提供了积极的帮助。当 Docker 运行时和镜像格式在 2013 年开源发布之后,迅速成为事实上的标准,我们认为将代码捐赠给中立的管理机构,对于避免容器行业的碎片化和鼓励行业创新将是有益的。我们的目标是提供一个可靠和标准化的规范,因此 Docker 提供了一个简单的容器运行时 runc 作为运行时规范工作的基础,后来提供了 Docker V2 镜像规范作为 OCI 镜像规范工作的基础。 +Docker 很早就开始为 OCI 做贡献。 我们向 OCI 贡献了大部分的代码,作为 OCI 项目的维护者,为 OCI 运行时和镜像规范定义提供了积极有益的帮助。Docker 运行时和镜像格式在 2013 年开源发布之后,便迅速成为事实上的标准,我们认为将代码捐赠给中立的管理机构,对于避免容器行业的碎片化和鼓励行业创新将是有益的。我们的目标是提供一个可靠和标准化的规范,因此 Docker 提供了一个简单的容器运行时 runc 作为运行时规范工作的基础,后来又贡献了 Docker V2 镜像规范作为 OCI 镜像规范工作的基础。 -Docker 的开发人员如 Michael Crosby 和 Stephen Day 从一开始就是这项工作的关键贡献者,确保能将 Docker 的托管和运行数十亿个容器镜像的经验带给 OCI。 等认证工作组完成(制定认证规范的)工作后,Docker将通过OCI认证过程将其产品展示出来,以证明OCI的一致性。 +Docker 的开发人员如 Michael Crosby 和 Stephen Day 从一开始就是这项工作的关键贡献者,确保能将 Docker 的托管和运行数十亿个容器镜像的经验带给 OCI。等认证工作组完成(制定认证规范的)工作后,Docker 将通过 OCI 认证将其产品展示出来,以证明 OCI 的一致性。 -误区:OCI 仅用于 Linux 容器技术 +** 误区:OCI 仅用于 Linux 容器技术 ** -因为 OCI 是由 Linux 基金会 (Linux Foundation) 由负责制定的,所以很容易让人误解为,OCI 仅适用于 Linux 容器技术。 而实际上并非如此,尽管 Docker 技术始于 Linux 世界,但 Docker 也一直在与微软合作,将我们的容器技术,平台和工具带入 Windows Server 的世界。 此外,Docker 向 OCI 捐赠的基础技术广泛适用于包括 Linux ,Windows 和 Solaris 在内的多种操作系统环境,涵盖了 x86,ARM 和 IBM zSeries 等多种架构环境。 +因为 OCI 是由 Linux 基金会 (Linux Foundation) 负责制定的,所以很容易让人误解为 OCI 仅适用于 Linux 容器技术。 而实际上并非如此,尽管 Docker 技术源于 Linux 世界,但 Docker 也一直在与微软合作,将我们的容器技术、平台和工具带到 Windows Server 的世界。 此外,Docker 向 OCI 贡献的基础技术广泛适用于包括 Linux ,Windows 和 Solaris 在内的多种操作系统环境,涵盖了 x86,ARM 和 IBM zSeries 等多种架构环境。 -误区:Docker只是OCI的众多贡献者之一 +** 误区:Docker 仅仅是OCI的众多贡献者之一 ** -OCI 作为一个组织有很多支持成员,代表了容器行业的广度。 也就是说,它是一个小而专业的个人技术专家组,为制作初始规范的工作贡献了大量的时间和技术。 Docker 是 OCI 的创始成员,贡献了初始代码库,构成了运行时规范的基础,后来引入了参考实现。 同样地,Docker 也将 Docker V2 镜像规范贡献给 OCI 作为镜像规范的基础。 +OCI 作为一个支持成员众多的开放组织,代表了容器行业的广度。 也就是说,它是一个小而专业的个人技术专家组,为制作初始规范的工作贡献了大量的时间和技术。 Docker 是 OCI 的创始成员,贡献了初始代码库,构成了运行时规范的基础,后来引入了参考实现。 同样地,Docker 也将 Docker V2 镜像规范贡献给 OCI 作为镜像规范的基础。 -误区:CRI-O 是 OCI 项目 +** 误区:CRI-O 是 OCI 项目 ** -CRI-O 是云计算基金会(CNCF)Kubernetes 孵化器的开源项目 -- 它不是 OCI 项目。 它基于早期版本的 Docker 体系结构,而 containerd 是一个直接的 CNCF 项目,它是一个包括 runc 参考实现的更大的容器运行时。 containerd 负责镜像传输和存储,容器运行和监控,以及支持存储和网络附件的底层功能。 Docker 在五个最大的云提供商(阿里云,AWS,Google Cloud Platform (GCP),IBM Softlayer 和 Microsoft Azure)的支持下,将 containerd 捐赠给了云计算基金会(CNCF),作为多个容器平台和编排系统的核心容器运行时。 +CRI-O 是云计算基金会(CNCF)Kubernetes 孵化器的开源项目 -- 它不是 OCI 项目。 它基于早期版本的 Docker 体系结构,而 containerd 是一个直接的 CNCF 项目,它是一个包括 runc 参考实现的更大的容器运行时。 containerd 负责镜像传输和存储,容器运行和监控,以及支持存储和网络附件等底层功能。 Docker 在五个最大的云提供商(阿里云,AWS,Google Cloud Platform (GCP),IBM Softlayer 和 Microsoft Azure)的支持下,将 containerd 捐赠给了云计算基金会(CNCF),作为多个容器平台和编排系统的核心容器运行时。 -规格:OCI 规范现在已经完成了 +** 误区:OCI 规范现在已经完成了 ** -虽然首版运行时和镜像格式规范的发布是一个重要的里程碑,但还有许多工作有待完成。 OCI 的一开始着眼于定义一个狭窄的规范:开发人员可以依赖于容器的运行时行为,防止容器行业碎片化,并且仍然允许在不断变化的容器域中进行创新。之后才将含容器镜像规范囊括其中。 +虽然首版容器运行时和镜像格式规范的发布是一个重要的里程碑,但还有许多工作有待完成。 OCI 的一开始着眼于定义一个狭窄的规范:开发人员可以依赖于容器的运行时行为,防止容器行业碎片化,并且仍然允许在不断变化的容器域中进行创新。之后才将含容器镜像规范囊括其中。 -随着工作组完成运行时行为和镜像格式的第一个稳定规范,新的工作考量也已经同步展开。未来的新特性包括分发和签名。 然而,OCI 的下一个最重要的工作是提供一个由测试套件支持的认证过程,因为第一个规范已经稳定了。 +随着工作组完成运行时行为和镜像格式的第一个稳定规范,新的工作考量也已经同步展开。未来的新特性将包括分发和签名等。 然而,OCI 的下一个最重要的工作是提供一个由测试套件支持的认证过程,因为第一个规范已经稳定了。 ** 在 Docker 了解更多关于 OCI 和开源的信息:** @@ -58,7 +58,7 @@ CRI-O 是云计算基金会(CNCF)Kubernetes 孵化器的开源项目 -- 它 作者简介: -Stephen 是 Docker 开源项目总监。 他曾在 Hewlett-Packard Enterprise (惠普企业)担任董事和杰出技术专家。 他的关于开源软件和商业的博客“再次违约”(http://stephesblog.blogs.com)和网站 opensource.com。 +Stephen 是 Docker 开源项目总监。 他曾在 Hewlett-Packard Enterprise (惠普企业)担任董事和杰出技术专家。他的关于开源软件和商业的博客 “再次违约”(http://stephesblog.blogs.com) 和网站 opensource.com。 ----------------- From fb217aa93a658538e70f9f9082e626996cc4945c Mon Sep 17 00:00:00 2001 From: Rieon Date: Mon, 7 Aug 2017 16:40:41 +0800 Subject: [PATCH 038/125] fixed styling mistakes --- ...OPEN CONTAINER INITIATIVE OCI SPECIFICATIONS.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/translated/tech/20170719 DEMYSTIFYING THE OPEN CONTAINER INITIATIVE OCI SPECIFICATIONS.md b/translated/tech/20170719 DEMYSTIFYING THE OPEN CONTAINER INITIATIVE OCI SPECIFICATIONS.md index cd7a55997e..ba0240a59c 100644 --- a/translated/tech/20170719 DEMYSTIFYING THE OPEN CONTAINER INITIATIVE OCI SPECIFICATIONS.md +++ b/translated/tech/20170719 DEMYSTIFYING THE OPEN CONTAINER INITIATIVE OCI SPECIFICATIONS.md @@ -6,13 +6,13 @@ ![OCI](https://i1.wp.com/blog.docker.com/wp-content/uploads/logo_oci.png?resize=800%2C180&ssl=1) -** 误区:OCI 是 Docker 的替代品 ** +**误区:OCI 是 Docker 的替代品** 诚然标准非常重要,但它们远非一个完整的生产平台。 以万维网为例,它25年来一路演进,建立在诸如 TCP/IP ,HTTP 和 HTML 等核心可靠的标准之上。再以 TCP/IP 为例,当企业将 TCP/IP 合并为一种通用协议时,它推动了路由器行业,尤其是思科的发展。 然而,思科通过专注于在其路由平台上提供差异化的功能,而成为市场的领导者。我们认为 OCI 规范和 Docker 也是类似这样并行存在的。 [Docker 是一个完整的生产平台][13],提供了基于容器的开发、分发、安全、编排的一体化解决方案。Docker 使用了 OCI 规范,但它大约只占总代码的 5%,而且 Docker 平台只有一小部分涉及容器的运行时行为和容器镜像的布局。 -** 误区:产品和项目已经通过了 OCI 规范认证 ** +**误区:产品和项目已经通过了 OCI 规范认证** 运行时和镜像规范本周刚发布1.0的版本。 而且 OCI 认证计划仍在开发阶段,所以企业在认证正式推出之前(今年晚些时候),没法要求容器产品的合规性,一致性或兼容性。 @@ -24,25 +24,25 @@ Docker 很早就开始为 OCI 做贡献。 我们向 OCI 贡献了大部分的 Docker 的开发人员如 Michael Crosby 和 Stephen Day 从一开始就是这项工作的关键贡献者,确保能将 Docker 的托管和运行数十亿个容器镜像的经验带给 OCI。等认证工作组完成(制定认证规范的)工作后,Docker 将通过 OCI 认证将其产品展示出来,以证明 OCI 的一致性。 -** 误区:OCI 仅用于 Linux 容器技术 ** +**误区:OCI 仅用于 Linux 容器技术** 因为 OCI 是由 Linux 基金会 (Linux Foundation) 负责制定的,所以很容易让人误解为 OCI 仅适用于 Linux 容器技术。 而实际上并非如此,尽管 Docker 技术源于 Linux 世界,但 Docker 也一直在与微软合作,将我们的容器技术、平台和工具带到 Windows Server 的世界。 此外,Docker 向 OCI 贡献的基础技术广泛适用于包括 Linux ,Windows 和 Solaris 在内的多种操作系统环境,涵盖了 x86,ARM 和 IBM zSeries 等多种架构环境。 -** 误区:Docker 仅仅是OCI的众多贡献者之一 ** +**误区:Docker 仅仅是OCI的众多贡献者之一** OCI 作为一个支持成员众多的开放组织,代表了容器行业的广度。 也就是说,它是一个小而专业的个人技术专家组,为制作初始规范的工作贡献了大量的时间和技术。 Docker 是 OCI 的创始成员,贡献了初始代码库,构成了运行时规范的基础,后来引入了参考实现。 同样地,Docker 也将 Docker V2 镜像规范贡献给 OCI 作为镜像规范的基础。 -** 误区:CRI-O 是 OCI 项目 ** +**误区:CRI-O 是 OCI 项目** CRI-O 是云计算基金会(CNCF)Kubernetes 孵化器的开源项目 -- 它不是 OCI 项目。 它基于早期版本的 Docker 体系结构,而 containerd 是一个直接的 CNCF 项目,它是一个包括 runc 参考实现的更大的容器运行时。 containerd 负责镜像传输和存储,容器运行和监控,以及支持存储和网络附件等底层功能。 Docker 在五个最大的云提供商(阿里云,AWS,Google Cloud Platform (GCP),IBM Softlayer 和 Microsoft Azure)的支持下,将 containerd 捐赠给了云计算基金会(CNCF),作为多个容器平台和编排系统的核心容器运行时。 -** 误区:OCI 规范现在已经完成了 ** +**误区:OCI 规范现在已经完成了** 虽然首版容器运行时和镜像格式规范的发布是一个重要的里程碑,但还有许多工作有待完成。 OCI 的一开始着眼于定义一个狭窄的规范:开发人员可以依赖于容器的运行时行为,防止容器行业碎片化,并且仍然允许在不断变化的容器域中进行创新。之后才将含容器镜像规范囊括其中。 随着工作组完成运行时行为和镜像格式的第一个稳定规范,新的工作考量也已经同步展开。未来的新特性将包括分发和签名等。 然而,OCI 的下一个最重要的工作是提供一个由测试套件支持的认证过程,因为第一个规范已经稳定了。 -** 在 Docker 了解更多关于 OCI 和开源的信息:** +**在 Docker 了解更多关于 OCI 和开源的信息:** * 阅读关于[OCI v1.0 版本的运行时和镜像格式规范]的博文[1] From 5ace10490a79e99adfc73ace961432ccf8968a55 Mon Sep 17 00:00:00 2001 From: Rieon Date: Mon, 7 Aug 2017 16:52:09 +0800 Subject: [PATCH 039/125] fixed styling mistake again --- ...STIFYING THE OPEN CONTAINER INITIATIVE OCI SPECIFICATIONS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/tech/20170719 DEMYSTIFYING THE OPEN CONTAINER INITIATIVE OCI SPECIFICATIONS.md b/translated/tech/20170719 DEMYSTIFYING THE OPEN CONTAINER INITIATIVE OCI SPECIFICATIONS.md index ba0240a59c..c8b79a054e 100644 --- a/translated/tech/20170719 DEMYSTIFYING THE OPEN CONTAINER INITIATIVE OCI SPECIFICATIONS.md +++ b/translated/tech/20170719 DEMYSTIFYING THE OPEN CONTAINER INITIATIVE OCI SPECIFICATIONS.md @@ -18,7 +18,7 @@ OCI [认证工作组][14] 目前正在制定标准,使容器产品和开源项目能够符合规范的要求。标准和规范对于实施解决方案的工程师很重要,但正式认证是向客户保证其正在使用的技术真正符合标准的唯一方式。 -** 误区:Docker不支持 OCI 规范的工作 ** +**误区:Docker不支持 OCI 规范的工作** Docker 很早就开始为 OCI 做贡献。 我们向 OCI 贡献了大部分的代码,作为 OCI 项目的维护者,为 OCI 运行时和镜像规范定义提供了积极有益的帮助。Docker 运行时和镜像格式在 2013 年开源发布之后,便迅速成为事实上的标准,我们认为将代码捐赠给中立的管理机构,对于避免容器行业的碎片化和鼓励行业创新将是有益的。我们的目标是提供一个可靠和标准化的规范,因此 Docker 提供了一个简单的容器运行时 runc 作为运行时规范工作的基础,后来又贡献了 Docker V2 镜像规范作为 OCI 镜像规范工作的基础。 From 5effde10b14aec83448d76fcc05001b28854ddaa Mon Sep 17 00:00:00 2001 From: XYenChi <466530436@qq.com> Date: Mon, 7 Aug 2017 17:43:55 +0800 Subject: [PATCH 040/125] XYenChi translating --- ...ecting and mapping Twitter data using R.md | 179 ------------------ ...ba4 AD DC with SSSD and Realm – Part 15.md | 1 + ...ecting and mapping Twitter data using R.md | 179 ++++++++++++++++++ 3 files changed, 180 insertions(+), 179 deletions(-) delete mode 100644 sources/tech/20170620 A beginners guide to collecting and mapping Twitter data using R.md create mode 100644 translated/20170620 A beginners guide to collecting and mapping Twitter data using R.md diff --git a/sources/tech/20170620 A beginners guide to collecting and mapping Twitter data using R.md b/sources/tech/20170620 A beginners guide to collecting and mapping Twitter data using R.md deleted file mode 100644 index 06d298180b..0000000000 --- a/sources/tech/20170620 A beginners guide to collecting and mapping Twitter data using R.md +++ /dev/null @@ -1,179 +0,0 @@ -XYenChi is translating -A beginner's guide to collecting and mapping Twitter data using R -============================================================ - -### Learn to use R's twitteR and leaflet packages, which allow you to map the location of tweets on any topic. - -![A beginner's guide to collecting and mapping Twitter data using R](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/cloud-globe.png?itok=H4f-RAz_ "A beginner's guide to collecting and mapping Twitter data using R") -Image by :  - -[Jason Baker][14]. [CC BY-SA 4.0][15]. Source: [Cloud][16], [Globe][17]. Both [CC0][18]. - -When I started learning R, I also needed to learn how to collect Twitter data and map it for research purposes. Despite the wealth of information on the internet about this topic, I found it difficult to understand what was involved in collecting and mapping Twitter data. Not only was I was a novice to R, but I was also unfamiliar with the technical terms in the various tutorials. Despite these barriers, I was successful! In this tutorial, I will break down how to collect Twitter data and display it on a map in a way that even novice coders can understand. - -Programming and development - -* [New Python content][1] - -* [Our latest JavaScript articles][2] - -* [Recent Perl posts][3] - -* [Red Hat Developers Blog][4] - -### Create the app - -If you don't have a Twitter account, the first thing you need to do is to [create one][19]. After that, go to [apps.twitter.com][20] to create an app that allows you to collect Twitter data. Don't worry, creating the app is extremely easy. The app you create will connect to the Twitter application program interface (API). Think of an API as an electronic personal assistant of sorts. You will be using the API to ask another program to do something for you. In this case, you will be connecting to the Twitter API and asking it to collect data. Just make sure you don't ask too much, because there is a [limit][21] on how many times you can request Twitter data. - -There are two APIs that you can use to collect tweets. If you want to do a one-time collection of tweets, then you'll use the **REST API**. If you want to do a continuous collection of tweets for a specific time period, you'll use the **streaming API**. In this tutorial, I'll focus on using the REST API. - -After you create your app, go to the **Keys and Access Tokens** tab. You will need the Consumer Key (API key), Consumer Secret (API secret), Access Token, and Access Token Secret to access your app in R. - -### Collect the Twitter data - -The next step is to open R and get ready to write code. For beginners, I recommend using [RStudio][22], the integrated development environment (IDE) for R. I find using RStudio helpful when I am troubleshooting or testing code. R has a package to access the REST API called **[twitteR][8]**. - -Open RStudio and create a new RScript. Once you have done this, you will need to install and load the **twitteR** package: - -``` -install.packages("twitteR") -#installs TwitteR -library (twitteR) -#loads TwitteR -``` - -Once you've installed and loaded the **twitteR** package, you will need to enter the your app's API information from the section above: - -``` -api_key <- "" - #in the quotes, put your API key -api_secret <- "" - #in the quotes, put your API secret token -token <- "" - #in the quotes, put your token -token_secret <- "" - #in the quotes, put your token secret -``` - -Next, connect to Twitter to access the API: - -``` -setup_twitter_oauth(api_key, api_secret, token, token_secret) -``` - -Let's try doing a Twitter search about community gardens and farmers markets: - -``` -tweets <- searchTwitter("community garden OR #communitygarden OR farmers market OR #farmersmarket", n = 200, lang = "en") -``` - -This code simply says to search for the first 200 tweets **(n = 200)** in English **(lang = "en")**, which contain the terms **community garden** or **farmers market**or any hashtag mentioning these terms. - -After you have done your Twitter search, save your results in a data frame: - -``` -tweets.df <-twListToDF(tweets) -``` - -To create a map with your tweets, you will need to export what you collected into a **.csv** file: - -``` -write.csv(tweets.df, "C:\Users\YourName\Documents\ApptoMap\tweets.csv") - #an example of a file extension of the folder in which you want to save the .csv file. -``` - -Make sure you save your **R** code before running it and moving on to the next step. - -### Create the map - -Now that you have data, you can display it in a map. For this tutorial, we will make a basic app using the R package **[Leaflet][9]**, a popular JavaScript library for making interactive maps. Leaflet uses the [**magrittr**][23] pipe operator (**%>%**), which makes it easier to write code because the syntax is more natural. It might seem strange at first, but it does cut down on the amount of work you have to do when writing code. - -For the sake of clarity, open a new R script in RStudio and install these packages: - -``` -install.packages("leaflet") -install.packages("maps") -library(leaflet) -library(maps) -``` - -Now you need a way for Leaflet to access your data: - -``` -read.csv("C:\Users\YourName\Documents\ApptoMap\tweets.csv", stringsAsFactors = FALSE) -``` - -**stringAsFactors = FALSE** means to keep the information as it is and not convert it into factors. (For information about factors, read the article ["stringsAsFactors: An unauthorized biography"][24], by Roger Peng.) - -It's time to make your Leaflet map. You are going to use the **OpenStreetMap**base map for your map: - -``` -m <- leaflet(mymap) %>% addTiles() -``` - -Let's add circles to the base map. For **lng** and **lat**, enter the name of the columns that contain the latitude and longitude of your tweets followed by **~**. The **~longitude** and **~latitude** refer to the name of the columns in your **.csv** file: - -``` -m %>% addCircles(lng = ~longitude, lat = ~latitude, popup = mymap$type, weight = 8, radius = 40, color = "#fb3004", stroke = TRUE, fillOpacity = 0.8) -``` - -Run your code. A web browser should pop up and display your map. Here is a map of the tweets that I collected in the previous section: - -### [leafletmap.jpg][6] - -![Map of tweets by location](https://opensource.com/sites/default/files/leafletmap.jpg "Map of tweets by location") - -Map of tweets by location, Leaflet and OpenStreetMap, [CC-BY-SA][5] - - - -Although you might be surprised with the small number of tweets on the map, typically only 1% of tweets are geocoded. I collected a total of 366 tweets, but only 10 (around 3% of total tweets) were geocoded. If you are having trouble getting geocoded tweets, change your search terms to see if you get a better result. - -### Wrapping up - -For beginners, putting all the pieces together to create a Leaflet map from Twitter data can be overwhelming. This tutorial is based on my experiences doing this task, and I hope it makes the learning process easier for you. - - _Dorris Scott will present this topic in a workshop, [From App to Map: Collecting and Mapping Social Media Data using R][10], at the [We Rise][11] Women in Tech Conference ([#WeRiseTech][12]) June 23-24 in Atlanta._ - --------------------------------------------------------------------------------- - -作者简介: - -Dorris Scott - Dorris Scott is a PhD student in geography at the University of Georgia. Her research emphases are in Geographic Information Systems (GIS), geographic data science, visualization, and public health. Her dissertation is on combining traditional and non-traditional data about Veteran’s Affairs hospitals in a GIS interface to help patients make more informed decisions regarding their healthcare. - - ------------------ -via: https://opensource.com/article/17/6/collecting-and-mapping-twitter-data-using-r - -作者:[Dorris Scott ][a] -译者:[译者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/dorrisscott -[1]:https://opensource.com/tags/python?src=programming_resource_menu -[2]:https://opensource.com/tags/javascript?src=programming_resource_menu -[3]:https://opensource.com/tags/perl?src=programming_resource_menu -[4]:https://developers.redhat.com/?intcmp=7016000000127cYAAQ&src=programming_resource_menu -[5]:https://creativecommons.org/licenses/by-sa/2.0/ -[6]:https://opensource.com/file/356071 -[7]:https://opensource.com/article/17/6/collecting-and-mapping-twitter-data-using-r?rate=Rnu6Lf0Eqvepznw75VioNPWIaJQH39pZETBfu2ZI3P0 -[8]:https://cran.r-project.org/web/packages/twitteR/twitteR.pdf -[9]:https://rstudio.github.io/leaflet -[10]:https://werise.tech/sessions/2017/4/16/from-app-to-map-collecting-and-mapping-social-media-data-using-r?rq=social%20mapping -[11]:https://werise.tech/ -[12]:https://twitter.com/search?q=%23WeRiseTech&src=typd -[13]:https://opensource.com/user/145006/feed -[14]:https://opensource.com/users/jason-baker -[15]:https://creativecommons.org/licenses/by-sa/4.0/ -[16]:https://pixabay.com/en/clouds-sky-cloud-dark-clouds-1473311/ -[17]:https://pixabay.com/en/globe-planet-earth-world-1015311/ -[18]:https://creativecommons.org/publicdomain/zero/1.0/ -[19]:https://twitter.com/signup -[20]:https://apps.twitter.com/ -[21]:https://dev.twitter.com/rest/public/rate-limiting -[22]:https://www.rstudio.com/ -[23]:https://github.com/smbache/magrittr -[24]:http://simplystatistics.org/2015/07/24/stringsasfactors-an-unauthorized-biography/ -[25]:https://opensource.com/users/dorrisscott diff --git a/sources/tech/20170718 Integrate Ubuntu to Samba4 AD DC with SSSD and Realm – Part 15.md b/sources/tech/20170718 Integrate Ubuntu to Samba4 AD DC with SSSD and Realm – Part 15.md index 32a5caf4ae..513f75be09 100644 --- a/sources/tech/20170718 Integrate Ubuntu to Samba4 AD DC with SSSD and Realm – Part 15.md +++ b/sources/tech/20170718 Integrate Ubuntu to Samba4 AD DC with SSSD and Realm – Part 15.md @@ -1,3 +1,4 @@ +XYenChi is Translating Integrate Ubuntu to Samba4 AD DC with SSSD and Realm – Part 15 ============================================================ diff --git a/translated/20170620 A beginners guide to collecting and mapping Twitter data using R.md b/translated/20170620 A beginners guide to collecting and mapping Twitter data using R.md new file mode 100644 index 0000000000..a7d6c8e6cd --- /dev/null +++ b/translated/20170620 A beginners guide to collecting and mapping Twitter data using R.md @@ -0,0 +1,179 @@ + +用 R 收集和映射推特数据的初学者向导 +============================================================ + +### Learn to use R's twitteR and leaflet packages, which allow you to map the location of tweets on any topic. + +![用 R 收集和映射推特数据的初学者向导](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/cloud-globe.png?itok=H4f-RAz_ "用 R 收集和映射推特数据的初学者向导") +Image by :  + +[琼斯·贝克][14]. [CC BY-SA 4.0][15]. 来源: [Cloud][16], [Globe][17]. Both [CC0][18]. + +当我开始学习 R ,出于研究的目的我也需要学习如何收集推特数据并对其进行映射。尽管网上关于这个话题的信息很多,但我发觉难以理解什么与收集并映射推特数据相关。我不仅是个 R 新手,而且对不同教程中技术关系不熟悉。尽管困难重重,我成功了!在这个教程里,我将以一种新手程序员都能看懂的方式攻略如何收集推特数据并将至展现在地图中。 + +程序设计和开发 + +* [新 Python 内容][1] + +* [我们最新的 JavaScript 文章][2] + +* [ Perl 近期投递][3] + +* [红帽子开发者博客][4] + +### 创建应用程序 + +如果你没有推特帐号,首先你需要 [注册一个][19].然后, 到  [apps.twitter.com][20] 创建一个允许你收集推特数据应用程序。别担心,创建应用程序极其简单。你创建的应用程序会与推特应用程序接口(API)相连。 想象 API 是一个多功能电子个人助手。你可以使用 API 让其他程序帮你做事。这样一来,你可以接入推特 API 令其收集数据。只需确保不要请求太多,因为推特数据请求次数是有[限制][21] 的。 + +收集推文有两个可用的 API 。你若想做一次性的推文收集,那么使用 **REST API**. 若是想在特定时间内持续收集,可以用 **streaming API**。教程中我主要使用 REST API. + +创建应用程序之后,前往 **Keys and Access Tokens** 标签。你需要 Consumer Key (API key), Consumer Secret (API secret), Access Token, 和 Access Token Secret 来在 R 中访问你的应用程序。 + +### 收集推特数据 + +下一步是打开 R 准备写代码。对于初学者,我推荐使用 [RStudio][22], R 的集成开发环境 (IDE) 。我发现 RStudio 在解决问题和测试代码时很实用。 R 有访问 REST API 的包叫 **[twitteR][8]**. + +打开 RStudio 并新建 RScript。做好这些之后,你需要安装和加载 **twitteR** 包: + +``` +install.packages("twitteR") +#installs TwitteR +library (twitteR) +#loads TwitteR +``` + +安装并载入 **twitteR** 包之后,你得输入上文提及的应用程序的 API 信息: + +``` +api_key <- "" + #in the quotes, put your API key +api_secret <- "" + #in the quotes, put your API secret token +token <- "" + #in the quotes, put your token +token_secret <- "" + #in the quotes, put your token secret +``` + +接下来,连接推特访问 API: + +``` +setup_twitter_oauth(api_key, api_secret, token, token_secret) +``` + +我们来试试有关社区花园和农夫市场的推特研究: + +``` +tweets <- searchTwitter("community garden OR #communitygarden OR farmers market OR #farmersmarket", n = 200, lang = "en") +``` + +代码意思是搜索前200篇 **(n = 200)**英文 **(lang = "en")**推文, 包括关键词 **community garden** 或 **farmers market**或任何提及这些关键词的话题标签。 + +推特搜索完成之后,在数据框中保存你的结果: + +``` +tweets.df <-twListToDF(tweets) +``` + +为了用推文创建地图,你需要收集的导出为 **.csv** 文件: + +``` +write.csv(tweets.df, "C:\Users\YourName\Documents\ApptoMap\tweets.csv") + #an example of a file extension of the folder in which you want to save the .csv file. +``` + +运行前确保 **R** 代码已保存然后继续进行下一步。. + +### 生成地图 + +现在你有了可以展示在地图上的数据。在此教程中,我们将用一个 R 包 **[Leaflet][9]**做一个基本的应用程序,一个热门 JavaScript 库做交互式地图。 Leaflet 使用 [**magrittr**][23] 管道运算符 (**%>%**), 使得它易于写代码因为语法更加自然。刚接触可能有点奇怪,但它确实降低了写代码的工作量。 + +为了清晰度,在 RStudio 打开一个新的 R 脚本安装这些包: + +``` +install.packages("leaflet") +install.packages("maps") +library(leaflet) +library(maps) +``` + +现在需要一个路径让 Leaflet 访问你的数据: + +``` +read.csv("C:\Users\YourName\Documents\ApptoMap\tweets.csv", stringsAsFactors = FALSE) +``` + +**stringAsFactors = FALSE** 意思是保留信息,不将它转化成 factors. (想了解 factors,读这篇文章["stringsAsFactors: An unauthorized biography"][24], by Roger Peng.) + +是时候制作你的 Leaflet 地图了。你将使用 **OpenStreetMap**基本地图来做你的地图: + +``` +m <- leaflet(mymap) %>% addTiles() +``` + +我们来给基本地图加个范围。对于 **lng** 和 **lat**, 添加列名包括推文的经纬度,前面加个**~**。 **~longitude** 和 **~latitude** 在你的 **.csv** 文件中与列名相关的: + +``` +m %>% addCircles(lng = ~longitude, lat = ~latitude, popup = mymap$type, weight = 8, radius = 40, color = "#fb3004", stroke = TRUE, fillOpacity = 0.8) +``` + +运行你的代码。一个网页浏览器将会弹出并展示你的地图。这是我前面收集的推文的地图: + +### [leafletmap.jpg][6] + +![推文定位地图](https://opensource.com/sites/default/files/leafletmap.jpg "推文定位地图") + +用定位、 Leaflet 和 OpenStreetMap 的推文地图, [CC-BY-SA][5] + + + +虽然你可能会对地图上的图文数量如此之小感到惊奇,典型地,只有1%的推文被地理编码了。我收集了总数为366的推文,但只有10(大概总推文的3%)是被地理编码了的。如果为能得到地理编码过的推文困扰,改变搜索关键词看看能不能得到更好的结果。 + +### 总结 + +对于初学者,把所有碎片结合起来去从推特数据生成一个 Leaflet 地图可能很艰难。 这个教程基于我完成这个任务的经验,我希望它能让你的学习过程变得更轻松。 + + _Dorris Scott 将会在研讨会上提出这个话题, [从应用程序到地图: 用 R 收集映射社会媒体数据][10], at the [We Rise][11] Women in Tech Conference ([#WeRiseTech][12]) 六月 23-24 在亚特兰大。_ + +-------------------------------------------------------------------------------- + +作者简介: + +Dorris Scott - Dorris Scott 是佐治亚大学的地理学博士生。她的研究重心是地理信息系统 (GIS), 地理数据科学, 可视化和公共卫生。她的论文是在一个 GIS 系统接口联系退伍军人福利医院的传统和非传统数据,帮助病人为他们的健康状况作出更为明朗的决定。 + + +----------------- +via: https://opensource.com/article/17/6/collecting-and-mapping-twitter-data-using-r + +作者:[Dorris Scott ][a] +译者:[XYenChi](https://github.com/XYenChi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://opensource.com/users/dorrisscott +[1]:https://opensource.com/tags/python?src=programming_resource_menu +[2]:https://opensource.com/tags/javascript?src=programming_resource_menu +[3]:https://opensource.com/tags/perl?src=programming_resource_menu +[4]:https://developers.redhat.com/?intcmp=7016000000127cYAAQ&src=programming_resource_menu +[5]:https://creativecommons.org/licenses/by-sa/2.0/ +[6]:https://opensource.com/file/356071 +[7]:https://opensource.com/article/17/6/collecting-and-mapping-twitter-data-using-r?rate=Rnu6Lf0Eqvepznw75VioNPWIaJQH39pZETBfu2ZI3P0 +[8]:https://cran.r-project.org/web/packages/twitteR/twitteR.pdf +[9]:https://rstudio.github.io/leaflet +[10]:https://werise.tech/sessions/2017/4/16/from-app-to-map-collecting-and-mapping-social-media-data-using-r?rq=social%20mapping +[11]:https://werise.tech/ +[12]:https://twitter.com/search?q=%23WeRiseTech&src=typd +[13]:https://opensource.com/user/145006/feed +[14]:https://opensource.com/users/jason-baker +[15]:https://creativecommons.org/licenses/by-sa/4.0/ +[16]:https://pixabay.com/en/clouds-sky-cloud-dark-clouds-1473311/ +[17]:https://pixabay.com/en/globe-planet-earth-world-1015311/ +[18]:https://creativecommons.org/publicdomain/zero/1.0/ +[19]:https://twitter.com/signup +[20]:https://apps.twitter.com/ +[21]:https://dev.twitter.com/rest/public/rate-limiting +[22]:https://www.rstudio.com/ +[23]:https://github.com/smbache/magrittr +[24]:http://simplystatistics.org/2015/07/24/stringsasfactors-an-unauthorized-biography/ +[25]:https://opensource.com/users/dorrisscott From 20b8b55776bb488000ed0e979a73b3257862ce3a Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 7 Aug 2017 18:21:37 +0800 Subject: [PATCH 041/125] PRF&PUB:20170711 The Filesystem Hierarchy Standard Shows Which Bits Are Boss.md @firmianay --- ...rchy Standard Shows Which Bits Are Boss.md | 99 +++++++++++++++++++ ...rchy Standard Shows Which Bits Are Boss.md | 91 ----------------- 2 files changed, 99 insertions(+), 91 deletions(-) create mode 100644 published/20170711 The Filesystem Hierarchy Standard Shows Which Bits Are Boss.md delete mode 100644 translated/tech/20170711 The Filesystem Hierarchy Standard Shows Which Bits Are Boss.md diff --git a/published/20170711 The Filesystem Hierarchy Standard Shows Which Bits Are Boss.md b/published/20170711 The Filesystem Hierarchy Standard Shows Which Bits Are Boss.md new file mode 100644 index 0000000000..a44afd5ddb --- /dev/null +++ b/published/20170711 The Filesystem Hierarchy Standard Shows Which Bits Are Boss.md @@ -0,0 +1,99 @@ +文件系统层次标准(FHS)简介 +============================================================ +![linux](http://www.linuxinsider.com/article_images/story_graphics_xlarge/xl-2016-linux-1.jpg) + +当你好奇地看着系统的根目录(`/`)的时候,可能会发现自己有点不知所措。大多数三个字母的目录名称并没有告诉你它们是做什么的,如果你需要做出一些重要的修改,那就很难知道在哪里可以查看。 + +我想给那些没有深入了解过自己的根目录的人简单地介绍下它。 + +### 有用的工具 + +在我们开始之前,这里有几个需要熟悉的工具,它们可以让您随时挖掘那些您自己找到的有趣的东西。这些程序都不会对您的文件进行任何更改。 + +最有用的工具是 `ls` -- 它列出了使用完整路径或相对路径(即从当前目录开始的路径)作为参数给出的任何目录的内容。 + +``` +$ ls  路径 +``` + +当您进一步深入文件系统时,重复输入长路径可能会变得很麻烦,所以如果您想简化这一操作,可以用 `cd` 替换 `ls` 来更改当前的工作目录到该目录。与 `ls` 一样,只需将目录路径作为 `cd` 的参数。 + +``` +$ cd  路径 +``` + +如果您不确定某个文件是什么文件类型的,可以通过运行 `file` 并且将文件名作为 `file` 命令的参数。 + +``` +$ file  文件名 +``` + +最后,如果这个文件看起来像是适宜阅读的,那么用 `less` 来看看(不用担心文件有改变)。与最后一个工具一样,给出一个文件名作为参数来查看它。 + +``` +$ less  文件名 +``` + +完成文件翻阅后,点击 `q` 键退出,即可返回到您的终端。 + +### 根目录之旅 + +现在就开始我们的旅程。我将按照字母顺序介绍直接放在根目录下的目录。这里并没有介绍所有的目录,但到最后,我们会突出其中的亮点。 + +我们所有要遍历的目录的分类及功能都基于 Linux 的文件系统层次标准(FHS)。[Linux 基金会][4]维护的 Linux FHS 帮助发行版和程序的设计者和开发人员来规划他们的工具的各个组件应该存放的位置。 + +通过将各个程序的所有文件、二进制文件和帮助手册保存在一致的组织结构中,FHS 让对它们的学习、调试或修改更加容易。想象一下,如果不是使用 `man` 命令找到使用指南,那么你就得对每个程序分别寻找其手册。 + +按照字母顺序和结构顺序,我们从 `/bin` 开始。该目录是存放所有核心系统二进制文件的地方,其包含的命令可以在 shell (解释终端指令的程序)中使用。没有这个目录的内容,你的系统就基本没法使用。 + +接下来是 `/boot` 目录,它存储了您的计算机启动所需的所有东西。其中最重要的是引导程序和内核。引导程序是一个通过初始化一些基础工具,使引导过程得以继续的程序。在初始化结束时,引导程序会加载内核,内核允许计算机与所有其它硬件和固件进行接口。从这一点看,它可以使整个操作系统工作起来。 + +`/dev` 目录用于存储类似文件的对象来表示被系统识别为“设备”的各种东西。这里包括许多显式的设备,如计算机的硬件组件:键盘、屏幕、硬盘驱动器等。 + +此外,`/dev` 还包含被系统视为“设备”的数据流的伪文件。一个例子是流入和流出您的终端的数据,可以分为三个“流”。它读取的信息被称为“标准输入”。命令或进程的输出是“标准输出”。最后,被分类为调试信息的辅助性输出指向到“标准错误”。终端本身作为文件也可以在这里找到。 + +`/etc`(发音类似工艺商业网站 “Etsy”,如果你想让 Linux 老用户惊艳一下的话,囧),许多程序在这里存储它们的配置文件,用于改变它们的设置。一些程序存储这里的是默认配置的副本,这些副本将在修改之前复制到另一个位置。其它的程序在这里存储配置的唯一副本,并期望用户可以直接修改。为 root 用户保留的许多程序常用一种配置模式。 + +`/home` 目录是用户个人文件所在的位置。对于桌面用户来说,这是您花费大部分时间的地方。对于每个非特权用户,这里都有一个具有相应名称的目录。 + +`/lib` 是您的系统赖以运行的许多库的所在地。许多程序都会重复使用一个或多个功能或子程序,它们经常会出现在几十上百个程序中。所以,如果每个程序在其二进制文件中重复写它需要的每一个组件,结果会是产生出一些大而无当的程序,作为更好的替代方案,我们可以通过进行“库调用”来引用这些库中的一个或多个。 + +在 `/media` 目录中可以访问像 USB 闪存驱动器或摄像机这样的可移动媒体。虽然它并不是所有系统上都有,但在一些专注于直观的桌面系统中还是比较普遍的,如 Ubuntu。具有存储能力的媒体在此处被“挂载”,这意味着当设备中的原始位流位于 `/dev` 目录下时,用户通常可以在这里访问那些可交互的文件对象。 + +`/proc` 目录是一个动态显示系统数据的虚拟文件系统。这意味着系统可以即时地创建 `/proc` 的内容,用包含运行时生成的系统信息(如硬件统计信息)的文件进行填充。 + +`/tmp` 正如其名字,用于放置缓存数据等临时信息。这个目录不做其他更多的事情。 + +现代 Linux 系统上大多数程序的二进制文件保存在 `/usr` 目录中。为了统一包含二进制文件的各种目录,`/usr` 包含 `/bin`、`/sbin` 和 `/lib` 中的所有内容的副本。 + +最后,`/var` 里保存“可变variable”长度的数据。这里的可变长度数据的类型通常是会累积的数据,就像日志和缓存一样。一个例子是你的内核保留的日志。 + +为了避免硬盘空间用尽和崩溃的情况,`/var` 内置了“日志旋转”功能,可删除旧信息,为新信息腾出空间,维持固定的最大大小。 + +### 结尾 + +正如我所说,这里介绍的绝对不是您在根目录中可以找到的一切,但是确定系统核心功能所在地是一个很好的开始,而且可以更深入地研究这些功能是什么。 + +所以,如果你不知道要学习什么,就可能有很多的想法。如果你想得到一个更好的想法,就在这些目录中折腾自己吧! + +-------------------------------------------------------------------------------- + +作者简介: + +自 2017 年以来 Jonathan Terrasi 一直是 ECT 新闻网的专栏作家。他的主要兴趣是计算机安全(特别是 Linux 桌面),加密和分析政治和时事。他是全职自由作家和音乐家。他的背景包括在芝加哥委员会发表的保卫人权法案文章中提供技术评论和分析。 + +------ + + +via: http://www.linuxinsider.com/story/84658.html + +作者:[Jonathan Terrasi][a] +译者:[firmianay](https://github.com/firmianay) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.linuxinsider.com/perl/mailit/?id=84658 +[1]:http://www.linuxinsider.com/story/84658.html?rss=1# +[2]:http://www.linuxinsider.com/perl/mailit/?id=84658 +[4]:http://www.linuxfoundation.org/ diff --git a/translated/tech/20170711 The Filesystem Hierarchy Standard Shows Which Bits Are Boss.md b/translated/tech/20170711 The Filesystem Hierarchy Standard Shows Which Bits Are Boss.md deleted file mode 100644 index 15f1cec927..0000000000 --- a/translated/tech/20170711 The Filesystem Hierarchy Standard Shows Which Bits Are Boss.md +++ /dev/null @@ -1,91 +0,0 @@ -文件系统层次标准(FHS)简介 -============================================================ -![linux](http://www.linuxinsider.com/article_images/story_graphics_xlarge/xl-2016-linux-1.jpg) - -当你好奇地看着系统的根目录(“/”)的时候,可能会发现自己有点不知所措。大多数三个字母的目录名称并没有告诉你他们是做什么的,如果你需要做出一些重要的修改,那就很难知道在哪里可以查看。 - -我想给大家简单地介绍下根目录。 - -### 有用的工具 - -在我们开始之前,这里有几个值得熟悉的工具,它们可以让您随时挖掘您自己找到的有趣的东西。这些程序都不会对您的文件进行任何更改。 - -最有用的工具是 “ls” -- 它列出了使用完整路径或相对路径(即从当前目录开始的路径)作为参数给出的任何目录的内容。 - -$ ls  _path_ - -当您进一步深入文件系统时,重复输入长路径可能会变得很麻烦,所以如果您想简化这一操作,可以用 “cd” 替换 “ls” 来更改当前的工作目录到该目录。与 “ls” 一样,只需将目录路径作为 “cd” 的参数。 - -$ cd  _path_ - -如果您不确定某个文件是什么文件类型的,可以通过运行 “file” 并且将文件名作为“file” 命令的参数。 - -$ file  _filename_ - -最后,如果这个文件看起来像是人可读的,那么用 “less” 来看看(不用担心文件有改变)。与最后一个工具一样,给出一个文件名作为参数来查看它。 - -$ less  _filename_ - -完成文件扫描后,点击 “q” 退出,即可返回到您的终端。 - -### 根目录之旅 - -现在就开始我们的旅程。我将按照字母顺序介绍直接在根目录下的目录。这里并没有介绍所有的目录,但到最后,我们会突出其中的亮点。 - -我们将要完成的目录的所有分类和功能都基于 Linux 文件系统层次标准(FHS)。[Linux基金会][4]维护的 Linux FHS 通过规定其工具的各个组件应该存放的位置,帮助设计师和开发人员进行发行版和程序的开发。 - -通过将所有文件,二进制文件和手册保存在程序中的一致性组织中,FHS 让学习、调试或修改更加容易。想象一下,如果不是使用 “man” 命令找到使用指南,那么你就不得不寻找每个程序的手册。 - -按照字母顺序和结构顺序,我们从 “**/bin**” 开始。该目录是包含 shell 命令的所有核心系统二进制文件(解释终端指令的程序)。没有这个目录的内容,你的系统就不能做很多事情。 - -接下来是 “**/boot**” 目录,它存储了您的计算机需要启动的所有东西。其中最重要的是引导程序和内核。引导程序是一个通过初始化一些基础工具,使引导过程继续进行的程序。在初始化结束时,引导程序会加载内核,内核允许计算机与所有其他硬件和固件进行接口。从这一点看,它可以持续地使整个操作系统工作。 - -“**/dev**” 目录是表示被系统识别为“设备”的所有文件的对象。这里包括许多显式的设备,如计算机的硬件组件:键盘,屏幕,硬盘驱动器等。 - -此外,“/dev” 还包含被系统视为“设备”的数据流的伪文件。一个例子是流入和流出您的终端的数据,可以分为三个“流”。它读取的信息被称为“标准输入”。命令或进程的输出是“标准输出”。最后,分类为调试信息的辅助输出指向“标准错误”。终端本身作为文件也可以在这里找到。 - -“**/etc**”(发音类似工艺商业网站 “Etsy”,如果你想打动 Linux 老用户的话),许多程序在这里存储他们的配置文件,用于改变他们的设置。一些程序存储这里的是默认配置的副本,这些副本将在修改之前复制到另一个位置。其他的程序在这里存储配置的唯一副本,并期望用户可以直接修改。为 root 用户保留的许多程序取决于后一种配置模式。 - -“**/home**” 目录是用户个人文件所在的位置。对于桌面用户来说,这是您花费大部分时间的地方。对于每个非特权用户,这里都有一个具有相应名称的目录。 - -“**/lib**” 是您的系统依赖运行的许多库的所在地。许多程序都会重复使用一个或多个在几十上百个程序中常见的功能或子程序。所以,如果每个程序在其二进制文件中重写它需要的每一个组件,结果会是产生出一些大而无用的程序,作为更好的替代方案,我们可以通过进行“库调用”来引用这些库中的一个或多个。 - -在 “**/media**” 目录中可以访问像 USB 闪存驱动器或摄像机这样的可移动媒体。虽然它不存在于所有系统上,但在一些专注于直观桌面的系统中还是比较普遍的,如 Ubuntu。具有存储能力的媒体在此处被“挂载”,这意味着当设备中的原始位流位于 “/dev” 目录下时,用户通常可以在这里访问那些可交互的文件对象。 - -“**/proc**” 目录是一个动态显示系统数据的虚拟文件系统。这意味着系统可以即时地创建 “/proc” 的内容,用包含运行时生成系统信息(如硬件统计信息)的文件进行填充。 - -“**/tmp**” 恰好足够的用于发送缓存数据等临时信息。这个目录不做其他更多的事情。 - -现代 Linux 系统上大多数程序的二进制文件保存在 “**/usr**” 目录中。为了统一包含二进制文件的各种目录,“/usr” 包含 “/bin”、“/sbin” 和 “/lib” 中的所有内容的副本。 - -最后,“**/var**” 里保存“可变”长度的数据。这里的可变长度数据的类型通常是会累积的数据,就像日志和缓存一样。一个例子是你的内核保留的日志。 - -为了保持硬盘远离空间用尽和崩溃的情况,“/var” 内置了“日志旋转”功能,可删除旧信息,为新信息腾出空间,维持固定的最大大小。 - -### 结尾 - -正如我所说,这里介绍的绝对不是您在根目录中可以找到的一切,但是确定系统核心功能所在地是一个很好的开始,而且可以更深入地研究这些功能是什么。 - -所以,如果你不知道要学习什么,就可能有很多的想法。如果你想得到一个更好的想法,就在这些目录中折腾自己吧! - --------------------------------------------------------------------------------- - -作者简介: - -自 2017 年以来 Jonathan Terrasi 一直是 ECT 新闻网的专栏作家。他的主要兴趣是计算机安全(特别是 Linux 桌面),加密和分析政治和时事。他是全职自由作家和音乐家。他的背景包括在芝加哥委员会发表的保卫人权法案文章中提供技术评论和分析。 - ------- - - -via: http://www.linuxinsider.com/story/84658.html - -作者:[Jonathan Terrasi ][a] -译者:[firmianay](https://github.com/firmianay) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.linuxinsider.com/perl/mailit/?id=84658 -[1]:http://www.linuxinsider.com/story/84658.html?rss=1# -[2]:http://www.linuxinsider.com/perl/mailit/?id=84658 -[4]:http://www.linuxfoundation.org/ From b7fc688ed5d1d6e7da69fb45ca42c5c1be319b42 Mon Sep 17 00:00:00 2001 From: sugarfillet <1911093465@qq.com> Date: Mon, 7 Aug 2017 23:32:02 +0800 Subject: [PATCH 042/125] translating by sugarfillet --- .../tech/20170711 Functional testing Gtk applications in C.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20170711 Functional testing Gtk applications in C.md b/sources/tech/20170711 Functional testing Gtk applications in C.md index f2b211372f..717796f8c4 100644 --- a/sources/tech/20170711 Functional testing Gtk applications in C.md +++ b/sources/tech/20170711 Functional testing Gtk applications in C.md @@ -1,3 +1,4 @@ +translating by sugarfillet Functional testing Gtk+ applications in C ============================================================ From 08497ba2feea66360a3218b9c5622196bf2ce8b1 Mon Sep 17 00:00:00 2001 From: rieonke Date: Mon, 7 Aug 2017 23:35:14 +0800 Subject: [PATCH 043/125] translated --- ...RUNTIME AND IMAGE FORMAT SPECIFICATIONS.md | 106 ------------------ ...RUNTIME AND IMAGE FORMAT SPECIFICATIONS.md | 101 +++++++++++++++++ 2 files changed, 101 insertions(+), 106 deletions(-) delete mode 100644 sources/tech/20170719 DOCKER LEADS OCI RELEASE OF V1.0 RUNTIME AND IMAGE FORMAT SPECIFICATIONS.md create mode 100644 translated/tech/20170719 DOCKER LEADS OCI RELEASE OF V1.0 RUNTIME AND IMAGE FORMAT SPECIFICATIONS.md diff --git a/sources/tech/20170719 DOCKER LEADS OCI RELEASE OF V1.0 RUNTIME AND IMAGE FORMAT SPECIFICATIONS.md b/sources/tech/20170719 DOCKER LEADS OCI RELEASE OF V1.0 RUNTIME AND IMAGE FORMAT SPECIFICATIONS.md deleted file mode 100644 index 21117c34f6..0000000000 --- a/sources/tech/20170719 DOCKER LEADS OCI RELEASE OF V1.0 RUNTIME AND IMAGE FORMAT SPECIFICATIONS.md +++ /dev/null @@ -1,106 +0,0 @@ -> translating by rieon - -DOCKER LEADS OCI RELEASE OF V1.0 RUNTIME AND IMAGE FORMAT SPECIFICATIONS -============================================================ - - -Today marks an important milestone for the Open Container Initiative (OCI) with the release of the OCI v1.0 runtime and image specifications – a journey that Docker has been central in driving and navigating over the last two years. It has been our goal to provide low-level standards as building blocks for the community, customers and the broader industry. To understand the significance of this milestone, let’s take a look at the history of Docker’s growth and progress in developing industry-standard container technologies. - -The History of Docker Runtime and Image Donations to the OCI - -Docker’s image format and container runtime quickly emerged as the de facto standard following its release as an open source project in 2013\. We recognized the importance of turning it over to a neutral governance body to fuel innovation and prevent fragmentation in the industry. Working together with a broad group of container technologists and industry leaders, the Open Container Project was formed to create a set of container standards and was launched under the auspices of the Linux Foundation in June 2015 at DockerCon. It became the Open Container Initiative (OCI) as the project evolved that Summer. - -Docker contributed runc, a reference implementation for the container runtime software that had grown out of Docker employee [Michael Crosby’s][17] libcontainer project. runc is the basis for the runtime specification describing the life-cycle of a container and the behavior of a container runtime. runc is used in production across tens of millions of nodes, which is an order of magnitude more than any other code base. runc became the reference implementation for the runtime specification project itself, and continued to evolve with the project.   - -Almost a year after work began on the runtime specification, a new working group formed to specify a container image format. Docker donated the Docker V2 Image Format to the OCI as the basis for the image specification. With this donation, the OCI defines the data structures — the primitives — that make up a container image. Defining the container image format is an important step for adoption, but it takes a platform like Docker to activate its value by defining and providing tooling on how to build images, manage them and ship them around. For example, things such as the Dockerfile are not included in the OCI specifications. - -Title: Docker’s History of Contribution to the OCI - -![Docker and OCI](https://i2.wp.com/blog.docker.com/wp-content/uploads/OCI.png?resize=938%2C1491&ssl=1) - -The Journey to Open Container Standards - -The specifications have continued to evolve for two years now. Smaller projects have been spun out of the runc reference implementation as the code has been refactored, as well as support testing tools that will become the test suite for certification. - -See the timeline above for details about Docker’s involvement in shaping OCI, which includes: creating runc, iterating on the runtime specification with the community, creating containerd to integrate runc in Docker 1.11, donating the Docker V2 Image Format to OCI as a base for the image format specification, implementing that specification in [containerd][18] so that this core container runtime covers both the runtime and image format standards, and finally donating containerd to the Cloud Native Computing Foundation (CNCF) and iterating on it towards a 1.0 alpha release this month. - -Maintainers [Michael Crosby][19] and [Stephen Day][20] have lead the development of these specifications and have been instrumental in bringing v1.0 to fruition, alongside contributions from Alexander Morozov, Josh Hawn, Derek McGown and Aaron Lehmann, as well as Stephen Walli participating in the certification working group. - -Docker remains committed to driving container standards, building a strong base at the layers where everyone agrees so that the industry can innovate at the layers that are still very differentiated. - -Open Standards are Only a Piece of the Puzzle - -Docker is a complete platform for creating, managing, securing, and orchestrating containers and container images. The vision has always been a base of industry standard specifications that support open source components or the plumbing of a container solution. The Docker platform sits above this layer – providing users and customers with a secure container management solution from development through production.   - -The OCI runtime and image specifications become the dependable standards base that allow and encourage the greatest number of container solutions and at the same time, they do not restrict product innovation or shutout major contributors. To draw a comparison, TCP/IP, HTTP and HTML became the dependable standards base upon which the World Wide Web was built over the past 25 years. Companies continue to innovate with new tools, technologies and browsers on these standards. The OCI specifications provide the similar foundation for containers solutions going forward. - -Open source projects also play a role in providing components for product development. The OCI runc reference implementation is used by the containerd project, a larger container runtime responsible for image transfer and storage, container execution and supervision, and low-level functions to support storage and network attachments. The containerd project was contributed by Docker to the CNCF and sits alongside other important projects to support cloud native computing solutions. - -Docker uses containerd and more of its own core open source infrastructure elements like the LinuxKit, InfraKit and Notary projects to build and secure container solutions that become the Docker Community Edition tools. Users and organizations looking for complete container platforms that are holistic and provide container management, security, orchestration, networking and more can look to Docker Enterprise Edition. - -![Docker Stack](https://i0.wp.com/blog.docker.com/wp-content/uploads/243938a0-856b-4a7f-90ca-2452a69a385c-1.jpg?resize=1019%2C511&ssl=1) - -> This diagram highlights that the OCI specifications provide a layer of standards, implemented by a container runtime: containerd and runc. To assemble a full container platform such as Docker with full container lifecycle workflow, many other components are brought together: to manage infrastructure (InfraKit), provide an operating system (LinuxKit), deliver orchestration (SwarmKit), ensure security (Notary). - -What’s Next for the OCI - -We should celebrate the efforts of the developers as the runtime and image specifications are published. The next critical work to be done by the Open Container Initiative is to deliver a certification program to validate claims from implementers that their products and projects do indeed conform to the runtime and image specifications. The [Certification Working Group][21] has been putting together a program that in conjunction with a developing suite of test tools for both the [runtime][22] and [image][23] specifications will show how implementations fare against the standards. - -At the same time, the developers of the current specifications are considering the next most important areas of container technology to specify. Work is underway around a common networking interface for containers in the Cloud Native Computing Foundation, but work to support signing and distribution are areas under consideration for the OCI. - -Alongside the OCI and its members, Docker remains committed to standardizing container technology. The OCI’s mission is to give users and companies the baseline on which they can innovate in the areas of developer tooling, image distribution, container orchestration, security, monitoring and management. Docker will continue to lead the charge in innovation – not only with tooling that increases productivity and increases efficiencies, but also by empowering users, partners and customers to innovate as well. - -**Learn more about OCI and Open Source at Docker:** - -* Read about the [OCI specifications Myths][1] - -* Visit the [Open Container Initiative website][2] - -* Visit the [Moby Project website][3] - -* Attend [DockerCon Europe 2017][4] - -* Attend the [Moby Summit LA][5] alongside OSS NA - --------------------------------------------------------------------------------- - -作者简介: - -Patrick Chanezon is member of technical staff at Docker Inc. He helps to build Docker, an open platform for distributed applications for developers and sysadmins. Software developer and storyteller, he spent 10 years building platforms at Netscape & Sun, then 10 years evangelizing platforms at Google, VMware & Microsoft. His main professional interest is in building and kickstarting the network effect for these wondrous two-sided markets called Platforms. He has worked on platforms for Portals, Ads, Commerce, Social, Web, Distributed Apps, and Cloud. More information is available at linkedin.com/in/chanezon. Patrick tweets at @chanezon. - - - ------- - -via: https://blog.docker.com/2017/07/oci-release-of-v1-0-runtime-and-image-format-specifications/ - -作者:[Patrick Chanezon ][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://blog.docker.com/author/chanezon/ -[1]:https://blog.docker.com/2017/07/demystifying-open-container-initiative-oci-specifications/ -[2]:https://www.opencontainers.org/join -[3]:http://mobyproject.org/ -[4]:https://europe-2017.dockercon.com/ -[5]:https://www.eventbrite.com/e/moby-summit-los-angeles-tickets-35930560273 -[6]:https://blog.docker.com/author/chanezon/ -[7]:https://blog.docker.com/tag/cncf/ -[8]:https://blog.docker.com/tag/containerd/ -[9]:https://blog.docker.com/tag/containers/ -[10]:https://blog.docker.com/tag/docker/ -[11]:https://blog.docker.com/tag/docker-image-format/ -[12]:https://blog.docker.com/tag/docker-runtime/ -[13]:https://blog.docker.com/tag/infrakit/ -[14]:https://blog.docker.com/tag/linux-foundation/ -[15]:https://blog.docker.com/tag/oci/ -[16]:https://blog.docker.com/tag/open-containers/ -[17]:https://github.com/crosbymichael -[18]:https://containerd.io/ -[19]:https://github.com/crosbymichael -[20]:https://github.com/stevvooe -[21]:https://github.com/opencontainers/certification -[22]:https://github.com/opencontainers/runtime-tools -[23]:https://github.com/opencontainers/image-tools diff --git a/translated/tech/20170719 DOCKER LEADS OCI RELEASE OF V1.0 RUNTIME AND IMAGE FORMAT SPECIFICATIONS.md b/translated/tech/20170719 DOCKER LEADS OCI RELEASE OF V1.0 RUNTIME AND IMAGE FORMAT SPECIFICATIONS.md new file mode 100644 index 0000000000..34f42798e4 --- /dev/null +++ b/translated/tech/20170719 DOCKER LEADS OCI RELEASE OF V1.0 RUNTIME AND IMAGE FORMAT SPECIFICATIONS.md @@ -0,0 +1,101 @@ +Docker 领导 OCI 发布容器运行时和镜像格式规范 V1.0 +============================================================ + +今天是开放容器计划(OCI)的一个重要里程碑,OCI 发布了容器运行时和镜像规范的 1.0 版本,而Docker 在这过去两年中一直充当着驱动和领航的核心角色。我们的目标是为社区、客户以及更广泛的容器行业提供底层的标准。要了解这一里程碑的意义,我们先来看看 Docker 在开发容器技术行业标准方面的成长和发展历史。 + +**Docker 将运行时和镜像捐赠给 OCI 的历史** + +Docker 的镜像格式和容器运行时在 2013 年作为开源项目发布后,迅速成为事实上的标准。我们认识到将其转交给中立管理机构管理,以加强创新和防止行业碎片化的重要性。我们与广泛的容器技术人员和行业领导者合作,成立了开放容器项目(Open Container Project)来制定了一套容器标准,并在 Linux 基金会的支持下,于 2015 年 6 月在 Docker 大会(DockerCon)上推出。最终在那个夏天演变成为开放容器计划(Open Container Initiative ,OCI)。 + +Docker 贡献了 runc ,这是从 Docker 员工 [Michael Crosby] [17] 的 libcontainer 项目中发展而来的容器运行时参考实现。 runc 是描述容器生命周期和运行时行为的运行时规范的基础。runc 被用在数千万个节点的生产环境中,这比任何其他代码库都要大一个数量级。runc 已经成为运行时规范的参考实现,并且随着项目的进展而不断发展。 + +在运行时规范制定工作开始近一年后,我们组建了一个新的工作组来制定镜像格式的规范。 Docker 将 Docker V2 镜像格式捐赠给 OCI 作为镜像规范的基础。通过这次捐赠,OCI 定义了构成容器镜像的数据结构(原始镜像)。定义容器镜像格式是一个至关重要的步骤,但它需要一个像 Docker 这样的平台通过定义和提供构建、管理和发布镜像的工具来实现它的价值。 例如,Dockerfile 等内容并不包括在 OCI 规范中。 + +**标题:Docker 为 OCI 贡献的历史** + +![Docker 和 OCI](https://i2.wp.com/blog.docker.com/wp-content/uploads/OCI.png?resize=938%2C1491&ssl=1) + +**开放容器标准化之旅** + +这个规范已经持续开发了两年。随着代码的重构,小型项目已经从 runc 参考实现中脱颖而出,并支持即将发布的认证测试工具。 + +有关 Docker 参与塑造 OCI 的详细信息,请参阅上面的时间轴,其中包括:创建 runc ,和社区一起更新迭代运行时规范,创建 containerd 以便于将 runc 集成到 Docker 1.11 中,将 Docker V2 镜像格式贡献给 OCI 作为其础镜像格式规范的基础,并在 [containerd][18] 中实现该规范,使得该核心容器运行时同时涵盖了运行时和镜像格式标准,最后将 containerd 捐赠给了云计算基金会(CNCF),并将其更新到 1.0 alpha 版本于本月发布。 + +维护者 [Michael Crosby][19] 和 [Stephen Day][20] 引导了这些规范的发展,并且为 v1.0 版本的实现提供了极大的帮助,以及 Alexander Morozov,Josh Hawn,Derek McGown 和 Aaron Lehmann 也贡献了代码,以及Stephen Walli 参加了认证工作组。 + +Docker 仍然致力于推动容器标准化进程,在每个人都认可的层面建立起坚实的基础,使整个容器行业能够在依旧十分差异化的层面上进行创新。 + +**开放标准只是一小块拼图** + +Docker 是一个完整的平台,用于创建、管理、保护和编排容器以及镜像。该项目的愿景始终是致力于成为支持开源组件的行业规范的基石,或着是容器解决方案的校准铅锤。Docker 平台正位于此层之上 -- 为客户提供从开发到生产的安全的容器管理解决方案。 + +OCI 运行时和镜像规范成为一个可靠的标准基础,允许和鼓励多样化的容器解决方案,同时它们不限制产品创新或遏制主要开发者。打一个比方,TCP/IP,HTTP 和 HTML 成为过去25年来建立万维网的可靠标准,其他公司可以继续通过这些标准的新工具、技术和浏览器进行创新。 OCI 规范也为容器解决方案提供了类似的规范基础。 + +开源项目也在为产品开发提供组件方面发挥着作用。containerd 项目就使用 OCI 的 runc 参考实现,负责镜像的传输和存储,容器运行和监控,以及支持存储和网络附件的等底层功能。containerd 项目已经被 Docker 捐赠给了 CNCF ,与其他重要项目一起支持云计算解决方案。 + +Docker 使用了 containerd 和其他自己的核心开源基础设施组件,如 LinuxKit,InfraKit 和 Notary 等项目来构建和保护 Docker 社区版容器解决方案。正在寻找一个完整的容器平台,能提供容器管理、安全性、编排、网络和更多功能的用户和组织可以查看 Docker Enterprise Edition 。 + +![Docker 栈](https://i0.wp.com/blog.docker.com/wp-content/uploads/243938a0-856b-4a7f-90ca-2452a69a385c-1.jpg?resize=1019%2C511&ssl=1) + +> 这张图强调了 OCI 规范提供了一个由容器运行时实现的标准层:containerd 和 runc。 要组装一个完整的、具有完整容器生命周期和工作流程的容器平台,如 Docker,需要和许多其他的组件集成在一起:管理基础架构的 InfraKit,提供操作系统的 LinuxKit,交付编排的 SwarmKit,确保安全性的 Notary。 + +**OCI 下一步该干什么** + +随着运行时和镜像规范的发布,我们应该庆祝开发者的努力。开放容器计划的下一个关键工作是提供认证计划,以验证实现者的产品和项目确实符合运行时和镜像规范。[认证工作组][21] 已经组织了一个程序,结合了开发套件(developing suite)的[运行时][22]和[镜像][23]规范测试工具将展示产品应该如何参照标准进行实现。 + +同时,目前规范的开发者们正在考虑下一个最重要的容器技术领域。云计算基金会的通用容器网络接口开发工作已经正在进行中,支持镜像签署和分发的工作正也在 OCI 的考虑之中。 + +除了 OCI 及其成员,Docker 仍然致力于推进容器技术的标准化。 OCI 的使命是为用户和公司提供在开发人工具、镜像分发、容器编排、安全、监控和管理等方面进行创新的基准。Docker 将继续引领创新,不仅提供提高生产力和效率的工具,而且还通过授权用户,合作伙伴和客户进行创新。 + +**在 Docker 学习更过关于 OCI 和开源的信息:** + +* 阅读 [OCI 规范的误区][1] + +* 访问 [开放容器计划的网站][2] + +* 访问 [Moby 项目网站 ][3] + +* 参加 [DockerCon Europe 2017][4] + +* 参加 [Moby Summit LA][5] + +-------------------------------------------------------------------------------- + +作者简介: + +Patrick Chanezon是Docker Inc.技术人员。他的工作是帮助构建 Docker 。一个程序员和讲故事的人 (storyller),他在 Netscape 和 Sun 工作了10年的时间,又在Google,VMware 和微软工作了10年。他的主要职业兴趣是为这些奇特的双边市场“平台”建立和推动网络效应。他曾在门户网站,广告,电商,社交,Web,分布式应用和云平台上工作过。有关更多信息,请访问 linkedin.com/in/chanezon 和他的推特@chanezon。 + +------ + +via: https://blog.docker.com/2017/07/oci-release-of-v1-0-runtime-and-image-format-specifications/ + +作者:[Patrick Chanezon ][a] +译者:[rieonke](https://github.com/rieonke) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://blog.docker.com/author/chanezon/ +[1]:https://blog.docker.com/2017/07/demystifying-open-container-initiative-oci-specifications/ +[2]:https://www.opencontainers.org/join +[3]:http://mobyproject.org/ +[4]:https://europe-2017.dockercon.com/ +[5]:https://www.eventbrite.com/e/moby-summit-los-angeles-tickets-35930560273 +[6]:https://blog.docker.com/author/chanezon/ +[7]:https://blog.docker.com/tag/cncf/ +[8]:https://blog.docker.com/tag/containerd/ +[9]:https://blog.docker.com/tag/containers/ +[10]:https://blog.docker.com/tag/docker/ +[11]:https://blog.docker.com/tag/docker-image-format/ +[12]:https://blog.docker.com/tag/docker-runtime/ +[13]:https://blog.docker.com/tag/infrakit/ +[14]:https://blog.docker.com/tag/linux-foundation/ +[15]:https://blog.docker.com/tag/oci/ +[16]:https://blog.docker.com/tag/open-containers/ +[17]:https://github.com/crosbymichael +[18]:https://containerd.io/ +[19]:https://github.com/crosbymichael +[20]:https://github.com/stevvooe +[21]:https://github.com/opencontainers/certification +[22]:https://github.com/opencontainers/runtime-tools +[23]:https://github.com/opencontainers/image-tools From a536e9064eccfd74758a8da82b747f7c089fb81d Mon Sep 17 00:00:00 2001 From: Rieon Date: Mon, 7 Aug 2017 23:43:51 +0800 Subject: [PATCH 044/125] fixed styling mistake --- ...I RELEASE OF V1.0 RUNTIME AND IMAGE FORMAT SPECIFICATIONS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/tech/20170719 DOCKER LEADS OCI RELEASE OF V1.0 RUNTIME AND IMAGE FORMAT SPECIFICATIONS.md b/translated/tech/20170719 DOCKER LEADS OCI RELEASE OF V1.0 RUNTIME AND IMAGE FORMAT SPECIFICATIONS.md index 34f42798e4..80b5ff505c 100644 --- a/translated/tech/20170719 DOCKER LEADS OCI RELEASE OF V1.0 RUNTIME AND IMAGE FORMAT SPECIFICATIONS.md +++ b/translated/tech/20170719 DOCKER LEADS OCI RELEASE OF V1.0 RUNTIME AND IMAGE FORMAT SPECIFICATIONS.md @@ -7,7 +7,7 @@ Docker 领导 OCI 发布容器运行时和镜像格式规范 V1.0 Docker 的镜像格式和容器运行时在 2013 年作为开源项目发布后,迅速成为事实上的标准。我们认识到将其转交给中立管理机构管理,以加强创新和防止行业碎片化的重要性。我们与广泛的容器技术人员和行业领导者合作,成立了开放容器项目(Open Container Project)来制定了一套容器标准,并在 Linux 基金会的支持下,于 2015 年 6 月在 Docker 大会(DockerCon)上推出。最终在那个夏天演变成为开放容器计划(Open Container Initiative ,OCI)。 -Docker 贡献了 runc ,这是从 Docker 员工 [Michael Crosby] [17] 的 libcontainer 项目中发展而来的容器运行时参考实现。 runc 是描述容器生命周期和运行时行为的运行时规范的基础。runc 被用在数千万个节点的生产环境中,这比任何其他代码库都要大一个数量级。runc 已经成为运行时规范的参考实现,并且随着项目的进展而不断发展。 +Docker 贡献了 runc ,这是从 Docker 员工 [Michael Crosby][17] 的 libcontainer 项目中发展而来的容器运行时参考实现。 runc 是描述容器生命周期和运行时行为的运行时规范的基础。runc 被用在数千万个节点的生产环境中,这比任何其他代码库都要大一个数量级。runc 已经成为运行时规范的参考实现,并且随着项目的进展而不断发展。 在运行时规范制定工作开始近一年后,我们组建了一个新的工作组来制定镜像格式的规范。 Docker 将 Docker V2 镜像格式捐赠给 OCI 作为镜像规范的基础。通过这次捐赠,OCI 定义了构成容器镜像的数据结构(原始镜像)。定义容器镜像格式是一个至关重要的步骤,但它需要一个像 Docker 这样的平台通过定义和提供构建、管理和发布镜像的工具来实现它的价值。 例如,Dockerfile 等内容并不包括在 OCI 规范中。 From 81603873745469949dc52d9ea97f06ee7ac6779f Mon Sep 17 00:00:00 2001 From: rieonke Date: Tue, 8 Aug 2017 00:09:53 +0800 Subject: [PATCH 045/125] apply for translating --- ...ining System Services in Red Hat Enterprise Linux – Part 1.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20170719 Containing System Services in Red Hat Enterprise Linux – Part 1.md b/sources/tech/20170719 Containing System Services in Red Hat Enterprise Linux – Part 1.md index 6f6c6fd16e..2410f2dcad 100644 --- a/sources/tech/20170719 Containing System Services in Red Hat Enterprise Linux – Part 1.md +++ b/sources/tech/20170719 Containing System Services in Red Hat Enterprise Linux – Part 1.md @@ -1,3 +1,4 @@ +> translating by rieonke Containing System Services in Red Hat Enterprise Linux – Part 1 ============================================================ From 7e17c948f411251e239af80d2fe915d2cc9ca04a Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 8 Aug 2017 08:40:04 +0800 Subject: [PATCH 046/125] translated --- ...nstall Zabbix on an Ubuntu 16.04 Server.md | 219 ----------------- ...nstall Zabbix on an Ubuntu 16.04 Server.md | 225 ++++++++++++++++++ 2 files changed, 225 insertions(+), 219 deletions(-) delete mode 100644 sources/tech/20170705 Monitoring Server Install Zabbix on an Ubuntu 16.04 Server.md create mode 100644 translated/tech/20170705 Monitoring Server Install Zabbix on an Ubuntu 16.04 Server.md diff --git a/sources/tech/20170705 Monitoring Server Install Zabbix on an Ubuntu 16.04 Server.md b/sources/tech/20170705 Monitoring Server Install Zabbix on an Ubuntu 16.04 Server.md deleted file mode 100644 index 2e30a1a72a..0000000000 --- a/sources/tech/20170705 Monitoring Server Install Zabbix on an Ubuntu 16.04 Server.md +++ /dev/null @@ -1,219 +0,0 @@ -translating----geekpi - -Monitoring Server: Install Zabbix on an Ubuntu 16.04 Server -============================================================ - - [![Zabbix logo](https://www.unixmen.com/wp-content/uploads/2017/06/zabbix_logo.png "zabbix_logo")][3] - -### Monitoring Server – What is Zabbix - -[Zabbix][2] is an enterprise-class open source distributed monitoring server solution. The software monitors different parameters of a network and the integrity of a server, and also allows the configuration of email based alerts for any event. Zabbix offers reporting and data visualization features based on the data stored in a database (MySQL, for example). Every metric collected by the software is accessible through a web-based interface. - -Zabbix is released under the terms of the GNU General Public License version 2 (GPLv2), totally free of cost. - -In this tutorial we will install Zabbix on an Ubuntu 16.04 server running MySQL, Apache and PHP. - -### Install the Zabbix Server - -First, we’ll need to install a few PHP modules required by Zabbix: - -``` -# apt-get install php7.0-bcmath php7.0-xml php7.0-mbstring -``` -The Zabbix package available in the Ubuntu repositories is outdated. Use the official Zabbix repository to install the latest stable version. - -Install the repository package by executing the following commands: - -``` -$ wget http://repo.zabbix.com/zabbix/3.2/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.2-1+xenial_all.deb -# dpkg -i zabbix-release_3.2-1+xenial_all.deb -``` - -Then update the `apt` packages source: - -``` -# apt-get update -``` -Now it’s possible to install Zabbix Server with MySQL support and the PHP front-end. Execute the command: -``` -# apt-get install zabbix-server-mysql zabbix-frontend-php -``` - -Install the Zabbix agent: - -``` -# apt-get install zabbix-agent -``` - -Zabbix is now installed. The next step is to configure a database for storing its data. - -### Configure MySQL for Zabbix - -We need to create a new MySQL database, in which Zabbix will store the collected data. - -Start the MySQL shell: - -``` -$ mysql -uroot -p -``` - -Next: - -``` -mysql> CREATE DATABASE zabbix CHARACTER SET utf8 COLLATE utf8_bin; -Query OK, 1 row affected (0.00 sec) - -mysql> GRANT ALL PRIVILEGES ON zabbix.* TO zabbix@localhost IDENTIFIED BY 'usr_strong_pwd'; -Query OK, 0 rows affected, 1 warning (0.00 sec) - -mysql> EXIT; -Bye -``` - -Next, import the initial schema and data. - -``` -# zcat /usr/share/doc/zabbix-server-mysql/create.sql.gz | mysql -uzabbix -p zabbix -``` - -Enter the password for the **zabbix** user created in the MySQL shell. - -Next, we need to edit the Zabbix Server configuration file, which is `/etc/zabbix/zabbis_server.conf`: - -``` -# $EDITOR /etc/zabbix/zabbix_server.conf -``` - -Search the `DBPassword` section of the file: - -``` -### Option: DBPassword -# Database password. Ignored for SQLite. -# Comment this line if no password is used. -# -# Mandatory: no -# Default: -# DBPassword= - -``` - -Uncomment the `DBPassword=` line and edit by adding the password created in MySQL: - -``` -DBPassword=usr_strong_pwd - -``` - -Next, look for the `DBHost=` line and uncomment it. - -Save and exit. - -### Configure PHP - -We need to configure PHP for working with Zabbix. During the installation process, the installer created a configuration file in `/etc/zabbix`, named `apache.conf`. Open this file: - -``` -# $EDITOR /etc/zabbix/apache.conf -``` - -Here, right now, it’s necessary only to uncomment the `date.timezone` setting and set the correct timezone: - -``` - - - php_value max_execution_time 300 - php_value memory_limit 128M - php_value post_max_size 16M - php_value upload_max_filesize 2M - php_value max_input_time 300 - php_value always_populate_raw_post_data -1 - php_value date.timezone Europe/Rome - - -``` - -Save and exit. - -At this point, restart Apache and start the Zabbix Server service, enabling it for starting at boot time: - -``` -# systemctl restart apache2 -# systemctl start zabbix-server -# systemctl enable zabbix-server -``` -Check the Zabbix status with `systemctl`: -``` -# systemctl status zabbix-server -``` - -This command should output: - -``` -â zabbix-server.service - Zabbix Server - Loaded: loaded (/lib/systemd/system/zabbix-server.service; enabled; vendor pr - Active: active (running) ... -``` - -At this point, the server-side part of Zabbix has been correctly installed and configured. - -### Configure Zabbix Web Fronted - -As mentioned in the introduction, Zabbix has a web-based front-end which we’ll use for visualizing collected data. However, this interface has to be configured. - -With a web browser, go to URL `http://localhost/zabbix`. - -![Zabbix monitoring server Frontend Setup](https://www.unixmen.com/wp-content/uploads/2017/06/snapshot1.png) - -Click on  _**Next step**_ - -![snapshot2](https://www.unixmen.com/wp-content/uploads/2017/06/snapshot2.png) - -Be sure that all the values are **Ok**, and then click on  _**Next step** _ again. - -![Zabbix MySQL configuration](https://www.unixmen.com/wp-content/uploads/2017/06/snapshot3.png) -Insert the MySQL **zabbix** user password, and then click on  _**Next step**_ . - -![Zabbix server details](https://www.unixmen.com/wp-content/uploads/2017/06/snapshot4.png) - -Click on  _**Next step**_ , and the installer will show the following page with all the configuration parameters. Check again to ensure that everything is correct.. - -![Zabbix pre-installation details](https://www.unixmen.com/wp-content/uploads/2017/06/snapshot5.png) - -![Zabbix installation finished](https://www.unixmen.com/wp-content/uploads/2017/06/snapshot6.png) - -Click **Next step** to proceed to the final screen. - -Click finish to complete the front-end installation. The default user name is **Admin** with **zabbix **as the password. - -### Getting Started with the Zabbix Server - -![Zabbix login interface](https://www.unixmen.com/wp-content/uploads/2017/06/snapshot7.png) - -After logging in with the above mentioned credentials, we will see the Zabbix dashboard: -![zabbix dashboard](https://www.unixmen.com/wp-content/uploads/2017/06/snapshot8.png) -Go on  _Administration -> Users_  for an overview about enabled accounts -![Zabbix users](https://www.unixmen.com/wp-content/uploads/2017/06/snapshot9.png) -Create a new account by clicking on  _**Create user**_ -![Zabbix User Creation](https://www.unixmen.com/wp-content/uploads/2017/06/snapshot10.png) -Click on **Add** in the **Groups** section and select one group -![snapshot11](https://www.unixmen.com/wp-content/uploads/2017/06/snapshot11.png) -Save the new user credentials, and it will appear in the  _Administration -> Users _ panel.**Note that in Zabbix access rights to hosts are assigned to user groups, not individual users.** - -### Conclusion - -This concludes the tutorial for the Zabbix Server installation. Now, the monitoring infrastructure is ready to do its job and collect data about servers that need to be added in the Zabbix configuration. - --------------------------------------------------------------------------------- - -via: https://www.unixmen.com/monitoring-server-install-zabbix-ubuntu-16-04/ - -作者:[Giuseppe Molica ][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://www.unixmen.com/author/tutan/ -[1]:https://www.unixmen.com/author/tutan/ -[2]:http://www.zabbix.com/ -[3]:https://www.unixmen.com/wp-content/uploads/2017/06/zabbix_logo.png diff --git a/translated/tech/20170705 Monitoring Server Install Zabbix on an Ubuntu 16.04 Server.md b/translated/tech/20170705 Monitoring Server Install Zabbix on an Ubuntu 16.04 Server.md new file mode 100644 index 0000000000..090d8b2289 --- /dev/null +++ b/translated/tech/20170705 Monitoring Server Install Zabbix on an Ubuntu 16.04 Server.md @@ -0,0 +1,225 @@ +监控服务器:在 Ubuntu 16.04 Server 上安装 Zabbix +============================================================ + + [![Zabbix logo](https://www.unixmen.com/wp-content/uploads/2017/06/zabbix_logo.png "zabbix_logo")][3] + +### 监控服务器 - 什么是 Zabbix + +[Zabbix][2] 是企业级开源分布式监控服务器解决方案。该软件能监控网络的不同参数以及服务器的完整性,还允许为任何事件配置基于电子邮件的警报。Zabbix 根据存储在数据库(例如 MySQL)中的数据提供报告和数据可视化功能。软件收集的每个测量可以通过基于 Web 的界面访问。 + + +Zabbix 根据 GNU 通用公共许可证版本 2(GPLv2)的条款发布,完全免费。 + +在本教程中,我们将在运行 MySQL、Apache 和 PHP 的 Ubuntu 16.04 server 上安装 Zabbix。 + +### 安装 Zabbix 服务器 + +首先,我们需要安装 Zabbix 所需的几个 PHP 模块: + +``` +# apt-get install php7.0-bcmath php7.0-xml php7.0-mbstring +``` +Ubuntu 仓库中提供的 Zabbix 软件包已经过时了。使用官方 Zabbix 仓库安装最新的稳定版本。 + +通过执行以下命令来安装仓库软件包: + +``` +$ wget http://repo.zabbix.com/zabbix/3.2/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.2-1+xenial_all.deb +# dpkg -i zabbix-release_3.2-1+xenial_all.deb +``` + +然后更新 `apt` 包源码: + +``` +# apt-get update +``` +现在可以安装带有 MySQL 支持和 PHP 前端的 Zabbix 服务器。执行命令: + +``` +# apt-get install zabbix-server-mysql zabbix-frontend-php +``` + +安装 Zabbix 代理: + +``` +# apt-get install zabbix-agent +``` + +Zabbix 现已安装。下一步是配置数据库来存储数据。 + +### 为 Zabbix 配置 MySQL + +我们需要创建一个新的 MySQL 数据库,Zabbix 将用来存储收集的数据。 + +启动 MySQL shell: + +``` +$ mysql -uroot -p +``` + +接下来: + +``` +mysql> CREATE DATABASE zabbix CHARACTER SET utf8 COLLATE utf8_bin; +Query OK, 1 row affected (0.00 sec) + +mysql> GRANT ALL PRIVILEGES ON zabbix.* TO zabbix@localhost IDENTIFIED BY 'usr_strong_pwd'; +Query OK, 0 rows affected, 1 warning (0.00 sec) + +mysql> EXIT; +Bye +``` + +接下来,导入初始表和数据。 + +``` +# zcat /usr/share/doc/zabbix-server-mysql/create.sql.gz | mysql -uzabbix -p zabbix +``` + +输入在 MySQL shell 中创建的 **zabbix** 用户的密码。 + +接下来,我们需要编辑 Zabbix 服务器配置文件,它是 `/etc/zabbix/zabbis_server.conf`: + +``` +# $EDITOR /etc/zabbix/zabbix_server.conf +``` + +搜索文件的 `DBPassword` 部分: + +``` +### Option: DBPassword +# Database password. Ignored for SQLite. +# Comment this line if no password is used. +# +# Mandatory: no +# Default: +# DBPassword= + +``` + +取消注释 `DBPassword=` 这行,并添加在 MySQL 中创建的密码: + +``` +DBPassword=usr_strong_pwd + +``` + +接下来,查找 `DBHost=` 这行并取消注释。 + +保存并退出。 + +### 配置 PHP + +我们需要配置 PHP 来使用 Zabbix。在安装过程中,安装程序在 `/etc/zabbix` 中创建了一个名为 `apache.conf` 的配置文件。打开此文件: + +``` +# $EDITOR /etc/zabbix/apache.conf +``` + +此时,只需要取消注释 `date.timezone` 并设置正确的时区: + +``` + + + php_value max_execution_time 300 + php_value memory_limit 128M + php_value post_max_size 16M + php_value upload_max_filesize 2M + php_value max_input_time 300 + php_value always_populate_raw_post_data -1 + php_value date.timezone Europe/Rome + + +``` + +保存并退出。 + +此时,重启 Apache 并启动 Zabbix Server 服务,使其能够在开机时启动: + +``` +# systemctl restart apache2 +# systemctl start zabbix-server +# systemctl enable zabbix-server +``` + +用 `systemctl` 检查 Zabbix 状态: + +``` +# systemctl status zabbix-server +``` + +这个命令应该输出: + +``` +â zabbix-server.service - Zabbix Server + Loaded: loaded (/lib/systemd/system/zabbix-server.service; enabled; vendor pr + Active: active (running) ... +``` + +此时,Zabbix 的服务器端已经正确安装和配置了。 + +### 配置 Zabbix Web 前端 + +如介绍中所述,Zabbix 有一个基于 Web 的前端,我们将用于可视化收集的数据。但是,必须配置此接口。 + +使用 Web 浏览器,进入 URL `http://localhost/zabbix`。 + +![Zabbix monitoring server Frontend Setup](https://www.unixmen.com/wp-content/uploads/2017/06/snapshot1.png) + +点击  _**Next step**_ + +![snapshot2](https://www.unixmen.com/wp-content/uploads/2017/06/snapshot2.png) + +确保所有的值都是 **Ok**,然后再次单击 _**Next step** _ 。 + +![Zabbix MySQL configuration](https://www.unixmen.com/wp-content/uploads/2017/06/snapshot3.png) +输入 MySQL **zabbix** 的用户密码,然后点击 _ **Next step** _。 + +![Zabbix server details](https://www.unixmen.com/wp-content/uploads/2017/06/snapshot4.png) + +单击 _**Next step**_ ,安装程序将显示具有所有配置参数的页面。再次检查以确保一切正确。 + +![Zabbix pre-installation details](https://www.unixmen.com/wp-content/uploads/2017/06/snapshot5.png) + +![Zabbix installation finished](https://www.unixmen.com/wp-content/uploads/2017/06/snapshot6.png) + +点击 **Next step** 进入最后一页。 + +点击完成以完成前端安装。默认用户名为 **Admin**,密码是 **zabbix**。 + +### Zabbix 服务器入门 + +![Zabbix login interface](https://www.unixmen.com/wp-content/uploads/2017/06/snapshot7.png) + +使用上述凭证登录后,我们将看到 Zabbix 面板: +![zabbix dashboard](https://www.unixmen.com/wp-content/uploads/2017/06/snapshot8.png) + +前往 _Administration -> Users_,了解已启用帐户的概况 +![Zabbix users](https://www.unixmen.com/wp-content/uploads/2017/06/snapshot9.png) + +通过点击 _**Create user**_ 创建一个新帐户。 +![Zabbix User Creation](https://www.unixmen.com/wp-content/uploads/2017/06/snapshot10.png) + +点击 **Groups** 中的 **Add**,然后选择一个组 +![snapshot11](https://www.unixmen.com/wp-content/uploads/2017/06/snapshot11.png) + +保存新用户凭证,它将显示在 _Administration -> Users_ 面板中。**请注意,在 Zabbix 中,主机的访问权限分配给用户组,而不是单个用户。** + +### 总结 + +我们结束了 Zabbix Server 安装的教程。现在,监控基础设施已准备好完成其工作并收集有关需要在 Zabbix 配置中添加的服务器的数据。 + +-------------------------------------------------------------------------------- + +via: https://www.unixmen.com/monitoring-server-install-zabbix-ubuntu-16-04/ + +作者:[Giuseppe Molica ][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://www.unixmen.com/author/tutan/ +[1]:https://www.unixmen.com/author/tutan/ +[2]:http://www.zabbix.com/ +[3]:https://www.unixmen.com/wp-content/uploads/2017/06/zabbix_logo.png From 8802523af450b5003f852b68644781f6c16defef Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 8 Aug 2017 08:45:13 +0800 Subject: [PATCH 047/125] translating --- ...ntegrate CentOS 7 to Samba4 AD from Commandline – Part 14.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20170714 Integrate CentOS 7 to Samba4 AD from Commandline – Part 14.md b/sources/tech/20170714 Integrate CentOS 7 to Samba4 AD from Commandline – Part 14.md index 29162628ac..9affa013ed 100644 --- a/sources/tech/20170714 Integrate CentOS 7 to Samba4 AD from Commandline – Part 14.md +++ b/sources/tech/20170714 Integrate CentOS 7 to Samba4 AD from Commandline – Part 14.md @@ -1,3 +1,5 @@ +translting----geekpi + Integrate CentOS 7 to Samba4 AD from Commandline – Part 14 ============================================================ From 730c3677ca27da373a1368de8171e994c1ca880f Mon Sep 17 00:00:00 2001 From: XYenChi <466530436@qq.com> Date: Tue, 8 Aug 2017 10:43:56 +0800 Subject: [PATCH 048/125] translated --- ...ers guide to collecting and mapping Twitter data using R.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) rename translated/{ => tech}/20170620 A beginners guide to collecting and mapping Twitter data using R.md (98%) diff --git a/translated/20170620 A beginners guide to collecting and mapping Twitter data using R.md b/translated/tech/20170620 A beginners guide to collecting and mapping Twitter data using R.md similarity index 98% rename from translated/20170620 A beginners guide to collecting and mapping Twitter data using R.md rename to translated/tech/20170620 A beginners guide to collecting and mapping Twitter data using R.md index a7d6c8e6cd..7239547e7c 100644 --- a/translated/20170620 A beginners guide to collecting and mapping Twitter data using R.md +++ b/translated/tech/20170620 A beginners guide to collecting and mapping Twitter data using R.md @@ -1,8 +1,7 @@ - 用 R 收集和映射推特数据的初学者向导 ============================================================ -### Learn to use R's twitteR and leaflet packages, which allow you to map the location of tweets on any topic. +### 学习使用 R's twitteR 和 leaflet 包, 你就可以把任何话题的推文定位画在地图上。 ![用 R 收集和映射推特数据的初学者向导](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/cloud-globe.png?itok=H4f-RAz_ "用 R 收集和映射推特数据的初学者向导") Image by :  From 966caf6c4c87cd98a5c9636c964f5b648484e2cc Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 8 Aug 2017 18:36:05 +0800 Subject: [PATCH 049/125] PRF&PUB:20170801 Deploy Kubernetes cluster for Linux containers.md @rieonke --- ...Kubernetes cluster for Linux containers.md | 47 +++++++++---------- 1 file changed, 21 insertions(+), 26 deletions(-) rename {translated/tech => published}/20170801 Deploy Kubernetes cluster for Linux containers.md (74%) diff --git a/translated/tech/20170801 Deploy Kubernetes cluster for Linux containers.md b/published/20170801 Deploy Kubernetes cluster for Linux containers.md similarity index 74% rename from translated/tech/20170801 Deploy Kubernetes cluster for Linux containers.md rename to published/20170801 Deploy Kubernetes cluster for Linux containers.md index 827449b302..43f16c816a 100644 --- a/translated/tech/20170801 Deploy Kubernetes cluster for Linux containers.md +++ b/published/20170801 Deploy Kubernetes cluster for Linux containers.md @@ -1,38 +1,38 @@ -Deploy Kubernetes cluster for Linux containers -部署Kubernetes 容器集群 +在 Azure 中部署 Kubernetes 容器集群 ============================================================ -在这个快速入门教程中,我们使用 Azure CLI 创建 Kubernetes 集群。 然后在集群上部署并运行由 Web 前端和 Redis 实例组成的多容器应用程序。 一旦部署完成,应用程序可以通过互联网访问。 +在这个快速入门教程中,我们使用 Azure CLI 创建一个 Kubernetes 集群,然后在集群上部署运行由 Web 前端和 Redis 实例组成的多容器应用程序。一旦部署完成,应用程序可以通过互联网访问。 + ![示例应用截图](https://docs.microsoft.com/en-us/azure/container-service/kubernetes/media/container-service-kubernetes-walkthrough/azure-vote.png) -这个快速入门教程假设你已经基本了解了Kubernetes 的概念,有关 Kubernetes 的详细信息,请参阅[ Kubernetes 文档][3]。 +这个快速入门教程假设你已经基本了解了 Kubernetes 的概念,有关 Kubernetes 的详细信息,请参阅 [Kubernetes 文档][3]。 -如果您没有 Azure 账号订阅,请在开始之前创建一个[免费帐户][4]。 +如果您没有 Azure 账号,请在开始之前创建一个[免费帐户][4]。 -### 登陆Azure 云控制台 +### 登录 Azure 云控制台 -Azure 云控制台是一个免费的 Bash shell ,你可以直接在 Azure 网站上运行。 它已经在你的账户中预先配置好了, 单击[ Azure 门户][5]右上角菜单上的 “Cloud Shell” 按钮; +Azure 云控制台是一个免费的 Bash shell,你可以直接在 Azure 网站上运行。它已经在你的账户中预先配置好了, 单击 [Azure 门户][5]右上角菜单上的 “Cloud Shell” 按钮; - [![Cloud Shell](https://docs.microsoft.com/en-us/azure/includes/media/cloud-shell-try-it/cloud-shell-menu.png)][6] +[![Cloud Shell](https://docs.microsoft.com/en-us/azure/includes/media/cloud-shell-try-it/cloud-shell-menu.png)][6] - 该按钮启动一个交互式 shell,您可以使用它来运行本教程中的所有操作步骤。 +该按钮会启动一个交互式 shell,您可以使用它来运行本教程中的所有操作步骤。 - [![ Cloud Shell 截图](https://docs.microsoft.com/en-us/azure/includes/media/cloud-shell-try-it/cloud-shell-safari.png)][7] +[![ Cloud Shell 截图](https://docs.microsoft.com/en-us/azure/includes/media/cloud-shell-try-it/cloud-shell-safari.png)][7] -此快速入门教程所用的 Azure CLI 的版本最低要求为 2.0.4 。如果您选择在本地安装和使用 CLI 工具,请运行 `az --version` 来检查已安装的版本。 如果您需要安装或升级请参阅[安装 Azure CLI 2.0 ][8]。 +此快速入门教程所用的 Azure CLI 的版本最低要求为 2.0.4。如果您选择在本地安装和使用 CLI 工具,请运行 `az --version` 来检查已安装的版本。 如果您需要安装或升级请参阅[安装 Azure CLI 2.0 ][8]。 ### 创建一个资源组 -使用 [az group create][9] 命令创建一个资源组,一个 Azure 资源组是 Azure 资源部署和管理的逻辑组。 +使用 [az group create][9] 命令创建一个资源组,一个 Azure 资源组是指 Azure 资源部署和管理的逻辑组。 -以下示例在 _eastus_ 位置中创建名为 _myResourceGroup_ 的资源组。 +以下示例在 _eastus_ 区域中创建名为 _myResourceGroup_ 的资源组。 ``` az group create --name myResourceGroup --location eastus ``` -输出: +输出: ``` @@ -53,23 +53,21 @@ az group create --name myResourceGroup --location eastus 使用 [az acs create][10] 命令在 Azure 容器服务中创建 Kubernetes 集群。 以下示例使用一个 Linux 主节点和三个 Linux 代理节点创建一个名为 _myK8sCluster_ 的集群。 -Azure CLICopyTry It ``` az acs create --orchestrator-type=kubernetes --resource-group myResourceGroup --name=myK8sCluster --generate-ssh-keys ``` -几分钟后,命令将完成并返回有关该集群的json格式的信息。 +几分钟后,命令将完成并返回有关该集群的 json 格式的信息。 ### 连接到 Kubernetes 集群 要管理 Kubernetes 群集,可以使用 Kubernetes 命令行工具 [kubectl][11]。 -如果您使用 Azure CloudShell ,则已经安装了 kubectl 。 如果要在本地安装,可以使用 [az acs kubernetes install-cli][12] 命令。 +如果您使用 Azure CloudShell ,则已经安装了 kubectl 。如果要在本地安装,可以使用 [az acs kubernetes install-cli][12] 命令。 要配置 kubectl 连接到您的 Kubernetes 群集,请运行 [az acs kubernetes get-credentials][13] 命令下载凭据并配置 Kubernetes CLI 以使用它们。 - ``` az acs kubernetes get-credentials --resource-group=myResourceGroup --name=myK8sCluster @@ -83,7 +81,7 @@ kubectl get nodes ``` -输出: +输出: ``` @@ -171,7 +169,7 @@ kubectl create -f azure-vote.yaml ``` -输出: +输出: ``` @@ -188,15 +186,13 @@ service "azure-vote-front" created 要监控这个进程,使用 [kubectl get service][17] 命令时加上 `--watch` 参数。 -Azure CLICopyTry It ``` kubectl get service azure-vote-front --watch ``` -Initially the EXTERNAL-IP for the  _azure-vote-front_  service appears as  _pending_ . Once the EXTERNAL-IP address has changed from  _pending_  to an  _IP address_ , use `CTRL-C` to stop the kubectl watch process. -最初,_azure-vote-front_ 服务的 EXTERNAL-IP 显示为 _pending_ 。 一旦 EXTERNAL-IP 地址从 _pending_ 变成一个具体的IP地址,请使用 “CTRL-C” 来停止 kubectl 监视进程。 +最初,_azure-vote-front_ 服务的 EXTERNAL-IP 显示为 _pending_ 。 一旦 EXTERNAL-IP 地址从 _pending_ 变成一个具体的 IP 地址,请使用 “CTRL-C” 来停止 kubectl 监视进程。 ``` azure-vote-front 10.0.34.242 80:30676/TCP 7s @@ -204,7 +200,6 @@ azure-vote-front 10.0.34.242 52.179.23.131 80:30676/TCP 2m ``` -You can now browse to the external IP address to see the Azure Vote App. 现在你可以通过这个外网 IP 地址访问到 Azure Vote 这个应用了。 ![浏览 Azure Vote 应用截图 ](https://docs.microsoft.com/en-us/azure/container-service/kubernetes/media/container-service-kubernetes-walkthrough/azure-vote.png) @@ -234,9 +229,9 @@ az group delete --name myResourceGroup --yes --no-wait via: https://docs.microsoft.com/en-us/azure/container-service/kubernetes/container-service-kubernetes-walkthrough -作者:[neilpeterson ][a],[mmacy][b] +作者:[neilpeterson][a],[mmacy][b] 译者:[rieonke](https://github.com/rieonke) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 85fbb5cc2e5616561a52b53e639ad569604c4a59 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 8 Aug 2017 18:47:06 +0800 Subject: [PATCH 050/125] PRF&PUB:20170705 Monitoring Server Install Zabbix on an Ubuntu 16.04 Server.md @geekpi --- ...nstall Zabbix on an Ubuntu 16.04 Server.md | 36 +++++++++++-------- 1 file changed, 22 insertions(+), 14 deletions(-) rename {translated/tech => published}/20170705 Monitoring Server Install Zabbix on an Ubuntu 16.04 Server.md (87%) diff --git a/translated/tech/20170705 Monitoring Server Install Zabbix on an Ubuntu 16.04 Server.md b/published/20170705 Monitoring Server Install Zabbix on an Ubuntu 16.04 Server.md similarity index 87% rename from translated/tech/20170705 Monitoring Server Install Zabbix on an Ubuntu 16.04 Server.md rename to published/20170705 Monitoring Server Install Zabbix on an Ubuntu 16.04 Server.md index 090d8b2289..7add8b0583 100644 --- a/translated/tech/20170705 Monitoring Server Install Zabbix on an Ubuntu 16.04 Server.md +++ b/published/20170705 Monitoring Server Install Zabbix on an Ubuntu 16.04 Server.md @@ -1,12 +1,11 @@ -监控服务器:在 Ubuntu 16.04 Server 上安装 Zabbix +在 Ubuntu 16.04 Server 上安装 Zabbix ============================================================ [![Zabbix logo](https://www.unixmen.com/wp-content/uploads/2017/06/zabbix_logo.png "zabbix_logo")][3] ### 监控服务器 - 什么是 Zabbix -[Zabbix][2] 是企业级开源分布式监控服务器解决方案。该软件能监控网络的不同参数以及服务器的完整性,还允许为任何事件配置基于电子邮件的警报。Zabbix 根据存储在数据库(例如 MySQL)中的数据提供报告和数据可视化功能。软件收集的每个测量可以通过基于 Web 的界面访问。 - +[Zabbix][2] 是企业级开源分布式监控服务器解决方案。该软件能监控网络的不同参数以及服务器的完整性,还允许为任何事件配置基于电子邮件的警报。Zabbix 根据存储在数据库(例如 MySQL)中的数据提供报告和数据可视化功能。软件收集的每个测量指标都可以通过基于 Web 的界面访问。 Zabbix 根据 GNU 通用公共许可证版本 2(GPLv2)的条款发布,完全免费。 @@ -19,6 +18,7 @@ Zabbix 根据 GNU 通用公共许可证版本 2(GPLv2)的条款发布,完 ``` # apt-get install php7.0-bcmath php7.0-xml php7.0-mbstring ``` + Ubuntu 仓库中提供的 Zabbix 软件包已经过时了。使用官方 Zabbix 仓库安装最新的稳定版本。 通过执行以下命令来安装仓库软件包: @@ -28,11 +28,12 @@ $ wget http://repo.zabbix.com/zabbix/3.2/ubuntu/pool/main/z/zabbix-release/zabbi # dpkg -i zabbix-release_3.2-1+xenial_all.deb ``` -然后更新 `apt` 包源码: +然后更新 `apt` 包源: ``` # apt-get update ``` + 现在可以安装带有 MySQL 支持和 PHP 前端的 Zabbix 服务器。执行命令: ``` @@ -166,18 +167,19 @@ DBPassword=usr_strong_pwd ![Zabbix monitoring server Frontend Setup](https://www.unixmen.com/wp-content/uploads/2017/06/snapshot1.png) -点击  _**Next step**_ +点击  **Next step** ![snapshot2](https://www.unixmen.com/wp-content/uploads/2017/06/snapshot2.png) -确保所有的值都是 **Ok**,然后再次单击 _**Next step** _ 。 +确保所有的值都是 **Ok**,然后再次单击 **Next step** 。 ![Zabbix MySQL configuration](https://www.unixmen.com/wp-content/uploads/2017/06/snapshot3.png) -输入 MySQL **zabbix** 的用户密码,然后点击 _ **Next step** _。 + +输入 MySQL **zabbix** 的用户密码,然后点击 **Next step**。 ![Zabbix server details](https://www.unixmen.com/wp-content/uploads/2017/06/snapshot4.png) -单击 _**Next step**_ ,安装程序将显示具有所有配置参数的页面。再次检查以确保一切正确。 +单击 **Next step** ,安装程序将显示具有所有配置参数的页面。再次检查以确保一切正确。 ![Zabbix pre-installation details](https://www.unixmen.com/wp-content/uploads/2017/06/snapshot5.png) @@ -192,18 +194,24 @@ DBPassword=usr_strong_pwd ![Zabbix login interface](https://www.unixmen.com/wp-content/uploads/2017/06/snapshot7.png) 使用上述凭证登录后,我们将看到 Zabbix 面板: + ![zabbix dashboard](https://www.unixmen.com/wp-content/uploads/2017/06/snapshot8.png) -前往 _Administration -> Users_,了解已启用帐户的概况 +前往 **Administration -> Users**,了解已启用帐户的概况: + ![Zabbix users](https://www.unixmen.com/wp-content/uploads/2017/06/snapshot9.png) -通过点击 _**Create user**_ 创建一个新帐户。 +通过点击 **Create user** 创建一个新帐户。 + ![Zabbix User Creation](https://www.unixmen.com/wp-content/uploads/2017/06/snapshot10.png) -点击 **Groups** 中的 **Add**,然后选择一个组 +点击 **Groups** 中的 **Add**,然后选择一个组: + ![snapshot11](https://www.unixmen.com/wp-content/uploads/2017/06/snapshot11.png) -保存新用户凭证,它将显示在 _Administration -> Users_ 面板中。**请注意,在 Zabbix 中,主机的访问权限分配给用户组,而不是单个用户。** +保存新用户凭证,它将显示在 **Administration -> Users** 面板中。 + +**请注意,在 Zabbix 中,主机的访问权限分配给用户组,而不是单个用户。** ### 总结 @@ -213,9 +221,9 @@ DBPassword=usr_strong_pwd via: https://www.unixmen.com/monitoring-server-install-zabbix-ubuntu-16-04/ -作者:[Giuseppe Molica ][a] +作者:[Giuseppe Molica][a] 译者:[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/) 荣誉推出 From 4609fcaf05aa538c70baa2ee9774942f16e62d49 Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 9 Aug 2017 08:26:03 +0800 Subject: [PATCH 051/125] translated --- ...to Samba4 AD from Commandline – Part 14.md | 299 ------------------ ...to Samba4 AD from Commandline – Part 14.md | 297 +++++++++++++++++ 2 files changed, 297 insertions(+), 299 deletions(-) delete mode 100644 sources/tech/20170714 Integrate CentOS 7 to Samba4 AD from Commandline – Part 14.md create mode 100644 translated/tech/20170714 Integrate CentOS 7 to Samba4 AD from Commandline – Part 14.md diff --git a/sources/tech/20170714 Integrate CentOS 7 to Samba4 AD from Commandline – Part 14.md b/sources/tech/20170714 Integrate CentOS 7 to Samba4 AD from Commandline – Part 14.md deleted file mode 100644 index 9affa013ed..0000000000 --- a/sources/tech/20170714 Integrate CentOS 7 to Samba4 AD from Commandline – Part 14.md +++ /dev/null @@ -1,299 +0,0 @@ -translting----geekpi - -Integrate CentOS 7 to Samba4 AD from Commandline – Part 14 -============================================================ - -This guide will show you how you can integrate a CentOS 7 Server with no Graphical User Interface to [Samba4 Active Directory Domain Controller][3] from command line using Authconfig software. - -This type of setup provides a single centralized account database held by Samba and allows the AD users to authenticate to CentOS server across the network infrastructure. - -#### Requirements - -1. [Create an Active Directory Infrastructure with Samba4 on Ubuntu][1] - -2. [CentOS 7.3 Installation Guide][2] - -### Step 1: Configure CentOS for Samba4 AD DC - -1. Before starting to join CentOS 7 Server into a Samba4 DC you need to assure that the network interface is properly configured to query domain via DNS service. - -Run [ip address][4] command to list your machine network interfaces and choose the specific NIC to edit by issuing nmtui-edit command against the interface name, such as ens33 in this example, as illustrated below. - -``` -# ip address -# nmtui-edit ens33 -``` - [![List Network Interfaces](https://www.tecmint.com/wp-content/uploads/2017/07/List-Network-Interfaces.jpg)][5] - -List Network Interfaces - -2. Once the network interface is opened for editing, add the static IPv4 configurations best suited for your LAN and make sure you setup Samba AD Domain Controllers IP addresses for the DNS servers. - -Also, append the name of your domain in search domains filed and navigate to OK button using [TAB] key to apply changes. - -The search domains filed assures that the domain counterpart is automatically appended by DNS resolution (FQDN) when you use only a short name for a domain DNS record. - - [![Configure Network Interface](https://www.tecmint.com/wp-content/uploads/2017/07/Configure-Network-Interface.png)][6] - -Configure Network Interface - -3. Finally, restart the network daemon to apply changes and test if DNS resolution is properly configured by issuing series of ping commands against the domain name and domain controllers short names as shown below. - -``` -# systemctl restart network.service -# ping -c2 tecmint.lan -# ping -c2 adc1 -# ping -c2 adc2 -``` - [![Verify DNS Resolution on Domain](https://www.tecmint.com/wp-content/uploads/2017/07/Verify-DNS-Resolution-on-Domain.png)][7] - -Verify DNS Resolution on Domain - -4. Also, configure your machine hostname and reboot the machine to properly apply the settings by issuing the following commands. - -``` -# hostnamectl set-hostname your_hostname -# init 6 -``` - -Verify if hostname was correctly applied with the below commands. - -``` -# cat /etc/hostname -# hostname -``` - -5. Finally, sync local time with Samba4 AD DC by issuing the below commands with root privileges. - -``` -# yum install ntpdate -# ntpdate domain.tld -``` - [![Sync Time with Samba4 AD DC](https://www.tecmint.com/wp-content/uploads/2017/07/Sync-Time-with-Samba4-AD-DC.png)][8] - -Sync Time with Samba4 AD DC - -### Step 2: Join CentOS 7 Server to Samba4 AD DC - -6. To join CentOS 7 server to Samba4 Active Directory, first install the following packages on your machine from an account with root privileges. - -``` -# yum install authconfig samba-winbind samba-client samba-winbind-clients -``` - -7. In order to integrate CentOS 7 server to a domain controller run authconfig-tui graphical utility with root privileges and use the below configurations as described below. - -``` -# authconfig-tui -``` - -At the first prompt screen choose: - -* On User Information: - * Use Winbind - -* On Authentication tab select by pressing [Space] key: - * Use Shadow Password - - * Use Winbind Authentication - - * Local authorization is sufficient - - [![Authentication Configuration](https://www.tecmint.com/wp-content/uploads/2017/07/Authentication-Configuration.png)][9] - -Authentication Configuration - -8. Hit Next to continue to the Winbind Settings screen and configure as illustrated below: - -* Security Model: ads - -* Domain = YOUR_DOMAIN (use upper case) - -* Domain Controllers = domain machines FQDN (comma separated if more than one) - -* ADS Realm = YOUR_DOMAIN.TLD - -* Template Shell = /bin/bash - - [![Winbind Settings](https://www.tecmint.com/wp-content/uploads/2017/07/Winbind-Settings.png)][10] - -Winbind Settings - -9. To perform domain joining navigate to Join Domain button using [tab] key and hit [Enter] key to join domain. - -At the next screen prompt, add the credentials for a Samba4 AD account with elevated privileges to perform the machine account joining into AD and hit OK to apply settings and close the prompt. - -Be aware that when you type the user password, the credentials won’t be shown in the password screen. On the remaining screen hit OK again to finish domain integration for CentOS 7 machine. - - [![Join Domain to Samba4 AD DC](https://www.tecmint.com/wp-content/uploads/2017/07/Join-Domain-to-Samba4-AD-DC.png)][11] - -Join Domain to Samba4 AD DC - - [![Confirm Winbind Settings](https://www.tecmint.com/wp-content/uploads/2017/07/Confirm-Winbind-Settings.png)][12] - -Confirm Winbind Settings - -To force adding a machine into a specific Samba AD Organizational Unit, get your machine exact name using hostname command and create a new Computer object in that OU with the name of your machine. - -The best way to add a new object into a Samba4 AD is by using ADUC tool from a Windows machine integrated into the domain with [RSAT tools installed][13] on it. - -Important: An alternate method of joining a domain is by using authconfig command line which offers extensive control over the integration process. - -However, this method is prone to errors do to its numerous parameters as illustrated on the below command excerpt. The command must be typed into a single long line. - -``` -# authconfig --enablewinbind --enablewinbindauth --smbsecurity ads --smbworkgroup=YOUR_DOMAIN --smbrealm YOUR_DOMAIN.TLD --smbservers=adc1.yourdomain.tld --krb5realm=YOUR_DOMAIN.TLD --enablewinbindoffline --enablewinbindkrb5 --winbindtemplateshell=/bin/bash--winbindjoin=domain_admin_user --update --enablelocauthorize --savebackup=/backups -``` - -10. After the machine has been joined to domain, verify if winbind service is up and running by issuing the below command. - -``` -# systemctl status winbind.service -``` - -11. Then, check if CentOS machine object has been successfully created in Samba4 AD. Use AD Users and Computers tool from a Windows machine with RSAT tools installed and navigate to your domain Computers container. A new AD computer account object with name of your CentOS 7 server should be listed in the right plane. - -12. Finally, tweak the configuration by opening samba main configuration file (/etc/samba/smb.conf) with a text editor and append the below lines at the end of the [global]configuration block as illustrated below: - -``` -winbind use default domain = true -winbind offline logon = true -``` - [![Configure Samba](https://www.tecmint.com/wp-content/uploads/2017/07/Configure-Samba.jpg)][14] - -Configure Samba - -13. In order to create local homes on the machine for AD accounts at their first logon run the below command. - -``` -# authconfig --enablemkhomedir --update -``` - -14. Finally, restart Samba daemon to reflect changes and verify domain joining by performing a logon on the server with an AD account. The home directory for the AD account should be automatically created. - -``` -# systemctl restart winbind -# su - domain_account -``` - [![Verify Domain Joining](https://www.tecmint.com/wp-content/uploads/2017/07/Verify-Domain-Joining.jpg)][15] - -Verify Domain Joining - -15. List the domain users or domain groups by issuing one of the following commands. - -``` -# wbinfo -u -# wbinfo -g -``` - [![List Domain Users and Groups](https://www.tecmint.com/wp-content/uploads/2017/07/List-Domain-Users-and-Groups.png)][16] - -List Domain Users and Groups - -16. To get info about a domain user run the below command. - -``` -# wbinfo -i domain_user -``` - [![List Domain User Info](https://www.tecmint.com/wp-content/uploads/2017/07/List-Domain-User-Info.jpg)][17] - -List Domain User Info - -17. To display summary domain info issue the following command. - -``` -# net ads info -``` - [![List Domain Summary](https://www.tecmint.com/wp-content/uploads/2017/07/List-Domain-Summary.jpg)][18] - -List Domain Summary - -### Step 3: Login to CentOS with a Samba4 AD DC Account - -18. To authenticate with a domain user in CentOS, use one of the following command line syntaxes. - -``` -# su - ‘domain\domain_user’ -# su - domain\\domain_user -``` - -Or use the below syntax in case winbind use default domain = true parameter is set to samba configuration file. - -``` -# su - domain_user -# su - domain_user@domain.tld -``` - -19. In order to add root privileges for a domain user or group, edit sudoers file using visudocommand and add the following lines as illustrated on the below screenshot. - -``` -YOUR_DOMAIN\\domain_username ALL=(ALL:ALL) ALL #For domain users -%YOUR_DOMAIN\\your_domain\ group ALL=(ALL:ALL) ALL #For domain groups -``` - -Or use the below excerpt in case winbind use default domain = true parameter is set to samba configuration file. - -``` -domain_username ALL=(ALL:ALL) ALL #For domain users -%your_domain\ group ALL=(ALL:ALL) ALL #For domain groups -``` - [![Grant Root Privileges on Domain Users](https://www.tecmint.com/wp-content/uploads/2017/07/Grant-Root-Privileges-on-Domain-Users.jpg)][19] - -Grant Root Privileges on Domain Users - -20. The following series of commands against a Samba4 AD DC can also be useful for troubleshooting purposes: - -``` -# wbinfo -p #Ping domain -# wbinfo -n domain_account #Get the SID of a domain account -# wbinfo -t #Check trust relationship -``` - -21. To leave the domain run the following command against your domain name using a domain account with elevated privileges. After the machine account has been removed from the AD, reboot the machine to revert changes before the integration process. - -``` -# net ads leave -w DOMAIN -U domain_admin -# init 6 -``` - -That’s all! Although this procedure is mainly focused on joining a CentOS 7 server to a Samba4 AD DC, the same steps described here are also valid for integrating a CentOS server into a Microsoft Windows Server 2012 Active Directory. - --------------------------------------------------------------------------------- - -作者简介: - -Matei Cezar -I'am a computer addicted guy, a fan of open source and linux based system software, have about 4 years experience with Linux distributions desktop, servers and bash scripting. - ------------------- - -via: https://www.tecmint.com/integrate-centos-7-to-samba4-active-directory/ - -作者:[Matei Cezar ][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://www.tecmint.com/author/cezarmatei/ -[1]:https://www.tecmint.com/install-samba4-active-directory-ubuntu/ -[2]:https://www.tecmint.com/centos-7-3-installation-guide/ -[3]:https://www.tecmint.com/install-samba4-active-directory-ubuntu/ -[4]:https://www.tecmint.com/ip-command-examples/ -[5]:https://www.tecmint.com/wp-content/uploads/2017/07/List-Network-Interfaces.jpg -[6]:https://www.tecmint.com/wp-content/uploads/2017/07/Configure-Network-Interface.png -[7]:https://www.tecmint.com/wp-content/uploads/2017/07/Verify-DNS-Resolution-on-Domain.png -[8]:https://www.tecmint.com/wp-content/uploads/2017/07/Sync-Time-with-Samba4-AD-DC.png -[9]:https://www.tecmint.com/wp-content/uploads/2017/07/Authentication-Configuration.png -[10]:https://www.tecmint.com/wp-content/uploads/2017/07/Winbind-Settings.png -[11]:https://www.tecmint.com/wp-content/uploads/2017/07/Join-Domain-to-Samba4-AD-DC.png -[12]:https://www.tecmint.com/wp-content/uploads/2017/07/Confirm-Winbind-Settings.png -[13]:https://www.tecmint.com/manage-samba4-ad-from-windows-via-rsat/ -[14]:https://www.tecmint.com/wp-content/uploads/2017/07/Configure-Samba.jpg -[15]:https://www.tecmint.com/wp-content/uploads/2017/07/Verify-Domain-Joining.jpg -[16]:https://www.tecmint.com/wp-content/uploads/2017/07/List-Domain-Users-and-Groups.png -[17]:https://www.tecmint.com/wp-content/uploads/2017/07/List-Domain-User-Info.jpg -[18]:https://www.tecmint.com/wp-content/uploads/2017/07/List-Domain-Summary.jpg -[19]:https://www.tecmint.com/wp-content/uploads/2017/07/Grant-Root-Privileges-on-Domain-Users.jpg -[20]:https://www.tecmint.com/author/cezarmatei/ -[21]:https://www.tecmint.com/10-useful-free-linux-ebooks-for-newbies-and-administrators/ -[22]:https://www.tecmint.com/free-linux-shell-scripting-books/ diff --git a/translated/tech/20170714 Integrate CentOS 7 to Samba4 AD from Commandline – Part 14.md b/translated/tech/20170714 Integrate CentOS 7 to Samba4 AD from Commandline – Part 14.md new file mode 100644 index 0000000000..3c8c3e581a --- /dev/null +++ b/translated/tech/20170714 Integrate CentOS 7 to Samba4 AD from Commandline – Part 14.md @@ -0,0 +1,297 @@ +Samba 系列(十四):在命令行中将 CentOS 7 与 Samba4 AD 集成 +============================================================ + +本指南将向你介绍如何使用 Authconfig 在命令行中将无图形界面的 CentOS 7 服务器集成到[ Samba4 AD 域控制器][3]中。 + +这类设置提供了由 Samba 持有的单一集中式帐户数据库,允许 AD 用户通过网络基础设施对 CentOS 服务器进行身份验证。 + +#### 要求 + +1. [在 Ubuntu 上使用 Samba4 创建 AD 基础架构][1] + +2. [CentOS 7.3 安装指南][2] + +### 步骤 1:为 Samba4 AD DC 配置 CentOS + +1. 在开始将 CentOS 7 服务器加入 Samba4 DC 之前,你需要确保网络接口被正确配置为通过 DNS 服务查询域。 + +运行 [ip address][4] 命令列出你机器网络接口,选择要编辑的特定网卡,通过针对接口名称运行 nmtui-edit 命令(如本例中的 ens33),如下所示。 + +``` +# ip address +# nmtui-edit ens33 +``` + [![List Network Interfaces](https://www.tecmint.com/wp-content/uploads/2017/07/List-Network-Interfaces.jpg)][5] + +列出网络接口 + +2. 打开网络接口进行编辑后,添加最适合 LAN 的静态 IPv4 配置,并确保为 DNS 服务器设置 Samba AD 域控制器 IP 地址。 + +另外,在搜索域中追加你的域的名称,并使用 [TAB] 键跳到确定按钮来应用更改。 + +当你仅对域 dns 记录使用短名称时, 已提交的搜索域保证域对应项会自动追加到 dns 解析 (FQDN) 中。 + + [![Configure Network Interface](https://www.tecmint.com/wp-content/uploads/2017/07/Configure-Network-Interface.png)][6] + +配置网络接口 + +3.最后,重启网络守护进程以应用更改,并通过对域名和域控制器 ping 来测试 DNS 解析是否正确配置,如下所示。 + +``` +# systemctl restart network.service +# ping -c2 tecmint.lan +# ping -c2 adc1 +# ping -c2 adc2 +``` + [![Verify DNS Resolution on Domain](https://www.tecmint.com/wp-content/uploads/2017/07/Verify-DNS-Resolution-on-Domain.png)][7] + +验证域上的 DNS 解析 + +4. 另外,使用下面的命令配置你的计算机主机名并重启机器应用更改。 + +``` +# hostnamectl set-hostname your_hostname +# init 6 +``` + +使用以下命令验证主机名是否正确配置。 + +``` +# cat /etc/hostname +# hostname +``` + +5. 最后,使用 root 权限运行以下命令,与 Samba4 AD DC 同步本地时间。 + +``` +# yum install ntpdate +# ntpdate domain.tld +``` + [![Sync Time with Samba4 AD DC](https://www.tecmint.com/wp-content/uploads/2017/07/Sync-Time-with-Samba4-AD-DC.png)][8] + +与 Samba4 AD DC 同步时间 + +### 步骤 2:将 CentOS 7 服务器加入到 Samba4 AD DC + +6. 要将 CentOS 7 服务器加入到 Samba4 AD 中,请先用具有 root 权限的帐户在计算机上安装以下软件包。 + +``` +# yum install authconfig samba-winbind samba-client samba-winbind-clients +``` + +7. 为了将 CentOS 7 服务器与域控制器集成,可以使用 root 权限运行 authconfig-tui,并使用下面的配置。 + +``` +# authconfig-tui +``` + +首屏选择: + +* 在 User Information 中: + * Use Winbind + +* 在 Authentication 中使用[空格键]选择: + * Use Shadow Password + + * Use Winbind Authentication + + * Local authorization is sufficient + + [![Authentication Configuration](https://www.tecmint.com/wp-content/uploads/2017/07/Authentication-Configuration.png)][9] + +验证配置 + +8. 点击 Next 进入 Winbind 设置界面并配置如下: + +* Security Model: ads + +* Domain = YOUR_DOMAIN (use upper case) + +* Domain Controllers = domain machines FQDN (comma separated if more than one) + +* ADS Realm = YOUR_DOMAIN.TLD + +* Template Shell = /bin/bash + + [![Winbind Settings](https://www.tecmint.com/wp-content/uploads/2017/07/Winbind-Settings.png)][10] + +Winbind 设置 + +9. 要加入域,使用 [tab] 键跳到 “Join Domain” 按钮,然后按[回车]键加入域。 + +在下一个页面,添加具有提升权限的 Samba4 AD 帐户的凭据,以将计算机帐户加入 AD,然后单击 “OK” 应用设置并关闭提示。 + +请注意,当你输入用户密码时,凭据将不会显示在屏幕中。在下面再次点击 OK,完成 CentOS 7 的域集成。 + + [![Join Domain to Samba4 AD DC](https://www.tecmint.com/wp-content/uploads/2017/07/Join-Domain-to-Samba4-AD-DC.png)][11] + +加入域到 Samba4 AD DC + + [![Confirm Winbind Settings](https://www.tecmint.com/wp-content/uploads/2017/07/Confirm-Winbind-Settings.png)][12] + +确认 Winbind 设置 + +要强制将机器添加到特定的 Samba AD OU 中,请使用 hostname 命令获取计算机的完整名称,并使用机器名称在该 OU 中创建一个新的计算机对象。 + +将新对象添加到 Samba4 AD 中的最佳方法是已经集成到[安装了 RSAT 工具][13]的域的 Wubdows 机器上使用 ADUC 工具。 + +重要:加入域的另一种方法是使用 authconfig 命令行,它可以对集成过程进行广泛的控制。 + +但是,这种方法很容易因为其众多参数造成错误,如下所示。该命令必须输入一条长命令行。 + +``` +# authconfig --enablewinbind --enablewinbindauth --smbsecurity ads --smbworkgroup=YOUR_DOMAIN --smbrealm YOUR_DOMAIN.TLD --smbservers=adc1.yourdomain.tld --krb5realm=YOUR_DOMAIN.TLD --enablewinbindoffline --enablewinbindkrb5 --winbindtemplateshell=/bin/bash--winbindjoin=domain_admin_user --update --enablelocauthorize --savebackup=/backups +``` + +10. 机器加入域后,通过使用以下命令验证 winbind 服务是否正常运行。 + +``` +# systemctl status winbind.service +``` + +11. 接着检查是否在 Samba4 AD 中成功创建了 CentOS 机器对象。从安装了 RSAT 工具的 Windows 机器使用 AD 用户和计算机工具,并进入到你的域计算机容器。一个名为 CentOS 7 Server 的新 AD 计算机帐户对象应该在右边的列表中。 + +12. 最后,使用文本编辑器打开 samba 主配置文件(/etc/samba/smb.conf)来调整配置,并在 [global] 配置块的末尾附加以下行,如下所示: + +``` +winbind use default domain = true +winbind offline logon = true +``` + [![Configure Samba](https://www.tecmint.com/wp-content/uploads/2017/07/Configure-Samba.jpg)][14] + +配置 Samba + +13. 为了在 AD 帐户首次登录时在机器上创建本地家目录,请运行以下命令 + +``` +# authconfig --enablemkhomedir --update +``` + +14. 最后,重启 Samba 守护进程使更改生效,并使用一个 AD 账户登陆验证域加入。AD 帐户的家目录应该会自动创建。 + +``` +# systemctl restart winbind +# su - domain_account +``` + [![Verify Domain Joining](https://www.tecmint.com/wp-content/uploads/2017/07/Verify-Domain-Joining.jpg)][15] + +验证域加入 + +15. 通过以下命令之一列出域用户或域组。 + +``` +# wbinfo -u +# wbinfo -g +``` + [![List Domain Users and Groups](https://www.tecmint.com/wp-content/uploads/2017/07/List-Domain-Users-and-Groups.png)][16] + +列出域用户和组 + +16. 要获取有关域用户的信息,请运行以下命令。 + +``` +# wbinfo -i domain_user +``` + [![List Domain User Info](https://www.tecmint.com/wp-content/uploads/2017/07/List-Domain-User-Info.jpg)][17] + +列出域用户信息 + +17. 要显示域摘要信息,请使用以下命令。 + +``` +# net ads info +``` + [![List Domain Summary](https://www.tecmint.com/wp-content/uploads/2017/07/List-Domain-Summary.jpg)][18] + +列出域摘要 + +### 步骤 3:使用 Samba4 AD DC 帐号登录CentOS + +18. 要在 CentOS 中与域用户进行身份验证,请使用以下命令语法之一。 + +``` +# su - ‘domain\domain_user’ +# su - domain\\domain_user +``` + +或者使用下面的语法来防止 winbind 使用 default domain = true 参数来设置 samba 配置文件。 + +``` +# su - domain_user +# su - domain_user@domain.tld +``` + +19. 要为域用户或组添加 root 权限,请使用 visudocommand 编辑 sudoers 文件,并添加以下截图所示的行。 + +``` +YOUR_DOMAIN\\domain_username ALL=(ALL:ALL) ALL #For domain users +%YOUR_DOMAIN\\your_domain\ group ALL=(ALL:ALL) ALL #For domain groups +``` + +如果 winbind 使用 default domain = true 参数设置 samba 配置文件,那么使用下面的配置。 + +``` +domain_username ALL=(ALL:ALL) ALL #For domain users +%your_domain\ group ALL=(ALL:ALL) ALL #For domain groups +``` + [![Grant Root Privileges on Domain Users](https://www.tecmint.com/wp-content/uploads/2017/07/Grant-Root-Privileges-on-Domain-Users.jpg)][19] + +授予域用户 root 权限 + +20. 针对 Samba4 AD DC 的以下一系列命令也可用于故障排除: + +``` +# wbinfo -p #Ping domain +# wbinfo -n domain_account #Get the SID of a domain account +# wbinfo -t #Check trust relationship +``` + +21. 要离开该域, 请使用具有提升权限的域帐户对你的域名运行以下命令。从 AD 中删除计算机帐户后, 重启计算机以在集成进程之前还原更改。 + +``` +# net ads leave -w DOMAIN -U domain_admin +# init 6 +``` + +就是这样了!尽管此过程主要集中在将 CentOS 7 服务器加入到 Samba4 AD DC 中,但这里描述的相同步骤也适用于将 CentOS 服务器集成到 Microsoft Windows Server 2012 AD 中。 + +-------------------------------------------------------------------------------- + +作者简介: + +Matei Cezar +我是一个电脑上瘾的家伙,开源和基于 linux 的系统软件的粉丝,在 Linux 发行版桌面、服务器和 bash 脚本方面拥有大约 4 年的经验。 + +------------------ + +via: https://www.tecmint.com/integrate-centos-7-to-samba4-active-directory/ + +作者:[Matei Cezar ][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://www.tecmint.com/author/cezarmatei/ +[1]:https://www.tecmint.com/install-samba4-active-directory-ubuntu/ +[2]:https://www.tecmint.com/centos-7-3-installation-guide/ +[3]:https://www.tecmint.com/install-samba4-active-directory-ubuntu/ +[4]:https://www.tecmint.com/ip-command-examples/ +[5]:https://www.tecmint.com/wp-content/uploads/2017/07/List-Network-Interfaces.jpg +[6]:https://www.tecmint.com/wp-content/uploads/2017/07/Configure-Network-Interface.png +[7]:https://www.tecmint.com/wp-content/uploads/2017/07/Verify-DNS-Resolution-on-Domain.png +[8]:https://www.tecmint.com/wp-content/uploads/2017/07/Sync-Time-with-Samba4-AD-DC.png +[9]:https://www.tecmint.com/wp-content/uploads/2017/07/Authentication-Configuration.png +[10]:https://www.tecmint.com/wp-content/uploads/2017/07/Winbind-Settings.png +[11]:https://www.tecmint.com/wp-content/uploads/2017/07/Join-Domain-to-Samba4-AD-DC.png +[12]:https://www.tecmint.com/wp-content/uploads/2017/07/Confirm-Winbind-Settings.png +[13]:https://www.tecmint.com/manage-samba4-ad-from-windows-via-rsat/ +[14]:https://www.tecmint.com/wp-content/uploads/2017/07/Configure-Samba.jpg +[15]:https://www.tecmint.com/wp-content/uploads/2017/07/Verify-Domain-Joining.jpg +[16]:https://www.tecmint.com/wp-content/uploads/2017/07/List-Domain-Users-and-Groups.png +[17]:https://www.tecmint.com/wp-content/uploads/2017/07/List-Domain-User-Info.jpg +[18]:https://www.tecmint.com/wp-content/uploads/2017/07/List-Domain-Summary.jpg +[19]:https://www.tecmint.com/wp-content/uploads/2017/07/Grant-Root-Privileges-on-Domain-Users.jpg +[20]:https://www.tecmint.com/author/cezarmatei/ +[21]:https://www.tecmint.com/10-useful-free-linux-ebooks-for-newbies-and-administrators/ +[22]:https://www.tecmint.com/free-linux-shell-scripting-books/ From 1f27925a39a167e91e345a5bfb41db8e0e81998a Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 9 Aug 2017 08:31:29 +0800 Subject: [PATCH 052/125] translating --- ...8 How modelling helps you avoid getting a stuck OpenStack.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20170718 How modelling helps you avoid getting a stuck OpenStack.md b/sources/tech/20170718 How modelling helps you avoid getting a stuck OpenStack.md index bf0eea18bf..ab05f37142 100644 --- a/sources/tech/20170718 How modelling helps you avoid getting a stuck OpenStack.md +++ b/sources/tech/20170718 How modelling helps you avoid getting a stuck OpenStack.md @@ -1,3 +1,5 @@ +translating---geekpi + How modelling helps you avoid getting a stuck OpenStack ============================================================ From 69ab92dc6eb9f5cdd20cd33dc722ca58d505be59 Mon Sep 17 00:00:00 2001 From: toyijiu <309378714@qq.com> Date: Wed, 9 Aug 2017 15:21:01 +0800 Subject: [PATCH 053/125] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E4=B8=AD=20by=20toyi?= =?UTF-8?q?jiu=20=E4=B9=8B=E5=89=8D=E9=80=89=E7=9A=84=E7=BF=BB=E8=AF=91?= =?UTF-8?q?=E6=96=87=E7=AB=A0=E5=A4=AA=E9=95=BF=EF=BC=8C=E8=80=8C=E4=B8=94?= =?UTF-8?q?=E4=B8=8D=E6=98=AF=E5=96=9C=E6=AC=A2=E7=9A=84=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=EF=BC=8C=E5=B8=8C=E6=9C=9B=E6=8D=A2=E4=B8=80=E4=B8=AA=E7=9F=AD?= =?UTF-8?q?=E4=B8=80=E7=82=B9=E7=9A=84=EF=BC=8C=E6=AF=94=E8=BE=83=E6=84=9F?= =?UTF-8?q?=E5=85=B4=E8=B6=A3=E7=9A=84=E6=96=87=E7=AB=A0=E7=BF=BB=E8=AF=91?= =?UTF-8?q?=EF=BC=8C=E8=BF=98=E6=9C=9B=E6=89=B9=E5=87=86~?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sources/talk/20170320 Education of a Programmer.md | 2 -- ...22 The What Why and Wow Behind the CoreOS Container Linux.md | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/sources/talk/20170320 Education of a Programmer.md b/sources/talk/20170320 Education of a Programmer.md index 5672a26b38..5690c0fd5c 100644 --- a/sources/talk/20170320 Education of a Programmer.md +++ b/sources/talk/20170320 Education of a Programmer.md @@ -1,5 +1,3 @@ -翻译中 by WuXiao(toyijiu) - Education of a Programmer ============================================================ diff --git a/sources/tech/20170622 The What Why and Wow Behind the CoreOS Container Linux.md b/sources/tech/20170622 The What Why and Wow Behind the CoreOS Container Linux.md index 9f79c35776..8398c07aaf 100644 --- a/sources/tech/20170622 The What Why and Wow Behind the CoreOS Container Linux.md +++ b/sources/tech/20170622 The What Why and Wow Behind the CoreOS Container Linux.md @@ -1,3 +1,4 @@ +translated by toyijiu The What, Why and Wow! Behind the CoreOS Container Linux ============================================================ From 76a64f2e9f0feea14fae04e6fcc7f59ab0d4dc4d Mon Sep 17 00:00:00 2001 From: polebug Date: Wed, 9 Aug 2017 16:37:57 +0800 Subject: [PATCH 054/125] polebug is translating --- ...ing the move from Scala to Go and why were not going back.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20170124 Making the move from Scala to Go and why were not going back.md b/sources/tech/20170124 Making the move from Scala to Go and why were not going back.md index 61283e4986..cef21ffece 100644 --- a/sources/tech/20170124 Making the move from Scala to Go and why were not going back.md +++ b/sources/tech/20170124 Making the move from Scala to Go and why were not going back.md @@ -1,3 +1,5 @@ +polebug is translating + Making the move from Scala to Go, and why we’re not going back ============================================================ From 53c422bb76031a6384afed26a9f7059702e6da0e Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 9 Aug 2017 17:11:37 +0800 Subject: [PATCH 055/125] PRF&PUB:20170719 DEMYSTIFYING THE OPEN CONTAINER INITIATIVE OCI SPECIFICATIONS.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @rieonke 翻译的很好,流畅而达意! --- ...CONTAINER INITIATIVE OCI SPECIFICATIONS.md | 44 ++++++++----------- 1 file changed, 19 insertions(+), 25 deletions(-) rename {translated/tech => published}/20170719 DEMYSTIFYING THE OPEN CONTAINER INITIATIVE OCI SPECIFICATIONS.md (50%) diff --git a/translated/tech/20170719 DEMYSTIFYING THE OPEN CONTAINER INITIATIVE OCI SPECIFICATIONS.md b/published/20170719 DEMYSTIFYING THE OPEN CONTAINER INITIATIVE OCI SPECIFICATIONS.md similarity index 50% rename from translated/tech/20170719 DEMYSTIFYING THE OPEN CONTAINER INITIATIVE OCI SPECIFICATIONS.md rename to published/20170719 DEMYSTIFYING THE OPEN CONTAINER INITIATIVE OCI SPECIFICATIONS.md index c8b79a054e..fde82f0023 100644 --- a/translated/tech/20170719 DEMYSTIFYING THE OPEN CONTAINER INITIATIVE OCI SPECIFICATIONS.md +++ b/published/20170719 DEMYSTIFYING THE OPEN CONTAINER INITIATIVE OCI SPECIFICATIONS.md @@ -1,73 +1,67 @@ 解密开放容器计划(OCI)规范 ============================================================ - -开放容器计划(OCI)宣布本周完成容器运行时和镜像的第一版规范。OCI 在是 Linux 基金会(Linux Foundation)支持下的容器解决方案标准化的成果。两年来,为了[建立这些规范][12]已经付出了大量的努力。 由此,让我们一起来回顾过去两年中出现的一些误区。 +开放容器计划Open Container Initiative(OCI)宣布本周完成了容器运行时和镜像的第一版规范。OCI 在是 Linux 基金会Linux Foundation支持下的容器解决方案标准化的成果。两年来,为了[建立这些规范][12]已经付出了大量的努力。 由此,让我们一起来回顾过去两年中出现的一些误区。 ![OCI](https://i1.wp.com/blog.docker.com/wp-content/uploads/logo_oci.png?resize=800%2C180&ssl=1) -**误区:OCI 是 Docker 的替代品** +### 误区:OCI 是 Docker 的替代品 -诚然标准非常重要,但它们远非一个完整的生产平台。 以万维网为例,它25年来一路演进,建立在诸如 TCP/IP ,HTTP 和 HTML 等核心可靠的标准之上。再以 TCP/IP 为例,当企业将 TCP/IP 合并为一种通用协议时,它推动了路由器行业,尤其是思科的发展。 然而,思科通过专注于在其路由平台上提供差异化的功能,而成为市场的领导者。我们认为 OCI 规范和 Docker 也是类似这样并行存在的。 +诚然标准非常重要,但它们远非一个完整的生产平台。 以万维网为例,它 25 年来一路演进,建立在诸如 TCP/IP 、HTTP 和 HTML 等可靠的核心标准之上。再以 TCP/IP 为例,当企业将 TCP/IP 合并为一种通用协议时,它推动了路由器行业,尤其是思科的发展。 然而,思科通过专注于在其路由平台上提供差异化的功能,而成为市场的领导者。我们认为 OCI 规范和 Docker 也是类似这样并行存在的。 [Docker 是一个完整的生产平台][13],提供了基于容器的开发、分发、安全、编排的一体化解决方案。Docker 使用了 OCI 规范,但它大约只占总代码的 5%,而且 Docker 平台只有一小部分涉及容器的运行时行为和容器镜像的布局。 -**误区:产品和项目已经通过了 OCI 规范认证** +### 误区:产品和项目已经通过了 OCI 规范认证 -运行时和镜像规范本周刚发布1.0的版本。 而且 OCI 认证计划仍在开发阶段,所以企业在认证正式推出之前(今年晚些时候),没法要求容器产品的合规性,一致性或兼容性。 +运行时和镜像规范本周刚发布 1.0 的版本。 而且 OCI 认证计划仍在开发阶段,所以企业在该认证正式推出之前(今年晚些时候),没法要求容器产品的合规性、一致性或兼容性。 -OCI [认证工作组][14] 目前正在制定标准,使容器产品和开源项目能够符合规范的要求。标准和规范对于实施解决方案的工程师很重要,但正式认证是向客户保证其正在使用的技术真正符合标准的唯一方式。 +OCI [认证工作组][14]目前正在制定标准,使容器产品和开源项目能够符合规范的要求。标准和规范对于实施解决方案的工程师很重要,但正式认证是向客户保证其正在使用的技术真正符合标准的唯一方式。 -**误区:Docker不支持 OCI 规范的工作** +### 误区:Docker 不支持 OCI 规范的工作 Docker 很早就开始为 OCI 做贡献。 我们向 OCI 贡献了大部分的代码,作为 OCI 项目的维护者,为 OCI 运行时和镜像规范定义提供了积极有益的帮助。Docker 运行时和镜像格式在 2013 年开源发布之后,便迅速成为事实上的标准,我们认为将代码捐赠给中立的管理机构,对于避免容器行业的碎片化和鼓励行业创新将是有益的。我们的目标是提供一个可靠和标准化的规范,因此 Docker 提供了一个简单的容器运行时 runc 作为运行时规范工作的基础,后来又贡献了 Docker V2 镜像规范作为 OCI 镜像规范工作的基础。 Docker 的开发人员如 Michael Crosby 和 Stephen Day 从一开始就是这项工作的关键贡献者,确保能将 Docker 的托管和运行数十亿个容器镜像的经验带给 OCI。等认证工作组完成(制定认证规范的)工作后,Docker 将通过 OCI 认证将其产品展示出来,以证明 OCI 的一致性。 -**误区:OCI 仅用于 Linux 容器技术** +### 误区:OCI 仅用于 Linux 容器技术 -因为 OCI 是由 Linux 基金会 (Linux Foundation) 负责制定的,所以很容易让人误解为 OCI 仅适用于 Linux 容器技术。 而实际上并非如此,尽管 Docker 技术源于 Linux 世界,但 Docker 也一直在与微软合作,将我们的容器技术、平台和工具带到 Windows Server 的世界。 此外,Docker 向 OCI 贡献的基础技术广泛适用于包括 Linux ,Windows 和 Solaris 在内的多种操作系统环境,涵盖了 x86,ARM 和 IBM zSeries 等多种架构环境。 +因为 OCI 是由 Linux 基金会Linux Foundation 负责制定的,所以很容易让人误解为 OCI 仅适用于 Linux 容器技术。 而实际上并非如此,尽管 Docker 技术源于 Linux 世界,但 Docker 也一直在与微软合作,将我们的容器技术、平台和工具带到 Windows Server 的世界。 此外,Docker 向 OCI 贡献的基础技术广泛适用于包括 Linux 、Windows 和 Solaris 在内的多种操作系统环境,涵盖了 x86、ARM 和 IBM zSeries 等多种架构环境。 -**误区:Docker 仅仅是OCI的众多贡献者之一** +### 误区:Docker 仅仅是 OCI 的众多贡献者之一 -OCI 作为一个支持成员众多的开放组织,代表了容器行业的广度。 也就是说,它是一个小而专业的个人技术专家组,为制作初始规范的工作贡献了大量的时间和技术。 Docker 是 OCI 的创始成员,贡献了初始代码库,构成了运行时规范的基础,后来引入了参考实现。 同样地,Docker 也将 Docker V2 镜像规范贡献给 OCI 作为镜像规范的基础。 +OCI 作为一个支持成员众多的开放组织,代表了容器行业的广度。 也就是说,它是一个小而专业的个人技术专家组,为制作初始规范的工作贡献了大量的时间和技术。 Docker 是 OCI 的创始成员,贡献了初始代码库,构成了运行时规范的基础和后来的参考实现。 同样地,Docker 也将 Docker V2 镜像规范贡献给 OCI 作为镜像规范的基础。 -**误区:CRI-O 是 OCI 项目** +### 误区:CRI-O 是 OCI 项目 -CRI-O 是云计算基金会(CNCF)Kubernetes 孵化器的开源项目 -- 它不是 OCI 项目。 它基于早期版本的 Docker 体系结构,而 containerd 是一个直接的 CNCF 项目,它是一个包括 runc 参考实现的更大的容器运行时。 containerd 负责镜像传输和存储,容器运行和监控,以及支持存储和网络附件等底层功能。 Docker 在五个最大的云提供商(阿里云,AWS,Google Cloud Platform (GCP),IBM Softlayer 和 Microsoft Azure)的支持下,将 containerd 捐赠给了云计算基金会(CNCF),作为多个容器平台和编排系统的核心容器运行时。 +CRI-O 是云计算基金会Cloud Native Computing Foundation(CNCF)的 Kubernetes 孵化器的开源项目 -- 它不是 OCI 项目。 它基于早期版本的 Docker 体系结构,而 containerd 是一个直接的 CNCF 项目,它是一个包括 runc 参考实现的更大的容器运行时。 containerd 负责镜像传输和存储、容器运行和监控,以及支持存储和网络附件等底层功能。 Docker 在五个最大的云提供商(阿里云、AWS、Google Cloud Platform(GCP)、IBM Softlayer 和 Microsoft Azure)的支持下,将 containerd 捐赠给了云计算基金会(CNCF),作为多个容器平台和编排系统的核心容器运行时。 -**误区:OCI 规范现在已经完成了** +### 误区:OCI 规范现在已经完成了 -虽然首版容器运行时和镜像格式规范的发布是一个重要的里程碑,但还有许多工作有待完成。 OCI 的一开始着眼于定义一个狭窄的规范:开发人员可以依赖于容器的运行时行为,防止容器行业碎片化,并且仍然允许在不断变化的容器域中进行创新。之后才将含容器镜像规范囊括其中。 +虽然首版容器运行时和镜像格式规范的发布是一个重要的里程碑,但还有许多工作有待完成。 OCI 一开始着眼于定义一个狭窄的规范:开发人员可以依赖于容器的运行时行为,防止容器行业碎片化,并且仍然允许在不断变化的容器域中进行创新。之后才将含容器镜像规范囊括其中。 随着工作组完成运行时行为和镜像格式的第一个稳定规范,新的工作考量也已经同步展开。未来的新特性将包括分发和签名等。 然而,OCI 的下一个最重要的工作是提供一个由测试套件支持的认证过程,因为第一个规范已经稳定了。 **在 Docker 了解更多关于 OCI 和开源的信息:** -* 阅读关于[OCI v1.0 版本的运行时和镜像格式规范]的博文[1] - +* 阅读关于 [OCI v1.0 版本的运行时和镜像格式规范]的博文[1] * 访问 [OCI 的网站][2] - * 访问 [Moby 项目网站][3] - * 参加 [DockerCon Europe 2017][4] - * 参加 [Moby Summit LA][5]  -------------------------------------------------------------------------------- 作者简介: -Stephen 是 Docker 开源项目总监。 他曾在 Hewlett-Packard Enterprise (惠普企业)担任董事和杰出技术专家。他的关于开源软件和商业的博客 “再次违约”(http://stephesblog.blogs.com) 和网站 opensource.com。 - +Stephen 是 Docker 开源项目总监。 他曾在 Hewlett-Packard Enterprise (惠普企业)担任董事和杰出技术专家。他的关于开源软件和商业的博客发布在 “再次违约”(http://stephesblog.blogs.com) 和网站 opensource.com 上。 ----------------- via: https://blog.docker.com/2017/07/demystifying-open-container-initiative-oci-specifications/ -作者:[Stephen ][a] +作者:[Stephen][a] 译者:[rieonke](https://github.com/rieonke) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 6efc68f4740a85b763cad7b93854a87db5c1c5bd Mon Sep 17 00:00:00 2001 From: toyijiu <309378714@qq.com> Date: Wed, 9 Aug 2017 22:07:56 +0800 Subject: [PATCH 056/125] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E5=AE=8C=E6=88=90-20?= =?UTF-8?q?170622=20The=20What=20Why=20and=20Wow=20Behind=20the=20CoreOS?= =?UTF-8?q?=20Container=20Linux.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...d Wow Behind the CoreOS Container Linux.md | 95 ------------------- ...d Wow Behind the CoreOS Container Linux.md | 90 ++++++++++++++++++ 2 files changed, 90 insertions(+), 95 deletions(-) delete mode 100644 sources/tech/20170622 The What Why and Wow Behind the CoreOS Container Linux.md create mode 100644 translated/tech/20170622 The What Why and Wow Behind the CoreOS Container Linux.md diff --git a/sources/tech/20170622 The What Why and Wow Behind the CoreOS Container Linux.md b/sources/tech/20170622 The What Why and Wow Behind the CoreOS Container Linux.md deleted file mode 100644 index 8398c07aaf..0000000000 --- a/sources/tech/20170622 The What Why and Wow Behind the CoreOS Container Linux.md +++ /dev/null @@ -1,95 +0,0 @@ -translated by toyijiu -The What, Why and Wow! Behind the CoreOS Container Linux -============================================================ - - -![](https://cdn-images-1.medium.com/max/1600/1*znkOJQnw5_8Ko8VMEpRlpg.png) - -#### Latest Linux distro automatically updates kernel software and gives full configuration control across clusters. - -The usual debate over server Linux distributions begins with: - - _Do you use a _ [_Red Hat Enterprise Linux (RHEL)_][1] _-based distribution, such as _ [_CentOS_][2] _ or _ [_Fedora_][3] _; a _ [_Debian_][4] _-based Linux like _ [_Ubuntu_][5] _; or _ [_SUSE_][6] _?_ - -But now, [CoreOS Container Linux][7] joins the fracas. [CoreOS, recently offered by Linode on its servers][8], takes an entirely different approach than its more conventional, elder siblings. - -So, you may be asking yourself: “Why should I bother, when there are so many other solid Linux distros?” Well, I’ll let Greg Kroah-Hartman, the kernel maintainer for the Linux-stable branch and CoreOS advisor, start the conversation: - -> (CoreOS) handles distro updates (based on the ChromeOS code) combined with Docker and potentially checkpoint/restore, (which) means that you might be [able to update the distro under your application without stopping/starting the process/container.][9] I’ve seen it happen in testing, and it’s scary [good].” - -And that assessment came when CoreOS was in alpha. Back then, [CoreOS was being developed in — believe it or not — a Silicon Valley garage][10]. While CoreOS is no Apple or HPE, it’s grown considerably in the last four years. - -When I checked in on them at 2017’s [CoreOS Fest][11] in San Francisco, CoreOS had support from Google Cloud, IBM, Amazon Web Services, and Microsoft. The project itself now has over a thousand contributors. They think they’re on to something good, and I agree. - -Why? Because, CoreOS is a lightweight Linux designed from the get-go for running containers. It started as a [Docker][12] platform, but over time CoreOS has taken its own path to containers. It now supports both its own take on containers, [rkt][13] (pronounced rocket), and Docker. - -Unlike most Linux distributions, CoreOS doesn’t have a package manager. Instead it takes a page from Google’s ChromeOS and automates software updates to ensure better security and reliability of machines and containers running on clusters. Both operating system updates and security patches are regularly pushed to CoreOS Container Linux machines without sysadmin intervention. - -You control how often patches are pushed using [CoreUpdate, with its web-based interface][14]. This enables you to control when your machines update, and how quickly an update is rolled out across your cluster. - -Specifically, CoreOS does this with the the distributed configuration service [etcd][15]. This is an open-source, distributed key value store based on [YAML][16]. Etcd provides shared configuration and service discovery for Container Linux clusters. - -This service runs on each machine in a cluster. When one server goes down, say to update, it handles the leader election so that the overall Linux system and containerized applications keep running as each server is updated. - -To handle cluster management, [CoreOS used to use fleet][17]. This ties together [systemd][18] and etcd into a distributed init system. While fleet is still around, CoreOS has joined etcd with [Kubernetes][19] container orchestration to form an even more powerful management tool. - -CoreOS also enables you to declaratively customize other operating system specifications, such as network configuration, user accounts, and systemd units, with [cloud-config][20]. - -Put it all together and you have a Linux that’s constantly self-updating to the latest patches while giving you full control over its configuration from individual systems to thousand of container instances. Or, as CoreOS puts it, “You’ll never have to run [Chef ][21]on every machine in order to change a single config value ever again.” - -Let’s say you want to expand your DevOps control even further. [CoreOS helps you there, too, by making it easy to deploy Kubernetes][22]. - -So, what does all this mean? CoreOS is built from the ground-up to make it easy to deploy, manage and run containers. Yes, other Linux distributions, such as the Red Hat family with [Project Atomic][23], also enable you to do this, but for these distributions, it’s an add-on. CoreOS was designed from day one for containers. - -If you foresee using containers in your business — and you’d better because [Docker and containers are fast becoming  _The Way_  to develop and run business applications][24] — then you must consider CoreOS Container Linux, no matter whether you’re running on bare-metal, virtual machines, or the cloud. - -* * * - - _Please feel free to share below any comments or insights about your experience with or questions about CoreOS. And if you found this blog useful, please consider sharing it through social media._ - -* * * - - _About the blogger: Steven J. Vaughan-Nichols is a veteran IT journalist whose estimable work can be found on a host of channels, including _ [_ZDNet.com_][25] _, _ [_PC Magazine_][26] _, _ [_InfoWorld_][27] _, _ [_ComputerWorld_][28] _, _ [_Linux Today_][29] _ and _ [_eWEEK_][30] _. Steven’s IT expertise comes without parallel — he has even been a Jeopardy! clue. And while his views and cloud situations are solely his and don’t necessarily reflect those of Linode, we are grateful for his contributions. He can be followed on Twitter (_ [_@sjvn_][31] _)._ - --------------------------------------------------------------------------------- - -via: https://medium.com/linode-cube/the-what-why-and-wow-behind-the-coreos-container-linux-fa7ceae5593c - -作者:[Steven J. Vaughan-Nichols ][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://medium.com/linode-cube/the-what-why-and-wow-behind-the-coreos-container-linux-fa7ceae5593c -[1]:https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux -[2]:https://www.centos.org/ -[3]:https://getfedora.org/ -[4]:https://www.debian.org/ -[5]:https://www.ubuntu.com/ -[6]:https://www.suse.com/ -[7]:https://coreos.com/os/docs/latest -[8]:https://www.linode.com/docs/platform/use-coreos-container-linux-on-linode -[9]:https://plus.google.com/+gregkroahhartman/posts/YvWFmPa9kVf -[10]:https://www.wired.com/2013/08/coreos-the-new-linux/ -[11]:https://coreos.com/fest/ -[12]:https://www.docker.com/ -[13]:https://coreos.com/rkt -[14]:https://coreos.com/products/coreupdate/ -[15]:https://github.com/coreos/etcd -[16]:http://yaml.org/ -[17]:https://github.com/coreos/fleet -[18]:https://www.freedesktop.org/wiki/Software/systemd/ -[19]:https://kubernetes.io/ -[20]:https://coreos.com/os/docs/latest/cloud-config.html -[21]:https://insights.hpe.com/articles/what-is-chef-a-primer-for-devops-newbies-1704.html -[22]:https://blogs.dxc.technology/2017/06/08/coreos-moves-in-on-cloud-devops-with-kubernetes/ -[23]:http://www.projectatomic.io/ -[24]:http://www.zdnet.com/article/what-is-docker-and-why-is-it-so-darn-popular/ -[25]:http://www.zdnet.com/meet-the-team/us/steven-j-vaughan-nichols/ -[26]:http://www.pcmag.com/author-bio/steven-j.-vaughan-nichols -[27]:http://www.infoworld.com/author/Steven-J.-Vaughan_Nichols/ -[28]:http://www.computerworld.com/author/Steven-J.-Vaughan_Nichols/ -[29]:http://www.linuxtoday.com/author/Steven+J.+Vaughan-Nichols/ -[30]:http://www.eweek.com/cp/bio/Steven-J.-Vaughan-Nichols/ -[31]:http://www.twitter.com/sjvn diff --git a/translated/tech/20170622 The What Why and Wow Behind the CoreOS Container Linux.md b/translated/tech/20170622 The What Why and Wow Behind the CoreOS Container Linux.md new file mode 100644 index 0000000000..d9d87d78ba --- /dev/null +++ b/translated/tech/20170622 The What Why and Wow Behind the CoreOS Container Linux.md @@ -0,0 +1,90 @@ +CoreOS,一款新的 Linux 发行版的相关介绍 +============================================================ + +![](https://cdn-images-1.medium.com/max/1600/1*znkOJQnw5_8Ko8VMEpRlpg.png) + +#### CoreOS,一款最新的 Linux 发行版本,支持自动升级内核软件,提供各集群间的全部配置操作控制。 + +关于使用哪个版本的 Linux 系统,我们常常会引发相关的讨论: +你是喜欢基于 [_Red Hat Enterprise Linux (RHEL)_][1] 的 [_CentOS_][2] 或者 [_Fedora_][3],还是基于 [_Debian_][4] 的 [_Ubuntu_][5] 和 [_SUSE_][6] 呢? + +但是现在,一款名叫 [CoreOS Container Linux][7] 的 Linux 发行版进入了我们的视野。和它的老前辈比起来,它使用了完全不同的实现方法,并且最近已经正式被部署到一家名叫 Linode 的美国 VPS 提供商的服务器上,为其提供[相关服务][8]。 + +你可能会感到不解,这里有这么多成熟的 Linux 发行版本,为什么要选择用 CoreOS ?借用 Linux 主干分支的维护人员,也是 CoreOS 的顾问的 Greg Kroah-Hartman 先生的一句话: + +> CoreOS 的发行版升级基于 ChromeOS 代码,不用断开 Docker,支持潜在的修复和核对,这意味着不用停止或者重启你的相关进程,就可以[在线升级][9], 测试版本已经支持此功能,这是史无前例的。 + +当 Greg Kroah-Hartman 做出这段评价时,CoreOS 还处于 α 的版本阶段,当时[开发团队正在硅谷的一个车库中紧锣密鼓地开发此产品][10],但 CoreOS 不像最开始的苹果或者惠普,在过去的四年当中一直稳步发展。 + +当我参加在旧金山举办的 [2017 CoreOS 大会][11]时,CoreOS 已经支持谷歌云、IBM、亚马逊和微软的相关服务。现在有超过 1000 位开发人员参与到这个项目中,并为能够成为这个伟大产品的一员而感到高兴。 + +究其原因,CoreOS 是基于 get-go 的轻量级容器化 Linux 发行版,最初基于 [Docker][12] 平台,随着版本的更新,现在除了 Docker ,也支持 [rkt][13] 和 自己的容器。 + +不像大多数其他的 Linux 发行版,CoreOS 没有包管理器,取而代之的是通过 Google ChromeOS 的页面自动进行软件升级,这样能提高在集群上运行的机器/容器的安全性和可靠性。不用通过系统管理员的干涉,操作系统升级组件和安全补丁可以定期自动地上传到 CoreOS 容器进行升级。 + +你可以通过 [CoreUpdate 接口][14]来修改周期上传的时间,这样你就可以控制软件升级的时间和速率。 + +CoreOS 通过一种叫做 [etcd][15] 的分布式配置服务来进行升级,etcd 基于 [YAML][16],是一个开源的分布式哈希表存储系统,它可以为 Linux 集群容器提供服务搜索和共享配置等功能。 + +此服务可作用于集群上的所有服务器,当其中一台服务器需要升级时,可通过集群选举算法来升级,而其他机器则照常运行。 + +对于集群管理,CoreOS 之前采用的是 [fleet][17] 方法,这将 etcd 和 [systemd][18] 强耦合到分布式初始化系统中。当 fleet 仍然在运行时,CoreOS 结合 etcd 和 [Kubernetes][19] 容器编制来构成一个更加强有力的管理工具。 + +CoreOS 也可以让你以声明的方式定义其他操作系统的相关规格,比如用[云配置][20]的方式管理网络配置,用户账号和系统网元等。 + +综上所述,CoreOS 可以自动升级到最新版本,能让你获得从单独系统到集群等各种场景的完全控制,你再也不用为了改变一个单独的配置而在每一个集群的机器上运行 [Chef][21] 配置了。 + +所以说,对于运维工程师来说,[CoreOS能够更加快速有效地帮助你部署各种平台系统][22]。 + +通过CoreOS自下而上的构建,运维人员能够更加容易地部署、管理和运行系统。当然有[原子计画的红帽][23]等其他 Linux 发行版本也可以达到类似的效果,但它是在后续版本中才扩展的附加组件,而 CoreOS 从它诞生的第一天就有了。 + +当前[基于容器和 Docker 的框架已经逐渐成为商业系统的主流][24],如果在可预见的未来,你要在工作中使用容器,你最好考虑下 CoreOS,不管你的系统是在云上、虚拟机还是裸机硬件上跑。 + +* * * +如果有任何关于 CoreOS 的观点或者问题,还请在评论栏中留言。如果你觉得这篇博客还算有用的话,还请分享一下~ +* * * + +关于博主:Steven J. Vaughan-Nichols 是一位经验丰富的 IT 记者,许多网站中都刊登有他的文章,包括 [_ZDNet.com_][25] _, _ [_PC Magazine_][26] _, _ [_InfoWorld_][27] _, _ [_ComputerWorld_][28] _, _ [_Linux Today_][29] 和 [_eWEEK_][30] 等. 他拥有丰富的 IT 知识 - 而且他曾参加过智力竞赛节目 Jeopardy !他的相关观点都是自身思考的结果,并不代表 Linode 公司,我们对他做出的贡献致以最真诚的感谢。如果想知道他更多的信息,可以关注他的 Twitter [_@sjvn_][31]. + +-------------------------------------------------------------------------------- + +via: https://medium.com/linode-cube/the-what-why-and-wow-behind-the-coreos-container-linux-fa7ceae5593c + +作者:[Steven J. Vaughan-Nichols ][a] +译者:[吴霄/toyijiu](https://github.com/toyijiu) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://medium.com/linode-cube/the-what-why-and-wow-behind-the-coreos-container-linux-fa7ceae5593c +[1]:https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux +[2]:https://www.centos.org/ +[3]:https://getfedora.org/ +[4]:https://www.debian.org/ +[5]:https://www.ubuntu.com/ +[6]:https://www.suse.com/ +[7]:https://coreos.com/os/docs/latest +[8]:https://www.linode.com/docs/platform/use-coreos-container-linux-on-linode +[9]:https://plus.google.com/+gregkroahhartman/posts/YvWFmPa9kVf +[10]:https://www.wired.com/2013/08/coreos-the-new-linux/ +[11]:https://coreos.com/fest/ +[12]:https://www.docker.com/ +[13]:https://coreos.com/rkt +[14]:https://coreos.com/products/coreupdate/ +[15]:https://github.com/coreos/etcd +[16]:http://yaml.org/ +[17]:https://github.com/coreos/fleet +[18]:https://www.freedesktop.org/wiki/Software/systemd/ +[19]:https://kubernetes.io/ +[20]:https://coreos.com/os/docs/latest/cloud-config.html +[21]:https://insights.hpe.com/articles/what-is-chef-a-primer-for-devops-newbies-1704.html +[22]:https://blogs.dxc.technology/2017/06/08/coreos-moves-in-on-cloud-devops-with-kubernetes/ +[23]:http://www.projectatomic.io/ +[24]:http://www.zdnet.com/article/what-is-docker-and-why-is-it-so-darn-popular/ +[25]:http://www.zdnet.com/meet-the-team/us/steven-j-vaughan-nichols/ +[26]:http://www.pcmag.com/author-bio/steven-j.-vaughan-nichols +[27]:http://www.infoworld.com/author/Steven-J.-Vaughan_Nichols/ +[28]:http://www.computerworld.com/author/Steven-J.-Vaughan_Nichols/ +[29]:http://www.linuxtoday.com/author/Steven+J.+Vaughan-Nichols/ +[30]:http://www.eweek.com/cp/bio/Steven-J.-Vaughan-Nichols/ +[31]:http://www.twitter.com/sjvn From 8ec5a349f2c6541ca3a9a8109fee2f2c04333102 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 10 Aug 2017 08:41:05 +0800 Subject: [PATCH 057/125] translated --- ...lps you avoid getting a stuck OpenStack.md | 78 ------------------- ...lps you avoid getting a stuck OpenStack.md | 76 ++++++++++++++++++ 2 files changed, 76 insertions(+), 78 deletions(-) delete mode 100644 sources/tech/20170718 How modelling helps you avoid getting a stuck OpenStack.md create mode 100644 translated/tech/20170718 How modelling helps you avoid getting a stuck OpenStack.md diff --git a/sources/tech/20170718 How modelling helps you avoid getting a stuck OpenStack.md b/sources/tech/20170718 How modelling helps you avoid getting a stuck OpenStack.md deleted file mode 100644 index ab05f37142..0000000000 --- a/sources/tech/20170718 How modelling helps you avoid getting a stuck OpenStack.md +++ /dev/null @@ -1,78 +0,0 @@ -translating---geekpi - -How modelling helps you avoid getting a stuck OpenStack -============================================================ - - -### Share or save - -![](https://insights.ubuntu.com/wp-content/uploads/bd5d/airbus.jpg) - - _Lego model of an Airbus A380-800\. Airbus run OpenStack_ - -A “StuckStack” is a deployment of OpenStack that usually, for technical but sometimes business reasons, is unable to be upgraded without significant disruption, time and expense. In the last post on this topic we discussed how many of these clouds became stuck and how the decisions made at the time were consistent with much of the prevailing wisdom of the day. Now, with OpenStack being 7 years old, the recent explosion of growth in container orchestration systems and more businesses starting to make use of cloud platforms, both public and private, OpenStack are under pressure. - -### No magic solution - -If you are still searching for a solution to upgrade your existing StuckStack in place without issues, then I have bad news for you: there are no magic solutions and you are best focusing your energy on building a standardised platform that can be operated efficiently and upgraded easily. - -The low cost airlines industry has shown that whilst flyers may aspire to best of breed experience and sit in first or business class sipping champagne with plenty of space to relax, most will choose to fly in the cheapest seat as ultimately the value equation doesn’t warrant them paying more. Workloads are the same. Long term, workloads will run on the platform where it is most economic to run them as the business really doesn’t benefit from running on premium priced hardware or software. - -Amazon, Microsoft, Google and other large scale public cloud players know this which is why they have built highly efficient data centres and used models to build, operate and scale their infrastructure. Enterprises have long followed a policy of using best of breed hardware and software infrastructure that is designed, built, marketed, priced, sold and implemented as first class experiences. The reality may not have always lived up to the promise but it matters not now anyway, as the cost model cannot survive in today’s world. Some organisations have tried to tackle this by switching to free software alternatives yet without a change in their own behaviour. Thus find that they are merely moving cost from software acquisition to software operation.The good news is that the techniques used by the large operators, who place efficient operations above all else, are available to organisations of all types now. - -### What is a software model? - -Whilst for many years software applications have been comprised of many objects, processes and services, in recent years it has become far more common for applications to be made up of many individual services that are highly distributed across servers in a data centre and across different data centres themselves. - -![](https://insights.ubuntu.com/wp-content/uploads/f881/OpenStack-graphic.png) - - _A simple representation of OpenStack Services_ - -Many services means many pieces of software to configure, manage and keep track of over many physical machines. Doing this at scale in a cost efficient way requires a model of how all the components are connected and how they map to physical resources. To build the model we need to have a library of software components, a means of defining how they connect with one another and a way to deploy them onto a platform, be it physical or virtual. At Canonical we recognised this several years ago and built [Juju][2], a generic software modelling tool that enables operators to compose complex software applications with flexible topologies, architectures and deployment targets from a catalogue of 100s of common software services. - -![](https://insights.ubuntu.com/wp-content/uploads/7790/jjuju.png) - - _Juju modelling OpenStack Services_ - -In Juju, software services are defined in something called a Charm. Charms are pieces of code, typically written in python or bash that give information about the service – the interfaces declared, how the service is installed, what other services it can connect to etc. - -Charms can be simple or complex depending on the level of intelligence you wish to give them. For OpenStack, Canonical, with help from the upstream OpenStack community, has developed a full set of Charms for the primary OpenStack services. The Charms represents the instructions for the model such that it can be deployed, operated scaled and replicated with ease. The Charms also define how to upgrade themselves including, where needed, the sequence in which to perform the upgrade and how to gracefully pause and resume services when required. By connecting Juju to a bare metal provisioning system such as [Metal As A Service (MAAS)][3] the logical model of OpenStack can is deployed to physical hardware. By default, the Charms will deploy services in LXC containers which gives greater flexibility to relocate services as required based on the cloud behaviour. Config is defined in the Charms or injected at deploy time by a 3rd party tool such as Puppet or Chef. - -There are 2 distinct benefits from this approach: 1 – by creating a model we have abstracted each of the cloud services from the underlying hardware and 2: we have the means to compose new architectures through iterations using the standardised components from a known source. This consistency is what enables us to deploy very different cloud architectures using the same tooling, safe in the knowledge that we will be able to operate and upgrade them easily. - -With hardware inventory being managed with a fully automated provisioning tool and software applications modelled, operators can scale infrastructure much more efficiently than using legacy enterprise techniques or building a bespoke system that deviates from core. Valuable development resources can be focused on innovating in the application space, bringing new software services online faster rather than altering standard, commodity infrastructure in a way which will create compatibility problems further down the line. - -In the next post I’ll highlight some of the best practises for deploying a fully modelled OpenStack and how you can get going quickly. If you have an existing StuckStack then whilst we aren’t going to be able to rescue it that easily, we will be able to get you on a path to fully supported, efficient infrastructure with operations cost that compares to public cloud. - -### Upcoming webinar - -If you are stuck on an old version of OpenStack and want to upgrade your OpenStack cloud easily and without downtime, watch our [on-demand webinar][4] with live demo of an upgrade from Newton to Ocata. - -### Contact us - -If you would like to learn more about migrating to a Canonical OpenStack cloud, [get in touch][5]. - --------------------------------------------------------------------------------- - -作者简介: - -Cloud Product Manager focused on Ubuntu OpenStack. Previously at MySQL and Red Hat. Likes motorcycles and meeting people who do interesting stuff with Ubuntu and OpenStack - - ------- - - -via: https://insights.ubuntu.com/2017/07/18/stuckstack-how-modelling-helps-you-avoid-getting-a-stuck-openstack/ - -作者:[Mark Baker ][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://insights.ubuntu.com/author/markbaker/ -[1]:https://insights.ubuntu.com/author/markbaker/ -[2]:https://www.ubuntu.com/cloud/juju -[3]:https://www.ubuntu.com/server/maas -[4]:http://ubunt.eu/Bwe7kQ -[5]:http://ubunt.eu/3OYs5s diff --git a/translated/tech/20170718 How modelling helps you avoid getting a stuck OpenStack.md b/translated/tech/20170718 How modelling helps you avoid getting a stuck OpenStack.md new file mode 100644 index 0000000000..5cad8ffe47 --- /dev/null +++ b/translated/tech/20170718 How modelling helps you avoid getting a stuck OpenStack.md @@ -0,0 +1,76 @@ +如何建模可以帮助你避免在 OpenStack 中遇到问题 +============================================================ + + +### 分享或保存 + +![](https://insights.ubuntu.com/wp-content/uploads/bd5d/airbus.jpg) + + _乐高的空客 A380-800模型。空客运行 OpenStack_ + +“StuckStack” 是 OpenStack 的一种部署方式,通常由于技术上但有时是商业上的原因,它无法在没有明显中断、时间和费用的情况下升级。在关于这个话题的最后一篇文章中,我们讨论了这些云中有多少陷入僵局,当时的决定与当今大部分的智慧是一致的。现在 OpenStack 已经有 7 年了,最近随着容器编排系统的增长以及更多企业开始利用公共和私有的云平台,OpenStack 正面临着压力。 + + +### 没有魔法解决方案 + +如果你仍在寻找一个解决方案来没有任何问题地升级你现有的 StuckStack, 那么我有坏消息给你: 有没有魔法解决方案, 你最好集中精力建立一个标准化的平台, 它可以有效地操作和升级。 + +低成本航空业已经表明, 虽然乘客可能渴望最好的体验, 可以坐在头等舱或者商务舱喝香槟, 有足够的空间放松, 但是大多数人会选择乘坐最便宜的, 最终价值等式不保证他们付出更多的代价。工作负载是相同的。长期而言, 工作负载将运行在最经济的平台上, 因为在高价硬件或软件上运行的业务实际上并没有受益。 + +Amazon、Microsoft、Google 等大型公共云企业都知道,这就是为什么他们建立了高效的数据中心, 并使用模型来构建、操作和扩展基础设施。长期以来,企业一直奉行以设计、制造、市场、定价、销售,实施为一体的最优秀的硬件和软件基础设施。现实可能并不总是符合承诺,但由于成本模式在当今世界无法生存,所以现在还不重要。一些组织试图通过改用免费软件替代, 而不改变自己的行为来解决这一问题。因此, 他们发现, 他们只是将成本从软件获取变到软件操作。好消息是,那些高效运营的大型运营商使用的技术,现在可用于所有类型的组织。 + +### 什么是软件模型? + +虽然许多年来, 软件程序由许多对象、进程和服务组成, 但近年来, 程序是普遍由许多单独的服务组成, 它们高度分布式地分布在数据中心的不同服务器以及跨越数据中心的服务器上。 + +![](https://insights.ubuntu.com/wp-content/uploads/f881/OpenStack-graphic.png) + + _OpenStack 服务的简单演示_ + +许多服务意味着许多软件需要配置、管理并跟踪许多物理机器。以成本效益的方式规模化地进行这一工作需要一个模型,即所有组件如何连接以及它们如何映射到物理资源。为了构建模型,我们需要有一个软件组件库,这是一种定义它们如何彼此连接以及将其部署到平台上的方法,无论是物理还是虚拟。在 Canonical 公司,我们几年前就认识到这一点,并建立了一个通用的软件建模工具 [Juju][2],使得运营商能够从 100 个通用软件服务目录中组合灵活的拓扑结构、架构和部署目标。 + +![](https://insights.ubuntu.com/wp-content/uploads/7790/jjuju.png) + + _Juju 建模 OpenStack 服务_ + +在 Juju 中,软件服务被定义为一种叫做 Charm 的东西。 Charms 是代码片段,它通常用 python 或 bash 编写,其中提供有关服务的信息 - 声明的接口、服务的安装方式、可连接的其他服务等。 + +Charms 可以简单或者复杂,具体取决于你想要赋予的功能。对于 OpenStack,Canonical 在上游 OpenStack 社区的帮助下,为主要 OpenStack 服务开发了一套完整的 Charms。Charms 代表了模型的说明,使其可以轻松地部署、操作扩展和复制。Charms 还定义了如何升级自身,包括在需要时执行升级的顺序以及如何在需要时优雅地暂停和恢复服务。通过将 Juju 连接到诸如[裸机即服务(MAAS)][3]这样的裸机配置系统,其中 OpenStack 的逻辑模型可以部署到物理硬件上。默认情况下,Charms 将在 LXC 容器中部署服务,从而根据云行为的需要, 提供更大的灵活性来重新定位服务。配置在 Charms 中定义,或者在部署时由第三方工具(如 Puppet 或 Chef)注入。 + +这种方法有两个不同的好处:1 - 通过创建一个模型,我们从底层硬件抽象出每个云服务。2 - 使用已知来源的标准化组件,通过迭代组合新的架构。这种一致性使我们能够使用相同的工具部署非常不同的云架构,运行和升级这些工具是安全的。 + +通过全面自动化的配置工具和软件程序来管理硬件库存,运营商可以比使用传统企业技术或构建偏离核心的定制系统更有效地扩展基础架构。有价值的开发资源可以集中在创新应用领域,使新的软件服务更快上线,而不是改变标准的商品基础设施, 这将会导致进一步的兼容性问题。 + +在下一篇文章中,我将介绍部署完全建模的 OpenStack 的一些最佳实践,以及如何快速地进行操作。如果你有一个现有的 StuckStack, 那么虽然我们不能很容易地拯救它, 但是与公有云相比,我们将能够让你走上一条完全支持的、高效的基础架构以及运营成本的道路。 + +### 即将举行的网络研讨会 + +如果你在旧版本的 OpenStack 中遇到问题,并且想要轻松升级 OpenStack 云并且无需停机,请观看我们的[在线点播研讨会][4],从 Newton 升级到 Ocata 的现场演示。 + +### 联系我们 + +如果你想了解有关迁移到 Canonical OpenStack 云的更多信息,请[联系][5]。 + +-------------------------------------------------------------------------------- + +作者简介: + +专注于 Ubuntu OpenStack 的云产品经理。以前在 MySQL 和 Red Hat 工作。喜欢摩托车,遇见使用 Ubuntu 和 Openstack 做有趣事的人。 + +------ + + +via: https://insights.ubuntu.com/2017/07/18/stuckstack-how-modelling-helps-you-avoid-getting-a-stuck-openstack/ + +作者:[Mark Baker ][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://insights.ubuntu.com/author/markbaker/ +[1]:https://insights.ubuntu.com/author/markbaker/ +[2]:https://www.ubuntu.com/cloud/juju +[3]:https://www.ubuntu.com/server/maas +[4]:http://ubunt.eu/Bwe7kQ +[5]:http://ubunt.eu/3OYs5s From f6464ce07f5f20644003f24e0872df4695bb5363 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 10 Aug 2017 08:42:21 +0800 Subject: [PATCH 058/125] translated --- ...8 How modelling helps you avoid getting a stuck OpenStack.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/tech/20170718 How modelling helps you avoid getting a stuck OpenStack.md b/translated/tech/20170718 How modelling helps you avoid getting a stuck OpenStack.md index 5cad8ffe47..c9076ec50f 100644 --- a/translated/tech/20170718 How modelling helps you avoid getting a stuck OpenStack.md +++ b/translated/tech/20170718 How modelling helps you avoid getting a stuck OpenStack.md @@ -63,7 +63,7 @@ Charms 可以简单或者复杂,具体取决于你想要赋予的功能。对 via: https://insights.ubuntu.com/2017/07/18/stuckstack-how-modelling-helps-you-avoid-getting-a-stuck-openstack/ 作者:[Mark Baker ][a] -译者:[译者ID](https://github.com/译者ID) +译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 2be2f3ca1a7b99dd4fa1ecde65d49c00ddbc3cff Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 10 Aug 2017 08:45:50 +0800 Subject: [PATCH 059/125] translating --- .../20170117 The Age of the Unikernel- 10 Projects to Know.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20170117 The Age of the Unikernel- 10 Projects to Know.md b/sources/tech/20170117 The Age of the Unikernel- 10 Projects to Know.md index 45cf389712..fdda74b4e7 100644 --- a/sources/tech/20170117 The Age of the Unikernel- 10 Projects to Know.md +++ b/sources/tech/20170117 The Age of the Unikernel- 10 Projects to Know.md @@ -1,3 +1,5 @@ +translating---geekpi + The Age of the Unikernel: 10 Projects to Know ============================================================ From 31e744876b3f7191ab9062cdd98002b4f2329fa3 Mon Sep 17 00:00:00 2001 From: dimple <786796696@qq.com> Date: Thu, 10 Aug 2017 10:03:54 +0800 Subject: [PATCH 060/125] 20170705 Two great uses for the cp command (#5916) * translated * Update 20170705 Two great uses for the cp command.md * Update 20170705 Two great uses for the cp command.md * Update 20170705 Two great uses for the cp command.md --- ...70705 Two great uses for the cp command.md | 206 ------------------ ...70705 Two great uses for the cp command.md | 188 ++++++++++++++++ 2 files changed, 188 insertions(+), 206 deletions(-) delete mode 100644 sources/tech/20170705 Two great uses for the cp command.md create mode 100644 translated/tech/20170705 Two great uses for the cp command.md diff --git a/sources/tech/20170705 Two great uses for the cp command.md b/sources/tech/20170705 Two great uses for the cp command.md deleted file mode 100644 index c7d9eda069..0000000000 --- a/sources/tech/20170705 Two great uses for the cp command.md +++ /dev/null @@ -1,206 +0,0 @@ -【big_dimple翻译中】 -Two great uses for the cp command -============================================================ - -### Linux's copy command makes quick work of making specialized backups. - - -![Two great uses for the cp command](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/car-penguin-drive-linux-yellow.png?itok=ueZE5mph "Two great uses for the cp command") -Image by :  - -Internet Archive [Book][10] [Images][11]. Modified by Opensource.com. CC BY-SA 4.0 - -The point-and-click graphical user interface available on Linux is a wonderful thing... but if your favorite interactive development environment consists of the terminal window, Bash, Vim, and your favorite language compiler, then, like me, you use the terminal  _a lot_ . - -But even people who generally avoid the terminal can benefit by being more aware of the riches that its environment offers. A case in point – the **cp** command. [According to Wikipedia][12], the **cp** (or copy) command was part of Version 1 of [Unix][13]. Along with a select group of other commands—**ls**, **mv**, **cd**, **pwd**, **mkdir**, **vi**, **sh**, **sed**, and **awk** come to mind—**cp** was one of my first few steps in System V Unix back in 1984\. The most common use of **cp** is to make a copy of a file, as in: - -``` -cp sourcefile destfile -``` - -More Linux resources - -* [What is Linux?][1] - -* [What are Linux containers?][2] - -* [Download Now: Linux commands cheat sheet][3] - -* [Advanced Linux commands cheat sheet][4] - -* [Our latest Linux articles][5] - -issued at the command prompt in a terminal session. The above command copies the file named **sourcefile** to the file named **destfile**. If **destfile** doesn't exist before the command is issued, it's created; if it does exist, it's overwritten. - -I don't know how many times I've used this command (maybe I don't want to know), but I do know that I often use it when I'm writing and testing code and I have a working version of something that I want to retain as-is before I move on. So, I have probably typed something like this: - -``` -cp test1.py test1.bak -``` - -at a command prompt at least a zillion times over the past 30+ years. Alternatively, I might have decided to move on to version 2 of my test program, in which case I may have typed: - -``` -cp test1.py test2.py -``` - -to accomplish the first step of that move. - -This is such a common and simple thing to do that I have rarely ever looked at the reference documentation for **cp**. But, while backing up my Pictures folder (using the Files application in my GUI environment), I started thinking, "I wonder if there is an option to have **cp** copy over only new files or those that have changed?" And sure enough, there is! - -### Great use #1: Updating a second copy of a folder - -Let's say I have a folder on my computer that contains a collection of files. Furthermore, let's say that from time to time I put a new file into that collection. Finally, let's say that from time to time I might edit one of those files in some way. An example of such a collection might be the photos I download from my cellphone or my music files. - -Assuming that this collection of files has some enduring value to me, I might occasionally want to make a copy of it—a kind of "snapshot" of it—to preserve it on some other media. Of course, there are many utility programs that exist for doing backups, but maybe I want to have this exact structure duplicated on a removable device that I generally store offline or even connect to another computer. - -The **cp** command offers a dead-easy way to do this. Here's an example. - -In my **Pictures** folder, I have a sub-folder called **Misc**. For illustrative purposes, I'm going to make a copy of it on a USB memory stick. Here we go! - -``` -me@desktop:~/Pictures$ cp -r Misc /media/clh/4388-D5FE -me@desktop:~/Pictures$ -``` - -The above lines are copied as-is from my terminal window. For those who might not be fully comfortable with that environment, it's worth noting that **me @mydesktop:~/Pictures$** is the command prompt provided by the terminal before every command is entered and executed. It identifies the user (**me**), the computer (**mydesktop**), and the current working directory, in this case, **~/Pictures**, which is shorthand for **/home/me/Pictures**, that is, the **Pictures** folder in my home directory. - -The command I've entered and executed, **cp -r Misc /media/clh/4388-D5FE**, copies the folder **Misc** and all its contents (the **-r**, or "recursive," option indicates the contents as well as the folder or file itself) into the folder **/media/clh/4388-D5FE**, which is where my USB stick is mounted. - -Executing the command returned me to the original prompt. Like with most commands inherited from Unix, if the command executes without detecting any kind of anomalous result, it won't print out a message like "execution succeeded" before terminating. People who would like more feedback can use the **-v** option to make execution "verbose." - -Below is an image of my new copy of **Misc** on the USB drive. There are nine JPEG files in the directory. - -### [cp1_file_structure.png][6] - -![Image of the new copy of Misc on the USB drive](https://opensource.com/sites/default/files/u128651/cp1_file_structure.png "Image of the new copy of Misc on the USB drive") - -Suppose I add a few new files to the master copy of the directory **~/Pictures/Misc**, so now it looks like this: - -### [cp2_new_files.png][7] - -![New files added to the master directory](https://opensource.com/sites/default/files/u128651/cp2_new_files.png "New files added to the master directory") - -Now I want to copy over only the new files to my memory stick. For this I'll use the "update" and "verbose" options to **cp**: - -``` -me@desktop:~/Pictures$ cp -r -u -v Misc /media/clh/4388-D5FE -'Misc/asunder.png' -> '/media/clh/4388-D5FE/Misc/asunder.png' -'Misc/editing tags guayadeque.png' -> '/media/clh/4388-D5FE/Misc/editing tags guayadeque.png' -'Misc/misc on usb.png' -> '/media/clh/4388-D5FE/Misc/misc on usb.png' -me@desktop:~/Pictures$ -``` - -The first line above shows the **cp** command and its options (**-r** for "recursive", **-u** for "update," and **-v** for "verbose"). The next three lines show the files that are copied across. The last line shows the command prompt again. - -Generally speaking, options such as **-r** can also be given in a more verbose fashion, such as **--recursive**. In brief form, they can also be combined, such as **-ruv**. - -### Great use #2 – Making versioned backups - -Returning to my initial example of making periodic backups of working versions of code in development, another really useful **cp** option I discovered while learning about update is backup. - -Suppose I'm setting out to write a really useful Python program. Being a fan of iterative development, I might do so by getting a simple version of the program working first, then successively adding more functionality to it until it does the job. Let's say my first version just prints the string "hello world" using the Python print command. This is a one-line program that looks like this: - -``` -print 'hello world' -``` - -and I've put that string in the file **test1.py**. I can run it from the command line as follows: - -``` -me@desktop:~/Test$ python test1.py -hello world -me@desktop:~/Test$ -``` - -Now that the program is working, I want to make a backup of it before adding the next component. I decide to use the backup option with numbering, as follows: - -``` -clh@vancouver:~/Test$ cp --force --backup=numbered test1.py test1.py -clh@vancouver:~/Test$ ls -test1.py  test1.py.~1~ -clh@vancouver:~/Test$ -``` - -So, what does this all mean? - -First, the **--backup=numbered** option says, "I want to do a backup, and I want successive backups to be numbered." So the first backup will be number 1, the second 2, and so on. - -Second, note that the source file and destination file are the same. Normally, if we try to use the **cp** command to copy a file onto itself, we will receive a message like: - -``` -cp: 'test1.py' and 'test1.py' are the same file -``` - -In the special case where we are doing a backup and we want the same source and destination, we use the **--force** option. - -Third, I used the **ls** (or "list") command to show that we now have a file called **test1.py**, which is the original, and another called **test1.py.~1~**, which is the backup file. - -Suppose now that the second bit of functionality I want to add to the program is another print statement that prints the string "Kilroy was here." Now the program in file **test1.py**looks like this: - -``` -print 'hello world' -print 'Kilroy was here' -``` - -See how simple Python programming is? Anyway, if I again execute the backup step, here's what happens: - -``` -clh@vancouver:~/Test$ cp --force --backup=numbered test1.py test1.py -clh@vancouver:~/Test$ ls -test1.py test1.py.~1~ test1.py.~2~ -clh@vancouver:~/Test$ -``` - -Now we have two backup files: **test1.py.~1~**, which contains the original one-line program, and **test1.py.~2~**, which contains the two-line program, and I can move on to adding and testing some more functionality. - -This is such a useful thing to me that I am considering making a shell function to make it simpler. - -### Three points to wrap this up - -First, the Linux manual pages, installed by default on most desktop and server distros, provide details and occasionally useful examples of commands like **cp**. At the terminal, enter the command: - -``` -man cp -``` - -Such explanations can be dense and obscure to users just trying to learn how to use a command in the first place. For those inclined to persevere nevertheless, I suggest creating a test directory and files and trying the command and options out there. - -Second, if a tutorial is of greater interest, the search string "linux shell tutorial" typed into your favorite search engine brings up a lot of interesting and useful resources. - -Third, if you're wondering, "Why bother when the GUI typically offers the same functionality with point-and-click ease?" I have two responses. The first is that "point-and-click" isn't always that easy, especially when it disrupts another workflow and requires a lot of points and a lot of clicks to make it work. The second is that repetitive tasks can often be easily streamlined through the use of shell scripts, shell functions, and shell aliases. - -Are you using the **cp** command in new or interesting ways? Let us know about them in the comments. - --------------------------------------------------------------------------------- - -作者简介: - -Chris Hermansen - Engaged in computing since graduating from the University of British Columbia in 1978, I have been a full-time Linux user since 2005 and a full-time Solaris, SunOS and UNIX System V user before that. On the technical side of things, I have spent a great deal of my career doing data analysis; especially spatial data analysis. I have a substantial amount of programming experience in relation to data analysis, using awk, Python, PostgreSQL, PostGIS and lately Groovy. - - -via: https://opensource.com/article/17/7/two-great-uses-cp-command - -作者:[ Chris Hermansen ][a] -译者:[译者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/clhermansen -[1]:https://opensource.com/resources/what-is-linux?intcmp=70160000000h1jYAAQ&utm_source=intcallout&utm_campaign=linuxcontent -[2]:https://opensource.com/resources/what-are-linux-containers?intcmp=70160000000h1jYAAQ&utm_source=intcallout&utm_campaign=linuxcontent -[3]:https://developers.redhat.com/promotions/linux-cheatsheet/?intcmp=70160000000h1jYAAQ&utm_source=intcallout&utm_campaign=linuxcontent -[4]:https://developers.redhat.com/cheat-sheet/advanced-linux-commands-cheatsheet?intcmp=70160000000h1jYAAQ&utm_source=intcallout&utm_campaign=linuxcontent -[5]:https://opensource.com/tags/linux?intcmp=70160000000h1jYAAQ&utm_source=intcallout&utm_campaign=linuxcontent -[6]:https://opensource.com/file/360601 -[7]:https://opensource.com/file/360606 -[8]:https://opensource.com/article/17/7/two-great-uses-cp-command?rate=87TiE9faHZRes_f4Gj3yQZXhZ-x7XovYhnhjrk3SdiM -[9]:https://opensource.com/user/37806/feed -[10]:https://www.flickr.com/photos/internetarchivebookimages/14746482994/in/photolist-ot6zCN-odgbDq-orm48o-otifuv-otdyWa-ouDjnZ-otGT2L-odYVqY-otmff7-otGamG-otnmSg-rxnhoq-orTmKf-otUn6k-otBg1e-Gm6FEf-x4Fh64-otUcGR-wcXsxg-tLTN9R-otrWYV-otnyUE-iaaBKz-ovcPPi-ovokCg-ov4pwM-x8Tdf1-hT5mYr-otb75b-8Zk6XR-vtefQ7-vtehjQ-xhhN9r-vdXhWm-xFBgtQ-vdXdJU-vvTH6R-uyG5rH-vuZChC-xhhGii-vvU5Uv-vvTNpB-vvxqsV-xyN2Ai-vdXcFw-vdXuNC-wBMhes-xxYmxu-vdXxwS-vvU8Zt -[11]:https://www.flickr.com/photos/internetarchivebookimages/14774719031/in/photolist-ovAie2-otPK99-xtDX7p-tmxqWf-ow3i43-odd68o-xUPaxW-yHCtWi-wZVsrD-DExW5g-BrzB7b-CmMpC9-oy4hyF-x3UDWA-ow1m4A-x1ij7w-tBdz9a-tQMoRm-wn3tdw-oegTJz-owgrs2-rtpeX1-vNN6g9-owemNT-x3o3pX-wiJyEs-CGCC4W-owg22q-oeT71w-w6PRMn-Ds8gyR-x2Aodm-owoJQm-owtGp9-qVxppC-xM3Gw7-owgV5J-ou9WEs-wihHtF-CRmosE-uk9vB3-wiKdW6-oeGKq3-oeFS4f-x5AZtd-w6PNuv-xgkofr-wZx1gJ-EaYPED-oxCbFP -[12]:https://en.wikipedia.org/wiki/Cp_(Unix) -[13]:https://en.wikipedia.org/wiki/Unix -[14]:https://opensource.com/users/clhermansen -[15]:https://opensource.com/users/clhermansen -[16]:https://opensource.com/article/17/7/two-great-uses-cp-command#comments diff --git a/translated/tech/20170705 Two great uses for the cp command.md b/translated/tech/20170705 Two great uses for the cp command.md new file mode 100644 index 0000000000..48fb8224a7 --- /dev/null +++ b/translated/tech/20170705 Two great uses for the cp command.md @@ -0,0 +1,188 @@ +【big_dimple翻译完成】 +# cp命令两个高效的用法 + +============================================================ + +### Linux中高效的备份拷贝命令 + + +![Two great uses for the cp command](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/car-penguin-drive-linux-yellow.png?itok=ueZE5mph "Two great uses for the cp command") + +图像来自于:Opensource.com + +在Linux上能使用图形化界面是一件很美妙的事...但是如果你像我一样,喜欢的开发交互环境和编译器是终端窗口,Bash 和 Vim,那你将会经常和终端打交道。 + +即使是不经常使用终端的人,也能通过终端提供的环境来获取很多有用的知识。举个例子—**cp**命令,通过[Wiki百科][12]的解释,**cp** (或者copy)命令是[Unix][13]系统第一个版本中的一部分。以及其他的一组命令 **ls**, **mv**, **cd**, **pwd**, **mkdir**, **vi**, **sh**, **sed**, 和 **awk** 还有我们所说的 **cp** 都是在 1984 年构造Unix系统第一个版本中最初的几步。**cp** 命令最常见的用法是复制文件。像这样: + +``` +cp sourcefile destfile +``` +在终端中执行此命令,上述命令将名为 **sourcefile** 的文件复制到名为 **destfile** 的文件中。如果在执行命令之前 **destfile** 文件不存在,那将会创建此文件,如果已经存在,那就会覆盖此文件。 + +这个命令我不知道自己用了多少次了(或许我不想知道),但是我知道在我测试代码的时候,我经常用,为了保留当前版本,而且又能继续修改,我会输入这个命令: + +``` +cp test1.py test1.bak +``` +在过去的30多年里,我使用了无数次这个命令。另外,当我决定编写我的第二版测试程序时,我会输入这个命令: + +``` +cp test1.py test2.py +``` +这样就完成了修改程序版本的第一步。 + +我通常很少查看 **cp** 命令的参考文档,但是当我在备份我的图片文件夹的时候(在GUI环境下使用文件应用),我开始思考“在 **cp** 命令中是否有个参数支持只复制新文件或者是修改过的文件。”果然,真的有! + +### 高效用法1:更新你的文件夹 +比如说在我的电脑上有一个存放各种文件的文件夹,另外我要不时的往里面添加一些新文件,而且我会不时地修改一些文件,例如我手机里下载的照片或者是音乐。 + +假设我收集的这些文件对我而言都很有价值,我有时候会想做个拷贝,就像是“快照”一样将文件保存在其它媒体。当然目前有很多程序都支持备份,但是我想更为精确的将目录结构复制到可移动设备中,方便于我经常使用这些离线设备或者连接到其它电脑上。 + + **cp** 命令提供了一个易如反掌的方法。例子如下: + +在我的 **Pictures** 文件夹下,我有这样一个文件夹名字为 **Misc**。为了方便说明,我把文件拷贝到USB存储设备上。让我们开始吧! + +``` +me@desktop:~/Pictures$ cp -r Misc /media/clh/4388-D5FE +me@desktop:~/Pictures$ +``` +上面的命令是我从按照终端窗口中完整复制下来的。对于有些人来说这种环境可能不是很舒服,在我们输入命令或者执行命令之前,需要注意的是 **me@mydesktop:~/Pictures** 这个前缀,(**me**)这个是当前用户,(**mydesktop**)这是电脑名称,(**~/Pictures**)这个是当前工作目录,是(**/home/me/Pictures**)完整路径的缩写。 + +我输入这个命令并执行后(**cp -r Misc /media/clh/4388-D5FE**),拷贝 **Misc** 目录下所有文件(这个 **-r**参数,全称“recursive”,递归处理,意思为本目录下所有文件及子目录一起处理)到我的USB设备的挂载目录 **/media/clh/4388-D5FE**。 + +执行命令后回到之前的提示,大多数命令继承了Unix的特性,在命令执行后,如果没有任何异常什么都不显示,在任务结束之前不会显示像“execution succeeded“这样的提示符。如果想获取更多的反馈,就使用 **-v** 参数让执行结果更详细。 + +下图中是我的USB设备中刚刚拷贝过来的文件夹 **Misc** ,里面总共有 9 张图片。 + +### [cp1_file_structure.png][6] + +![Image of the new copy of Misc on the USB drive](https://opensource.com/sites/default/files/u128651/cp1_file_structure.png "Image of the new copy of Misc on the USB drive") + +假设我要在原始拷贝路径下 **~/Pictures/Misc** 下添加一些新文件,就像这样: + +### [cp2_new_files.png][7] + +![New files added to the master directory](https://opensource.com/sites/default/files/u128651/cp2_new_files.png "New files added to the master directory") + +现在我想只拷贝新的文件到我的存储设备上,我就使用 **cp** 的“update”和“verbose”选项。 + +``` +me@desktop:~/Pictures$ cp -r -u -v Misc /media/clh/4388-D5FE +'Misc/asunder.png' -> '/media/clh/4388-D5FE/Misc/asunder.png' +'Misc/editing tags guayadeque.png' -> '/media/clh/4388-D5FE/Misc/editing tags guayadeque.png' +'Misc/misc on usb.png' -> '/media/clh/4388-D5FE/Misc/misc on usb.png' +me@desktop:~/Pictures$ +``` +上面的第一行中是 **cp** 命令和具体的参数(**-r** 是“recursive”, **-u** 是“update”,**-v** 是“verbose”)。接下来的三行显示被复制文件的信息,最后一行显示命令行前缀。 + +通常来说,参数 **-r** 也可用用更详细的方式使用 **--recursive**。但是以简短的方式,也可以这么用 **-ruv**。 + +###高效用法2:版本备份 + +回到一开始的例子中,我在开发的时候定期给我的代码版本进行备份。然后我找到了另一种更好用的 **cp** 参数。 + +假设我正在编写一个非常有用的Python程序,作为一个喜欢不断修改代码的开发者,我会在一开始定义一个程序简单版本,然后不停的忘里面添加各种功能直到它能成功的运行起来。比方说我的第一个版本就是用Python程序打印出“hello world”。这只有一行代码的程序就像这样: + +``` +print 'hello world' +``` + +然后我将这个代码保存成文件命名为 **test1.py**。我可以这么运行它: + +``` +me@desktop:~/Test$ python test1.py +hello world +me@desktop:~/Test$ +``` + +现在程序可以运行了,我想在添加新的内容之前进行备份。我决定使用带编号的备份选项,如下: + +``` +clh@vancouver:~/Test$ cp --force --backup=numbered test1.py test1.py +clh@vancouver:~/Test$ ls +test1.py  test1.py.~1~ +clh@vancouver:~/Test$ +``` + +所以,上面的做法是什么意思呢? + +第一,这个 **--backup=numbered** 参数意思为“我要做个备份,而且是带编号的连续备份”。所以一个备份就是 1 号,第二个就是 2 号,等等。 + +第二,如果源文件和目标文件名字是一样的。通常我们使用 **cp** 命令去拷贝成自己,会得到这样的报错信息: + +``` +cp: 'test1.py' and 'test1.py' are the same file +``` + +在特殊情况下,如果我们想备份的源文件和目标文件名字相同,我们使用 **--force** 参数。 + +第三,我使用 **ls** (或者是“list”)命令来显示现在目录下的文件,名字为 **test1.py** 的是原始文件,名字为 **test1.py.~1~** 的是备份文件 + +假如现在我要加上第二个功能,在程序里加上另一行代码,可以打印“Kilroy was here.”。现在程序文件 **test1.py** 的内容如下: + +``` +print 'hello world' +print 'Kilroy was here' +``` + +看到Python代码如此简单了吗?不管怎样,如果我再次执行备份的步骤,结果如下: + + +``` +clh@vancouver:~/Test$ cp --force --backup=numbered test1.py test1.py +clh@vancouver:~/Test$ ls +test1.py test1.py.~1~ test1.py.~2~ +clh@vancouver:~/Test$ +``` +现在我有有两个备份文件: **test1.py.~1~** 包含了一行代码的程序,和 **test1.py.~2~** 包含两行代码的程序。 + +这个很好用的功能,让我在进行shell编程的时候变得更为简单。 + +###最后总结 + +第一,Linux手册页,默认安装在大多数桌面和服务器发行版,它提供了更为详细的使用方法和例子,就像 **cp** 命令,在终端中输入如下命令: + +``` +man cp +``` + +对于那些想学习如何使用这些命令,但不清楚如何使用的用户应该首先看一下这些说明,然后我建议创建一个测试目录和文件来尝试使用命令和选项。 + +第二,兴趣是最好的老师。在你最喜欢的搜索引擎中搜索“linux shell tutorial”,你会获得很多有趣和有用的资源。 + +第三,你是不是在想,“为什么我要用这么麻烦的方法,图形化界面中有相同的功能,只用点击几下岂不是更简单?”,关于这个问题我有两个理由。首先,在我们工作中需要中断其他工作流程以及大量使用点击动作时,点击动作可就不简单了。其次,如果我们要完成流水线般的重复性工作,通过使用shell脚本和shell函数以及shell重命名等功能就能很轻松的实现。 + +你还知道关于 **cp** 命令其他更棒的使用方式吗?请在留言中积极回复哦~ + +-------------------------------------------------------------------------------- + +作者简介: + +Chris Hermansen - 1978 年毕业于英国哥伦比亚大学后一直从事计算机相关职业,我从2005年开始一直使用Linux,Solaris, SunOS,在那之前我就是Unix系统管理员了,在技术方面,我花了大量的职业生涯做数据分析,尤其是空间数据分析,我有大量的编程经验与数据分析经验,熟练使用awk,Python,PostgreSQL,PostGIS和Groovy。 + + +原文: https://opensource.com/article/17/7/two-great-uses-cp-command + +作者:[ Chris Hermansen ][a] +译者:[bigdimple](https://github.com/bigdimple) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://opensource.com/users/clhermansen +[1]:https://opensource.com/resources/what-is-linux?intcmp=70160000000h1jYAAQ&utm_source=intcallout&utm_campaign=linuxcontent +[2]:https://opensource.com/resources/what-are-linux-containers?intcmp=70160000000h1jYAAQ&utm_source=intcallout&utm_campaign=linuxcontent +[3]:https://developers.redhat.com/promotions/linux-cheatsheet/?intcmp=70160000000h1jYAAQ&utm_source=intcallout&utm_campaign=linuxcontent +[4]:https://developers.redhat.com/cheat-sheet/advanced-linux-commands-cheatsheet?intcmp=70160000000h1jYAAQ&utm_source=intcallout&utm_campaign=linuxcontent +[5]:https://opensource.com/tags/linux?intcmp=70160000000h1jYAAQ&utm_source=intcallout&utm_campaign=linuxcontent +[6]:https://opensource.com/file/360601 +[7]:https://opensource.com/file/360606 +[8]:https://opensource.com/article/17/7/two-great-uses-cp-command?rate=87TiE9faHZRes_f4Gj3yQZXhZ-x7XovYhnhjrk3SdiM +[9]:https://opensource.com/user/37806/feed +[10]:https://www.flickr.com/photos/internetarchivebookimages/14746482994/in/photolist-ot6zCN-odgbDq-orm48o-otifuv-otdyWa-ouDjnZ-otGT2L-odYVqY-otmff7-otGamG-otnmSg-rxnhoq-orTmKf-otUn6k-otBg1e-Gm6FEf-x4Fh64-otUcGR-wcXsxg-tLTN9R-otrWYV-otnyUE-iaaBKz-ovcPPi-ovokCg-ov4pwM-x8Tdf1-hT5mYr-otb75b-8Zk6XR-vtefQ7-vtehjQ-xhhN9r-vdXhWm-xFBgtQ-vdXdJU-vvTH6R-uyG5rH-vuZChC-xhhGii-vvU5Uv-vvTNpB-vvxqsV-xyN2Ai-vdXcFw-vdXuNC-wBMhes-xxYmxu-vdXxwS-vvU8Zt +[11]:https://www.flickr.com/photos/internetarchivebookimages/14774719031/in/photolist-ovAie2-otPK99-xtDX7p-tmxqWf-ow3i43-odd68o-xUPaxW-yHCtWi-wZVsrD-DExW5g-BrzB7b-CmMpC9-oy4hyF-x3UDWA-ow1m4A-x1ij7w-tBdz9a-tQMoRm-wn3tdw-oegTJz-owgrs2-rtpeX1-vNN6g9-owemNT-x3o3pX-wiJyEs-CGCC4W-owg22q-oeT71w-w6PRMn-Ds8gyR-x2Aodm-owoJQm-owtGp9-qVxppC-xM3Gw7-owgV5J-ou9WEs-wihHtF-CRmosE-uk9vB3-wiKdW6-oeGKq3-oeFS4f-x5AZtd-w6PNuv-xgkofr-wZx1gJ-EaYPED-oxCbFP +[12]:https://en.wikipedia.org/wiki/Cp_(Unix) +[13]:https://en.wikipedia.org/wiki/Unix +[14]:https://opensource.com/users/clhermansen +[15]:https://opensource.com/users/clhermansen +[16]:https://opensource.com/article/17/7/two-great-uses-cp-command#comments From 3dd42073bb041a9fddaab688b787d3a78530974c Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 10 Aug 2017 13:47:44 +0800 Subject: [PATCH 061/125] PRF:20170705 Two great uses for the cp command.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @bigdimple 恭喜你完成了第一篇翻译,翻译的不错。不过要适当注意标点符号的使用。具体你可以参考我校对的版本(做版本对比) 你的 LCTT 个人专页是: https://linux.cn/lctt/bigdimple --- ...70705 Two great uses for the cp command.md | 97 +++++++++---------- 1 file changed, 48 insertions(+), 49 deletions(-) diff --git a/translated/tech/20170705 Two great uses for the cp command.md b/translated/tech/20170705 Two great uses for the cp command.md index 48fb8224a7..d9aaca8c7c 100644 --- a/translated/tech/20170705 Two great uses for the cp command.md +++ b/translated/tech/20170705 Two great uses for the cp command.md @@ -1,70 +1,66 @@ -【big_dimple翻译完成】 -# cp命令两个高效的用法 - +cp 命令两个高效的用法 ============================================================ -### Linux中高效的备份拷贝命令 - +> Linux 中高效的备份拷贝命令 ![Two great uses for the cp command](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/car-penguin-drive-linux-yellow.png?itok=ueZE5mph "Two great uses for the cp command") -图像来自于:Opensource.com +在 Linux 上能使用鼠标点来点去的图形化界面是一件很美妙的事……但是如果你喜欢的开发交互环境和编译器是终端窗口、Bash 和 Vim,那你应该像我一样*经常*和终端打交道。 -在Linux上能使用图形化界面是一件很美妙的事...但是如果你像我一样,喜欢的开发交互环境和编译器是终端窗口,Bash 和 Vim,那你将会经常和终端打交道。 - -即使是不经常使用终端的人,也能通过终端提供的环境来获取很多有用的知识。举个例子—**cp**命令,通过[Wiki百科][12]的解释,**cp** (或者copy)命令是[Unix][13]系统第一个版本中的一部分。以及其他的一组命令 **ls**, **mv**, **cd**, **pwd**, **mkdir**, **vi**, **sh**, **sed**, 和 **awk** 还有我们所说的 **cp** 都是在 1984 年构造Unix系统第一个版本中最初的几步。**cp** 命令最常见的用法是复制文件。像这样: +即使是不经常使用终端的人,如果对终端环境深入了解也能获益良多。举个例子—— `cp` 命令,据 [维基百科][12] 的解释,`cp` (意即 copy)命令是第一个版本的 [Unix][13] 系统的一部分。连同一组其它的命令 `ls`、`mv`、`cd`、`pwd`、`mkdir`、`vi`、`sh`、`sed` 和 `awk` ,还有提到的 `cp` 都是我在 1984 年接触 System V Unix 系统时所学习的命令之一。`cp` 命令最常见的用法是制作文件副本。像这样: ``` cp sourcefile destfile ``` -在终端中执行此命令,上述命令将名为 **sourcefile** 的文件复制到名为 **destfile** 的文件中。如果在执行命令之前 **destfile** 文件不存在,那将会创建此文件,如果已经存在,那就会覆盖此文件。 -这个命令我不知道自己用了多少次了(或许我不想知道),但是我知道在我测试代码的时候,我经常用,为了保留当前版本,而且又能继续修改,我会输入这个命令: +在终端中执行此命令,上述命令将名为 `sourcefile` 的文件复制到名为 `destfile` 的文件中。如果在执行命令之前 `destfile` 文件不存在,那将会创建此文件,如果已经存在,那就会覆盖此文件。 + +这个命令我不知道自己用了多少次了(我也不想知道),但是我知道在我编写测试代码的时候,我经常用,为了保留当前正常的版本,而且又能继续修改,我会输入这个命令: ``` cp test1.py test1.bak ``` -在过去的30多年里,我使用了无数次这个命令。另外,当我决定编写我的第二版测试程序时,我会输入这个命令: + +在过去的30多年里,我使用了无数次这个命令。另外,当我决定编写我的第二个版本的测试程序时,我会输入这个命令: ``` cp test1.py test2.py ``` -这样就完成了修改程序版本的第一步。 -我通常很少查看 **cp** 命令的参考文档,但是当我在备份我的图片文件夹的时候(在GUI环境下使用文件应用),我开始思考“在 **cp** 命令中是否有个参数支持只复制新文件或者是修改过的文件。”果然,真的有! +这样就完成了修改程序的第一步。 + +我通常很少查看 `cp` 命令的参考文档,但是当我在备份我的图片文件夹的时候(在 GUI 环境下使用 “file” 应用),我开始思考“在 `cp` 命令中是否有个参数支持只复制新文件或者是修改过的文件。”果然,真的有! + +### 高效用法 1:更新你的文件夹 -### 高效用法1:更新你的文件夹 比如说在我的电脑上有一个存放各种文件的文件夹,另外我要不时的往里面添加一些新文件,而且我会不时地修改一些文件,例如我手机里下载的照片或者是音乐。 假设我收集的这些文件对我而言都很有价值,我有时候会想做个拷贝,就像是“快照”一样将文件保存在其它媒体。当然目前有很多程序都支持备份,但是我想更为精确的将目录结构复制到可移动设备中,方便于我经常使用这些离线设备或者连接到其它电脑上。 - **cp** 命令提供了一个易如反掌的方法。例子如下: + `cp` 命令提供了一个易如反掌的方法。例子如下: -在我的 **Pictures** 文件夹下,我有这样一个文件夹名字为 **Misc**。为了方便说明,我把文件拷贝到USB存储设备上。让我们开始吧! +在我的 `Pictures` 文件夹下,我有这样一个文件夹名字为 `Misc`。为了方便说明,我把文件拷贝到 USB 存储设备上。让我们开始吧! ``` me@desktop:~/Pictures$ cp -r Misc /media/clh/4388-D5FE me@desktop:~/Pictures$ ``` -上面的命令是我从按照终端窗口中完整复制下来的。对于有些人来说这种环境可能不是很舒服,在我们输入命令或者执行命令之前,需要注意的是 **me@mydesktop:~/Pictures** 这个前缀,(**me**)这个是当前用户,(**mydesktop**)这是电脑名称,(**~/Pictures**)这个是当前工作目录,是(**/home/me/Pictures**)完整路径的缩写。 -我输入这个命令并执行后(**cp -r Misc /media/clh/4388-D5FE**),拷贝 **Misc** 目录下所有文件(这个 **-r**参数,全称“recursive”,递归处理,意思为本目录下所有文件及子目录一起处理)到我的USB设备的挂载目录 **/media/clh/4388-D5FE**。 +上面的命令是我从按照终端窗口中完整复制下来的。对于有些人来说不是很适应这种环境,在我们输入命令或者执行命令之前,需要注意的是 `me@mydesktop:~/Pictures` 这个前缀,`me` 这个是当前用户,`mydesktop` 这是电脑名称,`~/Pictures` 这个是当前工作目录,是 `/home/me/Pictures` 完整路径的缩写。 -执行命令后回到之前的提示,大多数命令继承了Unix的特性,在命令执行后,如果没有任何异常什么都不显示,在任务结束之前不会显示像“execution succeeded“这样的提示符。如果想获取更多的反馈,就使用 **-v** 参数让执行结果更详细。 +我输入这个命令 `cp -r Misc /media/clh/4388-D5FE` 并执行后 ,拷贝 `Misc` 目录下所有文件(这个 `-r` 参数,全称 “recursive”,递归处理,意思为本目录下所有文件及子目录一起处理)到我的 USB 设备的挂载目录 `/media/clh/4388-D5FE`。 -下图中是我的USB设备中刚刚拷贝过来的文件夹 **Misc** ,里面总共有 9 张图片。 +执行命令后回到之前的提示,大多数命令继承了 Unix 的特性,在命令执行后,如果没有任何异常什么都不显示,在任务结束之前不会显示像 “execution succeeded” 这样的提示消息。如果想获取更多的反馈,就使用 `-v` 参数让执行结果更详细。 -### [cp1_file_structure.png][6] +下图中是我的 USB 设备中刚刚拷贝过来的文件夹 `Misc` ,里面总共有 9 张图片。 ![Image of the new copy of Misc on the USB drive](https://opensource.com/sites/default/files/u128651/cp1_file_structure.png "Image of the new copy of Misc on the USB drive") -假设我要在原始拷贝路径下 **~/Pictures/Misc** 下添加一些新文件,就像这样: - -### [cp2_new_files.png][7] +假设我要在原始拷贝路径下 `~/Pictures/Misc` 下添加一些新文件,就像这样: ![New files added to the master directory](https://opensource.com/sites/default/files/u128651/cp2_new_files.png "New files added to the master directory") -现在我想只拷贝新的文件到我的存储设备上,我就使用 **cp** 的“update”和“verbose”选项。 +现在我想只拷贝新的文件到我的存储设备上,我就使用 `cp` 的“更新”和“详细”选项。 ``` me@desktop:~/Pictures$ cp -r -u -v Misc /media/clh/4388-D5FE @@ -73,21 +69,21 @@ me@desktop:~/Pictures$ cp -r -u -v Misc /media/clh/4388-D5FE 'Misc/misc on usb.png' -> '/media/clh/4388-D5FE/Misc/misc on usb.png' me@desktop:~/Pictures$ ``` -上面的第一行中是 **cp** 命令和具体的参数(**-r** 是“recursive”, **-u** 是“update”,**-v** 是“verbose”)。接下来的三行显示被复制文件的信息,最后一行显示命令行前缀。 +上面的第一行中是 `cp` 命令和具体的参数(`-r` 是“递归”, `-u` 是“更新”,`-v` 是“详细”)。接下来的三行显示被复制文件的信息,最后一行显示命令行提示符。 -通常来说,参数 **-r** 也可用用更详细的方式使用 **--recursive**。但是以简短的方式,也可以这么用 **-ruv**。 +通常来说,参数 `-r` 也可用更详细的风格 `--recursive`。但是以简短的方式,也可以这么连用 `-ruv`。 -###高效用法2:版本备份 +### 高效用法 2:版本备份 -回到一开始的例子中,我在开发的时候定期给我的代码版本进行备份。然后我找到了另一种更好用的 **cp** 参数。 +回到一开始的例子中,我在开发的时候定期给我的代码版本进行备份。然后我找到了另一种更好用的 `cp` 参数。 -假设我正在编写一个非常有用的Python程序,作为一个喜欢不断修改代码的开发者,我会在一开始定义一个程序简单版本,然后不停的忘里面添加各种功能直到它能成功的运行起来。比方说我的第一个版本就是用Python程序打印出“hello world”。这只有一行代码的程序就像这样: +假设我正在编写一个非常有用的 Python 程序,作为一个喜欢不断修改代码的开发者,我会在一开始编写一个程序简单版本,然后不停的往里面添加各种功能直到它能成功的运行起来。比方说我的第一个版本就是用 Python 程序打印出 “hello world”。这只有一行代码的程序就像这样: ``` print 'hello world' ``` -然后我将这个代码保存成文件命名为 **test1.py**。我可以这么运行它: +然后我将这个代码保存成文件命名为 `test1.py`。我可以这么运行它: ``` me@desktop:~/Test$ python test1.py @@ -106,26 +102,26 @@ clh@vancouver:~/Test$ 所以,上面的做法是什么意思呢? -第一,这个 **--backup=numbered** 参数意思为“我要做个备份,而且是带编号的连续备份”。所以一个备份就是 1 号,第二个就是 2 号,等等。 +第一,这个 `--backup=numbered` 参数意思为“我要做个备份,而且是带编号的连续备份”。所以一个备份就是 1 号,第二个就是 2 号,等等。 -第二,如果源文件和目标文件名字是一样的。通常我们使用 **cp** 命令去拷贝成自己,会得到这样的报错信息: +第二,如果源文件和目标文件名字是一样的。通常我们使用 `cp` 命令去拷贝成自己,会得到这样的报错信息: ``` cp: 'test1.py' and 'test1.py' are the same file ``` -在特殊情况下,如果我们想备份的源文件和目标文件名字相同,我们使用 **--force** 参数。 +在特殊情况下,如果我们想备份的源文件和目标文件名字相同,我们使用 `--force` 参数。 -第三,我使用 **ls** (或者是“list”)命令来显示现在目录下的文件,名字为 **test1.py** 的是原始文件,名字为 **test1.py.~1~** 的是备份文件 +第三,我使用 `ls` (意即 “list”)命令来显示现在目录下的文件,名字为 `test1.py` 的是原始文件,名字为 `test1.py.~1~` 的是备份文件 -假如现在我要加上第二个功能,在程序里加上另一行代码,可以打印“Kilroy was here.”。现在程序文件 **test1.py** 的内容如下: +假如现在我要加上第二个功能,在程序里加上另一行代码,可以打印 “Kilroy was here.”。现在程序文件 `test1.py` 的内容如下: ``` print 'hello world' print 'Kilroy was here' ``` -看到Python代码如此简单了吗?不管怎样,如果我再次执行备份的步骤,结果如下: +看到 Python 编程多么简单了吗?不管怎样,如果我再次执行备份的步骤,结果如下: ``` @@ -134,13 +130,13 @@ clh@vancouver:~/Test$ ls test1.py test1.py.~1~ test1.py.~2~ clh@vancouver:~/Test$ ``` -现在我有有两个备份文件: **test1.py.~1~** 包含了一行代码的程序,和 **test1.py.~2~** 包含两行代码的程序。 +现在我有有两个备份文件: `test1.py.~1~` 包含了一行代码的程序,和 `test1.py.~2~` 包含两行代码的程序。 -这个很好用的功能,让我在进行shell编程的时候变得更为简单。 +这个很好用的功能,我考虑做个 shell 函数让它变得更简单。 -###最后总结 +### 最后总结 -第一,Linux手册页,默认安装在大多数桌面和服务器发行版,它提供了更为详细的使用方法和例子,就像 **cp** 命令,在终端中输入如下命令: +第一,Linux 手册页,它在大多数桌面和服务器发行版都默认安装了,它提供了更为详细的使用方法和例子,对于 `cp` 命令,在终端中输入如下命令: ``` man cp @@ -148,24 +144,27 @@ man cp 对于那些想学习如何使用这些命令,但不清楚如何使用的用户应该首先看一下这些说明,然后我建议创建一个测试目录和文件来尝试使用命令和选项。 -第二,兴趣是最好的老师。在你最喜欢的搜索引擎中搜索“linux shell tutorial”,你会获得很多有趣和有用的资源。 +第二,兴趣是最好的老师。在你最喜欢的搜索引擎中搜索 “linux shell tutorial”,你会获得很多有趣和有用的资源。 -第三,你是不是在想,“为什么我要用这么麻烦的方法,图形化界面中有相同的功能,只用点击几下岂不是更简单?”,关于这个问题我有两个理由。首先,在我们工作中需要中断其他工作流程以及大量使用点击动作时,点击动作可就不简单了。其次,如果我们要完成流水线般的重复性工作,通过使用shell脚本和shell函数以及shell重命名等功能就能很轻松的实现。 +第三,你是不是在想,“为什么我要用这么麻烦的方法,图形化界面中有相同的功能,只用点击几下岂不是更简单?”,关于这个问题我有两个理由。首先,在我们工作中需要中断其他工作流程以及大量使用点击动作时,点击动作可就不简单了。其次,如果我们要完成流水线般的重复性工作,通过使用 shell 脚本和 shell 函数以及 shell 重命名等功能就能很轻松的实现。 -你还知道关于 **cp** 命令其他更棒的使用方式吗?请在留言中积极回复哦~ +你还知道关于 `cp` 命令其他更棒的使用方式吗?请在留言中积极回复哦~ + +(题图:Opensource.com) -------------------------------------------------------------------------------- 作者简介: -Chris Hermansen - 1978 年毕业于英国哥伦比亚大学后一直从事计算机相关职业,我从2005年开始一直使用Linux,Solaris, SunOS,在那之前我就是Unix系统管理员了,在技术方面,我花了大量的职业生涯做数据分析,尤其是空间数据分析,我有大量的编程经验与数据分析经验,熟练使用awk,Python,PostgreSQL,PostGIS和Groovy。 +Chris Hermansen - 1978 年毕业于英国哥伦比亚大学后一直从事计算机相关职业,我从 2005 年开始一直使用 Linux、Solaris、SunOS,在那之前我就是 Unix 系统管理员了,在技术方面,我的大量的职业生涯都是在做数据分析,尤其是空间数据分析,我有大量的编程经验与数据分析经验,熟练使用 awk、Python、PostgreSQL、PostGIS 和 Groovy。 +--- -原文: https://opensource.com/article/17/7/two-great-uses-cp-command +via: https://opensource.com/article/17/7/two-great-uses-cp-command -作者:[ Chris Hermansen ][a] +作者:[Chris Hermansen][a] 译者:[bigdimple](https://github.com/bigdimple) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 699218a6029785d4e7e5503ac30c430d0eacb316 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 10 Aug 2017 13:48:21 +0800 Subject: [PATCH 062/125] PUB:20170705 Two great uses for the cp command.md @bigdimple https://linux.cn/article-8766-1.html --- .../20170705 Two great uses for the cp command.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {translated/tech => published}/20170705 Two great uses for the cp command.md (100%) diff --git a/translated/tech/20170705 Two great uses for the cp command.md b/published/20170705 Two great uses for the cp command.md similarity index 100% rename from translated/tech/20170705 Two great uses for the cp command.md rename to published/20170705 Two great uses for the cp command.md From f61e217521b4626e6eec661228e3906c9e9f76c4 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 10 Aug 2017 17:10:55 +0800 Subject: [PATCH 063/125] PRF:20170711 Ubuntu Core Making a factory image with private snaps.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @Snaplee 恭喜你,完成了第一篇贡献!你的 LCTT 专页是: https://linux.cn/lctt/Snaplee 文中有一处翻译你有质疑,我看了,其实原文没错,它说的 snapd ,那个确实也是 apt 安装的,我校对修改了。 另外,文中的图片,都不需要另外做本地化处理。我发布文章时候,会自动本地化到 LINUX.CN 上了。 --- ...king a factory image with private snaps.md | 108 ++++++++++-------- 1 file changed, 60 insertions(+), 48 deletions(-) diff --git a/translated/tech/20170711 Ubuntu Core Making a factory image with private snaps.md b/translated/tech/20170711 Ubuntu Core Making a factory image with private snaps.md index efe9af6af6..d625de186c 100644 --- a/translated/tech/20170711 Ubuntu Core Making a factory image with private snaps.md +++ b/translated/tech/20170711 Ubuntu Core Making a factory image with private snaps.md @@ -1,13 +1,16 @@ -# Ubuntu Core: 制作包含私有 snaps 的工厂镜像 ---- -这篇帖子是有关 [ROS prototype to production on Ubuntu Core][1] 系列的补充,用来回答我接收到的一个问题: “如何在不公开发布 snaps 的情况下制作一个工厂镜像?” 当然,问题和回答都不只是针对于机器人技术。在这篇帖子中,我将会通过两种方法来回答这个问题。 +Ubuntu Core:制作包含私有 snap 的工厂镜像 +======== + +这篇帖子是有关 [在 Ubuntu Core 开发 ROS 原型到成品][1] 系列的补充,用来回答我收到的一个问题: “我想做一个工厂镜像,但我不想使我的 snap 公开” 当然,这个问题和回答都不只是针对于机器人技术。在这篇帖子中,我将会通过两种方法来回答这个问题。 -开始之前,你需要了解一些制作 Ubuntu Core 镜像的背景知识,如果你已经看过 [ROS prototype to production on Ubuntu Core][3] 系列文章(具体是第 5 部分),你就已经有了需要的背景知识,如果没有看过的话,可以查看有关 [制作你的 Ubuntu Core 镜像][5] 的教程。 +开始之前,你需要了解一些制作 Ubuntu Core 镜像的背景知识,如果你已经看过 [在 Ubuntu Core 开发 ROS 原型到成品[3] 系列文章(具体是第 5 部分),你就已经有了需要的背景知识,如果没有看过的话,可以查看有关 [制作你的 Ubuntu Core 镜像][5] 的教程。 -如果你已经了解了最新的情况并且当我说 “模型定义” 或者 “模型断言” 时知道我在谈论什么,那就让我们开始通过不同的方法使用私有 sanps 来制作 Ubuntu Core 镜像吧。 +如果你已经了解了最新的情况,并且当我说 “模型定义” 或者 “模型断言” 时知道我在谈论什么,那就让我们开始通过不同的方法使用私有 sanps 来制作 Ubuntu Core 镜像吧。 + +### 方法 1: 不要上传你的 snap 到商店 + +这是最简单的方法了。首先看一下这个有关模型定义的例子——`amd64-model.json`: -### 方法 1: 无需上传你的 snap 到商店 -这是最简单的方法了。首先看一下这个有关模型定义的例子——**amd64-model.json**: ``` { "type": "model", @@ -21,16 +24,20 @@ "timestamp": "2017-06-23T21:03:24+00:00", "required-snaps": ["kyrofa-test-snap"] } -``` -让我们将它转换成模型断言 +``` + +让我们将它转换成模型断言: + ``` $ cat amd64-model.json | snap sign -k my-key-name > amd64.model You need a passphrase to unlock the secret key for user: "my-key-name" 4096-bit RSA key, ID 0B79B865, created 2016-01-01 ... -``` -获得模型断言:**amd64.model** 后,如果你现在就把它交给 **ubuntu-image** 使用,你将会碰钉子: +``` + +获得模型断言:`amd64.model` 后,如果你现在就把它交给 `ubuntu-image` 使用,你将会碰钉子: + ``` $ sudo ubuntu-image -c stable amd64.model Fetching core @@ -40,7 +47,9 @@ Fetching kyrofa-test-snap error: cannot find snap "kyrofa-test-snap": snap not found COMMAND FAILED: snap prepare-image --channel=stable amd64.model /tmp/tmp6p453gk9/unpack ``` -实际上商店中并没有名为 **kyrofa-test-snap** 的 snap。这里需要重点说明的是:模型定义(以及转换后的断言)会包含一列 snap 的名字。如果你在本地有个名字相同的 snap,即使它没有存在于商店中,你也可以通过 **--extra-snaps** 选项告诉 **ubuntu-image** 在断言中增加这个名字来使用它: + +实际上商店中并没有名为 `kyrofa-test-snap` 的 snap。这里需要重点说明的是:模型定义(以及转换后的断言)只包含了一系列的 snap 的名字。如果你在本地有个那个名字的 snap,即使它没有存在于商店中,你也可以通过 `--extra-snaps` 选项告诉 `ubuntu-image` 在断言中匹配这个名字来使用它: + ``` $ sudo ubuntu-image -c stable \ --extra-snaps /path/to/kyrofa-test-snap_0.1_amd64.snap \ @@ -54,30 +63,35 @@ WARNING: "kyrofa-test-snap" were installed from local snaps disconnected from a store and cannot be refreshed subsequently! Partition size/offset need to be a multiple of sector size (512). The size/offset will be rounded up to the nearest sector. -``` -现在,在 snap 并没有上传到商店的情况下,你已经获得一个预装了私有 snap 的 Ubuntu Core 镜像(名为 pc.img)。但是这样做有一个很大的问题,ubuntu-image 会提示一个警告:不通过连接商店预装 snap 意味着你没有办法在烧录了这些镜像的设备上更新它。你只能通过制作新的镜像并重新烧录到设备的方式来更新它。 +``` -### 方法 2: 使用品牌商店 -当你注册了一个商店账号并访问 [dashboard.snapcraft.io][6] 时,你其实是在标准的 Ubuntu 商店中查看你的 snaps。如果你在系统中安装 snap(原文是:If you install snapd fresh on your system,但是 snapd 并不是从 Ubuntu 商城安装的,而是通过 apt-get 命令 安装的),默认会从这个商店下载。虽然你可以在 Ubuntu 商店中发布私有的 snaps,但是你 [不能将它们预装到镜像中][7],因为只有你(以及你添加的合作者)才有权限去使用它。在这种情况下制作镜像的唯一方式就是公开发布你的 snaps,然而这并不符合这篇帖子的目的(原文是:which defeats the whole purpose of this post)。 +现在,在 snap 并没有上传到商店的情况下,你已经获得一个预装了私有 snap 的 Ubuntu Core 镜像(名为 `pc.img`)。但是这样做有一个很大的问题,ubuntu-image 会提示一个警告:不通过连接商店预装 snap 意味着你没有办法在烧录了这些镜像的设备上更新它。你只能通过制作新的镜像并重新烧录到设备的方式来更新它。 -对于这种用例,我们有所谓的 **[品牌商店][8]**。品牌商店仍然在 Ubuntu 商店里托管,但是它们是针对于某一特定公司或设备的一个可定制的策划(curated)版本。品牌商店可以继承或者不继承标准的 Ubuntu 商店,品牌商店也可以选择开放给所有的开发者或者将其限制在一个特定的组内(保持私有正是我们想要的)。 +### 方法 2: 使用品牌商店 + +当你注册了一个商店账号并访问 [dashboard.snapcraft.io][6] 时,你其实是在标准的 Ubuntu 商店中查看你的 snap。如果你是在系统中新安装的 snapd,默认会从这个商店下载。虽然你可以在 Ubuntu 商店中发布私有的 snap,但是你[不能将它们预装到镜像中][7],因为只有你(以及你添加的合作者)才有权限去使用它。在这种情况下制作镜像的唯一方式就是公开发布你的 snap,然而这并不符合这篇帖子的目的。 -请注意,这是一个付费功能。你需要 [申请一个品牌商店][9]。请求通过后,你将可以通过访问用户名下的“stores you can access” 看到你的新商店。 -![图片.png-78.9kB][10] +对于这种用例,我们有所谓的 [品牌商店][8]。品牌商店仍然托管在 Ubuntu 商店里,但是它们是针对于某一特定公司或设备的一个定制的、专门的版本。品牌商店可以继承或者不继承标准的 Ubuntu 商店,品牌商店也可以选择开放给所有的开发者或者将其限制在一个特定的组内(保持私有正是我们想要的)。 -在那里你可以看到多个有权使用的商店。最少的情况下也会有两个: 标准的 Ubuntu 商店以及你的新的品牌商店。选择品牌商店(红色矩形),进去后记录下你的商店 ID(蓝色矩形):等下你将会用到它。 -![图片.png-43.9kB][11] +请注意,这是一个付费功能。你需要 [申请一个品牌商店][9]。请求通过后,你将可以通过访问用户名下的 “stores you can access” 看到你的新商店。 + +![](https://insights.ubuntu.com/wp-content/uploads/1a62/stores_you_can_access.jpg) +在那里你可以看到多个有权使用的商店。最少的情况下也会有两个:标准的 Ubuntu 商店以及你的新的品牌商店。选择品牌商店(红框),进去后记录下你的商店 ID(蓝框):等下你将会用到它。 -在品牌商店里注册名字或者上传 snaps 和标准的商店使用的方法是一样的,只是它们现在是上传到你的品牌商店而不是标准的那个。如果你没有将品牌商店列出来,那么这些 snaps 对外部用户是不可见。但是这里需要注意的是第一次上传 snap 的时候需要通过web界面来操作。在那之后,你可以继续像往常一样使用 Snapcraft 。 +![](https://insights.ubuntu.com/wp-content/uploads/b10c/Screenshot-from-2017-07-06-15-16-32.png) + +在品牌商店里注册名字或者上传 snap 和标准的商店使用的方法是一样的,只是它们现在是上传到你的品牌商店而不是标准的那个。如果你将品牌商店放在 unlisted 里面,那么这些 snap 对外部用户是不可见。但是这里需要注意的是第一次上传 snap 的时候需要通过 web 界面来操作。在那之后,你可以继续像往常一样使用 Snapcraft 来操作。 + +那么这些是如何改变的呢?我的 “kyrofal-store” 从 Ubuntu 商店继承了 snap,并且还包含一个发布在稳定通道中的 “kyrofa-bran-test-snap” 。这个 snap 在 Ubuntu 商店里是使用不了的,如果你去搜索它,你是找不到的: -那么这些是如何改变的呢?我的 “kyrofal-store” 从 Ubuntu 商店继承了 snaps,并且还包含一个发布在稳定通道中的 “kyrofa-bran-test-snap” 。这个 snap 在 Ubuntu 商店里是使用不了的,如果你去搜索它,你是找不到的: ``` $ snap find kyrofa-branded The search "kyrofa-branded" returned 0 snaps ``` -但是使用我们前面记录的商店 ID,我们可以创建一个从品牌商店而不是 Ubuntu 商店下载 snaps 的模型断言。我们只需要将 “store” 键添加到 JSON 文件中,就像这样: +但是使用我们前面记录的商店 ID,我们可以创建一个从品牌商店而不是 Ubuntu 商店下载 snap 的模型断言。我们只需要将 “store” 键添加到 JSON 文件中,就像这样: + ``` { "type": "model", @@ -92,8 +106,10 @@ The search "kyrofa-branded" returned 0 snaps "required-snaps": ["kyrofa-branded-test-snap"], "store": "kyek" } -``` -使用方法 1 中的方式对它签名,然后我们就可以像这样很简单的制作一个预装有我们品牌商店私有 snap 的 Ubuntu Core 镜像: +``` + +使用方法 1 中的方式对它签名,然后我们就可以像这样很简单的制作一个预装有我们品牌商店私有 snap 的 Ubuntu Core 镜像: + ``` $ sudo ubuntu-image -c stable amd64.model Fetching core @@ -102,8 +118,9 @@ Fetching pc Fetching kyrofa-branded-test-snap Partition size/offset need to be a multiple of sector size (512). The size/offset will be rounded up to the nearest sector. -``` -现在,和方法 1 的最后一样,你获得了一个为工厂准备的 pc.img。并且使用这种方法制作的镜像中的所有 snaps 都从商店下载的,这意味着它们将能像平常一样自动更新。 +``` + +现在,和方法 1 的最后一样,你获得了一个为工厂准备的 `pc.img`。并且使用这种方法制作的镜像中的所有 snap 都从商店下载的,这意味着它们将能像平常一样自动更新。 ### 结论 @@ -113,35 +130,30 @@ The size/offset will be rounded up to the nearest sector. 希望能帮助到您! - --- + 关于作者 -Kyle 的图片 - -![Kyle_Fazzari.jpg-12kB][13] Kyle 是 Snapcraft 团队的一员,也是 Canonical 公司的常驻机器人专家,他专注于 snaps 和 snap 开发实践,以及 snaps 和 Ubuntu Core 的机器人技术实现。 -- - - +--- + via: https://insights.ubuntu.com/2017/07/11/ubuntu-core-making-a-factory-image-with-private-snaps/ 作者:[Kyle Fazzari][a] 译者:[Snaplee](https://github.com/Snaplee) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - [1]: https://insights.ubuntu.com/2017/04/06/from-ros-prototype-to-production-on-ubuntu-core/ - [2]: https://insights.ubuntu.com/2017/04/06/from-ros-prototype-to-production-on-ubuntu-core/ - [3]: https://insights.ubuntu.com/2017/04/06/from-ros-prototype-to-production-on-ubuntu-core/ - [4]: https://insights.ubuntu.com/2017/04/06/from-ros-prototype-to-production-on-ubuntu-core/ - [5]: https://tutorials.ubuntu.com/tutorial/create-your-own-core-image - [6]: https://dashboard.snapcraft.io/dev/snaps/ - [7]: https://forum.snapcraft.io/t/unable-to-create-an-image-that-uses-private-snaps - [8]: https://docs.ubuntu.com/core/en/build-store/index?_ga=2.103787520.1269328701.1501772209-778441655.1499262639 - [9]: https://docs.ubuntu.com/core/en/build-store/create - [10]: http://static.zybuluo.com/apollomoon/hzffexclyv4srqsnf52a9udc/%E5%9B%BE%E7%89%87.png - [11]: http://static.zybuluo.com/apollomoon/9gevrgmq01s3vdtp5qfa8tp7/%E5%9B%BE%E7%89%87.png - [12]: https://forum.snapcraft.io/t/unable-to-create-an-image-that-uses-private-snaps/1115 - [13]: http://static.zybuluo.com/apollomoon/xaxxjof19s7cbgk00xntgmqa/Kyle_Fazzari.jpg - [14]: https://insights.ubuntu.com/2017/04/06/from-ros-prototype-to-production-on-ubuntu-core/ +[1]: https://insights.ubuntu.com/2017/04/06/from-ros-prototype-to-production-on-ubuntu-core/ +[2]: https://insights.ubuntu.com/2017/04/06/from-ros-prototype-to-production-on-ubuntu-core/ +[3]: https://insights.ubuntu.com/2017/04/06/from-ros-prototype-to-production-on-ubuntu-core/ +[4]: https://insights.ubuntu.com/2017/04/06/from-ros-prototype-to-production-on-ubuntu-core/ +[5]: https://tutorials.ubuntu.com/tutorial/create-your-own-core-image +[6]: https://dashboard.snapcraft.io/dev/snaps/ +[7]: https://forum.snapcraft.io/t/unable-to-create-an-image-that-uses-private-snaps +[8]: https://docs.ubuntu.com/core/en/build-store/index?_ga=2.103787520.1269328701.1501772209-778441655.1499262639 +[9]: https://docs.ubuntu.com/core/en/build-store/create +[12]: https://forum.snapcraft.io/t/unable-to-create-an-image-that-uses-private-snaps/1115 +[14]: https://insights.ubuntu.com/2017/04/06/from-ros-prototype-to-production-on-ubuntu-core/ From 859c471b652e6e6a873e2e84bbec4a1e259db67a Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 10 Aug 2017 17:11:50 +0800 Subject: [PATCH 064/125] PUB:20170711 Ubuntu Core Making a factory image with private snaps.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @Snaplee 难怪你以这篇为第一篇,原来你就是 snap 啊~ 发布地址: https://linux.cn/article-8767-1.html --- ...70711 Ubuntu Core Making a factory image with private snaps.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {translated/tech => published}/20170711 Ubuntu Core Making a factory image with private snaps.md (100%) diff --git a/translated/tech/20170711 Ubuntu Core Making a factory image with private snaps.md b/published/20170711 Ubuntu Core Making a factory image with private snaps.md similarity index 100% rename from translated/tech/20170711 Ubuntu Core Making a factory image with private snaps.md rename to published/20170711 Ubuntu Core Making a factory image with private snaps.md From bdc7fabbcc1ac4647203598b936d108f80ee7572 Mon Sep 17 00:00:00 2001 From: MonkeyDEcho <863626156@qq.com> Date: Thu, 10 Aug 2017 19:27:10 +0800 Subject: [PATCH 065/125] translated --- ...220 TypeScript the missing introduction.md | 427 ++++++++++++++++++ 1 file changed, 427 insertions(+) create mode 100644 translated/tech/20161220 TypeScript the missing introduction.md diff --git a/translated/tech/20161220 TypeScript the missing introduction.md b/translated/tech/20161220 TypeScript the missing introduction.md new file mode 100644 index 0000000000..53c7e84782 --- /dev/null +++ b/translated/tech/20161220 TypeScript the missing introduction.md @@ -0,0 +1,427 @@ +简洁的介绍TypeScript +============================================================= + + +**下文是James Henry([@MrJamesHenry][8])所编辑的内容。我是ESLint核心团队的一员,也是TypeScript的热衷者和发扬者。我和Todd合作在[UltimateAngular][9]平台上发布Angular和TypeScript的精品课程。** + +> 本文的主旨是为了介绍我们对TypeScript的思考和在JavaScript开发当中的更好的使用。 +> +> 我们将给出编译和关键字准确的定义 + +TypeScript强大之处远远不止这些,本篇文章无法涵盖,想要了解更多请阅读官方文档[official document][15],或者查阅[TypeScript courses over on UltimateAngular][16]UltimateAngular平台的TypeScript精品课程-从初学者到TypeScript高手 + +### [目录][17] + +* [背景][10] +* [关键知识的掌握][11] + * [JavaScript解释型语言还是编译型语言][1] + * [运行时间 VS 编译时间][2] + * [TypeScript编译器][3] + * [动态类型 VS 静态类型][4] +* [TypeScript在我们JavaScript工作流程中的作用][12] + * [我们的源文件是我们的文档,TypeScript是我们的拼写检查][5] +* [TypeScript是一种可以启动其它工具的工具][13] + * [什么是抽象语法树(AST)?][6] + * [示例:在VS中重命名符号][7] +* [总结][14] + +### [背景][18] + +TypeScript是很容易掌握的强大开发工具 + +然而,TypeScript可能比JavaScript要更为复杂,因为TypeScript可能同时向我们介绍以前没有考虑到的JavaScript程序相关的一些列技术概念。 + +每当我们谈论到类型、编译器等这些概念的时候。事情就会变的非常麻烦和不知所云起来。 + +这篇文章就是为了你在学习过程中你需要知道的许许多多不知所云的概念解答的,来帮助你TypeScript入门的,让你轻松自如的应对这些概念。 + +### [关键知识的掌握][19] + +有时候运行我们的代码是在Web浏览器中运行,和我们平常运行代码有不同的感觉,它是怎样运行自己书写的代码的?“没有经过编译的,是正确的吗?”。“我敢肯定没有类型的...” + +情况变的更有趣了,当我们知道通过前后程序的定义来判断语法的正确与否 + +首先我们要作的是 + +#### [JavaScript 解释型语言还是编译型语言][20] + +传统意义上,程序员经常将自己的程序编译之后运行出结果就认为这种语言是编译型语言。 + +> 从初学者的角度来说,编译的过程就是将我们自己编辑好的高级语言程序转换成机器实际运行过程中能够看懂的格式(一般是二进制文件格式)。 + +就像GO语言,可以使用go build的命令行工具编译.go的文件格式,将其编译成较低级的语言,可以直接运行的格式。(译者没有使用过GO语言,不清楚GO编译过程的机制,试着用C语言的方式说明) + +``` +# We manually compile our .go file into something we can run +# using the command line tool "go build" +go build ultimate-angular.go +# ...then we execute it! +./ultimate-angular +``` + +我们在日常使用JavaScript开发的时候并没有编译的这一步,这是JavaScript忽略了我们程序员对新一代构建工具和模块加载程序的热爱。 + +我们编写JavaScript代码在浏览器的