PadoGrid in 5 Minutes - padogrid/padogrid GitHub Wiki

◀️ Home :link: Quick Start ▶️

The following steps show how to install and run PadoGrid with Hazelcast OSS in less than five (5) minutes.


Install PadoGrid (0.5 minute)

  1. Install PadoGrid and Hazelcast OSS
curl -fsSL https://raw.githubusercontent.com/padogrid/padogrid/develop/padogrid-deployment/src/main/resources/common/bin_sh/install_padogrid | /bin/bash -s -- -no-stty -quiet -product hazelcast-oss

If the above command may fails, then you can download and run install_padogrid as follows.

curl -O -fsSL https://raw.githubusercontent.com/padogrid/padogrid/develop/padogrid-deployment/src/main/resources/common/bin_sh/install_padogrid
chmod 755 install_padogrid
./install_padogrid -quiet -product hazelcast-oss
  1. Initialize PadoGrid
. ~/Padogrid/workspaces/myrwe/initenv.sh -quiet

Run Hazelcast (2.5 minutes)

To run Hazelcast, you need Java.

  1. Download and install Java. All the underlying data grid products require JDK 1.8+. It must be JDK, not JRE.
  1. Update JAVA_HOME

:pencil2: If the java executable is in your PATH, then the Java installation directory can be found by executing the following.

# Find Java installtion directory
dirname "$(dirname "$(which java)")"

Java is typically installed in the following directories.

OS JAVA_HOME
macOS /Library/Java/JavaVirtualMachines/<jdk-version>/Contents/Home
Cygwin /cygdrive/c/Program Files/Java/<jdk-version>
Others dirname "$(dirname "$(which java)")"

Enter the Java home path (JAVA_HOME) when the following command prompts for your input.

update_padogrid -product java
  1. Start the default Hazelcast cluster, myhz
# Start both Hazelcast cluster and management center
start_cluster -all

# View cluster and management center status in detail
show_cluster -long
  1. Create and run the default app, perf_test
# Create default app, 'perf_test'
create_app -product hazelcast -app perf_test

# Change directory to perf_test
cd_app perf_test/bin_sh

# Ingest Eligibility and Profile data into Hazelcast
./test_ingestion -run

# Read back the ingested data from Hazelcast
./read_cache eligibility
  1. View Hazelcast Management Center

:pencil2: show_cluster -long executed in Step 3 displays the management center URL.

  1. Teardown
# Stop both cluster and management center

stop_cluster -all

What's Next? (2 minutes)

In a nutshell, PadoGrid is a toolkit that oversees a directory structure in which you can sandbox your applications. The directory structure is very simple. Every workspace has the same hierarchy pattern as shown below.

rwe
├── workspace
│   ├── apps
│   ├── clusters
│   ├── docker
│   ├── k8s
│   └── pods
...

rwe (Root Workspaces Environment) is the top directory in which you create one or more workspaces. Each workspace directory has component directories, namely, apps, cluster, docker, k8s, and pods. PadoGrid places all the product-specific settings provided by the user in the component directories.

That's pretty much it!

You navigate through rwe, workspace and component directories using PadoGrid's commands such as switch_* and cd_* commands. For example, switch_cluster switches the current cluster context and cd_cluster changes directory to the specified cluster without changing the current cluster context. You will use these commands quite often as you increase the directory structure complexity by adding more and more clusters, workspaces and rwes.

In addition to switch_* and cd_* commands, there are other commands like start_*, stop_*, kill_*, show_*, clean_*, remove_*, etc. for managing clusters, workspaces and rwes.

The following manual pages provide the basics of PadoGrid.

The primary purpose of PadoGrid is to allow users to share use case solutions built on top of data grid and relevant products. PadoGrid achieves this by deploying shrink-wrapped solutions in bundles, which are described in the following manual page.

Once you understand the concept of bundles, for more hands-on experience, try the following tutorial bundle which provides step-by-step instructions covering PadoGrid essentials.

https://github.com/padogrid/bundle-none-tutorial-padogrid


:pencil2: The PadoGrid cheat sheet provides a complete set of commands. You can view the PadoGrid cheat sheet by excuting one of the following commands.

# Man page
man padogrid

# Or usage with '-?'.
padogrid -?

You can use man command or command -? to view the usage of any Padogrid command.


◀️ Home :link: Quick Start ▶️