This question has been flagged
5 Replies
16086 Views

I want to convert my odoo instance as a SaaS.

What all i need to do for that !!
Thanks....

Avatar
Discard
Best Answer

Hi Pawan,

Provide us with some more information please! Do you literally want to sell Odoo instances just like Odoo does?

Have you also thought about the technical side of the story? Creating a SaaS solution isn't too easy and you will need to think about a lot. For example: DNS, firewall, port forwarding, updating Odoo's, support, ability for the customer(s) to add custom code?, port forwarding, HTTPS, security, db filters,....

I hope this gives you some sort of insight and answers your questions. If you want to discuss this further or have more questions just reply on this and I'll try to answer them as best as I can.

Update 10/10

i've decided to shed some more light on to this so I will try to go in to more details here. I will probably forget about a lot and the order might be incorrect but these are just some global pointers.
One of the first things, and most important, is to choose how you want to manage all those Odoo's. There are quite some possibilities to manage and create a SaaS platform. Do you want to have one Odoo environment with hundreds or thousands of databases or do you wish to give every customer/trial a separated Odoo? Do you want to use virtualised environments or a dedicated server? Do you want to work with Dockers or without them? This has some crucial effects: when you create one Odoo you can easily separate all databases with a database filter and Nginx for example but all of your Odoo's will see the access to all the addons for this Odoo. 
This would mean that if you have customer X and he has a custom built module that customer Y could also see it (provided he has technical rights and access ofcourse). When you create a new Odoo installation / environment for every customer everything is fully seperated. This can have quite some advantages such as everything being separated and that you can having multiple Odoo instances on multiple ports. The downside: your server will need a lot more storage since every new Odoo will take storage.

Another 'problem' is your database level with the default setup. When having the default setup you will not be able to create two databases with the same name since they belong to the same scheme. This may seem very innocent and barely annoying but you will have to think about it! You will need to make sure database names are unique, there have to be checks that the database is succesfully created,... especially if you give the user the choise to choose a database name. (which I would not advice)
Another thing to worry about with a SaaS environment is workload / balancing and the fact that you might get DDOS attacks. So you will have to atleast setup an Nginx proxy etcetera to prevent the Odoo's from being DDOS'ed and going down. It might not seem like a lot of work but you'll need to do this for all your environments and its a crucial step.

When you eventually have decided how to manage and create databases the next step is how far do you want to pre-configure? Do you want to automatically install languages and/or modules? You'll need to script Python functions that trigger the correct flows to install modules in this case. 

A SaaS also has to keep track of payments, how long the environment should be available, automated reminder e-mails, ... so you'll also need to look in to payment methods and managing the environments. The key here is automation don't even start thinking about doing all these things manual. When your SaaS grows and becomes a succes you will soon get in to troubles since you can't manage everything.

Another important thing to think about is the back-up and fail-over system. What will you do when your server crashes or something horrible goes wrong? Will you have a fail-over system that automatically moves all your customers another server without them going down? How will you take back-ups and where will you write them too? In my opinion this is an important part, both for you and your customer. You will need frequent back-ups to restore an environment when something goes wrong and the customer doesn't want to lose data either. So you'd have to setup a remote server for your back-ups and also for fail-over in case your Odoo server goes down.

I know I haven't outlined a whole lot by now but this topic is sooooo broad that it is hard to write everything out. Just ask things if you want to know them.

Yenthe

Avatar
Discard
Author

Thanks yenthe
i am not having enough idea about this stuff, that's why i kept my question as simple
actually, i want to have something like providing users with a trial instance(lets take for 1 month) and as that time expires, it should ask for subscription (user pays amount and can continue using)
but if user doesn't pays under extended time period also, then that instance should be destroyed automatically........
i think for this we have to create a new db automatically when user signup... and delete that if time exceed. but not fully clear about technical aspects of it.
Hope u understood my requirement...

@Pawan yes I understand what you mean. Its not very easy to build though. You will need to somehow detect when a trial is started, make planners that keep track of all customer db's and drop/create databases through scripts. (perhaps shell scripting could be a nice one for this). But there is more to think about: will you be creating empty databases? How will you handle users, languages, configurations, seperating databases, URL requests to the databases, ...? Just saying, there is a lot more to it :)

Author

yehthe, blank database in the sense we can populate the mandatory data as odoo does while creating db from "Database/manager".
but really, i would be thankful, if u have some time and patience to explain me regarding this and the other possibilities that can be opted for it..

@Pawan I'm really to busy at the office the next 2 days or so but I will get back to this soon. I'll try to heavily expand this in the weekend.

Author

Thanks yenthe... :)

@Pawan I've extended it for a good part. Hope this helps you a bit further! Don't forget to upvote/accept an answer if it helps you. :)

Author

yenthe, it was really helpful n already gave +1 for that too, but would like to have more info on that... so not marking as an answer for now!! hope u will not mind... :)

Best Answer

You could take a look at this:

https://github.com/yelizariev/odoo-saas-tools

It contains modules for do the work

Avatar
Discard
Author

Thanks Axel, i will go through it...

Also you need to get Yenthe advices about it. It's not easy as install a couple of modules

I'd like to add an extra handy link about this here: https://github.com/clouder-community/clouder this is a in Odoo developed system to launch Odoo containers etc. Its not everything but could be one walking path.