Skip to content

Commit

Permalink
Merge pull request #9 from Kapim/master
Browse files Browse the repository at this point in the history
separation of services
  • Loading branch information
Kapim authored Dec 12, 2019
2 parents 1fc849e + d11364d commit 5c7f9f3
Show file tree
Hide file tree
Showing 11 changed files with 98 additions and 35 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Dockerfile
docker/docker-compose.yml
7 changes: 7 additions & 0 deletions Dockerfile-arserver
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM arcor2/arcor2_base

RUN ln -s /root/arcor2/docker/start-arserver.sh /start.sh

expose 6789

CMD /start.sh
21 changes: 21 additions & 0 deletions Dockerfile-base
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM python:3

RUN cd \
&& git clone https://github.com/capripot/wait-for.git \
&& cd wait-for \
&& git checkout http-tests \
&& cp wait-for /wait-for

RUN pip install --upgrade setuptools PyYAML

COPY . /root/arcor2/

RUN cd ~/arcor2 \
&& pip install -e .

RUN mkdir -p ~/project
ENV PYTHONPATH ~
ENV ARCOR2_PROJECT_PATH /root/project


CMD ["/bin/sh", "/start.sh"]
4 changes: 4 additions & 0 deletions Dockerfile-build
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM arcor2/arcor2_base

RUN ln -s /root/arcor2/docker/start-build.sh /start.sh

3 changes: 3 additions & 0 deletions Dockerfile-execution
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM arcor2/arcor2_base

RUN ln -s /root/arcor2/docker/start-execution.sh /start.sh
35 changes: 0 additions & 35 deletions arcor2/docker/docker-compose.yml

This file was deleted.

1 change: 1 addition & 0 deletions arcor2/nodes/server.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ async def project_manager_client() -> None:
await logger.info("Attempting connection to manager...")

try:

async with websockets.connect(MANAGER_URL) as manager_client:

await logger.info("Connected to manager.")
Expand Down
49 changes: 49 additions & 0 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
version: '3'

services:
arserver:
image: arcor2/arcor2_kinali
container_name: arserver
depends_on:
- project
- build
- execution
ports:
- "6789:6789"
environment:
- ARCOR2_PERSISTENT_STORAGE_URL=http://project:11000
- ARCOR2_EXECUTION_URL=ws://execution:6790
build:
image: arcor2/arcor2_build
container_name: build
execution:
image: arcor2/arcor2_execution
container_name: execution
environment:
- ARCOR2_BUILDER_URL=http://build:5007
project:
image: kinalisoft/storage:0.6.1
container_name: "project"
ports:
- "11000-11001:11000-11001"
environment:
MONGODB_URL: mongodb:27017
links:
- mongodb
depends_on:
- mongodb

mongodb:
image: mongo:4.2.0-bionic
container_name: "mongodb"
environment:
- MONGO_DATA_DIR=/data/db
- MONGO_LOG_DIR=/dev/null
volumes:
- mongodb:/data/db
expose:
- "27017"

volumes:
mongodb:

5 changes: 5 additions & 0 deletions docker/start-arserver.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

cd /root/arcor2/arcor2/user_objects || exit
python upload.py
arcor2_server
3 changes: 3 additions & 0 deletions docker/start-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

arcor2_builder
3 changes: 3 additions & 0 deletions docker/start-execution.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

arcor2_manager

0 comments on commit 5c7f9f3

Please sign in to comment.