Skip to main content

Posts

Install Jenkins on AWS EKS using Helm

Prerequisites Create namespace for jenkins kubectl create ns jenkins We'll store jenkins data on AWS EBS as persistent storage hence for that Create storage class apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: jenkins-sc provisioner: kubernetes.io/aws-ebs parameters: type: gp2 fsType: ext4 Create persistent volume claim apiVersion: v1 kind: PersistentVolumeClaim metadata: name: jenkins-pvc namespace: devops-tools spec: storageClassName: jenkins-sc resources: requests: storage: 50Gi accessModes: - ReadWriteOnce ...

EKS Provisioning Using TF

Full script is available at https://github.com/JaydeepUniverse/terraform/tree/master/aws/eks Prerequisites Install kubectl Install AWS CLI Install AWS IAM Authenticator Update kubeconfig file if needed aws eks update-kubeconfig --name eksClusterName Please keep in mind about below commented notes while changing names of name,cluster,environment else EKS,ASG,VPC all resources will be created but while running kubectl get nodes command it won't show any worker nodes provider "aws" { region = "us-east-2" # region } module "vpc" { source = "../../modules/vpc" vpc-location = "Ohio" # location name as per region namespace = "nextgen-c...

Public domain connectivity issue due to DNS

Problem It may possible that sometimes if DNS is not properly configured or not able to resolve public domains. Solution To resolve this add nameserver 8.8.8.8 in /etc/resolve.conf and then try to nslookup the website again.

Install AWS CLI on Ubuntu localhost using Ansible Playbook

Install AWS CLI on Ubuntu localhost using Ansible Playbook --- - hosts: localhost tasks: - name: Installing Unzip package package: name: unzip state: present when: ansible_facts['os_family'] == "Debian" become: true - name: Create awscli directory in home directory file: path: ~/awscli state: directory mode: '0755' - name: Download bundled installer zip file get_url: url: https://s3.amazonaws.com/aws-cli/awscli-bundle.zip dest: ~/awscli/awscli-bundle.zip - name: Extract zip file unarchive: src: ~/awscli/awscli-bundle.zip dest: ~/awscli - name: Run install command shell: /home/ubuntu/awscli/awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws become: true Same script is also avail...

Install Ansible on Ubuntu using Shell Script

Shell Script to Install Ansible in Ubuntu #!/bin/bash echo "UPDATING ALL PACKAGES" sudo apt update -y for i in 1 2 3 4 5 do echo " " done echo "INSTALLING software-properties-common" sudo apt install software-properties-common -y for i in 1 2 3 4 5 do echo " " done echo "INSTALLING ppa:ansible/ansible REPOSITORY" sudo apt-add-repository --yes --update ppa:ansible/ansible -y for i in 1 2 3 4 5 do echo " " done echo "INSTALLING ANSIBLE" sudo apt install ansible -y Same script is also available at https://github.com/JaydeepUniverse/automation/blob/master/ansible.sh

Nexus installation on EKS

Create nexus namespace apiVersion: v1 kind: Namespace metadata: name: nexus Create storage class for nexus to store data on AWS EBS apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: nexus provisioner: kubernetes.io/aws-ebs parameters: type: gp2 fsType: ext4 allowVolumeExpansion: true Create persistent volume claim apiVersion: v1 kind: PersistentVolumeClaim metadata: name: nexus namespace: nexus labels: app: nexus spec: storageClassName: nexus resources: requests: storage: 50Gi accessModes: - ReadWriteOnce Create deployment for p...

Install kubectl on Ubuntu localhost using Ansible Playbook

Install kubectl on Ubuntu localhost using Ansible Playbook --- - hosts: localhost tasks: - name: Installing Kubectl step-1 package: name: apt-transport-https state: present when: ansible_facts['os_family'] == "Debian" - name: Installing Kubectl step-2 shell: sudo curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - when: ansible_facts['os_family'] == "Debian" - name: Installing Kubectl step-3 command: sudo echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee -a /etc/apt/sources.list.d/kubernetes.list when: ansible_facts['os_family'] == "Debian" - name: Installing Kubectl step-4 snap: name: kubectl classic: yes when: ansible_facts['os_family'] == "Debian" - name: Ins...