We developed a Docker image which pre-installed all modules in this bootcamp. You can directly use it in your own environment if you have docker. This page describes how to launch an EC2 instance on AWS and run docker container within it.
Launch an AWS EC2 instance
Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/
From the Amazon EC2 console dashboard, click AMIs on left sidebar.
Choose Public Images in dropdown below launch and search for ami-59d4f433.
Select the image and click the blue Launch button.
On the Choose an Instance Type page, select the hardware configuration and size of the instance to launch.
Choose the type m4.xlarge, with 4 vCPUs and 16GB memory, then click “Next: Configuration Instance Details”.
On the Configure Instance Details page, just keep the default settings.
On the Add Storage page, you can specify storage size for your disk. Use the default 30GB.
On the Tag Instance page, specify tags for your instance by providing key value combinations if you need.
On the Configure Security Group page, define firewall rules for your instance. We suggest you'd better keep the default setting unless you are sure what you are doing.
On the Review Instance Launch page, check the details of your instance and click Launch.
In the Select an existing key pair or create a new key pair dialog box. If you don’t have an existing key pair, choose create a new key pair. Enter a name for the key pair (e.g. bdhKeyPair) and click “Download Key Pair”. This key pair will be used to connect to your instance. Then on the same dialog box, choose Choose an existing key pair, and select the one you just created.
Finally, click “Launch Instances”. You can view your instances by clicking Instances on the left navigation bar.
Connect to the instance
After your instance is fully launched, you can connect to it using SSH client. Right click on the instance and click connect then AWS will show you instructions about connecting on various platform. ssh command will be used for *nix platform and Putty will be used for windows.
Start a docker container
A pre-configured container with all necessary module installed is available for you to directly use. Navigate to ~/lab/docker and vagrant up will launch a container like below
Then start all hadoop related service by
Termination
You can terminate a docker by vagrant destroy --force in ~/lab/docker/.
Limitations
After a docker container exit, you may loose data stored within it. You can map folder from AWS EC2 instance with Docker container for persistent data saving.