So, it works.

its able to change into /vagrant
and its able to run the extra script.

Now you need to be able to put some code, and edit the extra.sh

you can do like this:

vagrant ssh
cd /vagrant
bash extra.sh

So you will be just using vagrant to run the script.

Errors you may hace are:

- Symlink fails, This is because virtualbox fs is not a real fs. Workaround
will be use Git, and the script cloning or copying the code to a a folder
in a real FS
- Webserver fails to read updated files. This is because Virtualbox fs
doesn't implement all the posix calls and stuff that tells the application
there has been a change

I happy to help, just we need to see where the error is coming from.

If you can put the Vagrantfile and scripts on a github, and you hit errors,
issues, feel free to share logs, and I can check from the repo.

Thanks
alvaro.


On Wed, Feb 24, 2016 at 6:39 AM, valentin bancarel <
[email protected]> wrote:

> *==> default: Running provisioner: shell...*
>
>     default: Running:
> /var/folders/b3/ndmwgg0d12d1wt10z6pg2sxw0000gq/T/vagrant-shell20160223-3619-zzkjqe.sh
>
> *==> default: stdin: is not a tty*
>
> *==> default: /vagrant*
>
> *==> default: will run npm install*
>
> *==> default: supervisor server.js*
>
> On Tuesday, 23 February 2016 01:06:48 UTC+1, Alvaro Miranda Aguilera wrote:
>>
>> Hello
>>
>> Can you unzip the attached, run `vagrant up` and share the last 20 lines?
>>
>> It should be something like this:
>>
>> *==> default: Running provisioner: shell...*
>>
>>     default: Running:
>> /var/folders/vh/plvhbdqx35ncp68sk1jvs0s80000gp/T/vagrant-shell20160222-39958-1sbyxsl.sh
>>
>> *==> default: stdin: is not a tty*
>>
>> *==> default: /vagrant*
>>
>> *==> default: will run npm install*
>>
>> *==> default: supervisor server.js*
>>
>> z2-3:t kikitux$
>>
>>
>> Thanks
>>
>> Alvaro.
>>
>> On Tue, Feb 23, 2016 at 4:15 AM, valentin bancarel <[email protected]
>> > wrote:
>>
>>> I tried that, but as I explain in my first message, on the vagrant up,
>>> when vagrant execute the provision script, /vagrant isn't created yet.
>>>
>>> On Monday, 22 February 2016 16:00:38 UTC+1, Alvaro Miranda Aguilera
>>> wrote:
>>>>
>>>> Hello,
>>>>
>>>> Seems those commands are not part of the main script.
>>>>
>>>> So you could create a new script. ie extra.sh
>>>> and add a new line to the Vagrantfile
>>>>
>>>> ie:
>>>>
>>>> config.vm.provision :shell, :path => "extra.sh"
>>>>
>>>> Alvaro.
>>>>
>>>>
>>>> On Tue, Feb 23, 2016 at 1:20 AM, valentin bancarel <
>>>> [email protected]> wrote:
>>>>
>>>>> Hi Alvaro, here is the outputs of the two commands you asked, and also
>>>>> the content of my Vagrantfile and the provisioning script I'm using:
>>>>> https://gist.github.com/BancarelValentin/67ab99557821c91ce294
>>>>>
>>>>> What I need now, is to run the commands in the "Extra scripts to be
>>>>> run after folder mount" after that folder is created
>>>>>
>>>>> On Monday, 22 February 2016 02:20:05 UTC+1, Alvaro Miranda Aguilera
>>>>> wrote:
>>>>>>
>>>>>> Hello,
>>>>>>
>>>>>> Well, that is the default user experience, so at somepoint this is
>>>>>> not working.
>>>>>>
>>>>>> Can you share your Vagrantfile?
>>>>>>
>>>>>> And also a gist (gist.githun.cob) of the the following output:
>>>>>>
>>>>>> vagrant destroy (this will delete the box)
>>>>>> vagrant up
>>>>>>
>>>>>> Thanks!
>>>>>> Alvaro.
>>>>>>
>>>>>>
>>>>>> On Mon, Feb 22, 2016 at 3:26 AM, valentin bancarel <
>>>>>> [email protected]> wrote:
>>>>>>
>>>>>>> It's exactly what I want except that, this is intended to be run at
>>>>>>> first "vagrant up" and when the provision script is run the first time, 
>>>>>>> the
>>>>>>> /vagrant folder isn't mounted yet.
>>>>>>>
>>>>>>> --
>>>>>>> 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 [email protected].
>>>>>>> To view this discussion on the web visit
>>>>>>> https://groups.google.com/d/msgid/vagrant-up/f44b7d65-438e-4ed5-ac68-ace5f3f02028%40googlegroups.com
>>>>>>> .
>>>>>>> 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 [email protected].
>>>>> To view this discussion on the web visit
>>>>> https://groups.google.com/d/msgid/vagrant-up/1aca03fd-da58-4b58-8587-1b2627df9a2f%40googlegroups.com
>>>>> <https://groups.google.com/d/msgid/vagrant-up/1aca03fd-da58-4b58-8587-1b2627df9a2f%40googlegroups.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 [email protected].
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/vagrant-up/f97cbe73-7751-4724-9d5b-76c72c70eaee%40googlegroups.com
>>> <https://groups.google.com/d/msgid/vagrant-up/f97cbe73-7751-4724-9d5b-76c72c70eaee%40googlegroups.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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/vagrant-up/125192db-fa22-4684-8f8b-9de787d813ab%40googlegroups.com
> <https://groups.google.com/d/msgid/vagrant-up/125192db-fa22-4684-8f8b-9de787d813ab%40googlegroups.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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vagrant-up/CAHqq0execUN_Q2Fjtb0G4QN_xts4qnQF8vrhE5e7jSPopR-YFg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to