Articles of vagrant

如何使用vagrant运行二进制文件,并保持它在后台运行?

我有一个二进制文件,我需要部署或运行​​在我的Linux服务器上。 目前我使用的是stream浪汉,这里是我的stream浪汉文件: VAGRANTFILE_API_VERSION = "2" Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.box = "ubuntu/trusty64" …… config.vm.provision "shell", path: "./provisioner" config.vm.provision "shell", binary: true , path: "./code/service" end 请注意,在第二行中,我有config.vm.provision "shell", binary: true , path: "./code/service" 。 这个服务文件是用Go编写的应用程序编译的文件。 以上configuration工作,但不会在后台运行该文件。 当使用这个vagrant provision将继续运行在我的terminal上。 我知道我可以使用screen来实现这一点。 但是,假设我有100个服务器运行需要运行这个文件,使用screen重复它将是痛苦的。 任何想法如何自动化? 也许使用其他工具? 任何帮助,将不胜感激。

在Vagrant环境中安装Grunt的问题

我试图在Ubuntu Trusty 64bit Vagrant环境中安装node.js,npm和Grunt.js,并遇到一些问题。 这是我的木偶清单: init.pp – class grunt::install { exec { 'apt_update': command => 'apt-get update', path => '/usr/bin' } package { [ 'curl', 'python-software-properties', 'ruby1.9.3' ]: ensure => present, require => Exec['apt_update'] } # Get node exec { 'add-node-repo': command => '/usr/bin/add-apt-repository ppa:chris-lea/node.js && /usr/bin/apt-get update', require => Package['python-software-properties'] } package { 'nodejs': […]

Fedora 21中的stream浪NFS共享被firewalld阻止

由stream浪者创build的我的NFS共享被firewalld阻止。 主机是Fedora 21和客户端Debian 7.7。 这是常见的问题,应该通过打开NFS的防火墙来解决,如下所示,但这不适用于我的情况。 这是firewall-cmd –list-all –zone=internal的输出firewall-cmd –list-all –zone=internal : internal (active) interfaces: vboxnet0 vboxnet1 sources: services: dhcpv6-client mdns mountd nfs rpc-bind samba-client ssh ports: 2049/udp masquerade: no forward-ports: icmp-blocks: rich rules: 我真的不知道该从哪里出发,因为firewalld不支持logging下来的数据包,所以我看不出哪里出了问题。 如果我禁用防火墙它完美的作品。 如果您需要任何其他信息,请添加评论,我将更新问题。 UPDATE 我也在默认区域尝试了相同的规则,移动vboxnet接口。 不用找了。

使用与Windows主机操作系统代理转发的SSH,Vagrant Ubuntu来宾操作系统和Keepass / Keeagent

意图 :能够从任何开发环境部署到lan-example.com ; 无论是直接来自虚拟操作系统,还是任何单一操作系统,甚至是使用存储在Keepass中的一个SSH密钥的互联网。 我目前无法从Vagrant的操作系统中这样做,除非我明确生成自己的密钥并在每个部署服务器中对其进行授权。 我相信通过用户代理转发来做我想做的事情的方式,是的? 主机操作系统 Windows 7 x64 由puttygen生成的SSH密钥: C:\Users\Administrator\.ssh\id_rsa.ppk 用Keeagent Keepass存储我的SSH密钥。 Keeagent被设置为“Agent”模式 pageant.exe已安装但未运行 如果我希望使用我的密钥连接到外部/内部LAN服务器,Putty将按照Keeagent – Putty不会将私钥位置存储在其configuration中。 C:\ Users \用户Administrator.ssh \ CONFIG Host 192.168.55.2 ForwardAgent yes Vagrantfile Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.network :private_network, ip: '192.168.55.2' config.ssh.forward_agent = true # Why would I need to set this if Keeagent is handling things? config.ssh.private_key_path = '~/.ssh/id_rsa_jake_mitchell.ppk' […]

运行Vagrant / libvirt:试图build立公共/私人networking

我在Ubuntu 14.04 LTS上运行Vagrant 1.7(来自他们的官方1.7软件包),我正在尝试configuration几个私有虚拟机和一个公共虚拟机。 我的Ansibleconfiguration脚本更改所有vagrant / root密码,并replace安全性方面的Vagrant股票SSH密钥。 我所有的内部IP是10.10.20.0/24。 我有一个虚拟机,需要IP 10.42.7.226(从我们的真实的外部IP地址80/443有一个NAT去它)。 pipe理程序在10.42.7.227,我创build了一个连接到eth0的IP。 我的networkingconfiguration如下所示: auto lo iface lo inet loopback # The primary network interface auto eth0 iface eth0 inet static address 10.42.7.227 netmask 255.255.255.0 network 10.42.7.0 broadcast 10.42.7.255 gateway 10.42.7.1 dns-nameservers 8.8.8.8 auto br0 iface br0 inet static address 10.42.7.227 netmask 255.255.255.0 gateway 10.42.7.1 bridge_ports eth0 […]

有很多CPU的Vagrant VirtualBox

我通过Vagrant运行一个VirtualBox虚拟机,并且注意到在机器中添加更多的CPU( Vagrant会超时),启动时间性能下降。 例如,启动时间为2 cpus和32 cpus有很大的不同。 我不确定这是否与VirtualBox或Vagrant 。 有没有人有类似的经验? 物理机器有32个逻辑核心。

SSL读取:错误:00000000:lib(0):func(0):原因(0),errno 60

我试图安装stream浪,但我有这个错误,我不明白为什么。 请帮忙 SOPHEAKs-MacBook-Pro:Vagrant sopheak$ vagrant up Bringing machine 'default' up with 'virtualbox' provider… ==> default: Box 'hashicorp/precise64' could not be found. Attempting to find and install… default: Box Provider: virtualbox default: Box Version: >= 0 ==> default: Loading metadata for box 'hashicorp/precise64' default: URL: https://atlas.hashicorp.com/hashicorp/precise64 ==> default: Adding box 'hashicorp/precise64' (v1.1.0) for provider: virtualbox default: […]

奇怪的错误与CentOS 7上的Apache

我正在尝试使用vagrant,virtualbox和CentOS 7 64bit构build虚拟机。 主机操作系统是Ubuntu 14.04 64bit。 Vagrant是1.9.2,VirtualBox 5.1.6。 这是stream浪文件 Vagrant.configure("2") do |config| config.vm.box = "centos/7" config.vm.box_check_update = false # Enable cache if plugin is installed # To install it execute: vagrant plugin install vagrant-cachier # cache will be located in [thisvagrantdir]/.vagrant/machines/default/cache if Vagrant.has_plugin?("vagrant-cachier") config.cache.auto_detect = true config.cache.scope = :machine end config.vm.network "private_network", ip: "192.168.33.101" config.hostmanager.enabled […]

无法检索存储库的metalink:epel

我有两个CentOS服务器,一个是带有VirtualBox提供程序的Vagrant虚拟机,另一个是租用的VPS。 他们使用相同的手册进行configuration。 在VPS上一切都很好,但是我在EPEL上遇到了错误。 我已经恢复了我的剧本几个提交,当我100%确定一切正常,但仍然是同样的错误。 我按照以下顺序使用geerlingguy所做的5个angular色: – { role: geerlingguy.repo-epel } – { role: geerlingguy.firewall } – { role: geerlingguy.nginx } – { role: geerlingguy.git } – { role: geerlingguy.nodejs } 运行我的手册会给我一个错误: Failure talking to yum: Cannot retrieve metalink for repository: epel/x86_64. Please verify its path and try again 当我SSH进入stream浪的机器,并尝试运行任何yum命令: Cannot retrieve metalink for repository: epel/x86_64. […]

stream浪ifup eth1失败(重复接口)

我正在试图从VirtualBox机器上build立一个stream浪盒子。 当我vagrant up ,我得到一个错误的说法 The following SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed! /sbin/ifup eth1 如果我尝试手动运行命令,我会得到 /etc/network/interfaces:17: duplicate interface ifup: couldn't read interfaces file "/etc/network/interfaces" vagrantfile的networking相关部分是 config.vm.network :hostonly, "192.168.56.11" (如果我禁用这条线,只使用一个NAT接口,事情的工作,但我希望既一个NAT和主机只有networking连接) /etc/network/interfaces是 # This file describes the network interfaces available on your system # and how to […]