JVM DevOps with Immutable Infrastructure

PalletOps for JVM
Immutable Infrastructure

Setup Jenkins and DevTools on Ubuntu on AWS EC2

 

Install Git, Java7, Java 8 and Maven

sudo apt-get install git

sudo apt-add-repository ppa:webupd8team/java

sudo apt-get update

sudo apt-get install oracle-java8-installer

sudo apt-get install oracle-java7-installer

sudo apt-get install oracle-java8-set-default

sudo apt-get install maven

 

Install Jenkins

sudo wget -q -O – https://jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add –
sudo sh -c ‘echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/sources.list.d/jenkins.list’
sudo apt-get update
sudo apt-get install jenkins

 

Install MongoDB

 

http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/

sudo apt-key adv –keyserver hkp://keyserver.ubuntu.com:80 –recv 7F0CEB10

echo¬†“deb http://repo.mongodb.org/apt/ubuntu “$(lsb_release -sc)”/mongodb-org/3.0 multiverse” | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list

sudo apt-get update

sudo apt-get install -y mongodb-org

sudo apt-get install -y mongodb-org=3.0.4 mongodb-org-server=3.0.4 mongodb-org-shell=3.0.4 mongodb-org-mongos=3.0.4 mongodb-org-tools=3.0.4

sudo service mongod start

sudo tail -5000 /var/log/mongodb/mongod.log

 

Install Postgresql

https://www.digitalocean.com/community/tutorials/how-to-install-and-use-postgresql-on-ubuntu-14-04

sudo apt-get update
sudo apt-get install postgresql postgresql-contrib

 

Install Redis

https://www.digitalocean.com/community/tutorials/how-to-install-and-use-redis

sudo apt-get install build-essential

sudo apt-get install tcl8.5

sudo wget http://download.redis.io/releases/redis-stable.tar.gz

sudo tar xzf redis-stable.tar.gz

cd redis-stable

make

make test

sudo make install

cd utils

sudo ./install_server.sh

sudo service redis_6379 start

redis-cli

Install Scala

http://blog.prabeeshk.com/blog/2014/10/31/install-apache-spark-on-ubuntu-14-dot-04/

http://www.scala-lang.org/download/2.11.7.html

sudo wget http://downloads.typesafe.com/scala/2.11.7/scala-2.11.7.deb

sudo dpkg -i scala-2.11.7.deb

 

Install SBT and Gradle

http://www.scala-sbt.org/0.13/tutorial/Installing-sbt-on-Linux.html

echo “deb http://dl.bintray.com/sbt/debian /” | sudo tee -a /etc/apt/sources.list.d/sbt.list
sudo apt-get update
sudo apt-get install sbt

install typesafe activator

sudo wget http://downloads.typesafe.com/typesafe-activator/1.3.5/typesafe-activator-1.3.5.zip

 

sudo apt-get install unzip

curl -s get.gvmtool.net | bash

source “/root/.gvm/bin/gvm-init.sh”

gvm install gradle

 

Notes

https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins+on+Ubuntu

https://wiki.jenkins-ci.org/display/JENKINS/Step+by+step+guide+to+set+up+master+and+slave+machines

https://wiki.jenkins-ci.org/display/JENKINS/Distributed+builds

Setup back for jenkins

https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+Best+Practices

 

/var/log/jenkins/jenkins.log

 

Add 8080 to all same ports as 80

http://MYIP:8080/configure