Skip to content

jialvarez/odoo-openshift

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Running Odoo in Openshift

Description

This is a project to build templates for running Odoo app inside OpenShift pods using Kompose.

Using this project

When to use this project

If you are working with OpenShift and you want to run Odoo app, this project can be useful for you.

When not using this project

If you aren't working with OpenShift and you just want to deploy Odoo in Docker over your host or a cloud environment, the official Odoo template is more lightweight and suitable.

Prerequisites

You need to install kompose in order to convert docker-compose and Dockerfile into yaml templates for using with OpenShift. You many need kubectl program if you want to apply the generated templates instead running directly into your OpenShift instance with kompose.

You can download kompose here.

Deploy Odoo in OpenShift

First of all, you need to download this project and the submodule inside pointing the official odoo repository.
git clone https://github.com/jialvarez/odoo_openshift.git && cd odoo_openshift
git submodule update --init --remote

Then, you can deploy it in two different ways:

Deploying directly into OpenShift project

  1. Just login into your cluster:
    oc login https://api.<starter_or_pro>-<location>.openshift.com --token=<token>

  2. Select a project:
    oc project <project_name>

  3. Start the conversion and deployment proccess
    kompose --file docker-compose.yml --provider openshift --verbose up

    Image generation can take a big time, so please be patient.

    If you want to remove pods, deployments, and volumes generated, you should type:
    kompose --file docker-compose.yml --provider openshift --verbose down

Generating templates and then deploy into OpenShift project

  1. Just login into your cluster:
    oc login https://api.<starter_or_pro>-<location>.openshift.com --token=<token>

  2. Select a project:
    oc project <project_name>

  3. Generate templates
    mkdir templates && kompose --provider openshift -v convert -f docker-compose.yml -o templates/

  4. Apply them
    kubectl apply -f templates/

Deploy Odoo in Docker containers

You should use the official Odoo template for this, but anyway you can use this image both to deploy in cloud or in OpenShift. I use the same image to deploy to Google Cloud and to OpenShift.

You need to uncomment line defining the volume for Docker container and comment the OpenShift one.

And then just type:
docker-compose up -d

Screenshots

alt text alt text alt text

Releases

No releases published

Packages

No packages published