DevOps hacks
This is the blog for the devops hacks
import getpass, sys
# method to display question and get user's answers
def question_with_response(prompt, qCount):
print("Question " + str(qCount) + " : " + prompt)
msg = input()
return msg
# dictionary to hold questions and answers as key : value pairs
questionsDict = {"What does Domain Name Server represent?": "DNS",
"What does this Represent: Amazon Web Services, which is a cloud computing platform provided by Amazon.": "AWS",
"What is the first Step to setting up an AWS Server? 1: Connecting to a Ubuntu EC2 Instance, 2: Start updating the system, 3: Clone the repository which one wishes to deploy, 4: Run the command: main.py to start the project": "1",
"What is the third Step to setting up an AWS Server? 1: Connecting to a Ubuntu EC2 Instance, 2: Start updating the system, 3: Clone the repository which one wishes to deploy, 4: Run the command: main.py to start the project": "3",
"What is the fourth Step to setting up an AWS Server? 1: Connecting to a Ubuntu EC2 Instance, 2: Start updating the system, 3: Clone the repository which one wishes to deploy, 4: Run the command: main.py to start the project": ".4",
"What is the second Step to setting up an AWS Server? 1: Connecting to a Ubuntu EC2 Instance, 2: Start updating the system, 3: Clone the repository which one wishes to deploy, 4: Run the command: main.py to start the project": "2",
"What files are you supposed to edit after finishing the first steps of setting up the server and cloning it within the AWS Server? 1: Edit the docker files and docker.yml, 2: Edit the main.py file to change the characteristcs.": "1",
"What is the first step to setting up a DuckDNS Server? 1: Sign in with your DuckDNS account using Github, 2: Configure current ip to the IP address that you want to access and click update ip button , 3: Create the subdomain, 4: Access site by typing in subdomain.duckdns.org": "1",
"What is the second step to setting up a DuckDNS Server? 1: Sign in with your DuckDNS account using Github, 2: Configure current ip to the IP address that you want to access and click update ip button , 3: Create the subdomain, 4: Access site by typing in subdomain.duckdns.org": "3",
"What is the third step to setting up a DuckDNS Server? 1: Sign in with your DuckDNS account using Github, 2: Configure current ip to the IP address that you want to access and click update ip button , 3: Create the subdomain, 4: Access site by typing in subdomain.duckdns.org": "2",
"What is the fourth step to setting up a DuckDNS Server? 1: Sign in with your DuckDNS account using Github, 2: Configure current ip to the IP address that you want to access and click update ip button , 3: Create the subdomain, 4: Access site by typing in subdomain.duckdns.org": "4"
}
# number of questions as length of the dictionary
questions = len(questionsDict)
# set correct to 0
correct = 0
print('Hello, ' + getpass.getuser() + " running " + sys.executable)
print("You will be asked " + str(questions) + " questions.")
print("Are you ready to take a test! Press Enter key to begin. Best of luck :)")
input()
questionCount = 0
# iterate over list of keys from the dictionary. pass dictionary key as question to the question_with_response function
for key in questionsDict:
questionCount += 1
rsp = question_with_response(key, questionCount)
# compare the value from the dictionary to the user's input
if rsp.lower() == questionsDict[key].lower():
print(rsp + " is correct! Good Job!")
correct += 1
else:
print(rsp + " is incorrect! Better Luck next time.")
# print final score
print(getpass.getuser() + " you scored " + str(correct) +"/" + str(questions))
# calculate percentage
page = correct/questions * 100
# print percentage
print("Total Percentage: " + str (format(page,".2f")) + "%")
FRQ
Complete the answers in your own words
Question 1:How does AWS Work?
- AWS uses cloud computing to allow the user to connect to a remote server and use it as if it were their own computer. This allows the user to run programs and store data on the server. The user can also access the server from anywhere with an internet connection. This is useful for projects because it allows the user to run programs that require a lot of processing power without having to buy a powerful computer. It also allows the user to store large amounts of data without having to buy a large hard drive.
Question 2: How is AWS useful for projects?
- AWS is useful for projects because it allows the user to run programs that require a lot of processing power without having to buy a powerful computer. It also allows the user to store large amounts of data without having to buy a large hard drive.
Question 3: How does Duck DNS Work?
- Duck DNS is a service that allows the user to create a domain name for their server. This allows the user to access their server from anywhere with an internet connection.
Question 4: How is Duck DNS useful for projects?
- This is useful for projects because it allows the user to access their server from anywhere with an internet connection.
FRQ Question Hacks 2 (Answer with more than 2-3 full complete sentneces):
Are there any outdated Nginx/Docker functionalities to address?
- I don't really see any. There weren't any shown in the lesson also.
Is there anything unclear that we need to communicate further to the students for deployment?
- bro, your deployment guide is so complicated. Try and simplify it a bit. It's really good for a step-by-step comprehensive guide, but I don't think that we would need that, especially after so much practice with deployment.
Diagram
To Truly understand Nginx and why we are using it, it is important to compare it to other web servers? Compare NGINX with lighttpd in a Venn Diagram, and place the image below:
Quiz:
- Which of the following is not an AWS database option?
A. Amazon RDS
B. Amazon Neptune
**C. SQLite**
D. Amazon DynamoDB
Which of the following is a file-based, lightweight RDBMS?
A. Amazon RDS
B. Amazon Neptune
C Amazon DynamoDB
D. SQLite
Which AWS service enables you to store and query highly connected datasets?
A. Amazon Relational Database Service (RDS)
B. Amazon DynamoDB
C. Amazon Neptune
D. Amazon DocumentDB
DNS HACKS 2 - Write a reflection
Why do we use DNS?
- We use DNS to connect our domain name to our IP address. This allows us to access our server from anywhere with an internet connection.
How does Duck DNS work?
- it assisn a domain name to a dynamic IP address. This allows us to access our server from anywhere with an internet connection.
What makes Duck DNS unique?
- It is free and easy to use.
How is Duck DNS useful for our projects?
- it is easy to set up and you dont need complicated hardware/software
What are the steps to set up Duck DNS?
- Create an account
- Create a domain name
- Change the added domain names ip address to the ip address of your server