Heroku Flashcards

1
Q

What is the basic instance/container used in Heroku?

A

Dyno

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

All dynos are ___ instances

A

Amazon EC2

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

What are the 2 types of workers?

A

Web, worker

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

What is heroku good for?

A

Small scale web development

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

What are the pros of using heroku?

A
  • Plug & play applications
  • Full Git integration
  • Docker integration
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are web processes dynos responsible for?

A

Serving the web app to the end client

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

What are worker processes dynos responsible for?

A

Non-web related work

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

What files are required to make a web app with Heroku?

A
  • Procfile
  • requirements.txt
  • runtime.txt
  • webapp.py
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What does the runtime.txt file specify?

A

The language/runtime to use

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

What does the requirements.txt file specify?

A

Specifies modules/libraries to install in the environment

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

What does the Procfile specify?

A

Contains the command(s) we want to run when our application is deployed

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

What does the webapp.py file specify?

A

Web application code

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

What are the commands for deploying with Git?

A

git init
git add .
heroku create
git push heroku master

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

What do we need to use to have a persistent database?

A

PostgreSQL

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

How do we need to adjust our files to include PostgreSQL

A

requirements. txt: psycopg2

webapp. py: import psycopg2

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

What is the command for scaling workers?

A

heroku ps:scale worker=1

17
Q

What are clock dynos responsible for?

A

Schedule tasks at intervals, or at period times

18
Q

How do we need to adjust our files to include clocks?

A

Procfile: clock: python scheduledjob.py
requirements.txt: apscheduler
txlocal<3.0

19
Q

What is apscheduler responsible for?

A

Calls a function on a specified time interval using a blocking scheduling system

20
Q

What is the command for scaling clocks?

A

heroku ps:scale clock=1

21
Q

What does environ[‘PATH_INFO’] return?

A

A string representing the path requested by the client

22
Q

What does environ[‘REMOTE_ADDR’] return?

A

Gets the client’s IP address

23
Q

What does environ[‘QUERY_STRING’] return?

A

GET query string sent by the client