Giter Club home page Giter Club logo

odoo-k8s's Introduction

Odoo on kubernetes

NOTE: THIS REPOSITORY IS NOT MEANT FOR RUNNING IN PRODUCTION. IT'S A SHOWCASE SETUP FOR RUNNING A SIMPLE APPLICATION ATOP KUBERNETES. IF YOU WAN TO USE A PRODUCTION ODOO SETUP, USE THE STABLE HELM CHART. WHICH FEATURES A COMPREHENSIVE WAY OF CONFIGURING AND RUNNING ODOO.

This repository is a showcase deployment of Odoo on a Kubernetes cluster using minikube.
See repo instructions for setting up minikube.
First of all see what Odoo is.

Standalone example

If you're running a standalone example of kubernetes in dev mode (all-in-one), use the example provided in standalone/odoo.yaml. This example uses a different odoo docker image that fixes an environment variable which makes the database service discoverable without the dns addon.
If you are running the dns addon, then the example in minikube/ should work out of the box.

Epehmeral

If you're not interested in persistent data at all, and just want to deploy an example, you can use the ephemeral example.

Minikube

Download a release of minikube.

minikube start

Starting local Kubernetes cluster...

Create the Kubernetes service, pv, pvc for both odoo and the postgres db with the odoo.yaml file. This will also create a namespace for odoo.

kubectl apply -f minikube/odoo.yaml

service "odoo-db" created
deployment "odoo-db" created
service "odoo-shop" created
deployment "odoo-shop" created

Wait for the pods to start before accessing the application.

kubectl get po

NAME                         READY     STATUS              RESTARTS   AGE
odoo-db-3075219300-nx0kw     0/1       ContainerCreating   0          3s
odoo-shop-2676823603-s46lz   0/1       ContainerCreating   0          3s
kubectl get po

NAME                         READY     STATUS    RESTARTS   AGE
odoo-db-3075219300-nx0kw     1/1       Running   0          1m
odoo-shop-2676823603-s46lz   1/1       Running   0          1m

When the pods are ready, you can access the frontend service in the browser.

minikube service odoo-shop

Opening kubernetes service default/odoo-shop in default browser...
NOTE:

When accessing the service the first time, Odoo starts creating its static files and tries to connect to the database. This might take a while, to see the progress you can tail the logs of the pod. Replace odoo-shop-2676823603-s46lz with the container name returned by kubectl get po for odoo-shop to see the initialization progress.

kubectl logs -f odoo-shop-2676823603-s46lz

The browser will open with the following page, fill in the details for test data and remember to check Load demonstration data.

administrator

Install eCommerce (third app down from the right).

apps

Give it a while to load all assets... When prompted, select your theme style. (either bootswatch or plain bootstrap)

themes

And now you can start hacking on your e-shop!

success

Persistent data

Your changes and data persist between restarts. minikube stop && minikube start. This is because the PVs are mounted in /data which is a folder that minikube keeps. If you want to eliminate them you have to do minikube delete and start your cluster back up.

persistent

odoo-k8s's People

Contributors

pi-victor avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.