Wednesday, April 24, 2019

Ansible playbook to install OpenJDK 8 on Ubuntu - Install OpenJDK 8 using Ansible playbook

 Here below is ansible playbook to install Open JDK 8 on Ubuntu:

- hosts: Java_Group

  - name: Update APT package manager repositories cache
    become: true
      update_cache: yes

  - name: Install OpenJDK Java
    become: yes
      name: "{{ item }}"
      state: present

How to install Jenkins on Ubuntu - Install Jenkins Ubuntu

Please follow steps to install Java, Jenkins on Ubuntu EC2 we provisioned in the class.(use git bash or ITerm window). You need to execute below steps on Ubuntu Ec2.

You need to start with Java installation

Open JDK 8 on Ubuntu

sudo apt-get update

sudo apt-get install default-jdk -y

Once install java, enter the below command

Verify Java version
java -version

openjdk version "1.8.0_191"
OpenJDK Runtime Environment (build 1.8.0_191-8u191-b12-2ubuntu0.16.04.1-b12)
OpenJDK 64-Bit Server VM (build 25.191-b12, mixed mode)

Now lets do Jenkins installation

Jenkins (make sure you open port number - 8080 in security rules, edit inbound rules)

wget -q -O - | sudo apt-key add -
echo deb binary/ | sudo tee /etc/apt/sources.list.d/jenkins.list
sudo apt-get update
sudo apt-get install jenkins -y

Thursday, April 11, 2019

Ansible Vs Puppet - What is the difference between Ansible and Puppet

This is one of the common DevOps interview questions. What is the difference between Ansible and Puppet? When will you choose Ansible over Puppet?

Ansible Puppet
Introduced 2012 2005
Written in? Python Java & Ruby
Syntax Playbooks(YAML file) Domain specific language
Model Push Pull
Architecture Agent-less Client/server
Deployments Fast, simple deployments Larger, complex deployments
Commercial version Ansible Tower Puppet Enterprise
Scheduling not supported in free version Default time 30 mins in Open Source puppet