Deploy Dev Scotch Box with Vagrant

This may be the easiest way to setup a dev LAMP box on a Mac.

  1. See if Vagrant is installed. From the command line, type “vagrant -v”. If things are correctly installed the Vagrant version will be returned.
  2. Create a folder in your home directory to hold the VM. I will call my folder “scotchbox”.
  3. Navigate to scotchbox’s parent directory and clone the box from github using this command ”

    git clone https://github.com/scotch-io/scotch-box.git scotchbox”

  4. cd scotchbox
  5. vagrant up (should take around 10 minutes)

Once it’s up, it should function at this address:

http://192.168.33.10/

and the files that are being served live in scotchbox/public

This is pretty easy.



New Web Development Workflow

I have had the long-standing habit of working alone, without version control. While many have scolded my workflow, it has been fast and mostly problem free. However, it’s time to change it and while there is a lot to learn in the version control and virtual machine space, actually setting up a dev box with git should be pretty quick (or so they say). So here goes: my notes on how to setup drupal and start theming a site, using git manage versions of the theme.

  1. install virtual box;
  2. download ubuntu server 14.04;
  3. using virtual box, create an ubuntu LAMP VM;
  4. configure port forwarding on the vm for mysql and ssh;
  5. start the vm from the CLI by issuing this command:

    VBoxManage startvm ubuntu –type=headless

  6. connecting to mysql from the host system requires a different bind_address. change bind_address in /etc/mysql/my.cnf to 0.0.0.0 and restart mysql
  7. create a database for drupal by logging into your vm, connecting to mysql and issuing these commands (note: ignore curly quotes):
    CREATE USER ‘user’@’localhost’ IDENTIFIED BY ”; //put password in the ”
    GRANT ALL PRIVILEGES ON *.* TO ‘user’@’localhost’ WITH GRANT OPTION;
    CREATE USER ‘user’@’%’ IDENTIFIED BY ”; //put password in the ”
    GRANT ALL PRIVILEGES ON *.* TO ‘user’@’%’ WITH GRANT OPTION;
  8. CREATE DATABASE dev;
  9. create a folder (“dev”) to hold drupal and download drupal into it
  10. configure drupal to use the mysql server in your vm. this involves copying sites/default/default.settings.php to settings.php and setting the permissions for the file;
  11. navigate to dev folder in CLI and issue this command:

    php -S localhost:8000

  12. visit http://localhost:8000/ in a web browser to test that php is running and to setup the drupal service;
  13. choose the theme that you will customize and do some theming;
  14. create a repository to hold the theme and commit your local code to git.


Basement Wall Leak

I don’t know if other people’s basement walls leak so graphically, but mine shoots a steady stream after a good rainfall.

wall-piss