Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
April 15, 2021 05:41 pm GMT

Getting Started with Aerospike Enterprise Edition On Docker Desktop

Whats the fastest way to start using Aerospike Database Enterprise Edition? The title gives it away: spin up a Docker container! Lets get you from zero to running your own Aerospike Enterprise Edition instance in <10 minutes.

Get a Free Enterprise Edition License

Click the Try Now button in the upper-right corner of aerospike.com, enter your contact information and select the Enterprise Edition option.

Download the Evaluation License File

Check your email and click to download the evaluation license file. The downloaded file is named evaluation-features.conf. This is your license to run a fully loaded single node of Aerospike Enterprise Edition (EE).
Welcome to the Aerospike Family

Create a Volume to Share with the Docker Container

Open your Terminal or Windows Linux Subsystem prompt. Use mkdir (or sudo mkdir, if necessary) to create a new directory. I created the directory named EE_eval_file in my home directory. Use cp or sudo cp to copy the evaluation-features.conf into the new directory.

Note: A best practice is to create /opt/aerospike/etc, because this mirrors the standard location for the evaluation-features.conf file on an Aerospike server. To create that directory, use the command sudo mkdir -p /opt/aerospike/etc.

Install Docker Desktop & Share the Evaluation Features Directory

Download and install Docker Desktop.

In Docker Desktop, go to Preferences Resources File Sharing. Click + and browse to the directory you created in the previous step to hold your evaluation-features.conf file. (Hold Command + Shift when you click to show hidden directories.) To apply the change, click Apply & Restart. Now your EE container will be able to access your evaluation license.

Docker Preferences Showing New Share

At this point, you can close Docker Desktop. You will do the rest from the command line.

Pull and Spin Up an Enterprise Edition Container

Pull the EE image from the Docker Hub registry using the following command:

docker pull aerospike/aerospike-server-enterprise

Aerospike maintains a set of images and Docker does the grunt work of downloading and verifying the EE image.
Screencap of Docker Pull EE

Now, youre ready to spin up your EE container:

sudo docker run -tid --name aerospike -p 3000:3000 -p 3001:3001 -p 3002:3002 -v <DIRECTORY>:/aerospike/etc/ -e "FEATURE_KEY_FILE=/aerospike/etc/evaluation-features.conf" -e "NAMESPACE=aerospike-demo" aerospike/aerospike-server-enterprise

Replace the text <DIRECTORY> with the absolute path to the directory containing your evaluation-features.conf file. If using Windows Linux Subsystem, make sure to use your Windows backslashes and drive designations.

Heres the docker run reference, and the repo and README.md for the EE dockerfile so you can tailor the command to better suit your evaluation.

After you type in your password for the sudo, Docker returns the container ID.

Screencap of Docker Run EE

At this point, your EE container should be running. Verify with the command:

docker ps

Screencap of Docker PS

Okay, I have EE running, now what?

Its play time! :) Lets add a record and read it using the aerospike-tools Docker Container. First, grab the image:

docker pull aerospike/aerospike-tools

Screencap of Docker Pull Tools

Next, spin up a new container running AQL, the Aerospike command-line data browser:

docker run -it aerospike/aerospike-tools aql -h  $(docker inspect -f '{{.NetworkSettings.IPAddress }}' aerospike)

Since AQL is running in a different container from the instance of EE, the above command uses docker inspect to find the IP address of your EE container, and passes it to AQL using the -h option.

At this point, you can type interactive commands into AQL in your Terminal or WLS prompt. Insert a record into Aerospike EE using the following data model:
Namespace aerospike-demo (set in the first docker run command)
Set name foo
Bin name bar
Primary key 123
String data w00t!

insert into aerospike-demo.foo (PK, bar) values (123, 'w00t!')

...and view all data in the namespace:

select * from aerospike-demo.foo

Screencap of Insert and Select

Next Steps...

Now that Aerospike Enterprise Edition is running, you can download and install an Aerospike client, and then REALLY put your Aerospike EE to work.

Do you want to learn more about using Aerospike Database? Check out our Developer Hub. Theres a wealth of resources available there to jump-start your Aerospike education! Im excited for you. If you have any questions, feel free to post on the Forums.

Enjoy efficient management of data at scale!

Thanks to Yaoqi for the match.


Original Link: https://dev.to/aerospike/getting-started-with-aerospike-enterprise-edition-on-docker-desktop-14i0

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To