• By admin
  • 7 November, 2022

Using Ansible for AllegroGraph multi-server installation


Visit our Github example page for more details on creating Ansible playbooks for installing, starting and stopping an AllegroGraph server on one or more machines.

You must edit three files to personalize the configuration and then you can use the Makefile to install, start and stop the AllegroGraph servers on one or more machines.


There are a vast number of server configuration parameters for AllegroGraph, far more than you would want to express as arguments to a configuration function.

In this directory there is a file agraph.cfg-template that you should edit to add or modify the configuration options (Link Here) you wish to set.

The only options you should not specify in agraph.cfg-template are


as these will be added to the final agraph.cfg file based on values you put in vars.yaml.


One important variable in vars.yaml is basedir. The server will be installed in a newly created directory that is the value of basedir. Also a


directive will be put in the agraph.cfg specifying this value. This means that inside agraph.cfg you can (and should) use relative pathanmes to refer to directories and files inside this directory tree.


This line is always in the agraph.cfg

SettingsDirectory settings

It places the settings directory as a subdirectory of the basedir. Do not change this line as the settings directory has to be here in order for the super user password to be installed correctly.


Before starting the installation edit the following files:


Insert the name of the machines on which you want the AllegroGraph server to be installed. Replace the sample machine names already in the file with the names of your machines. After you edit the inventory.txt file you can type

% make

to see if the machines you specified are reachable by ansible.


That file contains descriptions of the variables to be set as well as some sample values that you’ll need to change.


This is the file that will be modified to create the agraph.cfg that will be installed with AllegroGraph. You should review the server settings document to see which additional configuration parameters you wish to specify.

make install

The command

% make install

will run though the installation steps to install the server. It will do a superseding install meaning it will overwrite the server executables but it will not remove any repositories. However it is best to backup your installion before doing the install in case something unexpected happens and repos are lost.

make clean-install

If you wish to completely remove an installed AllegroGraph server so that make install gives you a totally fresh directory then

% make clean-install

will delete everything including repos that are found in subdirectories of the installation.

make start

To start the server on all machines do

% make start

make stop

To stop the server on all machines do

% make stop

If you are going to make install be sure to stop all servers before doing so.

Back to Blog

Related articles