Google Cloud Launcher
We shall begin with deployment of a Grakn cluster. The procedure is straight-forward and takes advantage of the Cloud Launcher:
To start deployment, click on the
Launch on Compute Engine button which will take you to the configuration screen
Feel free to adjust the settings to your needs. When satisfied with the configuration press
That is all! Your cluster deployment is now pending.
When the deployment is complete you should be able to see the post-deployment screen:
Once the vms are deployed, please allow some time for cluster to fully bootup and synchronise. 2 minutes per node in a cluster is a reasonable rule of thumb for full bootup time.
There are various ways to access Grakn in the cloud. Here we will address the most common usage patterns.
Using Grakn gRPC client
To enable gRPC communication, traffic on TCP port 48555 needs to be allowed. It is enabled by default. If you chose otherwise for your deployment, a suitable firewall rule can be created if needed by executing the command in red circle in your terminal:
Logging in into a node
You may require a more direct interaction with the database. You need to log into a node to achieve that.
To do so go back to the Google console and follow the red arrow as shown below to start an ssh session using the
Open in browser window option.
Once logged in, a variety of interactions are possible through
Cluster health check
To check cluster health, execute the
grakn cluster status command. The output shall look like this:
Accessing the Graql console
To access the Graql console, a user password is required. You can see it in the Google console screen in the red circle:
To log into the Graql console, simply type
graql console. After entering the user credentials (user: grakn, password: the one from the Google console) you are free to interact with Grakn via the Graql terminal. 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 Graql console by typing
grakn console start and providing the user credentials. Successful login will look like this:
Provided you log in as user with
admin privileges, Grakn console allows you 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 USER username WITH PASSWORD newpassword
- retrieve all of the users present:
- retrieve a user:
GET USER username
- delete an existing user:
DELETE USER username
If you want to learn more about Grakn KGMS, the Grakn Academy is a good place to start.