1
0
Fork 0

Merge branch 'devel' of ssh://github.com/ArangoDB/ArangoDB into devel

This commit is contained in:
Max Neunhoeffer 2016-06-08 15:54:31 +02:00
commit c427b7e136
8 changed files with 42 additions and 29 deletions

View File

@ -1,30 +1,6 @@
!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

View File

@ -4,6 +4,32 @@ TODO:
!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
authentication options.

View File

@ -718,6 +718,10 @@ API:
- `/_api/structure`: an older unfinished and unpromoted API for data format and type
checks, superseded by Foxx applications.
!SUBSECTION Administration APIs
- `/_admin/shutdown` now needs to be called with the DELETE method
!SUBSECTION Handling of CORS requests
It can now be controlled in detail for which origin hosts CORS (Cross-origin resource

View File

@ -2,7 +2,7 @@
@startDocuBlock JSF_get_api_initiate
@brief initiates the shutdown sequence
@RESTHEADER{GET /_admin/shutdown, Initiate shutdown sequence}
@RESTHEADER{DELETE /_admin/shutdown, Initiate shutdown sequence}
@RESTDESCRIPTION
This call initiates a clean shutdown sequence.

View File

@ -42,6 +42,11 @@ bool RestShutdownHandler::isDirect() const { return true; }
////////////////////////////////////////////////////////////////////////////////
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();
try {

View File

@ -2333,7 +2333,7 @@
}
},
"/_admin/shutdown": {
"get": {
"delete": {
"description": "\n\nThis call initiates a clean shutdown sequence.\n\n",
"parameters": [],
"responses": {

View File

@ -1146,9 +1146,11 @@ function shutdownArangod(arangod, options) {
}
if (arangod.exitStatus === undefined ||
arangod.exitStatus.status === "RUNNING") {
const requestOptions = makeAuthorizationHeaders(options);
requestOptions.method = "DELETE";
print(arangod.url + "/_admin/shutdown");
download(arangod.url + "/_admin/shutdown", "",
makeAuthorizationHeaders(options));
download(arangod.url + "/_admin/shutdown", "", requestOptions);
} else {
print("Server already dead, doing nothing.");
}

View File

@ -193,7 +193,7 @@ function main(argv) {
if (startServer) {
if (typeof(instanceInfo.exitStatus) === 'undefined') {
download(instanceInfo.url + "/_admin/shutdown", "");
download(instanceInfo.url + "/_admin/shutdown", "", {method: "DELETE"});
print("Waiting for server shut down");
count = 0;