Skip to main content
sroberts
Gold ⭐️
Gold ⭐️
May 19, 2017 11:12 PM UTC

Deploy HDP Sandbox on AWS

  • Oct 5, 2026 9:10 AM UTC
  • 8 replies
  • 17955 views
  • Translate All

Note: HDP 2.5 is used, but can be updated for HDP 2.6 and beyond.

  1. Boot an Amazon Linux instance with at least 16GB of RAM
  2. Execute the following. It will take a while

## install docker
sudo yum update -y
sudo yum install -y docker

## fix docker for importing the large sandbox image
sed -i.backup 's/\(^OPTIONS=.*\)"$/\1 --storage-opt=dm.basesize=20G"/' /etc/sysconfig/docker

## start docker
sudo service docker start

## confirm docker is working
sudo usermod -a -G docker ec2-user
docker info

## download docker image
curl -O http://hortonassets.s3.amazonaws.com/2.5/HDP_2.5_docker.tar.gz

## load docker image
docker load -i HDP_2.5_docker.tar.gz
## confirm image is available
docker images

## get sandbox docker startup script
curl -O https://raw.githubusercontent.com/hortonworks/tutorials/hdp-2.5/tutorials/hortonworks/hortonworks-sandbox-hdp2.5-guide/start_sandbox.sh

## start sandbox
bash start_sandbox.sh

## configure to start at boot
echo "bash /root/start_sandbox.sh" >> /etc/rc.local

## Print the URL for accessing the Sandbox
echo -e "##\nAccess the Sandbox at:\nhttp://$(curl -sS4 icanhazip.com):8888\n##"

Deploying!

8 replies

Gmeltser239
Silver ⭐️
May 25, 2017 2:10 AM UTC

The very first command fails:

sudo yum update -y

Most references suggest that outbound interfaces are not properly set-up on the instance. How one should set them up in order to get this script to work?

Translate
wcbdata
Gold ⭐️
Gold ⭐️
Aug 4, 2017 10:28 PM UTC

Updated link for HDP 2.6.1 docker image and HDP startup script for Linux:

https://downloads-hortonworks.akamaized.net/sandbox-hdp-2.6.1/HDP_2_6_1_docker_image_28_07_2017_14_42_40.tar

https://raw.githubusercontent.com/hortonworks/data-tutorials/master/tutorials/hdp/sandbox-deployment-and-install-guide/assets/start_sandbox-hdp.sh

It looks like the yum repository with docker is not enabled by default on AWS RHEL EC2 instances. If the yum update works, but you are unable to install docker, try the following to enable the right extras repository:

sudo yum install yum-utils
sudo yum-config-manager --enable rhui-REGION-rhel-server-extras
sudo yum install docker

Translate
wcbdata
Gold ⭐️
Gold ⭐️
Aug 5, 2017 1:50 AM UTC

It also looks like the command to expand the base image from 10GB to 20GB may not work on later versions of docker because the config file is ephemeral. This worked for me, instead (if you run into the dreaded "no space left on device" error.

docker daemon --storage-opt dm.basesize=20G

I used 30G, just to be safe, but the image size for HDP 2.6.1 looks to be about 12.13 GB total, so 20 should do.

Translate
renodino777
Silver ⭐️⭐️
Oct 11, 2017 1:25 AM UTC

I'm getting consistent "overlay2: Unknown option dm.basesize" in the logfile when I follow your instructions. I've also tried your storage-opt hack below, which produces the same error. I'm using Amazon Linux, and have plenty of storage config'd. Any ideas ?

Translate
renodino777
Silver ⭐️⭐️
Oct 13, 2017 5:49 AM UTC

(Responding to myself) I finally managed to get everything running, despite a very brittle and overly complicated process. See my gist: https://gist.github.com/renodino/5bd8adc661bd2f00a5b662ed0713fd0f

Translate
zach1
Silver ⭐️
Mar 30, 2018 2:23 AM UTC

The startup script link is no longer available, and I have searched quite a bit to find it without success. Does anyone have an idea where it has moved to?

Translate
wcbdata
Gold ⭐️
Gold ⭐️
May 9, 2018 7:45 AM UTC

The tutorial from which the script was linked has been deprecated on github, but there is a similar set of instructions here:https://docs.hortonworks.com/HDPDocuments/Cloudbreak/Cloudbreak-2.5.1/content/aws-launch/index.html

Translate