-
-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resources API #68
Comments
I'd like to use this as a way for me to learn to add new projects to the current k8s infrastructure, and maybe as a test for circle CI. Are there any environment variables that need to be used? |
The environment variables are contained in the .env file. The following need to be changed for production:
The database URL will need to change to the actual db url. The usernames and passwords will need to be changed to actual usernames and passwords.
The above list all the secrets used in the app.
The API should talk directly to the OC backend for authentication purposes.
Currently, the app is self-sufficient but once we get OperationCode/resources_api#83 fixed, there will be external calls to various URLs to verify the resources.
We need to allow requests from anywhere, the app provides its own authentication for routes that require it.
A staging environment is a nice-to-have but not a hard requirement at this point.
If we do get a staging environment, we should certainly keep the database separate from prod.
The
I'm partial to
There is a logger that creates log files in
No current strategy, but this sounds like a good idea. Please advise on what we would need to add to the application to accomplish this.
I'm not sure I understand this question |
I'd also ask questions around impacts of downtime, what's in the database, does the database need to be backed up, what happens if it's down, etc. Does your application have a health check endpoint? |
I'm not really sure on the impacts of downtime, no one is using it for anything yet. But if it was down and someone was trying to get learning resources, they wouldn't be able to which would potentially increase churn of OC members (supposing that they join looking for learning resources, they try to use our tools to get them and then they find out that they can't so they just leave OC altogether). The database contains thousands of resources for learning about Programming, Cybersecurity, resources for Veterans and Minorities, as well as Career Advice and a variety of other topics relevant to OC members. They are organized by category and (where relevant) programming language. The database should certainly be backed up. Right now, we have a YAML file to seed the database with the current resources, but the idea is to stop updating the YAML file when the database goes live. Therefore, we need to back it up so we don't lose new resources (or changes to existing resources) if it goes down and needs to be blown away for any reason. The application does not currently have a health check endpoint, but we can easily add one. Just say the word and I'll open an issue and start working on the PR. |
Oh, I may have misunderstood the "impacts of downtime" question. If the question is "Can you use the API at all if the DB is down?" the answer is "no". Every operation is a CRUD operation of some sort on the database. If the DB is down, the code is useless. |
@aaron-suarez, @wimo7083 and I had some conversations in Slack, I'll try to capture them here for posterity, in no particular order:
|
The purpose of this issue is to request that the Resources API be deployed on the Operation Code infrastructure.
Description
The Resources API provides access to a database of learning resources for Operation Code members to benefit from. There is an API to get resources based on category, programming language, etc. Authenticated members can create or update resources.
Where it lives
https://github.com/OperationCode/resources_api
Dependencies
Docker pulls in required dependencies such as
pip
and related packages and those specific dependencies can be viewed in the requirements.txtRequirements
There is a setup script which can be run using
make setup
that will populate the database with the seed data found in resources.yml. The Flask app itself can be run using the commandmake run
.The text was updated successfully, but these errors were encountered: