I have a new developer coming to work with me soon, and I'd like to make it as simple as possible for them to get a development environment set up.
I'm currently using a Vagrant (Laravel Homestead) box with about 15 domains set up, each with different configurations (different PHP versions etc), and I'd like to just share the existing box with them if possible.
Is it as simple setting up a repository with the VagrantFile, getting them to clone it and provision the box, or are there more steps involved?
Also, I've had to edit the MySQL configuration on the box, is there any way I can include these updates in what I share with them, or will they just need to reconfigure their own version manually?
Any advice appreciated.
Thanks
The easiest way to share the Homestead environment is to use the after.sh file to to perform any customization you may need beyond what Homestead gives you.
You can also copy your Homestead.yaml file to Homestead.yaml.example for the new coworker to easily copy and paste the sites & any other configuration changes.
Related
I have a website that creates from Laravel. I want to do some customization to that.
Can I edit directly from my server or need anysoftwair or anything else
I need help editing it. How can I do it?
Thank you
You can edit the files directly on your server using any text editor available to you, however, it's not advisable to make changes directly on a live/production environment. What happens if/when you make a mistake or a change has a negative effect (e.g. on performance), how will you revert those changes efficiently and swiftly, and how will you know which file(s) are causing any issue(s)?
Instead create a local environment to make and test your changes, ideally then deploy those changes to a remote staging/development environment for further testing before deploying to your live/production environment.
There used to be a gui where you could configure PuPHPet settings for vagrant.
It would allow you to set, shared folders, users, Apache, Mysql, etc.
I can't seem to find this site anymore. Is it gone?
Is there an alternative way to configure a vagrant for Magento?
PuPHPet is abadoned according to it's creator: https://twitter.com/juantreminio/status/1199022035588075520
However, the whole project was open source and you can find the repositories here:
https://github.com/puphpet
Are there any tools that I can use to automatically build vagrant base boxes on a remote linux server. It'll be better if it is extendable and version control friendly.
Thanks. First question on SO.
Packer can create Vagrant boxes. It's from the same company that have created and maintain Vagrant.
http://www.packer.io/docs/post-processors/vagrant.html
Another valid option is Veewee, as pointed out in a previous answer.
Try out veewee: https://github.com/jedi4ever/veewee
I'm not sure by "extendable" what you mean. veewee should do the job. it supports debian preseed file and other configurations that can be checked into version control.
We have multiple projects that each are going to use Vagrant for managing their development environments. We're happily using Chef for provisioning and all that's working fine. But, we're finding that our Vagrantfiles have a lot of cut'n'paste between them. We'd like to consolidate our Vagrantfile definitions so that they can share from a common Vagrantfile-library (either locally or installed from some remote location). Is this a thing?
One good way could be to include the common directives of your Vagrantfile in a custom box.
A box is just a .tar or tar.gz file containing all the stuff needed by the provider for running the Vagrant instances. As far as I know, all provider-specific formats allow adding a Vagrantfile with common settings to the box.
I'm trying to create a custom vagrant box for my team to use. The box is based off the base CentOS-x64-6.4-virtualbox-guest-additions-and-chef box. I vagrant up the VM and installed a bunch of software on it. With the software in place, I created a custom Vagrantfile and then packaged the box with vagrant package --output "my-custom-centos.box" --vagrantfile Vagrantfile and made it available.
Unfortunately, it turns out that when you pull down the shared box, the default shared directory that maps /vagrant on the box to the current working directory doesn't work (folder is empty). Furthermore, adding additional custom working directories also has no effect. I can't seem to find any good resources for how best to package custom vagrant boxes and haven't seen anything like shared directories not working. Any help would be greatly appreciated.
When you add --vagrantfile Vagrantfile to your package command, it embeds the Vagrantfile that the box was using into the package. I think the outermost Vagrantfile is supposed to take precedence over the others. The default shared folder is always where you set up your box (where your Vagrantfile and .vagrant folder are) and will change each time you start a box from a new place. When I make custom boxes, I leave the Vagrantfile out of the package and have not run into any problems with shared files. Hopefully some of that helps.
I tried to package a box once and ran into all sorts of issues... its a little hard to speculate on the exact issue you are having but in my experience Vagrant can be a little picky.
I found it better to just use a working base box and make sure to include everything that needs to be installed within a provisioning script.
The easiest way to get started is probably just to use the shell provisioner where you can literally just get it to run all of the same commands you are already running. But if you want to do things in a more robust way you should check out Chef since the base box you using already includes it.
Using Chef you will be able to get everything installed that you need on your box in a repeatable and extendable way... it's really quite powerful once you get your head around it.