- Create a (GitHub)[http://github.com] account if you do not already have one.
- Log in to your GitHub account
- Go to https://github.com/atogov/RAM
- Select the Fork button from the top right
- If you have not yet created a fork, you will be given that option now
- Read https://help.github.com/articles/fork-a-repo/ for instructions. This will give you a repository in your own account that synchronises from the ATO RAM repository. As you make changes, use pull requests to update the main repository. Don't forget to merge from ATO before creating a pull request back.
- If you have not yet created a fork, you will be given that option now
- Download the Github downloader/installer
- Click on https://github-windows.s3.amazonaws.com/GitHubSetup.exe
- and accept the download to save it
- Once downloaded, run the exe
- The GitHub GUI should open once install is complete
- Change shell to Bash
- Select the tool icon on the top right
- Selection Options... from the menu
- In the Default shell section, choose Git Bash
- While there configure your GitHub account, clone path, etc
- Close the options
- To use SourceTree for reviewing / merging pull requests, you need to modify .git/config file as described here. In short, add the following: [remote "atogov"] fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
- Change shell to Bash
- Run a git bash shell
- from the GitHub GUI client
- Select the tool icon on the top right
- Selection Open in Git Shell from the menu
- curl -SLO https://raw.githubusercontent.com/atogov/RAM/develop/install/ram-dev-win.sh
- ./ram-dev-win.sh your-github-name
- Clones a local copy of your FORK of RAM
- Uses npm/tsd/jspm to install dependencies
- Installs MongoDB
- Installs Node
- Installs Visual Studio Code
- from the GitHub GUI client
- SSH to the server
- curl -SLO https://raw.githubusercontent.com/atogov/RAM/develop/install/aws.sh
- sudo bash aws-init.sh
- creates /etc/nginx/nginx.conf
- installs NGINX
- installs Nodejs
- installs MongoDB
- creates /ram/update.sh
- runs /ram/update.sh
- downloads and unpacks latest copy of RAM from GitHub
- npm update to update dependencies
- restart RAM server
Login to your mongo database and create a user for ramdb, update backend/conf/conf.js file accordingly:
use ramdb
db.createUser({user:"username",pwd:"password",roles:[{role:"readWrite",db:"ramdb"}]});
SSH to the server and run /ram/update.sh hhhhhh where hhhhhh is the hash of the commit you want to run. It can also be a tag or branch name. If not supplied, develop is used.
From a browser run http://ramvm01.expoctest.com/reset?from=hhhhhh. As above, the parameter is optional and can be a branch, tag or hash. It defaults to develop.
- Fork and clone https://github.com/atogov/RAM if you haven't already. This need only be done once per developer.
- Open Git Shell
- Run ./ram.sh backend server&
- Run ./ram.sh frontend server&
- Wait patentially. Eventually a browser page will open
- For each task:
- Refresh your clone from RAM or another fork if that is the base you need.
- Repeat...
- Enable tests you want to work on.
- Run Jasmine for a service called nnnnn. If the optional describe text is provided, only the describe() that matches the text will run. Otherwise all tests in the file execute.
- If it fails, add code to one of the service actions
You may prefer to test your service from a browser. You can then select individual tests as needed. The browser will need to include
- RAM/microservices/node_modules/ram/service/request.js
- RAM/microservices/nnnnn/spec.js
Full use has yet to be explored. For development the watch can be set to restart on file changes. To do this we need to set up environments so that it only does so on development. This is a matter of setting and using environent variable within ecosystem.json.
Credit for creation of icon to Alexandr Cherkinsky