-
-
Notifications
You must be signed in to change notification settings - Fork 961
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
Cloud Based API Instance for Developers #1428
Comments
@noman2002 @kb-0311 I can give this issue a try |
there is file named |
|
@kirtanchandak Please proceed with this. You can use that file, you just need to do some minor changes. But I would suggest please check other solutions like render.com instead of Heroku. |
Hi @noman2002 @kirtanchandak, I have been working on this same issue containerization talawa-api using docker here - #1418 that was merged yesterday and was working on developing a ci/cd pipeline for this exact use case, @kirtanchandak can I work on this issue if you haven't made any significant progress yet? |
One issue per person |
Okay |
This issue did not get any activity in the past 10 days and will be closed in 180 days if no update occurs. Please check if the develop branch has fixed it and report again or close the issue. |
@kirtanchandak Are you still working on this? |
@palisadoes I can work on this if @kirtanchandak is not working on this |
Assigning to@vasujain275. Please work with @noman2002 and @kb-0311 for comments, advice and reviewing the PR |
Hi @noman2002 and @kb-0311, I did some research and found that the MongoDB Atlas free tier is good enough for our use case. I looked into redis free tier at render.com, it has 25 MB of memory with a 50 connection limit and no persistence storage. We can also host our API on render.com but it will be shut down after an inactivity of 5 minutes and will be restarted when called again. Will that render.com's inactivity delay or redis free tier will be a problem? |
|
@kb-0311 We can use the AWS free tier, which will have a t2.micro ec2 instance free for 12 months per account ( we will need a credit card to avail this 12-month free tier ). We can use the docker file and docker-compose file I created in a recent issue, we can set a ci/cd pipeline to push our image to the docker hub on each push and then pull to e2c using GitHub actions. We can then run docker-compose on e2c also using GitHub ci/cd that can run containers of both redis and MongoDB, although I think it will be best to run MongoDB on Atlas as it has a good free tier and will reduce the load on our t2.micro ec2 instance if we run it on atlas. We can also use azure/gcp, they also have this exact free tier of 12 months that requires a credit card on signup. |
@vasujain275 Ideally we also want:
Other:
|
Q. How can github actions do all the changes in our aws instance? My proposed solution -
@noman2002 @kb-0311 , appreciate your feedback on possible improvements in this approach |
|
|
@kb-0311 |
|
@palisadoes Okay I will keep that in mind |
@vasujain275 @SiddheshKukade The server has been upgraded to this: Please coordinate on getting this to work. Remember we want this to be completely automated:
I'm hoping that this will be sufficient as an initial security measure. Additionally:
When it is all working we'll need the posix shell for the talawa-* users to be |
The DNS entries to use are:
They are the same server, but the separate DNS entries should help us in future if we want to host them on separate machines. |
@SiddheshKukade The API didn't survive the machine reboot when it was upgraded. |
Team, You can use these files for guidance in setting up Admin and the API as linux daemons. They are from our switchmap repo and work correctly. This will allow you to control the apps using the You can use this file as an configuration example for setting up an Apache reverse proxy. You can use this file as an configuration example for setting up an Nginx reverse proxy. You'll have to adjust them accordingly. Unless you can find a way to reduce the Docker resource utilization we'll need to run the apps natively. |
@palisadoes Let me and @SiddheshKukade discuss the potential solution on meet and get back to you. @SiddheshKukade Can you contact me on slack/mail to setup a meet on a suitable timing this weekend. |
I've created two issues that hopefully will help with the long term solution System Daemon
Docker Performance |
The Docker performance is extremely poor due to issues with our build process. This was the root cause earlier when we encountered a block, and it still is. We need to prioritize fixing the build process first. To address this, we require someone with good GraphQL experience to resolve the build process issues. Once that is done, we can easily deploy the API admin on the same VPS using Docker alone. This approach will be highly efficient. With Docker and Caddy (as the reverse proxy), there will be no need to create a systemd files too. |
@vasujain275 Please create an issue detailing what is required. Hopefully we can find someone who will be willing to dedicate the time. In the issue, please state that we need an experienced person with a long and active GitHub history. |
@SiddheshKukade We still need a running API instance. Have you managed to do more testing of your approach? I'd like the community to start using it before the end of the year |
@palisadoes Okay let me create an issue with error logs and requirements |
This issue did not get any activity in the past 10 days and will be closed in 180 days if no update occurs. Please check if the develop branch has fixed it and report again or close the issue. |
Do you suggest any changes or should I proceed with this? |
Based on this, do we need to differentiate between prod and dev environments? The poor performance of the dev environment for the API is a real cause of hardship. I'd prefer a great user experience for both end users and developers alike. Maintaining two environments as an open source project with limited resources doesn't seem feasible to me. Is this a practical solution? Do you see any potential downsides to this approach, and if so do they outweigh the benefits in your opinion? I welcome comments from others |
We don't need two different environments for talawa api, the production one will be sufficient to handle both requests from talawa admin/app and developers. Do we also need Apollo Graphql Playground Hosted on the VPS? Because it will be resource intensive as it requires self hosting a standalone apollo server. Currently the prod build disables the Apollo playground i.e. |
The production environment should be enough. Although having a development instance would be nice since we can then implement CD pipelines which would make deployment more easier. But due to limited resources, the best course of action would be to just have the prod instance. The current PR workflow should be sufficient to handle most cases. Occasionally, any errors can be addressed when the main branch is merged with the develop branch, if necessary. |
|
@palisadoes There is no need to remove dev docker files, developers can use that on their local machines for local development. We will use production docker files in cloud instance anyway. |
Thanks |
Here is the issue |
I will in the meantime update the cloud instance scripts, production docker files and test them on |
This will be an interesting issue. Get ready for the migration! |
Should I wait for this postgres migration to complete first? Or are we planning to go with mongodb for now? |
|
Okay, I will wait for the merge then modify the docker files and scripts for postgres only. |
|
We need to have a cloud based API instance for developers to test against. It must:
Please coordinate these efforts with @noman2002 and @kb-0311. Ask to be assigned this task by them.
The text was updated successfully, but these errors were encountered: