Discussion:
[vagrant-up] access host gz/bin using provisioning shell
j***@gmail.com
2018-10-05 19:06:25 UTC
Permalink
Here's the folder structure on the host :
vagrantfile
/master/migrate/R1/binaries/ag/file1.bin
/master/migrate/jdk-8u181-linux-x64.tar.gz
/master/migrate/install-java.sh
/master/migrate/env-baseline.sh

vagrantfile has an entry :
ag01.vm.provision "shell", path: "./master/migrate/env-baseline.sh"

And, in the env-baseline.sh we install java :
JAVA_FILE =./master/migrate/jdk-8u181-linux-x64.tar.gz
./master/migrate/install-java.sh -f $JAVA_FILE -p "/opt/infra"

Obviously, this fails.Thus tried :
config.vm.provision "file", source: "./master/migrate/", destination:
"/tmp"

Updated env-baseline.sh to have java installed :
JAVA_FILE =/tmp/jdk-8u181-linux-x64.tar.gz
/tmp/install-java.sh -f $JAVA_FILE -p "/opt/infra"
Got the permission deined error :
C:/tools/HashiCorp/Vagrant/embedded/gems/2.1.5/gems/net-scp-1.2.1/lib/net/scp/upload.rb:65:in
`initialize': Permission denied @ rb_sysopen -
C:/u01/workspace/VagSM/master/migrate/./R1/binaries/sm/installer.properties
(Errno::EACCES)
from
C:/tools/HashiCorp/Vagrant/embedded/gems/2.1.5/gems/net-scp-1.2.1/lib/net/scp/upload.rb:65:in
`open'
from
C:/tools/HashiCorp/Vagrant/embedded/gems/2.1.5/gems/net-scp-1.2.1/lib/net/scp/upload.rb:65:in
`upload_file_state'
from
C:/tools/HashiCorp/Vagrant/embedded/gems/2.1.5/gems/net-scp-1.2.1/lib/net/scp/upload.rb:38:in
`upload_current_state'


How does one go about making the gz and bin files available to the sh ?

Regards.
--
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/85765387-b18a-4c41-ba8b-c17281906b69%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Alvaro Miranda Aguilera
2018-10-09 20:34:53 UTC
Permalink
hello

your scripts need to assume ./master will be /vagrant/master

so ./master/migrate/jdk-8u181-linux-x64.tar.gz is present in

/vagrant/master/migrate/jdk-8u181-linux-x64.tar.gz

just adjust the path and all will be good.

alvaro.
Post by j***@gmail.com
vagrantfile
/master/migrate/R1/binaries/ag/file1.bin
/master/migrate/jdk-8u181-linux-x64.tar.gz
/master/migrate/install-java.sh
/master/migrate/env-baseline.sh
ag01.vm.provision "shell", path: "./master/migrate/env-baseline.sh"
JAVA_FILE =./master/migrate/jdk-8u181-linux-x64.tar.gz
./master/migrate/install-java.sh -f $JAVA_FILE -p "/opt/infra"
"/tmp"
JAVA_FILE =/tmp/jdk-8u181-linux-x64.tar.gz
/tmp/install-java.sh -f $JAVA_FILE -p "/opt/infra"
C:/tools/HashiCorp/Vagrant/embedded/gems/2.1.5/gems/net-scp-1.2.1/lib/net/scp/upload.rb:65:in
C:/u01/workspace/VagSM/master/migrate/./R1/binaries/sm/installer.properties
(Errno::EACCES)
from
C:/tools/HashiCorp/Vagrant/embedded/gems/2.1.5/gems/net-scp-1.2.1/lib/net/scp/upload.rb:65:in
`open'
from
C:/tools/HashiCorp/Vagrant/embedded/gems/2.1.5/gems/net-scp-1.2.1/lib/net/scp/upload.rb:65:in
`upload_file_state'
from
C:/tools/HashiCorp/Vagrant/embedded/gems/2.1.5/gems/net-scp-1.2.1/lib/net/scp/upload.rb:38:in
`upload_current_state'
How does one go about making the gz and bin files available to the sh ?
Regards.
--
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/85765387-b18a-4c41-ba8b-c17281906b69%40googlegroups.com
<https://groups.google.com/d/msgid/vagrant-up/85765387-b18a-4c41-ba8b-c17281906b69%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/CAHqq0exNr0MxM04B0WXZJuofNPHkwqBT6cVZoBecti3bMRfX3A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Loading...