From fc374e65196006a9b55da56446332f953f3c88b3 Mon Sep 17 00:00:00 2001 From: Wilfried Goesgens Date: Wed, 22 Jul 2015 18:03:00 +0200 Subject: [PATCH 1/4] Add the documentation for arangodb docker image --- arangodb/README-short.txt | 1 + arangodb/content.md | 136 ++++++++++++++++++++++++++++++++++++++ arangodb/license.md | 1 + arangodb/logo.png | Bin 0 -> 10467 bytes 4 files changed, 138 insertions(+) create mode 100644 arangodb/README-short.txt create mode 100644 arangodb/content.md create mode 100644 arangodb/license.md create mode 100644 arangodb/logo.png diff --git a/arangodb/README-short.txt b/arangodb/README-short.txt new file mode 100644 index 00000000..c6abb88f --- /dev/null +++ b/arangodb/README-short.txt @@ -0,0 +1 @@ +ArangoDB - a distributed open-source database with a flexible data model for documents, graphs, and key-values. diff --git a/arangodb/content.md b/arangodb/content.md new file mode 100644 index 00000000..e853cd3d --- /dev/null +++ b/arangodb/content.md @@ -0,0 +1,136 @@ +# What is ArangoDB? +ArangoDB is a multi-model, open-source database with flexible data models for documents, graphs, and key-values. Build high performance applications using a convenient SQL-like query language or JavaScript extensions. Use ACID transactions if you require them. Scale horizontally and vertically with a few mouse clicks. + +The supported data models can be mixed in queries and allow ArangoDB to be the aggregation point for the data request you have in mind. + +> [arangodb.com](https://arangodb.com) + +%%LOGO%% + +Key Features in ArangoDB +------------------------ + +**Multi-Model** +Documents, graphs and key-value pairs — model your data as you see fit for your application. + +**Joins** +Conveniently join what belongs together for flexible ad-hoc querying, less data redundancy. + +**Transactions** +Easy application development keeping your data consistent and safe. No hassle in your client. + +Joins and Transactions are key features for flexible, secure data designs, widely used in RDBMSs that you won’t want to miss in NoSQL products. You decide how and when to use Joins and strong consistency guarantees, keeping all the power for scaling and performance as choice. + +Furthermore, ArangoDB offers a microservice framework called [Foxx](https://www.arangodb.com/foxx) to build your own Rest API with a few lines of code. + +ArangoDB Documentation +- [ArangoDB Documentation](https://www.arangodb.com/documentation) +- [ArangoDB Tutorials](https://www.arangodb.com/tutorials) + +## How to use this image + +### Start an `ArangoDB` instance + +In order to start an ArangoDB instance run + + unix> docker run -d --name arangodb-instance -d arangodb/arangodb + +Will create and launch the arangodb docker instance as background process. +The Identifier of the process is printed. +By default ArangoDB listen on port 8529 for request and the image includes +`EXPOST 8529`. If you link an application container it is automatically +available in the linked container. See the following examples. + +In order to get the IP arango listens on run: + + docker inspect --format '{{ .NetworkSettings.IPAddress }}' + +(where is the return string of the previous start command) + +### Using the instance + +In order to use the running instance from an application, link the container + + unix> docker run --name my-app --link arangodb-instance:db-link arangodb/arangodb + +This will use the instance with the name `arangodb-instance` and link it into +the application container. The application container will contain environment +variables + + DB_LINK_PORT_8529_TCP=tcp://172.17.0.17:8529 + DB_LINK_PORT_8529_TCP_ADDR=172.17.0.17 + DB_LINK_PORT_8529_TCP_PORT=8529 + DB_LINK_PORT_8529_TCP_PROTO=tcp + DB_LINK_NAME=/naughty_ardinghelli/db-link + +These can be used to access the database. + +### Exposing the port to the outside world + +If you want to expose the port to the outside world, run + + unix> docker run -p 8529:8529 -d arangodb/arangodb + +ArangoDB listen on port 8529 for request and the image includes `EXPOST +8529`. The `-p 8529:8529` exposes this port on the host. + +### Command line options + +In order to get a list of supported options, run + + unix> docker run -e help=1 arangodb/arangodb + +## Persistent Data + +ArangoDB use the volume `/var/lib/arangodb` as database directory to store the collection +data and the volume `/var/lib/arangodb-apps` as apps directory to store any extensions. These +directories are marked as docker volumes. + +See `docker run -e help=1 arangodb` for all volumes. + +A good explanation about persistence and docker container can be found here: +[Docker In-depth: Volumes](http://container42.com/2014/11/03/docker-indepth-volumes/), +[Why Docker Data Containers are Good](https://medium.com/@ramangupta/why-docker-data-containers-are-good-589b3c6c749e) + +### Using host directories + +You can map the container's volumes to a directory on the host, so that the data +is kept between runs of the container. This path `/tmp/arangodb` is in general +not the correct place to store you persistent files - it is just an example! + + unix> mkdir /tmp/arangodb + unix> docker run -p 8529:8529 -d \ + -v /tmp/arangodb:/var/lib/arangodb \ + arangodb + +This will use the `/tmp/arangodb` directory of the host as database directory +for ArangoDB inside the container. + +### Using a data container + +Alternatively you can create a container holding the data. + + unix> docker run -d --name arangodb-persist -v /var/lib/arangodb debian:8.0 true + +And use this data container in your ArangoDB container. + + unix> docker run --volumes-from arangodb-persist -p 8529:8529 arangodb + +If want to save a few bytes you can alternatively use +[tianon/true](https://registry.hub.docker.com/u/tianon/true/) +or +[progrium/busybox](https://registry.hub.docker.com/u/progrium/busybox/) +for creating the volume only containers. For example + + unix> docker run -d --name arangodb-persist -v /var/lib/arangodb tianon/true true + +# Images + +## Building an image + +Simple clone the repository and execute the following command in the +`arangodb-docker` folder + + unix> docker build -t arangodb . + +This will create an image named `arangodb`. diff --git a/arangodb/license.md b/arangodb/license.md new file mode 100644 index 00000000..a54be7f1 --- /dev/null +++ b/arangodb/license.md @@ -0,0 +1 @@ +[Arangodb itself is licensed under the Apache License](https://github.com/arangodb/arangodb/blob/devel/LICENSE), but it contains [software of third parties under their respective licenses](https://github.com/arangodb/arangodb/blob/devel/LICENSES-OTHER-COMPONENTS.md). diff --git a/arangodb/logo.png b/arangodb/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..daa1d3ff55abf319874c5de7eeabae85e00328a5 GIT binary patch literal 10467 zcmeI2WmsF=*6(o%THK*{u|RNlXpvGVt^tBeAcSJYixj6tTcEgWDemsj;uf?Nx8lWK zy3aoE*>~S_zTW44IC-8WbBzCQ%sIxIbFJjbdi&zJG9G{mfP{pE_w1>H*2A&?_lAY? zuxAt#9e6k(yJ;!QA(fBPY(F%xU7i}aAtB)q|K5<1KBQ3~A)yxAY3sxF)z!o-p-w#J z5U7O}kEfH%gBl4*!c*+w)X55N&fw|f=Im698xt-mZ{t@J#aTKiFEMayoa670o!|%A}7EpJ%BqQVRj{f)a=Qy2Q z{8+{sZ>g^AGHgV*F!_5)Ty> zQ-?zAti2S>;Z{;0UOqu?UIA_puQngA7_WdBAHM|fZ<>E)_y;WyvoeQ6VcJlrqtpvK zPb){K-%SR79)2Faf3Sa5{0079vrj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=~t-doR%fCkJ3aBLz;|Ms|#^WN; z)B9<*412gojWrIydif_o-D|HQvhzG15yf60$b&O}rOLr)%$xxo4yK#KND|me6?W5+ z-~T|XJ_hFRw;lm>Gc_x|v@L3nB#2q==q6rClp(^AS3&a`B~C5=e(p5oHq;-$3{LKhNr7KjEc-%N8Ll zV5P=KEX-P-3aH`n+>h;>jI}vZjiAXk& z<7Jqx_P|uPa&F^a26yOonZ5|BGy5@Wj0O_BVhdzqy|D zQDBtOniOGr&jE@nl?{^k2blC+1uiE|1&tVQr%8}_|2!lEMV;==E+k1ns`L?!_1y}U z+wvUGaJ-#9@1|=~3)%^uX5wxS4Mck47bscY>=nZziX~5vG3Nd1ZiDnF0!>Rm+qU5{ zTyBPb=|+&K&vrQWGfIZ!I(HOx`LETmH5@lt3JW#Yna;YlMJ6}o^R6!zhwrFycYn>H ziVQhAh$1LBhXbFzt(QI~CI=f<(H}%OvYn$3`?sQZy_Ukx#AA?!t-q%s!z)6;sNg9cn z8m2g{(wrWMM}31ZMN2mu1`as{X)rTtNaAdr zj0E3Y8$^@Zd0jy}yO|{o@8swk(r0&D$@|bzHM+E_D^cTEy1a6F$`DxnA!4yrv-#|3 zW9Z(zar2U9Q9?tlWra4#A=UV4-@|_$H1yqoZaI1TkZjQ%s#&CRBN$VJ5jU+*m4v2v z`zR9BxXkWGTnWwZ;=A=N-_j^OA`V$D;zU^P)G_#U1EP{z?Qy`k#8ctD4~7 zKhYmOn;m4hF(*E;i&}Zvh7owS{Vb-k-+HT_u`XwGPSekuiFj27EeR|8-9XU?k!P|1 zV?%VQPsn%U_6pNz4{u&z6Gk^4ams*?9Td3#+x~Ao{@>1rBYFYx*0`R?{Nvwm9zIii Ku23!q4*DPX-4vDp literal 0 HcmV?d00001 From 2bb7591c29d3e7828cefe4bf74f5b9b36015a4c3 Mon Sep 17 00:00:00 2001 From: Wilfried Goesgens Date: Wed, 22 Jul 2015 19:15:41 +0200 Subject: [PATCH 2/4] Incooperate review results, markdownfmt changes, add way to override the config file. --- arangodb/content.md | 95 ++++++++++++++++++--------------------------- 1 file changed, 37 insertions(+), 58 deletions(-) diff --git a/arangodb/content.md b/arangodb/content.md index e853cd3d..d9aacb0e 100644 --- a/arangodb/content.md +++ b/arangodb/content.md @@ -1,4 +1,5 @@ # What is ArangoDB? + ArangoDB is a multi-model, open-source database with flexible data models for documents, graphs, and key-values. Build high performance applications using a convenient SQL-like query language or JavaScript extensions. Use ACID transactions if you require them. Scale horizontally and vertically with a few mouse clicks. The supported data models can be mixed in queries and allow ArangoDB to be the aggregation point for the data request you have in mind. @@ -7,25 +8,22 @@ The supported data models can be mixed in queries and allow ArangoDB to be the a %%LOGO%% -Key Features in ArangoDB ------------------------- +##Key Features in ArangoDB -**Multi-Model** -Documents, graphs and key-value pairs — model your data as you see fit for your application. +**Multi-Model** Documents, graphs and key-value pairs — model your data as you see fit for your application. -**Joins** -Conveniently join what belongs together for flexible ad-hoc querying, less data redundancy. +**Joins** Conveniently join what belongs together for flexible ad-hoc querying, less data redundancy. -**Transactions** -Easy application development keeping your data consistent and safe. No hassle in your client. +**Transactions** Easy application development keeping your data consistent and safe. No hassle in your client. -Joins and Transactions are key features for flexible, secure data designs, widely used in RDBMSs that you won’t want to miss in NoSQL products. You decide how and when to use Joins and strong consistency guarantees, keeping all the power for scaling and performance as choice. +Joins and Transactions are key features for flexible, secure data designs, widely used in RDBMSs that you won't want to miss in NoSQL products. You decide how and when to use Joins and strong consistency guarantees, keeping all the power for scaling and performance as choice. Furthermore, ArangoDB offers a microservice framework called [Foxx](https://www.arangodb.com/foxx) to build your own Rest API with a few lines of code. ArangoDB Documentation -- [ArangoDB Documentation](https://www.arangodb.com/documentation) -- [ArangoDB Tutorials](https://www.arangodb.com/tutorials) + +- [ArangoDB Documentation](https://www.arangodb.com/documentation) +- [ArangoDB Tutorials](https://www.arangodb.com/tutorials) ## How to use this image @@ -33,29 +31,21 @@ ArangoDB Documentation In order to start an ArangoDB instance run - unix> docker run -d --name arangodb-instance -d arangodb/arangodb + unix> docker run -d --name arangodb-instance arangodb -Will create and launch the arangodb docker instance as background process. -The Identifier of the process is printed. -By default ArangoDB listen on port 8529 for request and the image includes -`EXPOST 8529`. If you link an application container it is automatically -available in the linked container. See the following examples. +Will create and launch the arangodb docker instance as background process. The Identifier of the process is printed - the plain text name will be *arangodb-instance* as you stated above. By default ArangoDB listen on port 8529 for request and the image includes `EXPOST 8529`. If you link an application container it is automatically available in the linked container. See the following examples. In order to get the IP arango listens on run: - docker inspect --format '{{ .NetworkSettings.IPAddress }}' - -(where is the return string of the previous start command) + docker inspect --format '{{ .NetworkSettings.IPAddress }}' arangodb-instance ### Using the instance In order to use the running instance from an application, link the container - unix> docker run --name my-app --link arangodb-instance:db-link arangodb/arangodb + unix> docker run --name my-arangodb-app --link arangodb-instance:db-link arangodb -This will use the instance with the name `arangodb-instance` and link it into -the application container. The application container will contain environment -variables +This will use the instance with the name `arangodb-instance` and link it into the application container. The application container will contain environment variables DB_LINK_PORT_8529_TCP=tcp://172.17.0.17:8529 DB_LINK_PORT_8529_TCP_ADDR=172.17.0.17 @@ -69,42 +59,46 @@ These can be used to access the database. If you want to expose the port to the outside world, run - unix> docker run -p 8529:8529 -d arangodb/arangodb + unix> docker run -p 8529:8529 -d arangodb -ArangoDB listen on port 8529 for request and the image includes `EXPOST -8529`. The `-p 8529:8529` exposes this port on the host. +ArangoDB listen on port 8529 for request and the image includes `EXPOST 8529`. The `-p 8529:8529` exposes this port on the host. ### Command line options In order to get a list of supported options, run - unix> docker run -e help=1 arangodb/arangodb + unix> docker run -e help=1 arangodb ## Persistent Data -ArangoDB use the volume `/var/lib/arangodb` as database directory to store the collection -data and the volume `/var/lib/arangodb-apps` as apps directory to store any extensions. These -directories are marked as docker volumes. +ArangoDB use the volume `/var/lib/arangodb` as database directory to store the collection data and the volume `/var/lib/arangodb-apps` as apps directory to store any extensions. These directories are marked as docker volumes. -See `docker run -e help=1 arangodb` for all volumes. - -A good explanation about persistence and docker container can be found here: -[Docker In-depth: Volumes](http://container42.com/2014/11/03/docker-indepth-volumes/), -[Why Docker Data Containers are Good](https://medium.com/@ramangupta/why-docker-data-containers-are-good-589b3c6c749e) +A good explanation about persistence and docker container can be found here: [Docker In-depth: Volumes](http://container42.com/2014/11/03/docker-indepth-volumes/), [Why Docker Data Containers are Good](https://medium.com/@ramangupta/why-docker-data-containers-are-good-589b3c6c749e) ### Using host directories -You can map the container's volumes to a directory on the host, so that the data -is kept between runs of the container. This path `/tmp/arangodb` is in general -not the correct place to store you persistent files - it is just an example! +You can map the container's volumes to a directory on the host, so that the data is kept between runs of the container. This path `/tmp/arangodb` is in general not the correct place to store you persistent files - it is just an example! unix> mkdir /tmp/arangodb unix> docker run -p 8529:8529 -d \ -v /tmp/arangodb:/var/lib/arangodb \ arangodb -This will use the `/tmp/arangodb` directory of the host as database directory -for ArangoDB inside the container. +This will use the `/tmp/arangodb` directory of the host as database directory for ArangoDB inside the container. + +## Using a custom ArangoDB configuration file + +The ArangoDB startup configuration is specified in the file `/etc/arangodb/arangodb.conf`. If you want to use a customized ArangoDB configuration, you can create your alternative configuration file in a directory on the host machine and then mount that directory location as `/etc/arangodb` inside the `%%REPO%%` container. + +If `/my/custom/arangod.conf` is the path of your arangodb configuration file, you can start your `%%REPO%%` container like this: + + docker run --name some-%%REPO%% -v /my/custom:/etc/arangodb -d %%REPO%%:tag + +This will start a new container `some-%%REPO%%` where the ArangoDB instance uses the startup settings from your config file instead of the default one. + +Note that users on host systems with SELinux enabled may see issues with this. The current workaround is to assign the relevant SELinux policy type to your new config file so that the container will be allowed to mount it: + + chcon -Rt svirt_sandbox_file_t /my/custom ### Using a data container @@ -116,21 +110,6 @@ And use this data container in your ArangoDB container. unix> docker run --volumes-from arangodb-persist -p 8529:8529 arangodb -If want to save a few bytes you can alternatively use -[tianon/true](https://registry.hub.docker.com/u/tianon/true/) -or -[progrium/busybox](https://registry.hub.docker.com/u/progrium/busybox/) -for creating the volume only containers. For example +If want to save a few bytes you can alternatively use [hello-world](https://registry.hub.docker.com/_/hello-world/), [busybox](https://registry.hub.docker.com/_/busybox/) or [alpine](https://registry.hub.docker.com/_/alpine/) for creating the volume only containers. For example: - unix> docker run -d --name arangodb-persist -v /var/lib/arangodb tianon/true true - -# Images - -## Building an image - -Simple clone the repository and execute the following command in the -`arangodb-docker` folder - - unix> docker build -t arangodb . - -This will create an image named `arangodb`. + unix> docker run -d --name arangodb-persist -v /var/lib/arangodb alpine alpine From 2c55e68ee2d0fa161df5eee8c7a6d70f12ab9b47 Mon Sep 17 00:00:00 2001 From: Wilfried Goesgens Date: Wed, 22 Jul 2015 19:23:58 +0200 Subject: [PATCH 3/4] Shorten README-short.txt --- arangodb/README-short.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arangodb/README-short.txt b/arangodb/README-short.txt index c6abb88f..181d22d4 100644 --- a/arangodb/README-short.txt +++ b/arangodb/README-short.txt @@ -1 +1 @@ -ArangoDB - a distributed open-source database with a flexible data model for documents, graphs, and key-values. +ArangoDB - a distributed database with a flexible data model for documents, graphs, and key-values. From 9b76ddf316fde7ebb67c65202ba2cb43d787b7bd Mon Sep 17 00:00:00 2001 From: Wilfried Goesgens Date: Wed, 22 Jul 2015 19:28:03 +0200 Subject: [PATCH 4/4] remove one last refenece of the now gone help=1 --- arangodb/content.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/arangodb/content.md b/arangodb/content.md index d9aacb0e..9d66483b 100644 --- a/arangodb/content.md +++ b/arangodb/content.md @@ -63,12 +63,6 @@ If you want to expose the port to the outside world, run ArangoDB listen on port 8529 for request and the image includes `EXPOST 8529`. The `-p 8529:8529` exposes this port on the host. -### Command line options - -In order to get a list of supported options, run - - unix> docker run -e help=1 arangodb - ## Persistent Data ArangoDB use the volume `/var/lib/arangodb` as database directory to store the collection data and the volume `/var/lib/arangodb-apps` as apps directory to store any extensions. These directories are marked as docker volumes.