docutils.nodesdocument)}( rawsourcechildren]hsection)}(hhh](htitle)}(h Replicationh]hText Replication}(hhparenthhhsourceNlineNuba attributes}(ids]classes]names]dupnames]backrefs]utagnamehhh hhh]/var/lib/jenkins/jobs/metacat_beta/workspace/metacat/docs/user/metacat/source/replication.rsthKubhnote)}(hXNote that much of the functionality provided by the replication subsystem in Metacat has now been generalized and standardized by DataONE, so consider utilizing the DataONE services for replication as it is a more general and standardized approach than this Metacat-specific replication system. The Metacat replication system will be supported for a while longer, but will likely be deprecated in a future release in favor of using the DataONE replication approach.h]h paragraph)}(hXNote that much of the functionality provided by the replication subsystem in Metacat has now been generalized and standardized by DataONE, so consider utilizing the DataONE services for replication as it is a more general and standardized approach than this Metacat-specific replication system. The Metacat replication system will be supported for a while longer, but will likely be deprecated in a future release in favor of using the DataONE replication approach.h]hXNote that much of the functionality provided by the replication subsystem in Metacat has now been generalized and standardized by DataONE, so consider utilizing the DataONE services for replication as it is a more general and standardized approach than this Metacat-specific replication system. The Metacat replication system will be supported for a while longer, but will likely be deprecated in a future release in favor of using the DataONE replication approach.}(hh5hh3ubah}(h]h!]h#]h%]h']uh)h1hh*hKhh-ubah}(h]h!]h#]h%]h']uh)h+hh hhhh*hNubh2)}(hXMetacat has a built-in replication feature that allows different Metacat servers to share data (both XML documents and data files) between each other. Metacat can replicate not only its home server's original documents, but also those that were replicated from partner Metacat servers. When changes are made to one server in a replication network, the changes are automatically propogated to the network, even if the network is down.h]hXMetacat has a built-in replication feature that allows different Metacat servers to share data (both XML documents and data files) between each other. Metacat can replicate not only its home server’s original documents, but also those that were replicated from partner Metacat servers. When changes are made to one server in a replication network, the changes are automatically propogated to the network, even if the network is down.}(hhIhhGhhhNhNubah}(h]h!]h#]h%]h']uh)h1hh*hK hh hhubh2)}(hXPReplication allows users to manage their data locally and (by replicating them to a shared Metacat repository) to make those data available to the greater scientific community via a centralized search. In other words, your Metacat can be part of a broader network, but you retain control over the local repository and how it is managed.h]hXPReplication allows users to manage their data locally and (by replicating them to a shared Metacat repository) to make those data available to the greater scientific community via a centralized search. In other words, your Metacat can be part of a broader network, but you retain control over the local repository and how it is managed.}(hhWhhUhhhNhNubah}(h]h!]h#]h%]h']uh)h1hh*hKhh hhubh2)}(hXPFor example, the KNB Network (Figure 6.1), which currently consists of ten different Metacat servers from around the world, uses replication to "join" the disperate servers to form a single robust and searchable data repository--facilitating data discovery, while leaving the data ownership and management with the local administrators.h]hXUFor example, the KNB Network (Figure 6.1), which currently consists of ten different Metacat servers from around the world, uses replication to “join” the disperate servers to form a single robust and searchable data repository–facilitating data discovery, while leaving the data ownership and management with the local administrators.}(hhehhchhhNhNubah}(h]h!]h#]h%]h']uh)h1hh*hKhh hhubhfigure)}(hhh](himage)}(hd.. figure:: images/screenshots/image059.jpg :align: center A map of the KNB Metacat network. h]h}(h]h!]h#]h%]h']uriimages/screenshots/image059.jpg candidates}*hsuh)hvhhshh*hK#ubhcaption)}(h!A map of the KNB Metacat network.h]h!A map of the KNB Metacat network.}(hhhhubah}(h]h!]h#]h%]h']uh)hhh*hK#hhsubeh}(h]id1ah!]h#]h%]h']aligncenteruh)hqhK#hh hhhh*ubh2)}(hXWhen properly configured, Metacat's replication mechanism can be triggered by several types of events that occur on either the home or partner server: a document insertion, an update, or an automatic replication (i.e., Delta-T monitoring), which is set at a user-specified time interval.h]hX!When properly configured, Metacat’s replication mechanism can be triggered by several types of events that occur on either the home or partner server: a document insertion, an update, or an automatic replication (i.e., Delta-T monitoring), which is set at a user-specified time interval.}(hhhhhhhNhNubah}(h]h!]h#]h%]h']uh)h1hh*hK%hh hhubhtable)}(hhh]htgroup)}(hhh](hcolspec)}(hhh]h}(h]h!]h#]h%]h']colwidthKuh)hhhubh)}(hhh]h}(h]h!]h#]h%]h']colwidthK:uh)hhhubhthead)}(hhh]hrow)}(hhh](hentry)}(hhh]h2)}(hReplication Triggersh]hReplication Triggers}(hhhhubah}(h]h!]h#]h%]h']uh)h1hh*hK+hhubah}(h]h!]h#]h%]h']uh)hhhubh)}(hhh]h2)}(h Descriptionh]h Description}(hhhhubah}(h]h!]h#]h%]h']uh)h1hh*hK+hhubah}(h]h!]h#]h%]h']uh)hhhubeh}(h]h!]h#]h%]h']uh)hhhubah}(h]h!]h#]h%]h']uh)hhhubhtbody)}(hhh](h)}(hhh](h)}(hhh]h2)}(hInserth]hInsert}(hj!hjubah}(h]h!]h#]h%]h']uh)h1hh*hK-hjubah}(h]h!]h#]h%]h']uh)hhjubh)}(hhh]h2)}(hWhenever a document is inserted into Metacat, the server notifies each server in its replication list that it has a new file available.h]hWhenever a document is inserted into Metacat, the server notifies each server in its replication list that it has a new file available.}(hj8hj6ubah}(h]h!]h#]h%]h']uh)h1hh*hK-hj3ubah}(h]h!]h#]h%]h']uh)hhjubeh}(h]h!]h#]h%]h']uh)hhjubh)}(hhh](h)}(hhh]h2)}(hUpdateh]hUpdate}(hjXhjVubah}(h]h!]h#]h%]h']uh)h1hh*hK1hjSubah}(h]h!]h#]h%]h']uh)hhjPubh)}(hhh]h2)}(hfWhenever a document is updated, the server notifies each server in its replication list of the update.h]hfWhenever a document is updated, the server notifies each server in its replication list of the update.}(hjohjmubah}(h]h!]h#]h%]h']uh)h1hh*hK1hjjubah}(h]h!]h#]h%]h']uh)hhjPubeh}(h]h!]h#]h%]h']uh)hhjubh)}(hhh](h)}(hhh]h2)}(hDelta-T monitoringh]hDelta-T monitoring}(hjhjubah}(h]h!]h#]h%]h']uh)h1hh*hK4hjubah}(h]h!]h#]h%]h']uh)hhjubh)}(hhh]h2)}(htAt a user-specified time interval, Metacat checks each of the servers in its replication list for updated documents.h]htAt a user-specified time interval, Metacat checks each of the servers in its replication list for updated documents.}(hjhjubah}(h]h!]h#]h%]h']uh)h1hh*hK4hjubah}(h]h!]h#]h%]h']uh)hhjubeh}(h]h!]h#]h%]h']uh)hhjubeh}(h]h!]h#]h%]h']uh)jhhubeh}(h]h!]h#]h%]h']colsKuh)hhhubah}(h]h!]h#]h%]h']uh)hhh hhhh*hNubh )}(hhh](h)}(hConfiguring Replicationh]hConfiguring Replication}(hjhjhhhNhNubah}(h]h!]h#]h%]h']uh)hhjhhhh*hK:ubh2)}(hOTo configure replication, you must configure both the home and partner servers:h]hOTo configure replication, you must configure both the home and partner servers:}(hjhjhhhNhNubah}(h]h!]h#]h%]h']uh)h1hh*hK;hjhhubhenumerated_list)}(hhh](h list_item)}(hXCreate a list of partner servers on your home server using the Replication Control Panelh]h2)}(hjh]hXCreate a list of partner servers on your home server using the Replication Control Panel}(hjhjubah}(h]h!]h#]h%]h']uh)h1hh*hK=hjubah}(h]h!]h#]h%]h']uh)jhjhhhh*hNubj)}(h,Create certificate files for the home serverh]h2)}(hjh]h,Create certificate files for the home server}(hjhjubah}(h]h!]h#]h%]h']uh)h1hh*hK>hjubah}(h]h!]h#]h%]h']uh)jhjhhhh*hNubj)}(h/Create certificate files for the partner serverh]h2)}(hj'h]h/Create certificate files for the partner server}(hj'hj)ubah}(h]h!]h#]h%]h']uh)h1hh*hK?hj%ubah}(h]h!]h#]h%]h']uh)jhjhhhh*hNubj)}(h3Import partner certificate files to the home serverh]h2)}(hj>h]h3Import partner certificate files to the home server}(hj>hj@ubah}(h]h!]h#]h%]h']uh)h1hh*hK@hj<ubah}(h]h!]h#]h%]h']uh)jhjhhhh*hNubj)}(h-Import home certificate to the partner serverh]h2)}(hjUh]h-Import home certificate to the partner server}(hjUhjWubah}(h]h!]h#]h%]h']uh)h1hh*hKAhjSubah}(h]h!]h#]h%]h']uh)jhjhhhh*hNubj)}(hUpdate your Metacat database h]h2)}(hUpdate your Metacat databaseh]hUpdate your Metacat database}(hjphjnubah}(h]h!]h#]h%]h']uh)h1hh*hKBhjjubah}(h]h!]h#]h%]h']uh)jhjhhhh*hNubeh}(h]h!]h#]h%]h']enumtypearabicprefixhsuffix.uh)jhjhhhh*hK=ubh2)}(h@Each step is discussed in more detail in the following sections.h]h@Each step is discussed in more detail in the following sections.}(hjhjhhhNhNubah}(h]h!]h#]h%]h']uh)h1hh*hKDhjhhubh )}(hhh](h)}(h#Using the Replication Control Panelh]h#Using the Replication Control Panel}(hjhjhhhNhNubah}(h]h!]h#]h%]h']uh)hhjhhhh*hKGubh2)}(hTo add, remove, or alter servers on your home server's Replication list, or to activate and customize the Delta-T handler, use the Replication control panel, which is accessed via the Metacat Administration interface at the following URL::h]hTo add, remove, or alter servers on your home server’s Replication list, or to activate and customize the Delta-T handler, use the Replication control panel, which is accessed via the Metacat Administration interface at the following URL:}(hTo add, remove, or alter servers on your home server's Replication list, or to activate and customize the Delta-T handler, use the Replication control panel, which is accessed via the Metacat Administration interface at the following URL:hjhhhNhNubah}(h]h!]h#]h%]h']uh)h1hh*hKHhjhhubh literal_block)}(h.http://somehost.somelocation.edu/context/adminh]h.http://somehost.somelocation.edu/context/admin}(hhhjubah}(h]h!]h#]h%]h'] xml:spacepreserveuh)jhKLhjhhhh*ubh2)}(h"http://somehost.somelocation.edu/context" should be replaced with the name of your Metacat server and context (e.g., http://knb.ecoinformatics.org/knb/). You must be logged in to Metacat as an administrator.h](h“}(h"hjhhhNhNubh reference)}(h(http://somehost.somelocation.edu/contexth]h(http://somehost.somelocation.edu/context}(hhhjubah}(h]h!]h#]h%]h']refurijuh)jhjubhO” should be replaced with the name of your Metacat server and context (e.g., }(hM" should be replaced with the name of your Metacat server and context (e.g., hjhhhNhNubj)}(h"http://knb.ecoinformatics.org/knb/h]h"http://knb.ecoinformatics.org/knb/}(hhhjubah}(h]h!]h#]h%]h']refurijuh)jhjubh8). You must be logged in to Metacat as an administrator.}(h8). You must be logged in to Metacat as an administrator.hjhhhNhNubeh}(h]h!]h#]h%]h']uh)h1hh*hKNhjhhubhr)}(hhh](hw)}(h].. figure:: images/screenshots/image061.jpg :align: center Replication control panel. h]h}(h]h!]h#]h%]h']uriimages/screenshots/image061.jpgh}hjsuh)hvhjhh*hKUubh)}(hReplication control panel.h]hReplication control panel.}(hjhjubah}(h]h!]h#]h%]h']uh)hhh*hKUhjubeh}(h]id2ah!]h#]h%]h']hcenteruh)hqhKUhjhhhh*ubh2)}(hNote that currently, you cannot use the Replication Control Panel to remove a server after a replication has occurred. To stop replication between two servers, update the flags that control whether metadata and/or data are replicated.h]hNote that currently, you cannot use the Replication Control Panel to remove a server after a replication has occurred. To stop replication between two servers, update the flags that control whether metadata and/or data are replicated.}(hj.hj,hhhNhNubah}(h]h!]h#]h%]h']uh)h1hh*hKWhjhhubeh}(h]#using-the-replication-control-panelah!]h#]#using the replication control panelah%]h']uh)h hjhhhh*hKGubh )}(hhh](h)}(h/Generating and Exchanging Security Certificatesh]h/Generating and Exchanging Security Certificates}(hjGhjEhhhNhNubah}(h]h!]h#]h%]h']uh)hhjBhhhh*hK\ubh2)}(hXBefore you can take advantage of Metacat's replication feature, you must generate security certificates on both the replication partner and home servers. Depending on how the certificates are generated, the certificates may need to be exchanged so that each machine "trusts" that the other has replication access. Certificates that are purchased from a commercial and well-recognized Certificate Authority do not need to be exchanged with the other replication partner before replication takes place. Metacat replication relies on SSL with client certificate authentication enabled. When a replication partner server communicates with another replication partner, it presents a certificate that serves to verify and authenticate that the server is trusted.h]hXBefore you can take advantage of Metacat’s replication feature, you must generate security certificates on both the replication partner and home servers. Depending on how the certificates are generated, the certificates may need to be exchanged so that each machine “trusts” that the other has replication access. Certificates that are purchased from a commercial and well-recognized Certificate Authority do not need to be exchanged with the other replication partner before replication takes place. Metacat replication relies on SSL with client certificate authentication enabled. When a replication partner server communicates with another replication partner, it presents a certificate that serves to verify and authenticate that the server is trusted.}(hjUhjShhhNhNubah}(h]h!]h#]h%]h']uh)h1hh*hK]hjBhhubh2)}(hIf you must generate a self-signed certificate, the partner replication server will need that public certificate (or the certificate of the signing CA) added to its existing Certificate Authorities.h]hIf you must generate a self-signed certificate, the partner replication server will need that public certificate (or the certificate of the signing CA) added to its existing Certificate Authorities.}(hjchjahhhNhNubah}(h]h!]h#]h%]h']uh)h1hh*hKhhjBhhubh )}(hhh](h)}(h=Generate Certificates for Metacat running under Apache/Tomcath]h=Generate Certificates for Metacat running under Apache/Tomcat}(hjthjrhhhNhNubah}(h]h!]h#]h%]h']uh)hhjohhhh*hKmubh2)}(h1Note: Instructions are for Ubuntu/Debian systems.h]h1Note: Instructions are for Ubuntu/Debian systems.}(hjhjhhhNhNubah}(h]h!]h#]h%]h']uh)h1hh*hKnhjohhubj)}(hhh](j)}(hX Generate a private key using openssl. The key will be named ``-apache.key``, where ```` is the name of your Metacat server. Example values for the individual key fields are included in the table below. :: openssl req -new -out REQ.pem -keyout -apache.key +--------------------------+-------------------------------------------------------------------------+ | Key Field | Description and Example Value | +==========================+=========================================================================+ | Country Name | Two letter country code (e.g., US) | +--------------------------+-------------------------------------------------------------------------+ | State or Province Name | The name of your state or province spelled in full (e.g., California) | +--------------------------+-------------------------------------------------------------------------+ | Locality Name | The name of your city (e.g., Santa Barbara) | +--------------------------+-------------------------------------------------------------------------+ | Organization Name | The company or organization name (e.g., UCSB) | +--------------------------+-------------------------------------------------------------------------+ | Organizational Unit Name | The department or section name (e.g., NCEAS) | +--------------------------+-------------------------------------------------------------------------+ | Common Name | The host server name without port numbers (e.g., myserver.mydomain.edu) | +--------------------------+-------------------------------------------------------------------------+ | Email Address | Administrator's contact email (e.g., administrator@mydomain.edu) | +--------------------------+-------------------------------------------------------------------------+ | A challenge password | --leave this field blank-- | +--------------------------+-------------------------------------------------------------------------+ | An optional company name | --leave this field blank-- | +--------------------------+-------------------------------------------------------------------------+ h](h2)}(hGenerate a private key using openssl. The key will be named ``-apache.key``, where ```` is the name of your Metacat server. Example values for the individual key fields are included in the table below.h](h-apache.key``h]h-apache.key}(hhhjubah}(h]h!]h#]h%]h']uh)jhjubh, where }(h, where hjubj)}(h````h]h }(hhhjubah}(h]h!]h#]h%]h']uh)jhjubhr is the name of your Metacat server. Example values for the individual key fields are included in the table below.}(hr is the name of your Metacat server. Example values for the individual key fields are included in the table below.hjubeh}(h]h!]h#]h%]h']uh)h1hh*hKphjubj)}(h;openssl req -new -out REQ.pem -keyout -apache.keyh]h;openssl req -new -out REQ.pem -keyout -apache.key}(hhhjubah}(h]h!]h#]h%]h']jjuh)jhKwhjubh)}(hhh]h)}(hhh](h)}(hhh]h}(h]h!]h#]h%]h']colwidthKuh)hhjubh)}(hhh]h}(h]h!]h#]h%]h']colwidthKIuh)hhjubh)}(hhh]h)}(hhh](h)}(hhh]h2)}(h Key Fieldh]h Key Field}(hjhjubah}(h]h!]h#]h%]h']uh)h1hh*hKzhjubah}(h]h!]h#]h%]h']uh)hhjubh)}(hhh]h2)}(hDescription and Example Valueh]hDescription and Example Value}(hjhjubah}(h]h!]h#]h%]h']uh)h1hh*hKzhjubah}(h]h!]h#]h%]h']uh)hhjubeh}(h]h!]h#]h%]h']uh)hhjubah}(h]h!]h#]h%]h']uh)hhjubj)}(hhh](h)}(hhh](h)}(hhh]h2)}(h Country Nameh]h Country Name}(hj?hj=ubah}(h]h!]h#]h%]h']uh)h1hh*hK|hj:ubah}(h]h!]h#]h%]h']uh)hhj7ubh)}(hhh]h2)}(h#Two letter country code (e.g., US)h]h#Two letter country code (e.g., US)}(hjVhjTubah}(h]h!]h#]h%]h']uh)h1hh*hK|hjQubah}(h]h!]h#]h%]h']uh)hhj7ubeh}(h]h!]h#]h%]h']uh)hhj4ubh)}(hhh](h)}(hhh]h2)}(hState or Province Nameh]hState or Province Name}(hjvhjtubah}(h]h!]h#]h%]h']uh)h1hh*hK~hjqubah}(h]h!]h#]h%]h']uh)hhjnubh)}(hhh]h2)}(hEThe name of your state or province spelled in full (e.g., California)h]hEThe name of your state or province spelled in full (e.g., California)}(hjhjubah}(h]h!]h#]h%]h']uh)h1hh*hK~hjubah}(h]h!]h#]h%]h']uh)hhjnubeh}(h]h!]h#]h%]h']uh)hhj4ubh)}(hhh](h)}(hhh]h2)}(h Locality Nameh]h Locality Name}(hjhjubah}(h]h!]h#]h%]h']uh)h1hh*hKhjubah}(h]h!]h#]h%]h']uh)hhjubh)}(hhh]h2)}(h+The name of your city (e.g., Santa Barbara)h]h+The name of your city (e.g., Santa Barbara)}(hjhjubah}(h]h!]h#]h%]h']uh)h1hh*hKhjubah}(h]h!]h#]h%]h']uh)hhjubeh}(h]h!]h#]h%]h']uh)hhj4ubh)}(hhh](h)}(hhh]h2)}(hOrganization Nameh]hOrganization Name}(hjhjubah}(h]h!]h#]h%]h']uh)h1hh*hKhjubah}(h]h!]h#]h%]h']uh)hhjubh)}(hhh]h2)}(h-The company or organization name (e.g., UCSB)h]h-The company or organization name (e.g., UCSB)}(hjhjubah}(h]h!]h#]h%]h']uh)h1hh*hKhjubah}(h]h!]h#]h%]h']uh)hhjubeh}(h]h!]h#]h%]h']uh)hhj4ubh)}(hhh](h)}(hhh]h2)}(hOrganizational Unit Nameh]hOrganizational Unit Name}(hjhjubah}(h]h!]h#]h%]h']uh)h1hh*hKhjubah}(h]h!]h#]h%]h']uh)hhjubh)}(hhh]h2)}(h,The department or section name (e.g., NCEAS)h]h,The department or section name (e.g., NCEAS)}(hj2hj0ubah}(h]h!]h#]h%]h']uh)h1hh*hKhj-ubah}(h]h!]h#]h%]h']uh)hhjubeh}(h]h!]h#]h%]h']uh)hhj4ubh)}(hhh](h)}(hhh]h2)}(h Common Nameh]h Common Name}(hjRhjPubah}(h]h!]h#]h%]h']uh)h1hh*hKhjMubah}(h]h!]h#]h%]h']uh)hhjJubh)}(hhh]h2)}(hGThe host server name without port numbers (e.g., myserver.mydomain.edu)h]hGThe host server name without port numbers (e.g., myserver.mydomain.edu)}(hjihjgubah}(h]h!]h#]h%]h']uh)h1hh*hKhjdubah}(h]h!]h#]h%]h']uh)hhjJubeh}(h]h!]h#]h%]h']uh)hhj4ubh)}(hhh](h)}(hhh]h2)}(h Email Addressh]h Email Address}(hjhjubah}(h]h!]h#]h%]h']uh)h1hh*hKhjubah}(h]h!]h#]h%]h']uh)hhjubh)}(hhh]h2)}(h@Administrator's contact email (e.g., administrator@mydomain.edu)h](h'Administrator’s contact email (e.g., }(h%Administrator's contact email (e.g., hjubj)}(hadministrator@mydomain.eduh]hadministrator@mydomain.edu}(hhhjubah}(h]h!]h#]h%]h']refuri!mailto:administrator@mydomain.eduuh)jhjubh)}(h)hjubeh}(h]h!]h#]h%]h']uh)h1hh*hKhjubah}(h]h!]h#]h%]h']uh)hhjubeh}(h]h!]h#]h%]h']uh)hhj4ubh)}(hhh](h)}(hhh]h2)}(hA challenge passwordh]hA challenge password}(hjhjubah}(h]h!]h#]h%]h']uh)h1hh*hKhjubah}(h]h!]h#]h%]h']uh)hhjubh)}(hhh]h2)}(h--leave this field blank--h]h–leave this field blank–}(hjhjubah}(h]h!]h#]h%]h']uh)h1hh*hKhjubah}(h]h!]h#]h%]h']uh)hhjubeh}(h]h!]h#]h%]h']uh)hhj4ubh)}(hhh](h)}(hhh]h2)}(hAn optional company nameh]hAn optional company name}(hj hj ubah}(h]h!]h#]h%]h']uh)h1hh*hKhjubah}(h]h!]h#]h%]h']uh)hhjubh)}(hhh]h2)}(h--leave this field blank--h]h–leave this field blank–}(hj$hj"ubah}(h]h!]h#]h%]h']uh)h1hh*hKhjubah}(h]h!]h#]h%]h']uh)hhjubeh}(h]h!]h#]h%]h']uh)hhj4ubeh}(h]h!]h#]h%]h']uh)jhjubeh}(h]h!]h#]h%]h']colsKuh)hhjubah}(h]h!]h#]h%]h']uh)hhjubeh}(h]h!]h#]h%]h']uh)jhjhhhh*hNubj)}(hXCreate the local certificate file by running the command: :: openssl req -x509 -days 800 -in REQ.pem -key -apache.key -out -apache.crt Use the same ```` you used when you generated the key. A file named ``-apache.crt`` will be created in the directory from which you ran the openssl command. Note: You can name the certificate file anything you'd like, but keep in mind that the file will be sent to the partner machine used for replication. The certificate name should have enough meaning that someone who sees it on that machine can figure out where it came from and for what purpose it should be used. h](h2)}(h9Create the local certificate file by running the command:h]h9Create the local certificate file by running the command:}(hj[hjYubah}(h]h!]h#]h%]h']uh)h1hh*hKhjUubj)}(h]openssl req -x509 -days 800 -in REQ.pem -key -apache.key -out -apache.crth]h]openssl req -x509 -days 800 -in REQ.pem -key -apache.key -out -apache.crt}(hhhjgubah}(h]h!]h#]h%]h']jjuh)jhKhjUubh2)}(hXUse the same ```` you used when you generated the key. A file named ``-apache.crt`` will be created in the directory from which you ran the openssl command. Note: You can name the certificate file anything you'd like, but keep in mind that the file will be sent to the partner machine used for replication. The certificate name should have enough meaning that someone who sees it on that machine can figure out where it came from and for what purpose it should be used.h](h Use the same }(h Use the same hjuubj)}(h````h]h }(hhhj~ubah}(h]h!]h#]h%]h']uh)jhjuubh3 you used when you generated the key. A file named }(h3 you used when you generated the key. A file named hjuubj)}(h``-apache.crt``h]h-apache.crt}(hhhjubah}(h]h!]h#]h%]h']uh)jhjuubhX will be created in the directory from which you ran the openssl command. Note: You can name the certificate file anything you’d like, but keep in mind that the file will be sent to the partner machine used for replication. The certificate name should have enough meaning that someone who sees it on that machine can figure out where it came from and for what purpose it should be used.}(hX will be created in the directory from which you ran the openssl command. Note: You can name the certificate file anything you'd like, but keep in mind that the file will be sent to the partner machine used for replication. The certificate name should have enough meaning that someone who sees it on that machine can figure out where it came from and for what purpose it should be used.hjuubeh}(h]h!]h#]h%]h']uh)h1hh*hKhjUubeh}(h]h!]h#]h%]h']uh)jhjhhhh*hNubj)}(hXEnter the certificate into Apache's security configuration. This will be used to identify your server to a replication partner. You must register the certificate in the local Apache instance. Note that the security files may be in a different directory from the one used in the instructions depending on how you installed Apache. Copy the certificate and key file using the following commands: :: sudo cp -apache.crt /etc/ssl/certs sudo cp -apache.key /etc/ssl/private h](h2)}(hXEnter the certificate into Apache's security configuration. This will be used to identify your server to a replication partner. You must register the certificate in the local Apache instance. Note that the security files may be in a different directory from the one used in the instructions depending on how you installed Apache. Copy the certificate and key file using the following commands:h]hXEnter the certificate into Apache’s security configuration. This will be used to identify your server to a replication partner. You must register the certificate in the local Apache instance. Note that the security files may be in a different directory from the one used in the instructions depending on how you installed Apache. Copy the certificate and key file using the following commands:}(hjhjubah}(h]h!]h#]h%]h']uh)h1hh*hKhjubj)}(h[sudo cp -apache.crt /etc/ssl/certs sudo cp -apache.key /etc/ssl/privateh]h[sudo cp -apache.crt /etc/ssl/certs sudo cp -apache.key /etc/ssl/private}(hhhjubah}(h]h!]h#]h%]h']jjuh)jhKhjubeh}(h]h!]h#]h%]h']uh)jhjhhhh*hNubj)}(hXApache needs to be configured to request a client certificate when the replication API is utilized. The helper file named "metacat-site-ssl.conf" has default rules that configure Apache for SSL and client certificate authentication. Set up these SSL settings by copying the metacat-site-ssl.conf file into the ``sites-available`` directory, editing pertinent values to match your system and running ``a2ensite`` to enable the site. (Note: some settings in metacat-site-ssl.conf need to be changed to match the specifics of your system and Metacat deployment.) :: sudo cp /metacat-site-ssl.conf /sites-available sudo a2ensite metacat-site-ssl.conf h](h2)}(hX/Apache needs to be configured to request a client certificate when the replication API is utilized. The helper file named "metacat-site-ssl.conf" has default rules that configure Apache for SSL and client certificate authentication. Set up these SSL settings by copying the metacat-site-ssl.conf file into the ``sites-available`` directory, editing pertinent values to match your system and running ``a2ensite`` to enable the site. (Note: some settings in metacat-site-ssl.conf need to be changed to match the specifics of your system and Metacat deployment.)h](hX:Apache needs to be configured to request a client certificate when the replication API is utilized. The helper file named “metacat-site-ssl.conf” has default rules that configure Apache for SSL and client certificate authentication. Set up these SSL settings by copying the metacat-site-ssl.conf file into the }(hX6Apache needs to be configured to request a client certificate when the replication API is utilized. The helper file named "metacat-site-ssl.conf" has default rules that configure Apache for SSL and client certificate authentication. Set up these SSL settings by copying the metacat-site-ssl.conf file into the hjubj)}(h``sites-available``h]hsites-available}(hhhjubah}(h]h!]h#]h%]h']uh)jhjubhF directory, editing pertinent values to match your system and running }(hF directory, editing pertinent values to match your system and running hjubj)}(h ``a2ensite``h]ha2ensite}(hhhjubah}(h]h!]h#]h%]h']uh)jhjubh to enable the site. (Note: some settings in metacat-site-ssl.conf need to be changed to match the specifics of your system and Metacat deployment.)}(h to enable the site. (Note: some settings in metacat-site-ssl.conf need to be changed to match the specifics of your system and Metacat deployment.)hjubeh}(h]h!]h#]h%]h']uh)h1hh*hKhjubj)}(h{sudo cp /metacat-site-ssl.conf /sites-available sudo a2ensite metacat-site-ssl.confh]h{sudo cp /metacat-site-ssl.conf /sites-available sudo a2ensite metacat-site-ssl.conf}(hhhjubah}(h]h!]h#]h%]h']jjuh)jhKhjubeh}(h]h!]h#]h%]h']uh)jhjhhhh*hNubj)}(h/Enable the ssl module: :: sudo a2enmod ssl h](h2)}(hEnable the ssl module:h]hEnable the ssl module:}(hj)hj'ubah}(h]h!]h#]h%]h']uh)h1hh*hKhj#ubj)}(hsudo a2enmod sslh]hsudo a2enmod ssl}(hhhj5ubah}(h]h!]h#]h%]h']jjuh)jhKhj#ubeh}(h]h!]h#]h%]h']uh)jhjhhhh*hNubj)}(hVRestart Apache to bring in changes by typing: :: sudo /etc/init.d/apache2 restart h](h2)}(h-Restart Apache to bring in changes by typing:h]h-Restart Apache to bring in changes by typing:}(hjOhjMubah}(h]h!]h#]h%]h']uh)h1hh*hKhjIubj)}(h sudo /etc/init.d/apache2 restarth]h sudo /etc/init.d/apache2 restart}(hhhj[ubah}(h]h!]h#]h%]h']jjuh)jhKhjIubeh}(h]h!]h#]h%]h']uh)jhjhhhh*hNubj)}(hIf using a self-signed certificate, SCP ``-apache.crt`` to the replication partner machine where it will be added as an additional Certificate Authority. h]h2)}(hIf using a self-signed certificate, SCP ``-apache.crt`` to the replication partner machine where it will be added as an additional Certificate Authority.h](h(If using a self-signed certificate, SCP }(h(If using a self-signed certificate, SCP hjsubj)}(h``-apache.crt``h]h-apache.crt}(hhhj|ubah}(h]h!]h#]h%]h']uh)jhjsubhb to the replication partner machine where it will be added as an additional Certificate Authority.}(hb to the replication partner machine where it will be added as an additional Certificate Authority.hjsubeh}(h]h!]h#]h%]h']uh)h1hh*hKhjoubah}(h]h!]h#]h%]h']uh)jhjhhhh*hNubeh}(h]h!]h#]h%]h']jjjhjjuh)jhjohhhh*hKpubh2)}(hXIf using self-signed certificates, after you have created and SCP'd a certificate file to each replication partner, and received a certificate file from each partner in return, both home and partner servers must add the respective partner certificates as Certificate Authorities.h]hXIf using self-signed certificates, after you have created and SCP’d a certificate file to each replication partner, and received a certificate file from each partner in return, both home and partner servers must add the respective partner certificates as Certificate Authorities.}(hjhjhhhNhNubah}(h]h!]h#]h%]h']uh)h1hh*hKhjohhubeh}(h]=generate-certificates-for-metacat-running-under-apache-tomcatah!]h#]=generate certificates for metacat running under apache/tomcatah%]h']uh)h hjBhhhh*hKmubh )}(hhh](h)}(hTo import a certificateh]hTo import a certificate}(hjhjhhhNhNubah}(h]h!]h#]h%]h']uh)hhjhhhh*hKubj)}(hhh](j)}(hVCopy it into the Apache directory :: sudo cp /etc/ssl/certs/ h](h2)}(h!Copy it into the Apache directoryh]h!Copy it into the Apache directory}(hjhjubah}(h]h!]h#]h%]h']uh)h1hh*hKhjubj)}(h,sudo cp /etc/ssl/certs/h]h,sudo cp /etc/ssl/certs/}(hhhjubah}(h]h!]h#]h%]h']jjuh)jhKhjubeh}(h]h!]h#]h%]h']uh)jhjhhhh*hNubj)}(hRehash the certificates for Apache by running: :: cd /etc/ssl/certs sudo c_rehash where the ```` is the name of the certificate file created on the remote partner machine and SCP'd to the home machine. h](h2)}(h.Rehash the certificates for Apache by running:h]h.Rehash the certificates for Apache by running:}(hjhjubah}(h]h!]h#]h%]h']uh)h1hh*hKhjubj)}(hcd /etc/ssl/certs sudo c_rehashh]hcd /etc/ssl/certs sudo c_rehash}(hhhjubah}(h]h!]h#]h%]h']jjuh)jhKhjubh2)}(hwhere the ```` is the name of the certificate file created on the remote partner machine and SCP'd to the home machine.h](h where the }(h where the hjubj)}(h````h]h}(hhhjubah}(h]h!]h#]h%]h']uh)jhjubhk is the name of the certificate file created on the remote partner machine and SCP’d to the home machine.}(hi is the name of the certificate file created on the remote partner machine and SCP'd to the home machine.hjubeh}(h]h!]h#]h%]h']uh)h1hh*hKhjubeh}(h]h!]h#]h%]h']uh)jhjhhhh*hNubeh}(h]h!]h#]h%]h']jjjhjjuh)jhjhhhh*hKubeh}(h]to-import-a-certificateah!]h#]to import a certificateah%]h']uh)h hjBhhhh*hKubh )}(hhh](h)}(hITo import a certificate into Java keystore (for self-signed certificates)h]hITo import a certificate into Java keystore (for self-signed certificates)}(hjLhjJhhhNhNubah}(h]h!]h#]h%]h']uh)hhjGhhhh*hKubj)}(hhh](j)}(hUse Java's keytool to import to the default Java keystore :: sudo keytool -import -alias -file -keystore $JAVA_HOME/lib/security/cacerts h](h2)}(h9Use Java's keytool to import to the default Java keystoreh]h;Use Java’s keytool to import to the default Java keystore}(hjahj_ubah}(h]h!]h#]h%]h']uh)h1hh*hKhj[ubj)}(hwsudo keytool -import -alias -file -keystore $JAVA_HOME/lib/security/cacertsh]hwsudo keytool -import -alias -file -keystore $JAVA_HOME/lib/security/cacerts}(hhhjmubah}(h]h!]h#]h%]h']jjuh)jhKhj[ubeh}(h]h!]h#]h%]h']uh)jhjXhhhh*hNubj)}(hXRestart Tomcat :: sudo /etc/init.d/tomcat7 restart where the ```` is the name of the certificate file created on the remote partner machine and SCP'd to the home machine and is a short memorable alias for this certificate and $JAVA_HOME is the same as configured for running Tomcat. NOTE: the cacerts path may be different depending on your exact Java installation. h](h2)}(hRestart Tomcath]hRestart Tomcat}(hjhjubah}(h]h!]h#]h%]h']uh)h1hh*hKhjubj)}(h sudo /etc/init.d/tomcat7 restarth]h sudo /etc/init.d/tomcat7 restart}(hhhjubah}(h]h!]h#]h%]h']jjuh)jhKhjubh2)}(hXewhere the ```` is the name of the certificate file created on the remote partner machine and SCP'd to the home machine and is a short memorable alias for this certificate and $JAVA_HOME is the same as configured for running Tomcat. NOTE: the cacerts path may be different depending on your exact Java installation.h](h where the }(h where the hjubj)}(h````h]h}(hhhjubah}(h]h!]h#]h%]h']uh)jhjubhXE is the name of the certificate file created on the remote partner machine and SCP’d to the home machine and is a short memorable alias for this certificate and $JAVA_HOME is the same as configured for running Tomcat. NOTE: the cacerts path may be different depending on your exact Java installation.}(hXC is the name of the certificate file created on the remote partner machine and SCP'd to the home machine and is a short memorable alias for this certificate and $JAVA_HOME is the same as configured for running Tomcat. NOTE: the cacerts path may be different depending on your exact Java installation.hjubeh}(h]h!]h#]h%]h']uh)h1hh*hKhjubeh}(h]h!]h#]h%]h']uh)jhjXhhhh*hNubeh}(h]h!]h#]h%]h']jjjhjjuh)jhjGhhhh*hKubeh}(h]Gto-import-a-certificate-into-java-keystore-for-self-signed-certificatesah!]h#]Ito import a certificate into java keystore (for self-signed certificates)ah%]h']uh)h hjBhhhh*hKubh )}(hhh](h)}(hUpdate Metacat propertiesh]hUpdate Metacat properties}(hjhjhhhNhNubah}(h]h!]h#]h%]h']uh)hhjhhhh*hKubh2)}(hMetacat needs to be configured with the path to both the server certificate and the private key. 1. Edit metacat.properties, modifying these properties to match your specific deployment.h]hMetacat needs to be configured with the path to both the server certificate and the private key. 1. Edit metacat.properties, modifying these properties to match your specific deployment.}(hjhjhhhNhNubah}(h]h!]h#]h%]h']uh)h1hh*hKhjhhubh block_quote)}(hhh]j)}(hreplication.certificate.file=/etc/ssl/certs/-apache.crt replication.privatekey.file=/etc/ssl/private/-apache.key replication.privatekey.password=h]hreplication.certificate.file=/etc/ssl/certs/-apache.crt replication.privatekey.file=/etc/ssl/private/-apache.key replication.privatekey.password=}(hhhjubah}(h]h!]h#]h%]h']jjuh)jhKhjubah}(h]h!]h#]h%]h']uh)jhjhhhh*hNubeh}(h]update-metacat-propertiesah!]h#]update metacat propertiesah%]h']uh)h hjBhhhh*hKubeh}(h]/generating-and-exchanging-security-certificatesah!]h#]/generating and exchanging security certificatesah%]h']uh)h hjhhhh*hK\ubh )}(hhh](h)}(hUpdate your Metacat databaseh]hUpdate your Metacat database}(hj$ hj" hhhNhNubah}(h]h!]h#]h%]h']uh)hhj hhhh*hMubh2)}(hThe simplest way to update the Metacat database to use replication is to use the Replication Control Panel. You can also update the database using SQL. Instructions for both options are included in this section.h]hThe simplest way to update the Metacat database to use replication is to use the Replication Control Panel. You can also update the database using SQL. Instructions for both options are included in this section.}(hj2 hj0 hhhNhNubah}(h]h!]h#]h%]h']uh)h1hh*hMhj hhubhr)}(hhh](hw)}(h.. figure:: images/screenshots/image063.jpg :align: center Using the Replication Control Panel to update the Metacat database. h]h}(h]h!]h#]h%]h']uriimages/screenshots/image063.jpgh}hjL suh)hvhj> hh*hM ubh)}(hCUsing the Replication Control Panel to update the Metacat database.h]hCUsing the Replication Control Panel to update the Metacat database.}(hjP hjN ubah}(h]h!]h#]h%]h']uh)hhh*hM hj> ubeh}(h]id3ah!]h#]h%]h']hcenteruh)hqhM hj hhhh*ubh2)}(hXTo update your Metacat database to use replication, select the "Add this server" radio button from the Replication Control Panel, enter the partner server name, and specify how the replication should occur (whether to replicate xml, data, or use the local machine as a hub).h]hXTo update your Metacat database to use replication, select the “Add this server” radio button from the Replication Control Panel, enter the partner server name, and specify how the replication should occur (whether to replicate xml, data, or use the local machine as a hub).}(hjf hjd hhhNhNubah}(h]h!]h#]h%]h']uh)h1hh*hM hj hhubh )}(hhh](h)}(h To update the database using SQLh]h To update the database using SQL}(hjw hju hhhNhNubah}(h]h!]h#]h%]h']uh)hhjr hhhh*hMubj)}(hhh](j)}(hFLog in to the database :: psql -U metacat -W -h localhost metacat h](h2)}(hLog in to the databaseh]hLog in to the database}(hj hj ubah}(h]h!]h#]h%]h']uh)h1hh*hMhj ubj)}(h'psql -U metacat -W -h localhost metacath]h'psql -U metacat -W -h localhost metacat}(hhhj ubah}(h]h!]h#]h%]h']jjuh)jhMhj ubeh}(h]h!]h#]h%]h']uh)jhj hhhh*hNubj)}(hQSelect all rows from the replication table :: select * from xml_replication; h](h2)}(h*Select all rows from the replication tableh]h*Select all rows from the replication table}(hj hj ubah}(h]h!]h#]h%]h']uh)h1hh*hMhj ubj)}(hselect * from xml_replication;h]hselect * from xml_replication;}(hhhj ubah}(h]h!]h#]h%]h']jjuh)jhMhj ubeh}(h]h!]h#]h%]h']uh)jhj hhhh*hNubj)}(hXInsert the partner server. :: INSERT INTO xml_replication (server,last_checked,replicate,datareplicate,hub) VALUES ('/servlet/replication',NULL,1,1,0); Where ```` is the name of the partner server and context. The values 'NULL, 1,1,0' indicate (respectively) the last time replication occurred, that XML docs should be replicated to the partner server, that data files should be replicated to the partner server, and that the local server should not act as a hub. Set a value of 'NULL,0,0,0' if your Metacat is only receiving documents from the partner site and not replicating to that site. h](h2)}(hInsert the partner server.h]hInsert the partner server.}(hj hj ubah}(h]h!]h#]h%]h']uh)h1hh*hM hj ubj)}(hINSERT INTO xml_replication (server,last_checked,replicate,datareplicate,hub) VALUES ('/servlet/replication',NULL,1,1,0);h]hINSERT INTO xml_replication (server,last_checked,replicate,datareplicate,hub) VALUES ('/servlet/replication',NULL,1,1,0);}(hhhj ubah}(h]h!]h#]h%]h']jjuh)jhM$hj ubh2)}(hXWhere ```` is the name of the partner server and context. The values 'NULL, 1,1,0' indicate (respectively) the last time replication occurred, that XML docs should be replicated to the partner server, that data files should be replicated to the partner server, and that the local server should not act as a hub. Set a value of 'NULL,0,0,0' if your Metacat is only receiving documents from the partner site and not replicating to that site.h](hWhere }(hWhere hj ubj)}(h````h]h}(hhhj ubah}(h]h!]h#]h%]h']uh)jhj ubhX is the name of the partner server and context. The values ‘NULL, 1,1,0’ indicate (respectively) the last time replication occurred, that XML docs should be replicated to the partner server, that data files should be replicated to the partner server, and that the local server should not act as a hub. Set a value of ‘NULL,0,0,0’ if your Metacat is only receiving documents from the partner site and not replicating to that site.}(hX is the name of the partner server and context. The values 'NULL, 1,1,0' indicate (respectively) the last time replication occurred, that XML docs should be replicated to the partner server, that data files should be replicated to the partner server, and that the local server should not act as a hub. Set a value of 'NULL,0,0,0' if your Metacat is only receiving documents from the partner site and not replicating to that site.hj ubeh}(h]h!]h#]h%]h']uh)h1hh*hM&hj ubeh}(h]h!]h#]h%]h']uh)jhj hhhh*hNubj)}(hExit the databaseh]h2)}(hj h]hExit the database}(hj hj ubah}(h]h!]h#]h%]h']uh)h1hh*hM.hj ubah}(h]h!]h#]h%]h']uh)jhj hhhh*hNubj)}(hGRestart Apache and Tomcat on both home and partner replication machinesh]h2)}(hj3 h]hGRestart Apache and Tomcat on both home and partner replication machines}(hj3 hj5 ubah}(h]h!]h#]h%]h']uh)h1hh*hM/hj1 ubah}(h]h!]h#]h%]h']uh)jhj hhhh*hNubeh}(h]h!]h#]h%]h']jjjhjjuh)jhjr hhhh*hMubeh}(h] to-update-the-database-using-sqlah!]h#] to update the database using sqlah%]h']uh)h hj hhhh*hMubeh}(h]update-your-metacat-databaseah!]h#]update your metacat databaseah%]h']uh)h hjhhhh*hMubeh}(h]configuring-replicationah!]h#]configuring replicationah%]h']uh)h hh hhhh*hK:ubeh}(h] replicationah!]h#] replicationah%]h']uh)h hhhhhh*hKubah}(h]h!]h#]h%]h']sourceh*uh)hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksh،footnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj error_encodingUTF-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh* _destinationN _config_files]pep_referencesN pep_base_url https://www.python.org/dev/peps/pep_file_url_templatepep-%04drfc_referencesN rfc_base_urlhttps://tools.ietf.org/html/ tab_widthKtrim_footnote_reference_spacefile_insertion_enabled raw_enabledKsyntax_highlightlong smart_quotessmartquotes_localesNcharacter_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xformembed_stylesheetcloak_email_addressesenvNgettext_compactubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(jk jh jc j` j?j<j j jjjDjAjjj j j[ jX jS jP u nametypes}(jk Njc Nj?Nj NjNjDNjNj Nj[ NjS Nuh}(jh h j` jj<jj jBjjojAjjjGj jjX j jP jr hhsj&jj^ j> u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startKid_startKparse_messages]transform_messages] transformerN decorationNhhub.