Discussion:
[vagrant-up] File transfer between 2 vagrant machines.
c***@gmail.com
2018-08-28 12:40:45 UTC
Permalink
Scenario:

I have setup 3 vagrant boxes. They consist of a web,db, and a build vm.

I am using precise 32 Ubuntu boxes.

The build server starts up last and builds a .war file for my web.

I am trying to transfer file over to web during the machine boot.

I am trying to use scp however it requests a password.


Question:

What syntax be it bash, or python can i use to transfer file. I am trying
to get around transferring keys to my local host. I just want to make a
connection to the web server and copy a file to a directory.

I am looking for the best way.

Thank You for any assistance.
--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
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 vagrant-up+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/e6177889-453b-4cf3-a639-e4e249594b3d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
JP Toto
2018-08-28 20:16:16 UTC
Permalink
The simplest way to do this (assuming Virtualbox) would be to use the
shared /vagrant/ folder on your guest VMs. If you're using Vagrant boxes
(precise 32) with the host hypervisor tools already installed, when you
boot them up they will automatically map /vagrant/ to the root of your
project folder on your host desktop in the folder where your Vagrantfile
resides.

Any files placed there are automatically available in each VM guest. You
could drop your build into /vagrant/ and each of the other VMs will be able
to read it automatically.

Alternatively, you could use a shell provisioner
<https://www.vagrantup.com/docs/provisioning/shell.html> in each of the
stanzas in your Vagrantfile for your 3 VMs to upload or write out a common
ssh key to each guest so that when you SSH files back and forth between
them, you won't be prompted for a password. You could echo the common
keyfile to /home/vagrant/.ssh/authorized_keys on each guest VM which will
allow them to SSH between each other on the same network. This isn't the
_most_ secure option but assuming you're working locally, you should be ok.
Post by c***@gmail.com
I have setup 3 vagrant boxes. They consist of a web,db, and a build vm.
I am using precise 32 Ubuntu boxes.
The build server starts up last and builds a .war file for my web.
I am trying to transfer file over to web during the machine boot.
I am trying to use scp however it requests a password.
What syntax be it bash, or python can i use to transfer file. I am trying
to get around transferring keys to my local host. I just want to make a
connection to the web server and copy a file to a directory.
I am looking for the best way.
Thank You for any assistance.
--
This mailing list is governed under the HashiCorp Community Guidelines -
https://www.hashicorp.com/community-guidelines.html. Behavior in
violation of those guidelines may result in your removal from this mailing
list.
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
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
To view this discussion on the web visit
https://groups.google.com/d/msgid/vagrant-up/e6177889-453b-4cf3-a639-e4e249594b3d%40googlegroups.com
<https://groups.google.com/d/msgid/vagrant-up/e6177889-453b-4cf3-a639-e4e249594b3d%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
JP Toto | ***@gmail.com | http://jptoto.jp | @jptoto
<http://twitter.com/jptoto>
--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
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 vagrant-up+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CAAYNrX8ini26BmEctmr0%3DYXKrkbhz%3DDk1Vb%3DSHRx%2B25tgOucrw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Alvaro Miranda Aguilera
2018-09-03 12:28:30 UTC
Permalink
if you copy files on /vagrant those will be available on all the boxes.


Alvaro.
Post by c***@gmail.com
I have setup 3 vagrant boxes. They consist of a web,db, and a build vm.
I am using precise 32 Ubuntu boxes.
The build server starts up last and builds a .war file for my web.
I am trying to transfer file over to web during the machine boot.
I am trying to use scp however it requests a password.
What syntax be it bash, or python can i use to transfer file. I am trying
to get around transferring keys to my local host. I just want to make a
connection to the web server and copy a file to a directory.
I am looking for the best way.
Thank You for any assistance.
--
This mailing list is governed under the HashiCorp Community Guidelines -
https://www.hashicorp.com/community-guidelines.html. Behavior in
violation of those guidelines may result in your removal from this mailing
list.
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
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
To view this discussion on the web visit
https://groups.google.com/d/msgid/vagrant-up/e6177889-453b-4cf3-a639-e4e249594b3d%40googlegroups.com
<https://groups.google.com/d/msgid/vagrant-up/e6177889-453b-4cf3-a639-e4e249594b3d%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
Alvaro
--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
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 vagrant-up+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CAHqq0eyryV%3D11uQu9AqOcVWSAcwBehEO5qcz6-pQxkG4eeUSJA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
David Roderiques
2018-09-03 22:50:53 UTC
Permalink
This was great information. I ended up configuring my build to copy to my
vagrant shared folder, and then upon my web up I did a copy to tomcat
folder.

Thank you for the help.
Post by Alvaro Miranda Aguilera
if you copy files on /vagrant those will be available on all the boxes.
Alvaro.
Post by c***@gmail.com
I have setup 3 vagrant boxes. They consist of a web,db, and a build vm.
I am using precise 32 Ubuntu boxes.
The build server starts up last and builds a .war file for my web.
I am trying to transfer file over to web during the machine boot.
I am trying to use scp however it requests a password.
What syntax be it bash, or python can i use to transfer file. I am
trying to get around transferring keys to my local host. I just want to
make a connection to the web server and copy a file to a directory.
I am looking for the best way.
Thank You for any assistance.
--
This mailing list is governed under the HashiCorp Community Guidelines -
https://www.hashicorp.com/community-guidelines.html. Behavior in
violation of those guidelines may result in your removal from this mailing
list.
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
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
To view this discussion on the web visit
https://groups.google.com/d/msgid/vagrant-up/e6177889-453b-4cf3-a639-e4e249594b3d%40googlegroups.com
<https://groups.google.com/d/msgid/vagrant-up/e6177889-453b-4cf3-a639-e4e249594b3d%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
Alvaro
--
This mailing list is governed under the HashiCorp Community Guidelines -
https://www.hashicorp.com/community-guidelines.html. Behavior in
violation of those guidelines may result in your removal from this mailing
list.
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
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
To view this discussion on the web visit
https://groups.google.com/d/msgid/vagrant-up/CAHqq0eyryV%3D11uQu9AqOcVWSAcwBehEO5qcz6-pQxkG4eeUSJA%40mail.gmail.com
<https://groups.google.com/d/msgid/vagrant-up/CAHqq0eyryV%3D11uQu9AqOcVWSAcwBehEO5qcz6-pQxkG4eeUSJA%40mail.gmail.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
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 vagrant-up+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CABtnDr-Ya%3Df9cej9GfxyYOCO6ZKBf53-BXyA6yXcqTpfaikcjg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Loading...