Getting Started

In this chapter, we’ll see a step by step guide to install a ready-to-use infrastructure. For the example, the base we will create will be another Clouder.

Odoo installation

This guide will not cover the Odoo installation in itself, we suggest you read the installation documentation on the official website. You can also, and it’s probably the easier way, use an Odoo Docker image like https://hub.docker.com/_/odoo/ or https://hub.docker.com/r/tecnativa/odoo-base/ Due to the extensive use of ssh, Clouder is only compatible with Linux.

Once your Odoo installation is ready, install the paramiko, erppeek and apache-libcloud python libraries (pip install paramiko erppeek apache-libcloud), download the OCA/Connector module on Github and the Clouder modules on Github and add them in your addons directory, then install the clouder module and clouder_template_odoo (this module will install a lot of template dependencies, like postgres, postfix etc...).

_images/gettingstarted-moduleslist.png

Clouder configuration

The first thing to do is to set the sysadmin email in the Clouder configuration.

_images/gettingstarted-configuration.png

You can also configure here how Clouder will deploy the container. You can either use Docker Engine (for single node) or Docker Swarm mode (for multiple node), see Configuration for more information about the settings and actions available in configuration page.

Then you have to create a new Environment. An environment shall be seen as a project, this is the object where access right are based upon. All services/bases are linked to an environment, you’ll usually create one for each customers.

So first we’ll create the main environment, which will deploy all the core services.

_images/gettingstarted-environment.png

You’ll also need to create a Domain. The first base you’ll deploy will be accessible under this domain.

_images/gettingstarted-domain.png

Finally you have to configure the node you want to connect. See how to connect a node for more explanation.

_images/gettingstarted-server.png

In the node form, click on Test Connection to check there is no problem. Also make sure your node is configured as the DNS nameserver of your domain.

If everything is ok, select the Odoo oneclick, assign the critical port and click on deploy to launch the oneclick deploy. This will deploy all on your node all the services you need for your infrastructure, with an example of Odoo service with his database.

Keep an eye on your Odoo logs because you’ll see all executed command there, and see if something wrong happen. You can also afterward check the log in the node record to see them.

_images/gettingstarted-server-log.png

Theses logs can be seen on all objects in Clouder, and are generated each time an action is perform. They are the best way for you to understand how each action work, and see if something wrong happened.

Services deployed by the oneclick

The oneclick will deploy 5 root services.

_images/gettingstarted-services.png
  • The backup service, which will store your backup. Of course, we suggest you move this service on another node once in production.
  • The DNS service, which will resolve the DNS record of your infrastructure. You can either use a bind container on your node for this (deployed by the oneclick), or a cloud provider <http://libcloud.readthedocs.io/en/latest/dns/supported_providers.html>_.
  • The mail service, which will redirect outgoing and incoming emails from your containers.
  • The proxy service, which will redirect incoming http request to the correct service. It also take care of https encryption and LetsEncrypt cert generation.
  • The Odoo/Clouder service, which will deploy the Postgres database and the Odoo service. The example base deploy by the oneclick will be linked to this service.

Services has a notion of parent/child, when a root service is deploy it will also deploy all child services. You can see them by removing the root filter.

_images/gettingstarted-services-with-children.png

Only children on the lowest level are containers actually deployed on your node.

Usually a service can contain theses containers/childs :

  • A Data container, which only represent the volume created for this service. Removing this container means destroying the data.
  • A Files container, which represent the version of the application you want to deploy. For example for Odoo, this container will contain the files downloaded from Github, of Odoo but also community module you specified. Replace this container with another one when you want to update you service.
  • An Exec container, which contain the binary executed by this service. The proxy services usually redirect to the http port of this container. This container shall contain no data, it is linked to Data and Files containers, hence you can destroy and rebuilt it at will.
  • A SSH container, linked to others containers it allow you to give an SSH access to files to your customers, without having to give them access to the node itself.

Note that you can have several layer of services. For example, the root Odoo services contain PostgreSQL and Odoo children, which themselves have Data/Files/Exec/SSH children.

Finally, once all services are deployed, the oneclick will also deploy an example base.

_images/gettingstarted-base.png

This will create a new database on your Odoo service, and will configure it with the credentials and with the modules specified in application (here the clouder module).

It will also configure the links to DNS/Proxy/Mail and generate LetsEncrypt certificate. After the deployment, you shall be able to access your example Odoo instance on the url clouder9.mydomain.com.

Congratulations! You can now easily create another base or deploy any other application you can find in the clouder_template_* modules, or even create your own images and applications.