Vagrant, puppet, lemp, drupal, drush, xhprof, xdebug, redis stack, based on Fedora 22
This is a vagrant setup that mimics a server on Pantheon (which uses Fedora 22 and the stack described above at the time of writing), although it can be adapted to run on any Linux distro.
You don't need to setup a database, you can start with plain files.
cp {example_,}config.yml
cp sites.d/example.yml{.off,} # <== at the very least, modify the site_root_local line
vagrant up
- Add starting explanatory text
- Finish rest of documentation
- Delete old text below this area
- You will need to have your ssh keys created and setup in github, if you havent done that yet
- You will need 3 vagrant plugins, installed by running the following command in terminal: sudo vagrant plugin install vagrant-cachier vagrant-hostsupdater vagrant-triggers
- You will also need VirtualBox installed: https://www.virtualbox.org/wiki/Downloads
- You will need to pull a branch of your site from github (ie, https://github.com/HID-GS/HID-Global), and place it in the location specified in the "shares" section of config.yml (ie, ~/Sites/HID-Global/hid)
- Setup your SSH keys
- If you have nothing in the
~/.ssh
folder, run the following commands in terminal:
- If you have nothing in the
ssh-keygen # press <enter> until it is done
cat ~/.ssh/id_rsa.pub | pbcopy # this will copy your public key to the pasteboard
- Setup your SSH keys (cont'd)
- Visit the ssh keys page in github and click on Add SSH Key
- Choose any name you'd like such as work laptop for the title field
- Go to the key field and press ⌘-V to paste the ssh key you copied above
- Click on Add key to Save
- Download the latest version of vagrant
- Download the vplampd-stack
- Alternatively, clone the git repo with:
mkdir -p ~/workspace/vagrant 2> /dev/null
cd ~/workspace/vagrant
git clone https://github.com/aloyr/vplampd-stack
cd vplampd-stack
- Move unzipped "vplampd-stack-master" folder to a place where you'd like to keep the new Vagrant build (ie, create something like /Users/[username]/workspace/vagrant and place it there...)
- Navigate to where you put the vplampd-stack-master folder
- Copy the example.config.yml file in that location, and make a copy called "config.yml" In terminal:
cp {example.,config.yml}
vim config.yml
- Ask a fellow dev for a copy of the current Drupal DB, as well as their config.yml file.
- Using the other dev's config.yml file as a template, modify the config.yml file you copied from example.config.yml.
- Get a recent mysql dump of the DB, modify the "database" section of the config.yml to suit the DB you're using, and put the DB in the "vplampd-stack-master/data" folder.
- Create a ".drush" folder in your home directory.
In terminal:
mkdir ~/.drush
- Ideally, you could also properly install drush on your host box, but that's not necessary for this process.
- To install drush, use the following commands and start a new terminal session for the changes to apply:
- Ideally, you could also properly install drush on your host box, but that's not necessary for this process.
curl -sS https://getcomposer.org/installer | php
sudo mkdir -p /usr/local/bin 2> /dev/null
echo 'export PATH="$PATH:~/.composer/vendor/bin:/usr/local/bin"' >> ~/bash_profile
sudo mv composer.phar /usr/bin/composer
composer global require drush/drush:7.*
- In terminal, run
vagrant up
inside the vplampd-stack-master folder.- If you get a permissions error, run
sudo chown -R $USER $HOME/.vagrant.d
, then runvagrant up
again.
- If you get a permissions error, run
- If all works well, run the grunt build in order to use the current CSS / JS. In terminal:
ssh root@[hostname]
cd [location of the new theme folder on the vagrant box]
nvm install 0.10.32
nvm use v0.10.32
rvm install 1.9.3
rvm use 1.9.3
npm install
CI=true bower install --allow-root
bundle install
grunt
- Navigate to the hostname defined in the config.yml file on your host box's browser
- Clear Drupal cache (if needed)
- Voila! All set!