I'm trying to use nfs since we have a really large codebase and rsync is
really slow. I can't seem to get it to work though. Here is my
configuration:
*./docker/Vagrantfile*
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "yungsang/coreos"
config.vm.provision "docker"
config.vm.provision "shell", inline: "ps aux | grep 'sshd:' | awk '{print
$2}' | xargs kill"
config.vm.network :forwarded_port, guest: 3000, host: 3000 # web
server
config.vm.synced_folder "../", "/app", :nfs => true, :mount_options =>
['nolock,vers=3,udp']
config.vm.network :private_network, ip: "33.33.33.30"
end
*./Vagrantfile*
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.define "app" do |app|
app.vm.provider "docker" do |d|
d.build_dir = "."
d.link "db:db"
d.link "redis:redis"
d.link "solr:solr"
d.privileged = true
d.volumes = ["/app:/opt/app"]
d.vagrant_vagrantfile = "./docker/Vagrantfile"
d.remains_running = true
end
end
config.vm.define "db" do |db|
db.vm.provider "docker" do |d|
d.image = "tutum/mysql"
d.name = "db"
d.env = {MYSQL_PASS: "assword"} #Yes this says assword the 'p' is
inferred in the container
d.ports = ["3306:3306"]
d.privileged = true
d.vagrant_vagrantfile = "./docker/Vagrantfile"
end
end
config.vm.define "redis" do |redis|
redis.vm.provider "docker" do |d|
d.image = "dockerfile/redis"
d.name = "redis"
d.ports = ["6379:6379"]
d.privileged = true
d.vagrant_vagrantfile = "./docker/Vagrantfile"
end
end
config.vm.define "solr" do |solr|
solr.vm.provider "docker" do |d|
d.image = "quirky/solr"
d.name = "solr"
d.ports = ["8080:8080"]
d.privileged = true
d.vagrant_vagrantfile = "./docker/Vagrantfile"
end
end
end
Here's the log output:
$ vu app --provider=docker
> Bringing machine 'app' up with 'docker' provider...
> ==> app: Docker host is required. One will be created if necessary...
> app: Vagrant will now create or start a local VM to act as the Docker
> app: host. You'll see the output of the `vagrant up` for this VM below.
> app:
> app: Checking if box 'yungsang/coreos' is up to date...
> app: Clearing any previously set forwarded ports...
> app: Clearing any previously set network interfaces...
> app: Preparing network interfaces based on configuration...
> app: Adapter 1: nat
> app: Adapter 2: hostonly
> app: Forwarding ports...
> app: 3000 => 3000 (adapter 1)
> app: 22 => 2222 (adapter 1)
> app: Running 'pre-boot' VM customizations...
> app: Booting VM...
> app: Waiting for machine to boot. This may take a few minutes...
> app: SSH address: 127.0.0.1:2222
> app: SSH username: core
> app: SSH auth method: private key
> app: Warning: Connection timeout. Retrying...
> app: Machine booted and ready!
> app: Configuring and enabling network interfaces...
> app: Exporting NFS shared folders...
> app: Preparing to edit /etc/exports. Administrator privileges will be
> required...
> Password:
> app: Mounting NFS shared folders...
> app: Running provisioner: docker...
> Unable to configure automatic restart of Docker containers on
> the guest machine
> app: Running provisioner: shell...
> app: Running: inline script
> app: kill: No such process
> ==> app: Syncing folders to the host VM...
>
> * app: Rsyncing folder: /Users/micah/quirky/qc/ =>
> /var/lib/docker/docker_1403021387_62173 app: Rsyncing folder:
> /Users/micah/quirky/qc/ =>
> /mnt/docker_build_5b4916471ad9fc45f201d11b2d6c5e11*
> ==> app: Pruning invalid NFS exports. Administrator privileges will be
> required...
> ==> app: Building the container from a Dockerfile...
--
You received this message because you are subscribed to the Google Groups
"Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.