-
Notifications
You must be signed in to change notification settings - Fork 24
Eliminate need to run composer.install
before vagrant up
but still have a working initial site
#48
Comments
My 2cents after all the discussions we had: This project is already at a point where it slightly defies the purpose of Vagrant: Provisioning. At the point where you start adding zipped packages and as there's already close to no provisioning going on, you can as well just provide a fully pre-provisioned VM. But that's like back in 2000 and obviously not this projects goal. Ad Composer and the ZIP: IIRC Composer can't switch resources, so you will have to either provide local packages that you can use, or you just drop Composer completely. There's no fallback from some remote location possible. Using Composer for a local install imho is somehow pointless. Also you move yourself somewhere where you have to use Gemnasium and other tools just to monitor dependencies to keep this project up to date. The only reason to still use Vagrant now is the hostsupdater or a similar plugin. That could as well be replaced by a simple shell script to update the Summed up, I personally think that the goal is set a bit too high and slowly but surely moves your project into a dead end and backwards instead of forwards. Still hope it helps that I have written my opinion here for you. |
Thanks for taking the effort.
Interesting. That is not what I have understood the point of Vagrant to be:
But rather than assume my understanding was right I decided to google a bit. Here is what I found:
Further I found the most up-voted answer to the question "What's the purpose of Vagrant?" on Hacker News (with 37 votes) where none of the four (4) points presented even mentions provisioning or implies that provisioning is a primary purpose of Vagrant:
I even remember being told that Mitchel Hashimoto said that doing significant provisioning in a So while I do absolutely respect your opinion and appreciate that you see Vagrant's primary value as its ability to support Provisioning for your use-cases I will also say that others -- including myself -- see provisioning within Vagrant as just being a necessary evil if you do not have a pre-provisioned box image.
You've used "Ad" several times when communicating with me, but I do not know what it means. Does it mean "In Reference To?"
I must not have explained what I meant well enough. Let me try a different approach. Let's assume we had Composer run inside the box as part of a provisioning process, like your pull request. That would produce a directory of files that had been "composed." Now assume that you ZIP and then delete the directory, and then move the ZIP file to In practice that is would you are doing but using Packer to call When the developer runs Now you may ask "What if the ZIP file is out of date?" No problem, it will still work when someone new to WPLib Box clones the box for the first time -- which is one of our goals -- and yet to ensure it is up-to-date the developer only need run Maybe the best way to fully understand it is to see it in action after we get 0.10.6 out the door?
I do respect your opinion, and I thank you again for taking the time to verbalize it. And you may be right, and time will tell. But I can see a really clear vision about where we are headed and I see it as moving forwards significantly, not backwards. Maybe what we offer will not provide value today for people with your skill levels, but we think it will benefit the 80% who do not have your skills and really have no interest in gaining them. And having people using this box will give us calendar time to develop a much more powerful box later this year -- based on CoreOS and Docker, with an admin console -- or maybe early next year. We do need some time for that anyway because some of the software we will be using needs to mature first. |
@clubdeuce (and @franz-josef-kaiser): After leaving that long reply above, another approach occurred to me that I had not previously considered. Rather than use a ZIP file on the box image that would need to be updated every time any of the software contained within would need to be updated, why not run This would achieve the same goals I want to achieve because cloning the Git repo is something people will have to do and clone is typically super fast and I've never seen a clone fail as long as Git access has been set up to work correctly on the host/developer's machine. And I think this would eliminate the need for issue #13 too. @clubdeuce If you agree with this I can take this ticket and make the changes. |
wplib.box
w/ZIP file instead of composer.install
composer.install
before vagrant up
but still have a working initial site
composer.install
before vagrant up
but still have a working initial sitecomposer.install
before vagrant up
but still have a working initial site
@mike What is the status of this? Should we include in 0.10.7 or punt? |
@clubdeuce Given I am heavily focused on WPLib |
@clubdeuce I have basically resolved this. We should discuss how I did it so that you are aware are you are adding features to the box. |
Some of the goals for WPLib box are:
Running anything complicated for provisioning, or running anything that could potentially fail during provision then goes counter to these goals. Examples of things that could fail:
That means we cannot run anything more complex than a simple Bash script that downloads nothing for provisioning.
Thus to eliminate the need to run
composer install
-- inside the box or out -- we should copy a ZIP file containing the WordPress website forwplib.box
from an/opt/provision
directory inside the box to the box's/var/www
directory (which maps towww/
in our host's directory) and then unzip it.This will have the same effect as running
composer install
as ifcomposer install
was run at the time of box image creation instead of at time of firstvagrant up
. That will give us a known workingwplib.box
website and on that website we can provide instructions for the user that would include one of:composer update
after runningvagrant ssh
, orcomposer update
on the host machine after ensuring that composer is installed.The text was updated successfully, but these errors were encountered: