简体   繁体   English

Dart lang应用程序与开放堆栈/ docker / vagrant

[英]Dart lang app with open stack / docker / vagrant

I'm newbie for these techs (open stack / docker / vagrant), not sure if I understood them correctly (most likely did not), for me I understood it is something like having a portable application to run it with same development configuration to ensure all the development team have same setup, but did not understand, what after development, and how to get benefit from them with dart app. 我是这些技术的新手(开放堆栈/ docker / vagrant),不确定我是否正确理解它们(很可能没有),对我来说,我理解它就像有一个便携式应用程序来运行它具有相同的开发配置确保所有开发团队都有相同的设置,但不明白,开发后的内容,以及如何通过dart app从中获益。

my question is: 1. Correct my understanding 2. Do I need the end user to have these things installed in his system, and run my application through them, same as in the development stage? 我的问题是:1。纠正我的理解2.我是否需要最终用户在他的系统中安装这些东西,并通过它们运行我的应用程序,就像在开发阶段一样? 3. How can I build/develop/distribute dart lang app through them, may be as hese as well as dart are new, I could not find enough info while googling. 3.我如何通过它们构建/开发/分发dart lang应用程序,可能是因为dart是新的,我在google搜索时找不到足够的信息。

thanks 谢谢

Docker is similar to a virtual machine like VM-Ware or Virtualbox as it creates an abstraction layer between the host operating system and the operating system running within a Docker container. Docker类似于虚拟机,如VM-Ware或Virtualbox,因为它在主机操作系统和在Docker容器中运行的操作系统之间创建了一个抽象层。 The difference is that Docker doesn't emulate the entire hardware. 不同之处在于Docker不会模拟整个硬件。 The disadvantage is that Docker only runs on Linux and only Linux can be run inside Docker. 缺点是Docker只能在Linux上运行,只有Linux可以在Docker中运行。 If your host is an Intel system you can't run an ARM Linux inside the container. 如果您的主机是Intel系统,则无法在容器内运行ARM Linux。 (theoretically you can run Virtualbox inside Docker and run Windows. or other OSes in it) (理论上你可以在Docker中运行Virtualbox并运行Windows或其他操作系统)

With Docker you can test your application locally in the same environment as the application will run when deployed. 使用Docker,您可以在部署时运行应用程序的相同环境中本地测试应用程序。

When you for example create an application you want to run in Google Compute Engine you install and test it locally inside a Docker container and then deploy the Docker container to Google Compute Engine as a whole unit. 例如,当您创建要在Google Compute Engine中运行的应用程序时,您可以在Docker容器中本地安装并测试它,然后将Docker容器作为整个单元部署到Google Compute Engine。 When there is a bug in the deployed application you should be able to reproduce it locally as well because it's just a 1:1 copy. 当部署的应用程序中存在错误时,您应该能够在本地重现它,因为它只是1:1的副本。 No bug could have been introduce because the operating system or other dependencies were installed differently on the deployment environment than in the develeopment/test environment. 由于操作系统或其他依赖项在部署环境中的安装方式与在开发/测试环境中的安装方式不同,因此无法引入任何错误。

The Dockerfile is a set of instructions to set up a Docker container. Dockerfile是一组设置Docker容器的指令。 If you want to create a new Docker container (for example for a new developer) you just let Docker process the Dockerfile and a new Docker container is created from it. 如果你想创建一个新的Docker容器(例如对于一个新的开发人员),你只需让Docker处理Dockerfile并从中创建一个新的Docker容器。 This allows to easily create new Containers. 这样可以轻松创建新容器。 If you want to update one dependency to a newer version or want to add remove components to/from the environment you change the Dockerfile and create a new container from it. 如果要将一个依赖项更新为较新版本,或者想要从环境中添加删除组件,请更改Dockerfile并从中创建一个新容器。 This way you avoid that manual addition/removal form/to an existing container manually lets containers of different developers/testers/deployment diverge from each other. 这样,您可以手动避免手动添加/删除表单/现有容器,从而使不同开发人员/测试人员/部署的容器彼此不同。

I haven't used OpenStack myself but from the web page it seems to provide components and tools to build and manage your own cloud infrastructure. 我自己没有使用过OpenStack,但是从网页上看,它似乎提供了构建和管理自己的云基础架构的组件和工具。

I also haven't used Vagrant myself but it seems to help to automate a lot of tasks related to creating and managing virtual machines like VM-Ware, Virtualbox, Docker and probably others. 我自己也没有使用过Vagrant,但它似乎有助于自动完成许多与创建和管理VM-Ware,Virtualbox,Docker等虚拟机相关的任务。 When you have for example a server application it probably consist of a number of components you don't want all to run in one container but split up into several containers. 例如,当您拥有一个服务器应用程序时,它可能包含许多组件,您不希望所有组件都在一个容器中运行,而是分成几个容器。 One container for the Database, one for the web server, one for the backend application (created in Dart for example), and others. 数据库的一个容器,一个用于Web服务器,一个用于后端应用程序(例如在Dart中创建),以及其他容器。 It can become cumbersome to manage all those containers. 管理所有这些容器会变得很麻烦。 Vagrant helps to automate related tasks. Vagrant有助于自动执行相关任务。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM