forked from extern/podman-compose
commit
2d3e29e6f6
1
.gitignore
vendored
1
.gitignore
vendored
@ -20,6 +20,7 @@ parts/
|
||||
sdist/
|
||||
var/
|
||||
wheels/
|
||||
.idea/
|
||||
*.egg-info/
|
||||
.installed.cfg
|
||||
*.egg
|
||||
|
55
README.md
55
README.md
@ -1,20 +1,36 @@
|
||||
# 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
|
||||
## Installation
|
||||
|
||||
it's still underdevelopment and does not work yet.
|
||||
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 +38,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
|
||||
podman-compose -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
|
||||
podman-compose -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
|
||||
podman-compose -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
|
||||
podman-compose -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
|
6
scripts/make_release.sh
Executable file
6
scripts/make_release.sh
Executable file
@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
./scripts/uninstall.sh
|
||||
./scripts/clean_up.sh
|
||||
python setup.py register
|
||||
python setup.py sdist bdist_wheel
|
||||
twine upload dist/*
|
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
|
53
setup.py
Normal file
53
setup.py
Normal file
@ -0,0 +1,53 @@
|
||||
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.3'
|
||||
|
||||
setup(
|
||||
name='podman-compose',
|
||||
version=version,
|
||||
description="A script to run docker-compose.yml using podman",
|
||||
long_description=readme,
|
||||
long_description_content_type='text/markdown',
|
||||
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='Muayyad Alsadi',
|
||||
author_email='alsadi@gmail.com',
|
||||
url='https://github.com/muayyad-alsadi/podman-compose',
|
||||
py_modules=['podman_compose'],
|
||||
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