Project

General

Profile

« Previous | Next » 

Revision 6987

Modify admin configuration to include default replication policy. Extensively revised the DataONE configuration page, including new wording for intro, improved tooltips throughout, new arrangement of sections, and other cosmetic changes.

View differences:

lib/metacat.properties
497 497
############# DataONE Section #######################################
498 498
D1Client.CN_URL=https://cn-dev.dataone.org/cn
499 499
# Configure the Member Node client certificate location
500
D1Client.certificate.file=/etc/dataone/client/certs/METACAT1.pem
500
D1Client.certificate.file=/var/metacat/certs/METACAT1.pem
501 501
# Member Node configuration
502
dataone.memberNodeId=METACAT1
502
dataone.memberNodeId=
503 503
dataone.subject=CN=METACAT1, DC=dataone, DC=org
504 504
dataone.contactSubject=CN=METACAT1, DC=dataone, DC=org
505 505
dataone.nodeName=My Metacat Node
506 506
dataone.nodeType=mn
507
dataone.nodeDescription=A DataONE member node implemented in Metacat.
508
dataone.nodeSynchronize=true
509
dataone.nodeReplicate=true
507
dataone.nodeDescription=Describe your Member Node briefly.
508
dataone.nodeSynchronize=false
509
dataone.nodeReplicate=false
510 510
dataone.serviceName=d1
511 511

  
512 512
# the synchronization schedule
......
518 518
dataone.nodeSynchronization.schedule.min=0/3
519 519
dataone.nodeSynchronization.schedule.sec=10
520 520

  
521
# The default replication policy
522
dataone.replicationpolicy.default.numreplicas=2
523
dataone.replicationpolicy.default.preferredNodeList=
524
dataone.replicationpolicy.default.blockedNodeList=
525

  
521 526
# state which versions of each MN tier service are availalble
522 527
dataone.mnCore.serviceAvailable=true
523 528
dataone.mnCore.serviceVersion=v1
......
551 556

  
552 557
############# Global Identifiers Assignment Section ######################
553 558
guid.assignGUIDs=false
554
guid.ezid.username=apitest
555
guid.ezid.password=apitest
556
guid.ezid.doishoulder.1=doi:10.5072/FK2/KNB/
557
guid.ezid.doishoulder.2=doi:10.5072/FK2/ESA/
559
#guid.ezid.username=apitest
560
#guid.ezid.password=apitest
561
#guid.ezid.doishoulder.1=doi:10.5072/FK2/KNB/
562
#guid.ezid.doishoulder.2=doi:10.5072/FK2/ESA/
lib/admin/dataone-configuration.jsp
43 43
<img src="<%= request.getContextPath() %>/metacat-logo.png" width="100px" align="right"/> 
44 44
<h2>DataONE Configuration</h2>
45 45

  
46
<p> 
47
    DataONE configuration is optional; choose 'Skip' below to proceed to the next configuration section,
48
    unless you want to join the DataONE federation.
49
</p>
46 50
<p>
47
	Becoming a DataONE Member Node is a means of distributing data and metadata within the broader DataONE infrastructure.
48
	Metadata will be synchronized in the network and additional backups of data can be housed among other Member Nodes for 
49
	archival safe-keeping. 
50
	Optionally, this Member Node can provide backup space for other Member Nodes that wish to share their data in the federation.
51
	<a href="http://www.dataone.org" target="_D1">DataONE</a> is a federation of data repositories (called Member Nodes)
52
    that work together to create a seamless, interoperable network to store, preserve, discover, and publish scientific data.
53
	Becoming a DataONE Member Node is a means of distributing data and metadata using a common set of standards, making it
54
	easy to build software systems that can interact with any of the federated repository nodes.  Metacat can be used
55
	to join the DataONE federation by configuring Metacat to act as a Member Node and applying with DataONE to become a
56
	Member Node.  Once a node's application is approved and Metacat is configured, metadata will be synchronized in the 
57
	network for easy discovery, and replicas of data and metadata can be housed on other Member Nodes for 
58
	archival safe-keeping. In addition, a Metacat Member Node can optionally provide space to store replicas of data from 
59
	other Member Nodes that wish to preserve their data in the federation.
51 60
<p/>
52
<p>
53
	In order to become a Member Node, the registration must be reviewed and verified. 
54
	A unique Member Node Id will be assigned and 
55
	should only be used for this node and never shared or altered.
61
<p> To configure Metacat as a Member Node, you must first obtain a Member Node X.509 certificate that will
62
    be used to authenticate this node, and you must have a registered and verified account with DataONE that can
63
    be used as the point of contact for the candidate Member Node.  Once you have this information, fill out
64
    the form below with the proper configuration information, and then click 'Register', which will send the
65
    registration data to DataONE. A unique Member Node ID will be assigned and should only be used for this 
66
    node and never shared or altered.
56 67
<p/>
57
<p>
58
	A client certificate can be requested from the DataONE Certificate Authority and will be used by this node when communicating with 
59
	the Coordinating Node and other participating Member Nodes. 
60
	This certificate should be properly protected so that nefarious entities cannot pose as this Member Node.
61
</p>
62 68
<br clear="right"/>
63 69

  
64 70
<%@ include file="page-message-section.jsp"%>
......
67 73
                                        onsubmit="return submitForm(this);">
68 74

  
69 75
	<h3>Member Node Configuration</h3>
76
	General information identifiying this node, its owner, and contents.  You will need
77
	   a certificate to identify the node, and a DataONE account to act as a node contact.
78
	
70 79
	<hr class="config-line">
71 80
	
72 81
	<div class="form-row">
73 82
		<img class="question-mark" src="style/images/question-mark.gif" 
74 83
			onClick="helpWindow('<%= request.getContextPath() %>','metacat-configure.html#dataone')"/>
75 84
		<div class="textinput-label">
76
			<label for="dataone.nodeName" title="Node Name">Node Name</label>
85
			<label for="dataone.nodeName" title="A short, human-readable name for this node">Node Name</label>
77 86
		</div>
78 87
		<input class="textinput" 
79 88
			id="dataone.nodeName" 
......
84 93
		<img class="question-mark" src="style/images/question-mark.gif" 
85 94
			onClick="helpWindow('<%= request.getContextPath() %>','metacat-configure.html#dataone')"/>
86 95
		<div class="textinput-label">
87
			<label for="dataone.nodeDescription" title="Node Description">Node Description</label>
96
			<label for="dataone.nodeDescription" title="A brief description of the node and its holdings">Node Description</label>
88 97
		</div>
89 98
		<input class="textinput" 
90 99
			id="dataone.nodeDescription" 
91 100
			name="dataone.nodeDescription" 	             		    	    	           		    	             			
92 101
			value="<%= request.getAttribute("dataone.nodeDescription") %>"/> 
93 102
	</div>
94
	<!--
95 103
	<div class="form-row">
96 104
		<img class="question-mark" src="style/images/question-mark.gif" 
97 105
			onClick="helpWindow('<%= request.getContextPath() %>','metacat-configure.html#dataone')"/>
98 106
		<div class="textinput-label">
99
			<label for="dataone.memberNodeId" title="Node Identifier">Node Identifier</label>
107
			<label for="dataone.memberNodeId" title="The DataONE-assigned unique identifier for this node">Node Identifier</label>
100 108
		</div>
101
		<input class="textinput" 
109
		<span class="textinput" 
102 110
			id="dataone.memberNodeId" 
103
			name="dataone.memberNodeId" 	             		    	    	           		    	             			
104
			value="<%= request.getAttribute("dataone.memberNodeId") %>"/> 
111
			name="dataone.memberNodeId"> 	             		    	    	           		    	             			
112
			<%= request.getAttribute("dataone.memberNodeId") %></span> 
105 113
	</div>
106
	-->
107 114
	<div class="form-row">
108 115
		<img class="question-mark" src="style/images/question-mark.gif" 
109 116
			onClick="helpWindow('<%= request.getContextPath() %>','metacat-configure.html#dataone')"/>
110 117
		<div class="textinput-label">
111
			<label for="dataone.subject" title="Node Subject">Node Subject</label>
118
			<label for="dataone.subject" title="The account in Distinguished Name (DN) format that represents this node in all service interactions">Node Subject</label>
112 119
		</div>
113 120
		<input class="textinput" 
114 121
			id="dataone.subject" 
......
119 126
		<img class="question-mark" src="style/images/question-mark.gif" 
120 127
			onClick="helpWindow('<%= request.getContextPath() %>','metacat-configure.html#dataone')"/>
121 128
		<div class="textinput-label">
122
			<label for="dataone.contactSubject" title="Contact Subject">Contact Subject</label>
129
			<label for="dataone.contactSubject" title="A verified account in DN format to be used as the primary node contact for this node">Contact Subject</label>
123 130
		</div>
124 131
		<input class="textinput" 
125 132
			id="dataone.contactSubject" 
......
130 137
		<img class="question-mark" src="style/images/question-mark.gif" 
131 138
			onClick="helpWindow('<%= request.getContextPath() %>','metacat-configure.html#dataone')"/>
132 139
		<div class="textinput-label">
133
			<label for="D1Client.certificate.file" title="Node Certificate Path">Node Certificate Path</label>
140
			<label for="D1Client.certificate.file" title="The absolute path to the X.509 certificate used to authenticate this node">Node Certificate Path</label>
134 141
		</div>
135 142
		<input class="textinput" 
136 143
			id="D1Client.certificate.file" 
137 144
			name="D1Client.certificate.file" 	             		    	    	           		    	             			
138 145
			value="<%= request.getAttribute("D1Client.certificate.file") %>"/> 
139 146
	</div>
140
	<hr class="config-line">
141 147
	<div class="form-row">
142 148
		<img class="question-mark" src="style/images/question-mark.gif" 
143 149
			onClick="helpWindow('<%= request.getContextPath() %>','metacat-configure.html#dataone')"/>
144
		<div class="textinput-label"><label for="dataone.nodeSynchronize" title="Share metadata with DataONE">Share with DataONE</label></div>
150
		<div class="textinput-label"><label for="dataone.nodeSynchronize" title="Enable DataONE services by synchronizing metadata">Enable DataONE Services</label></div>
145 151

  
146 152
		<%
147 153
		
......
168 174
		<% } %>
169 175

  
170 176
	</div>
171
	<div class="form-row">
172
		<img class="question-mark" src="style/images/question-mark.gif" 
173
			onClick="helpWindow('<%= request.getContextPath() %>','metacat-configure.html#dataone')"/>
174
		<div class="textinput-label"><label for="dataone.nodeReplicate" title="Accept Replicas from other Member Nodes">Accept Replicas</label></div>
175

  
176
		<%
177
		boolean replicate = false;
178
		String nodeReplicate = (String) request.getAttribute("dataone.nodeReplicate");
179
		if (nodeReplicate != null) {
180
			replicate = Boolean.parseBoolean(nodeReplicate);
181
		}
182
		if (replicate) { 
183
		%>
184
		<input type="checkbox" 
185
				class="textinput" 
186
				id="dataone.nodeReplicate" 
187
				name="dataone.nodeReplicate" 	             		    	    	           		    	             			
188
				value="true"
189
				checked="checked"/>
190
		<% } else {%>
191
		<input type="checkbox" 
192
				class="textinput" 
193
				id="dataone.nodeReplicate" 
194
				name="dataone.nodeReplicate" 	             		    	    	           		    	             			
195
				value="true"/>
196
		<% } %>
197

  
198
	</div>
199

  
177
    <p>&nbsp;</p>
178
    
200 179
	<h3>Synchronization Schedule</h3>
180
	The schedule on which metadata should be synchronized with DataONE, expressed as a crontab entry.
201 181
	<hr class="config-line">
202 182
	<div class="form-row">
203 183
		<img class="question-mark" src="style/images/question-mark.gif" 
......
277 257
			value="<%= request.getAttribute("dataone.nodeSynchronization.schedule.sec") %>"/> 
278 258
	</div>
279 259

  
260
	<h3>Replication</h3>
261
	Configuration for replication, including whether this node can be used to house replicas of
262
	objects from other nodes, as well as default replication policies for the objects originating
263
	on this Member Node.
264
	<hr class="config-line">
265
	<div class="form-row">
266
		<img class="question-mark" src="style/images/question-mark.gif" 
267
			onClick="helpWindow('<%= request.getContextPath() %>','metacat-configure.html#dataone')"/>
268
		<div class="textinput-label"><label for="dataone.nodeReplicate" title="Store replicas from other Member Nodes">Accept and Store Replicas</label></div>
269

  
270
		<%
271
		boolean replicate = false;
272
		String nodeReplicate = (String) request.getAttribute("dataone.nodeReplicate");
273
		if (nodeReplicate != null) {
274
			replicate = Boolean.parseBoolean(nodeReplicate);
275
		}
276
		if (replicate) { 
277
		%>
278
		<input type="checkbox" 
279
				class="textinput" 
280
				id="dataone.nodeReplicate" 
281
				name="dataone.nodeReplicate" 	             		    	    	           		    	             			
282
				value="true"
283
				checked="checked"/>
284
		<% } else {%>
285
		<input type="checkbox" 
286
				class="textinput" 
287
				id="dataone.nodeReplicate" 
288
				name="dataone.nodeReplicate" 	             		    	    	           		    	             			
289
				value="true"/>
290
		<% } %>
291
	</div>
292
	
293
	<hr class="config-line">
294

  
295
 	<div class="form-row">
296
		<img class="question-mark" src="style/images/question-mark.gif" 
297
			onClick="helpWindow('<%= request.getContextPath() %>','metacat-configure.html#dataone')"/>
298
		<div class="textinput-label">
299
			<label for="dataone.replicationpolicy.default.numreplicas" title="Default Number of Replicas to be created for local objects">Default Number of Replicas</label>
300
		</div>
301
		<input class="textinput" 
302
			id="dataone.replicationpolicy.default.numreplicas" 
303
			name="dataone.replicationpolicy.default.numreplicas" 	             		    	    	           		    	             			
304
			value="<%= request.getAttribute("dataone.replicationpolicy.default.numreplicas") %>"/> 
305
	</div>
306
  	<div class="form-row">
307
		<img class="question-mark" src="style/images/question-mark.gif" 
308
			onClick="helpWindow('<%= request.getContextPath() %>','metacat-configure.html#dataone')"/>
309
		<div class="textinput-label">
310
			<label for="dataone.replicationpolicy.default.preferredNodeList" title="A comma-separated list of preferred nodes to house replicas">Default Preferred Nodes</label>
311
		</div>
312
		<input class="textinput" 
313
			id="dataone.replicationpolicy.default.preferredNodeList" 
314
			name="dataone.replicationpolicy.default.preferredNodeList" 	             		    	    	           		    	             			
315
			value="<%= request.getAttribute("dataone.replicationpolicy.default.preferredNodeList") %>"/> 
316
	</div>
317
   	<div class="form-row">
318
		<img class="question-mark" src="style/images/question-mark.gif" 
319
			onClick="helpWindow('<%= request.getContextPath() %>','metacat-configure.html#dataone')"/>
320
		<div class="textinput-label">
321
			<label for="dataone.replicationpolicy.default.blockedNodeList" title="A comma-separated list of blocked nodes never to house replicas">Default Blocked Nodes</label>
322
		</div>
323
		<input class="textinput" 
324
			id="dataone.replicationpolicy.default.blockedNodeList" 
325
			name="dataone.replicationpolicy.default.blockedNodeList" 	             		    	    	           		    	             			
326
			value="<%= request.getAttribute("dataone.replicationpolicy.default.blockedNodeList") %>"/> 
327
	</div>
328
 
280 329
	<input type="hidden" name="configureType" value="dataone"/>
281 330
	<input type="hidden" name="processForm" value="true"/>
282 331
	<input class=button type="submit" value="Register"/>
src/edu/ucsb/nceas/metacat/admin/D1Admin.java
107 107
				String nodeDescription = PropertyService.getProperty("dataone.nodeDescription");
108 108
				String memberNodeId = PropertyService.getProperty("dataone.memberNodeId");
109 109
				String nodeSynchronize = PropertyService.getProperty("dataone.nodeSynchronize");
110
				String nodeReplicate = PropertyService.getProperty("dataone.nodeReplicate");
111 110
				String subject = PropertyService.getProperty("dataone.subject");
112 111
				String contactSubject = PropertyService.getProperty("dataone.contactSubject");
113 112
				String certpath = PropertyService.getProperty("D1Client.certificate.file");
......
121 120
				String min = PropertyService.getProperty("dataone.nodeSynchronization.schedule.min");
122 121
				String sec = PropertyService.getProperty("dataone.nodeSynchronization.schedule.sec");
123 122
				
123
				// the replication policies
124
                String nodeReplicate = PropertyService.getProperty("dataone.nodeReplicate");
125
                String numReplicas = PropertyService.getProperty("dataone.replicationpolicy.default.numreplicas");
126
                String preferredNodeList = PropertyService.getProperty("dataone.replicationpolicy.default.preferredNodeList");
127
                String blockedNodeList = PropertyService.getProperty("dataone.replicationpolicy.default.blockedNodeList");
128

  
124 129
				/**
125 130
				dataone.nodeSynchronization.schedule.year=*
126 131
				dataone.nodeSynchronization.schedule.mon=*
......
144 149
				request.setAttribute("dataone.nodeDescription", nodeDescription);
145 150
				request.setAttribute("dataone.memberNodeId", memberNodeId);
146 151
				request.setAttribute("dataone.nodeSynchronize", Boolean.toString(synchronize));
147
				request.setAttribute("dataone.nodeReplicate", Boolean.toString(replicate));
148 152
				request.setAttribute("dataone.subject", subject);
149 153
				request.setAttribute("dataone.contactSubject", contactSubject);
150 154
				request.setAttribute("D1Client.certificate.file", certpath);
......
158 162
				request.setAttribute("dataone.nodeSynchronization.schedule.min", min);
159 163
				request.setAttribute("dataone.nodeSynchronization.schedule.sec", sec);
160 164

  
165
				// replication policies
166
                request.setAttribute("dataone.nodeReplicate", Boolean.toString(replicate));
167
                request.setAttribute("dataone.replicationpolicy.default.numreplicas", numReplicas);
168
                request.setAttribute("dataone.replicationpolicy.default.preferredNodeList", preferredNodeList);
169
                request.setAttribute("dataone.replicationpolicy.default.blockedNodeList", blockedNodeList);
170

  
171

  
161 172
				// try the backup properties
162 173
				SortedProperties backupProperties = null;
163 174
				if ((backupProperties = 
......
235 246
				String nodeDescription = (String)request.getParameter("dataone.nodeDescription");
236 247
				String memberNodeId = (String)request.getParameter("dataone.memberNodeId");
237 248
				String nodeSynchronize = (String)request.getParameter("dataone.nodeSynchronize");
238
				String nodeReplicate = (String)request.getParameter("dataone.nodeReplicate");
239 249
				String subject = (String)request.getParameter("dataone.subject");
240 250
				String contactSubject = (String)request.getParameter("dataone.contactSubject");
241 251
				String certpath = (String)request.getParameter("D1Client.certificate.file");
......
249 259
				String min = (String) request.getParameter("dataone.nodeSynchronization.schedule.min");
250 260
				String sec = (String) request.getParameter("dataone.nodeSynchronization.schedule.sec");
251 261
				
262
				// the replication policies
263
                String nodeReplicate = (String)request.getParameter("dataone.nodeReplicate");
264
                String numReplicas = (String)request.getParameter("dataone.replicationpolicy.default.numreplicas");
265
                String preferredNodeList = (String)request.getParameter("dataone.replicationpolicy.default.preferredNodeList");
266
                String blockedNodeList = (String)request.getParameter("dataone.replicationpolicy.default.blockedNodeList");
267

  
252 268
				boolean synchronize = false;
253 269
				if (nodeSynchronize != null) {
254 270
					synchronize = Boolean.parseBoolean(nodeSynchronize);
......
264 280
				} else {
265 281
					
266 282
					PropertyService.setPropertyNoPersist("dataone.nodeName", nodeName);
267
					PropertyService.setPropertyNoPersist("dataone.nodeDescription", nodeDescription);
268
					
269
					// check if we have updated the memberNodeId
270
//					String existingMemberNodeId = PropertyService.getProperty("dataone.memberNodeId");
271
//					if (!existingMemberNodeId.equals(memberNodeId)) {
272
//						// update all existing system Metadata for this node id
273
//						IdentifierManager.getInstance().updateAuthoritativeMemberNodeId(existingMemberNodeId, memberNodeId);
274
//					}
275
//					// TODO: persist in DB?
276
//					PropertyService.setPropertyNoPersist("dataone.memberNodeId", memberNodeId);
277
					
283
					PropertyService.setPropertyNoPersist("dataone.nodeDescription", nodeDescription);					
278 284
					PropertyService.setPropertyNoPersist("dataone.nodeSynchronize", Boolean.toString(synchronize));
279
					PropertyService.setPropertyNoPersist("dataone.nodeReplicate", Boolean.toString(replicate));
280 285
					PropertyService.setPropertyNoPersist("dataone.subject", subject);
281 286
					PropertyService.setPropertyNoPersist("dataone.contactSubject", contactSubject);
282 287
					PropertyService.setPropertyNoPersist("D1Client.certificate.file", certpath);
......
290 295
					PropertyService.setPropertyNoPersist("dataone.nodeSynchronization.schedule.min", min);
291 296
					PropertyService.setPropertyNoPersist("dataone.nodeSynchronization.schedule.sec", sec);
292 297
					
298
					// the replication policies
299
	                PropertyService.setPropertyNoPersist("dataone.nodeReplicate", Boolean.toString(replicate));
300
	                PropertyService.setPropertyNoPersist("dataone.replicationpolicy.default.numreplicas", numReplicas);
301
                    PropertyService.setPropertyNoPersist("dataone.replicationpolicy.default.preferredNodeList", preferredNodeList);
302
                    PropertyService.setPropertyNoPersist("dataone.replicationpolicy.default.blockedNodeList", blockedNodeList);
303

  
304

  
293 305
					PropertyService.persistProperties();
294 306
					
295 307
			        // Register/update as a DataONE Member Node					

Also available in: Unified diff