Bootstrap host -> dh5a
Target joining host -> dh5b
- Save dh5b config as dh5b-config.xml
curl -o dh5b-config.xml --user {authen-user:passwd} \
-X GET -H "Content-type:application/xml" \
http://dh5b:8001/admin/v1/server-config
- Send dh5b config to dh5a as cluster-config.zip
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
- Send cluster-config.zip to dh5b and complete the joining process
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
For production deployment:
1) Use Gradle to deploy additional hosts if Gradle is permitted
2) Write/Execute Shell script to include above API operations
(This approach has a lot more fun: combination of old Shell and modern API)
You can then use automation tool to invoke Shell or Gradle.