Project

General

Profile

UsingRepositories » History » Version 32

Brian Nord, 04/08/2013 05:08 PM

1 7 Brian Nord
h1. SVN
2 7 Brian Nord
3 22 Laurenz Gamper
* [[UsingRepositories#svn_access|SVN Access]]
4 29 Laurenz Gamper
* [[UsingRepositories#kerberos_password|Kerberos Password]]
5 23 Laurenz Gamper
* [[UsingRepositories#svn_intro|SVN Introduction]]
6 23 Laurenz Gamper
* [[UsingRepositories#svn_checkout|SVN Checkout]]
7 23 Laurenz Gamper
* [[UsingRepositories#run_pipeline|Running the pipeline]]
8 20 Laurenz Gamper
9 20 Laurenz Gamper
10 20 Laurenz Gamper
h1(#svn_access). SVN Access
11 20 Laurenz Gamper
12 7 Brian Nord
To Access the DESpec SVN, you need:
13 32 Brian Nord
* a services account (see this page: [[DESpecwikiAccess]])
14 32 Brian Nord
* to be a member of the subprojects of DESpec (email nord@fnal.gov or email Laurenz); If you don't need write access, look at the section Anonymous SVN.
15 32 Brian Nord
* a svn client software  (download from http://subversion.apache.org/)
16 32 Brian Nord
** SVN introduction:
17 32 Brian Nord
*** http://svnbook.red-bean.com/en/1.7/svn.tour.cycle.html
18 32 Brian Nord
** Recommended SVN Clients
19 32 Brian Nord
*** Windows: TortoiseSVN http://tortoisesvn.tigris.org/
20 32 Brian Nord
*** Mac: Versions http://versionsapp.com/
21 32 Brian Nord
*** command line
22 1 Brian Nord
* a kerberos access OR public key access
23 29 Laurenz Gamper
24 29 Laurenz Gamper
25 32 Brian Nord
h2(#kerberos_password). Obtaining Secure Access: Kerberos
26 32 Brian Nord
27 7 Brian Nord
There are two different passwords for redmine and kerberos. At the beginning (when you register your account), they are the same. But when the redmine password gets changed, the kerberos password stays the same and vice versa.
28 7 Brian Nord
If you haven't got the initial password any more and need to reset the kerberos password, you have to call the fermilab service desk so they reset the kerberos password. Link: https://fermi.service-now.com/fsc/
29 1 Brian Nord
30 7 Brian Nord
<pre>
31 7 Brian Nord
$ kpasswd your-fnal-username
32 7 Brian Nord
</pre>
33 7 Brian Nord
34 32 Brian Nord
h2(#public_key). Obtaining Secure Access: Key Access
35 7 Brian Nord
36 7 Brian Nord
37 7 Brian Nord
h2. Member of the Subprojects
38 7 Brian Nord
39 32 Brian Nord
If you would like to have write access, email Brian or Laurenz, so we can add you to the DESpec project. 
40 7 Brian Nord
41 7 Brian Nord
h2. Kerberos
42 7 Brian Nord
43 14 Laurenz Gamper
h3. How to set up kerberos
44 14 Laurenz Gamper
45 14 Laurenz Gamper
<pre>
46 14 Laurenz Gamper
$ mv /etc/krb5.conf /etc/krb5.conf.bak
47 14 Laurenz Gamper
$ cd /etc
48 14 Laurenz Gamper
$ wget http://security.fnal.gov/krb5.conf
49 14 Laurenz Gamper
$ echo "host cdcvs.fnal.gov
50 14 Laurenz Gamper
   ForwardX11 = no
51 14 Laurenz Gamper
   GSSAPIAuthentication yes
52 14 Laurenz Gamper
   GSSAPIDelegateCredentials yes" >> ~/.ssh/config
53 14 Laurenz Gamper
$ kinit -f your-fnal-username
54 14 Laurenz Gamper
$ klist
55 14 Laurenz Gamper
</pre>
56 15 Laurenz Gamper
57 15 Laurenz Gamper
The final klist should show your kerberos ticket and the svn can be checked out now using the svn checkout command below.
58 13 Laurenz Gamper
59 1 Brian Nord
60 7 Brian Nord
h3. Links with further documentation
61 16 Laurenz Gamper
62 1 Brian Nord
http://www.fnal.gov/docs/strongauth/macadmin.html#55292
63 25 Laurenz Gamper
http://kb.mit.edu/confluence/display/istcontrib/Acquiring+Kerberos+Tickets+in+Mac+OS+X+10.7+(Lion)+or+OS+X+10.8+(Mountain+Lion)
64 16 Laurenz Gamper
http://fermilinux.fnal.gov/documentation/security/kerberos-newer-linux/
65 1 Brian Nord
66 16 Laurenz Gamper
67 25 Laurenz Gamper
h2. Adding a File
68 1 Brian Nord
69 25 Laurenz Gamper
Adding a file does not commit the file, use commit to upload the file.
70 25 Laurenz Gamper
<pre>
71 25 Laurenz Gamper
svn add your-file
72 25 Laurenz Gamper
</pre>
73 25 Laurenz Gamper
74 25 Laurenz Gamper
h2. Commit
75 25 Laurenz Gamper
76 20 Laurenz Gamper
One need not supply a URL for commit.  SVN automatically contacts external server
77 1 Brian Nord
<pre>
78 1 Brian Nord
svn commit -m "your message"  
79 1 Brian Nord
</pre>
80 25 Laurenz Gamper
81 25 Laurenz Gamper
h2. SVN Checking your changes
82 25 Laurenz Gamper
83 25 Laurenz Gamper
This presents a summary of the changes.
84 25 Laurenz Gamper
<pre>
85 25 Laurenz Gamper
svn status
86 25 Laurenz Gamper
</pre>
87 25 Laurenz Gamper
88 25 Laurenz Gamper
Which outputs something like
89 25 Laurenz Gamper
<pre>
90 27 Laurenz Gamper
$:~/src/despec/trunk/Wrapper$ svn status
91 25 Laurenz Gamper
M       run_pipeline.py
92 25 Laurenz Gamper
A       lsprofcalltree.py
93 25 Laurenz Gamper
C       glue.ini
94 25 Laurenz Gamper
?       glue.mine.ini
95 25 Laurenz Gamper
</pre>
96 25 Laurenz Gamper
97 25 Laurenz Gamper
You see the filenames and the flags at the beginning of the line. The flags mean:
98 25 Laurenz Gamper
<pre>
99 25 Laurenz Gamper
? item
100 25 Laurenz Gamper
The file, directory, or symbolic link item is not under version control.
101 25 Laurenz Gamper
102 25 Laurenz Gamper
A item
103 25 Laurenz Gamper
The file, directory, or symbolic link item has been scheduled for addition into the repository.
104 25 Laurenz Gamper
105 25 Laurenz Gamper
C item
106 25 Laurenz Gamper
The file item is in a state of conflict. That is, changes received from the server during an update overlap with local changes that you have in your working copy (and weren't resolved during the update). You must resolve this conflict before committing your changes to the repository.
107 25 Laurenz Gamper
108 25 Laurenz Gamper
D item
109 25 Laurenz Gamper
The file, directory, or symbolic link item has been scheduled for deletion from the repository.
110 25 Laurenz Gamper
111 25 Laurenz Gamper
M item
112 25 Laurenz Gamper
The contents of the file item have been modified.
113 20 Laurenz Gamper
</pre>
114 20 Laurenz Gamper
115 23 Laurenz Gamper
h1(#svn_checkout). SVN Checkout
116 20 Laurenz Gamper
117 17 Laurenz Gamper
h3. Source Code
118 18 Laurenz Gamper
119 17 Laurenz Gamper
<pre>
120 17 Laurenz Gamper
svn checkout svn+ssh://p-simulation_pipeline@cdcvs.fnal.gov/cvs/projects/simulation_pipeline-main/trunk despec
121 17 Laurenz Gamper
</pre>
122 17 Laurenz Gamper
123 19 Laurenz Gamper
h3. Data
124 17 Laurenz Gamper
125 17 Laurenz Gamper
<pre>
126 17 Laurenz Gamper
svn checkout svn+ssh://p-simulation_pipeline@cdcvs.fnal.gov/cvs/projects/simulation_pipeline-main/data data
127 17 Laurenz Gamper
</pre>
128 1 Brian Nord
129 10 Laurenz Gamper
h3. Paper
130 1 Brian Nord
131 1 Brian Nord
<pre>
132 1 Brian Nord
svn checkout svn+ssh://p-simulation_pipeline@cdcvs.fnal.gov/cvs/projects/simulation_pipeline-main/paper paper
133 9 Brian Nord
</pre>
134 1 Brian Nord
135 1 Brian Nord
136 1 Brian Nord
This will create a directory called despec containing a checkout the complete pipeline.
137 1 Brian Nord
138 1 Brian Nord
139 23 Laurenz Gamper
h1{#run_code}. Run the Code
140 1 Brian Nord
141 24 Laurenz Gamper
[[Glue|Description of the glue code]]
142 24 Laurenz Gamper
143 1 Brian Nord
Instructions on how to run the pipeline: [[Run_Pipeline]]
144 8 Brian Nord
145 8 Brian Nord
146 8 Brian Nord
h2. Creating a sub-project repository
147 8 Brian Nord
148 8 Brian Nord
* Creating a Repository in a Sub-Project: see https://cdcvs.fnal.gov/redmine/projects/fermi-redmine/wiki/CreatingRepositories
149 8 Brian Nord
* setting up a repository on your local machine (which will then be pushed/pulled to/from the FRedmine (FNAL Redmine) repository you created:
150 8 Brian Nord
151 8 Brian Nord
h3. Example-ish
152 8 Brian Nord
153 8 Brian Nord
* If you have a project "fred" and a "main" repository with no identifier
154 8 Brian Nord
you get put in
155 8 Brian Nord
** /cvs/projects/fred
156 8 Brian Nord
* if you have a project fred and a repository identifier of "joe" you get
157 8 Brian Nord
** /cvs/projects/fred-joe
158 8 Brian Nord
159 8 Brian Nord
* So you can do give them all identifiers, or have one (main) one without;
160 8 Brian Nord
or you can give the Main one an identifier...
161 8 Brian Nord
162 8 Brian Nord
* If there is no "Main" repository, the Repository tab doesn't show up,
163 8 Brian Nord
apparently.
164 8 Brian Nord
165 8 Brian Nord
&nbsp; &nbsp; &nbsp;
166 8 Brian Nord
Also see https://cdcvs.fnal.gov/redmine/projects/fermi-redmine/wiki/Subversion for Subversion