Project Activity #6681

Project WP #629: WP4 - VREs Deployment and Operation [Months: 1-30]

Project Task #633: T4.4 Software integration and release [Months: 1-29]

Distribution of gCube software in Docker containers

Added by Gabriele Giammatteo almost 3 years ago. Updated over 1 year ago.

Status:ClosedStart date:Mar 01, 2017
Priority:NormalDue date:
Assignee:Gabriele Giammatteo% Done:

100%

Sprint:WP04
Participants:1 - CNR, 3 - ENG
Milestones:
Duration:

Description

This activity aims at distributing gCube services embedded in Docker containers. Creation and publication of Docker containers should be automated and integrated in the gCube release cycle.

This task will be detailed with subtasks as new sub-activities are identified.


Related issues

Related to BlueBRIDGE - Support #9876: admin token generator randomly accepting FQDNs for token ... Closed Oct 02, 2017

History

#1 Updated by Daniele Pavia over 2 years ago

  • % Done changed from 0 to 20
  • Status changed from New to In Progress

I've pushed an ansible role that builds a smartgears-bundle docker image, based on openjdk:7 docker image on docker hub, to CNR's gitorious repository.

@andrea.dellamico@isti.cnr.it will check it out and integrate it with CNR's infrastructure. As of now, no service is getting automatically deployed on top of the container's smartgears instance.

It would be interesting to know with which service it would make sense to begin.

Also, which way to go about it makes sense the most. For e.g., either a or b:

a) deploy the service on the local filesystem and have the container point at that location by mapping the container's "webapps" dir to the local filesystem.
b) build another container on top the "smartgears_whn" container. One for each service.

#2 Updated by Andrea Dell'Amico over 2 years ago

Daniele Pavia wrote:

I've pushed an ansible role that builds a smartgears-bundle docker image, based on openjdk:7 docker image on docker hub, to CNR's gitorious repository.

@andrea.dellamico@isti.cnr.it will check it out and integrate it with CNR's infrastructure. As of now, no service is getting automatically deployed on top of the container's smartgears instance.

It would be interesting to know with which service it would make sense to begin.

Also, which way to go about it makes sense the most. For e.g., either a or b:

a) deploy the service on the local filesystem and have the container point at that location by mapping the container's "webapps" dir to the local filesystem.
b) build another container on top the "smartgears_whn" container. One for each service.

The second option is more in line with the containers philosophy. It's also cleaner.

#3 Updated by Daniele Pavia over 2 years ago

Andrea Dell'Amico wrote:

The second option is more in line with the containers philosophy. It's also cleaner.

Agreed, I was just curious about which is CNR's preferred way. Would you suggest with which service would it make sense to start?

Thanks for the feedback.

#4 Updated by Daniele Pavia over 2 years ago

  • % Done changed from 20 to 30

I'm working on a ubuntu 16.04 docker base image that incorporates tomcat, Oracle JDK and sshd to enable the provisioning of smartgears inside docker containers. The container builds succesfully, at this point I'm working my way through running the ansible smartgears roles against it.

#5 Updated by Daniele Pavia about 2 years ago

  • Related to Support #9876: admin token generator randomly accepting FQDNs for token generation added

#6 Updated by Daniele Pavia about 2 years ago

  • % Done changed from 30 to 100
  • Status changed from In Progress to Feedback

Pushed the following files to the ansible-playbooks repo @CNR:

  • d4science-ghn-cluster/smartgears-base-image.yml - playbook used to run smartgears-base-image
  • /library/roles/smartgears/smartgears-base-image/ - builds ubuntu14.04+smartgears based docker images, optionally using OpenJDK instead of the Oracle JDK
  • /library/roles/smartgears/smartgears-container-bootstrap/ - runs/replaces a smartgears container using the provided params
  • /library/roles/smartgears/smartgears-container-home-library/ - simple example role to build an home library docker image based off the smartgears base image

There are a few things here and there that need some adjustment, but the container images are effectively working fine. I'd like to ask to @andrea.dellamico@isti.cnr.it to take a look at this stuff and provide some feedback if needed.

#8 Updated by Andrea Dell'Amico about 2 years ago

Daniele Pavia wrote:

Pushed the following files to the ansible-playbooks repo @CNR:

  • d4science-ghn-cluster/smartgears-base-image.yml - playbook used to run smartgears-base-image

Why the target host is shinyproxy?

  • /library/roles/smartgears/smartgears-base-image/ - builds ubuntu14.04+smartgears based docker images, optionally using OpenJDK instead of the Oracle JDK
  • /library/roles/smartgears/smartgears-container-bootstrap/ - runs/replaces a smartgears container using the provided params
  • /library/roles/smartgears/smartgears-container-home-library/ - simple example role to build an home library docker image based off the smartgears base image

There are a few things here and there that need some adjustment, but the container images are effectively working fine. I'd like to ask to @andrea.dellamico@isti.cnr.it to take a look at this stuff and provide some feedback if needed.

You are using 'shinyproxy' as a target in more than one place. That's dangerous, because a shinyproxy environment exists in production here.
There also a token in clear text inside the defaults of one of the roles. That kind information should go into a vault file, possibly inside a group_vars or host_vars subdirectory.

#9 Updated by Daniele Pavia almost 2 years ago

Hi @andrea.dellamico@isti.cnr.it , I changed the references to "shinyproxy" with a placeholder ("dockerbuilder") and removed the test token too. Please let me know if you have further feedback so that I can close this ticket eventually.

#10 Updated by Andrea Dell'Amico almost 2 years ago

It's OK for me.

#11 Updated by Daniele Pavia almost 2 years ago

  • Status changed from Feedback to Closed

I've documented most of the things regarding this task here https://wiki.gcube-system.org/gcube/SmartGears_Docker_image.

#12 Updated by Daniele Pavia almost 2 years ago

  • Status changed from Closed to In Progress

#13 Updated by Gabriele Giammatteo over 1 year ago

  • Status changed from In Progress to Closed

as reported in #10 a Docker image for SmartGears has been created. It can be used as example/starting point for other type of Docker images of gCube software. https://wiki.gcube-system.org/gcube/SmartGears_Docker_image.

Also available in: Atom PDF