Closed iamacup closed 8 years ago
I understand your frustration and I hope I have just commited some stuff that addresses most of your issues:
However assuming correct, writable directories is even worse as you just proved so I have reverted that back to chowns.
I need to check if 1.11 fixes the mac issue. Will do so later.
Assuming a directory layout like this:
/data/postgres /data/mysql /data/arangodb/datafiles /data/arangodb/apps
I can start arangodb using the following volumes:
-v /data/arangodb/datafiles:/var/lib/arangod -v /data/arangodb/apps:/var/lib/arangod-apps
On the host machine I can still simply backup /data
The thing is mysql and postgres don't have any apps but only datafiles.
I did my changes currently for the upcoming 3.0 release. Maybe you could have a look at my changes here:
https://github.com/arangodb/arangodb-docker/blob/official/docker-entrypoint3.sh
The new "native" docker does indeed fix the chown problem :D I think we are done here. Need to discuss with the team about a backport to 2.x as 3.x is very very close
Hi folks, you say this problem is fixed, but I can't start ArangoDB on Kubernetes backed by docker 1.13.1 with a volume mounted from an NFS storage. Is this due to me using NFS based storage or is the problem sitll around?
do you think its a clever idea to run a database on an NFS storage in first place?
Nope! But atm we don't have another opportunity.
you need a local filesystem for the arangodb data files. Its using mmap to access them, and I don't think that this is supported by the kernel on NFS.
alright thanks!
Hi Guys
I have been trying to run the Docker image on Google Container Engine and i have had a bunch of problems.
1) It seems impossible to run the stock image on GCE (and i presume any Kubernetes powered environment) when you attach a long-term storage to it - example on GCE would be starting a container like this:
with the volumes defined as
Trying to start a container like this seems to fail - with permission errors - it breaks on line 22 (docker-entrypoint.sh)
I believe the reason this happens is because the docker file at build time, sets some permissions on /var/lib/arangodb, which are then completely ignored when the Kubernetes runtime sticks a new directory on-top of that at runtime.
The problem is made worse because of the forced user in the Dockerfile (to arangodb) - as a result, the docker-entrypoint.sh can not fix the issue at run-time.
I have previously cited the Postgres docker file as a great example of database docker files - and I will do so again now.
In order to fix this and get it deployed to GCE - I had to create my own Dockerfile as follows (note, the only reason i install GOSU is to switch back to arangodb user at run-time, it is possible to run this without all that, and just run the DB as root, which i am sure is bad):
Dockerfile.zip
and my own docker-entrypoint.sh as follows - ignore 66-94 - thats to implement initial data population as per this other issue here and point 3 below.
entry.sh.zip
ends up with a container running something like this:
now - I am not saying this is the perfect entrypoint, I have just shoved the gosu command in front of all of the calls to arangod to make sure the user is correct, but it runs!
2) because we can't specify via the environment variables the core database storeage location (or the foxx app location), and the default locations for each are in /var/lib - we come across the following problems
3) an absolute must for me is the ability to specify some database initialisation state / date, in the case of ArangoDB i think that is probably arangodump output - and for that stuff to only execute if there is no existing database in the data store (Specified by the variable discussed in point 2)
TLD - i have spent more time reworking the docker file and startup for Arango than is reasonable given the promise of Docker, I am bogged down with configuration issues which should not be the case if this docker stuff was reworked slightly.
it appears to really struggle on Kubernetes, yet have had no problems with the Postgres file at all on any platform - I know I keep banging on about Postgres, but it just works, and I can see why someone new to Arango might throw it away as a result - which is super unahppy times!
ps, I still love Arango :)