Project

General

Profile

UsingRepositories » History » Version 36

Brian Nord, 04/08/2013 05:20 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 33 Brian Nord
h1(#svn_access). Accessing the Repository
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 32 Brian Nord
25 7 Brian Nord
26 32 Brian Nord
If you would like to have write access, email Brian or Laurenz, so we can add you to the DESpec project. 
27 7 Brian Nord
28 7 Brian Nord
h2. Kerberos
29 7 Brian Nord
30 14 Laurenz Gamper
h3. How to set up kerberos
31 14 Laurenz Gamper
32 14 Laurenz Gamper
<pre>
33 14 Laurenz Gamper
$ mv /etc/krb5.conf /etc/krb5.conf.bak
34 14 Laurenz Gamper
$ cd /etc
35 14 Laurenz Gamper
$ wget http://security.fnal.gov/krb5.conf
36 14 Laurenz Gamper
$ echo "host cdcvs.fnal.gov
37 14 Laurenz Gamper
   ForwardX11 = no
38 14 Laurenz Gamper
   GSSAPIAuthentication yes
39 1 Brian Nord
   GSSAPIDelegateCredentials yes" >> ~/.ssh/config
40 1 Brian Nord
$ kinit -f your-fnal-username
41 1 Brian Nord
$ klist
42 1 Brian Nord
</pre>
43 1 Brian Nord
44 1 Brian Nord
The final klist should show your kerberos ticket and the svn can be checked out now using the svn checkout command below.
45 1 Brian Nord
46 1 Brian Nord
47 1 Brian Nord
h3. Links with further documentation
48 1 Brian Nord
49 1 Brian Nord
http://www.fnal.gov/docs/strongauth/macadmin.html#55292
50 1 Brian Nord
http://kb.mit.edu/confluence/display/istcontrib/Acquiring+Kerberos+Tickets+in+Mac+OS+X+10.7+(Lion)+or+OS+X+10.8+(Mountain+Lion)
51 1 Brian Nord
http://fermilinux.fnal.gov/documentation/security/kerberos-newer-linux/
52 1 Brian Nord
53 33 Brian Nord
54 33 Brian Nord
h3(#kerberos_password). Obtaining Secure Access: Kerberos
55 33 Brian Nord
56 33 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.
57 33 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/
58 33 Brian Nord
59 33 Brian Nord
<pre>
60 33 Brian Nord
$ kpasswd your-fnal-username
61 33 Brian Nord
</pre>
62 33 Brian Nord
63 34 Brian Nord
h2. Set up with Public Keys
64 35 Brian Nord
65 35 Brian Nord
We do support ssh key-based access for off-site users for whom Kerberos is too troublesome
66 1 Brian Nord
and/or difficult. Someone who is a manager of the appropriate Redmine project can ssh into
67 1 Brian Nord
the repository account (i.e. ssh p-simulation_pipeline@cdcvs.fnal.gov) and make an
68 35 Brian Nord
.ssh/authorized_keys" file with lines of the format:
69 34 Brian Nord
 
70 35 Brian Nord
@environment="REMOTE_USER=redmine-user-name" ssh-dss [big-long-base64-key] email-address@
71 34 Brian Nord
 
72 34 Brian Nord
The user can generate an ssh-dss key with ssh-keygen to send to you, if they don't already have one.
73 34 Brian Nord
Generally what they send you is a copy of their .ssh/identity.pub file, which has the big long
74 35 Brian Nord
base-64 key mentioned above.
75 34 Brian Nord
76 34 Brian Nord
* send your public key to nord or Laurenz
77 34 Brian Nord
78 34 Brian Nord
79 33 Brian Nord
&nbsp;
80 33 Brian Nord
&nbsp;
81 1 Brian Nord
&nbsp;
82 1 Brian Nord
83 1 Brian Nord
h1. Using the Repository
84 1 Brian Nord
85 35 Brian Nord
h2(#svn_checkout). SVN Checkout
86 35 Brian Nord
87 35 Brian Nord
h3. Source Code
88 35 Brian Nord
89 35 Brian Nord
<pre>
90 35 Brian Nord
svn checkout svn+ssh://p-simulation_pipeline@cdcvs.fnal.gov/cvs/projects/simulation_pipeline-main/trunk despec
91 35 Brian Nord
</pre>
92 35 Brian Nord
93 35 Brian Nord
h3. Data
94 35 Brian Nord
95 35 Brian Nord
<pre>
96 35 Brian Nord
svn checkout svn+ssh://p-simulation_pipeline@cdcvs.fnal.gov/cvs/projects/simulation_pipeline-main/data data
97 35 Brian Nord
</pre>
98 35 Brian Nord
99 35 Brian Nord
h3. Paper
100 35 Brian Nord
101 35 Brian Nord
<pre>
102 35 Brian Nord
svn checkout svn+ssh://p-simulation_pipeline@cdcvs.fnal.gov/cvs/projects/simulation_pipeline-main/paper paper
103 35 Brian Nord
</pre>
104 35 Brian Nord
105 35 Brian Nord
106 35 Brian Nord
This will create a directory called despec containing a checkout the complete pipeline.
107 35 Brian Nord
108 35 Brian Nord
109 25 Laurenz Gamper
h2. Adding a File
110 1 Brian Nord
111 25 Laurenz Gamper
Adding a file does not commit the file, use commit to upload the file.
112 25 Laurenz Gamper
<pre>
113 25 Laurenz Gamper
svn add your-file
114 25 Laurenz Gamper
</pre>
115 25 Laurenz Gamper
116 25 Laurenz Gamper
h2. Commit
117 25 Laurenz Gamper
118 20 Laurenz Gamper
One need not supply a URL for commit.  SVN automatically contacts external server
119 1 Brian Nord
<pre>
120 1 Brian Nord
svn commit -m "your message"  
121 1 Brian Nord
</pre>
122 25 Laurenz Gamper
123 25 Laurenz Gamper
h2. SVN Checking your changes
124 25 Laurenz Gamper
125 25 Laurenz Gamper
This presents a summary of the changes.
126 25 Laurenz Gamper
<pre>
127 25 Laurenz Gamper
svn status
128 25 Laurenz Gamper
</pre>
129 25 Laurenz Gamper
130 25 Laurenz Gamper
Which outputs something like
131 25 Laurenz Gamper
<pre>
132 25 Laurenz Gamper
$:~/src/despec/trunk/Wrapper$ svn status
133 20 Laurenz Gamper
M       run_pipeline.py
134 20 Laurenz Gamper
A       lsprofcalltree.py
135 23 Laurenz Gamper
C       glue.ini
136 20 Laurenz Gamper
?       glue.mine.ini
137 17 Laurenz Gamper
</pre>
138 18 Laurenz Gamper
139 17 Laurenz Gamper
You see the filenames and the flags at the beginning of the line. The flags mean:
140 17 Laurenz Gamper
<pre>
141 17 Laurenz Gamper
? item
142 17 Laurenz Gamper
The file, directory, or symbolic link item is not under version control.
143 19 Laurenz Gamper
144 17 Laurenz Gamper
A item
145 17 Laurenz Gamper
The file, directory, or symbolic link item has been scheduled for addition into the repository.
146 17 Laurenz Gamper
147 17 Laurenz Gamper
C item
148 1 Brian Nord
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.
149 10 Laurenz Gamper
150 1 Brian Nord
D item
151 1 Brian Nord
The file, directory, or symbolic link item has been scheduled for deletion from the repository.
152 1 Brian Nord
153 9 Brian Nord
M item
154 1 Brian Nord
The contents of the file item have been modified.
155 1 Brian Nord
</pre>
156 1 Brian Nord
157 1 Brian Nord
158 1 Brian Nord
159 23 Laurenz Gamper
h1{#run_code}. Run the Code
160 1 Brian Nord
161 24 Laurenz Gamper
[[Glue|Description of the glue code]]
162 24 Laurenz Gamper
163 1 Brian Nord
Instructions on how to run the pipeline: [[Run_Pipeline]]