forked from extern/podman-compose
Python packaging
This commit is contained in:
parent
35219c84b9
commit
6846b27585
1
.gitignore
vendored
1
.gitignore
vendored
@ -20,6 +20,7 @@ parts/
|
||||
sdist/
|
||||
var/
|
||||
wheels/
|
||||
.idea/
|
||||
*.egg-info/
|
||||
.installed.cfg
|
||||
*.egg
|
||||
|
49
README.md
49
README.md
@ -1,20 +1,38 @@
|
||||
# PodMan-Compose
|
||||
# podman-compose
|
||||
|
||||
A script to run `docker-compose.yml` using [podman](https://podman.io/),
|
||||
doing necessary mapping to make it work rootless.
|
||||
|
||||
## NOTE
|
||||
Note, that it's still under development and might not work well yet.
|
||||
|
||||
it's still underdevelopment and does not work yet.
|
||||
## Installation
|
||||
|
||||
Install latest stable version from PyPI:
|
||||
|
||||
```
|
||||
pip install podman-compose
|
||||
```
|
||||
|
||||
Or latest stable version from GitHub:
|
||||
|
||||
```
|
||||
pip install https://github.com/muayyad-alsadi/podman-compose/archive/master.tar.gz
|
||||
```
|
||||
|
||||
Or latest development version from GitHub:
|
||||
|
||||
```
|
||||
pip install https://github.com/muayyad-alsadi/podman-compose/archive/devel.tar.gz
|
||||
```
|
||||
|
||||
## Mappings
|
||||
|
||||
* `1podfw` - create all containers in one pod (inter-container communication is done via `localhost`), doing port mapping in that pod
|
||||
* `1pod` - create all containers in one pod, doing port mapping in each container
|
||||
* `identity` - no mapping
|
||||
* `hostnet` - use host network, and inter-container communication is done via host gateway and published ports
|
||||
* `cntnet` - create a container and use it via `--network container:name` (inter-container communication via `localhost`)
|
||||
* `publishall` - publish all ports to host (using `-P`) and communicate via gateway
|
||||
* `1podfw` - create all containers in one pod (inter-container communication is done via `localhost`), doing port mapping in that pod.
|
||||
* `1pod` - create all containers in one pod, doing port mapping in each container.
|
||||
* `identity` - no mapping.
|
||||
* `hostnet` - use host network, and inter-container communication is done via host gateway and published ports.
|
||||
* `cntnet` - create a container and use it via `--network container:name` (inter-container communication via `localhost`).
|
||||
* `publishall` - publish all ports to host (using `-P`) and communicate via gateway.
|
||||
|
||||
## Examples
|
||||
|
||||
@ -22,30 +40,29 @@ When testing the `AWX`, if you got errors just wait for db migrations to end.
|
||||
|
||||
### Working Example
|
||||
|
||||
Tested on latest podman (commit `349e69..` on 2019-03-11)
|
||||
*Tested on latest ``podman`` (commit `349e69..` on 2019-03-11).*
|
||||
|
||||
By using many containers on a single pod that shares the network (services talk via localhost)
|
||||
By using many containers on a single pod that shares the network (services talk
|
||||
via localhost):
|
||||
|
||||
```
|
||||
./podman-compose.py -t 1podfw -f examples/awx3/docker-compose.yml up
|
||||
```
|
||||
|
||||
Or by reusing a container network and `--add-host`
|
||||
Or by reusing a container network and `--add-host`:
|
||||
|
||||
```
|
||||
$ ./podman-compose.py -t cntnet -f examples/awx3/docker-compose.yml up
|
||||
```
|
||||
|
||||
Or by using host network and localhost works as in
|
||||
Or by using host network and localhost works as follows:
|
||||
|
||||
```
|
||||
$ ./podman-compose.py -t hostnet -f examples/awx3-hostnet-localhost/docker-compose.yml up
|
||||
```
|
||||
|
||||
### in progress work
|
||||
|
||||
### Work in progress
|
||||
|
||||
```
|
||||
./podman-compose.py -t 1pod -f examples/awx3/docker-compose.yml up
|
||||
```
|
||||
|
||||
|
11
scripts/clean_up.sh
Executable file
11
scripts/clean_up.sh
Executable file
@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
find . -name "*.pyc" -exec rm -rf {} \;
|
||||
find . -name "__pycache__" -exec rm -rf {} \;
|
||||
find . -name "*.orig" -exec rm -rf {} \;
|
||||
rm -rf .cache/
|
||||
rm -rf build/
|
||||
rm -rf builddocs/
|
||||
rm -rf dist/
|
||||
rm -rf deb_dist/
|
||||
rm src/podman-compose.egg-info -rf
|
||||
rm builddocs.zip
|
5
scripts/make_release.sh
Executable file
5
scripts/make_release.sh
Executable file
@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
./scripts/uninstall.sh
|
||||
./scripts/clean_up.sh
|
||||
python setup.py register
|
||||
python setup.py sdist bdist_wheel upload
|
3
scripts/uninstall.sh
Executable file
3
scripts/uninstall.sh
Executable file
@ -0,0 +1,3 @@
|
||||
#!/usr/bin/env bash
|
||||
pip uninstall podman-compose -y
|
||||
./scripts/clean_up.sh
|
54
setup.py
Normal file
54
setup.py
Normal file
@ -0,0 +1,54 @@
|
||||
import os
|
||||
from setuptools import setup, find_packages
|
||||
|
||||
try:
|
||||
readme = open(os.path.join(os.path.dirname(__file__), 'README.md')).read()
|
||||
except:
|
||||
readme = ''
|
||||
|
||||
version = '0.1'
|
||||
|
||||
setup(
|
||||
name='podman-compose',
|
||||
version=version,
|
||||
description="A script to run docker-compose.yml using podman",
|
||||
long_description=readme,
|
||||
classifiers=[
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 2",
|
||||
"Programming Language :: Python :: 2.7",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.5",
|
||||
"Programming Language :: Python :: 3.6",
|
||||
"Programming Language :: Python :: 3.7",
|
||||
"Intended Audience :: Developers",
|
||||
"Operating System :: OS Independent",
|
||||
"Development Status :: 3 - Alpha",
|
||||
"Topic :: Software Development :: Build Tools",
|
||||
"License :: OSI Approved :: GNU General Public License v2 (GPLv2)",
|
||||
],
|
||||
keywords='podman, podman-compose',
|
||||
author='Artur Barseghyan',
|
||||
author_email='artur.barseghyan@gmail.com',
|
||||
url='https://github.com/barseghyanartur/tld',
|
||||
package_dir={'': '.'},
|
||||
py_modules=['podman_compose'],
|
||||
packages=find_packages(where='./src'),
|
||||
entry_points={
|
||||
'console_scripts': [
|
||||
'podman-compose = podman_compose:main'
|
||||
]
|
||||
},
|
||||
include_package_data=True,
|
||||
license='GPL-2.0-only',
|
||||
install_requires=[
|
||||
'pyyaml'
|
||||
],
|
||||
# test_suite='tests',
|
||||
# tests_require=[
|
||||
# 'coverage',
|
||||
# 'pytest-cov',
|
||||
# 'pytest',
|
||||
# 'tox',
|
||||
# ]
|
||||
)
|
Loading…
Reference in New Issue
Block a user