mirror of https://gitee.com/bigwinds/arangodb
Merge branch 'devel' of ssh://github.com/ArangoDB/ArangoDB into devel
This commit is contained in:
commit
c427b7e136
|
@ -1,30 +1,6 @@
|
||||||
!SECTION ArangoDB and Docker
|
!SECTION ArangoDB and Docker
|
||||||
|
|
||||||
!SUBSECTION Authentication
|
|
||||||
|
|
||||||
To start the official docker container you will have to decide on an authentication method. Otherwise the container won't start.
|
|
||||||
|
|
||||||
Provide one of the arguments to docker as an environment variable.
|
|
||||||
|
|
||||||
There are three options:
|
|
||||||
|
|
||||||
1. ARANGO_NO_AUTH=1
|
|
||||||
|
|
||||||
Disable authentication completely. Useful for local testing or for operating in a trusted network (without a public interface).
|
|
||||||
|
|
||||||
2. ARANGO_ROOT_PASSWORD=password
|
|
||||||
|
|
||||||
Start ArangoDB with the given password for root
|
|
||||||
|
|
||||||
3. ARANGO_RANDOM_ROOT_PASSWORD=1
|
|
||||||
|
|
||||||
Let ArangoDB generate a random root password
|
|
||||||
|
|
||||||
To get quickly going:
|
|
||||||
|
|
||||||
`docker run -e ARANGO_RANDOM_ROOT_PASSWORD=1 arangodb`
|
|
||||||
|
|
||||||
For an in depth guide about docker and arangodb please check the official documentation: https://hub.docker.com/r/_/arangodb/
|
|
||||||
|
|
||||||
!SUBSECTION Networking
|
!SUBSECTION Networking
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,32 @@ TODO:
|
||||||
|
|
||||||
!SUBSECTION Docker
|
!SUBSECTION Docker
|
||||||
|
|
||||||
|
!SUBSUBSECTION Authentication
|
||||||
|
|
||||||
|
To start the official docker container you will have to decide on an authentication method. Otherwise the container won't start.
|
||||||
|
|
||||||
|
Provide one of the arguments to docker as an environment variable.
|
||||||
|
|
||||||
|
There are three options:
|
||||||
|
|
||||||
|
1. ARANGO_NO_AUTH=1
|
||||||
|
|
||||||
|
Disable authentication completely. Useful for local testing or for operating in a trusted network (without a public interface).
|
||||||
|
|
||||||
|
2. ARANGO_ROOT_PASSWORD=password
|
||||||
|
|
||||||
|
Start ArangoDB with the given password for root
|
||||||
|
|
||||||
|
3. ARANGO_RANDOM_ROOT_PASSWORD=1
|
||||||
|
|
||||||
|
Let ArangoDB generate a random root password
|
||||||
|
|
||||||
|
To get quickly going:
|
||||||
|
|
||||||
|
`docker run -e ARANGO_RANDOM_ROOT_PASSWORD=1 arangodb`
|
||||||
|
|
||||||
|
For an in depth guide about docker and arangodb please check the official documentation: https://hub.docker.com/r/_/arangodb/
|
||||||
|
|
||||||
Basically show the startup of a Docker image and explain about
|
Basically show the startup of a Docker image and explain about
|
||||||
authentication options.
|
authentication options.
|
||||||
|
|
||||||
|
|
|
@ -718,6 +718,10 @@ API:
|
||||||
- `/_api/structure`: an older unfinished and unpromoted API for data format and type
|
- `/_api/structure`: an older unfinished and unpromoted API for data format and type
|
||||||
checks, superseded by Foxx applications.
|
checks, superseded by Foxx applications.
|
||||||
|
|
||||||
|
!SUBSECTION Administration APIs
|
||||||
|
|
||||||
|
- `/_admin/shutdown` now needs to be called with the DELETE method
|
||||||
|
|
||||||
!SUBSECTION Handling of CORS requests
|
!SUBSECTION Handling of CORS requests
|
||||||
|
|
||||||
It can now be controlled in detail for which origin hosts CORS (Cross-origin resource
|
It can now be controlled in detail for which origin hosts CORS (Cross-origin resource
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
@startDocuBlock JSF_get_api_initiate
|
@startDocuBlock JSF_get_api_initiate
|
||||||
@brief initiates the shutdown sequence
|
@brief initiates the shutdown sequence
|
||||||
|
|
||||||
@RESTHEADER{GET /_admin/shutdown, Initiate shutdown sequence}
|
@RESTHEADER{DELETE /_admin/shutdown, Initiate shutdown sequence}
|
||||||
|
|
||||||
@RESTDESCRIPTION
|
@RESTDESCRIPTION
|
||||||
This call initiates a clean shutdown sequence.
|
This call initiates a clean shutdown sequence.
|
||||||
|
|
|
@ -42,6 +42,11 @@ bool RestShutdownHandler::isDirect() const { return true; }
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
HttpHandler::status_t RestShutdownHandler::execute() {
|
HttpHandler::status_t RestShutdownHandler::execute() {
|
||||||
|
if (_request->requestType() != GeneralRequest::RequestType::DELETE_REQ) {
|
||||||
|
generateError(GeneralResponse::ResponseCode::METHOD_NOT_ALLOWED, 405);
|
||||||
|
return HttpHandler::status_t(HANDLER_DONE);
|
||||||
|
}
|
||||||
|
|
||||||
ApplicationServer::server->beginShutdown();
|
ApplicationServer::server->beginShutdown();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -2333,7 +2333,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/_admin/shutdown": {
|
"/_admin/shutdown": {
|
||||||
"get": {
|
"delete": {
|
||||||
"description": "\n\nThis call initiates a clean shutdown sequence.\n\n",
|
"description": "\n\nThis call initiates a clean shutdown sequence.\n\n",
|
||||||
"parameters": [],
|
"parameters": [],
|
||||||
"responses": {
|
"responses": {
|
||||||
|
|
|
@ -1146,9 +1146,11 @@ function shutdownArangod(arangod, options) {
|
||||||
}
|
}
|
||||||
if (arangod.exitStatus === undefined ||
|
if (arangod.exitStatus === undefined ||
|
||||||
arangod.exitStatus.status === "RUNNING") {
|
arangod.exitStatus.status === "RUNNING") {
|
||||||
|
const requestOptions = makeAuthorizationHeaders(options);
|
||||||
|
requestOptions.method = "DELETE";
|
||||||
|
|
||||||
print(arangod.url + "/_admin/shutdown");
|
print(arangod.url + "/_admin/shutdown");
|
||||||
download(arangod.url + "/_admin/shutdown", "",
|
download(arangod.url + "/_admin/shutdown", "", requestOptions);
|
||||||
makeAuthorizationHeaders(options));
|
|
||||||
} else {
|
} else {
|
||||||
print("Server already dead, doing nothing.");
|
print("Server already dead, doing nothing.");
|
||||||
}
|
}
|
||||||
|
|
|
@ -193,7 +193,7 @@ function main(argv) {
|
||||||
|
|
||||||
if (startServer) {
|
if (startServer) {
|
||||||
if (typeof(instanceInfo.exitStatus) === 'undefined') {
|
if (typeof(instanceInfo.exitStatus) === 'undefined') {
|
||||||
download(instanceInfo.url + "/_admin/shutdown", "");
|
download(instanceInfo.url + "/_admin/shutdown", "", {method: "DELETE"});
|
||||||
|
|
||||||
print("Waiting for server shut down");
|
print("Waiting for server shut down");
|
||||||
count = 0;
|
count = 0;
|
||||||
|
|
Loading…
Reference in New Issue