Configuring and managing highly available cluster applications can be a complex black art. Graviton is a tool that leverages the power of Amazon Web Services to make launching the Stardog cluster easy.
The source code is available as Apache 2.0 licensed code.
In order to use
stardog-graviton in its current form the following environment variables must be set.
AWS_ACCESS_KEY_ID=<a valid aws access key> AWS_SECRET_ACCESS_KEY=<a valid aws secret key>
The account associated with the access tokens must have the ability to create IAM credentials and full EC2 access.
packer must be in your system path.
The easiest way to launch a cluster is to run
stardog-graviton in interactive mode. This will cause the program to ask a series of questions in order to get the needed values to launch a cluster. Here is a sample session:
$ stardog-graviton --log-level=DEBUG launch mystardog423 What version of stardog are you launching?: 4.2.3 What is the path to the Stardog release?: A value must be provided. What is the path to the Stardog release?: /Users/bresnaha/stardog-4.2.3.zip There is no base image for version 4.2.3. - Running packer to build the image... done AMI Successfully built: ami-c06246a0 Creating the new deployment mystardog423 Would you like to create an SSH key pair? (yes/no): no EC2 keyname (default): <aws key name> Private key path: /path/to/private/key What is the path to your Stardog license?: /path/to/stardog/license \ Calling out to terraform to create the volumes... - Calling out to terraform to stop builder instances... Successfully created the volumes. \ Creating the instance VMs...... Successfully created the instance. Waiting for stardog to come up... The instance is healthy Changing the default password... Password changed successfully for user admin. \ Opening the firewall...... Successfully opened up the instance. The instance is healthy The instance is healthy Stardog is available here: http://mystardog423sdelb-1763823291.us-west-1.elb.amazonaws.com:5821 ssh is available here: mystardog423belb-124202215.us-west-1.elb.amazonaws.com Using 3 stardog nodes 10.0.101.189:5821 10.0.100.107:5821 10.0.100.140:5821 Success.
To avoid being asked questions a file named
~/.graviton/default.json can be created. An example can be found in the defaults.json.example file.
All of the components needed to run a Stardog cluster are considered part of a deployment. Every deployment must be given a name that is unique to each cloud account. In the above example the deployment name is
Once the image has been successfully launched its health can be monitored with the
$ stardog-graviton --log-level=DEBUG status mystardog423 The instance is healthy Stardog is available here: http://mystardog423sdelb-1763823291.us-west-1.elb.amazonaws.com:5821 ssh is available here: mystardog423belb-124202215.us-west-1.elb.amazonaws.com Using 3 stardog nodes 10.0.101.189:5821 10.0.100.107:5821 10.0.100.140:5821 Success.
AWS EC2 charges by the hour for the VMs that Graviton runs thus when the cluster is no longer in use it is important to clean it up with the
$ stardog-graviton --log-level=DEBUG destroy mystardog423 This will destroy all volumes and instances associated with this deployment. Do you really want to destroy? (yes/no): yes / Deleting the instance VMs... Successfully destroyed the instance. \ Calling out to terraform to delete the images... Successfully destroyed the volumes. Success.