|
|
admin:foreign-cluster-create(
|
|
$config as element(configuration),
|
|
$cluster-id as xs:unsignedLong,
|
|
$cluster-name as xs:string,
|
|
$xdqp-timeout as xs:unsignedInt?,
|
|
$host-timeout as xs:unsignedInt?,
|
|
$ssl-certificate as xs:string?,
|
|
$xdqp-ssl-enabled as xs:boolean?,
|
|
$xdqp-ssl-allow-sslv3 as xs:boolean?,
|
|
$xdqp-ssl-allow-tls as xs:boolean?,
|
|
$xdqp-ssl-ciphers as xs:string?,
|
|
$foreign-bootstrap-hosts as element(cl:foreign-host)*
|
| ) as element(configuration) |
|
 |
Summary:
This function creates a complete configuration for a foreign cluster.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$cluster-id
:
The id of the foreign cluster, obtained by running the admin:cluster-get-id
function on the foreign cluster.
|
$cluster-name
:
The name of the foreign cluster.
|
$xdqp-timeout
:
The XDQP timeout setting (in seconds) for the foreign cluster.
|
$host-timeout
:
the host timeout setting (in seconds) for the foreign cluster.
|
$ssl-certificate
:
The SSL certificate returned by the admin:cluster-get-xdqp-ssl-certificate
function on the foreign cluster.
|
$xdqp-ssl-enabled
:
Specify fn:true() to enable SSL for the foreign cluster or
fn:false() to disable SSL.
|
$xdqp-ssl-allow-sslv3
:
Specify fn:true() to enable the SSL v3 protocol for
the foreign cluster or fn:false() to disable the SSL
v3 protocol.
|
$xdqp-ssl-allow-tls
:
Specify fn:true() to enable the TLS protocol for the
foreign cluster or fn:false() to disable the TLS protocol.
|
$xdqp-ssl-ciphers
:
The SSL ciphers to set. This can be any standard cipher specification
string for OpenSSL.
|
$foreign-bootstrap-hosts
:
The boot strap host configuration returned from the admin:foreign-host
function. You can specify multiple bootstrap hosts on a cluster.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $cfg := admin:get-configuration()
(: Obtain foreign cluster id by running admin:cluster-get-id on the foreign cluster. :)
let $fcl := 15499567556358534770
let $cert := "----BEGIN CERTIFICATE-----
MIICzjCCAbagAwIBAgIJAMieG0IJQAWQMA0GCSqGSIb3DQEBBQUAMB8xHTAbBgNV
BAMTFDE3MDY0ODkwODY2NTc0NzgxNTcxMB4XDTExMDYwMjIwMjA1M1oXDTIxMDUz
MDIwMjA1M1owHzEdMBsGA1UEAxMUMTcwNjQ4OTA4NjY1NzQ3ODE1NzEwggEiMA0G
CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDPM9XLSbmVN1Fykz523I7H9Cq4zgO9
cUSHI/FArYnWNXUbJIesvDifu2DggfsE7HD6Glwa1ZvkVTBDyZhYv1MZMpBy18Au
9McoBbl9NYHOIhtM6bHTJAWNDoHi+TL/rFJzxo5h+bC/JnOjbE40MZKkzSzV944t
LbpYT3JfGtMJgcCEWqVLp7vkSRUsKCPuJdPpFfMixDaLA75+W9PVdm01jDvihrgr
CZkVjlMzZersHYQDsuNNWwt/9fM1skKabVWUVB0vHV307j2JHwVUJS3+hVxSiT61
GaIO3GSL6dVI5ZlYZCCyyFNc0cqPutu0Q3MfZq6MpFlt5Iffm0cWwSkvAgMBAAGj
DTALMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQEFBQADggEBAIKRSFrk3a7JBl9bBsBb
sWxob3eVM4wh8f6EPjdiIZL0V7HH4dH2hdcvtXB0NdMntiTeJfjm/tdzzMMS0al/
LZV3BxxMa7vYk6JtRFUaMdMwwsSa319n2WXKHlqZksWk4H5gC8AH5Vpdex44SKP4
GYVh0MO5kIS07yHfuv66PWsTRQiIHQSHYe33Dot/Mfs9BT/sVm1qRJ1ZO5GAf136
3iQhwf8fa0PdYGfmN9I1yQMneet3W3k9T4J86mp4RuYl44Z0sv1p3oDCcuiVRgbF
ro0dL8n7gE6fW8Hj5tnZQxYzFCwUqy8nhab+MwpOsoACOM8WvULnaMgPdflEklQT
VL0=
-----END CERTIFICATE-----"
let $host := admin:foreign-host(13134636216063499728, "master.marklogic.com", 7998)
return admin:foreign-cluster-create($cfg, $fcl, "master", 15, 35, $cert, fn:true(),
fn:false(), fn:false(), "All", $host)
(: Creates a complete configuration for the foreign cluster. Use
admin:save-configuration to save the changes to the configuration or
pass the configuration to other Admin API functions to make other changes. :)
|
|
|
|
admin:foreign-cluster-replace(
|
|
$config as element(configuration),
|
|
$cluster-id as xs:unsignedLong,
|
|
$cluster-name as xs:string,
|
|
$xdqp-timeout as xs:unsignedInt?,
|
|
$host-timeout as xs:unsignedInt?,
|
|
$ssl-certificate as xs:string?,
|
|
$xdqp-ssl-enabled as xs:boolean?,
|
|
$xdqp-ssl-allow-sslv3 as xs:boolean?,
|
|
$xdqp-ssl-allow-tls as xs:boolean?,
|
|
$xdqp-ssl-ciphers as xs:string?,
|
|
$foreign-bootstrap-hosts as element(cl:foreign-host)*
|
| ) as element(configuration) |
|
 |
Summary:
This function replaces a configuration for a foreign cluster with a new configuration.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$cluster-id
:
The id of the foreign cluster.
|
$cluster-name
:
The name of the foreign cluster.
|
$xdqp-timeout
:
The XDQP timeout setting (in seconds) for the foreign cluster.
|
$host-timeout
:
the host timeout setting (in seconds) for the foreign cluster.
|
$ssl-certificate
:
The SSL certificate returned by the admin:cluster-get-xdqp-ssl-certificate
function on the foreign cluster.
|
$xdqp-ssl-enabled
:
Specify fn:true() to enable SSL for the foreign cluster or
fn:false() to disable SSL.
|
$xdqp-ssl-allow-sslv3
:
Specify fn:true() to enable the SSL v3 protocol for
the foreign cluster or fn:false() to disable the SSL
v3 protocol.
|
$xdqp-ssl-allow-tls
:
Specify fn:true() to enable the TLS protocol for the
foreign cluster or fn:false() to disable the TLS protocol.
|
$xdqp-ssl-ciphers
:
The SSL ciphers to set. This can be any standard cipher specification
string for OpenSSL.
|
$foreign-bootstrap-hosts
:
The boot strap host configuration returned from the admin:foreign-host
function. You can specify multiple bootstrap hosts on a cluster.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $cfg := admin:get-configuration()
let $fcl := admin:cluster-get-foreign-cluster-id($cfg, "ClusterA")
let $cert := "----BEGIN CERTIFICATE-----
MIICzjCCAbagAwIBAgIJAMieG0IJQAWQMA0GCSqGSIb3DQEBBQUAMB8xHTAbBgNV
BAMTFDE3MDY0ODkwODY2NTc0NzgxNTcxMB4XDTExMDYwMjIwMjA1M1oXDTIxMDUz
MDIwMjA1M1owHzEdMBsGA1UEAxMUMTcwNjQ4OTA4NjY1NzQ3ODE1NzEwggEiMA0G
CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDPM9XLSbmVN1Fykz523I7H9Cq4zgO9
cUSHI/FArYnWNXUbJIesvDifu2DggfsE7HD6Glwa1ZvkVTBDyZhYv1MZMpBy18Au
9McoBbl9NYHOIhtM6bHTJAWNDoHi+TL/rFJzxo5h+bC/JnOjbE40MZKkzSzV944t
LbpYT3JfGtMJgcCEWqVLp7vkSRUsKCPuJdPpFfMixDaLA75+W9PVdm01jDvihrgr
CZkVjlMzZersHYQDsuNNWwt/9fM1skKabVWUVB0vHV307j2JHwVUJS3+hVxSiT61
GaIO3GSL6dVI5ZlYZCCyyFNc0cqPutu0Q3MfZq6MpFlt5Iffm0cWwSkvAgMBAAGj
DTALMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQEFBQADggEBAIKRSFrk3a7JBl9bBsBb
sWxob3eVM4wh8f6EPjdiIZL0V7HH4dH2hdcvtXB0NdMntiTeJfjm/tdzzMMS0al/
LZV3BxxMa7vYk6JtRFUaMdMwwsSa319n2WXKHlqZksWk4H5gC8AH5Vpdex44SKP4
GYVh0MO5kIS07yHfuv66PWsTRQiIHQSHYe33Dot/Mfs9BT/sVm1qRJ1ZO5GAf136
3iQhwf8fa0PdYGfmN9I1yQMneet3W3k9T4J86mp4RuYl44Z0sv1p3oDCcuiVRgbF
ro0dL8n7gE6fW8Hj5tnZQxYzFCwUqy8nhab+MwpOsoACOM8WvULnaMgPdflEklQT
VL0=
-----END CERTIFICATE-----"
let $host := admin:foreign-host(13134636216063499728, "master.marklogic.com", 7998)
return admin:foreign-cluster-replace($cfg, $fcl, "master", 15, 35, $cert, fn:true(),
fn:false(), fn:false(), "All", $host)
(: Replaces an existing configuration for the foreign cluster. Use
admin:save-configuration to save the changes to the configuration
or pass the configuration to other Admin API functions to make other changes. :)
|
|
|
|
admin:foreign-cluster-set-bootstrap-hosts(
|
|
$config as element(configuration),
|
|
$cluster-id as xs:unsignedLong,
|
|
$bootstrap-hosts as element(cl:foreign-host)*
|
| ) as element(configuration) |
|
 |
Summary:
This function identifies the foreign host to be used to bootstrap communication with the
foreign cluster.
When a bootstrap host on a foreign cluster initially starts, it will bootstrap communications
by establishing a connection to one or more of the hosts on this cluster. Once a
connection has been established between cluster hosts, the bootstrap host retrieves
configuration information to identify which foreign
hosts are responsible for specific foreign forests.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$cluster-id
:
The id of the foreign cluster.
|
$bootstrap-hosts
:
The boot strap host configuration returned from the admin:foreign-host
function. You can specify multiple bootstrap hosts on a cluster.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $cfg := admin:get-configuration()
let $fcl := admin:cluster-get-foreign-cluster-id($cfg, "ClusterA")
let $host := admin:foreign-host(13134636216063499728,
"master.marklogic.com",
7998)
return admin:foreign-cluster-set-bootstrap-hosts($cfg, $fcl, $host)
(: Sets 'master.marklogic.com' as the bootstrap host for the foreign cluster. Use
admin:save-configuration to save the changes to the configuration or pass the
configuration to other Admin API functions to make other changes. :)
|
|
|