Skip to content

Instantly share code, notes, and snippets.

@mohanpedala
mohanpedala / rpm-install.md
Created June 4, 2017 03:18
Installing an rpm file in RHEL
rpm -ivh <file-name>.rpm
@mohanpedala
mohanpedala / Chef-bootstrap-node-rhel-7.md
Last active June 6, 2017 18:48
chef-bootstrap-node-rhel-7-aws

Boot Strapping a node reference doc

  1. Spin an instance in aws (rhel-7) tag it as chef-node.
  2. Spin up the chef-workstation and test the ssh connectivity between chef-workstation and chef-node
ssh -i ~/path/to/key.pem username@<ip/domainname>
  1. Exit the test session once connected.
  2. Start the bootstrap process using key-based authentication.
@mohanpedala
mohanpedala / chef-server-installation-rhel-7-userdata.md
Last active June 6, 2017 18:54
Userdata for Installation chef-server on rhel 7

Userdata for Installation chef-server on rhel 7

Instructions to install chef-server 12.15.7-1 on RHEL 7.3. The official documentation for installation can be found here

Chef Server Installation

Optional packages installed

--> chef-manage

@mohanpedala
mohanpedala / userdata-to-bootstrap-ec2-instance.md
Last active June 6, 2017 18:54
Using userdata to bootstrap an EC2 Instance

Using userdata to bootstrap an EC2 Instance

It is possible to bootstrap an EC2 instance by running a shell script on launch. The shell script that you want to run when a new EC2 instance is created should be placed in the userdata section. Userdata section can be found in the advanced options while configuring the new EC2 instance. The userdata that is provided on EC2 creation console is copied to the below mentioned folder

/var/lib/cloud/instance/scripts

Also, the log file for the userdata execution can be found here :

@mohanpedala
mohanpedala / Bamboo_Installation_manual_CentOS 7.md
Last active June 6, 2017 18:56
Bamboo_Installation_manual_CentOS 7

Bamboo_Installation_manual_CentOS 7

  1. Create a CentOS 7 Virtual machine on a Virtual box.
  2. Install Java jdk 1.8.0 by using the below command.
 yum -y install java-1.8.0-openjdk.x86_64 
  1. Once the java installation is completed configure the Environment Variables with the below paths
echo 'export JAVA_HOME=/usr/lib/jvm/jre-1.8.0-openjdk' | sudo tee -a /etc/profile
echo 'export JRE_HOME=/usr/lib/jvm/jre' | sudo tee -a /etc/profile
source /etc/profile
  1. Verify the java version and paths.
@mohanpedala
mohanpedala / Role-cookbook-exp.md
Last active June 7, 2017 19:07
What is role cookbook

Role cookbooks

It is a way to define certain patterns and processes that exist across nodes in a organization as belonging to single job function. Each role consists of a run list and zero (or more) attributes.

Advantages and Disadvantages:

  1. Roles can not be versioned.
  2. It is easier to search for Chef nodes in a role than Chef nodes that ran a recipe.
  3. They're intended to be a lightweight way to group servers that shouldn't contain much business logic.

Example:

@mohanpedala
mohanpedala / Jenkins_aws_setup.md
Last active July 16, 2017 18:10
Jenkins AWS setup on rhel
  1. Installation Add the Jenkins repository to the yum repos, and install Jenkins from here.
sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo
sudo rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key
sudo yum install jenkins
  1. Installation of a stable version /n There is also a LTS YUM repository for the LTS Release Line
sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat-stable/jenkins.repo
sudo rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key

sudo yum install jenkins

@mohanpedala
mohanpedala / Jenkins_email_extn_plugin.md
Created July 16, 2017 18:53
Jenkins_email_extn_plugin

Add Email-extension plugin

Gmail settings

@mohanpedala
mohanpedala / Jenkins_cron.md
Last active July 17, 2017 19:39
Jenkins Cron setup Explanation

Jenkins will accept 5 parameter lets discuss one by one

* * * * * 
  1. First parameter- specify minute and range will vary from 0-59

  2. Second parameter- specify hours and range will vary from 0-11

  3. Third parameter- specify day and range will vary from 0-7 here 0 and 7 will be Sunday

@mohanpedala
mohanpedala / ICMP.md
Created July 19, 2017 20:41
ICMP(Internet Control Message Protocol)

ICMP (Internet Control Message Protocol) is an error-reporting protocol network devices like routers use to generate error messages to the source IP address when network problems prevent delivery of IP packets.