First commit.
This commit is contained in:
parent
7b2cbcac74
commit
46c556838a
|
@ -0,0 +1,25 @@
|
|||
**/.classpath
|
||||
**/.dockerignore
|
||||
**/.env
|
||||
**/.git
|
||||
**/.gitignore
|
||||
**/.project
|
||||
**/.settings
|
||||
**/.toolstarget
|
||||
**/.vs
|
||||
**/.vscode
|
||||
**/*.*proj.user
|
||||
**/*.dbmdl
|
||||
**/*.jfm
|
||||
**/azds.yaml
|
||||
**/bin
|
||||
**/charts
|
||||
**/docker-compose*
|
||||
**/compose*
|
||||
**/Dockerfile*
|
||||
**/node_modules
|
||||
**/npm-debug.log
|
||||
**/obj
|
||||
**/secrets.dev.yaml
|
||||
**/values.dev.yaml
|
||||
README.md
|
|
@ -0,0 +1,26 @@
|
|||
# The latest is 7u221. An exact build can be specified
|
||||
FROM openjdk:7-slim
|
||||
ARG JAVA_OPTS="-Xms2000M -Xmx2800M"
|
||||
ENV JAVA_OPTS=$JAVA_OPTS
|
||||
ENV J2SDKDIR=/docker-java-home
|
||||
ENV J2REDIR=/docker-java-home/jre
|
||||
ENV PATH=/docker-java-home/bin:/docker-java-home/db/bin:/docker-java-home/jre/bin:$PATH
|
||||
ENV JAVA_HOME=/docker-java-home
|
||||
ENV DERBY_HOME=/docker-java-home/db
|
||||
ENV USER=gcube
|
||||
ENV GLOBUS_LOCATION=/home/gcube/gCore
|
||||
ENV ANT_HOME=$GLOBUS_LOCATION
|
||||
ENV PATH=$GLOBUS_LOCATION/bin:$PATH
|
||||
#ENV EXIST_HOME=
|
||||
#ENV GLOBUS_OPTIONS="-Dexist.home=$EXIST_HOME"
|
||||
ENV GLOBUS_OPTIONS=""
|
||||
|
||||
RUN adduser --shell /usr/sbin/nologin gcube
|
||||
WORKDIR /home/gcube
|
||||
RUN apt-get update && apt-get install -y wget && cd /home/gcube && wget https://nexus.d4science.org/nexus/content/repositories/gcube-staging-gcore/org/gcube/distribution/ghn-distribution/7.0.1-4.16.0-144317/ghn-distribution-7.0.1-4.16.0-144317.tar.gz && tar zxf ghn-distribution-7.0.1-4.16.0-144317.tar.gz && rm -f ghn-distribution-7.0.1-4.16.0-144317.tar.gz && mkdir -p /home/gcube/gCore/logs /home/gcube/gCore/tmp /home/gcube/gCore/config /home/gcube/gCore/etc && chown gcube /home/gcube/gCore/logs /home/gcube/gCore/tmp /home/gcube/gCore/config /home/gcube/gCore/etc
|
||||
COPY src/gcube-start-container.sh /home/gcube/gCore/bin/gcore-start-container
|
||||
RUN chmod 755 /home/gcube/gCore/bin/gcore-start-container
|
||||
EXPOSE 8080
|
||||
ENTRYPOINT exec /home/gcube/gCore/bin/gcore-start-container
|
||||
# For Spring-Boot project, use the entrypoint below to reduce Tomcat startup time.
|
||||
#ENTRYPOINT exec java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar ansibleplaybookisregistryservice.jar
|
14
README.md
14
README.md
|
@ -1,3 +1,15 @@
|
|||
# ansible-playbook-is-registry-service
|
||||
|
||||
Playbook that creates a docker container with the IS distribution
|
||||
Playbook that creates a docker container with the IS distribution
|
||||
|
||||
## Build the imaage
|
||||
|
||||
```shell
|
||||
$ docker build -t is-registry-service:v1-dev .
|
||||
```
|
||||
|
||||
## Run the image
|
||||
|
||||
```shell
|
||||
$ docker container run is-registry-service:v1-dev --name is-registry
|
||||
```
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
version: '3.4'
|
||||
|
||||
services:
|
||||
ansibleplaybookisregistryservice:
|
||||
image: ansibleplaybookisregistryservice
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./Dockerfile
|
||||
environment:
|
||||
JAVA_OPTS: -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005,quiet=y
|
||||
ports:
|
||||
- 8080:8080
|
||||
- 5005:5005
|
|
@ -0,0 +1,10 @@
|
|||
version: '3.4'
|
||||
|
||||
services:
|
||||
ansibleplaybookisregistryservice:
|
||||
image: ansibleplaybookisregistryservice
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./Dockerfile
|
||||
ports:
|
||||
- 8080:8080
|
|
@ -0,0 +1,10 @@
|
|||
# Tips, links to the documentation
|
||||
|
||||
## Official documentation
|
||||
|
||||
<https://docs.docker.com>
|
||||
<https://docs.docker.com/get-started/>
|
||||
<https://docs.docker.com/develop/>
|
||||
<https://docs.docker.com/develop/develop-images/dockerfile_best-practices/>
|
||||
|
||||
Some hints on how to debug a docker image: <http://www.openwebit.com/c/how-to-debug-docker-images/>
|
|
@ -0,0 +1,52 @@
|
|||
#! /bin/sh
|
||||
|
||||
if [ -z "$GLOBUS_LOCATION" ]
|
||||
then
|
||||
echo "Cannot start the GHN, GLOBUS_LOCATION var is not set!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -d "$GLOBUS_LOCATION/config" ]
|
||||
then
|
||||
echo "Cannot start the GHN, GLOBUS_LOCATION var is wrongly set!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
CP=.:${GLOBUS_LOCATION}:${GLOBUS_LOCATION}/config:${GLOBUS_LOCATION}/build/classes
|
||||
for i in ${GLOBUS_LOCATION}/lib/*.jar
|
||||
do
|
||||
CP=$CP:"$i"
|
||||
done
|
||||
|
||||
if [ -z "$CLASSPATH" ] ; then
|
||||
CLASSPATH=$CP
|
||||
else
|
||||
CLASSPATH=$CP:$CLASSPATH
|
||||
fi
|
||||
export CLASSPATH
|
||||
|
||||
#container's options
|
||||
export GCORE_START_OPTIONS="$GCORE_START_OPTIONS -Djava.util.logging.config.file=$GLOBUS_LOCATION/logging.jul.properties $JAVA_OPTS -Djava.io.tmpdir=$GLOBUS_LOCATION/tmp -Djava.security.egd=file:///dev/urandom"
|
||||
|
||||
mode="-nosec"
|
||||
unset newargs
|
||||
|
||||
for arg in "$@"
|
||||
do
|
||||
if [ "$arg" = "-sec" ]; then
|
||||
unset mode
|
||||
else
|
||||
newargs="$newargs $arg"
|
||||
fi
|
||||
done
|
||||
|
||||
newargs="$mode $newargs"
|
||||
|
||||
[ -e "$GLOBUS_LOCATION/tmp" ] || mkdir -p $GLOBUS_LOCATION/tmp
|
||||
|
||||
#clean up the services' state if needed
|
||||
[ -f "$GLOBUS_LOCATION/config/GHNProfile.xml" ] || rm -rf ~/.gcore
|
||||
|
||||
cd $GLOBUS_LOCATION
|
||||
echo "gCore is running with ($newargs) and logging into logs/container.log..."
|
||||
$GLOBUS_LOCATION/bin/gcore-start-container-daemon $newargs
|
Loading…
Reference in New Issue