Commit 5e67a4d0 authored by Hilal Ozdemir's avatar Hilal Ozdemir

Merge branch '314-make-beiran-docker-plugin-a-separate-package' into...

Merge branch '314-make-beiran-docker-plugin-a-separate-package' into 315-make-beiran-k8s-plugin-a-separate-package
parents b20d207e 8d8132e0
......@@ -191,7 +191,7 @@ start_test_services:
- |
for node in beiran1 beiran2 beiran3 beiran4 beiran5 beiran6 beiran7
docker cp $HOME/tar-split $(docker-compose ps -q $node):/opt/beiran/plugins/beiran_package_docker/tar-split
docker cp $HOME/tar-split $(docker-compose ps -q $node):/opt/beiran_package_docker/beiran_package_docker/tar-split
......@@ -8,29 +8,20 @@ RUN apt-get update && apt-get -y install \
--no-install-recommends \
python3-pip git curl make libsqlite3-dev libyajl-dev libyajl2
RUN mkdir -p /opt/beiran/beiran
COPY beiran /opt/beiran/beiran
COPY /opt/beiran/
COPY /opt/beiran/
COPY plugins/beiran_package_docker /opt/beiran_package_docker/
COPY --from=tar-split-builder /tar-split /opt/beiran_package_docker/beiran_package_docker/tar-split
ADD beiran/requirements.txt /opt/beiran/r-lib.txt
RUN pip install -r /opt/beiran/r-lib.txt
WORKDIR /opt/beiran
RUN python install
ADD plugins/beiran_package_docker/requirements.txt /opt/beiran/r-docker.txt
RUN pip install -r /opt/beiran/r-docker.txt
ADD plugins/beiran_interface_k8s/requirements.txt /opt/beiran/r-k8s.txt
RUN pip install -r /opt/beiran/r-k8s.txt
# ADD plugins/beiran_package_npm/requirements.txt /opt/beiran/r-npm.txt
# RUN pip install -r /opt/beiran/r-npm.txt
COPY --from=tar-split-builder /tar-split /opt/beiran/plugins/beiran_package_docker/tar-split
WORKDIR /opt/beiran_package_docker
RUN python install
RUN echo 'alias beiran="python -m beiran.cli"\nalias beirand="python -m beiran.daemon"\n' > /root/.bashrc
ADD [ "beiran", "/opt/beiran/beiran" ]
ADD [ "plugins", "/opt/beiran/plugins" ]
ENV PYTHONPATH=/opt/beiran:/opt/beiran/plugins
VOLUME /var/lib/beiran
......@@ -11,5 +11,7 @@ aiofiles==0.3.2
\ No newline at end of file
......@@ -29,8 +29,8 @@ import asyncio
import grpc
from beiran.util import run_in_loop
from beiran_package_docker.models import DockerImage
from beiran_package_docker.api import ImageList
from plugins.beiran_package_docker.beiran_package_docker.models import DockerImage
from plugins.beiran_package_docker.beiran_package_docker.api import ImageList
from .api_pb2_grpc import ImageServiceServicer, ImageServiceStub
from .api_pb2 import ImageStatusResponse
This diff is collapsed.
Developer Certificate of Origin
Version 1.1
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129
Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.
Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
\ No newline at end of file
......@@ -28,11 +28,11 @@ import sys
import click
from tabulate import tabulate
from beiran_package_docker.util import DockerUtil
from beiran.util import json_streamer
from beiran.util import sizeof_fmt
from beiran.multiple_progressbar import MultipleProgressBar
from beiran.cli import pass_context
from .util import DockerUtil
......@@ -29,18 +29,18 @@ from aiodocker import Docker
from aiodocker.exceptions import DockerError
from peewee import SQL
from beiran_package_docker.image_ref import del_idpref
from beiran_package_docker.models import DockerImage, DockerLayer
from beiran_package_docker.models import MODEL_LIST
from beiran_package_docker.util import DockerUtil
from beiran_package_docker.api import ROUTES
from beiran_package_docker.api import Services as ApiDependencies
from beiran.config import config
from beiran.plugin import BasePackagePlugin, History
from beiran.models import Node
from beiran.daemon.peer import Peer
from .image_ref import del_idpref
from .models import DockerImage, DockerLayer
from .models import MODEL_LIST
from .util import DockerUtil
from .api import ROUTES
from .api import Services as ApiDependencies
PLUGIN_NAME = 'docker'
PLUGIN_TYPE = 'package'
# Beiran P2P Package Distribution Layer
# Copyright (C) 2019 Rainlab Inc & Creationline, Inc & Beiran Contributors
# Rainlab Inc.
# Creationline, Inc.">
# Beiran Contributors
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <>.
""" for packaging beiran"""
from setuptools import setup, find_packages
REQUIREMENTS_PATH = 'requirements.txt'
def read_requirements(path):
"""Read requirements.txt and return a list of requirements."""
with open(path, 'r') as file:
reqs =
return reqs
def read_long_description():
"""Read a file written about long description of the package."""
with open("", "r") as file:
long_description =
return long_description
def find_beiran_packages():
"""Find beiran package."""
return find_packages(
# exclude=["plugins", "doc", "helpers",]
def get_version():
Reads VERSION file
(str): plugin version
with open('VERSION', 'r') as file:
version =
return version
description="Beiran Docker Plugin",
keywords=['beiran', 'docker', 'p2p package manager', 'system tools'],
"Development Status :: 3 - Alpha",
"Intended Audience :: System Administrators",
"Topic :: System :: Software Distribution"
"Topic :: System :: Systems Administration",
"Programming Language :: Python :: 3",
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", # ???
"Operating System :: OS Independent",
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment