Thanks to visit codestin.com
Credit goes to www.scribd.com

100% found this document useful (5 votes)
7K views56 pages

Devops Unit-1 Anna University

INTRODUCTION TO DEVOPS Devops Essentials - Introduction To AWS, GCP, Azure - Version control systems: Git and Github.

Uploaded by

snehavenkatt27
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
100% found this document useful (5 votes)
7K views56 pages

Devops Unit-1 Anna University

INTRODUCTION TO DEVOPS Devops Essentials - Introduction To AWS, GCP, Azure - Version control systems: Git and Github.

Uploaded by

snehavenkatt27
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 56
SUBJECT CODE: CCS342 Strictly as per Revised Syllabus of ANNA UNIVERSITY Choice Based Credit System (CBCS) Vertical - 2 (Full Stack Development) (CSE) Vertical - 2 (Full Stack Development for IT) (IT/Al&DS) Semester - VII / VIII (ECE) Open Elective - II DEVOPS Mrs, Anuradha A. Puntambekar ME. (Computer) Formerly Assistant Professor in RE.S, Modern College of Engineering, Pune == TECHNICAL PUBLICATIONS ts An Up-Thrust for Knowledge DevOps Vertical - 2 (Full Stack Development) (CSE) Vertical - 2 (Full Stack Development for IT) (IT/AI8DS) ‘Semester - VII / VIll (ECE) Open Elective - Il © Copyright with Author ‘All publishing rights (printed ond ebook version) resorved with Technical Publications. No pat ofthis book should be reproduced in eny form, Elecronic, Mechanica Photocopy of any information storage and Fehieval system without prior permission in wing, from Technical Publications, Pune Published by TECHNICAL $8227 Of0 No.1, 412, Sonia, Pune - 411030, M.S. INDIA, Ph. +91-020-24495496/97 Email: [email protected] Website : ww technialpublicationsin Yesij Pinter & Binders SNe. 101A, (Ghale Inca Estate, Nene Vilage Road, Ta, - Havel Dist. - Pane - 411041, ISBN 978-93-5885-442-1 IU 97ag35sas4421(1] @ Aust PREFACE tthe importance of DevOps is’ well bnown In various engineering fields. venstelming response to my books on various subjects inspired me to write this book. ‘The book is structured to cover the Rey aspects of the subject DevOps. ‘The book uses plain, lucid language to explain fundamentals of this subject: The book provides logical method of explaining various complicated concepts and stepwise methods to explain the important topics. Each chapter is well supported with necessary itastrations. practical exampies and solved problems. All the chapters in the book are arranged in a proper sequence that permits’each topic to build upon earlier studies. All care has been taken to make students comfortable in understanding the basic concepts of the subject. Representative questions have been added at the end of each section to help the students in picking important points from that section. ‘The book rot only covers the entire scope of the subject but explains the philosophy of the subject. This makes the understanding of this subject more clear and makes it more interesting. The book will be very useful not only to the students but also to the subject teachers. The students have to omit nothing and possibly have to cover nothing more. Iwwish to express my profound thanks to all those who helped in making this book a reality. Much needed moral support and encouragement 1s provided on numerous occasions by my whole family. I wish to thank the Publisher and the entire team of Technical Publications who have taken immense pain to get this book in time with quality printing. ‘Any suggestion for the improvement of the book will be acknowledged and well appreciated. Author Mrs, A.A, Pantanbehar Dadicated to God @ SYLLABUS DevOps - [CCS342] UNITI INTRODUCTION TO DEVOPS Devops Essentials - Introduction To AWS, GCP, Azure - Version control systems: Git and Github. (Chapter - 1) UNITIL COMPILE AND BUILD USING MAVEN & GRADLE. Introduction, Installation of Maven, POM files, Maven Build lifecycle, Build phases(compile build, test, package) Maven Profiles, Maven repositories(local, central, global)Maven plugins, Maven create and build Artificats, Dependency management, Installation of Gradle, Understarid build using Gradle (Chapter -2) IIL CONTINUOUS INTEGRATION USING JENKINS Install & Configure Jenkins, Jenkins Architecture Overview, Creating a Jenkins. Job, Configuring a Jenkins job, Intioduction to Plugins, Adding Plugins to Jenkins, Commonly used plugins (Git Plugin, Parameter Plugin, IITML Publisher, Copy Artifact and Extended choice parameters). Configuring Jenkins to work with java, Git and Maven, Creating a Jenkins Build and Jenkins workspace. (Chapter - 3) UNI UNITIV CONFIGURATION MANAGEMENT USING ANSIBLE Ansible Introduction, Installation, Ansible master/Slave configuration, YAML basics, Ansible modules, Ansible Inventory files, Ansible playbooks, Ansible Roles, adhoc commands in ansible. (Chapter - 4) UNIT V BUILDING DEVOPS PIPELINES USING AZURE Create Github Account, Create Repository, Create Azure Organization, Create a new pipeline, Build a sample code, Modify azure-pipelines.yam file (Chapter - 5) eo TABLE OF CONTENTS [ae ee) Chapter-1 Introduction to DevOps (1-1) to (1 - 48) 1a 12 13 14 15 16 1-2 aoelead, 1-3 DevOps Essentials... 1.1.1 Why DevOps ?. 112 Goals... 1.13. Benefits 5 : 1-3 1.1.4 Comparison between Agile and DevOps. 1-4 1.1.5. DevOps Tools... 1-5 1.1.6 DevOps Architecture. 1-6 1.1.7 DevOps Lifecycle. Introduction to AWS 1.2.1 Basics : 1.2.2. Advantages of AWS.... 1.2.3. Features of AWS 1.2.4 Companies using AWS.. 1.2.5 Applications of AWS 1.2.6 . Services offered by AWS... ‘ 1.2.7 Global Infrastructure of AWS... Introduction to GCP. 1.3.1 Features. 1.3.2 Advantages... 1.3.3 Services using GCP Introduction to Azure... 14.1 Features..... 1.4.2. ‘Services using Azure Comparison among AWS, GCP and Azure.. zo Git 1-22 1.6.1 Features of Git 1-22 1.6.2 Git Workflow. 1.6.3 Installing Git. 1.6.4 Basic Command: 0 1.7 Concept of GitHub, 17.1 Features. ATES 1.7.2 Hosting Service for Git Repository. 18 Difference between Git and GitHub. 1.9 Two Marks Questions with Answers... uaa Chapter-2 Compile and Build using MAVEN and GRADLE (2 - 1) to (2 - 46) Part I: Maven’ 2.1 Introduction Feces 27 2.2. Installation of Maven... 2-3 2.3. Create and Build Maven Artifact. 2-5 2.4. POM Files 2-14 2.5 Maven Build Lifecycle.. : 2-16 2.6 Built-in Build Life Cycle Phases... 2.7 Maven Profiles... an 2.7.1. Different Types of Bulld Profiles 2-18 2-20 2-20 27.2. Elements of Profile... 2-20 2.7.3 Demo Example. 22-21 2.8 Maven Repositories. 2-25 2-27 2-27 22-29 2.9 Maven Plugins . 2.10 Dependency Management... 2.41 Dis idvantages of Maven ..... Part ll: Gradle 2-30 2-30 2.12 Introduction to Grade... 2.13 Installation of Gradle 2.14 Core Concepts .. 2-33 2.15. Building Basic Application using Gradle 2.16 Understand Build using Gradle... 2.17 Maven Vs. Gradle 2.18 Two Marks Questions with Answers 2-34 2-39 an 2-42, wo atiiewtty Chapter-3 Continuous Integrai mn using Jenkins 3.1 Introduction to Jenkins. 3.1.1 Features of Jenkins. 3.1.2 Advantages and Disadvantages.. 3.2 Install and Configure Jenkins. 3.3 Concept of Continuous Integration... 3.4 Jenkins Architecture Overview. 3.4.1 Jenkins Workflow: 3.4.2 Jenkins Architecture 3.5 Creating and Configuring a Jenkins Job.. 3.5.1 Types of Jobs... 3.5.2 Build Triggers.. 3.6 Introduction to Plugins 3.7 Adding Plugins to Jenkins 3.8 Commonly used Plugins 3.8.1. Git Plugin, 3.8.2 Parameter Plugin 3.8.3 HTML Publisher Report Plugin 3.84 Copy Artfact 3.85 Extended Choice Parameters. 3.9 Configuring Jenkins to Work with Java, Git and Maven...... 3.10. Creating a Jenkins Build and Jenkins Workspace... 3.11 Two Marks Questions with Answers We UNIT IV (3 - 1) to (3 - 70) 3-2 3-2 Lara: on 3-3 3-8 3-9 3-9 3-10 iu 3-1 3-15 3-15 wn 3 +17 3-18 3-20 3-20 3-28 3-31 3-38 3-43 3-47 3-66 3-69 Chapter-4 Configuration Management using Ansible (4 - 1) to (4 - 52) 4.1 Ansible Introduction... 4.2. Ansible Master / Slave Configuration... 43 Ansible Inventory Files ... 4.4 _ Installation Process. 4-2 4-4 4-5 4-6 i) 4.4.1. Creation of Account on AWS Cloud Service. 4.4.2 Steps for Installation of Ansible 4.5 Ansible Modules 4.6 YAML Basics: 4.7 Ansible Playbooks.. 48 Ansible Roles 4.9° adhoc Commands in Ansible. 4,10 Two Marks Questions with Answers Uses Chapter-5 Building DevOps Pipelines using Azure (5 - 1) to (5 - 30) 5.1. Create Github Account. 5-2 5.2. Create Repository... 5-2 5.3 Introduction to Azure DevOps.... 5-2 5.4 Create DevOps Organization 5-4 5.5 Whatis the Azure Pipeline ? 5-7 5.6 Create a Pipeline... 5-8 5.6.1 Build a Sample Code i 5-8 5.6.2. Modify Azure-Pipelines.yaml File... 5-19 5.7 Two Marks Questions with Answers see a eas Solved Model Question Paper (M- 1) to (M- 2) (ii) UNIT I Introduction to DevOps Syllabus DevOps Essentials - Introduction To AWS, GCP, Azure - Version control systems : Git and Github Contents 1.1 DevOps Essentials 1.2. Introduction to AWS 1.3 Introduction to GOP 1.4 Introduction to Azure 1.5 Comparison among AWS, GCP and Azure 16 Git 1.7 Concept of Githlub 1.8 Difference between Git and GitHub 1.9 Two Marks Questions with Answers 1 DevOps 4-2 Introduction to DevOps EE] Devops Essentials Definition : Devops is a practice in which development and operation engineers participate ‘together in entire lifecycle activities of system development from design, implementation to product support. © The term Devos is derived from “Software DEVelopment “ and “information technology OPerations”, ‘© Devops promotes a set of processes and methods from the three departments Development, TT operations and Quality assurance that, communicate and collaborate together for development of software systems: Operations, Fig. 4.1.4 Why DevOps ? ‘© DevOps enhances the organization’s performance, improves the productivity and efficiency of development and operations teams. '* Bringing the two teams together centralizes the responsibility on the entire team and not specific individuals working. ‘* Devops is more than just a tool or a process change. It inherently requires an organizational ‘culture shift. © This cultural change is especially difficult, because of the conflicting nature of departmental roles 1, Operations - Seeks organizational stability; 2. Developers - Seek change; 3. Testers - Seek risk reduction. ‘Adoption of Devopsis driven by various factors. These factors are ~ 1. Demand for an increased rate of production releases - from application and business unit stakeholders, TECHNICAL PUBLICATIONS® - an up-thrust for inowledge DevOps. 1-3 Introduction fo DevOps Increased usage of data center automation and configuration management tools. Use of agile and other development processes and methods, Increased focus on test automation and continuous integration methods. Wide availability of virtualized and cloud infrastructure. Goals ‘The Goals of DevOps are as follows ~ To make simple processes increasingly programmable and dynamic. Fast delivery of product. Lower failure rate of new releases. Shortened lead time between fixes. Faster means time to recovery. Increases net profit of organization. To standardize the development environment. ea ae eee ‘To reduce work in progress. 9. To reduce operating expenses. 10. To set up an automated environment. Benefits Various benefits of Devops are - ‘+ Technical benefits 1. Continuous software delivery is possible 2. There is less complexity to manage the project. 3. The problems in the project get resolved faster. © Cultural benefits 1. The productivity of teams increased. 2.. There is higher employee engagement 3. There arise greater professional development opportunities. + Business benefits ‘The faster delivery ofthe product is possible 2. ‘The operating environment becomes stable. 3. The communication: and collaboration gets improved among the team members and customers. 4. More time is available for innovation rather than fixing and maintaining TECHNICAL PUBLICATIONS® - an up-thrust for knowledge Devons: 1-4 Introduction to DevOps Comparison between Agile and DevOps ‘¢ DevOps bring more flexibility than agile. With Continuous Integration (C1) and Continuous Delivery (CD) , the release of software products is made often and it is ensured that these releases actually work and meet the customer needs. ‘© Thus in DevOps there are’ait increased number of releases. © One goal of DevOps is to establish an environment where releasing more reliable applications, faster and more frequently, can occur, This actually brings the continuous delivery approach. ‘® DevOps is not a separate concept but a mere extension of Agile to include operations as well to collaborate different agile teams together and work as ONE team with an objective to deliver software fully to the customer. ; Basically Agile and DevOps are similar. But there lies some differences. “The idca in Agile is to develop software in small iterations and be thus able to adapt othe changing customer needs, team member should be able to do what's -Fequired for progress. 1-5 Agile is about software development. ‘important in ‘Documentation is not much Agile development. Agile development teams may choose to use certain automation tools. But there are no specific tools required for an agile DevOps Tools i 1. Nagios : Itis a monitoring sotution that gives new features and modem user experience. 2, ELK Stack : This tool is used for collecting logs from all services, applications, networks, tools, server and more in an environment into a single, centralized location for processing and analysis. 3. Docker : It eases configuration management, control issues. 4, Jenkins : Jenkins is a top tool for DevOps engineers who want to monitor executions of repeated jobs. ‘5. Puppet : It handles configuration” management and software while making rapid, repeatable changes in it. 6. Ansible : Ansible is a configuration management tool or DevOps tool that is similar to Puppet and Chef. 7. God : It isa monitoring tool used in DevOps. 8. Monit : Monit has everything DevOps engineers need for system monitoring and error recovery. ‘ 9. ConsuLio : This tool is used for service discovery and configuration management activities. 10. Loggly : This tool is used for log management in DevOps. TECHNICAL PUBLICATIONS® - an up-thrust for knowledge DevOps: 1-6 Introduction to DevOps EEG DevOps Architecture ‘© DevOps is a practice of operations and development. ‘There are different phases of DevOps architecture - 1) Plan : In this phase, all the requirements of the project are gathered. The schedule and cost of the project is estimated approximately. 2) Code : In this phase the code is written as per the requirements. Entire project is divided. into smaller units, Each unit can be coded as a module. 3) Build : In this phase, the building of all the units is done using tools such as Maven, Gradle to submit the code to a common code source. Gy, Dev ey Ops } ¢ ee) Fig. 1.1.2 DevOps architecture 4) Test : At this stage, all the units are tested to find if there exists any bug in the code. The testing can be done using tools like Selenium, JUnit, PYtest. Some important testing techniques such as acceptability testing, safety testing, integration checking, performance testing are carried out. 5) Integrate : In this phase, a new feature is added to the existing code and testing is, performed. Continuous Development is achieved only because of continuous integration and testing. ©) - Deploy = In this stage, the code is deployed in the client's environment. Some of the ‘examples of the tools used for Deployment are AWS, Docker. 7) Operate : At this stage, the version can be utilized by the users. Operations are performed. ‘on the code if required. Some of the examples of the tools used are Kubernetes, open shift 8) Monitor : At this stage, the monitoring of the version at the client’s workplace is done. During this phase, developers collect data, monitor each function and spot errors like low memory of server connection are broken. The DevOps workflow is observed at this level depending on data gatheted from consumer behavior, application efficiency and other sources. Some of the examples of the tools used are Nagios, elastic stack for monitoring, TECHNICAL PUBLICATIONS® - an up-thrus! for knowledye 4-7 Introduction to DevOps Ed DevOps Lifecycle ‘The DevOps lifecycle phases are as follows ~ 1) Continuous development : In this phase, the planning and coding of software is done. ‘Version control mechanism is used during this phase. 2) Continuous integration ; In this phase, developers are required to commit. changes in the source code frequently. The code supporting new functionality is continuously integrated with the existing code. Therefore, there is continuous development of software. 3) Continuous testing : In this phase, the software is continuously tested for bugs. Many times automation testing is preferred. 4) Continuous monitoring : goes wrong. We can gather many performance measures, including CPU and memory utilization, network traffic, application response times, error rates and others, ty continuous monitoring, we can get notified before anything 5) Continuous feedback : In this DevOps stage, the software automatically sends out information about performance and issues experienced by the end-user. It's also an ‘opportunity for customers to share their experiences and provide feedback. 6) Continuous deployment : In this phase, the code is deployed to the production servers. Also, it is essential to ensure that the code is correctly used on all the servers. The deployment process takes place contitiuously in this DevOps life eyele phase. 7) Continuous operations ; It is the last phase which involves automating the application's release and all these updates that help you keep cycles short and give developers more time to focus on developing. What is DevOps ? Explain is need. What are the benefits of DevOps ? Compare Agile with DevOps. List and explain any five DevOps tools, Explain the DevOps architecture alorig with suitable diagram, Explain DevOps life cycle stages. Introduction to AWS: Basics ‘* Cloud computing is a term that refers to storing and accessing data over the internet. It does not store any data on the hard disk of our personal computer. In cloud eémputing, we can ‘access data from a remote server. TECHNICAL PUBLICATIONS® -an up-thrust for knowledge Devops 1-8 Introduction to DevOps AWS stands for Amazon Web Service. It is the most comprehensive cloud service provider by Amazon. It includes services for storage, databases, analytics, networking, mobile, development tools and enterprise applications. AWS manages and maintains hardware and infrastructure, saving organizations and individuals the cost and complexity of purchasing and running resources on-site, These resources may be accessed for free or on a pay-per-use basis. It provides different services of cloud such as Infrastructure'as a Service (IaaS), Platform as 1a Service (PaaS) and packaged Software as a Service (SaaS). 6 TaaS : Infrastructure as a service means delivering computing infrastructure on demand. Under this service, the user purchases the cloud infrastructure including. servers, networks, operating systems and storage using virtualization technology. These services are highly scalable. IaaS is used by network architects. Examples of cloud services : AWS, Microsoft Azure, co PaaS : The platform as a service means it is a service where’ third party provider provides both hardware and software tools to the clients. It provides elastic scaling of your application which allows developers to build applications and services over the intemet and the deployment models include public, private and hybrid, PaaS is used by developers. Examples of cloud services - Facebook and Google Search Engine. co SaaS : Software as a Service model that hosts software to make it available to clients. tis used by the end users. Examples of cloud services : Google Apps. Advantages of AWS AWS allows organizations to use already familiar programming models, any operating systems, any kind of databases and architectures. AWS allows to automatically increase the capacity of resources as per requirements so that the epplication is always available. Itis a cast effective service that allow you to pay only for what you use. AWS requires no upfront investment, long-term commitment and minimum expense when compared to traditional IT infrastructure that requires a huge investment. "AWS provides end to end security and privacy to the customers. TECHNICAL PUBLICATIONS® - an up-thrust for knowledge Devops 1:9 Introduction to Devons Features of AWS 4) Flexibili ‘*. The AWS always allows the user to use the operating system, programming languages and ‘web application platforms that the user is comfortable wit. ‘+ Flexibility means that migrating legacy applications to the cloud should be easy. ‘* Instead of fe-writing the applications to adopt new technologies, we just need to move the applications to the cloud and tap into advanced computing capabilities. 2) Cost effective : ‘Instead of purchasing and creating our own expensive servers, we can use AWS where we need to pay only for the tools and services that we use. ‘+ AWS offers a pay-as-you-go pricing method, which means that we only pay for the services that are needed and have been used for a period of time. 3) Scalable and elastic : ‘© AWS is scalable because the AWS auto scaling service automatically increases the capacity of constrained resources as per requirements so thatthe application is always available. ‘+ Blasticity is one of the AWS advantages. If we use fewer resources and do not need the rest of them, then AWS itself shrinks the resources to fit our requirements. In short, upsizing and downsiitig of resources is possible with AWS. 4) Secure: ‘+ AWS maintains confidentiality, integrity and availability of the user's data, ‘© Each service provided by the AWS cloud is secure. ‘© Personal and business data can be encrypted to maintain data privacy. '5) High performance : ‘© High performance computing is the ability to process massive amounts of data at high speed. ‘AWS offers a high-performance computing service so that the companies need not worry about the speed. Companies using AWS Here is list of companies using AWS Netflix + Instagram + Linkedin TECHNICAL PUBLICATIONS® - an up-thrust for knowledge Devons. 1-10 Introduction to DevOps ‘© Dropbox + Johnson & Johnson + Capital One Adobe * Airbnb + AOL + “Hitachi # Global Infrastructure Applications of AWS AWS is widely used for following purposes - 1) Building mobile and social applications 2). Storage, backup and disaster recovery 3) Academie computing 4) Website hosting 5) Media sharing such as image or video 6) Content delivery and media distribution 7) Social networking 8) AWS has been serving many gaming studios. Services offered by AWS a) ‘The most five important services provided by Amazon Web Services are - ‘Amazon Elastic Cloud Compute(EC2) : © EC2 stands for Elastie Cloud Compute. ‘© Amazon EC2 is one of the most used and most basic services on Amazon, ‘*. EC2 is a machine with an operating system and hardware components of developer's choice. But the difference is that it is totally virtualized. The developer can run multiple virtual computers in single physical hardware, ‘* EC? enables on-demand, scalable computing capacity in the AWS cloud, © No upfront investments on hardware is requited, we only pay for what we use # ‘The most important thing is that EC2 is secure. TECHNICAL PUBLICATIONS® - an up-thnist fr knowiodge DevOps tot Introduction to DevOps 2) 3) 4) 5) Amazon Simple Storage Service(S3) ‘+ S3 stands for Simple Storage Service. ‘+ Amazon simple storage service is a scalable, high speed, web-based cloud storage service, * Data can be transferred to $3 over the public intemet via access to $3 Application Programming Interface (API). ‘* $3 istused to store and retrieve any amount of data from anywhere on the web. ‘+ Iis object-based storage, that means we can store the images, word files, pdf files, ete, * The files which are stored in $3 can be from 0 Bytes to 5 TB. ‘+ In addition, users can integrate other AWS services with $3. For example, an analyst can query data directly on $3. ‘Amazon Virtual Private Cloud(VPC) VPC stands for Virtua Private Cloud. * Amazon VPC provides a logically isolated area of the AWS cloud which eén be used as a private network but itis virtual. Itresenibles your traditional networking. + Byusing Amazon’s VPC service we can have complete contol over our virtual networking environment including a selection of your IP address range, the creation of subnets and configuration of route tables and network gateways, . * Additionally we can easily customize the networking configuration for this VPC. For instance we cali cteate a subnet for our web servers which can be accessible using. the internet. ‘+ Amazon provides multiple layers of security to the VPC. * Each VPC is isolated from another VPC. ‘Amazon Relational Database Services(RDS) + RDS stands for Relational Database Services. ‘+ AWS RDS js a relational database cloud service using which we can store data as tables, records and fields on cloud, * Italso helps in relational database management tasks like data migration, backup, recovery and patching. * Amazon RDS supports PostgreSQL, MySQL, Maria DB, Oracle, SQL Server and Amazon ‘Aurora, . ‘Amazon CloudFront ‘+ Amazon CloudFront is a fast Content Delivery Network (CDN) service * AWS CloudFront is a globally-distributed network which securely transfers content such as software, SDKs, videos, etc, to the clients, with high transfer speed. TECHNICAL PUBLICATIONS® - an up-thrust for knowledge. DevOps. 1-12 Introduction to DevOps_ ‘¢ It provides high security with the ‘content privacy’ feature. «© When a user requests content that is being served with CloudFront, the request is routed to the nearest edge ication that gives the lowest latency. Bdge locations are the network of data centers distributed worldwide through which content is delivered. This helps the user. to ‘access content with the best possible performance. The Amazon cloud architecture functions as follows : © If the content is already cached in the edge location, CloudFront delivers it immediately ‘with the lowest latency possible. ‘9 Ifthe content is not present in the edge location, CloudFront retrieves it from the origin © Amazon's CDN offers a simple, pay-as-you-go pricing model with no upfront fees or required long-term contracts. Fd Global Infrastructure of AWS ‘The Amazon web services are used globally by billions of users. The global infrastructure is divided into small geographical areas. «The AWS cloud spans 99 Availability Zones within 31 geographic regions around the world, swith announced plans for 15 more’ Availability Zones and 5 more AWS Regions in Canada, Israel, Malaysia, New Zealand and Thailand, ‘©. The global infiastructure is composed of ~ 6 Regions “o Availability zones co Bdge locations © Regional edge cache. Global infrastructure — z ‘Avalebity Edge Ragional edge wer zones, locations jeache Fig. 12.1 Components of AWS global infrastructure 1) Region: ‘+ Itis a physical location or geographical area «A region is a collection of data centers which are completely isolated from other regions. ‘© A region consists of more than two availability 2ones connected to each other through links. TECHNICAL PUBLICATIONS® - an up-thrust for knowledge Devons. 1-13. Introduction to DevOps ‘+ For instance - Mumbai region consists of two availability zones. 2) Availability zones : © An Availability Zone (AZ) is a grouping of one or more discrete data centers that provide applications and services in an AWS region. © Availability zones are connected through redundant and isolated metro fibers. Region [2-0 ee “29 | | eze | Fig. 1.2.2 ‘© If one zone fails to function correctly, the other zone will operate fine without any effect, © All availability zones in an AWS region are connected through low latency and high throughput networking channels, ‘© Availability zones provide customer application and database operating environments that are more scalable and fault tolerant. 3) Edge locations : ‘© Edge locations are the endpoints for AWS used for caching content. ‘© Edge location is not a region but a small location that AWS has. ‘+ Itis used for caching the content, ‘© Eage locations consist of CloudFront, Amazon's Content Delivery Network (CDN). ‘© Edge locations are mainly located in most of the major cities to distribute the content to end users with reduced latency. * For example, if some user accesses your website from New York City; then this request ‘would be redirected to the edge location closest to New York where cached data can be read. * Currently, there are over 150 edge locations. 4) Regional edge cache : ‘+ A regional edge cache has a larger cache than an individual edge location. ‘© Regional edge cache lies between CloudFront Origin servers and the edge locations. ‘© When the user requests the data, then data is no longer available at the edge location. ‘Therefore, the edge location retrieves the cached data from the Regional edge cache instead of the origin servers that have high latency. TECHNICAL PUBLICATIONS® - an up-thrust for knowledge Devons 1214 Introduction to DevOps Gateeeteoen What is AWS ? Enlist the features of AWS. What are the applications of AWS ? Explain in detail the services offered by AWS. Explain the global infrastructure of AWS. GCP stands for Google Cloud Platform. Google Cloud Platform (GCP), offered by Google, is a suite of cloud computing services that runs on the same infrastructure that Google uses internally for its end-user products, such as Google Search, Gmail, Google Drive and YouTube. 1 2 3 4 Introduction to GCP ‘© Google Cloud Platform provides infrastructure as a service, platform as a service and serverléss computing environments. «In Apri 2008, Google announced App Engine, a platform for developing and hosting web applications in Google-managed data centers. ‘© Google Cloud Platform is a set of cloud computing services provided by Google that allows 1us to store, manage and analyze data. «Ibis used for developing, deploying and scaling applications on Google’s environment. © The services of GCP can be accessed by software developers, cloud administrators and IT professionals over the Internet or through a dedicated network connection. Features Following are the reasons why Google Cloud Platform - 4) Tools and services : ‘© Google has many innovative tools for handling cloud data. © Google Cloud Platform offers the same core data storage and virtual machine functionality of AWS and Azure or any’ other cloud provider. Google’s strength. lies in big data processing tools, Artificial Intelligence (AI) and machine learning initiatives and container support © Googie’s BigQuery and Dataflow bring strong analytics and processing capabilities for companies that work heavily with data, while Google's Kubernetes container technology allows for container cluster management. GCP offers number of physical, logistical and human-resource-related components, such as wiring, routers, switches, firewalls, load balancers services. TECHNICAL PUBLICATIONS® - an up-thrust for knowledge DovOps 1-15 Iniroduction to DevOps 2) Speed : ‘© Google Cloud provides its Google Cloud and Google App customers network speeds of up to 10 Tbs, ‘* The network has connections throughout the world in the United States, Europe, main cities in Japan, major hubs in Asia and much more. 3) Cost effective : © Google Cloud offers a monthly pricing plan. The price model of GCP is awesome, it allows ‘you to pay only for what we use. ©» Google Cloud pricing provides discounts. 4) Security : ‘© GCP provides multi-level security options to protect resources, such as assets, network arid OS - components. Advantages 1) GCP offers a first rate security level. A big advantage is that the company constantly releases updates, adds improvements to security. 2) In comparison with competitors, like Amazon Web Services, Digital Ocean, or Microsoft ‘Azure, GCP’s advantage is the opportunity to not pay any extra money for unused services. Google enables users to get Google Cloud hosting at the cheapest rates, 3) Once the account is configured on GCP, it can be accéssed from anywhere. That means ‘that the user can use GCP across different devices from different places. 4) Google always keeps backup of user's data with built-in redundant backup integration. 5) Migrating to Google’s Cloud Platform el infrastructure. 6) There is Global Presence of Data Centers, Networks and Cloud Services by GCP. ates the need to buy on-premises Services using GCP Following are some significant services offered by GCP - 4) Compute © Comipute engine allows us to create Virtual Machines (YM), allocate CPU and memory and choose from SSD (Solid State Drives) or HDD (Hard Disk Drive) storage. It allows you to create a workstation or computer virtually and handle all its details. TECHNICAL PUBLICATIONS® - an up-thrust for knowledge Devops 1:16 Introduction to DevOps ‘© The various services under this are as follows’: © App Engine © Compute Engine ‘© Kubemetes Engine © Cloud Functions, © Cloud Run, 2) Networking ‘© GCP Provides Networking services tools to manage and seale your network easily. # Itoffers following suit of services - 6 Virtual Private Cloud (VPC) : VPC provides the flexibility to scale and control how ‘workloads connect regionally and globally. By using VPC you can bring yout own IP addresses to google network across all the regions. © Cloud DNS + Google Cloud DNS (Domain name system) is scalable, reliable and ‘managed authoritative DNS service, Cloud DNS is also programmable. ‘© Premium Tier Network : Premium Tier is recommended for high performance routing. Users can also take advantage of the global fiber network, with the globally distributed Points of Presence(PoP). a © Cloud Load Balancing : Cloud balancing is used to distribute worklosid across different computing resources to balance the entire system performance. 3) Storage © Google Cloud Storage is unified object storage, The GCP has Buckets, Objects and various storage classes. It is an online data storage web service that Google provides to its users to store and access data fromanywhere, ‘¢ Cloud SQL : It is a web-service that enables users to oreate, manage and use relational databases stored on Google Cloud servers. '* Cloud BigTable : BigTable is a fully managed wide-column and key-value NoSQL database service for large analytical and operational workloads, 4) Big Data ‘© Big data is the massive amount of data available to organizations that ~ because of its volume and complexity ~ is not easily managed or analyzed by many business intelligence tools © BigQuery is a data warchouse that processes and analyzes large data sets using SQL queries. These services can capture and examine streaming data for real-time analyties TECHNICAL PUBLICATIONS® - an up-thrust for knowledge Devons 117 Introduction to DevOps + Google Cloud Dataproc is a managed Apache Hadoop and Spark service ‘for batch processing, querying, streaming and machine leaning. * Cloud Dataflow is a serverless stream and batch processing service. Users can build pipeline to manage and analyze data in the cloud, while Cloud Dataflow automatically manages the resources. 5) Cloud Al * Google Cloud Machine Learning Engine is useful to run complex ML models. It is scalable across different machines. It supports the increased’ performance of linear algebra computations. ‘*. AUtoML enables developers with limited machine leaming expertise to build custom ML ‘models in minutes. It isa cloud-based ML platform and uses a No-Code approach with a set of prebuilt models via a set of APIs. 1. What is GCP ? Enlist the features of GCP. 2._Explain the services offered by GCP. Introduction to Azure ‘* Microsoft's cloud computing platform, Azure, was introduced at the Professional Developers Conference (PDC) in October 2008 under the codename "Project Red Dog". * Microsoft’ Azure, formerly known as Windows Azure, is Microsofts public cloud ‘computing platform. ‘+ It provides a range of capabilities, including Software as-a Service (SaaS), Platform as a Service (PaaS), and Infrastructure as a Service (IaaS). It provides a broad range of cloud services, including compute, analytics, storage and networking. Features 1) Unique storage system : Azure has multiple delivery points and data centers. Due to which the content delivery to the user is faster. Also, Azure allows users to store data in a fast and reliable environment. 2) Flexibility : Azure is flexible. That means, it provides a wide range of services including virtual machines, storage and networking, allowing businesses to build custom solutions that meet their specific needs. This flexibility allows organizations to create and deploy applications quickly and easily, improving time to market and providing a competitive advantage. TECHNICAL PUBLICATIONS® - an up-thrust for knowledge Devons 1-16 Introduction to DevOps 3) Scaling : Azure allows us to effortlessly scale our infrastructure up or down as per our requirements, 4) Security : Data security and compliance are top priorities for any business and Microsoft ‘Azure provides a range of features and services to help organizations protect their data in the cloud. 5) Cost effective : With Azure, there are no upfront costs for hardware or infrastructure and organizations only pay for the services they use. This means that businesses can reduce their capital expenditures and operational expenses, while still having access to the latest technology and features. 6) Strong support in analytics : Microsoft Azure is equipped with built-in support that analyzes data and key insights. The service provides features such as Cortana Analytics, Stream Analytics, Machine Leaming, and SQL services. These features will help to enhance customer service and make informed decisions. Services using Azure 1) Compute.domain : ‘The Azure compute domain allows its user to host the model for the computing resources on which out application can run, Following are some main options available under compute domain of Azure - © App Service : © This service allows hosting web apps, mobile apps with back ends, automated processes and RESTful APIs. © [tis a managed PaaS offering. {ual Machine : fo It is an LaaS service. co Virtual Machines, or VMs, are software emulations of physical computers, They include 1 virtual processor, memory, storage and networking resources. They host an Operating ‘System (OS), of our choice and run software just like a physical computer. And by using ‘a remote desktop client, we can use and control the virtual machine, © Functions : o Itis a server-less computing service, fo It isa service that allows developers to quickly ereate and deploy small pieces of back- end code, or “functions”, without having to worry about the underlying infiastructure. 6 Users ean upload applications with multiple functions, TECHNICAL PUBLICATIONS® - an up-tnust for knowledge DevOps 1-19 Introduction to DevOps © Azure Functions can be written in a variety of languages, including C#, F#, Nodes, Python, and PowerShell. 2) Storag Microsoft Azure provides highly available, durable, scalable and redundant storage, To use any storage type in Azure, we first have to create an account in Azure. After creating an account, we can transfer data to or from services in your storage account, We ean ereate a storage accoutit to store up to 500 TB of data in the cloud, Following are some storage options used in Azure - * Blob Storage : © BLOB is an acronym and means Binary Large OBject. © Azure Blob storage is a service that stores unstructured data in the cloud as objects/blobs. © Blob storage can store any type of text or binary data, such as a document, media file, ot application installer © Blob storage is also referred to as object storage. * Queue Storage : © Queue storage in Azure isa fully managed, cloud-based service for storing and retrieving large numbers of messages. © It is used to build asynchronous, loosely-coupled, scalable, and reliable applications by allowing communication between microservices © A single queue message can be up to 64 KB in size, and a queue can contain millions of messages, upto the total capacity limit of a storage account. + File Storage : © File Storage in Azure is a fully managed, cloud-based file storage service that allows applications to access and store files using the standard Server Message Block (SMB) protocol 6 It provides a fully managed network file share that can be accessed from anywhere and by multiple concurrent clients ‘© Anccount can contain an unlimited number of shares and a share can store an unlimited number of files, up tothe 5 ‘TB total capacity ofthe file share. 3) Database : Using various database services fiom the Azure users can easily deploy one ot more databases to virtual machines or applications, The core database services available int Microsoft Azure revolve around the following five offerings. Cosmos DB, MySQL, PostgreSQL, MS SQL and SQL ‘Managed Instance. 5 TECHNICAL PUBLICATIONS® - an up-thnust for knowledge DevOps 4-20 Introduction 16 DovOps © Cosmos DB: © Azure Costnos DB is a globally distributed, multi-model database service that supports various data models and query languages. «9 It is designed for building highly scalable, globally distributed applications that require low latency and high availability. It isa NoSQL data store that is available in Azure. + MySQL: © Azure: Database for MySQL is a relational database service powered by the MySQL community edition © Amure Database for MySQL is cost effective and casy to set up, operate and scale. + MSSQI © It isa Microsoft SQL service in the cloud. fo It is a fully managed PaaS database engine that handles the tasks of upgrading, patching, backups and monitoring. © MS SQL has artificial intelligence features that are updated often. 4) Networkin ‘Auto-scaling and load balancer are two important features in network services of Azure «© Auto scaling service is used in a cloud to scale out or scale in the virtual machine instances according to some condition, for instance - If CPU usage is heavy then we can increase the virtual machine instances and if it drops to some limit then we can reduce the virtual ‘machine instance. © Load balancing is a feature that balances the traffic between different servers. It is used to divide the traffic between the different servers or if one of the machines stops responding it directs its traffic to the different server. In the-cloud, we could use the load balancer to balance the traffic between our virtual machines. : 7. What is Azure ? Explain the fearures of it. 2. What are the services offered by Azure ? TECHNICAL PUBLICATIONS® - an up-thrust for knowledge DevOps 4-21 Introduction to DevOps EI Comparison among AWS, GCP and Azure TECHNICAL PUBLICATIONS® - an up-thrust for knowledge DevOps: 4-22 Introduction to DevOps [Compare Azure, AWS and GCP. ici Linus Torvalds created Git in 2008 for the development of the Linux kemel. © Gitis a'DevOps tool used for source code management. I is a free and open-source version control system used to handle small to very large projects efficiently. Git is used to tracking ‘changes in the source code, enabling multiple developers to work together. Features of Git 1) Itisa free and open source tool. 2) It keeps track of, any ade repository, 3) Itereates backups. 4) Creating branches and making changes on particular branches is easy. jon, modification and deletion of any file in the project 5). This tool is used for project management in distributed environments 6) Itis scalable. 4). Git allows users from all over the world to perform operations on a project remotely. Thus ithelps in non-linear development. 8) “tis secure, Git keeps a record ofall the commits done by each of the collaborators on the local copy of the developer. Git Workflow ‘Theré are two types of files in git ~ 1). Untracked file: Files that are in your working directory, but not added to the repository. 2) ‘Tracked file : These files are those.that Git knows about and are added to the repository “When we add the files to the empty repository then they ate all untracked. To get Git to track them, we need to stage them, or add them to the staging environment. Then using the command like git eonimit we can add them to the repository. Let us understand these terms - Working rectory it add Staging area gt commit Repository |-— Fig. 1.64 TECHNICAL PUBLICATIONS® - an up-thrust for knowledye Devops 1-23 Introduction to Devons: * Working directory : The working directory is a-directory which we create for storing the files in our local filesystem. We can add, modify or delete the files. But on completion of the desired tasks with the files, these files are added to the staging area before pushing them into repository ‘+ Staging area : Before sending the file to the repository, the file needs to be stored in the staging area. Using the git add command the fife is stored in the staging area. Staged files ate files that are ready to be committed to the repository. * Repository : In git, repository is like a data structure used by git to store metadata for a set of files and directories. It contains the collection of the files as well as the history of changes made to those files. So that any changes in the files are notified each time. The version control and management ofthe files and directories is possible in the repository. For sending the files from the staging area to the repository the git commit command is used. EEX] installing Git * To use Git, we have fo install it on our computer. To download the Git installer, visit the Gits official site and go to the download page. The link for the download page is hitpsi/git-sem.com/downloads. Choose the appropriate download option based on your operating system. Installation procedure is typical, just click on Next button by accepting default options, Install & Please wat wie Setop ntals Gon yur computer. (Core) TECHNICAL PUBLICATIONS® - an up-thrst for knowiedge DevOps 1-24 Introduction to DevOps . On completing the Git setup, you can launch Git Bash. Git Bash is an application that provides Git command line experience on the operating system. Basically, itis a command- ine shell for enabling Git with the command line in the system. ae | # Git2.41.0.3 Setup a Completing the Git Setup Wizard Setup his fished inctaling Gt on your comeuter. The elon may bce ecg eed Glee Fish to wet Setp. BB vannch Git Bach Ci view Release Notes: ‘We can check the version of a Git using the command $ git-version ‘then the version of installed Git willbe displayed. ~ TECHNICAL PUBLIGATIONS® - an upthrust for knowledge 1-25 Introduction to DevOps Basic Commands 1) Configuration After installing. the Git, the first step is to configure it with user name and email address. Following commands are used on Git Bash to configure the Git. Following screenshot illustrates these commands We can check if the name and email ID is set or not using following commands 2) Creating a repository . Repository means a storage space or a directory in which we can keep our project files. We will use the git init command to create a repository. Itis also called a repo. Stop 1: Create a folder with some suitable name. Ihave created a folder GitDemo using command prompt. Step 2: Now switch to GitDemo directory using the command Step 3: Issue the init command as EERE TSS ee ate EET. TECHNICAL PUBLICATIONS® - an up-thrust for knowledge DevOps 1-26 Introduction to DevOps. The empty git directory will be created. Following sereenshot illustrates it~ Fy MINGWEA/e/Isers/DELL/GIDeMO ‘Thus we have created our first git repository. Now this folder named GitDemo will be tracked by Git, Git creates a hidden folder git to keep track of the changes, Note that by default the branch named master is created. 3) Adding file We have created the first local Git repo. But note that it is empty. Now we will add some files to this repository using some local text editor. For instance we will add a file named weleome.htmil. welcome.htm! <)DOCTYPE him> <Codestin Search App Welcomellt ‘ We can go to the terminal and lis the files in our current working directory using ls command MINGWEA/E/Users/DELL/GRDemS Fires eae (master) DELLADESKTOP-FFRIVEO MINGHE4 ss welcome html DELLODESKTOP-FFRLVEO MINGH6S master) s ‘The git status command displays the state of the working directory. Hence we will us¢ the git ‘status command. TECHNICAL PUBLICATIONS® - an up-rust for knowledyo From the above soreenshot, we can clearly observe that it is aware of our weleome.htmt! file. But this file is an untracked file. 4) Checking status 5 ‘The git status command allows you to see which files are staged, modified but not yet staged and completely untracked, S git status ‘We can add the file welcome. html into the staging area using the git add command - S git add welcome.htm! ‘We can then using the git status command to check the status of welcome.html file TECHNICAL PUBLICATIONS® - an up-thrust for knowledge ‘Thus the file weleomeshtml file is staged. We can add more files to the staging area. For instance let us create one more file named contact.html as follows ~ contact.htmi Similarly we can make changes to our welcome.html file as follows ~ | ‘welcome.htmt then using git status command we can check the status of these files. Both the contact.html and welcome-html files are added to the staging area, Instcad of git add - all we can use the ‘command git add - A . TECHNICAL PUBLICATIONS® - an up-trust fr knowledge 5) Commit Finally we have to add these files to a repository so that these files can be tracked on addition, deletion or modification. We use the commit command. to add these files to the repository. The ‘commit command should be along with some short message. : ‘The commit command performs a commit, and the -m "message" adds a message. ‘Commit without stage ‘Sometimes we make very small changes to file. Hence first sending the file to the staging area and then to the repository is a waste of time. So we can perform commits directly without a stage. We use -a tag. The command is - Commit Log = ‘To view the history of commits done for the repository, we use log command. 6) Working with Git branches * Initially when we create a repository we create a main branch by default. Apart from this ‘main branch we can create any number of branches. We can edit the code directly using this ‘new branch without impacting the original code in our main branch. After successful editing, ‘we can merge this new branch with our original branch. TECHNICAL PUBLICATIONS® - an up-thnis for knowledge Devons 4-90 Introduction to DevOps ‘© The branches allow us to work on different parts of a project without impacting the main branch, We can also create different branches and work on different projects at a time, Switching among these branches is very simple and easy. Thus the branching in Git is lightweight and easy. For creating a branch we use the command git branch '* Hefe we have created another branch named new_branch. “D MINGWeA//UserS/DELLGADEMS = a x “We can confirm the ereation of this branch using the command git branch. Note that in the ” above screenshot we can clearly see that there are two branches - main and new branch. But the * beside master specifies that we are currently on that branch. 7) Switching between the branches » “We can switch between branches using the command checkout, The command can be Note that in the above screenshot, we have switched to another branch new_branch. Then using the git branch command, we can check which branch is currently active. Note that the * lies besides the new_branch. Now, we can add the file weleome.html(which is present in the main branch) to this branch, make the necessary changes to this file and this file is different from the main branch file. TECHNICAL PUBLICATIONS® - an up-haust for knowledge DevOps 1-31 Introduction to DevOps Suppose we have added one image to this -file. Following boldfaced line shows the ‘modifications made in weleome.html welcome.htmt Now lets check sais using git status Note that, the file weleome.him! is changed, we have also added one jpg file in the current ‘working directory, But we have not added ths file in the staging area for commit, So modified welcome.itml and hand,jpg files can not be tracked. Let us now add both. the hand.jpg and weleome.html files to the staging area on the new_braneh and then make a commit. URES Ger TELE aor el ‘Now using git status we check the status of these files. — TECHNICAL PUBLICATIONS® - ai up-thrust for knowledge Note that the files hand.jpg and weleome.html files are added to the staging arca. Finally we ‘will commit these files using the command git commit. > MINGWet Veer DELIGHONMS ‘Thus now branch new_branch is different from master branch. “Thus different versions of the files ean be managed using git commands. TECHNICAL PUBLICATIONS® - an up-thrust for knowledge h3> We are happy to see you here 2 sansowea User LAO oe (BE wetconne net * oe File ait View © “Son new_brach we have got this Version of Shemi> welcome-htmal heads ile ctitlerinst Filec/tities . k sie Weare hoppy to see you here ing see = “hand.spe"> sate 120% Winders (R17 ures 8) Merging branches e ‘We can merge these branches using the git merge command TECHNICAL PUBLICATIONS® - an up-thrust for knowledge ‘We can now delete new_branch using the command $ git branch -d new_branch ‘Note that the branch named new_braneh is deleted. Only the master branch is alive, 1. What is Git ? Explain its features. 2. What is Git workflow ? 3. Explain with example, how to create a repository, add and commit files. EE Concept of GitHub . GitHub is a web-based hosting service for Git repositories. ‘Tt makes Git more user-friendly, ‘and also provides a platform for developers to share code with others. * Additionally, GitFlub repositories are open to the public. Developers worldwide can interact ‘and contribute to one another's code, modify or improve it, making GitHub a networking site for web professionals. The process of interaction and contribution is also called social coding. What is a repository ? ‘= Repository means a storage space or directory that holds al the projects files. Bach file has revision history. tis also called a repo. TECHNICAL PUBLICATIONS® - an up-thrust for knowledge Devons 1-35 Introduction to DovOps * The repository helps to communicate and manage project's work systematically © We can keep files and images inside our repository. Features It makes the project management smooth by keeping track of all the updates made in the project. 2) We can push the package privately and seoure the projects from being public. Similarly we ‘can distribute the work publicly if we want to do so. 3) GitHiub helps the team members to teview, develop and propose new code. It allows users 6 share the changes in the code among themselves. 4) Code hosting is easy using GitHub. 5) Ithelps in streamlining the project workflow. 6). Itallows effective team management, 7) Itis intuitive and easy to learn. Hosting Service for Git Repository For using the GitHub we have to sign up.on the web page https://github.com/ Use the same email ID which you have used for Git. Fill up the requited informaticn, set up the user name and password for GitHub eee Sign in usin user name/email and password to GitHub. 1) Create repository + The first step is to create a repository on github. For that, we just click on Create Repository to create a new repository. Just specify the name of the repository, make it public or private, add or do not add the README file, just ereate it the way you want. * Ihave created a repository by the name my_projeet: * Copy the code by clicking on the code, TECHNICAL PUBLICATIONS® - an up-thrst for knowledge DevOps 1-36 Introduction to DevOps ee AE Rent ont coment — Demme eco ae. x i aes Boe TERS my_project = f- ceeds i yf epontony on atte 1D cette ‘Now open the Git bash window and add the command git remote add origin URL as - ‘Sot comote add origin htpe//qithub com/AnurdhaP/my project Here git remote add origin URL specifies that you are adding a remote repository, with the specified URL, as an origin to your local Git repo. 2 ‘Now let us push our master branch to the origin url and set it as the defantt remote branch. This command will prompt you for usemame and password and will authenticate you. Then only it will push our master branch to the origin url and set itas the default remote branch. ‘Now go back to github and we can note that the master branch is now updated. TECHNICAL PUBLICATIONS® - an up-thrust for knowledge Devops 1-37 Introduction to DevOps ioe — maa rt tenia ps =o aay es 3 one le AE sean ne may te ewe 7 oO D, omit Sasi Beinn ‘ 1D mekenebent anna a i ern yout rp = We can add the README file by editing the code inside this file. Add some changes to the code and then commit the changes. For now, we will "commit directly to the master branch”. 2) Fetch, merge and pull fetch Git Fetch is the command that tells the local repository that there are changes available in the remote repository without bringing the changes into the local repository. Fetching is what you do ‘when you want to sce what everybody else has been working on. The syntax for feteh command are ~ sit fetch Fetch all ofthe branches from the repository. This also downloads all ofthe required commits and files from the other repository: ait feteh ‘Same as the above command, but only fetch the specified branch. git fetch -all By using following feteh command Sit fetch onigin TECHNICAL PUBLICATIONS® - an up-thnis for knowledge DevOps, 1-98 Inyoduction to DevOps Following screenshot illustrates it. Note that on github repository we have made changes in the README file, hence there is 1 commit. ~ 5 We can also verify by showing the differences between our local master and origin/master ‘using git diff command. Panne ter/DELU SAD the current branch, with a specified branch. The command is TECHNICAL PUBLICATIONS® - an up-thiust for knowledge DovOps 1-39 f Iiroduction to DevOps Pull ‘+ The pull is a combination of fetch and merge. It is used to pull all changes from’a remote repository into the branch you are working on. ‘+ Go to GitHub repository and add some files to it. For instance I have created an about-html file and committed it to GitHub’s my_project repository. about.html It can be represented by following screenshot - SE sotto rman for stot 5 inet 2riutersgs @ Acoma 1B romens crete README Hminnes a Detter em nnng eran ersten” 2oinnee age 0 cmchint Thr fateonmt 2a amp D tending Prt nage de ewe 5 Bhs age Blom ent eed og nid he elon Phos aye ‘Now, Use pull to update our local Git J Se TECHNICAL PUBLICATIONS® an up-thrust for knowledge Davops : 4-40 Introduction to DevOps ‘Open the repository on your local machine and you will the see the newly added about.html file on your local repository. 3)Push ‘The push command is used to push the changes which we have made in the local Git repository to the GitHub repository. Step 1: Change the about.hitml file in the local folder. Ihave added an image inside this html file. cabout.html ‘Step 2: Commit the changes using Git bash. Step 3: Now, push the changes to remote origin using the command. TTEGHNICAL PUBLICATIONS®-an up wust for inode DevOps teat Introduction to DevOps Step 4: Go to GitEfub and confirm that the repository has a new commit : my project/abouthtml @ Anurdha Wodiied ([eede | alame 12 280s 2 200) «36 ojees 1» tb0cr me beat 2 etal 3 ests ‘ toi Ue Fizeeestley 5 mae ‘ esp 2 ‘> Quldty £5 our BEST POLECYLILe/NAy 3 “ing ane = hand» 2 1 shetye 2 chp 4) Creating branch (On GitHub we can create a branch by clicking on the master branch. B master ~ PF 2 bron DOtegs Soiltch branches/tage a Branches | Tags ima mia ddofautt Y master DB) contacthim! This 1D handjeg B welcomehim! Used TECHNICAL PUBLICATIONS® - an upthrust fer knowledge Devons. 41-42 Introduction to DevOps We have to type the name of the branch to create a new branch, On a new branch we can update any desired file and create a separate version of that file without disturbing the original file. co 1. What is GitHub ? Explain the featurésof't 2. Explain the GitHib's push and pull commands with excmples. Difference between Git and GitHub 7 Git is a version contro} system to ‘manage source code history It is open-source licensed. configuration. I. Give the difference between Git and GitHub. EE) Two Marks Questions with Answers Q.1 What is Devops ? ‘Ans. : DevOps is a practice in which development and operation engineers participate together in entire lifecycle activities of system development from design, implementation upto the produet support. TECHNICAL PUBLICATIONS® - an up-thrust for knowledge DowOps 1-43 Introduction to Devons Q2_ Enlist the goals of DevOps. Ans. : The Goals of DevOps are as follows ~ 1. To make simple processes increasingly programmable and dynamic, 2, Fast delivery of product, 3. Lower failure rate of new releases, 2 4. Shortened lead time between fixes. 5. To standardize the development environment, 6. To reduce work in progress, 7. To set up an automated environment. 3. Whatis the difference between Agile and DevOps approaches ? ‘Ans. : Refer section 1.1.4 4 What are the popularly used DevOps tools 7 ‘Ans. : Some of the tools are - 1. Docker : It eases configuration management and control issues, 2. Jenkins : Jenkins is a top tool for DevOps engineers who want to monitor executions of | repeated jobs 3. Puppet : It handles configuration management and software while making rapid, repeatable changes in it, 4. Ansible : Ansible is a configuration management tool or DevOps tool that is similar to Puppet and Chef. Q5_ Enlist the DevOps lifecycle phases. ‘Ans. : Various phases of DevOps lifecycle are - 1) Continuous development 2) Continuous integration 3) Continuous testing 4) Continuous monitoring 5) Continuous feedback 6) Continuous deployment 7) Continuous operations Q.6 Whatis cloud computing? Ans. : Cloud computing is a term that refers to storing and accessing data over the intemet It does not store any data on the hard disk of Gur personal computer. In cloud computing, we can access data from a remote server. TECHNICAL PUBLICATIONS® an up-thrst for knowledge DevOps 1246 Introduction to DevOps Q7 What is AWS ? ‘Ans. = AWS stands for Amazon Web Service. It is the most comprehensive cloud service provider by Aniazon. It includes services for storage, databases, analytics, networking, mobile, development tools and enterprise applications. 8 What are the three types of services offered by the cloud ? ‘Ans. : It provides different services of cloud such as Infrastructure asa Service (IaaS), Platform ‘as a Service (PaaS) and packaged Software as a Service (SaaS)- Q9. Differentiate between different services offered by cloud computing. Ans. 0.10 What are the applications of AWS? ‘Ans. : AWS is widely used for following purposes - 1) Building mobile and social applications 2). Storage, backup.and disaster recovery 3) Academie computing, TECHNICAL PUBLIGATIONS® - an up-irast fr knowledge Devons. 1-45 Introduction to DevOps 4) Website hosting 5) Media sharing such as image or video Q.11 What is Amazon EC2 instance ? Ans. ‘+ EC2 stands for Elastic Cloud Compute. ‘+ Amazon EC2 is one of the most used and most basic services on Amazon. ‘© EC2 is a machine with an operating system and hardware components of developer’s choice. But the difference is that itis totally virtualized. The developer can run multiple virtual computers in a single physical hardware. Q.12 What is Amazon CloudFront ? ‘Ans. : Amazon CloudFront isa fast Content Delivery Network (CDN) serviee. AWS CloudFront is « globally distributed network that securely transfers content such as software, SDKs, videos, etc. to the clients, with high transfer speed. Q.13 What are various components of global infrastructure ? ‘Ans. : The global infrastructure is composed of - © Regions © Availability zones © Edge locations ‘0. Regional edge cache Q.14 What is GCP ? Enlist the features of GCP. ‘Ans: ; GCP stands for Google Cloud Platform, offered by Google. It is @ suite of cloud computing services that runs on the same infrastructure that Google uses internally for its end- user products such as Google Search, Gmail, Google Drive and YouTube. The features are as follows = 1) Tools and services : Google’s BigQuery and Dataflow bring strong analytics and processing capabilities for companies that work heavily with data, while Google's Kubemetes container technology allows for Container cluster management. 2) Speed : Google Cloud provides its Google Cloud'and Google App customers: network speeds of up to 10°Tbs. eas 3) Cost effeetive : Google Cloud offers a monthly pricing plan. The price model of GCP is awesome, it allows you to pay only for what we use. 4) Security : GCP provides multi-level security options to protect resources, such as assets, network and OS - components. TECHNICAL PUBLICATIONS® - an up-thrust for knowiedge DevOps 1-46 Introduction to DevOps 2.15 Explain in briof any two services offered by GCP. Ans. : 1) Compute : Compute engine allows us to create Virtual Machines (VM), allocate CPU and memory and choose from SSD (Solid State Drives) or HDD (Hard Disk Drive) storage. It allows you to create a workstation or computer virtually and handle all its details. The various services under this are as follows © App Engine © Compute Engine © Kubemetes Engine ‘© -Cloud Functions © Cloud Run 2) Storage : Google Cloud Storage is unified object storage. The GCP has Buckets, Objects, and various storage classes. It is an online data storage web service that Google provides to its users to store and access data from anywhere. Q.16 What is Azure ? Enlist its features, ‘Ans. : Microsoft's cloiid computing platform, Azure, was introduced at the Professional Developers Conference (PDC). Microsoft Azure, formerly known as Windows Azure, is Microsoft's public cloud computing platform. The features are as follows - 1) Unique storage system : Azure has multiple delivery points and data centers. Due to this the content delivery to the user is faster. Also, Azure allows users to store data in a fast and reliable environment. 2) Flexibility Azure is flexible. That means, it provides a wide range of services including virtual machines, storage and networking, allowing businesses to build custom solutions that meet their specific needs, 3) Scaling : Azure allows us to effortlessly scale your infrastructure up or down as per our requirements .17 Differentiate between Azure, AWS and GCP. ‘Ans. : Refer section 1.5 0.18 What is Git ? Ans. : Git is a DevOps tool used for source code management. It is a free and open-source version control system used to handle small to very large projects efficiently. Git is used to track: changes in the source code, enabling multiple developers to work together. TECHNICAL PUBLICATIONS® - an up-thrust for knowledge * Devons. 1-47 Introduction to DevOps 'Q.19 Explain the concept of tracked and untracked files in Git. Ans. : 1) Untracked file : 2) Tracked file : These files are those that Git knows about and are added to the repository, les that are in your working directory, but not added to the repository. .20 What Is the meaning of staging area in Git ? ‘Ans. : Before sending the file to the repository, the file needs to be stored in the staging area. Using the git add command the file is stored in the staging area. Staged files are files that are ready to be committed to the repository. .21 What is the use of “git status” command 7 ‘Ans..; The git status command allows us to see which files are staged, modified but not yet staged or completely untracked. Q.22 Which command Is used to add file to staging area? Ans. : The git add command is used to add file to staging area, Q.23 What is the use of GitHub ? Ans. : GitHub is a Graphical User Interface(GUN. It is a service. It is hosted on Web, It is maintained by Microsoft, GitHub is @ hosting service for Git repositories. goa TECHNICAL PUBLICATIONS® - an up-thrust for knowledge Devops. 1-48 Introduction to DevOps TECHNICAL PUBLICATIONS® - an up-thrust for knowledge

You might also like