Posts

Setup puppet master/ agent - Steps on CentOS

*Puppet master will have auto sign policy, to enable that use following steps :- cd /etc/puppet/ vi autosign.conf [Add content: *] - It will allow all nodes by default. open up /etc/puppet/puppet.conf vi /etc/puppet/puppet.conf Add this section [master]     autosign = true   *On Agent, to connect it with puppet master, edit /etc/puppet/puppet.conf Add following line, under [main] section:- server=puppetmaster.rbidev.ds *Firewall should be disabled on both puppet amaster/ agent SERVER ======     1  rpm -ivh https://yum.puppetlabs.com/puppetlabs-release-el-6.noarch.rpm     2  yum install puppet-server     3  cat /etc/hosts     4  ping 192.168.33.11     5  vi /etc/hosts     6  ping puppetclient.rbidev.ds     7  vi /etc/hosts     8  ping puppetclient.rbidev.ds     9  cat /etc/puppet/puppet.conf    ...

Teamcity trigger tool

Image
This tool provides a Physical interface to click & start build on Teamcity. This is plug and play device. Checkout video here:  https://youtu.be/srnu6uvvWT0 Items required to build this tool :- 1 Arduino Uno Micro-controller board 1 USB Cable 2 LED 1 On-Off switch 1 Push button Building circuit  I used a online website to build my buffer circuit. Follow this link :- https://123d.circuits.io/circuits/1659445-teamcity-trigger Programming micro-controller  Programming micro-controller is extremely easy. It is programmed in C language using Arduino IDE. github url for project : https://github.com/luckgagan/OneclickDeploymentTool C code has to part 1st is Setup & 2nd is Loop. int InputPin = 13; void setup() {   // put your setup code here, to run once:   Serial.begin(9600);   analogReference(INTERNAL); } Setup code is initializing serial with baud 9600. This part executes once. another part is l...

Rename SQL Server Database from sql queries

Queries to rename database in SQL Server :- Step 1: Enable Single user mode on database  ALTER DATABASE database_name SET SINGLE_USER WITH ROLLBACK IMMEDIATE Step 2: Change database name  ALTER DATABASE database_name MODIFY NAME = New_database_name Step 3: enable multi user mode on database  ALTER DATABASE New_database_name SET MULTI_USER WITH ROLLBACK IMMEDIATE Its done :) 

Configure git on ubuntu machine

Configuring git on ubuntu machine is extremely easy. First we would need to install git on the same machine. Step 1: Install git on the machine apt-get install -y git Step 2: In case git is already installed, check git settings git config --list Step 3: Update git config file git config --global user.email "luck.gagan@gmail.com" git config --global user.name "Gagan" Step 4:  Initialize a git repo mkdir GitSample cd GitSample git init Step 5: Add content to git repo for commit git add -A Step 6: Commit your changes git commit -m "First commit" Step 7: Add your repo to remote. (I have used github) git remote add origin https://github.com/luckgagan/gitsamplerepo.git Step 8: Push git push -u origin master ********************************You are done****************************
Image
Scheduled Task To Run A Batch File I recently ran into a problem where I’d scheduled a batch file to run on a Windows Server 2008 R2 server, task manager reported the task had run, but it hadn’t. The batch file was in F:\Folder1\ and the scheduled task screen was as below In order to get the batch file to run, I had to set the Program\script box to contain just the name of the script and place the folder path in the Start in (optional) box

Building simple regular expression

Building simple regular expression Problem : I need to findout all the place holders starting & ending with ###'. Sample string --- config:   application_config:     app_server_name: ###app_server_name###   database_config:     databasename: Search     databaseservername: ###databaseservername###     sql_server_user: ###sql_server_user###     sql_server_user_password: ###sql_server_user_password###     usernames:       - exporter_user       - teamcity_user Regex : /###\w+###/g Few best editors  http://regexr.com/ https://regex101.com/

Copy linux system file on windows using Winscp

Image
*Copy file from linux system to windows system *How to use winscp on windows Background : We have a AWS linux box on our extranet environment. I need to download a file from particular directory. I need private keys to access that box. I got the keys, now steps are straight forward. Step:1 Download latest version of winscp for following url. I took portable version. https://winscp.net/eng/download.php Step: 2 Click on the tool button Step:2 Click on "Run Pagent" option & add your private key for ssh session Step: 3 Insert following information & hit login. It will connect to remote box.