Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

running PuPHPet script throu vagrant managed servers plugin #25

Open
pascalwacker opened this issue Oct 15, 2014 · 6 comments
Open

running PuPHPet script throu vagrant managed servers plugin #25

pascalwacker opened this issue Oct 15, 2014 · 6 comments

Comments

@pascalwacker
Copy link

Hi
So I created a server using https://puphpet.com/ (I've never worked with Puppet before and they provide a nice Interface and yes maybee I'm lazy ;))
I've then changed the Vagrant file to have 2 VM's in it. First one called "dev", that runs localy on my laptop and the second one called "prod" which runs on a remote host. What I'd like to do now is just let the local setup run on the remote host.
Therefore I downloaded this plugin and I'm able to connect to the remote host using "vagrant up prod --provide=managed". After I've connected, I tried to run "vagrant provision prod" which installed the Puppet stuff successfully, but broke then when it should have installed all the nice stuff like apache and so on.

`==> prod: Running provisioner: puppet...
Shared folders that Puppet requires are missing on the virtual machine.
This is usually due to configuration changing after already booting the
machine. The fix is to run a `vagrant reload` so that the proper shared
folders will be prepared and mounted on the VM.

C:\VirtualMachines\VagrantBoxes\APP01>vagrant provision prod

As I understand it it needs the stuff that is usually in /vagrant/puppet/... (the Puppet manuscripts and stuff) to run.
I could try to copy them just from my local computer to the server by hand (or git), but as I mentioned, I'm a lazy pice of shit so I'd prefere if Vagrant is managing that for me. I guess, there's a way, cause https://puphpet.com/ offers support for AWS which also uses a SSH connection.
My Question/Issue/Feature request is: Is it possible to use Synced folders with SSH? If yes, how? If no, could you add it?

Btw. If you are interessted in the Vagrant File: http://stackoverflow.com/questions/26191910/run-puphpet-through-vagrant-managed-server-on-a-remote-server (the "Monster Vagrantfile" note: back then I haven't set the right permissions for the user).

@pascalwacker
Copy link
Author

Update: I put my Vagrantfile and the puppet folder (basicaly just every thing I got from PuPHPet, including my changes to the vagrant file) under version controll and brought it to the server at /vagrant, hoping, that Puppet will find all necessary files in /vagrant/puppet unfortunately it still doesn't work.

If this helps anything, here would be my commandline output:

C:\VirtualMachines\VagrantBoxes\APP01>vagrant up prod --provider=managed
Bringing machine 'prod' up with 'managed' provider...
==> prod: Warning! The ManagedServers provider doesn't support any of the Vagran
t
==> prod: high-level network configurations (`config.vm.network`). They
==> prod: will be silently ignored.
==> prod: Linking vagrant with managed server xxx.xxx.xxx.xxx
==> prod:  -- Server: xxx.xxx.xxx.xxx

C:\VirtualMachines\VagrantBoxes\APP01>vagrant provision
==> dev: VM not created. Moving on...
==> prod: Warning! The ManagedServers provider doesn't support any of the Vagran
t
==> prod: high-level network configurations (`config.vm.network`). They
==> prod: will be silently ignored.
==> prod: Warning! Folder sync disabled because the rsync binary is missing.
==> prod: Make sure rsync is installed and the binary can be found in the PATH.
==> prod: Running provisioner: shell...
    prod: Running: C:/Users/Pascal/AppData/Local/Temp/vagrant-shell20141015-2396
-1qal719.sh
==> prod: stdin: is not a tty
==> prod:
==> prod:  ____        ____  _   _ ____      _      generated using
==> prod: |  _ \ _   _|  _ \| | | |  _ \ ___| |_   ___ ___  _ __ ___
==> prod: | |_) | | | | |_) | |_| | |_) / _ \ __| / __/ _ \| '_ ` _ \
==> prod: |  __/| |_| |  __/|  _  |  __/  __/ |_ | (_| (_) | | | | | |
==> prod: |_|    \__,_|_|   |_| |_|_|   \___|\__(_)___\___/|_| |_| |_|
==> prod: Running provisioner: shell...
    prod: Running: C:/Users/Pascal/AppData/Local/Temp/vagrant-shell20141015-2396
-32scca.sh
==> prod: stdin: is not a tty
==> prod: Pre-existing private key found at 'puphpet/files/dot/ssh/root_id_rsa'
==> prod: Pre-existing private key found at 'puphpet/files/dot/ssh/id_rsa'
==> prod: Adding generated key to /root/.ssh/id_rsa
==> prod: Adding generated key to /root/.ssh/id_rsa.pub
==> prod: Adding generated key to /root/.ssh/authorized_keys
==> prod: Adding generated key to /home/pascal.wacker/.ssh/id_rsa
==> prod: Adding generated key to /home/pascal.wacker/.ssh/id_rsa.pub
==> prod: Adding generated key to /home/pascal.wacker/.ssh/authorized_keys
==> prod: Running provisioner: shell...
    prod: Running: C:/Users/Pascal/AppData/Local/Temp/vagrant-shell20141015-2396
-w975r3.sh
==> prod: stdin: is not a tty
==> prod: Running provisioner: shell...
    prod: Running: C:/Users/Pascal/AppData/Local/Temp/vagrant-shell20141015-2396
-fciv2b.sh
==> prod: stdin: is not a tty
==> prod: Running provisioner: puppet...
Shared folders that Puppet requires are missing on the virtual machine.
This is usually due to configuration changing after already booting the
machine. The fix is to run a `vagrant reload` so that the proper shared
folders will be prepared and mounted on the VM.

C:\VirtualMachines\VagrantBoxes\APP01>

As I see it, it is connected to the server successfully but then runs into troubles, because not all folders are there that it's expecting. I'll try to investigate further which ones are missing and if I can add them manually/create sim links or if they should be linked automaticaly with random names which I can't predict.
Still I'd prefere an easy solution where Vagrant (or this Plugin) is managing every thing.

@tknerr
Copy link
Owner

tknerr commented Oct 15, 2014

Can you verify that you have rsync.exe on the %PATH% ?
Am 15.10.2014 22:47 schrieb "Pascal Wacker" notifications@github.com:

Update: I put my Vagrantfile and the puppet folder (basicaly just every
thing I got from PuPHPet, including my changes to the vagrant file) under
version controll and brought it to the server at /vagrant, hoping, that
Puppet will find all necessary files in /vagrant/puppet unfortunately it
still doesn't work.

If this helps anything, here would be my commandline output:

C:\VirtualMachines\VagrantBoxes\APP01>vagrant up prod --provider=managed
Bringing machine 'prod' up with 'managed' provider...
==> prod: Warning! The ManagedServers provider doesn't support any of the Vagran
t
==> prod: high-level network configurations (config.vm.network). They
==> prod: will be silently ignored.
==> prod: Linking vagrant with managed server xxx.xxx.xxx.xxx
==> prod: -- Server: xxx.xxx.xxx.xxx

C:\VirtualMachines\VagrantBoxes\APP01>vagrant provision
==> dev: VM not created. Moving on...
==> prod: Warning! The ManagedServers provider doesn't support any of the Vagran
t
==> prod: high-level network configurations (config.vm.network). They
==> prod: will be silently ignored.
==> prod: Warning! Folder sync disabled because the rsync binary is missing.
==> prod: Make sure rsync is installed and the binary can be found in the PATH.
==> prod: Running provisioner: shell...
prod: Running: C:/Users/Pascal/AppData/Local/Temp/vagrant-shell20141015-2396
-1qal719.sh
==> prod: stdin: is not a tty
==> prod:
==> prod: ____ ____ _ _ ____ _ generated using
==> prod: | _ \ _ | _ | | | | _ \ | | ___ ___ _ __ ___
==> prod: | |
) | | | | |
) | |
| | |_) / _ \ **| / _/ _ | ' _ \ ==> prod: | __/| |_| | __/| _ | __/ __/ |_ | (_| (_) | | | | | | ==> prod: |_| \**,_|_| |_| |_|_| ___|__(_)**_\**_/|_| |_| |_| ==> prod: Running provisioner: shell... prod: Running: C:/Users/Pascal/AppData/Local/Temp/vagrant-shell20141015-2396 -32scca.sh ==> prod: stdin: is not a tty ==> prod: Pre-existing private key found at 'puphpet/files/dot/ssh/root_id_rsa' ==> prod: Pre-existing private key found at 'puphpet/files/dot/ssh/id_rsa' ==> prod: Adding generated key to /root/.ssh/id_rsa ==> prod: Adding generated key to /root/.ssh/id_rsa.pub ==> prod: Adding generated key to /root/.ssh/authorized_keys ==> prod: Adding generated key to /home/pascal.wacker/.ssh/id_rsa ==> prod: Adding generated key to /home/pascal.wacker/.ssh/id_rsa.pub ==> prod: Adding generated key to /home/pascal.wacker/.ssh/authorized_keys ==> prod: Running provisioner: shell... prod: Running: C:/Users/Pascal/AppData/Local/Temp/vagrant-shell20141015-2396 -w975r3.sh ==> prod: stdin: is not a tty ==> prod: Running provisioner: shell... prod: Running: C:/Users/Pascal/AppData/Local/Temp/vagrant-shell20141015-2396 -fciv2b.sh ==> prod: stdin: is not a tty ==> prod: Running provisioner: puppet... Shared folders that Puppet requires are missing on the virtual machine. This is usually due to configuration changing after already booting the machine. The fix is to run avagrant reload` so that the proper shared
folders will be prepared and mounted on the VM.

C:\VirtualMachines\VagrantBoxes\APP01>

As I see it, it is connected to the server successfully but then runs into
troubles, because not all folders are there that it's expecting. I'll try
to investigate further which ones are missing and if I can add them
manually/create sim links or if they should be linked automaticaly with
random names which I can't predict.
Still I'd prefere an easy solution where Vagrant (or this Plugin) is
managing every thing.


Reply to this email directly or view it on GitHub
#25 (comment)
.

@pascalwacker
Copy link
Author

I guess %PATH% is C:\VirtualMachines\VagrantBoxes\APP01 on my Laptop right?

I downloaded rsync (https://www.itefix.net/cwrsync the free version) and first I tried to copy it to my program folder what didn't help anything. Then I copied it to C:\VirtualMachines\VagrantBoxes\APP01

now my command line outputs:

C:\VirtualMachines\VagrantBoxes\APP01>vagrant provision
==> dev: VM not created. Moving on...
==> prod: Warning! The ManagedServers provider doesn't support any of the Vagran
t
==> prod: high-level network configurations (`config.vm.network`). They
==> prod: will be silently ignored.
==> prod: Rsyncing folder: /cygdrive/C/VirtualMachines/VagrantBoxes/APP01/ => /v
agrant
There was an error when attemping to rsync a shared folder.
Please inspect the error message below for more info.

Host path: /cygdrive/C/VirtualMachines/VagrantBoxes/APP01/
Guest path: /vagrant
Error: rsync: connection unexpectedly closed (0 bytes received so far) [Receiver
]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [Receive
r=3.1.0]
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(235) [sender=
3.1.1pre1]

C:\VirtualMachines\VagrantBoxes\APP01>

I haven't installed any rsync stuff on my server, do I need to have a rsync daemon running on the remote host? (or does that come automaticaly with Ubuntu 14.04?)
Did you ever try to make an rsync from a windows machine to a linux machine with Vagrant?

Note: I tried it with and without firewall/antivir on my computer, didn't make a difference.

@kikitux
Copy link

kikitux commented Oct 16, 2014

try to use rsync manually to test

usually the .exe will came with an ssh.exe be sure of put both on that app path

On 16/10/2014, at 7:53 pm, Pascal Wacker notifications@github.com wrote:

I guess %PATH% is C:\VirtualMachines\VagrantBoxes\APP01 on my Laptop right?

I downloaded rsync (https://www.itefix.net/cwrsync the free version) and first I tried to copy it to my program folder what didn't help anything. Then I copied it to C:\VirtualMachines\VagrantBoxes\APP01

now my command line outputs:

C:\VirtualMachines\VagrantBoxes\APP01>vagrant provision
==> dev: VM not created. Moving on...
==> prod: Warning! The ManagedServers provider doesn't support any of the Vagran
t
==> prod: high-level network configurations (config.vm.network). They
==> prod: will be silently ignored.
==> prod: Rsyncing folder: /cygdrive/C/VirtualMachines/VagrantBoxes/APP01/ => /v
agrant
There was an error when attemping to rsync a shared folder.
Please inspect the error message below for more info.

Host path: /cygdrive/C/VirtualMachines/VagrantBoxes/APP01/
Guest path: /vagrant
Error: rsync: connection unexpectedly closed (0 bytes received so far) [Receiver
]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [Receive
r=3.1.0]
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(235) [sender=
3.1.1pre1]

C:\VirtualMachines\VagrantBoxes\APP01>
I haven't installed any rsync stuff on my server, do I need to have a rsync daemon running on the remote host? (or does that come automaticaly with Ubuntu 14.04?)
Did you ever try to make an rsync from a windows machine to a linux machine with Vagrant?

Note: I tried it with and without firewall/antivir on my computer, didn't make a difference.


Reply to this email directly or view it on GitHub.

@tknerr
Copy link
Owner

tknerr commented Oct 18, 2014

@pascalwacker you can run echo %PATH% to see what's on your path. If you want to add a directory to your PATH, you can do so from the commandline (e.g. set PATH=C:\path\to\rsync;%PATH%) or globally via System Properties -> Environment Variables.

I'm not sure about the cwrsync, I'm using a cygwin rsync and ssh to make the vagrant windows experience better:

Add these two directories to your PATH as described above and you should be happy.

@djtm
Copy link

djtm commented Apr 28, 2017

For reference: I needed
override.nfs.functional = false
along with the other overrides in my Vagrantfile for this combination to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants