Install instructions for developers VM for labs - advantageous/j1-talks-2016 GitHub Wiki

We need a developer image for the labs.

The developer image needs:

  • Java SDK
  • git
  • Intellij
  • docker
  • gradle

We will keep the source code for the labs in this repo. We can use labels and branches for lab vs solution (where solution is the finished solution to the lab).

We will use the following images which can be launched via docker

  • cassandra
  • grafana/statsd/influxdb
  • elk

The Oracle JavaOne lab setup states that the laptops for the lab will have 16 GB of memory.

The HOL owner or staging developer is responsible for delivering a finished VirtualBox image, complete with a PDF of the lab manual on the user desktop.

We must create an VirtualBox image.

To do so we will use Ubuntu Desktop 16 to setup a development environment.

Virtual Box

Open VirtualBox and create a new image based on the Ubuntu desktop iso.

  • 12 GB of RAM
  • 45 GB of disk space dynamically expandable.
  • 4 CPUs

Names

  • Box name: JavaOneReakt
  • Computer name: java1-reakt
  • Username: dev
  • Password: j1reakt!
  • Login automatically true

Install git

sudo apt-get update
sudo apt-get install -y git

Install Java 8

sudo apt-get install python-software-properties
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install -y oracle-java8-installer

Install IntelliJ

wget https://download.jetbrains.com/idea/ideaIC-2016.2.2.tar.gz
mv ideaIC-2016.2.2.tar.gz ~/Desktop/tools
tar -C ~/Desktop/tools -zxvf ~/Desktop/tools/ideaIC-2016.2.2.tar.gz 
mv ~/Desktop/tools/idea-IC-162.1628.40/ ~/Desktop/tools/idea
rm ~/Desktop/tools/ideaIC-2016.2.2.tar.gz
 ~/Desktop/tools/idea/bin/idea.sh 
# Disable plug-ins that we do not use

Install Gradle

curl -s https://get.sdkman.io | bash
source /home/dev/.sdkman/bin/sdkman-init.sh 
sdk install gradle 2.4

Setup docker


## Setup docker repo
sudo apt-get install apt-transport-https ca-certificates
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
sudo touch /etc/apt/sources.list.d/docker.list
sudo echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" > /etc/apt/sources.list.d/docker.list

## Install Docker
sudo apt-get update
sudo apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
sudo apt-get install -y docker-engine
sudo service docker start
sudo docker run hello-world

## Setup docker group so you don't have to use sudo
sudo groupadd docker
sudo usermod -aG docker $USER


## Reboot
docker run hello-world

Notes on resizing VirtualBox disk

$ pwd
~/VirtualBox VMs/JavaOneReakt
$ VBoxManage modifyhd JavaOneReakt.vdi --resize 46080

I was not able to repartition with gpartition so I recreated the VM box with LVM partition manager which does allow resizing.