Vagrant/Puppet GUI Configuration
いいもんみっけ
seen from India
seen from Malaysia

seen from Malaysia
seen from Russia
seen from Netherlands
seen from United States
seen from Malaysia
seen from Canada

seen from Malaysia

seen from Malaysia

seen from United States
seen from Maldives

seen from Germany
seen from United States

seen from Malaysia
seen from Maldives

seen from United States
seen from China
seen from China

seen from Germany
Vagrant/Puppet GUI Configuration
いいもんみっけ
Vagrant happy time
For another couple of hours I was struggling with permissions on my Vagrant/Puphpet virtual machine. After installation of fresh laravel instance I tried to run some migrations but got the error:
PHP Fatal error: Uncaught exception 'UnexpectedValueException' with message 'The stream or file "/var/www/laracast/storage/logs/laravel-2015-04-25.log" could not be opened: failed to open stream: Permission denied' in /var/www/laracast/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:84
Simple chmod -R didn’t do the magic and permissions stayed untouched. After some googling I found that NFS shared folder type doesn’t allow chmod on the fly. Then I found this option which should fix the problem:
config.vm.synced_folder "#{folder['source']}", "#{folder['target']}", id: "#{folder['id']}", type: nfs, :mount_options => ["dmode=777","fmode=666"]
But when running up the VM vagrant printed me error:
mount.nfs: an incorrect mount option was specified
Googled again and found than NFS is not supporting options like dmode and fmode. Oh my zhh, what is wrong with you, NFS?
After another hour of searching found nothing yet I finally decided to switch to rsync or smth more friendly and went to puphpet site to find out how. But by accident came across a note about NFS
Make sure to install the vagrant-bindfs plugin with $ vagrant plugin install vagrant-bindfs.
I already had it installed and deiced to check what bindfs is. The documentation said:
This allow you to change owner, group and permissions on files and, for example, work around NFS share permissions issues.
What? The solution was under my very nose all that time. So I looked through to bindfs examples and found what I really needed:
config.bindfs.bind_folder "/mnt/vagrant-#{i}", "#{folder['target']}", user: sync_owner, group: sync_group, perms: "u=rwx:g=rwx:o=r"
I just added , perms: "u=rwx:g=rwx:o=r" to existing record and voila - everything worked just find.
Summary: In order to change permissions on NFS shared folders under Vagrant VM add desired permissions to config.bindfs.bind_folder config.
PS: While searching for solution found some pleasant article on vagrant’s documentation site. Every time I ran vagrant box I had to type my pass in order to mount shared folders. This article showed how to avoid this step:
type in terminal
sudo visudo
which will open sudoer file. Now add this entry to it
Cmnd_Alias VAGRANT_EXPORTS_ADD = /usr/bin/tee -a /etc/exports Cmnd_Alias VAGRANT_NFSD = /sbin/nfsd restart Cmnd_Alias VAGRANT_EXPORTS_REMOVE = /usr/bin/sed -E -e /*/ d -ibak /etc/exports %admin ALL=(root) NOPASSWD: VAGRANT_EXPORTS_ADD, VAGRANT_NFSD, VAGRANT_EXPORTS_REMOVE
No more password required. Magic
Connecting sequel pro to mySql server on vagrant host
Connection is made through SSH. Default SSH username is vagrant and private key can be found in puphpet/files/dot/ssh/id_rsa.
Creating A New CentOS Vagrant Base Box
Creating A New CentOS Vagrant Base Box (#CentOS #Vagrant #VirtualBox)
While playing with PuPHPet and Vagrant I realized my needs are specific enough to warrant building my own Vagrant Base Box. My process is outlined below.
Setup VirtualBox Hardware
Start VirtualBox and build a new guest “hardware” profile:
Base Memory: 2048MB
Processors: 2
Boot Order: CD/DVD , Hard Disk
Acceleration: VT-x/AMD-V , Nested Paging , PAE/NX
Display: 32MB Video Memory , 3D…
View On WordPress
WordPress Workflow : Automated Virtual Box Creation
WordPress Workflow : Automated Virtual Box Creation (#WordPress #Vagrant #Puppet #PuPHPet #wcatl)
I am into my first full day back after WordCamp Atlanta (#wcatl) and have caught up on most of my inbox, Twitter, and Facebook communications. As I head into a new week of WordPress plugin production I decided now is as good a time as any to update my work flow.
I learned a lot of new things at WordCamp and if there is one thing I’ve learned from past experience it is DO NOT WAIT. I find…
View On WordPress