This is a repo demonstrating continuous delivery of a Fast API on AWS (IDS 706 Project 2).
This project demonstrates how to use introductory-level Fast API functions with an already completed API. I modify it slightly by posting an image on the root page, and utilize string formatting to include a variety of user input.
step1.mp4
- create a new respository in GitHub
- create a new C9 environment
- open the IDE
- generate new SSH keys
- clone the repository into the environment
- navigate into the repository and create python virtual environment
- create project scaffolding
step2.mp4
I am using an already completed FastAPI to work off of, which can be found here. It is a horoscope generator that requires a time-frame and zodiac sign as URL inputs.
step3.mp4
See the main.py file.
step4.mp4
See the test_main.py file
- open up AWS EC2
- go to security groups and select your working environment
- edit your inbound rules and select "add rule"
- custom TCP: port range = 8080 and source = 0.0.0.0/0
step5.mp4
- set up a new workflow yourself
- paste in stored text to populate the main.yml file
- start commit
- fix any errors until build has passed
- create a new service from source code repository
- connect to Github and specify which repoository to link
- select python3 runtime
- build command: "pip install -r requirements.txt"
- start command: "python main.py"
- create service name, then create and deploy
Future changes to integrate:
- add custom features such as color, font, images
- integrate into command line tool that can interact with user and prompt user for input