Vagrant 演示环境下安装 #Vagrant 演示环境下安装 Vagrant 是一个虚拟机管理程序,可以运行在本地机器上。我们提供了一个配置好的 Vggrant/VirtualBox 虚拟机镜像文件。你不用进行安装,可以直接用来做本地测试。 ##系统要求 电脑里需要先配置好 Vagrant 和 VirtualBox,如果没有安装,请参见下面的网址进行安装: - [VirtualBox](https://www.virtualbox.org/wiki/Downloads) - [Vagrant 1.6 或以上](https://www.vagrantup.com/downloads.html) ##安装 使用 git 将 Flynn 代码 clone 到本地: $ git clone https://github.com/flynn/flynn 如果你系统里安装了`make`,我们提供了一个`Makefile`文件,对常用的 Flynn 命令进行了封装,可以方便使用。当然,如果没有`make`,你也可以手动运行这些命令。 进入代码树里的`demo`目录,启动 Vagrant: $ cd flynn/demo # Provision the VM and bootstrap a flynn cluster # Init should only be called once $ make init # Print login token and open dashboard in browser $ make dashboard # OR $ vagrant up # Follow the instructions output by vagrant up, then... $ flynn -a dashboard env get LOGIN_TOKEN # Copy the login token # Open the dashboard in a browser $ open http://dashboard.demo.localflynn.com 其他有用的`make`命令: # Halt the VM $ make down # Bring up the VM and flynn $ make up # SSH into the VM $ make ssh # Destroy the VM $ make destroy # See Makefile for other useful commands 如果虚拟机没有成功启动,可以使用下面的命令重启: # Stop and restart the VM $ make down $ make up # OR, destroy and rebuild the VM $ make reset 安装成功之后,虚拟机里运行一个单节点的 Flynn 集群。 现在,你已经成功的安装并运行 Flynn。可以参见上面的[使用文档](https://flynn.io/docs)来部署你的应用。