1: DevOps Prerequisite course Flashcards
What is a LAMP stack application?
Linux, Apache, MySQL, PHP. You can substitute some of those though.. my Nginx instead of apache, or python instead of PHP , for example.
What are the 4 steps of building and pushing an app to prod?
1: Develop -> GIT
2: Build : on build server complies/builds app
3: On test server: test app for bugs
4: move to prod server
What is the point of CI/CD? some common tools?
Helps automate the develop, build, test, deploy. Jenkins, Github actions, Gitlab CI/CD are examples. This can automate the entire process to allow bug fixes and such to happen faster.
What is the benefit of a docker file in the develop, build, test production pipeline?
A developer can configure a docker file to contain all of the application dependencies which ensures the entire pipeline has those dependencies available. “docker build” “docker run”
Kubernetes orchestrates the containers, what handles the underlying servers?
Terraform can configure servers regardless of what cloud platforms they are on. If someone changes a server config, teraform will changed it back! this is IaC. storage, networking, virtual machine, all of it in this code. terraform is used for provisioning infrastructure.
Where does ansbile come into there Kubernetes/terraform stack?
Kubernetes is for the contains. Terraform configures the underlying infrastructure. Ansible is automated tool to configure infrastructure once created. this code is also stored on github
Where does Prometheus/Grafana come into the kubernetes/terraform/ansible stack?
Prometheus collects and visualizes metrics. Grafana will visualize this data.
Linux command: echo $shell
This will show which shell is being used. /bin/bash should be the most common. that is the bash shell.
Linux command: echo Hi
This will write Hi to the screen
Linux command: ls
Used to list files in directory
Linux command: pwd
Used to display current path
Linux operator to run multiple commands on same line?
semi-colon : example: cd /home/my_dir; ls
linux cmd: md
Make directory
What is the linux command to create an entire directory tree for /mydir/mydir1/mydir2/mydir3
mkdir -p /mydir/mydir1/mydir2/mydir3
linux command to remove directory and all if its contents?
rm -r /mp/my_dir
linux command to copy a directory and all contents?
cp -r /temp/mydir1 /temp/mydir2
Linux command : touch myfile.txt
Creates an empty file, or updates the timestamp on an existing file
How do I add some text to a text file in linux?
cat > my_file.txt <enter> some test <control></control></enter>
How do I view a file in linux?
cat file.txt
How do I copy a file in linux?
cp source_file.txt destination_file.txt
How do I move a file in linux?
mv my_file.txt New_location.txt - this is also used to rename a file
How do I remove a file in linux?
rm my_file.txt
VI editor has two modes, what are they and describe
Command Mode: default mode, issue commands like copy and paste line or navigate, but cannot write contents.
Insert Mode: type “i” to enter insert mode to edit. escape key to exit back to command mode
basics VI command mode options:
- arrow keys to move around
- x : to delete a character
-dd : delete a line
-Copy and paste a line : yy then p
-Scroll page: ctrl+U or ctrl+D - :w - does a save file
- :w filename - save a file to a name
- :q = quit
- :qw = save and quit
- FIND : do a /mydata
- N: command to use for find next
linux command: whoami
Tells me my user
linux command: id
tells me current user, userid and groups
How do I change my logged in user?
su OtherUser
How do I SSH into a different system with a different name than currently logged into?
ssh username@host
linux command: curl http://www.site.com/file.txt -O
this will download a file. the -O specifies to save it to file otherwise it would just pipe to screen.
linux command wget http://www.site.com/file.txt -O MyFile.txt
downloads a file using -O to save it and a file after to give it name
Linux command: cat /etc/release
will display details about the OS
What is RPM?
Redhat Package Manager (runs on redhate therefor centos)
what are rpm switch -i -e -q ?
rpm -i telnet.rpm installs a package
rpm -e telnet.rpm removes a package
rpm -q telnet.rpm queries a package