Small python package to facilitate deployment of some personal projects.
Project description
deploymentutils
This repo contains a small python package to facilitate deployment of some personal projects.
Overview
This package provides a thin layer on top of fabric to execute commands with a state like
- current working directory
- activated virtual environment (not yet implemented)
It also tries to simplify to deploy/maintain multiple instances of the same software but with varying fixtures, including one or more local instances for testing.
Motivation
The package is mainly intended to facilitate deployment tasks (e.g. for django apps) by running a simple python script. Compared to configuration management tools like Ansible this approach is far less powerful and scalable. However, it might be easier to understand for developers and thus lowering the hurdle to deploy applications by them selves.
Assumed Directory Layout
The scripts marked with [*] make use of this module.
<general project dir>
│
│
├── project-src-repo/ ← official project repo
│ ├── .git/
│ ├── deployment/
│ │ ├── some_files/
│ │ ├── deploy.py [*] ← original deployment script (delivered by the project)
│ │ └── ...
│ ├── django_project/
│ │ ├── settings.py
│ │ └── ...
│ ├── django_app/
│ │ ├── views.py
│ │ └── ...
│ ├── manage.py
│ └── ...
│
├── instance-specific/
│ ├── README.md
│ ├── demo
│ │ ├── .git/
│ │ ├── deploy.py
│ │ ├── project_data
│ │ └── ...
│ ├── production
│ │ ├── .git/
│ │ ├── deploy.py [*]
│ │ ├── project_data
│ │ └── ...
│ ├── testing
│ │ ├── .git/
│ │ ├── deploy.py [*]
│ │ ├── project_data
│ │ └── ...
│ └── ...
│
├── local_testing/ ← contents of this directory are autogenerated
│ ├── deploy.py [*]
│ ├── <appname>_deployment
│ └── ...
.
Status
Still under development and not comprehensively tested.
Features
- Create
config-example.ini
from an existingconfig-production.ini
(which contains additional example values).python -c "import deploymentutils as du; print(du.remove_secrets_from_config('config-production.ini'))"
- See
test/test_config.ini
and unittests for details.
Known Issues
- If a command started by
c.run("some_command")
is reading input, then the calling python process waits 'forever', i.e. until interrupted manually.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file deploymentutils-0.8.0.tar.gz
.
File metadata
- Download URL: deploymentutils-0.8.0.tar.gz
- Upload date:
- Size: 34.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95eb48e4208c084e393d77d60d35074873963911c842c08d37bc80feb7563bcf |
|
MD5 | 8f94af0d8dbd9668116ebfdbff9cedee |
|
BLAKE2b-256 | 4d4c2793940624cd70929e53ea141071268d3ac1b74b928cb541b8ad15340fff |
File details
Details for the file deploymentutils-0.8.0-py3-none-any.whl
.
File metadata
- Download URL: deploymentutils-0.8.0-py3-none-any.whl
- Upload date:
- Size: 26.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca78578770fad13a06473e4ead0957b32306aeb0303ae93bea2e4e5eedf364ce |
|
MD5 | 16ae40b7bfcadc66b9be3c8a7d42fb80 |
|
BLAKE2b-256 | 18423c476e8b6c399113788f86889f35c97ebf5dfc6f445d54e32a53807ce286 |