Skip to content

Commit

Permalink
Python3 dockerplugin update (#11)
Browse files Browse the repository at this point in the history
* Update docker_build.sh

* Update docker_build.sh

* Update utility.py

* Update setup.py

Increment version

* Update docker_build.sh

* Update docker_build.sh

* Update docker_build.sh

* Update docker_build.sh

* Update docker_build.sh

* Update docker_build.sh

* Update docker_build.sh

* Add missing autodocs

Add another test so the coverage numbers don't decrease

* Remove junk from tox.ini

* Remove junk from tox.ini

* Add more tests to address coverage drops.

* Documentation tweaks

* Remove junk from tox.ini
  • Loading branch information
dwighthubbard authored Jan 29, 2019
1 parent 5b48a2e commit d2fefdf
Show file tree
Hide file tree
Showing 31 changed files with 395 additions and 172 deletions.
2 changes: 0 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
include README.md
include README.rst
include README.txt

prune .tox

Expand Down
154 changes: 137 additions & 17 deletions doc/source/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,17 @@ functionality and usage.

.. _deploy.conf:

deploy.conf
===========
deploy.conf - Deployment configuration file
===========================================

The :ref:`deploy.conf` file allows for setting all configuration arguments in
a single file. This allows running the script without any other command line
arguments.

The same file can be used for deployment and generation of deployment packages
in multiple packaging formats. Current supported deployment packaging formats
are: rpm and docker containers.

The :ref:`deploy.conf` file is a Python :py:mod:`ConfigParse` format
configuration file. This file consists of sections which are deliminated by
square brackets. Inside each section are key/value fields. Multi-Line
Expand All @@ -29,11 +33,12 @@ BUILD_NUMBER environment variable provided by the CI pipeline for example.

.. _[global]:

deploy.conf global section settings
###################################
global settings
###############

The :ref:`[global]` section of the :ref:`deploy.conf` defines a number of
settings. All of which are optional.
settings. All of which are optional. These settings act as the default
values if they are not set in other sections.

.. _[global]name:

Expand All @@ -58,7 +63,7 @@ install_manifest

The :ref:`[global]install_manifest` setting specifies a comma seperated list
of manifests to install. If this setting is not set all package manifests
will be installed.
(lists of packages) that will be installed.

** NOTE: It is generally not a good idea to mix multiple types of platform
package manifests. Such as using both rpm and tar **
Expand Down Expand Up @@ -143,11 +148,14 @@ This setting requires the following:

.. _[pip]:

deploy.conf pip section settings
################################
pip package manifest
####################

This configuration section allows defining settings related to the installation
of python packages that are installed using the `pip` tool.
of python packages that are installed using the `pip` tool. As part of a pip
package manifest.

This section is used to define the python packages to install.

.. _[pip]deps:

Expand All @@ -159,18 +167,21 @@ the deps is the same as the format of a `pip` requirements file.

.. _[rpm]:

deploy.conf rpm section settings
################################
rpm package manifest
####################

This configuration section allows defining settings related to the installation
The [rpm] configuration section allows defining package manifests (list of packages)
of rpm packages installed using the yum tool.

A few thing to note:
These is section defines a package manifest of rpm packages to install prior to
installing the python packages.

Note:

* rpm package installations are not atomic and once installed some package
dependencies can block uninstall or upgrade of certain packages. As a
result a rpm install failure can leave the system in a different package
state than when the script run started.
rpm package installations are not atomic and once installed some package
dependencies can block uninstall or upgrade of certain packages. As a
result a rpm install failure can leave the system in a different package
state than when the script run started.

.. _[rpm]deps:

Expand All @@ -179,6 +190,115 @@ deps

This section is a list of rpm packages to install.

docker_container packaging (creation)
#####################################

The [docker_container] section contains the settings used to create a docker
container containing the python application in a virtualenv. This sectiion allows
for adding settings used to create the docker container.

The docker plugin will generate basic sane container based on the defaults and values
in the global section of the configuration.

This section can be used to set docker specific settings such as commands to use for
healthchecks of the created docker container.


add
~~~

base_image
~~~~~~~~~~

default=ubuntu:17.10

container_name
~~~~~~~~~~~~~~

copy
~~~~

deb_deps
~~~~~~~~

A manifest of debian packages to install into the container prior to creating the
python virtualenv.

entrypoint
~~~~~~~~~~

env
~~~

expose
~~~~~~

files
~~~~~

healthcheck
~~~~~~~~~~~

This is the healthcheck script to run in the container.

label
~~~~~

A list of labels to be applied to the container.

rpm_deps
~~~~~~~~

A manifest of rpm packages to install into the container prior to creating the python
virtualenv.

run_before
~~~~~~~~~~

A list of shell commands to run before creating the python virtualenv inside the container.

run_after
~~~~~~~~~

A list of shell commands to run after creating the python virtualenv inside the container.

setenv
~~~~~~

Environment variables to set when creating the container.

stopsignal
~~~~~~~~~~

user
~~~~

volume
~~~~~~

A list of volume mappings to use with the container.


rpm packaging
#############
The [rpm_package] section defines settings related to the creation of rpm packages.
The settings in this section will overide the default values from the global settings
for rpm package generation only.

.. _[rpm_package]deps:

deps
~~~~

This is a manifest (list of packages) to be listed as dependencies of the created
rpm package.


Note::

This should include the packages that contain the python interpreter
and virtualenv commands to use to deploy the virtualenv when the created package
is installed.

Example deploy.conf
###################
Expand Down
2 changes: 2 additions & 0 deletions doc/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,7 @@ Contents:
scripts.rst
configuration.rst
invirtualenv.rst
invirtualenv_plugins.rst



1 change: 1 addition & 0 deletions doc/source/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ the rpm package support in the :ref:`create_package` script.::

rpm-build

The Docker container build requires the :ref:`docker` command has been installed and working.
7 changes: 7 additions & 0 deletions doc/source/invirtualenv.cli.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
invirtualenv.cli module
=======================

.. automodule:: invirtualenv.cli
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions doc/source/invirtualenv.config.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
invirtualenv.config module
==========================

.. automodule:: invirtualenv.config
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions doc/source/invirtualenv.contextmanager.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
invirtualenv.contextmanager module
==================================

.. automodule:: invirtualenv.contextmanager
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions doc/source/invirtualenv.deploy.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
invirtualenv.deploy module
==========================

.. automodule:: invirtualenv.deploy
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions doc/source/invirtualenv.exceptions.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
invirtualenv.exceptions module
==============================

.. automodule:: invirtualenv.exceptions
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions doc/source/invirtualenv.package.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
invirtualenv.package module
===========================

.. automodule:: invirtualenv.package
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions doc/source/invirtualenv.plugin.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
invirtualenv.plugin module
==========================

.. automodule:: invirtualenv.plugin
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions doc/source/invirtualenv.plugin_base.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
invirtualenv.plugin\_base module
================================

.. automodule:: invirtualenv.plugin_base
:members:
:undoc-members:
:show-inheritance:
4 changes: 2 additions & 2 deletions doc/source/invirtualenv.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Python module invirtualenv
********************************
Python invirtualenv module code documentation
*********************************************

Python module support functions for the invirtualenv scripts

Expand Down
7 changes: 7 additions & 0 deletions doc/source/invirtualenv.utility.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
invirtualenv.utility module
===========================

.. automodule:: invirtualenv.utility
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions doc/source/invirtualenv.virtualenv.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
invirtualenv.virtualenv module
==============================

.. automodule:: invirtualenv.virtualenv
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions doc/source/invirtualenv_plugins.docker.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
invirtualenv\_plugins.docker module
===================================

.. automodule:: invirtualenv_plugins.docker
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions doc/source/invirtualenv_plugins.parsedconfig.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
invirtualenv\_plugins.parsedconfig module
=========================================

.. automodule:: invirtualenv_plugins.parsedconfig
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions doc/source/invirtualenv_plugins.rpm.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
invirtualenv\_plugins.rpm module
================================

.. automodule:: invirtualenv_plugins.rpm
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions doc/source/invirtualenv_plugins.rpm_scripts.post_install.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
invirtualenv\_plugins.rpm\_scripts.post\_install module
=======================================================

.. automodule:: invirtualenv_plugins.rpm_scripts.post_install
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions doc/source/invirtualenv_plugins.rpm_scripts.pre_uninstall.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
invirtualenv\_plugins.rpm\_scripts.pre\_uninstall module
========================================================

.. automodule:: invirtualenv_plugins.rpm_scripts.pre_uninstall
:members:
:undoc-members:
:show-inheritance:
16 changes: 16 additions & 0 deletions doc/source/invirtualenv_plugins.rpm_scripts.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
invirtualenv\_plugins.rpm\_scripts package
==========================================

.. automodule:: invirtualenv_plugins.rpm_scripts
:members:
:undoc-members:
:show-inheritance:

Submodules
----------

.. toctree::

invirtualenv_plugins.rpm_scripts.post_install
invirtualenv_plugins.rpm_scripts.pre_uninstall

24 changes: 24 additions & 0 deletions doc/source/invirtualenv_plugins.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
invirtualenv\_plugins package
=============================

.. automodule:: invirtualenv_plugins
:members:
:undoc-members:
:show-inheritance:

Subpackages
-----------

.. toctree::

invirtualenv_plugins.rpm_scripts

Submodules
----------

.. toctree::

invirtualenv_plugins.docker
invirtualenv_plugins.parsedconfig
invirtualenv_plugins.rpm

Loading

0 comments on commit d2fefdf

Please sign in to comment.