Skip to main content

Posts

Jenkins with sonarqube and nexus

 Jenkins installation on redhat machine installation of java on   yum install wget -y  yum install java-1.8.0-openjdk-devel.x86_64 Jenkins nstallation ----------------------- i.  sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo ii. sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key iii.sudo yum install jenkins iv. service jenkins start  service jenkins status ====================sonarqube setup========== Sonarqube on amazon linux ec2 machine Install docker on amazonlinux ec2 then run below command docker run -d --name sonarqube -e SONAR_ES_BOOTSTRAP_CHECKS_DISABLE=true -p 9000:9000 sonarqube:latest =====Integration of sonarqube and jenkins================================ -----In jenkins we need to install SonarQube Scanner plugin--- Then go to manage jenkins and click on configure system In middle we have SonarQube servers option will be there clcik on Add sonar give name and url http://44.192...

How to enable kubernetes ingress

1.First install ingress on kubernetes cluster 2.Then take which deployment you want to expose outside  Here i was taken apple and banana deployment

How to install apache and Tomcat on both master and worker same time by running ansible play book on master machine

Follow the steps Step-1 1.Take two ubuntu 16.04 machines and enable ssh between them 2.Update host file information on master machine 3.Then do ping test between master and worker machine 4. create apache2.yml playbook --- - hosts: servers  #server host or group name   sudo: yes   tasks:     - name: install apache2       apt: name=apache2 update_cache=yes state=latest     - name: enabled mod_rewrite       apache2_module: name=rewrite state=present       notify:         - restart apache2   handlers:     - name: restart apache2       service: name=apache2 state=restarted Then run ansible play book on master machine then check on both master and worker machine public ip on browser to confirm apache was installed or not . Installing Tomcat After this run play book Then you can check on browser of ...

How to create a user in kubernetes cluster and assign read only permissions

root@ip-172-31-16-42:~# kubectl get secrets NAME                  TYPE                                  DATA   AGE default-token-2m258   kubernetes.io/service-account-token   3      48m root@ip-172-31-16-42:~ # kubectl create serviceaccount readonlyuser serviceaccount/readonlyuser created root@ip-172-31-16-42:~# kubectl create clusterrole readonlyuser --verb=get --verb=list --verb=watch --resource=pods clusterrole.rbac.authorization.k8s.io/readonlyuser created root@ip-172-31-16-42:~ # kubectl create clusterrolebinding readonlyuser --serviceaccount=default:readonlyuser --clusterrole=readonlyuser clusterrolebinding.rbac.authorization.k8s.io/readonlyuser created root@ip-172-31-16-42:~# TOKEN=$(kubectl describe secrets "$(kubectl describe serviceaccount readonlyuser | grep -i Tokens | awk '{print $2}')" | g...

Openshift commands

oc comands 1. oc get pods 2.oc describe pod nginx-78f5d695bd-7x4xm 3. oc get all 4. oc get svc 5.oc delete pod mysql-1-deploy -n myproject --grace-period=0 --force 6. Oc Dashboard

Grafana with Prometheus database

1.After adding Prometheus database with Grafana it showing successfully all the namespaces and related pods.