Skip to content

Latest commit

 

History

History
172 lines (119 loc) · 3.5 KB

README.md

File metadata and controls

172 lines (119 loc) · 3.5 KB

© The Chancellor, Masters and Scholars of The University of Oxford. All rights reserved.

Explore different providers

This course is available for multiple cloud providers. Choose your preferred platform:

Note: Entries marked with "Coming Soon" are planned versions that are currently under development.

Instructions

Step 1. Fork (or make a copy of) this repository

Step 2. Go to the Microsoft Azure front page and type "App Services" in the search bar

Step 2


Step 3. Go to Create -> Web App

Step 3


Step 4. Create a new resource group for your application

Step 4


Step 5. Choose an instance name. Select Python, Linux, and a region (UK South)

Step 5


Step 6. Go to Deployment, set "Continuous Deployment" to "Enable" and select your repository

Step 6


Step 7. Internet access should already be enabled. Keep it on.

Step 7


Create the app and wait for deployment. Voilà! Access the URL.

Voilà


Going further

Modifying the code

You can commit some changes to your repository and watch how the service is updated automatically.


Cleaning up

The simplest way to delete all the resources you just created is to type "Resource Groups" in the search bar and delete the group that you created earlier.

Deleting a service


Adding an API endpoint

Add the following code in app.py
@app.route("/hello_api")
def hello_api():
    return {
		"name": "Wrinkle Five Star",
		"species": "Duck",
		"breed": "American Pekin",
		"hatching_date": "2020-09-09",
		"sex": "Male"
    }

Then test your endpoint

API endpoint


User interface

... Missing content

Database writing/reading

Go to the Azure Console and type "SQL" in the search bar Missing content

Storage bucket writing/reading

Go to the Azure Console and type "Storage accounts" in the search bar Missing content

Local testing

After a while, it's not fun anymore to wait for deployment. You want to test your changes before.

Step 1. Install git and clone the repository on your local machine
	git clone {repository_link}

Step 2. Install Python
https://www.python.org/downloads/

Step 3. Install dependencies
	 py -m pip install flask

Step 4. Run flask
	 py -m flask run

Open localhost:5000 in your browser.


Local testing