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

Updates sidecar setup and run #199

Merged
merged 36 commits into from
Aug 31, 2018
Merged

Conversation

pcrespov
Copy link
Member

@pcrespov pcrespov commented Aug 24, 2018

What do these changes do?

Upgrades sidecar setup and module structure and fixes some issues.

  • Missing setup.py
  • Missing requirement-dev.txt
  • Non-root user in docker.
  • venv in docker
  • rearrange package structure: main.py, tasks.py, celery.py and utils.py
  • entrypoint script to start as root and run as scu

Extra fixes on webserver

  • retreived config files as resources
  • modified Dockerfile: should replicate the way we test in source
    • keeps same relative folder structure
    • all 3erd, 2nd and main packages install in a venv
    • runs as a non-root user
    • boot script

Related issue number

Checklist

  • I think the code is well written
  • Unit tests for the changes exist
  • ~ Documentation reflects the changes~
  • If you design a new module, add your user to .github/CODEOWNERS

@mguidon, @sanderegg

@ghost ghost assigned pcrespov Aug 24, 2018
@ghost ghost added the review label Aug 24, 2018
@pcrespov pcrespov changed the title WIP - Is#198/sidecar WIP - is#198/sidecar Aug 24, 2018
 - all volumes bound to /home/scu
 - All modules pip installed (in dev w/ edit mode).
 - All files produce in dev mode on bound volumes are not deletable
 - Production stage is further optimized by taking only venv from base
 - Fixes sidecar access to input/output/log volumes
@pcrespov pcrespov changed the title WIP - is#198/sidecar is#198/sidecar: Updates sidecar setup and run Aug 27, 2018
@pcrespov pcrespov changed the title is#198/sidecar: Updates sidecar setup and run Updates sidecar setup and run Aug 29, 2018
Pedro Crespo added 2 commits August 29, 2018 17:50
 - cleanup Dockerfile
 - minor doc and logs
services/docker-compose.devel.yml Show resolved Hide resolved
VOLUME /home/scu/input
VOLUME /home/scu/output
VOLUME /home/scu/log
#VOLUME /var/run/docker.sock DO NOT EXPOSE .. fails!
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably not needed here?

services/web/server/src/server/settings/config.py Outdated Show resolved Hide resolved
@pcrespov pcrespov added this to the Libra milestone Aug 30, 2018
Copy link
Member

@sanderegg sanderegg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, after calling
make build
I get an error that DOCKER_GID is not defined

pcrespov pushed a commit to pcrespov/osparc-simcore that referenced this pull request Aug 30, 2018
commit 0df033b
Author: Pedro Crespo <crespo@itis.ethz.ch>
Date:   Thu Aug 30 14:21:44 2018 +0200

    Review feedback: removed unnecessary config sections

commit bab7831
Author: Pedro Crespo <crespo@itis.ethz.ch>
Date:   Thu Aug 30 13:59:07 2018 +0200

    Fixes missing dlls

commit c0bc7d6
Author: Pedro Crespo <crespo@itis.ethz.ch>
Date:   Thu Aug 30 11:53:41 2018 +0200

    Fixes access to docker socket:
     - cleanup Dockerfile
     - minor doc and logs

commit 5b6f4c7
Author: Pedro Crespo <crespo@itis.ethz.ch>
Date:   Wed Aug 29 17:47:13 2018 +0200

    Minor cleanup and doc

commit 43f7305
Author: Pedro Crespo <crespo@itis.ethz.ch>
Date:   Wed Aug 29 15:52:30 2018 +0200

    Minor change in web server

commit 7f07022
Author: Pedro Crespo <crespo@itis.ethz.ch>
Date:   Wed Aug 29 15:52:16 2018 +0200

    sidecar: starts as root (via entrypoint) but runs as scu (non-root)

commit 90359c4
Author: Pedro Crespo <crespo@itis.ethz.ch>
Date:   Wed Aug 29 15:51:32 2018 +0200

    Fixes sidecar: temporary fix to connection to other services

commit 7619671
Author: Pedro Crespo <crespo@itis.ethz.ch>
Date:   Wed Aug 29 15:44:42 2018 +0200

    Fixes host in server running inside a docker

commit bdbf078
Author: Pedro Crespo <crespo@itis.ethz.ch>
Date:   Wed Aug 29 15:43:56 2018 +0200

    Separating maintenance services

commit 83e492d
Author: Pedro Crespo <crespo@itis.ethz.ch>
Date:   Wed Aug 29 13:46:55 2018 +0200

    Fixes on web server:
     - removed usused cs_s4l from config
     - added env for rabbit

commit 8fee402
Author: Pedro Crespo <crespo@itis.ethz.ch>
Date:   Wed Aug 29 11:48:46 2018 +0200

    Fixes on webserver: - Tmp  solution for production target based on production-build stage -  Normalized naming of package and console script

commit a5d8220
Author: Pedro Crespo <crespo@itis.ethz.ch>
Date:   Tue Aug 28 22:06:59 2018 +0200

    Implements entry in ITISFoundation#186: - upgrades Dockerfile with .venv and pip installing 3rd parties

commit 3c55bf3
Author: Pedro Crespo <crespo@itis.ethz.ch>
Date:   Tue Aug 28 18:46:57 2018 +0200

    Setting up boot for web service and forgot configs

commit 8003744
Author: Pedro Crespo <crespo@itis.ethz.ch>
Date:   Tue Aug 28 18:40:12 2018 +0200

    Adding config data and retreiving it as resource

commit 94de3d7
Author: Pedro Crespo <crespo@itis.ethz.ch>
Date:   Tue Aug 28 10:58:02 2018 +0200

    Minor changes in docker after discussion with MaG

commit e663a1e
Author: Pedro Crespo <crespo@itis.ethz.ch>
Date:   Mon Aug 27 22:08:38 2018 +0200

    Updated ownership

commit bf486b3
Author: Pedro Crespo <crespo@itis.ethz.ch>
Date:   Mon Aug 27 21:53:12 2018 +0200

    Fixes linting errors and added notes

commit 752c7bf
Author: Pedro Crespo <crespo@itis.ethz.ch>
Date:   Mon Aug 27 19:49:39 2018 +0200

    WIP ITISFoundation#198: non-root user
     - all volumes bound to /home/scu
     - All modules pip installed (in dev w/ edit mode).
     - All files produce in dev mode on bound volumes are not deletable
     - Production stage is further optimized by taking only venv from base
     - Fixes sidecar access to input/output/log volumes

commit ec755bc
Author: Pedro Crespo <crespo@itis.ethz.ch>
Date:   Fri Aug 24 21:53:13 2018 +0200

    WIP ITISFoundation#198:
     - added a boot.sh script to start celery worker
     - restructured package submodules. Otherwise got error (see comments in ITISFoundation#198)
     -

commit 9bbfbde
Author: Pedro Crespo <crespo@itis.ethz.ch>
Date:   Fri Aug 24 21:52:12 2018 +0200

    Minor update

commit 53c7707
Author: Pedro Crespo <crespo@itis.ethz.ch>
Date:   Fri Aug 24 20:29:26 2018 +0200

    Fixes import failure of trafaret and updages vs sqalquemy

commit a27a279
Author: Pedro Crespo <crespo@itis.ethz.ch>
Date:   Fri Aug 24 20:24:49 2018 +0200

    WIP ITISFoundation#198: setup for sidecar
     - created setup and requirements for dev&prod
     - installs package in docker (instead of reference via sys.path). this way all third-parties are installed.
     - minor cleanup of code

commit bbc7cb6
Author: Pedro Crespo <crespo@itis.ethz.ch>
Date:   Fri Aug 24 20:22:31 2018 +0200

    Minor: sync req versions
Copy link
Member

@mguidon mguidon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pair review done

@sanderegg
Copy link
Member

sanderegg commented Aug 31, 2018

so this does not work on Windows. There is no docker group so anyone mounting the docker socket as standard user is not able to access the docker engine when running from a windows host.

@pcrespov pcrespov merged commit 89c582c into ITISFoundation:master Aug 31, 2018
@ghost ghost removed the review label Aug 31, 2018
@pcrespov pcrespov deleted the is#198/sidecar branch September 18, 2018 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create setup for sidecar
3 participants