docker use layers, vagrant doesn't so, if you first vagrant up, you have
vagrant provision vagrant reload --provision vagrant up --provision etc, in my particular use case, some commands like update rpms, I can run them more than one, nothing happen others, I just include some checks, example, if the user exits, then all good, if not, then create.. etc for software install, i check, if the software is installed say /u01/app/oracle/product/12.1.0.1/dbhome_1/bin exits.. then.. skip etc. On Fri, Apr 25, 2014 at 2:17 AM, Kevin Schumacher < [email protected]> wrote: > I'm using the hashicorp/precise64 box, and using the Docker provisioner. > > I understand that I can issue some print statements (and am doing that). > > When developing dockerfiles, each step is cached so that if there is an > error, you can essentially fix the error in the Dockerfile and more or less > resume. Vagrant doesn't do something similar, does it? > > I see now that if I just do a `vagrant provision` it starts to do the > provision steps. So if the provision fails after an initial vagrant up, I > can just edit the commands to the provisioner, issue a `vagrant provision`, > and it will restart with the docker provisioner (assuming I don't have any > other provisioners set up). As long as I make sure the commands the > provisioner issues can be run multiple times safely, then this works for > me. This is helpful information. Previously I thought I had to do a vagrant > destroy && vagrant up to try again (so it would configure the whole VM > again). > > Thanks, > Kevin > > On Wednesday, April 23, 2014 8:18:51 PM UTC-4, Alvaro Miranda Aguilera > wrote: >> >> Hello, >> >> Vagrant will automate what you tell Vagrant to automate. >> >> So, what you should think is, what to do fi something change or you go >> half way trough.. >> >> If a end user was using your Vagrantfile, then he should be able to do >> vagrant destroy, vagrant up and get a working environment. >> >> In your particular case, you want to be able to troubleshoot, then, you >> can use puts "running this..." before eachs ection so yoiu can follow what >> is doing.. >> >> if you use scripts, make sure, the script can be called more than once >> and it won't break anything.. so you can do vagrant provision and should >> skip what did and continue. >> >> >> What OS is the host? the docker is inside a Vagran'ts managed vm? >> >> Are you using docker provisioner os just shell provisioner to call >> vagrant commands? >> >> >> On Thu, Apr 24, 2014 at 7:22 AM, Kevin Schumacher <kevinmichae...@gmail. >> com> wrote: >> >>> Hi all, >>> >>> I am very new to vagrant, and have a couple of questions: >>> >>> 1. Is there a way to resume a failed provisioning? >>> 2. Is there a way to "step through" a vagrantfile? >>> >>> For background: >>> >>> I am trying to use Vagrant for quick "one click" setup of a development >>> infrastructure environment when new people join the team. We have an >>> unfortunately complicated stack, and have previously been utilizing Docker >>> and dockerfiles to keep everyone's development environments in sync. >>> >>> I am hoping to be able to utilize the work put into creating the >>> dockerfiles with Vagrant, and to be able to have someone new just "vagrant >>> up" and provision the full stack in Docker containers (this would lower the >>> barriers to entry -- the new team member would not have to understand >>> immediately how to set up the stack, install docker, how the various parts >>> of the stack are related, etc. before being able to contribute some code to >>> the web app on top of the stack) >>> >>> However, I am finding that troubleshooting failures during provision is >>> slow and painful. Earlier today I found that a dockerfile no longer worked >>> because of a remote file which moved, which was causing my provision to >>> fail. >>> >>> >>> Thanks, >>> Kevin >>> >>> -- >>> 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. > -- 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.
