Project

General

Profile

UsingRepositories » History » Version 34

Brian Nord, 04/08/2013 05:17 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 34 Brian Nord
"We do support ssh key-based access for off-site users for whom Kerberos is too troublesome
65 34 Brian Nord
and/or difficult. Someone who is a manager of the appropriate Redmine project can ssh into
66 34 Brian Nord
the repository account (i.e. ssh p-simulation_pipeline@cdcvs.fnal.gov) and make an
67 34 Brian Nord
".ssh/authorized_keys" file with lines of the format:
68 34 Brian Nord
 
69 34 Brian Nord
environment="REMOTE_USER=redmine-user-name" ssh-dss [big-long-base64-key] email-address
70 34 Brian Nord
 
71 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.
72 34 Brian Nord
Generally what they send you is a copy of their .ssh/identity.pub file, which has the big long
73 34 Brian Nord
base-64 key mentioned above."
74 34 Brian Nord
75 34 Brian Nord
* send your public key to nord or Laurenz
76 34 Brian Nord
77 34 Brian Nord
78 33 Brian Nord
&nbsp;
79 33 Brian Nord
&nbsp;
80 33 Brian Nord
&nbsp;
81 33 Brian Nord
82 33 Brian Nord
h1. Using the Repository
83 16 Laurenz Gamper
84 25 Laurenz Gamper
h2. Adding a File
85 1 Brian Nord
86 25 Laurenz Gamper
Adding a file does not commit the file, use commit to upload the file.
87 25 Laurenz Gamper
<pre>
88 25 Laurenz Gamper
svn add your-file
89 25 Laurenz Gamper
</pre>
90 25 Laurenz Gamper
91 25 Laurenz Gamper
h2. Commit
92 25 Laurenz Gamper
93 20 Laurenz Gamper
One need not supply a URL for commit.  SVN automatically contacts external server
94 1 Brian Nord
<pre>
95 1 Brian Nord
svn commit -m "your message"  
96 1 Brian Nord
</pre>
97 25 Laurenz Gamper
98 25 Laurenz Gamper
h2. SVN Checking your changes
99 25 Laurenz Gamper
100 25 Laurenz Gamper
This presents a summary of the changes.
101 25 Laurenz Gamper
<pre>
102 25 Laurenz Gamper
svn status
103 25 Laurenz Gamper
</pre>
104 25 Laurenz Gamper
105 25 Laurenz Gamper
Which outputs something like
106 25 Laurenz Gamper
<pre>
107 27 Laurenz Gamper
$:~/src/despec/trunk/Wrapper$ svn status
108 25 Laurenz Gamper
M       run_pipeline.py
109 25 Laurenz Gamper
A       lsprofcalltree.py
110 25 Laurenz Gamper
C       glue.ini
111 25 Laurenz Gamper
?       glue.mine.ini
112 25 Laurenz Gamper
</pre>
113 25 Laurenz Gamper
114 25 Laurenz Gamper
You see the filenames and the flags at the beginning of the line. The flags mean:
115 25 Laurenz Gamper
<pre>
116 25 Laurenz Gamper
? item
117 25 Laurenz Gamper
The file, directory, or symbolic link item is not under version control.
118 25 Laurenz Gamper
119 25 Laurenz Gamper
A item
120 25 Laurenz Gamper
The file, directory, or symbolic link item has been scheduled for addition into the repository.
121 25 Laurenz Gamper
122 25 Laurenz Gamper
C item
123 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.
124 25 Laurenz Gamper
125 25 Laurenz Gamper
D item
126 25 Laurenz Gamper
The file, directory, or symbolic link item has been scheduled for deletion from the repository.
127 25 Laurenz Gamper
128 25 Laurenz Gamper
M item
129 25 Laurenz Gamper
The contents of the file item have been modified.
130 20 Laurenz Gamper
</pre>
131 20 Laurenz Gamper
132 23 Laurenz Gamper
h1(#svn_checkout). SVN Checkout
133 20 Laurenz Gamper
134 17 Laurenz Gamper
h3. Source Code
135 18 Laurenz Gamper
136 17 Laurenz Gamper
<pre>
137 17 Laurenz Gamper
svn checkout svn+ssh://p-simulation_pipeline@cdcvs.fnal.gov/cvs/projects/simulation_pipeline-main/trunk despec
138 17 Laurenz Gamper
</pre>
139 17 Laurenz Gamper
140 19 Laurenz Gamper
h3. Data
141 17 Laurenz Gamper
142 17 Laurenz Gamper
<pre>
143 17 Laurenz Gamper
svn checkout svn+ssh://p-simulation_pipeline@cdcvs.fnal.gov/cvs/projects/simulation_pipeline-main/data data
144 17 Laurenz Gamper
</pre>
145 1 Brian Nord
146 10 Laurenz Gamper
h3. Paper
147 1 Brian Nord
148 1 Brian Nord
<pre>
149 1 Brian Nord
svn checkout svn+ssh://p-simulation_pipeline@cdcvs.fnal.gov/cvs/projects/simulation_pipeline-main/paper paper
150 9 Brian Nord
</pre>
151 1 Brian Nord
152 1 Brian Nord
153 1 Brian Nord
This will create a directory called despec containing a checkout the complete pipeline.
154 1 Brian Nord
155 1 Brian Nord
156 23 Laurenz Gamper
h1{#run_code}. Run the Code
157 1 Brian Nord
158 24 Laurenz Gamper
[[Glue|Description of the glue code]]
159 24 Laurenz Gamper
160 1 Brian Nord
Instructions on how to run the pipeline: [[Run_Pipeline]]
161 8 Brian Nord
162 8 Brian Nord
163 8 Brian Nord
h2. Creating a sub-project repository
164 8 Brian Nord
165 8 Brian Nord
* Creating a Repository in a Sub-Project: see https://cdcvs.fnal.gov/redmine/projects/fermi-redmine/wiki/CreatingRepositories
166 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:
167 8 Brian Nord
168 8 Brian Nord
h3. Example-ish
169 8 Brian Nord
170 8 Brian Nord
* If you have a project "fred" and a "main" repository with no identifier
171 8 Brian Nord
you get put in
172 8 Brian Nord
** /cvs/projects/fred
173 8 Brian Nord
* if you have a project fred and a repository identifier of "joe" you get
174 8 Brian Nord
** /cvs/projects/fred-joe
175 8 Brian Nord
176 8 Brian Nord
* So you can do give them all identifiers, or have one (main) one without;
177 8 Brian Nord
or you can give the Main one an identifier...
178 8 Brian Nord
179 8 Brian Nord
* If there is no "Main" repository, the Repository tab doesn't show up,
180 8 Brian Nord
apparently.
181 8 Brian Nord
182 8 Brian Nord
&nbsp; &nbsp; &nbsp;
183 8 Brian Nord
Also see https://cdcvs.fnal.gov/redmine/projects/fermi-redmine/wiki/Subversion for Subversion