The AllegroGraph Docker container is now available on Docker Hub.
Running AllegroGraph in a Docker container on Mac OS X and Windows is as easy as:
NOTE: if you already have VirtualBox installed, follow these instructions to completely uninstall VirtualBox, then come back here to install Docker Toolbox.
For Mac and Windows (users on Linux would just install Docker):
# Only execute this command once!! $ docker-machine create --driver virtualbox default Running pre-create checks... Creating machine... (default) Copying /Users/layer/.docker/machine/cache/boot2docker.iso to /Users/layer/.docker/machine/machines/default/boot2docker.iso... (default) Creating VirtualBox VM... ... Setting Docker configuration on the remote daemon... Checking connection to Docker... Docker is up and running! To see how to connect your Docker Client to the Docker Engine running on this virtual machine, run: /usr/local/bin/docker-machine env defaultIf you are using the "Docker Quickstart Terminal", your environment variables are already set up. You should be able to execute this command and see output similar to this:
$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES $This shows you have no running docker containers.
$ /Applications/VirtualBox.app/Contents/MacOS/VBoxManage controlvm default natpf1 "tcp-port10035,tcp,,10035,,10035"
$ "\Program Files\Oracle\VirtualBox\VBoxManage.exe" controlvm default natpf1 "tcp-port10035,tcp,,10035,,10035"
$ docker pull franzinc/agraphor
$ docker pull franzinc/agraph:v6.0to get a specific version. The v6.0 part is called a tag and you can browse the available tags to find a specific version of AllegroGraph.
$ docker run -d -m 1g -p 10000-10035:10000-10035 --name agraph franzinc/agraph:v6.0 bdfa5170cba598cae00f224441eba007425e69f40b836ae0d9ca144b46f465aa $ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 2b8073e03155 franzinc/agraph:v6.0 "/bin/sh -c '/app/agr" 12 seconds ago Up 5 seconds 0.0.0.0:10000-10035->10000-10035/tcp agraph $A description of the arguments:
-druns the container in background and print container ID.
-m 1gassigns 1 GB of memory to the container.
-pargument and values are to make those ports available to applications (i.e., browsers and Gruff).
--name agraphassigns the name "agraph" to the contain, to be used in place of the container id (which is a very long hex number).
franzinc/agraph:v6.0specifies which image to run.
docker runform again only after executing
docker rm agraphto remove the container created by
After the above docker run command, to use AG WebView browse to http://localhost:10035. The default user name and password is test and xyzzy.
$ docker stop agraph
$ docker start agraph
If you started the container with the
command above, then your data is being stored in the same
container in which you are running AllegroGraph.
Read on to make a separate container for your data, so that it will
be persistent independently of the container running AllegroGraph.
$ docker pull franzinc/agraph-dataThis is a container used solely to store your data, and nothing else. (You can see how this container was created by looking at the makefile and Dockerfile.data.)
$ docker create --name agraph-data franzinc/agraph-data
franzinc/agraph, using this container:
$ docker run -d -p 10000-10035:10000-10035 --volumes-from agraph-data \ --name agraph franzinc/agraphThe --volumes-from says to mount volumes from the specified container, which in this case provides an empty /data.
Now stopping and deleting the agraph container will not perturb your data, which is in the agraph-data container.
docker exec. In the following example, agload requires an input argument, which is copied from a local file actors.ntriples in the current directory into the container:
$ docker cp actors.ntriples agraph:/data/actors.ntriples $ docker exec agraph su agraph -c "/app/agraph/bin/agload test /data/actors.ntriples" Load finished 1 source in 00:00:04 (4.01 seconds). Triples added: 166,497, Average Rate: 41520.00 tps. Terminating agload processes, please wait... $The container id in this case is agraph.
$ docker stop agraph $ docker-machine stop default $ /Applications/VirtualBox.app/Contents/MacOS/VirtualBox &You should see the VirtualBox Manager window. Now, click on the "Settings" then "System" buttons to see the system settings, where you can change the amount of memory available to the boot2docker-vm virtual machine, which in turn effects the amount of memory available to Docker containers.
$ docker-machine start default $ docker start agraph
Unlike with the AllegroGraph VM, which has Gruff installed inside the VM, when using AllegroGraph and Docker you run Gruff on your host computer. See the Gruff download for more information on downloading and installing Gruff.
If you have an older version of VirtualBox installed, Docker Toolbox will likely not work well, so we recommend, if you have VirtualBox installed, that you completely uninstall it before installing Docker Toolbox, since it contains an installation of Virtualbox. Note: following the uninstall instructions will leave untouched your VirtualBox virtual machines.
Find the "Uninstallation" section for your operating system in the VirtualBox documentation.
If you have a previous version of Docker installed, you might consider
~/.docker [Mac OS X] or
C:\USERS\USERNAME\.docker [Windows] aside, so it isn't used,
unless you have existing Docker containers you are using.
|Copyright © 2017 Franz Inc., All Rights Reserved | Privacy Statement|