Advertisement
satishfrontenddev5

Untitled

Mar 1st, 2024 (edited)
22
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 1. **What do you know about DevOps?**
  2.    - Combines software development (Dev) with IT operations (Ops).
  3.    - Aims to improve efficiency and quality of software development, delivery, and deployment.
  4.    - Emphasizes collaboration, automation, continuous integration, delivery, and deployment.
  5.  
  6. 2. **How is DevOps different from agile methodology?**
  7.    - Agile focuses on iterative development with customer feedback.
  8.    - DevOps focuses on collaboration between development and operations teams, emphasizing automation and continuous delivery.
  9.  
  10. 3. **Which are some of the most popular DevOps tools?**
  11.    - Selenium, Puppet, Chef, Git, Jenkins, Ansible, Docker.
  12.  
  13. 4. **What are the different phases in DevOps?**
  14.    - Plan, code, build, test, integrate, deploy, operate, monitor.
  15.  
  16. 5. **Mention some of the core benefits of DevOps.**
  17.    - Continuous software delivery, less complex problems to manage, early defect detection, faster delivery of features, improved collaboration.
  18.  
  19. 6. **How will you approach a project that needs to implement DevOps?**
  20.    - Assess existing processes, create proof of concept, implement DevOps step by step.
  21.  
  22. 7. **What is the difference between continuous delivery and continuous deployment?**
  23.    - Continuous delivery ensures code can be safely deployed but requires human approval.
  24.    - Continuous deployment deploys every change automatically without human intervention.
  25.  
  26. 8. **What is the role of configuration management in DevOps?**
  27.    - Manages and changes multiple systems, standardizes configurations, aids in infrastructure management.
  28.  
  29. 9. **How does continuous monitoring help maintain the entire architecture of the system?**
  30.    - Detects, identifies, and reports faults or threats in the infrastructure, ensures proper functioning of services and applications.
  31.  
  32. 10. **What is the role of AWS in DevOps?**
  33.     - Provides flexible, scalable, and automated services for DevOps practices.
  34.  
  35.  
  36. 11. **Name three important DevOps KPIs.**
  37.     - Meantime to failure recovery, deployment frequency, percentage of failed deployments.
  38.  
  39. 12. **Explain the term "Infrastructure as Code" (IaC) as it relates to configuration management.**
  40.     - Writing code to manage configuration, provisioning, and deployment.
  41.     - Ensures consistent provisioning and management of infrastructure components.
  42.  
  43. 13. **How is IaC implemented using AWS?**
  44.     - Developers write infrastructure entities using formats like JSON or YAML.
  45.     - AWS services allow for automated provisioning and management of infrastructure.
  46.  
  47. 14. **Why Has DevOps Gained Prominence over the Last Few Years?**
  48.     - Adoption by major organizations like Netflix and Facebook.
  49.     - Accelerates application deployment, improves quality, and reduces costs.
  50.  
  51. 15. **What are the fundamental differences between DevOps & Agile?**
  52.     - Agile focuses on iterative development and customer feedback.
  53.     - DevOps emphasizes collaboration, automation, and continuous delivery.
  54.  
  55. 16. **What are the anti-patterns of DevOps?**
  56.     - Blaming the team for inability to implement DevOps.
  57.     - Assigning production management solely to developers.
  58.     - Assuming DevOps is a universal solution for all organizational problems.
  59.  
  60. 17. **What are the benefits of using version control?**
  61.     - Facilitates collaboration and tracking of changes.
  62.     - Provides version history and rollback capabilities.
  63.     - Supports parallel development and ensures consistency.
  64.  
  65. 18. **Describe the branching strategies you have used.**
  66.     - Release branching for stable releases.
  67.     - Feature branching for isolated feature development.
  68.     - Task branching for individual task implementation.
  69.  
  70. 19. **Can you explain the "Shift left to reduce failure" concept in DevOps?**
  71.     - Shifts focus on security and quality to earlier stages of development.
  72.     - Helps detect and fix issues early in the development lifecycle.
  73.  
  74. 20. **What is the Blue/Green Deployment Pattern?**
  75.     - A method for deploying updates with minimal downtime.
  76.     - Involves swapping between two identical production environments.
  77.  
  78. 21. **What is Continuous Testing?**
  79.     - Running automated tests as part of the software delivery pipeline.
  80.     - Provides instant feedback on business risks in the latest release.
  81.  
  82. 22. **What is Automation Testing?**
  83.     - Automating manual testing procedures using testing tools.
  84.     - Reduces manual effort, improves accuracy, and enables repeated test execution.
  85.  
  86. 23. **What are the benefits of Automation Testing?**
  87.     - Saves time and money, enables unattended execution.
  88.     - Supports parallel execution and reduces human errors.
  89.  
  90. 24. **How to automate Testing in the DevOps lifecycle?**
  91.     - Integrate testing into the CI/CD pipeline using automated testing tools.
  92.     - Execute tests automatically on each code change.
  93.  
  94. 25. **Why is Continuous Testing important for DevOps?**
  95.     - Detects issues early in the development cycle.
  96.     - Enables high-quality and frequent releases.
  97.  
  98. 26. **What are the key elements of Continuous Testing tools?**
  99.     - Test optimization, advanced analysis, policy analysis, risk assessment, service virtualization, requirements traceability.
  100.  
  101. 27. **Explain the difference between a centralized and distributed version control system (VCS).**
  102.     - Centralized VCS stores files on a central server.
  103.     - Distributed VCS gives each developer a copy of the entire repository.
  104.  
  105. 28. **What is the git command that downloads any repository from GitHub to your computer?**
  106.     - `git clone <repository URL>`
  107.  
  108. 29. **How do you push a file from your local system to the GitHub repository using Git?**
  109.     - `git push origin master`
  110.  
  111. 30. **How is a bare repository different from the standard way of initializing a Git repository?**
  112.     - Bare repository does not contain a working directory.
  113.     - It stores Git revision history in the root folder.
  114.  
  115. 31. **Which of the following CLI commands can be used to rename files?**
  116.     - `git mv`
  117.  
  118. 32. **What is the process for reverting a commit that has already been pushed and made public?**
  119.     - Use `git revert <commit id>` to create a new commit that undoes changes.
  120.  
  121. 33. **Explain the difference between git fetch and git pull.**
  122.     - `git fetch` downloads new data from a remote repository.
  123.     - `git pull` updates the current branch with new changes from the remote server.
  124.  
  125. 34. **What is Git stash?**
  126.     - Saves modified files on a stack of unfinished changes.
  127.     - Allows developers to switch to another task without committing changes.
  128.  
  129. 35. **Explain the concept of branching in Git.**
  130.     - Allows developers to work on new features or fixes without affecting the main branch.
  131.     - Changes made in a branch can be merged back into the main branch when ready.
  132.  
  133. 36. **What is the difference between Git Merge and Git Rebase?**
  134.     - `Git merge` creates extra merge commits when integrating changes.
  135.     - `Git rebase` incorporates changes by rewriting project history.
  136.  
  137. 37. **How do you find a list of files that have been changed in a particular commit?**
  138.     - Use `git diff-tree –r <commit hash>` to list changed files in a commit.
  139.  
  140.  
  141. 38. **What is a merge conflict in Git, and how can it be resolved?**
  142.     - Occurs when merging branches with competing commits.
  143.     - Resolved by manually editing conflicted files.
  144.     - Can also be resolved using GitHub conflict editor or command line.
  145.  
  146. 39. **What is Git bisect? How can you use it to determine the source of a regression bug?**
  147.     - Tool using binary search to locate bug-introducing commit.
  148.     - Mark "bad" commit where the bug occurs, "good" commit before bug.
  149.     - Git bisect tool iterates through commits to find bug-introducing commit.
  150.  
  151. 40. **Explain some basic Git commands.**
  152.     - `git init`: Start a new repository.
  153.     - `git config`: Set username and email for commits.
  154.     - `git clone <repository path>`: Create local copy of existing repository.
  155.     - `git add`: Add file(s) to staging area.
  156.     - `git commit`: Create snapshot of staged file(s).
  157.     - `git diff`: Show differences between branches or staged files.
  158.     - `git status`: List files to be committed.
  159.     - `git rm <file name(s)>`: Delete file(s) and stage changes.
  160.     - `git show <commit>`: Show content changes and metadata of commit.
  161.     - `git branch`: Create, delete, or list branches.
  162.  
  163.  
  164. 41. **Explain the master-slave architecture of Jenkins.**
  165.    - Jenkins master pulls code from remote repository.
  166.    - Distributes workload to Jenkins slaves.
  167.    - Slaves execute builds, tests, and produce reports on request from master.
  168.  
  169. 42. **What is Jenkinsfile?**
  170.    - Definition of Jenkins pipeline checked into source control.
  171.    - Text file enabling code review, audit trail, and single source of truth for pipeline.
  172.  
  173. 43. **Which of the following commands runs Jenkins from the command line?**
  174.    - A) `java –jar Jenkins.war`
  175.  
  176. 44. **What concepts are key aspects of the Jenkins pipeline?**
  177.    - Pipeline, Node, Step, Stage.
  178.  
  179. 45. **Which file is used to define dependency in Maven?**
  180.    - B) `pom.xml`
  181.  
  182. 46. **Explain the two types of pipelines in Jenkins, along with their syntax.**
  183.    - Scripted Pipeline: Groovy script-based, uses node blocks.
  184.    - Declarative Pipeline: Simple syntax, defines pipeline block.
  185.  
  186. 47. **How do you create a backup and copy files in Jenkins?**
  187.    - Backup JENKINS_HOME directory periodically.
  188.  
  189. 48. **How can you copy Jenkins from one server to another?**
  190.    - Copy corresponding job directory.
  191.    - Clone job directory with different name.
  192.    - Rename existing job directory.
  193.  
  194. 49. **Name three security mechanisms Jenkins uses to authenticate users.**
  195.    - Internal database.
  196.    - Lightweight Directory Access Protocol (LDAP) server.
  197.    - Authentication mechanism of deployed application server.
  198.  
  199. 50. **How is a custom build of a core plugin deployed?**
  200.    - Copy .hpi file to $JENKINS_HOME/plugins.
  201.    - Remove plugin's development directory.
  202.   - Create empty file `<plugin>.hpi.pinned`.
  203.   - Restart Jenkins and use custom build.
  204.  
  205. 51. **How can you temporarily turn off Jenkins security if the administrative users have locked themselves out of the admin console?**
  206.   - Set `<useSecurity>` to false in Config file.
  207.  
  208. 52. **What are the ways in which a build can be scheduled/run in Jenkins?**
  209.   - Source code management commits.
  210.   - After completion of other builds.
  211.   - Scheduled time.
  212.   - Manual build requests.
  213.  
  214. 53. **What are the commands that you can use to restart Jenkins manually?**
  215.   - `Jenkins_url/restart` or `Jenkins_url/safeRestart`.
  216.  
  217. 54. **Explain how you can set up a Jenkins job?**
  218.   - New Job > Build a free-style software project.
  219.   - Configure triggers, steps, SCM, etc.
  220.  
  221. Here are the concise bullet-point answers for the remaining questions:
  222.  
  223. 55. **What are the different Selenium components?**
  224.   - Selenium IDE: Simple framework for prototyping, easy-to-install Firefox plug-in.
  225.   - Selenium Remote Control (RC): Testing framework for coding in any language.
  226.   - Selenium WebDriver: Automates browser activities without relying on JavaScript.
  227.   - Selenium Grid: Runs tests on different nodes using browsers.
  228.  
  229. 56. **What are the different exceptions in Selenium WebDriver?**
  230.   - TimeoutException: Command operation doesn't complete in stipulated time.
  231.    - NoSuchElementException: Element with specific attributes not found.
  232.    - ElementNotVisibleException: Element present in DOM but not visible.
  233.    - SessionNotFoundException: WebDriver performing action after quitting browser.
  234.  
  235. 57. **Can Selenium test an application on an Android browser?**
  236.    - Yes, using an Android driver like Selendroid or Appium for native or web apps.
  237.  
  238. 58. **What are the different test types that Selenium supports?**
  239.    - Functional: Black-box testing based on software specification.
  240.    - Regression: Finds new errors or regressions after code alterations.
  241.    - Load Testing: Monitors response of system under load conditions.
  242.  
  243. 59. **How can you access the text of a web element?**
  244.    - Use `getText()` method of `WebElement` to retrieve text.
  245.  
  246. 60. **How can you handle keyboard and mouse actions using Selenium?**
  247.    - Use advanced user interaction API with methods like `clickAndHold()`, `dragAndDrop()`, etc.
  248.  
  249. 61. **When do we use findElement() and findElements()?**
  250.    - `findElement()`: Finds first element matching locator value.
  251.    - `findElements()`: Finds all elements matching locator value.
  252.  
  253. 62. **What are driver.close() and driver.quit() in WebDriver?**
  254.    - `driver.close()`: Closes current browser window.
  255.    - `driver.quit()`: Closes all browser windows and ends WebDriver session.
  256.  
  257. 63. **How can you submit a form using Selenium?**
  258.    - Use `submit()` method on the WebElement representing the form.
  259.  
  260. 64. **What are the Testing types supported by Selenium?**
  261.    - Functional Testing: Tests software functional points or features.
  262.    - Regression Testing: Retests product after bug fixes.
  263.  
  264. 65. **What is Selenium IDE?**
  265.    - All-in-one Selenium script development environment, available as a Firefox extension.
  266. Here are the concise bullet-point answers for the remaining questions:
  267.  
  268. 66. **What is the difference between Assert and Verify commands in Selenium?**
  269.    - Verify: Determines if a condition is true, does not halt program execution on failure.
  270.    - Assert: Determines if a condition is true, halts program execution on failure.
  271.  
  272. 67. **How to launch Browser using WebDriver?**
  273.    - Use the respective driver instantiation:
  274.      - `WebDriver driver = new InternetExplorerDriver();`
  275.      - `WebDriver driver = new ChromeDriver();`
  276.      - `WebDriver driver = new FirefoxDriver();`
  277.  
  278. 68. **What is the difference between Asset Management and Configuration Management?**
  279.    - Configuration Management:
  280.      - Deals with operational relationships.
  281.      - Manages troubleshooting data.
  282.      - Concerned with deployment to retirement lifecycle.
  283.      - Focuses on operations.
  284.    - Asset Management:
  285.      - Deals with incidental relationships.
  286.      - Manages taxes data.
  287.      - Concerned with purchase to disposal lifecycle.
  288.      - Focuses on finances.
  289.  
  290. 69. **Why are SSL certificates used in Chef?**
  291.    - SSL certificates ensure secure communication between Chef server and clients.
  292.    - Each node has a private-public key pair, with the public key stored at the Chef server.
  293.    - SSL certificates validate the identity of nodes, granting access to required data.
  294.  
  295. 70. **Which of the following commands would you use to stop or disable the 'httpd' service when the system boots?**
  296.    - Correct answer: `# systemctl disable httpd.service`
  297.  
  298. 71. **What is Test Kitchen in Chef?**
  299.    - Test Kitchen is a command-line tool for spinning up instances and testing cookbooks before deploying them on actual nodes.
  300.  
  301. 72. **How does chef-apply differ from chef-client?**
  302.    - `chef-apply`: Applies a specific recipe on the client system.
  303.    - `chef-client`: Applies all cookbooks in the server's run list to the client system.
  304.  
  305. 73. **What is the command to sign the requested certificates?**
  306.   - Puppet version 2.7:
  307.     - `# puppetca –sign hostname-of-agent`
  308.  
  309. 74. **Which open-source or community tools do you use to make Puppet more powerful?**
  310.   - Tracked using Jira for changes, Git and Puppet's code manager app for version control, and Jenkins for continuous integration pipeline.
  311.  
  312. 75. **What are the resources in Puppet?**
  313.    - Basic units of configuration management tool, representing features of a node like software packages or services.
  314.  
  315. 76. **What is a class in Puppet?**
  316.    - Named blocks in Puppet manifests configuring functionalities of a node like services, files, and packages, executed when explicitly invoked.
  317.  
  318.  
  319. 77. **What is an Ansible role?**
  320.    - An Ansible role is an independent block of tasks, variables, files, and templates embedded inside a playbook.
  321.    - Example: A playbook that installs Tomcat on node1.
  322.  
  323. 78. **When should I use '{{ }}'?**
  324.    - Always use `{{}}` for variables, except in conditional statements like "when: …".
  325.    - Using brackets makes it simpler to distinguish between strings and undefined variables.
  326.    - Ensures Ansible doesn't recognize the line as a dictionary declaration.
  327.  
  328. 79. **What is the best way to make content reusable/redistributable?**
  329.   - Three ways to make content reusable/redistributable in Ansible:
  330.     1. Use roles to manage tasks in a playbook, easily shared via Ansible Galaxy.
  331.     2. Use "include" to add a submodule or another file to a playbook for multiple uses.
  332.     3. Use "import" to add a file only once, helpful for recursive runs.
  333.  
  334. 80. **How is Ansible different from Puppet?**
  335.   - Ansible:
  336.     - Easy agentless installation.
  337.     - Based on Python.
  338.     - Configuration files written in YAML.
  339.     - No support for Windows.
  340.   - Puppet:
  341.     - Agent-based installation.
  342.     - Based on Ruby.
  343.     - Configuration files written in DSL.
  344.     - Support for all popular OS's.
  345.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement