Hello Alvaro,

On 18 May 2014, at 12:33, Alvaro Miranda Aguilera wrote:

my point here is, vagrant automate steps, so is good give one or 2 times a
manual run to see and understand what you are doing.

in the docker echo example, nothing will be output to the vagrant console,m
since that is not how it works.

if you see the echo working on the gui and not in the vagrant promp then is
something with the vagrant file on where those outputs are going

please dont get me wrong, not want ing o sound rude, what i am trying to
say is, vagrant does what you tell it to do it, and so far, sounds is
working as expected

Understood, and again thanks for responding. I am trying to replicate the vagrant blog example for how the new docker support is supposed to work.

Let's isolate this discussion first to Scenario 1, just plain old boot2docker built-in support. As mentioned earlier, this is the video Mitchell posted on the blog titled "Docker-Based Development Environments With Vagrant."

I've duplicated the Vagrantfile and Dockerfile. I ran "vagrant up db --provider=docker".

Following along with the video, I would expect the result to be the same. It isn't. The last line in the video after the successful execution (@2:53 in the video) of the vagrant up command is "==> db: Provisioners will not be run since container doesn't support SSH." Instead what I see is this:

        [wfroning@waf-pc DOCKER]$ vagrant up db --provider=docker
        Bringing machine 'db' up with 'docker' provider...
        ==> db: Docker host is required. One will be created if necessary...
db: Vagrant will now create or start a local VM to act as the Docker db: host. You'll see the output of the `vagrant up` for this VM below.
            db:
            db: Checking if box 'mitchellh/boot2docker' is up to date...
            db: Verifying vmnet devices are healthy...
            db: Preparing network adapters...
            db: Starting the VMware VM...
        An error occurred while executing `vmrun`, a utility for controlling
        VMware machines. The command and output are below:

Command: ["start", "/Users/wfroning/.vagrant.d/data/docker-host/.vagrant/machines/default/vmware_fusion/28a19efe-6b25-4a69-b2a7-a7e4f320e7c7/packer-vmware-iso.vmx", "nogui", {:notify=>[:stdout, :stderr]}]

        Stdout: 2014-05-18T13:36:14.466| ServiceImpl_Opener: PID 64960
        Error: The operation was canceled

        Stderr:

This also leaves a hanging vmware process running.

        [wfroning@waf-pc DOCKER]$ ps auxwww | grep packer
root 63934 0.7 0.3 3347696 56136 ?? Ss 1:31PM 0:08.89 /Applications/VMware Fusion.app/Contents/Library/vmware-vmx -s vmx.noUIBuildNumberCheck=TRUE -# product=1;name=vmrun;version=1.13.2;buildnumber=1747349;licensename=VMware Fusion for Mac OS;licenseversion=6.0; -@ duplex=3;instance=0;msgs=ui /Users/wfroning/.vagrant.d/data/docker-host/.vagrant/machines/default/vmware_fusion/28a19efe-6b25-4a69-b2a7-a7e4f320e7c7/packer-vmware-iso.vmx

Mitchell has mentioned before on the list that if there's a problem, check VMWare. You also asked me to run the boot2docker box by hand.

I pulled it down, and then tar zxvf the [box](http://vagrantcloud.com/mitchellh/boot2docker/version/1/provider/vmware_desktop.box). I get the "Would you like to upgrade this virtual machine?" message when I boot the vm.

https://www.dropbox.com/s/caid35cqnl5iw5x/Screenshot%202014-05-18%2013.57.13.png

Which says to me, that regardless of what I try with docker it will fail. This is because the version of boot2docker that is currently provided by 1.6.2 isn't built for 6.0.3.

I understand that I can build my own box or fix the one provided by hashicorp, but that isn't the point. The point I'm trying to first confirm is, "If my configs are wrong, how do I fix it?"

Once we agree on what the results for scenario 1 are I will go over scenario 2. Just don't want to muddy the water too much.

Thanks,
Will

i will suggest engage this pushion blog person for pushion questions, and
this mailing list for vagrant questions.

if you do your vagrantfile, or having questions about a piece of
vagrantfile, feel free to paste here, someone will reply for sure.




On Sun, May 18, 2014 at 4:48 PM, Will Froning <[email protected]>wrote:

Hello Alvaro,

Thanks for the response, sorry about the delay on my side.

On 16 May 2014, at 6:14, Alvaro Miranda Aguilera wrote:

hello,

Vagrant does what you tell vagrant to do.

So, in the example 1, if you manually pull that docker image, it works?

No. If I use the boot2docker image as just a VM, after POST the screen
comes up with "no os found".

In the example 2, what I understand is over the gui you see the echo, what
you expect to see when you are not with the gui?

My point is that I shouldn't *need* to use the GUI to get the phusion
docker image online. The video on the blog didn't have this limitation. I understand that was with Virtualbox not Fusion, but that just illustrates
point #4 below.

Thanks,
Will

Alvaro.

On Thu, May 15, 2014 at 4:44 PM, Will Froning [email protected]:

Hello All,

I'm trying to test out the new docker support and it doesn't work for me.
I've tried two different scenarios, and they both fail. I watched the
Vagrant up blog videos
http://www.vagrantup.com/blog/feature-preview-vagrant-1-6-docker-dev-environments.htmland
Robert
Berger's github post
https://github.com/RobertBerger/vagrant-phusion-baseimagefor background
info.

Environment (OSX 10.9.2):

[wfroning@waf-pc vagrant]$ vagrant -v
Vagrant 1.6.2
[wfroning@waf-pc vagrant]$ vagrant box list
freebsd91-amd64 (vmware_fusion, 0)
hashicorp/precise64 (vmware_fusion, 1.1.0)
mitchellh/boot2docker (vmware_desktop, 0.8.0)
phusion/ubuntu-12.04-amd64 (vmware_fusion, 2014.05.11)
precise64 (vmware_fusion, 0)
raring64 (vmware_fusion, 0)
squeeze64 (vmware_fusion, 0)
[wfroning@waf-pc vagrant]$ vagrant plugin list
vagrant-login (1.0.1, system)
vagrant-share (1.0.1, system)
vagrant-vmware-fusion (2.4.1)
Scenario 1

Use the native boot2docker support with a simple Vagrantfile:

[wfroning@waf-pc vagrant]$ cat Vagrantfile
Vagrant.configure("2") do |config|
config.vm.provider "docker" do |docker|
docker.image = "paintedfox/postgresql"
end
end

vagrant up --provider --debug pukes after a while with this:

INFO interface: error: An error occurred while executing vmrun, a utility
for controlling
VMware machines. The command and output are below:

Command: ["start",
"/Users/wfroning/.vagrant.d/data/docker-host/.vagrant/machines/default/vmware_fusion/28a19efe-6b25-4a69-b2a7-a7e4f320e7c7/packer-vmware-iso.vmx",
"nogui", {:notify=>[:stdout, :stderr]}]

Stdout: 2014-05-15T07:40:28.902| ServiceImpl_Opener: PID 23848
Error: The operation was canceled

Stderr:
An error occurred while executing vmrun, a utility for controlling
VMware machines. The command and output are below:

Command: ["start",
"/Users/wfroning/.vagrant.d/data/docker-host/.vagrant/machines/default/vmware_fusion/28a19efe-6b25-4a69-b2a7-a7e4f320e7c7/packer-vmware-iso.vmx",
"nogui", {:notify=>[:stdout, :stderr]}]

Stdout: 2014-05-15T07:40:28.902| ServiceImpl_Opener: PID 23848
Error: The operation was canceled

Stderr:
INFO interface: Machine: error-exit
["HashiCorp::VagrantVMwarefusion::Errors::VMRunError", "An error occurred while executing vmrun, a utility for controlling\nVMware machines. The
command and output are below:\n\nCommand: [\"start\",
\"/Users/wfroning/.vagrant.d/data/docker-host/.vagrant/machines/default/vmware_fusion/28a19efe-6b25-4a69-b2a7-a7e4f320e7c7/packer-vmware-iso.vmx\",
\"nogui\", {:notify=>[:stdout, :stderr]}]\n\nStdout:
2014-05-15T07:40:28.902| ServiceImpl_Opener: PID 23848\nError: The
operation was canceled\n\nStderr: "]

So I figure I will test out the boot2docker VM in Fusion. I get the
dreaded VMWare "Upgrade VM" prompt and I click ok. It gets past the POST
and complains of no OS. I try again without clicking upgrading the VM
and... same problem.

So in summary boot2docker native support completely fails on OSX 10.9.2 +
Fusion 6.0.3 because the boot2docker image is broke.

For those following the video posts from the blog
http://www.vagrantup.com/blog/feature-preview-vagrant-1-6-docker-dev-environments.html
,
that was video 1.
Scenario 2

I then attempt video 2 from the blog with some hints from Robert Berger.

Vagrantfile:

Vagrant.configure("2") do |config|
config.vm.define "phusion" do |v|
v.vm.provider "docker" do |d|
d.cmd = ["/sbin/my_init", "--enable-insecure-key"]
d.image = "phusion/baseimage"
d.has_ssh = true
d.vagrant_vagrantfile = "./docker/Vagrantfile"
end

v.ssh.username = "root"
v.ssh.private_key_path = "phusion.key"
v.ssh.port = "22"

v.vm.provision "shell", inline: "echo Hello"

v.vm.synced_folder "./keys", "/vagrant"
end
end

./docker/Vagrantfile:

Vagrant.configure("2") do |config|
by default we use a 64 box config.vm.box = "hashicorp/precise64"

config.vm.box = "phusion/ubuntu-12.04-amd64"
config.vm.network :forwarded_port, guest: 4243, host: 4142 fix vmware gui config.vm.provider :vmware_fusion do |fusion| fusion.gui = true end common stuff (32 and 64
bit)

config.vm.provision "docker"
config.vm.provision "shell", inline:
"ps aux | grep 'sshd:' | awk '{print $2}' | xargs kill"
end

A vagrant up --provider=docker --debug eventually errors out while
waiting for the VM to come online. So I enable the Fusion GUI in
./docker/Vagrantfile to see what's going on.

"Do you want to upgrade this virtual machine?" Seriously... again? I don't upgrade and it pulls down phusion/baseimage starts the container and pukes.

INFO interface: error: The container started either never left the
"stopped" state or
very quickly reverted to the "stopped" state. This is usually
because the container didn't execute a command that kept it running,
and usually indicates a misconfiguration.

If you meant for this container to not remain running, please
set the Docker provider configuration "remains_running" to "false":

config.vm.provider "docker" do |d|
d.remains_running = false
end
The container started either never left the "stopped" state or
very quickly reverted to the "stopped" state. This is usually
because the container didn't execute a command that kept it running,
and usually indicates a misconfiguration.

If you meant for this container to not remain running, please
set the Docker provider configuration "remains_running" to "false":

config.vm.provider "docker" do |d|
d.remains_running = false
end
INFO interface: Machine: error-exit
["VagrantPlugins::DockerProvider::Errors::StateStopped", "The container started either never left the \"stopped\" state or\nvery quickly reverted to the \"stopped\" state. This is usually\nbecause the container didn't
execute a command that kept it running,\nand usually indicates a
misconfiguration.\n\nIf you meant for this container to not remain running,
please\nset the Docker provider configuration \"remains_running\" to
\"false\":\n\n config.vm.provider \"docker\" do |d|\n d.remains_running =
false\n end"]

So I give up on hashicorp and switch to phusion with Fusion GUI disabled.

The phusion image also fails. Although, when I enable the GUI in
docker/Vagrantfile it all starts to magically work.

I see docker get installed (oh yeah getting there).
I see 'phusion/baseimage' gets pulled down (don't tease me).
I see the container start up (is this really gonna happen?!?).

==> phusion: Hello

What... WHAT? Did that just happen? It flipping worked! Is that an angel I
see? Did the clouds just part and a double rainbow shine through?

I'm going to buy a lotto ticket.
Summary

1.

There are a few bugs hiding in there. I have no clue why enabling the
GUI was the trigger to get all this to work.
2.

It's obvious the default images aren't getting the same amount of care
and feeding that the phusion images are. This is disappointing.
3.

Docker conflicts with CrashPlan (port 4243). Where the heck am I
supposed to change the forwarded port when using the default docker
provider (boot2docker)?
4.

Finally, I pay for a VMWare license because that is the only way to
support Vagrant, and it's an awesome product. Why doesn't Fusion work
before Virtualbox?

Thanks,
Will

--
Will Froning
[email protected]

--
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.

--
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.

--
Will Froning
[email protected]

--
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.


--
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.


--
Will Froning
[email protected]

--
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.

Reply via email to