In this article, I will show how easy it is to set up Odoo for a single computer, and how easy it is to then scale it up when the business grows.

You can find the full example on GitHub.

Odoo is an all-in-one business management software

When starting a business, I learned that I am responsible for managing all aspects of business including accounting, sales, customer retention, projects, and more. To meet these needs, an intuitive practice is to keep records on paper. Though paper-based methods are simple, familiar, and inexpensive, they are more time-consuming and error-prone than computer-based methods of business management.

Computer-based methods can be adopted as easy as signing up for Google Sheets and creating some spreadsheets to manage business operations. However, as businesses grow, their process and data needs become more complex, and spreadsheets become increasingly difficult to maintain. This is where something like Odoo can be more effective.

Odoo is an all-in-one business management software that offers a suite of integrated applications for business processes such as accounting, sales, CRM, inventory management, project management, etc. It is an open-source software that can be customized to fit specific business needs.

Moreover, Odoo is scalable and easy to use. It is designed to scale up as businesses expand. Its user-friendly and automation-friendly interfaces make it ideal for businesses with limited IT resources.

Next, I will show how easy it is to set up Odoo for a single computer, and how easy it is to scale it up when the business grows.

How to set up Odoo for a single computer

To get started, download the example code and open it in a container with Visual Studio Code. Make sure Kubernetes is enabled in Docker.

Before provisioning Odoo, you may want to customize some configurations to fit your situation. For example, in the file deployments/config.yaml, you may want to change the odoo_email value from [email protected] to your own email address. This is the email address you will use to log in to Odoo.

Once satisfied with the configurations, you are ready to provision Odoo. In Visual Studio Code, open the terminal and run the following:

cd deployments/local/odoo/
terragrunt apply

When prompted, enter yes to start provisioning Odoo.

When provisioning completes, use your browser to navigate to http://localhost/web to confirm that Odoo is up and running.

The login email is the one you configured earlier. The login password is randomly generated during the provisioning process. To get the password, run the following command:

kubectl get pod

You will get a list of Kubernetes pods, including Nginx, PostgreSQL, and Odoo itself. Make note of the name of the Odoo pod. It will look something like odoo-d478495d6-tnxt4.

Get the environment variables in the Odoo pod by running the following command. (Replace odoo-d478495d6-tnxt4 with the name of your Odoo pod.)

kubectl exec odoo-d478495d6-tnxt4 -- env

The value of the ODOO_PASSWORD variable is the password you need to log in to Odoo.

Once logged in, customize Odoo to fit your business needs. If you have questions, consult the Odoo documentation.

How to scale up Odoo

Using an existing computer to run Odoo is a cost-effective business management solution. You get a suite of useful business software applications while only paying a little more on the electricity bill.

This arrangement may serve you well for a while. Eventually, the business will grow to have multiple computers needing to access Odoo. To meet the needs of your growing business, a natural evolution is to scale up Odoo by migrating it from your computer to the cloud.

Before the cloud migration, you will need a cloud computing platform onto which to provision Odoo, and a DNS service to tell the rest of the Internet where you’ve provisioned Odoo.

There are many reputable cloud computing platforms in the market. One of the lower-cost options is DigitalOcean. After signing up for a new account, follow instructions to create an access token with “Write” scope. In your Visual Studio Code terminal, run export DIGITALOCEAN_TOKEN=abcdefg to save the token (replacing abcdefg with your actual token).

There are also many reputable DNS service providers in the market. Cloudflare is one such provider with unique capabilities to secure and speed up access to your cloud applications. After signing up for a new account, follow instructions to create an API token with “Edit” permissions for Zone “DNS” and “SSL and Certificates.” In your Visual Studio Code terminal, run export CLOUDFLARE_API_TOKEN=abcdefg to save the token (replacing abcdefg with your actual token).

In the file deployments/config.yaml, change the odoo_domain value from example.com to your Internet domain. If you don’t already have a domain, Cloudflare also sells them at reasonable prices.

Once you’ve exported DigitalOcean and Cloudflare tokens and customized config.yaml files, you are ready to provision Odoo. Run the following in your Visual Studio Code terminal:

cd deployments/prod/odoo-cloud/
terragrunt apply

When prompted, enter yes to start provisioning Odoo.

When provisioning completes, use your browser to navigate to https://tulip.example.com/web to confirm that Odoo is up and running.

To migrate data from your computer’s instance of Odoo to your cloud instance of Odoo, follow the documentation here to back up your computer’s Odoo database, saving it as a zip file. Follow the same documentation to delete your cloud Odoo’s existing database, then restore the database with the zip file you previously saved. The backup, delete, and restore database operations all require a “Master Password.” Use the value of the ODOO_PASSWORD environment variable. On your computer, use kubectl to look it up as you did before. On the cloud, use the Kubernetes Dashboard to look it up.

References