hackoregon / devops-17

deployment tools for Hack Oregon projects
4 stars 3 forks source link

Enable Docker, Travis, EC2 Container Service for Django API #21

Closed MikeTheCanuck closed 7 years ago

MikeTheCanuck commented 7 years ago

@Zak-Kent messaged me today with the following info/request:

I received an message from Annie in the DevOps class and she let me know that she would be coming over tonight to help out. I wanted to give you a heads up incase she needed any additional information that you can think of.

I asked her to help with a trial run using the Docker image Dan setup for our API.

The Django API stack to be Dockerized and Travis-enabled is here: https://github.com/hackoregon/teamHomelessness/tree/master/homelessAPI

The DevOps pattern we're using as the template for each Hack Oregon project's API layer is here: https://github.com/hackoregon/hacku-devops-2017/wiki/Assignment-7-Deploy-to-ECS

Background

Earlier this month, Zak shared the following as background info:

(We) Started a simple skeleton of a DRF API that can also be found in the team repo. So far the API just points at the AWS DB and we only really need GET requests with minor filtering for our project so there isn't a whole lot going on. I'm planning on having a dev branch where anyone making changes to the code will PR to that and then we can pull into master from there.

That's basically all we have setup so far. I know from here we need to figure out what kind of server to run on the AWS instance to host the API and front end stuff.

I know that you can use gunicorn and nginx together to setup Django stuff on remote servers but I'm not sure how it all works. It would be cool to incorporate some sort of automated build testing like TravisCI, again only know that it is possible but not the specifics of how to make it work.

I also only know of one way to set up the front end of a React project to make API calls and get around CORS issues. In a personal project I set up a simpl express proxy server to make the API calls but I'm not sure if this is the recommended method or the approach we're using at Hack Oregon.

If you have an ideas on the overall structure of setting up the AWS server and automating the process that would be awesome. I'd love to really learn how every piece of the DevOps stuff is working in order to make this setup happen. If you can point me in the right direction with any of this stuff, I can study up on the pieces we'll be using. Any help would be most appreciated

pdxdiver commented 7 years ago

See https://github.com/hackoregon/backend-service-pattern