Local Environment Setup.html - pabloviquez/docutest GitHub Wiki
Starkey Foundation - Starkey Video : Local Environment Setup
This page last changed on May 28, 2014 by ivanner.mora.
Main Navigation
Home - Discovery & Architectur- e
Development Menu
Expression Engine Core Changes
Notes & Development priorities
Starkey Social Networks Accounts
Local Setup
To make the development simpler and to have all machines running the same environment, the use of Vagrant is required.
Domains used
After successfully import, deploy and setup the Virtual Machine, the following domains will be available:
Local domain Description
Operation change main website. It runs Laravel and connects to Expression Engine as backed.
http://admin.operationchange.local
Expression Engine CMS backend
Static site, constructed for frontend development or any other need to host anything outside the main website or CMS. This site will not be moved to production, QA or any other server, it's just for local development.
http://teaser.opeationchange.local
Teaser page. Hosts the Operation Change teaser page.
These domains were added to your host file.
Vagrant Specs
- OS: Ubuntu 12.04 LTS (GNU/Linux 3.2.0-23-generic x86_64)
Installation Instructions
(1) Check Requirements
To be able to run the Virtual machine, you must have installed the following Software:
- Apple Xcode Command Line Tools: https://developer.apple.com/downloads/
- Homebrew: http://brew.sh/
- VirtualBox: https://www.virtualbox.org/wiki/Downloads
- Vagrant: http://www.vagrantup.com/downloads.html
- SVN
If you don't have Vagrant or some of the previous pieces of software in the list, please go ahead and install it prior continue with the next step.
Note The SVN repository, uses the version 1.6, please take a look at the page https://confluence.possible.com/display/STARKEYVID/Updating+Local+Environment#UpdatingLocalEnvironment-HowtoupgradeyourSVNbinariesonMAC where are the instructions on how to use version 1.6.
(2) Copy Starkey VM
You can get the virtual machine from several sources.
Outside of Possible Office
If you're outside the Possible offices or VPN, please contact Pablo Víquez for additional sources.
- Download the Virtual Machine from the source provided
- Save the file in the directory where the project will live. This should be a new clean directory. All project files will be stored here
Within Possible Office
If you're within the Possible office or inside the VPN you can get it from the Hereria Server
- Mount Heredia Files
- Copy the file:
Files/Resources/VirtualBox Virtual Machines/Vagrant/projects/Starkey/Starkey.boxto the directory where the project will live
(3) Run Script
Just replace YOURUSERNAME:YOURPASSWORD with your user and password for the POSSIBLE SVN
curl --user "YOURUSERNAME:YOURPASSWORD" -k https://svn.cr.possible.com/svn/starkey/operationchange/sysadmin/bash/vm_setup.sh > vm_setup.sh && sh vm_setup.sh && rm vm_setup.sh
Scripts and Sysadmin Info
Once you've completed the project setup, you'll notice a directory called sysadmin which is located inside the data directory of your project. This directory contains all configurations and configuration scripts. Please take your time to read the following documentation in order to have a clear understanding of what is what.
Scripts
Location Description How and when should you execute it?
vhost_setup.sh
Setups the Virtual Host files in the Apache2 directory
Should be executed only once. IF YOU installed the virtual machine using the steps above, this script should not be executed again. Requires to be executed inside the Vagrant VM
vm_config.sh
Checks or setup the local configs for the Vagrant VM
Will make sure the following domains are mapped locally and pointing to the right VM IP Address. Should be executed every time you change network or when the virtual machine changes IP address
vm_restartservices.sh
Restarts the services running on the Virtual Machine
In the event of configuration changes.
sh sysadmin/bash/vm_restartservices.sh
vm_setup.sh
Virtual Machine Setup
Starkey Virtual Machine Initial Setup. Should be executed only once at the time of setup.
Default Users, Passwords & Access
By default, the Virtual Machine already has configured users and passwords for the database and admin CMS.
MySQL Passwords
Root
- USR: root
- PWD: 123456
How to connect:
>mysql -uroot -p123456
Starkey
- USR: starkey
- PWD: 123456
- Schema: starkey
How to connect:
>mysql -ustarkey -p123456 starkey
CMS Administration
URL: http://admin.operationchange.local/admin.php
- USR: admin
- PWD: 123456
Running Grunt
For front end development you need to run grunt task manager to watch CSS and JS changes.
Steps:
- Connect with SSH to your Vagrant instance
$ vagrant ssh
- Go to Grunt directory
$ cd data/operationchange_trunk/operationchange/grunt/
- run Grunt
$ grunt
How To & Troubleshooting
How do I restart Apache or MySQL or both?
sh data/sysadmin/bash/vm_restartservices.sh
How do I connect to the MySQL server in the virtual machine from my
machine?
mysql -uroot -p123456 -hoperationchange.local
Install Grunt on the Virtual Machine
> vagrant ssh
> sudo su root
> apt-get install -y python-software-properties python g++ make
> add-apt-repository -y ppa:chris-lea/node.js
> apt-get update
> apt-get install software-properties-common
> apt-get install nodejs
> apt-get install ruby
> gem update --system
> gem install compass
> npm install -g grunt-cli
> exit
Mac - Bandwidth Throttle
// Create a pipe with a 15Kb bandwidth limit
sudo ipfw pipe 1 config bw 15KByte/s
// All traffic that goes to port 80, will go through the newly created pipe
sudo ipfw add 1 pipe 1 src-port 80
// Upon finish testing, delete the pipe to remove the bandwidth limit
sudo ipfw delete 1
I used MAMP today and now I cannot see the Vagrant site, is it possible to
have a conflict?
The answer is no, theres no conflict since the Apache web service is running on different machines
I just started the virtual machine (vagrant up) and ran the vm_config.sh
script succesfully, however the browser does not display the site.
Theres a chance that Apache is not running. To restart the Apache service from the host machine (normally your local machine) do:
> sh data/sysadmin/bash/vm_restartservices.sh
In This Page
- Local Setup
- Domains used
- Vagrant Specs
- Installation Instructions
- (1) Check Requirements
- (2) Copy Starkey VM
- Outside of Possible Office
- Within Possible Office
- (3) Run Script
- Scripts and Sysadmin Info
- Scripts
- Default Users, Passwords & Access
- MySQL Passwords
- Root
- Starkey
- CMS Administration
- MySQL Passwords
- Running Grunt
- How To & Troubleshooting
- How do I restart Apache or MySQL or both?
- How do I connect to the MySQL server in the virtual machine from my machine?
- Install Grunt on the Virtual Machine
- Mac - Bandwidth Throttle
- I used MAMP today and now I cannot see the Vagrant site, is it possible to have a conflict?
- I just started the virtual machine (vagrant up) and ran the vm_config.sh script succesfully, however the browser does not display the site.
Site Map

Document generated by Confluence on Sep 16, 2014 14:12