Skip to content

Instantly share code, notes, and snippets.

@xytis
Created November 25, 2013 10:57
Show Gist options
  • Save xytis/7639663 to your computer and use it in GitHub Desktop.
Save xytis/7639663 to your computer and use it in GitHub Desktop.
Development environment
Development environment
=======================
Prefered usage:
``` bash
sh -c "`curl -fsSL https://raw.github.com/kupishoes/leos.tool/install.sh`"
leos init
loes clone callcenter
```
Steps in above script:
1. Check out [repo].app and [repo].env to local folders:
+ leos/
|- callcenter.app
|- callcenter.env
2. Choose VM destination
* local using Vagrant.
* remote using some rack management utility.
3. Deploy to VM and mount shared folder which contain source. In above example -- `leos/callcenter.app` is mounted to VM as `/data/callcenter.app`
4. Profit.
Burdens:
1. a shell script should wrap all above commands to a single entry point.
sh -c "`curl -fsSL [url]`" #installs 'leos' to local path.
leos init #creates leos folder which will work as workspace folder. Might create .leos in home.
#Also should obtain hub using homebrew.
leos clone [leos project name] #should fork kupishoes/[project] to user github account using hub tool (if not forked before)
#Then clone .env and .app versions of it. Or any other versions if it is configured to do so.
leos start [project dir] #starts the VM
leos reload #reload the VM (in either location)
leos halt #halt the VM
#this script could also provide other neat features.
leos test #runs all the tests for current project
2. xdebug must be configured to use [remote server debugging](http://stackoverflow.com/questions/7234471/remote-debugging-with-xdebug-and-phpstorm).
Required ansible playbooks:
* Configure user:
Each VM should use non default user (that is asterisk box uses `asteriskpbx`, callcenter box should have `kupishoes` user...)
* Install required software:
* MariaDB
* Asterisk [done]
* PHP-FPM
* CLI sugar [done]
* Common [done]
* Nginx
* Mount local directories to host
* Setup xdebug for remote usage
* Callcenter playbook
* BOB playbook
> Written with [StackEdit](https://stackedit.io/).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment