Skip to main content

CI Status ===

[![Pypi version](https://img.shields.io/pypi/v/deployv.svg)](https://pypi.python.org/pypi/deployv) [![Build status](https://git.vauxoo.com/vauxoo/deployv/badges/master/build.svg)](https://git.vauxoo.com/vauxoo/deployv/commits/master) [![coverage status](https://git.vauxoo.com/vauxoo/deployv/badges/master/coverage.svg)](https://coverage.vauxoo.com/master-master/) [![Documentation](https://git.vauxoo.com/vauxoo/deployv/badges/master/build.svg)](https://git.vauxoo.com/deployv/orchest/wikis/home)

DeployV ===

The main DeployV goal is to have a set of tools for working with dockerized Odoo instances as a library or command line interface using a simple json formatted config files.

It is planned that in further versions will be an [Odoo](https://www.odoo.com) integration so the whole configuration process can be done directly in the instance and deployed to the corresponding server (this would be configurable too) using [RabbitMQ](https://www.rabbitmq.com/) for messaging. This graphical interface development is done in the [Orchest](https://github.com/Vauxoo/orchest) repository.

Getting started ===

## Installing

Before installing the library you will need to have the following installed:

  • build-essential

  • python-setuptools

  • python-dev

  • libpq-dev

  • libffi-dev

This can be performed executing the following:

$ sudo apt-get update $ sudo apt-get install build-essential python-setuptools python-dev libpq-dev libffi-dev

All Python dependencies are listed in the requirements.txt and will be installed when you run:

$ python setup.py install

Notice that you must have docker and PostgreSQL installed on your system, if not you can install docker following the [official documentation](https://docs.docker.com/installation/ubuntulinux) and you can use the a PostgreSQL container ([vauxoo/docker-postgresql](https://hub.docker.com/r/vauxoo/docker-postgresql/)), run it:

$ docker run -d -p 127.0.0.1:5136:5432 -p 172.17.42.1:5136:5432 –name odoo_psql vauxoo/docker-postgresql:latest /entry_point start

The port 5136 is used to avoid conflict with any postgres running instance. It is attached to the docker interface and the [loopback](http://www.tldp.org/LDP/nag/node66.html) so it is accessible from the container and the host only, the –name parameter is optional and can be changed to your needs. To see a detailed description of the parameters go to [docker cli documentation page](https://docs.docker.com/reference/commandline/cli/).

Note: This have been tested with docker 1.7.1 only

## Testing the installation

In the test folder you can find a sample configuration file names config.json this file uses a [docker test image](https://hub.docker.com/r/vauxoo/odoo80-test/) that have some public repositories and Odoo 8.0.

Run the create command:

$ deployvcmd create -f /path/to/tests/config.json -l DEBUG -z /any/path

Notice that the backup must start with customer_id if you specify a directory, if you specify a specific file only then the name format does not matter.

## Basic commands

The image for the instance can be created by:

$ deployvcmd build -u git@github.com:user/app_repo.git -v 8.0

And it will create a docker image using Odoo 8.0 and will install all dependencies from the requirements.txt and oca_dependencies.txt, if you wish to build from a development branch just do:

$ deployvcmd build -u git@github.com:user-dev/app_repo.git -b my_dev_branch -v 8.0

As you can see in the test section you can easily create an Odoo instance using the command line, but also generate a backup from it:

$ deployvcmd backupdb -f /path/to/tests/config.json -z ./backup/path -d database_name_to_backup

Or you can create a backup from an instance in a container:

$ deployvcmd backupdb -n container_name -z ./backup/path -d database_name_to_backup

I will generate a compressed file in ./backup/path with a database dump, attachments and a json file with the instance branches info.

To restore the generated dump just have to execute:

$ deployvcmd restore -f /path/to/tests/config.json -z ./backup/path

Also, if you want to restore it to a dockerized instance:

$ deployvcmd restore -n container_name -z ./backup/path

This will search the best best backup to restore or if you wish to specify one:

$ deployvcmd restore -f /path/to/tests/config.json -z ./backup/path/backup_file.tar.bz2

The database name is generated automatically, but you can change this behaviour too:

$ deployvcmd restore -f /path/to/tests/config.json -z ./backup/path/backup_file.tar.bz2 -d specific_database_name

### Anonymize data This functionality is based on [Postgresql Anonymizer Extension](https://postgresql-anonymizer.readthedocs.io/en/stable/). The extension must be installed in host/container where database is located, by executing (as root user):

# apt install pgxnclient build-essential postgresql-server-dev-kk # pgxn install postgresql_anonymizer

where kk its postgresql version (according to host/container), like: 9.6, 10, 11, etc,

Also, odoo user (in database) must have superuser privilege (in order to create and activate extension, create schema and functions):

ALTER USER odoo WITH SUPERUSER;

In deactivate step, anonymization of data could be executed. For that, create a file /etc/deployv/deactivate/anon_operations.csv as indicated by internal documentation.

Metadata

Release files for deployv 0.9.229

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for deployv 0.9.229
File Size Uploaded
deployv-0.9.229.tar.gz 126.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for deployv 0.9.229
File Interpreter ABI Platform
deployv-0.9.229-py3-none-any.whl Python 3 none any Details

Total release size: 264.8 kB

Release files / deployv-0.9.229.tar.gz

Download URL deployv-0.9.229.tar.gz
Size 126.8 kB
Tags Source
SHA-256 checksum
How to use checksums
5c4c2b2b7aac76197f75a42da9631cbab6a41309c1abed1dcd78d04ba9ee7b5e
BLAKE2b-256 checksum
How to use checksums
f82d8e98c53942f0bd82e6b775524a541f887deede49a7741e351b09c2181975
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.16

Release files / deployv-0.9.229-py3-none-any.whl

Download URL deployv-0.9.229-py3-none-any.whl
Size 138.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
18e5b5fa47899ea8d77bd92b0c35e2a9bcf03c09b53872b4fc22ff741c24c14b
BLAKE2b-256 checksum
How to use checksums
5cef9fa8d01aafa363e7ba4be3d632a04daa7091cdd16068101150c7493b1bf7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.16

Release history Release notifications | RSS feed

This release

0.9.229 This release

2 release files

0.9.98

2 release files

0.9.97

2 release files

0.9.96

2 release files

0.9.95

2 release files

0.9.94

2 release files

0.9.93

2 release files

0.9.92

2 release files

0.9.85

2 release files

0.9.84

2 release files

0.9.83

2 release files

0.9.82

2 release files

0.9.81

2 release files

0.9.80

2 release files

0.9.79

2 release files

0.9.78

2 release files

0.9.77

2 release files

0.9.76

2 release files

0.9.75

2 release files

0.9.72

2 release files

0.9.71

2 release files

0.9.70

2 release files

0.9.69

2 release files

0.9.65

2 release files

0.9.64

2 release files

0.9.63

2 release files

0.9.62

2 release files

0.9.61

2 release files

0.9.60

2 release files

0.9.59

2 release files

0.9.58

2 release files

0.9.57

2 release files

0.9.56

2 release files

0.9.55

2 release files

0.9.54

2 release files

0.9.53

2 release files

0.9.51

2 release files

0.9.50

2 release files

0.9.49

2 release files

0.9.48

2 release files

0.9.47

2 release files

0.9.46

2 release files

0.9.45

2 release files

0.9.43

2 release files

0.9.42

2 release files

0.9.41

2 release files

0.9.40

2 release files

0.9.37

2 release files

0.9.36

2 release files

0.9.35

2 release files

0.9.34

2 release files

0.9.33

2 release files

0.9.32

2 release files

0.9.28

2 release files

0.9.27

2 release files

0.9.26

2 release files

0.9.23

2 release files

0.9.22

2 release files

0.9.21

2 release files

0.9.18

2 release files

0.9.17

2 release files

0.9.16

2 release files

0.9.15

2 release files

0.9.14

1 release file

0.9.13

2 release files

0.9.10

2 release files

0.9.9

2 release files

0.9.8

2 release files

0.9.7

2 release files

0.9.5

2 release files

0.9.4

2 release files

0.9.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page