question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Share (Project) files between two machines in workspace

See original GitHub issue

I’d like to easily share files between different machines in workspace. basically i want the /project files available on all machines - is there a best practice for that? I started with a workspace recipe looks like that

services:
  dev-machine:
    image: my-dtr.de/cloudia/6i-sdk
  rt-machine:
    image: my-dtr.de/cloudia/6i-runtime

On the dev-machine is the compiler, and my command triggers the make. The result of the build (executables) are lying on the same dev-machine. But they should be executed on runtime-machine. So i kind of need to copy and launch it there.

  • I tried with CHE_WORKSPACE_VOLUME=/chetmp:/chetmp in the che.env file, but this created a shared volume /chetmp only available on the dev-machine - not available on the rt-machine
  • additionally i started to extend the recipe/compose file with the two machines by using volumes_from like this:
services:
  dev-machine:
    image: my-dtr.de/cloudia/6i-sdk
  rt-machine:
    image: my-dtr.de/cloudia/6i-runtime
    depends_on:
      - dev-machine
    links:
      - dev-machine
    volumes_from:
      - dev-machine

but in the rt-machine-terminal I could not see the /chetmp folder that i expected would be shared. adding a volume to the compose file:

services:
  dev-machine:
    image: my-dtr.de/cloudia/6i-sdk
	volumes:
      - /chetmp2:/chetmp2
  ...

does throw an Error on saying:

Volumes binding is forbidden but found in machine ‘dev-machine’ of environment ‘default’

How can i access the files from dev-machine:/projects/my-project/ from the rt-machine?

OS and version:
Ubuntu 16.04. docker 17.06.0-ce che 5.14

Diagnostics:

docker run -ti --rm -v /var/run/docker.sock:/var/run/docker.sock -v /home/sg82fe/che/5.14/:/data eclipse/che:5.14.0 info
WARNING: No swap limit support
INFO: Proxy: HTTP_PROXY=http://172.17.0.1:3128/, HTTPS_PROXY=http://172.17.0.1:3128/, NO_PROXY=172.17.0.1,localhost,127.0.0.1
INFO: (che cli): 5.14.0 - using docker 17.06.0-ce / native

CLI:
 TTY:            true
 Daemon:         /var/run/docker.sock
 Image:          eclipse/che:5.14.0
 Version:        5.14.0
 Command:        info
 Parameters:     info
Mounts:
 /data:          /home/sg82fe/che/5.14/
 /data/instance: not set
 /data/backup:   not set
 /repo:          not set
 /assembly:      not set
 /sync:          not set
 /unison:        not set
 /chedir:        not set
System:
 Docker:         native
 Proxy:          HTTP_PROXY=http://172.17.0.1:3128/, HTTPS_PROXY=http://172.17.0.1:3128/, NO_PROXY=172.17.0.1,localhost,127.0.0.1
Internal:
 CHE_VERSION:    5.14.0
 CHE_HOST:       10.61.186.132
 CHE_INSTANCE:   /home/sg82fe/che/5.14//instance
 CHE_CONFIG:     /home/sg82fe/che/5.14/
 CHE_BACKUP:     /home/sg82fe/che/5.14//backup
 CHE_REGISTRY:   /version
 CHE_DEBUG:      false
 IP Detection:   10.61.186.132
 Initialized:    true
Image Registry:
 IMAGE_INIT=eclipse/che-init:5.14.0
 IMAGE_CHE=eclipse/che-server:5.14.0
 IMAGE_COMPOSE=docker/compose:1.8.1
 IMAGE_TRAEFIK=traefik:v1.3.0-rc3
 BOOTSTRAP_IMAGE_ALPINE=alpine:3.4
 BOOTSTRAP_IMAGE_CHEIP=eclipse/che-ip:5.14.0
 UTILITY_IMAGE_CHEACTION=eclipse/che-action:5.14.0
 UTILITY_IMAGE_CHEDIR=eclipse/che-dir:5.14.0
 UTILITY_IMAGE_CHETEST=eclipse/che-test:5.14.0
 UTILITY_IMAGE_CHEMOUNT=eclipse/che-mount:5.14.0
che.env:
 CHE_HOST=10.61.186.132
 CHE_HTTP_PROXY=http://172.17.0.1:3128/
 CHE_HTTPS_PROXY=http://172.17.0.1:3128/
 CHE_NO_PROXY=172.17.0.1,localhost,127.0.0.1,10.61.186.132
 CHE_WORKSPACE_HTTP__PROXY=http://172.17.0.1:3128/
 CHE_WORKSPACE_HTTPS__PROXY=http://172.17.0.1:3128/
 CHE_WORKSPACE_NO__PROXY=che-host,172.17.0.1,localhost,127.0.0.1,10.61.186.132
 CHE_WORKSPACE_VOLUME=/chetmp:/chetmp
 CHE_SINGLE_PORT=false

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7

github_iconTop GitHub Comments

2reactions
ghostcommented, Jul 13, 2017

@sg82fe Here’s my composefile that worked as expected:

services:
  dev-machine:
    image: eclipse/ubuntu_jdk8
  nginx:
    image: nginx
    depends_on:
      - dev-machine
    volumes_from:
      - dev-machine

Two machines are started, and in nginx machine I can see projects dir:

image

image

0reactions
sg82fecommented, Aug 2, 2017

I must correct the above technical tip - it does not solve - the access-rights of the projects volume are given from the host. The solution that currently works for me is: adding user to the rt-machine that only had a root so far, via Dockerfile

useradd -u1000 user 
USER user 
Read more comments on GitHub >

github_iconTop Results From Across the Web

share workspace into dropbox between two computers - Eclipse
1. Create the project on one computer, get it more or less how you'd · 2. Copy the important parts of the project...
Read more >
Sharing projects across multiple PCs - WireframeSketcher
Sharing individual projects · Select File > Import… > Existing Project into Workspace · Specify the shared folder in Select root directory (i.e....
Read more >
Sharing an Eclipse workspace between two computers
No, the workspace will contain machine-specific information and locations. Share the projects themselves, preferably through a source code ...
Read more >
Week 3: Share & collaborate with files - Google Support
Week 3: Share & collaborate with files. Want to get more out of Google apps at work or school? Sign up for a...
Read more >
Share workspace between two PCs - KNIME Forum
The way I have been doing it is to go to my command line and add the workflow folder, because each individual node...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found