Difference between revisions of "Dirac Development"
From GridPP Wiki
(→Fixing a bug/adding a feature :-)) |
(→Dirac in a box (Basic Setup)) |
||
Line 12: | Line 12: | ||
</pre> | </pre> | ||
* Install git (and emacs ;-). | * Install git (and emacs ;-). | ||
+ | * Make a dirac user, and copy the hostcert/key into .globus | ||
+ | * su - dirac | ||
* Set git up correctly: | * Set git up correctly: | ||
<pre> | <pre> | ||
Line 17: | Line 19: | ||
git config --global user.email you@example.com | git config --global user.email you@example.com | ||
</pre> | </pre> | ||
− | |||
* You also need the ssh key you use on github | * You also need the ssh key you use on github | ||
* To save you from typos (the script does not deal well with that :-D ) use "ssh-add -t 1h" | * To save you from typos (the script does not deal well with that :-D ) use "ssh-add -t 1h" |
Revision as of 10:52, 1 October 2014
Official Documentation
GitSetup
DeveloperInstallation
AddingNewComponents
Dirac in a box (Basic Setup)
- Setup yourself up with a hostcert and a EMI UI, eg by following these instructions.
- Open the relevant ports:
-A INPUT -m state --state NEW -m tcp -p tcp --dport 8443 -j ACCEPT -A INPUT -m state --state NEW -m tcp -p tcp --dport 9130:9200 -j ACCEPT
- Install git (and emacs ;-).
- Make a dirac user, and copy the hostcert/key into .globus
- su - dirac
- Set git up correctly:
git config --global user.name "Your Name" git config --global user.email you@example.com
- You also need the ssh key you use on github
- To save you from typos (the script does not deal well with that :-D ) use "ssh-add -t 1h"
- wget http://www.hep.ph.ic.ac.uk/~dbauer/dirac/dirac_in_a_box.py
-
./dirac_in_a_box.py /opt/dirac/ git@github.com:ic-hep
- Ignore "Exception _mysql_exceptions.ProgrammingError" errors
- Test your server.
Fixing a bug/adding a feature :-)
- take ownership of the bug/feature you want to fix
- make a branch: Example: The branch is bug1 and the modified file is ConfigurationSystem/Client/CSCLI.py:
cd /opt/dirac/DIRAC git status (should say "# On branch rel-v6r12") git pull git branch bug1 git checkout bug1 git status (should say "# On branch bug1")
- now add your code/restart the relevant components and test your code :-)
git add ConfigurationSystem/Client/CSCLI.py git commit -m "CLI to accept ctrl-D" git status
- and push it back to github
git push -u origin bug1
- Now go to the git repo webpage and issue a pull request (ensuring to send the request to our (ic-hep) repo, not the main DIRAC repo - check the defaults !!)
- Finally: Switch back to main branch
git checkout rel-v6r12and delete the local copy of the bug1
git branch -d bug1