Digital Ocean Documentation

Instant Odoo Server Deployment on Digital Ocean


Overview

This documentation provides a comprehensive guide for deploying an server instance on DigitalOcean with the help of docker using the provided form and automation tools like Packer and Terraform. Users can fill out a form to initiate the deployment process, which automates the creation, configuration, and deployment of Odoo instances.

The deployment process updates the instance state automatically

  • New: Initial state when the form is submitted.
  • Packer Build: Packer builds completed successfully.
  • Initialized: Terraform plan executed successfully.
  • Deployed: Terraform deployment completed.
  • Certified: HTTPS certificate issued.

Deployment Details:

Form Submission

Users (portal, internal, or public) fill out the instance creation form at Digital Ocean Instance Form. The form captures the following details:


Cloud Service Deployment Details:
  • Customer Details:
    • Customer Name
    • Email
    • Country, State, City, Zip Code
  • Cloudflare Details:
    • Cloudflare Email
    • Cloudflare Zone-ID 
    • Cloudflare API Key 
    • Domain
  • DigitalOcean Details:
    • DigitalOcean API Token 
  • Deployment Details:
    • Deployment Port (Default: 8017)
    • Odoo Version
    • Git Repository to Clone

Upon submitting the form, users will receive an email with:

  • Portal access to manage their instances.

Be redirected to the My Instances page where they can view and manage their instance's progress.

The process will then automatically execute all steps up to the initialization phase. Logs and updates will be available in the Odoo chatter.

Packer Execution:

Once the form is submitted, the backend automatically starts the deployment process using Packer. The Packer script executes the necessary steps and shows progress updates in the Odoo chatter. 

NOTE: This process might take time as you see it takes 9 min in our case.

Example output:

==> <sensitive>.digitalocean.<sensitive>: Gracefully shutting down droplet...

==> <sensitive>.digitalocean.<sensitive>: Creating snapshot: packer-1708424491

==> <sensitive>.digitalocean.<sensitive>: Waiting for snapshot to complete...

==> <sensitive>.digitalocean.<sensitive>: Destroying droplet...

==> <sensitive>.digitalocean.<sensitive>: Deleting temporary ssh key...

Build '<sensitive>.digitalocean.<sensitive>' finished after 9 minutes 6 seconds.

==> Wait completed after 9 minutes 6 seconds

==> Builds finished. The artifacts of successful builds are:

--> <sensitive>.digitalocean.<sensitive>: A snapshot was created: 'packer-odoo-s-2vcpu-4gb' (ID: 150499074) in regions

Terraform Execution:

Once the Packer process completes, Terraform scripts are run

  1.  A successful initialization ensures all configurations are correct.

  2. Deploy the Instance: Note: Deployment is restricted until the associated sale order is fully paid.


HTTPS Certificate Generation

Before Generating certificate begins, users must:

  • Enter the IP Address, Password, and Server Port for the server.
  • Select the desired Odoo Version and Deployment Port to deploy.​

After deployment, the system generates an HTTPS certificate for the linked domain. This ensures secure access to the deployed Odoo instance.

Backup and Restore:

The platform provides the following database management features:

Backup:

Users can create backups of the selected database. The backups are stored securely for future restoration.

Restore:

Users can:

  • View a list of available database backups.
  • Download a backup locally.
  • Restore a database directly to the server. While restoring, ensure a unique name is provided for the database.

Manual Instance Management:

Users are provided with the option to manually run each step buttons will be enabled based on the state you are in case of errors or incorrect details during form submission. All instances can be managed from the My Instances page.


Instance Form Features:

Within a specific instance, users can:

  • Update deployment details.
  • Run processes manually using the following buttons:
    • Initialize Packer: Starts the Packer process.
    • Initialize Instance: Runs the Terraform initialization.
    • Deploy Instance: Deploys the instance after payment confirmation.
    • Generate HTTPS Certificate: Issues the HTTPS certificate.
    • Backup: Creates a backup of the selected database.
    • Restore: Restores a database from the available backups.

Additional Notes:

  1. Packer and Terraform Outputs: All logs and outputs are available in the Odoo chatter for transparency.
  2. Automation: The process is fully automated, but manual intervention might be required for issues like invalid API tokens or unpaid dues.

By following this documentation, users can seamlessly deploy and manage Odoo servers on DigitalOcean using docker, ensuring a secure and efficient process.