Deploying Grakn on AWS

AWS Marketplace

Deployment

TBC

Stack parameters

The following parameters are used to define the stack:

  • General:
    • StackName

      The name of your Grakn KGMS stack. This must be a valid system name, specifically, it must consist of only lowercase letters, numbers, and hyphens, and cannot exceed 50 characters.

    • KeyPairName

      The key pair assigned to Grakn instances to allow SSH access.

  • Network:
    • VPC

      The id of the VPC the stack should be deployed into.

    • InternetFacingRouteTable

      The id of an internet-facing Route Table in the VPC.

    • GraknSubnetCidrBlock

      The Grakn cluster will be deployed in a separate subnet and this setting specifies its IP CIDR range.

    • SSHLocation

      The IP address range that can be used to access Grakn instances using SSH.

    • gRPCLocation

      The IP address range that can be used to make gRPC requests.

  • Cluster:
    • GraknInstanceType

      EC2 instance type of Grakn instances.

    • GraknGroupSize

      Number of Grakn instances in the cluster.

    • EbsVolumeSize

      Size in GB of each of the EBS volumes that are attached to Grakn instances.

    • OptimiseForEbs

      Specifies whether to optimise Grakn Launch Configuration for EBS I/O.

Accessing Grakn

There are various ways to access Grakn on AWS. Here we will address the most common usage patterns.

Using Grakn gRPC client

The most common access pattern is to use the Grakn gRPC client to connect to a Grakn cluster. The connection happens via TCP port 48555 and the gRPCLocation stack parameter defines the range of IP addresses that can schedule gRPC requests.

Logging in into a node

To log in into one of the cluster nodes, simply use the ssh command:

ssh -i <private key file> ubuntu@<grakn instance DNS name or IP address>

Cluster health check

To verify the state of the cluster, execute the following command:

grakn cluster status

A sample output of the command executed on a node of a healthy 3-node cluster shall look similar to this:

Accessing the Graql console

To access the Graql console, a user password is required. The default user password is specified in the GraknUserPassword output.

To log into the Graql console, simply type graql console. After entering the user credentials (user: grakn, password: the one specified in the GraknUserPassword output), you are free to interact with Grakn via the Graql terminal. A successful login attempt shall look like this:

A summary of available commands can be found here.

Accessing the Grakn console

The Grakn console can be accessed similarly to the Graql console by typing:

grakn console start

and providing the user credentials (user: grakn, password: the one specified in the GraknUserPassword output). A successful login attempt will look like this:

Provided you log in as user with admin privileges, Grakn console allows to perform the following actions:

  • create a new user:

CREATE USER username WITH PASSWORD userpassword WITH ROLE admin

  • update an existing user’s password

UPDATE username WITH PASSWORD newpassword

  • retrieve all of the users present:

LIST USERS

  • retrieve a user:

GET USER username

  • delete an existing user:

DELETE USER username

Next Steps

If you want to learn more about Grakn KGMS, the Grakn Academy is a good place to start.

To learn more about running Grakn KGMS in the cloud, take a look at the best practices guide and post deployment steps.