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

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

  - name: Install OpenJDK Java
    become: yes
    apt:
      name: "{{ item }}"
      state: present
    with_items:
     openjdk-8-jdk

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 - https://pkg.jenkins.io/debian/jenkins-ci.org.key | sudo apt-key add -
echo deb http://pkg.jenkins.io/debian-stable 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