Getting Started


How to run SaaS

Getting started

Choose one of the installation options under the Usage section and then you can play with SaaS.

Usage

Creating database via backend as admin:

  • Login to SaaS Portal.
  • Open SaaS >> Plan
  • Select a Plan
  • Click [Log in to template DB]
  • Click on shown link to log in to template database
  • At template database make some adjustments, e.g. install Point Of Sale module
  • Now return back to the Plan and click [Create Client]
  • You got a new database! You can click [Log in] to check it - it must have all adjustments you made in template database.

Creating database via frontend as client:

  • Log out from SaaS Portal (or simply open Incognito window)
  • At SaaS Portal open page /page/start?plan_id=1
  • Choose subdomain name (note that at runbot you can use only names, that starts with the same prefix as Portal, e.g. 05851-10-0-7629a4--base---your-database-name-here
  • Click [Create!]
  • System asks you to log in - click Sign Up instead.
  • After signing up you new database will be created and you will be redirected to New Database.

For further information see SaaS Documentation.

Option 1: Runbot

Click the button below and use admin admin login and password. Note that runbot is a public service and there could be another people who use the system.

Try on Runbot

Option 2: Docker installation

First of all you need to install docker engine.

Install docker engine

Once you have docker engine execute commands below

docker network create odoo-saas

docker run \
-d \
-e POSTGRES_USER=odoo \
-e POSTGRES_PASSWORD=odoo \
--network=odoo-saas \
--name db-saas  \
postgres:9.5

docker run \
-d \
--name odoo \
--network=odoo-saas \
-e ODOO_MASTER_PASS=admin \
-e DB_PORT_5432_TCP_ADDR=db-saas \
-t itprojectsllc/install-odoo:10.0

docker exec \
 -u root \
 -t odoo \
sed -i 's/dbfilter.*/dbfilter = ^%d$/' /mnt/config/odoo-server.conf

docker restart odoo

# before executing this stop nginx or apache if you have one
docker run  \
-d \
-p 80:80 \
--name saas-nginx \
--network=odoo-saas \
-t itprojectsllc/docker-odoo-nginx

INIT_SAAS_TOOLS_VALUE=' \
--portal-create \
--server-create \
--plan-create \
--odoo-script=/mnt/odoo-source/odoo-bin \
--odoo-config=/mnt/config/odoo-server.conf \
--portal-db-name=portal \
--server-db-name=server-1 \
--server-hosts-template={dbname}.{base_saas_domain_1} \
--plan-template-db-name=template-1 \
--plan-clients=demo-%i \
' && docker exec -u root -t odoo /bin/bash \
-c "export INIT_SAAS_TOOLS='$INIT_SAAS_TOOLS_VALUE'; bash /install-odoo-saas.sh"
        

If you made above on your server, then you need to prepare DNS with wildcard, e.g.

*.saas.YOUR-DOMAIN.EXAMPLE.COM -> YOUR_SERVER_IP
        

If you made a local installation on your computer, then update your hosts file by executing command below. It allows to use url portal.saas.example.com


sudo echo && INIT_SAAS_TOOLS_VALUE=' \
--print-local-hosts \
--odoo-script=/mnt/odoo-source/odoo-bin \
--odoo-config=/mnt/config/odoo-server.conf \
--suffix=saas.example.com \
--portal-db-name=portal.{suffix} \
--server-db-name=server-1.{suffix} \
--plan-template-db-name=template-1.{suffix} \
' && sudo bash -c "docker exec -u odoo -t odoo bash -c \"python /mnt/addons/it-projects-llc/odoo-saas-tools/saas.py ${INIT_SAAS_TOOLS_VALUE}\" >> /etc/hosts"


        

Now you have SaaS available. Open corresponding url prefixed with portal, e.g. http://portal.saas.YOUR-DOMAIN.EXAMPLE.COM or http://saas.example.com

Option 3: AWS AMI installation

The option is comming soon...