-
Notifications
You must be signed in to change notification settings - Fork 7
Contributing
So you want to contribute to Nomos, you poor poor sucker awesome person you!
Note: Git must be installed.
sudo apt-get install git
in Linux or here for Windows/Mac.
Follow the GitHub tutorials for getting on board with revision control and setting up your SSH keys, etc.
-
Install Virtualbox
sudo apt-get install virtualbox
-
Install Vagrant. On some Linux distros, Apt has older versions of Vagrant that can cause problems, so:
For x64:
wget https://releases.hashicorp.com/vagrant/1.8.1/vagrant_1.8.1_x86_64.deb
sudo dpkg -i vagrant_1.8.1_x86_64.deb
For x86:
wget https://releases.hashicorp.com/vagrant/1.8.1/vagrant_1.8.1_i686.deb
sudo dpkg -i vagrant_1.8.1_i686.deb
- Proceed to "setup" section below.
Install Virtualbox and then Vagrant (in that order) from their websites:
-
Follow vendor directions for installation. Don't set up a VM just yet.
-
Restart your computer. Path variables aren't added until you do.
-
Proceed to "setup" section below.
-
In the terminal or gitshell:
git clone https://github.com/vhs/nomos.git cd nomos vagrant up --provision
-
Vagrant will now download and configure Virtualbox image (~1GB) so grab a coffee and/or beer.
-
Seriously, be patient. This takes a long time, initially. This will include some "timeout" messages, but that is just the VM booting up.
-
After you're done, navigate to http://192.168.38.10 on your host computer.
-
Default credentials for the web interface are vhs / password
-
If you need to log into the Vagrant VM at any point, use
vagrant ssh
for Linux. See here for Windows instructions.
Read about the overall structure of Nomos here.
Contracts, Services, and Endpoints here.
Monitors and domain hooks here.
Start by fetching the latest copy of master then create a branch for the feature or bugfix you are working on. If you have a few small bug fixes you can lump them together in one branch.
git checkout -b my_awesome_branch
You don't have to push your branch to github but if you would like your work to be saved on github then push your branch there:
git push --set-upstream origin my_awesome_branch
This command will push your changes but also set your local branch upstream to github (origin) using the branch name my_awesome_branch. --set-upstream is a one time command, future changes you can use "git push" like you normally would.
If someone else has made some changes to master branch it's a good idea to update your branch with the latest version of master:
git fetch
git merge origin/master
Fetch will fetch all the changes in github (called origin in this case) and "git merge origin/master" will merge any changes in master on github to the current branch you are working on.
When writing your commit messages, be sure to include what issues this relates to. See Closing issues via commit messages
Now you have two options to submit your changes, from the command line or via pull request.
When everything is tested and you are ready to submit your changes to master then submit a pull request.
Start by pushing your branch to github as described above:
git push --set-upstream origin my_awesome_branch
Then from github you will see your new branch with a button to create a new pull request. Have someone review the pull request for you.
If you are really hard core you can also merge from the command line. Since you are pretty hard core I don't have to explain how it's done because you know what you are doing.
First, before you merge in to master please test your code. Master should always be production ready.
ToDo: Set up a test instance at VHS
./vendor/phpunit/phpunit/phpunit
Better yet, write a test case for your work before you write your code!
ToDo: Two options here, we can tag versions to the code in the format of YY.MM.N eg, 15.01.01, 15.01.02 or we can have a stable branch that we can merge in to. Either work, stable branches work better when there are a lot of releases.
ToDo: Running migration scripts