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.
Raw data
{
"_id": null,
"home_page": "https://git.vauxoo.com/deployv/deployv",
"name": "deployv",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "vauxootools deployv",
"author": "Tulio Ruiz",
"author_email": "tulio@vauxoo.com",
"download_url": "https://files.pythonhosted.org/packages/0a/20/d52eb99a8c315277d18a1e87ed8ed46ca9a5a0f6dba344031c270f9771bb/deployv-0.9.207.tar.gz",
"platform": null,
"description": "CI Status\n===\n\n[![Pypi version](https://img.shields.io/pypi/v/deployv.svg)](https://pypi.python.org/pypi/deployv)\n[![Build status](https://git.vauxoo.com/vauxoo/deployv/badges/master/build.svg)](https://git.vauxoo.com/vauxoo/deployv/commits/master)\n[![coverage status](https://git.vauxoo.com/vauxoo/deployv/badges/master/coverage.svg)](https://coverage.vauxoo.com/master-master/)\n[![Documentation](https://git.vauxoo.com/vauxoo/deployv/badges/master/build.svg)](https://git.vauxoo.com/deployv/orchest/wikis/home)\n\nDeployV\n===\n\nThe main DeployV goal is to have a set of tools for working with dockerized Odoo instances as a library or command line\ninterface using a simple json formatted config files.\n\nIt is planned that in further versions will be an [Odoo](https://www.odoo.com) integration so the whole configuration\nprocess can be done directly in the instance and deployed to the corresponding server (this would be configurable too)\nusing [RabbitMQ](https://www.rabbitmq.com/) for messaging. This graphical interface development is done in \nthe [Orchest](https://github.com/Vauxoo/orchest) repository.\n\n\nGetting started\n===\n\n## Installing\n\nBefore installing the library you will need to have the following installed:\n\n* build-essential\n* python-setuptools\n* python-dev\n* libpq-dev\n* libffi-dev\n\nThis can be performed executing the following:\n\n $ sudo apt-get update \n $ sudo apt-get install build-essential python-setuptools python-dev libpq-dev libffi-dev\n\nAll Python dependencies are listed in the requirements.txt and will be installed when you run:\n \n $ python setup.py install\n \nNotice that you must have docker and PostgreSQL installed on your system, if not you can install docker following the\n[official documentation](https://docs.docker.com/installation/ubuntulinux) and you can use the a PostgreSQL container \n([vauxoo/docker-postgresql](https://hub.docker.com/r/vauxoo/docker-postgresql/)), run it:\n\n $ 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\n \nThe port 5136 is used to avoid conflict with any postgres running instance. It is attached to the docker interface and\nthe [loopback](http://www.tldp.org/LDP/nag/node66.html) so it is accessible from the container and the host only,\nthe **--name** parameter is optional and can be changed to your needs. To see a detailed description of the parameters\ngo to [docker cli documentation page](https://docs.docker.com/reference/commandline/cli/).\n\n**Note:** This have been tested with docker 1.7.1 only\n\n## Testing the installation\n\nIn the test folder you can find a sample configuration file names *config.json* this file uses a \n[docker test image](https://hub.docker.com/r/vauxoo/odoo80-test/) that have some public repositories and Odoo 8.0.\n\nRun the create command:\n\n $ deployvcmd create -f /path/to/tests/config.json -l DEBUG -z /any/path\n \nNotice that the backup must start with customer_id if you specify a directory, if you specify a specific file only then\nthe name format does not matter.\n\n## Basic commands\n\nThe image for the instance can be created by:\n\n $ deployvcmd build -u git@github.com:user/app_repo.git -v 8.0\n\nAnd 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\na development branch just do:\n\n $ deployvcmd build -u git@github.com:user-dev/app_repo.git -b my_dev_branch -v 8.0 \n \nAs you can see in the test section you can easily create an Odoo instance using the command line, but also generate\na backup from it:\n\n $ deployvcmd backupdb -f /path/to/tests/config.json -z ./backup/path -d database_name_to_backup\n \nOr you can create a backup from an instance in a container:\n\n $ deployvcmd backupdb -n container_name -z ./backup/path -d database_name_to_backup\n\nI will generate a compressed file in *./backup/path* with a database dump, attachments and a json file with the\ninstance branches info.\n\nTo restore the generated dump just have to execute:\n\n $ deployvcmd restore -f /path/to/tests/config.json -z ./backup/path\n\nAlso, if you want to restore it to a dockerized instance:\n\n $ deployvcmd restore -n container_name -z ./backup/path\n\nThis will search the best best backup to restore or if you wish to specify one:\n\n $ deployvcmd restore -f /path/to/tests/config.json -z ./backup/path/backup_file.tar.bz2\n\nThe database name is generated automatically, but you can change this behaviour too:\n\n $ deployvcmd restore -f /path/to/tests/config.json -z ./backup/path/backup_file.tar.bz2 -d specific_database_name\n\n### Anonymize data\nThis functionality is based on [Postgresql Anonymizer Extension](https://postgresql-anonymizer.readthedocs.io/en/stable/).\nThe extension must be installed in host/container where database is located, by executing (as root user):\n\n # apt install pgxnclient build-essential postgresql-server-dev-kk\n # pgxn install postgresql_anonymizer\n\nwhere `kk` its postgresql version (according to host/container), like: 9.6, 10, 11, etc,\n\nAlso, `odoo` user (in database) must have superuser privilege (in order to create and activate extension, create schema and functions):\n\n ALTER USER odoo WITH SUPERUSER;\n\nIn deactivate step, anonymization of data could be executed. For that, create a file `/etc/deployv/deactivate/anon_operations.csv` as indicated by internal documentation.\n",
"bugtrack_url": null,
"license": "BSD",
"summary": "Base for all clases and scripts in VauxooTools",
"version": "0.9.207",
"project_urls": {
"Download": "https://git.vauxoo.com/deployv/deployv",
"Homepage": "https://git.vauxoo.com/deployv/deployv"
},
"split_keywords": [
"vauxootools",
"deployv"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "832699ea57e4f937e6452997402457f1107099a23670250aeb11458b6b216636",
"md5": "fbaa34ecf6c0c648d2784af8822d5f17",
"sha256": "e48d2692ecf919d9a7f4f06dfa225206683977920e0ee09ef1027d824b180314"
},
"downloads": -1,
"filename": "deployv-0.9.207-py3-none-any.whl",
"has_sig": false,
"md5_digest": "fbaa34ecf6c0c648d2784af8822d5f17",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 131934,
"upload_time": "2024-04-18T21:45:47",
"upload_time_iso_8601": "2024-04-18T21:45:47.292905Z",
"url": "https://files.pythonhosted.org/packages/83/26/99ea57e4f937e6452997402457f1107099a23670250aeb11458b6b216636/deployv-0.9.207-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "0a20d52eb99a8c315277d18a1e87ed8ed46ca9a5a0f6dba344031c270f9771bb",
"md5": "9bfb8aa90d2fb1d44cb30411e46e9ef3",
"sha256": "7753cdef66e04408b21ccde4d18f052e7be88430614877f273b2f5b975cb04f8"
},
"downloads": -1,
"filename": "deployv-0.9.207.tar.gz",
"has_sig": false,
"md5_digest": "9bfb8aa90d2fb1d44cb30411e46e9ef3",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 136792,
"upload_time": "2024-04-18T21:45:50",
"upload_time_iso_8601": "2024-04-18T21:45:50.735890Z",
"url": "https://files.pythonhosted.org/packages/0a/20/d52eb99a8c315277d18a1e87ed8ed46ca9a5a0f6dba344031c270f9771bb/deployv-0.9.207.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-18 21:45:50",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "deployv"
}