Exploring GridGain Nebula: Cloud-Native Service for Apache Ignite
Get started with GridGain Nebula.
Join the DZone community and get the full member experience.Join For Free
Let's suppose that you embraced Apache Ignite's high-performance distributed database for your projects and now moving to the cloud. As part of that transitioning, you prefer using fully-managed services for your databases, including Ignite. In this article, I'll show you GridGain Nebula -- a fully-managed, cloud-native service for Ignite.
Nebula is an end-to-end solution for running Apache Ignite clusters. With Nebula, you can run scalable, performing application workloads without the hassle of operating the environment. The Nebula hosted solution offers operations as a service. The back-end team manages and operates the clusters, performs software upgrades. It also handles patching, monitoring, and provisioning.
Let's walk through a demo setup and basic Nebula's capabilities.
Nebula Cluster Provisioning
Now we’ll guide you through the onboarding process and get Nebula going. Onboarding to Nebula involves the following steps:
- Creating a GridGain Nebula account
- Deploying Apache Ignite cluster infrastructure
- Connecting to the cluster and running database commands
- Monitoring and managing the cluster
Creating a GridGain Nebula Account
First, authenticate to GridGain Cloud Portal using an existing account or by creating a new account:
After logging in, you’ll see the Nebula portal.
Deploying the Cluster
Then, click the CREATE NEBULA CLUSTER button.
Since Nebula runs in the public cloud, it has a consumption cost (expressed per hour of instance runtime). At the time of writing, you get a $500 credit to explore Nebula for free.
You can choose from three sizes for your Apache Ignite cluster nodes: Small, Medium, and Large. You can also specify an AWS region of your choice. Also, specify the number of nodes you want your Apache Ignite cluster to have in the Nodes Count field. Click CONTINUE for the next step.
Specify the public IP address(es) where you allow Nebula portal access on the next screen. Configure an Apache Ignite cluster-specific administrator account. Then, click CONTINUE to move to the next step of the configuration wizard.
Verify the summary overview of the cluster you are about to create. Finally, add your credit card details and confirm the cluster deployment by clicking CREATE CLUSTER.
Wait for the deployment to complete successfully. After only a few minutes, the status will update in the Cluster Management view, showing the cluster and the corresponding nodes as Active.
Connecting to the Running Cluster
The Nebula portal provides a few sample templates, enabling connectivity to your running Apache Ignite cluster. To view the templates, select your cluster from Cluster Management, click the ellipsis (three vertical dots) to the right, and notice Connection Templates in the context menu.
Click Connection Templates. This action brings up a popup window with various connectivity options.
Depending on your application language, the list might be slightly different, though the process is identical overall. This example uses a Java database connectivity (JDBC) connection, using our SQLLine solution — a Java-based command-line tool to — connect to a relational database.
Select JDBC from the Client Type list box. Open the sample template and become familiar with its contents.
The most relevant information to establish the cluster connectivity is between the quotation marks in lines 24 to 25 in the sample script. This text shows the gridgain-nebula subdomain and corresponding hostname for your AWS-running cluster, as well as a placeholder for the admin user and password. Copy this information and set it aside for now. You’ll need it later.
Next, let's use the SQLLine command tool to connect to the Nebula cluster. The tool is shipped with the GridGain Community Edition. You can download this Edition from the software download page. Once on the page, click on the Software tab, then select the Community Edition tab and download.
When you have downloaded GridGain Community Edition, extract the ZIP file to a new folder, then browse to the bin folder. Notice the sqlline.sh/bat file in the bin folder.
To use this shell script to connect to the cluster, use the following syntax:
./sqlline.sh -u “jdbc:ignite://thin://<gridgain cluster name>:10800;user=<admin>;password=<password>;sslMode=require”
Replace the <gridgain cluster name>, <admin>, and <password> fields with the information you set aside earlier.
To validate the connection to the cluster, run this command:
This command shows a successful JDBC connection.
Creating a Sample Database
Now that you have a successful connection to the cluster, run an SQL command to create a new table structure. This structure will store names of cities and people:
CREATE TABLE City (id LONG PRIMARY KEY, name VARCHAR) WITH "template=replicated"; CREATE TABLE Person (id LONG, name VARCHAR, city_id LONG, PRIMARY KEY (id, city_id)) WITH "backups=1, affinityKey=city_id";
Then, run another SQL command to populate both tables with some sample data:
INSERT INTO City (id, name) VALUES (1, 'Forest Hill'); INSERT INTO City (id, name) VALUES (2, 'Denver'); INSERT INTO City (id, name) VALUES (3, 'St. Petersburg'); INSERT INTO Person (id, name, city_id) VALUES (1, 'John Doe', 3); INSERT INTO Person (id, name, city_id) VALUES (2, 'Jane Roe', 2); INSERT INTO Person (id, name, city_id) VALUES (3, 'Mary Major', 1); INSERT INTO Person (id, name, city_id) VALUES (4, 'Richard Miles', 2);
Lastly, validate the database contents by running the following SQL statement:
SELECT * From Person;
As expected, this command shows a list of people in your Person database, together with each person’s City_ID.
You’ve now completed connecting to the running Apache Ignite cluster instance in Nebula and creating a JDBC and SQL connection using the SQLLine shell tool. Now it’s time to return to the Nebula Portal and cover other helpful features for managing your Apache Ignite environment.
Monitoring and Managing the Cluster
Since Apache Ignite’s core function provides a powerful interaction with your application databases, the portal directly integrates this capability.
Nebula provides a workable interface to execute SQL query statements. From the main Nebula portal, navigate to the SQL screen.
In the QUERY tab, enter the following sample query:
SELECT * from CITY
Press Execute to run the query. The contents of the table are displayed immediately. This example shows a basic query, but there’s no limit to the query operations you can run from here. Technically, you don’t even need the SQLLine shell tool anymore. You can rely on a more user-friendly interface.
Managing Cluster Health and Status
It’s vital to monitor your cluster’s health status. Nebula shares insights on performance, each node’s IP address, CPU load, heap size (physical memory), and more.
From the main Nebula portal view, click Dashboard screen. This action brings up the following view for your cluster.
If needed, you can customize the dashboard view and metric details. To do this, create a new dashboard by clicking + next to the Default tab, then add Widgets to your dashboard. You can customize each widget from the context menu.
You can also quickly find other cluster operations if needed. For example, you can add administrative users, share the dashboard with your admins, or get general information about your cluster. From the main menu option, select the Clusters screen and then click the ellipsis (settings). In the context menu that appears, notice the Share with Team, Manage Cluster Users, and Cluster Info options.
Feel free to explore other Nebula capabilities on your own - Alerting, Snapshots, Code Deployment and other features.
You now know more about GridGain Nebula, the cloud-native service for your Apache Ignite clusters. You can get a fully workable Apache cluster up and running in just a few minutes, then start managing it directly from within the Nebula portal. Instead of spending time on infrastructure operations, your team can immediately focus on application integration and fine-tuning database interactions.
Opinions expressed by DZone contributors are their own.