part5(day at work) Flashcards

1
Q

In ansible playbook, there is a section which could fail on certain nodes, But we don’t want the playbook to stop because of this. How do we solve this problem ?

A
  • To prevent an Ansible playbook from stopping when a task fails on certain nodes, use the ignore_errors: yes directive in the task where failure is expected.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How do you make changes to a git repository ?

A
  • understand why a change is needed
  • clone the repo
  • create a new branch
  • check history of the previous commits ( use blame tab on GitHub or git log on cli)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

create a linux script that will push certain logs to S3 automatically, this script should run at a particular time.

A
  • first we need to configure either an IAM role or access and secret keys to access the linux machine depending on what is needed.
  • Then write a bash script (starting with #)
  • define the path where the logs are located eg /var/log/*
  • add aws cli commands (aws cp <origin s3 location
  • configure a cronjob to run this script at a particular time.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

what is a package in python ?

A

In Python, a package is a way of organizing and structuring related modules (Python files) into a single directory hierarchy. It allows you to group related code, making it easier to manage and reuse

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Tell me about yourself and your day to day task as a DevOps engineer.

A
  • As a DevOps engineer i work in collaboration with multiple other engineers ie developers, SRE, testing, sales. database, network etc
  • 09:00 -10:00 check slack handles and update jira
  • 10:00-10:30 : daily stand up to update the team on what i did the previous day and what i will do that day.
    10:30 - 13:00 : work on jira ticket
    13:00: 14:00 : lunch
    14:00-16:00; work with developers to see if they need any elevated access to certain environments
  • 16:00-17:00 : learning new skills that can add value to the team and myself.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

is it possible to deploy pods on specific nodes ?

A

Yes, it is possible to deploy pods on specific nodes in Kubernetes using node selection mechanisms
- node selector : based on key-value labels.
- Node Affinity is a more advanced and flexible way to target specific nodes. It allows you to use expressions and specify soft or hard constraints.
- Taints on nodes and tolerations on pods allow you to repel pods from certain nodes unless the pod explicitly tolerates the taint
- node name: You can directly specify the node name where the pod should run

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

what is the difference between a webserver and an application server ?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

what is the difference between a web server and an application server ?

A

A web server delivers the stuff you see on a website, like text, images, and styles. It handles requests for basic things (like “show this page”).

An application server does the “thinking” behind the scenes. It runs the logic to process user actions, fetch data from databases, and create the dynamic content you see on the website.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How can we handle secrets in ansible?like username and password if a playbook needs to login to an on premise server ?

A
  • make use of ansible vault to encrypt and decrypt information when needed.
  • ansible-vault create
  • ansible-vault encrypt [filename]
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

what is blue green deployment ?

A

Blue-green deployment is a strategy for releasing software with minimal downtime and risk. It involves maintaining two environments—one (blue) running the current version of the application and the other (green) for the new version

How well did you know this?
1
Not at all
2
3
4
5
Perfectly