reTHINK-project / dev-registry-global

Global Registry
Apache License 2.0
4 stars 0 forks source link

Docker container #9

Closed sgoendoer closed 7 years ago

sgoendoer commented 8 years ago

As of now, deployment of the GlobalRegistry has to be done manually. A detailed step-by-step description can be found in the Wiki: https://github.com/reTHINK-project/dev-registry-global/wiki/Deployment-on-Debian-Ubuntu. For the future, a Docker image should be created.

sgoendoer commented 8 years ago

A build description for Eclipse/Maven has been added to the Wiki: https://github.com/reTHINK-project/dev-registry-global/wiki/Building-GReg-via-Eclipse-Maven

sgoendoer commented 8 years ago

A build description for a Docker container has been added to the Wiki: https://github.com/reTHINK-project/dev-registry-global/wiki/Dockerfile-creation

As this refuses to build on my MacOSX for some reason, can someone please follow the instructions to verify the validity of the guide?

nunofmn commented 8 years ago

I think the script will need some adaptations in order to be able to run under Docker. We will try to run it today or next monday and then we will get back to you.

emmelmann-fokus commented 8 years ago

In case you need some "inspiration", you might consider looking at the dev-catalogue repository.

The dev-catalogue repository provides several docker image files that work / can be generated at Docker Hub.

Relevant files are:

/Dockerfile and /docker/*

Note, that the /Dockerfile is required as we do not have public github repositories right now. The /Dockerfile result in the rethink/dev-catalogue "master" which has a checked-out repo in it and from which all other docker images (in /docker/*) are derived from.

nunofmn commented 8 years ago

The problem it seems that is related with running the init.dscript for the daemon/service. Docker containers don't come with an init system by default. It seems that there is a way using supervisor. I will test it and report further developments.

nunofmn commented 8 years ago

Added a working Dockerfile. I made the following changes:

This solution is a little redundant since supervisor is "daemonizing a daemon" (the one built with jsvc interface).

The best solution would be to remove the jsvc dependency and run as a simple application. Then if there is a need to execute the app as a daemon (outside or inside a container) it could be daemonized using supervisor.

sgoendoer commented 8 years ago

Hi,

thanks for looking into this. I added 5001 to the exported ports as it is used by TomP2P.

Anyhow, I still cannot build the docker image on my MacOSX as it stalls for some reason. More specific, the apt-get install is run and it stalls at Setting up ca-certificates-java (20130815ubuntu1) ...

nunofmn commented 8 years ago

It seems it is a problem within Docker. https://github.com/docker/docker/issues/18180

What docker version do you have?

sgoendoer commented 8 years ago

Same version the guy who posted the issue:

$ docker version
Client:
 Version:      1.9.1
 API version:  1.21
 Go version:   go1.4.3
 Git commit:   a34a1d5
 Built:        Fri Nov 20 17:56:04 UTC 2015
 OS/Arch:      darwin/amd64
nunofmn commented 8 years ago
$ docker version
Client:
 Version:      1.9.0
 API version:  1.21
 Go version:   go1.4.3
 Git commit:   76d6bc9
 Built:        Tue Nov  3 19:20:09 UTC 2015
 OS/Arch:      darwin/amd64

Explains why I'm able to build the image.

nunofmn commented 8 years ago

docker-machine create -d virtualbox --virtualbox-boot2docker-url=https://github.com/boot2docker/boot2docker/releases/download/v1.9.0/boot2docker.iso

Try to create a docker-machine this way, and build the docker image.

sbecot commented 8 years ago

On the testbed I also have 1.9.1 . As I understand I can't build the image. But if I download a built image, can I execute it, without the need to reinstall docker?

nunofmn commented 8 years ago

The image referenced in the command, is the docker-machine/VM image (the docker host). But if someone builds the container image, it should be possible to execute it.

emmelmann-fokus commented 8 years ago

Just a note: Docker has in December upgraded their (client) implementation abandoning backward-compatibility (see below). You might all have to upgrade to the newest available client for your system:

Dear User,

This is a final reminder about the upcoming deprecation for support of clients versioned 1.5 and earlier in Docker Hub. Pushes for these clients to Docker Hub will be disabled tomorrow (November 19). These deprecated versions will still be able to pull images. And repositories will be fully accessible via newer versions of the Docker client.

On December 7, 2015, pulls via clients 1.5 and earlier will be disabled. Only version 1.6 or later will be supported.

Handling this migration is simple; all that you need to do is upgrade your Docker client to version 1.6 or later. Please be sure to upgrade any clients that are pushing or pulling from your repository, including those on development machines, product servers, or that are part of CI and CD workflows.

If you have any questions, please to not hesitate to contact us.

Best regards,

The Docker Hub Team

sbecot commented 8 years ago

What if we want to use automated dockerhub build? I suppose we don't choose the client version. If it is a bugged version the docker hub automated build will always fail.

sgoendoer commented 8 years ago

A problem might be that the resulting image will be rather large (600MB?)

emmelmann-fokus commented 8 years ago

Don't know regarding the 600MB limit.

We can try to set up a (public) docker hub build next week when I'm back in the office. If you would like to do that, trigger me again after Tuesday next week.

sbecot commented 7 years ago

The page

https://github.com/reTHINK-project/dev-registry-global/wiki/Deployment-on-Debian-Ubuntu.

doesn't exist (any more?). The process to build on ubuntu is unclear, I tried to use maven (without eclipse) but I have dependencies issues.

sgoendoer commented 7 years ago

Hello, the Page still exists and is reachable via https://github.com/reTHINK-project/dev-registry-global/wiki/Deployment-on-Debian-Ubuntu:

Anyhow, we are currently working on a Spring-based, dockerized version of the GReg that will probably be much easier to setup and maintain.

sbecot commented 7 years ago

Ok, thank you, but I notice that this page doesn't explain how to compile it without eclipse. Maybe the D6.1 will help

sgoendoer commented 7 years ago

Please confer to https://github.com/reTHINK-project/dev-registry-global/wiki/Building-GReg-via-Eclipse-Maven

sbecot commented 7 years ago

Well without Eclipse :-).

sgoendoer commented 7 years ago

Are you using any other IDE? IntelliJ perhaps?

emmelmann-fokus commented 7 years ago

Just a side note: installation should also work without an IDE, right?!

sbecot commented 7 years ago

Right, I just want to: git clone, configure, build, run. Or even just run if a docker image is available. Anyway, this is a testbed machine, so I don't have any IDE on it, I just access throught putty. Each block of the project has a different techno: java, node, etc... Installating a complete development suite for each one is not possible.

emmelmann-fokus commented 7 years ago

Please note that for WP-6, the final result will have to be provided in a docker that is ready to run anyway as we agreed to move towards docker compose for providing (backbone) testbed components.

sbecot commented 7 years ago

Ok. We are then waiting for the docker version. By the way, we managed to install it, it is accessible here http://161.106.2.23:5002/