Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a module for building yagna Docker images #325

Merged
merged 19 commits into from
Nov 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name: Configure python 3.7
- name: Configure python 3.8
uses: actions/setup-python@v2
with:
python-version: '3.7'
python-version: '3.8'

- name: Print python and pip version
run: python --version && pip --version
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ The Yagna Integration project, intending to build the Integration Harness around

### Python setup

#### Python 3.7
The test runner requires Python 3.7+ to be installed on the system. You can check your currently installed Python version by running:
#### Python 3.8
The test runner requires Python 3.8+ to be installed on the system. You can check your currently installed Python version by running:
```
python3 --version
```
Expand Down
7 changes: 0 additions & 7 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,6 @@ services:

router:
image: yagna-goth
build:
context: .
dockerfile: yagna-goth.Dockerfile
args:
GITHUB_API_TOKEN: $GITHUB_API_TOKEN
YAGNA_BRANCH: ${YAGNA_BRANCH:-master}
YAGNA_COMMIT_HASH: $YAGNA_COMMIT_HASH
entrypoint: /usr/bin/ya_sb_router
command: ["-l", "tcp://0.0.0.0:7477"]

Expand Down
205 changes: 0 additions & 205 deletions docker/download_artifacts.py

This file was deleted.

76 changes: 0 additions & 76 deletions docker/download_release.py

This file was deleted.

20 changes: 4 additions & 16 deletions docker/yagna-goth.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,8 @@
FROM python:3.8.6-alpine3.12 AS downloader
ARG GITHUB_API_TOKEN
ARG YAGNA_BRANCH
ARG YAGNA_COMMIT_HASH
ENV YAGNA_COMMIT_HASH $YAGNA_COMMIT_HASH
WORKDIR /
COPY download_artifacts.py download_release.py ./
RUN pip install requests \
&& mkdir yagna-binaries \
&& python ./download_artifacts.py -b ${YAGNA_BRANCH} -t ${GITHUB_API_TOKEN} -o yagna-binaries \
&& chmod +x yagna-binaries/* \
&& python ./download_release.py -t ${GITHUB_API_TOKEN} ya-runtime-wasi

FROM debian:bullseye-slim
COPY --from=downloader /*.deb ./
COPY --from=downloader /yagna-binaries/* /usr/bin/
RUN apt update \
COPY deb/* ./
COPY bin/* /usr/bin/
RUN chmod +x /usr/bin/* \
&& apt update \
&& apt install -y ./*.deb \
&& apt install -y libssl-dev \
&& ln -s /usr/bin/exe-unit /usr/lib/yagna/plugins/exe-unit
Expand Down
5 changes: 3 additions & 2 deletions goth/runner/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

from goth.assertions import TemporalAssertionError
from goth.runner.agent import AgentMixin
from goth.runner.container.build import YagnaBuildEnvironment
from goth.runner.container.compose import ComposeNetworkManager, DEFAULT_COMPOSE_FILE
from goth.runner.container.yagna import YagnaContainerConfig
from goth.runner.log import LogConfig
Expand Down Expand Up @@ -99,8 +100,8 @@ def __init__(
api_assertions_module: Optional[str],
logs_path: Path,
assets_path: Path,
build_environment: YagnaBuildEnvironment,
compose_file_path: Path = DEFAULT_COMPOSE_FILE,
compose_build_env: Optional[dict] = None,
web_server_port: int = DEFAULT_WEB_SERVER_PORT,
):
self.api_assertions_module = api_assertions_module
Expand All @@ -112,7 +113,7 @@ def __init__(
self._compose_manager = ComposeNetworkManager(
docker_client=docker.from_env(),
compose_path=compose_file_path,
environment=compose_build_env,
build_environment=build_environment,
)
self._web_server = WebServer(assets_path / "web-root", web_server_port)

Expand Down
Loading