• Stars
    star
    195
  • Rank 199,374 (Top 4 %)
  • Language
    Python
  • License
    GNU Affero Genera...
  • Created about 8 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

C2C Odoo cloud platform addons

Pre-commit Status Build Status codecov

Odoo Cloud Addons

Camptocamp odoo addons used on our Cloud Platform.

Introduction

On the platform we want to achieve having:

  • No data stored on the local filesystem so we can move an instance between hosts and even have several running front-ends
  • Metrics read from the logs or sent to Prometheus to monitor the instances
  • Logs sent to ElasticSearch-Kibana structured as JSON for better searching

For the storage, we store all the attachments on an object storage such as S3 or Swift, and we store the werkzeug sessions on Redis.

Setup

Python dependencies

Libraries that must be added in requirements.txt:

redis==2.10.5
python-json-logger==0.1.5
statsd==3.2.1

# For S3 object storage (Exoscale, AWS)
boto==2.42.0

# For Swift object storage (Openstack, OVH)
python-swiftclient==3.4.0
python-keystoneclient==3.13.0

Odoo Startup

The --load option of Odoo must contains the following addons:

  • session_redis
  • logging_json

Example:

--load=web,web_kanban,session_redis,logging_json

Server Environment

The addon cloud_platform is an addon that we use for 2 things:

  • validate that we setup the required environment variables depending on the running environment
  • install and configure the cloud addons

For this purpose, we use the server_environment with the following envs:

  • prod
  • integration
  • test
  • dev

The exact naming is important, because the cloud_platform addon rely on these keys to know and check the running environment.

Attachments in the Object Storage S3

  • prod: stored RW in the object storage
  • AWS_HOST: depends of the platform
  • AWS_REGION: region's endpoint
  • AWS_ACCESS_KEY_ID: depends of the platform
  • AWS_SECRET_ACCESS_KEY: depends of the platform
  • AWS_BUCKETNAME: <project>-odoo-prod
  • integration:
  • AWS_ACCESS_KEY_ID: depends of the platform
  • AWS_SECRET_ACCESS_KEY: depends of the platform
  • AWS_BUCKETNAME: <project>-odoo-integration
  • test: attachments are stored in database

Besides, the attachment location should be set to s3 (this is automatically done by the install methods of the cloud_platform module).

  • ir.config_parameter ir_attachment.location: s3

Structure of bucket name is checked against environment. It is possible to by-pass this behavior by using the following environment variable: AWS_BUCKETNAME_UNSTRUCTURED.

Attachments in the Object Storage Swift

  • prod: stored RW in the object storage
  • SWIFT_AUTH_URL: depends of the platform
  • SWIFT_ACCOUNT: depends of the platform
  • SWIFT_PASSWORD: depends of the platform
  • SWIFT_WRITE_CONTAINER: <project>-odoo-prod
  • integration:
  • SWIFT_AUTH_URL: depends of the platform
  • SWIFT_ACCOUNT: depends of the platform
  • SWIFT_PASSWORD: depends of the platform
  • SWIFT_WRITE_CONTAINER: <project>-odoo-integration
  • test: attachments are stored in database

Besides, the attachment location should be set to swift (this is automatically done by the install methods of the cloud_platform module).

  • ir.config_parameter ir_attachment.location: swift

Structure of container name is checked against environment. It is possible to by-pass this behavior by using the following environment variable: SWIFT_WRITE_CONTAINER_UNSTRUCTURED.

Sessions in Redis

  • prod:
  • ODOO_SESSION_REDIS: 1
  • ODOO_SESSION_REDIS_HOST: depends of the platform
  • ODOO_SESSION_REDIS_PASSWORD: depends of the platform
  • ODOO_SESSION_REDIS_PREFIX: <project>-odoo-prod
  • integration:
  • ODOO_SESSION_REDIS: 1
  • ODOO_SESSION_REDIS_HOST: depends of the platform
  • ODOO_SESSION_REDIS_PASSWORD: depends of the platform
  • ODOO_SESSION_REDIS_PREFIX: <project>-odoo-integration
  • test:
  • ODOO_SESSION_REDIS: 1
  • ODOO_SESSION_REDIS_HOST: depends of the platform
  • ODOO_SESSION_REDIS_PASSWORD: depends of the platform
  • ODOO_SESSION_REDIS_PREFIX: <project>-odoo-test
  • ODOO_SESSION_REDIS_EXPIRATION: 86400 (1 day)

JSON Logging

At least on production and integration, activate:

  • ODOO_LOGGING_JSON: 1
  • Add logging_json in the server_wide_modules option in the configuration file

Metrics (Statsd/Prometheus for Grafana)

Should be active at least on the production server

  • ODOO_STATSD: 1
  • STATSD_CUSTOMER: <project>
  • STATSD_ENVIRONMENT: set if you want to send metrics for a special environment which does not match with the server_environment
  • STATSD_HOST: depends of the platform
  • STATSD_PORT: depends of the platform

Automatic Configuration

An automatic configuration can be executed from an anthem song to configure some parameters such as the ir_attachment.location and migrate the existing attachments to the object storage.

From anthem, it can be called like this: ctx.env['cloud.platform'].install()

Startup checks

At loading of the database, the addon will check if the environment variables for Redis and the object storage are set as expected for the loaded environment. It will refuse to start if anything is badly configured.

The checks can be bypassed with the environment variable ODOO_CLOUD_PLATFORM_UNSAFE set to 1.

Attachment storage disability

To prevent object storage to be accessed while failing for any kind of reason set this environment variable DISABLE_ATTACHMENT_STORAGE set to 1.

This part will be replaced when running the oca-gen-addons-table script from OCA/maintainer-tools.

Licenses

This repository is licensed under AGPL-3.0.

However, each module can have a totally different license, as long as they adhere to Camptocamp policy. Consult each module's __manifest__.py file, which contains a license key that explains its license.


More Repositories

1

terraboard

🌍 πŸ“‹ A web dashboard to inspect Terraform States
Go
1,754
star
2

bivac

πŸ• πŸ“¦ Backup Interface for Volumes Attached to Containers
Go
315
star
3

grafana-prometheus-alertmanager-datasource

Grafana Datasource for the Prometheus Alertmanager
TypeScript
263
star
4

tilecloud

A powerful utility for generating, managing, transforming, and visualizing map tiles in multiple formats.
Python
229
star
5

ngeo

Library combining OpenLayers and AngularJS
JavaScript
134
star
6

devops-stack

🌊 An all-in-one Kubernetes ☸ stack using Argo CD πŸ™ and Terraform as base components
HCL
134
star
7

docker-odoo-project

Base images for Odoo projects
Shell
125
star
8

puppet-tomcat

Tomcat puppet module
HTML
90
star
9

terraform-provider-pass

Pass Terraform provider
Go
86
star
10

inkmap

A library for generating high-quality, printable maps on the browser.
JavaScript
79
star
11

puppet-apache_c2c

HTML
68
star
12

docker-consul-demo

Docker + consul + haproxy
66
star
13

ogc-client

A TypeScript library for interacting with geospatial services
TypeScript
63
star
14

c2cgeoportal

c2cgeoportal application
Python
60
star
15

puppet-iptables

Ruby
57
star
16

helm-sops

Go
48
star
17

puppet-augeas

Helper for using augeas with puppet
Ruby
46
star
18

tilecloud-chain

Tools to generate tiles from WMS or Mapnik, to S3, Berkley DB, MBTiles, or local filesystem in WMTS layout using Amazon cloud services.
Python
44
star
19

oerpscenario

Business Driven Development (BDD) for OpenERP/Odoo
Gherkin
37
star
20

puppet-varnish

Ruby
36
star
21

docker-mapserver

https://hub.docker.com/r/camptocamp/mapserver/
Dockerfile
35
star
22

oapi-poc

OGC API & STAC - Proof of Concept
Rust
33
star
23

camptocamp-rancher-catalog

Camptocamp's Rancher Catalog
Makefile
33
star
24

puppet-nfs

manage your nfs shares (client and server)
Ruby
31
star
25

build-debian-cloud

Script to create Debian Squeeze Amazon Machine Images (AMIs)
Python
30
star
26

helm-geoserver-cloud

Helm chart to install geoserver-cloud
Smarty
29
star
27

papyrus

Geospatial Extensions for Pyramid
Python
28
star
28

puppet-archive

Puppet
28
star
29

terradb

A unified database for Terraform data
Go
27
star
30

docker-argocd

Shell
27
star
31

terraform-provider-freeipa

FreeIPA Terraform Provider
Go
27
star
32

puppetfile-updater

Keep your Puppetfile up-to-date
Ruby
26
star
33

puppet-bind

Installs and configures Bind9 domain name server
Ruby
24
star
34

puppet-sudo

Ruby
23
star
35

puppet-openerp

install openerp server/client/web-client
Ruby
23
star
36

puppet-nagios

A simple way to build distributed monitoring solutions with puppet !
HTML
23
star
37

charts

Camptocamp Charts for Kubernetes Helm
Mustache
22
star
38

cgxp

JavaScript
22
star
39

anthem

make your odoo scripts sing
Python
22
star
40

marabunta

🐜🐜🐜 Migrating ants for Odoo 🐜🐜🐜
Python
22
star
41

puppet-haproxy_c2c

Puppet module for managing haproxy
Augeas
22
star
42

puppet-dell

dell specific installations (openmanage and others)
Puppet
21
star
43

puppet-drbd

Manage your DRBD volumes using puppet
Puppet
20
star
44

ceph-rbd-backup

Ceph RBD images replication / backup tool
Python
19
star
45

docker-qgis-server

All that is needed to generate a proper QGIS server image
Dockerfile
18
star
46

puppet-aws

Tools for using Puppet with Amazon Web Services (AWS)
Ruby
17
star
47

GeoFormAlchemy

GeoFormAlchemy provides geographic extensions to FormAlchemy. GeoFormAlchemy is based on FormAlchemy and GeoAlchemy. Happy hacking Alchemysts!
Python
17
star
48

QGIS-SpreadSheetLayers

QGIS plugin to load layers from spreadsheet files (*.ods, *.xls, *.xlsx)
Python
16
star
49

prometheus-puppetdb-sd

Generate scrape files for Prometheus from PuppetDB
Go
15
star
50

prometheus-puppetdb-exporter

Prometheus Exporter for PuppetDB
Go
15
star
51

puppet-postgis

Support for geographic objects to the PostgreSQL
Ruby
15
star
52

github-backup

A Python script to backup your GH organization
Python
15
star
53

c2c-rd-addons

Python
15
star
54

GeoBI

Java
13
star
55

android-gis

GIS for Android
Java
13
star
56

upkick

Unattended upgrades for Docker containers, the hard way.
Go
13
star
57

cartoweb3

Advanced Geographical Information System for the Web
PHP
13
star
58

docker-odoo-nginx

Configure nginx for Odoo projects
Dockerfile
13
star
59

Studio

Web-based administration interface for MapServer
JavaScript
12
star
60

puppet-dovecot

installs and manage dovecot
Puppet
12
star
61

locustodoorpc

Locust custom client: odoorpc
Python
12
star
62

puppet-rdiff_backup

This module provide a simple way to manage a central backup server based on rdiff-backup
Python
11
star
63

docker_smtp

A simple docker image with SMTP, IMAP and a webmail
PHP
11
star
64

terraform-provider-puppetca

Terraform Puppet CA Provider
Go
11
star
65

puppet-php

Ruby
11
star
66

terraform-provider-geoserver

Terraform Provider for Geoserver
Go
11
star
67

puppet-accounts

Ruby
11
star
68

puppet-gnome

Puppet module for configuring Gnome
Ruby
11
star
69

odoo-elasticsearch-kibana

Odoo addons related to ElasticSearch and Kibana
Python
10
star
70

puppet-rsyncd

Manage rsyncd.conf using augeas
Ruby
10
star
71

puppetca-issuer

Cert-manager issuer for the Puppet Certificate Authority
Go
10
star
72

puppet-couchdb

A basic module to install this document-oriented database containing a function to retrieve metadata from couchdb
Ruby
10
star
73

puppet-samba

HTML
9
star
74

docker-puppetserver

Dockerfile
9
star
75

docker-geoserver

GeoServer with a few useful plugins for Docker
Scheme
9
star
76

puppet-lint-roles_and_profiles-check

Ruby
9
star
77

puppet-buildenv

Ruby
8
star
78

argocd-helm-sops-example

HTML
8
star
79

lyrx2sld

Conversion of ArcGIS Pro styling to GeoServer using bridge-style
Python
8
star
80

openlayers-webgl-integration

OpenLayers/WebGL integration
JavaScript
8
star
81

puppet-python

Puppet
8
star
82

puppet-dhcp

Manage a dhcp server (and client - will come later)
Ruby
8
star
83

ms_perfs

Scheme
8
star
84

docker-exim

Dockerfile
8
star
85

puppet-syslog-ng

Syslog-ng puppet module
HTML
7
star
86

puppet-pacemaker

Manage pacemaker/heartbeat v2 using puppet
Puppet
7
star
87

docker-pghoard

Dockerfile
7
star
88

puppet-gitlabci-pipelines

GitLab CI Pipelines for Puppet
7
star
89

wal-g-prometheus-exporter

Export prometheus metrics for wal-g backup tool
Python
7
star
90

terraform-provider-puppetdb

Terraform Provider to manage resources in PuppetDB
Go
7
star
91

docker-postgis

Shell
7
star
92

ipahealthcheck_exporter

Prometheus exporter for exposing ipa-healthcheck tool checks as metrics
Go
7
star
93

github-repositories-dashboard

Github Repositories Dashboard
JavaScript
7
star
94

puppet-ssh

SSH Puppet module
Ruby
7
star
95

secureOWS

The Secure OWS Project is a framework for adding security on top of some OGC protocols developed by Camptocamp SA. This project was initially sponsored by the Swiss Federal Office of Topography
Java
7
star
96

GeoMapFish

6
star
97

demo_geomapfish

PLpgSQL
6
star
98

terraform-docker-k3s

HCL
6
star
99

github_pki

Use GitHub as a centralized repository of SSH keys
Go
6
star
100

c2cwsgiutils

Python
6
star