<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Mark Prince</title>
    <description>The latest articles on Forem by Mark Prince (@markprincely).</description>
    <link>https://forem.com/markprincely</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F613924%2F75ee7a10-047c-4a18-926d-bacc00a8c23a.jpg</url>
      <title>Forem: Mark Prince</title>
      <link>https://forem.com/markprincely</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/markprincely"/>
    <language>en</language>
    <item>
      <title>Getting Started with Aerospike Enterprise Edition On Docker Desktop</title>
      <dc:creator>Mark Prince</dc:creator>
      <pubDate>Thu, 15 Apr 2021 17:41:58 +0000</pubDate>
      <link>https://forem.com/aerospike/getting-started-with-aerospike-enterprise-edition-on-docker-desktop-14i0</link>
      <guid>https://forem.com/aerospike/getting-started-with-aerospike-enterprise-edition-on-docker-desktop-14i0</guid>
      <description>&lt;p&gt;What’s the fastest way to start using &lt;a href="https://www.aerospike.com/products/database-platform/"&gt;Aerospike Database Enterprise Edition&lt;/a&gt;? The title gives it away: spin up a &lt;a href="https://www.docker.com/"&gt;Docker&lt;/a&gt; container! Let’s get you from zero to running your own Aerospike Enterprise Edition instance in &amp;lt;10 minutes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Get a Free Enterprise Edition License
&lt;/h2&gt;

&lt;p&gt;Click the &lt;a href="https://www.aerospike.com/lp/try-now/"&gt;Try Now&lt;/a&gt; button in the upper-right corner of &lt;a href="https://www.aerospike.com/"&gt;aerospike.com&lt;/a&gt;, enter your contact information and select the Enterprise Edition option.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--1a2iCnl0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://github.com/markprincely/asblog_gs_docker_enterprise-edition/blob/main/try_now.png%3Fraw%3Dtrue" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1a2iCnl0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://github.com/markprincely/asblog_gs_docker_enterprise-edition/blob/main/try_now.png%3Fraw%3Dtrue" width="230" height="94"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Download the Evaluation License File
&lt;/h2&gt;

&lt;p&gt;Check your email and click to download the evaluation license file. The downloaded file is named &lt;em&gt;evaluation-features.conf&lt;/em&gt;. This is your license to run a fully loaded single node of Aerospike Enterprise Edition (EE). &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--NtmMsnYr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://github.com/markprincely/asblog_gs_docker_enterprise-edition/blob/main/as_ee_welcome.png%3Fraw%3Dtrue" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--NtmMsnYr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://github.com/markprincely/asblog_gs_docker_enterprise-edition/blob/main/as_ee_welcome.png%3Fraw%3Dtrue" alt="Welcome to the Aerospike Family" width="800" height="548"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Create a Volume to Share with the Docker Container
&lt;/h2&gt;

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

&lt;blockquote&gt;
&lt;p&gt;Note: A best practice is to create &lt;code&gt;/opt/aerospike/etc&lt;/code&gt;, because this mirrors the standard location for the &lt;em&gt;evaluation-features.conf&lt;/em&gt; file on an Aerospike server. To create that directory, use the command &lt;code&gt;sudo mkdir -p /opt/aerospike/etc&lt;/code&gt;. &lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;
  
  
  Install Docker Desktop &amp;amp; Share the Evaluation Features Directory
&lt;/h2&gt;

&lt;p&gt;Download and install &lt;a href="https://www.docker.com/products/docker-desktop"&gt;Docker Desktop&lt;/a&gt;.&lt;/p&gt;

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

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--vy-tSo7u--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://github.com/markprincely/asblog_gs_docker_enterprise-edition/blob/main/docker_file_share.png%3Fraw%3Dtrue" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vy-tSo7u--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://github.com/markprincely/asblog_gs_docker_enterprise-edition/blob/main/docker_file_share.png%3Fraw%3Dtrue" alt="Docker Preferences Showing New Share" width="800" height="489"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At this point, you can close Docker Desktop. You will do the rest from the command line.&lt;/p&gt;
&lt;h2&gt;
  
  
  Pull and Spin Up an Enterprise Edition Container
&lt;/h2&gt;

&lt;p&gt;Pull the EE image from the Docker Hub registry using the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker pull aerospike/aerospike-server-enterprise
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Aerospike maintains a set of images and Docker does the grunt work of downloading and verifying the EE image. &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Fhhtz-sS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://github.com/markprincely/asblog_gs_docker_enterprise-edition/blob/main/docker_pull_ee.png%3Fraw%3Dtrue" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Fhhtz-sS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://github.com/markprincely/asblog_gs_docker_enterprise-edition/blob/main/docker_pull_ee.png%3Fraw%3Dtrue" alt="Screencap of Docker Pull EE" width="800" height="205"&gt;&lt;/a&gt;  &lt;/p&gt;

&lt;p&gt;Now, you’re ready to spin up your EE container:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker run -tid --name aerospike -p 3000:3000 -p 3001:3001 -p 3002:3002 -v &amp;lt;DIRECTORY&amp;gt;:/aerospike/etc/ -e "FEATURE_KEY_FILE=/aerospike/etc/evaluation-features.conf" -e "NAMESPACE=aerospike-demo" aerospike/aerospike-server-enterprise
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Replace the text &lt;code&gt;&amp;lt;DIRECTORY&amp;gt;&lt;/code&gt; with the absolute path to the directory containing your &lt;em&gt;evaluation-features.conf&lt;/em&gt; file. If using Windows Linux Subsystem, make sure to use your Windows backslashes and drive designations. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.docker.com/engine/reference/commandline/run/"&gt;Docker Run&lt;/a&gt; flags used:&lt;br&gt;
&lt;em&gt;-t&lt;/em&gt; : Tty, allocates a pseudo-tty&lt;br&gt;
&lt;em&gt;-i&lt;/em&gt; : Interactive mode, keeps STDIN open even if not attached&lt;br&gt;
&lt;em&gt;-d&lt;/em&gt;  : Detached mode, start the container in the background; exits when the root process used to run the container exits&lt;br&gt;
&lt;em&gt;--name&lt;/em&gt; : Name, Gives the container the name aerospike &lt;br&gt;
&lt;em&gt;-p&lt;/em&gt; : Ports, maps container Ports 3000, 3001, and 3002 to the host&lt;br&gt;
&lt;em&gt;-v&lt;/em&gt; : Volume, maps a local directory for use in the container&lt;br&gt;
&lt;em&gt;-e&lt;/em&gt; : Environment, sets environment variables in the container&lt;/p&gt;

&lt;p&gt;Here’s the &lt;a href="https://github.com/aerospike/aerospike-server-enterprise.docker"&gt;repo and README.md for the EE dockerfile&lt;/a&gt; so you can tailor EE to better suit your evaluation.&lt;/p&gt;

&lt;p&gt;Because of the &lt;em&gt;-d&lt;/em&gt; option, docker returns the container ID.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--e3FtUvZj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://github.com/markprincely/asblog_gs_docker_enterprise-edition/blob/main/docker_run_ee.png%3Fraw%3Dtrue" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--e3FtUvZj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://github.com/markprincely/asblog_gs_docker_enterprise-edition/blob/main/docker_run_ee.png%3Fraw%3Dtrue" alt="Screencap of Docker Run EE" width="800" height="105"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At this point, your EE container should be running. Verify with the command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker ps
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--K45zkLfP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://github.com/markprincely/asblog_gs_docker_enterprise-edition/blob/main/docker_ps.png%3Fraw%3Dtrue" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--K45zkLfP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://github.com/markprincely/asblog_gs_docker_enterprise-edition/blob/main/docker_ps.png%3Fraw%3Dtrue" alt="Screencap of Docker PS" width="800" height="128"&gt;&lt;/a&gt;  &lt;/p&gt;

&lt;h2&gt;
  
  
  Okay, I have EE running, now what?
&lt;/h2&gt;

&lt;p&gt;It’s play time! :) Let’s add a record and read it using the aerospike-tools Docker Container. First, grab the image:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker pull aerospike/aerospike-tools
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--o4e1eGty--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://github.com/markprincely/asblog_gs_docker_enterprise-edition/blob/main/docker_pull_tools.png%3Fraw%3Dtrue" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--o4e1eGty--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://github.com/markprincely/asblog_gs_docker_enterprise-edition/blob/main/docker_pull_tools.png%3Fraw%3Dtrue" alt="Screencap of Docker Pull Tools" width="800" height="307"&gt;&lt;/a&gt;  &lt;/p&gt;

&lt;p&gt;Next, spin up a new container running &lt;a href="https://www.aerospike.com/docs/tools/aql/index.html"&gt;AQL&lt;/a&gt;, the Aerospike command-line data browser:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker run -it aerospike/aerospike-tools aql -h  $(docker inspect -f '{{.NetworkSettings.IPAddress }}' aerospike)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Since AQL is running in a different container from the instance of EE, the above command uses &lt;a href="https://docs.docker.com/engine/reference/commandline/inspect/"&gt;docker inspect&lt;/a&gt; to find the IP address of your EE container, and passes it to AQL using the &lt;a href="https://www.aerospike.com/docs/tools/aql/aql-help.html"&gt;-h option&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;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 &lt;a href="https://www.aerospike.com/docs/architecture/data-model.html"&gt;data model&lt;/a&gt;:&lt;br&gt;
Namespace – &lt;em&gt;aerospike-demo&lt;/em&gt; (set in the first docker run command) &lt;br&gt;
Set name – &lt;em&gt;foo&lt;/em&gt; &lt;br&gt;
Bin name – &lt;em&gt;bar&lt;/em&gt;&lt;br&gt;
Primary key – &lt;em&gt;123&lt;/em&gt;&lt;br&gt;
String data – &lt;em&gt;‘w00t!’&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;insert into aerospike-demo.foo (PK, bar) values (123, 'w00t!')
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;...and view all data in the namespace:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;select * from aerospike-demo.foo
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Z5sPfu38--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://github.com/markprincely/asblog_gs_docker_enterprise-edition/blob/main/aql_w00t.png%3Fraw%3Dtrue" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Z5sPfu38--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://github.com/markprincely/asblog_gs_docker_enterprise-edition/blob/main/aql_w00t.png%3Fraw%3Dtrue" alt="Screencap of Insert and Select" width="800" height="456"&gt;&lt;/a&gt;  &lt;/p&gt;

&lt;h2&gt;
  
  
  Next Steps...
&lt;/h2&gt;

&lt;p&gt;Now that Aerospike Enterprise Edition is running, you can download and install an &lt;a href="https://www.aerospike.com/download/client/"&gt;Aerospike client&lt;/a&gt;, and then REALLY put your Aerospike EE to work. &lt;/p&gt;

&lt;p&gt;Do you want to learn more about using Aerospike Database? Check out our &lt;a href="https://www.developer.aerospike.com/"&gt;Developer Hub&lt;/a&gt;. There’s a wealth of resources available there to jump-start your Aerospike education! I’m excited for you. If you have any questions, feel free to post on the &lt;a href="https://discuss.aerospike.com/"&gt;Forums&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Enjoy efficient management of data at scale!&lt;/p&gt;

&lt;p&gt;Thanks to &lt;a href="https://unsplash.com/photos/7iatBuqFvY0?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditShareLink"&gt;Yaoqi&lt;/a&gt; for the match.&lt;/p&gt;

</description>
      <category>aerospike</category>
      <category>database</category>
      <category>datascience</category>
      <category>nosql</category>
    </item>
  </channel>
</rss>
