Posts

DevOps session 13: Automate git SETUP using bash scripting.

Image
  Bash scripting: A Bash Shell Script is a plain text file containing a set of various commands that we usually type in the command line. It is used to automate repetitive tasks on Linux filesystem. It might include a set of commands, or a single command. For example ,to install GIT we need to update the packages, then install git and check if installation is done using Linux commands. We can write all the command in a .sh file and we can execute the file to do all the steps mentioned above. Lets start with example from hello-world. 1.Open terminal and check the root of the bash using below command. CMD: which bash you can see path like  /usr/bin/bash or /bin/bash . 2.Create a hello-world.sh file and paste the below lines. CMD: nano hello-world.sh You can see editor ,add below lines #!/bin/bash # declare MSG variable MSG="Hello World" # print variable on a screen echo $MSG To save the file use CTRL+X, then CTRL+Y and press ENTER 3. To execute the file we need to ad...

DevOps session 9: setup GITHUB SSH authentication

Image
  SSH is used to connect with remote systems and share the data safely, securely. Advantages of using SSH Authentication: 1. Every time we need to provide the user and password when we are pushing the code from local to GitHub repo. To avoid this we can use SSH for authenticating directly and pushing the code. 2. Because we are not providing login credentials every time. We can save lots of time. 3. It is secure way to connect with local and central repo while transferring data. Follow the below steps to setup SSH and connect your local repo ,central repo securely. 1. Open ubuntu terminal, and pass below command to generate key.     cmd:  ssh-keygen -o -t rsa -C "test@example.com"     Then press enter 3 times, you can see a screen as below. 2. Once Key is generated,check in the .SSH folder.Follow below commands.      cmd 1: cd ~/.ssh      cmd 2: ls -a      cmd 3: cat id_rsa.pub Copy the key from t...

DevOps session 8: Create GitHub account & Setup repo

Image
  Create GitHub account:  1.Open GitHub site(https://github.com) in chrome and click on signup. 2.Privide email id 3.Create new password 4.set ne username which is should be unique and then click on continue. 5. You will receive a code to the mail id you provided above. Provide the code and click on create account. 6. Once code is validated. GitHub will ask some questions. Answer and submit. You are successfully created the GitHub account. Now you can see a customized dashboard page. GIT local repo setup: 1. Create a Folder with your project (eg: GitDemo) 2. open command prompt and navigate to project folder created above. 3. Use git init command to initialize local repo.(all changes you are working will be saved in .git file) 4. First time when you want to get the GitHub code ,we have to use git clone command.  example : I want to get the fresh code on the new system. then I need to follow above steps and then I need to use git clone command. Copy the https link provide...

DevOps session 7: Source Code Management/ Version control systems (GIT) || Setup Git on ubuntu

Image
  Version control systems(VCM) manage changes to software development projects. Businesses use this software to allow multiple users collaborate on projects and track changes made by each user. GIT is free, open source version control system.  Version Control System - VCS helps a software team manage changes to source code over time. Version control software keeps track of every modification to the code in a special kind of database.  VCS System helps team to rollback to previous version in case of any issue with specific Version. Advantages: There are several reasons why we should manage the source code that we write: Work together in teams . A source code management system allows multiple developers to access and change different areas of the code, without interfering with each other’s work. This is a big benefit for large teams of developers. Version history . The system will keep a history of all saved changes to the code. This not only allows you to see what has ch...

DevOps session 6: Linux commands for DevOps team

Image
  File commands: ls : Display the folders present in the current working directory. ls -al :  formatted listing with hidden files mkdir –   create a directory with provided name. cd devops –   change directory to devops pwd –  show current directory touch file –  create or update file cat > file –  places standard input into file/Create a new file and you can provide some text from console. Then to exit the file editting, click on CTRL+D. cat  file – Display the file content in the console. cp file1 file2 –   copy file1 to file2 cp -r dir1 dir2 –   copy dir1 to dir2; create dir2 if it doesn’t exist mv file1 file2 –   rename or move file1 to file2 if file2 is an existing directory, moves file1 into directory file2 rm file –   delete file rm -r dir –   delete directory dir Screen shots will be attached soon... Process Management ps –  display your currently active processes top –  display all running processes k...

DevOps session 5: Linux setup on Windows 11

Image
  We can install Ubuntu on Windows 11 using Windows Subsystem for Linux (WSL). Follow the below steps to setup Linux on windows 11. STEP 1: Install WSL Open Power shell as administrator.  At the command prompt type: wsl --install    and hit enter. or  wsl --install -d ubuntu Wait until all packages are installed. STEP 2: Download Ubuntu. Go to Microsoft store and search for Ubuntu. Click on Get button and Wait until Ubuntu is installed on your system. You can verify by searching for Ubuntu. You can find the Ubuntu logo. STEP 3: Configure Ubuntu. Search for Ubuntu and open the terminal. For the fisrt time you setup Ubuntu on windows ,it will ask to set username and password. Provide any user name and password then hit enter. Now terminal is ready is use. You can update the packages using below command. sudo apt update You can see all the packages will be updated. 💪💪💪 Happy coding 💪💪💪

DevOps session 4: DevOps life cycle and Tools

Image

DevOps session 3: Roles and Responsibilities of DevOps Engineer.

Image
  The term “DevOps” is another example: It merges the words “development” and “operations.” In general, DevOps bridges the gap between development, quality assurance, and IT operations as shown below. DevOps is a set of practices that promote communication and collaboration among these various teams. DevOps principles and practices There are a few principles that can help as you implement DevOps in your organization: Automate processes. Continuously deliver high-quality systems. React quickly to feedback to continuously improve processes. DevOps engineer responsibilities DevOps engineers are experienced IT professionals who collaborate with software developers, quality assurance professionals, and IT staff to manage code releases. DevOps engineer’s responsibilities include: Documentation:  Writes specifications and documentation for the server-side features. Systems analysis:  Analyzes the technology currently being used and develops plans and processes for improveme...