如何使用MarkLogic API在MarkLogic集群中添加多个引导主机?
在使用ml gradle部署期间,我必须使用marklogic API在集群中创建多个引导主机 我知道我可以通过管理控制台(8001端口)进行配置,但我不知道如何使用MarkLogic API在MarkLogic集群中添加多个引导主机如何使用MarkLogic API在MarkLogic集群中添加多个引导主机?,marklogic,marklogic-9,Marklogic,Marklogic 9,在使用ml gradle部署期间,我必须使用marklogic API在集群中创建多个引导主机 我知道我可以通过管理控制台(8001端口)进行配置,但我不知道如何使用MarkLogic API在MarkLogic集群中添加多个引导主机 我假定您指的是。如果是这种情况,那么您可以针对hosts端点进行POST,以定义引导主机 引导主机->dh5a 目标加入主机->dh5b 将dh5b config另存为dh5b-config.xml 将dh5b配置作为cluster-config.zip发送到d
我假定您指的是。如果是这种情况,那么您可以针对hosts端点进行POST,以定义引导主机
引导主机->dh5a 目标加入主机->dh5b
以下案例在《邮差》工作:
HTTP Verb:
PUT
Authorization:
Digest Auth admin:admin
Header:
Content-Type application/json
URI:
{ml-host}:8002/manage/v2/hosts/{new-bootstrap-host}/properties
Body:
{
"bootstrap-host": true
}
获取错误状态:405方法不允许“REST-UNSUPPORTEDMETHOD:(错误:FOER0000)终结点不支持方法:POST”
curl -o dh5b-config.xml --user {authen-user:passwd} \
-X GET -H "Content-type:application/xml" \
http://dh5b:8001/admin/v1/server-config
curl --digest --user {authen-user:passwd} -X POST -o cluster-config.zip -d "group=Default" \
--data-urlencode "server-config@./dh5b-config.xml" \
-H "Content-type: application/x-www-form-urlencoded" \
http://dh5a:8001/admin/v1/cluster-config
curl --anyauth --user {authen-user:passwd} -X POST -H "Content-type: application/zip" \
--data-binary @./cluster-config.zip \
http://dh5b:8001/admin/v1/cluster-config
HTTP Verb:
PUT
Authorization:
Digest Auth admin:admin
Header:
Content-Type application/json
URI:
{ml-host}:8002/manage/v2/hosts/{new-bootstrap-host}/properties
Body:
{
"bootstrap-host": true
}