nickjj / build-a-saas-app-with-flask

Learn how to build a production ready web app with Flask and Docker.
https://buildasaasappwithflask.com
MIT License
954 stars 185 forks source link

Several questions for solution evaluation #27

Closed PhantomYdn closed 9 years ago

PhantomYdn commented 9 years ago

Hello,

We've just started looking for ways to provide our solution (Orienteer) as a service. Your project looks great and seems to be exactly what we needed in! But there are several questions:

1) What is the status of this project? Is it recommended for production or not yet? 2) Are there any projects which use this solution? Could you please share some links? 3) Does solution support plans which based on different Docker images? 4) Does solution support plans which based on different limitations (RAM, SSD)? 5) Can solution automatically buy additional hosts in digital ocean if required? 6) Does solution provide API for automatic provisioning and activation of a service? 7) Does solution support smooth switch of a plan? 8) Does solution support automatic assignment of DNS per deployed app?

Thanks for your great project!

nickjj commented 9 years ago

Hi, thanks for showing interest in the project.

1) At this point I'd say it's production ready.

2) Yes, but I don't feel comfortable linking my client's sites here. I am using a modified version of this code base to run https://buildasaaswithflask.com/ , which is a site that sells and securely distributes screencasts that teaches you about this code base.

In the above link's case, it's using 1 time payments instead of monthly recurring subscriptions and given the current base of this project, that only took a few hours to implement and test.

3) I'm not sure what you mean here, but every service is its own Docker image. This allows you to easily scale and move running containers around.

4) You can comfortably run everything on 1 server with a single $10/month Digital Ocean droplet. You will have a few hundred mbs of RAM left over to cache your important data and have breathing room.

5) The deploy aspects of everything can be found in this book https://leanpub.com/deploy-web-apps-with-docker, it does not cover multi-instance scaling but there are a number of easy to use command line tools to create a new droplet or you can just use Digital Ocean's website's UI when needed because really, you pick 3 things and click a button and 30 seconds later you have a new droplet. You can also easily add more CPU/RAM/disk to a droplet (~20-30 seconds).

You're also not locked into using Digital Ocean, nothing is specific to that platform. If you really need auto-scaling you could just move to Amazon.

6) No, that goes well beyond the material I plan to cover because to make something like this generic is a pretty huge undertaking but you could build on other open source technologies like kubernetes, mesos or openshift v3 and adapt them to your company's needs.

7) If you're talking about users picking new plans in the app contained in this source code, then yes. After you've signed up with an initial plan you only need to click 1 button to change plans and the user's billing gets pro-rated automatically. They don't even have to put in their billing info again to change.

8) The deploy example is based on using 1 host. Docker itself handles DNS in situations like this for container to container communication. Also host to container is easy too because it's just localhost.

I hope that answers your questions. The main website that sells the screencasts will get a new video posted today or tomorrow that will demo most of the capabilities of the application.

PhantomYdn commented 9 years ago

5) In our case, every client's instance require 256Mb as minimum. So new droplets should be automatically added if that's required for a new client.

if every plan is a different image: that's rather marketplace of different products than "different" plans... Do you support set of "features" for a plan? For example: I want plan A, but I need 30Gb, so I will pay +$20 per month. Is this possible?

And one more question: does solution support upgrade of a client's container by new product version? Can that be done in a safe mode: let say - try to rollout new image with the same "docker" images and if something wrong - just keep old version for a client?

You did a great work: we will definetly buy your product - at least for materials. Am I right, that they will be helpfull even for a case if we will decide to build our own SaaS platform?

nickjj commented 9 years ago

I think there might be a little confusion going on here. This project isn't offering a hosted solution for you to scale your infrastructure.

When I talk about "plan", I mean in the application code, the customer can freely pick and change plans which would affect what privileges they have in the application. This project gives you the ability to manage those plans, but it's on you to define the privileges since every app is different.

I put up a demo video last night, this walks you through what this project provides you: https://buildasaaswithflask.com/demo

Then for deploying it, you could follow along with this book: https://leanpub.com/deploy-web-apps-with-docker

If you wanted to go 1 step further you could create your own custom work flow based on the book. The book is meant to get you going in a very reasonable way, but if your business revolves around automatically provisioning machines then it would be a good idea to create something more fancy.

As for Digital Ocean's plans (the hosting provider), you can find them here: https://www.digitalocean.com/pricing/

They are pretty flexible with the build choices, dozens of operating systems to choose from, easy to change the requirements, etc..

Am I right, that they will be helpfull even for a case if we will decide to build our own SaaS platform?

Yeah, this is pretty much the entire goal of the project. To give you a solid base to build your own platform on top of it. It will save you a ton of hours of development time.

PhantomYdn commented 9 years ago

I see now. Yea - word SaaS confused me a lot: I thought that solution will help organize provisioning and selling of a software as a Service. So once customer select a plan: proper docker image will be automatically deployed and so on...

Question regarding your book: am I right that if I buy it I will receive also updates for the book? I saw that you are working on the book quite closely.

nickjj commented 9 years ago

Yes, you are correct. Once you purchase the book you will be able to download free updates for life in any format that's supported.

nickjj commented 9 years ago

Going to close this for now. If you have any other questions, please open a new issue.