diff --git a/smartgears/smartgears-base-image/defaults/main.yml b/smartgears/smartgears-base-image/defaults/main.yml index ad72861c..15cbe884 100644 --- a/smartgears/smartgears-base-image/defaults/main.yml +++ b/smartgears/smartgears-base-image/defaults/main.yml @@ -1,7 +1,13 @@ -smartgears_user: "root" -smartgears_user_home: "/root/" +repo_type: "repo_groups" +repo: "gcube-staging-all" +patch_common_scope: 0 +patch_common_authorization: 0 + #smartgears_user: "tomcat7" #smartgears_user_home: "/usr/share/tomcat7/" +smartgears_user: "root" +smartgears_user_home: "/root/" + smartgears_distribution_version: "2.1.3-4.7.0-154641" smartgears_url: "http://maven.research-infrastructures.eu/nexus/service/local/repositories/{{ repo }}/content/org/gcube/distribution/smartgears-distribution/{{ smartgears_distribution_version }}/smartgears-distribution-{{ smartgears_distribution_version }}.tar.gz" smartgears_log_dir: "/var/log/tomcat7" @@ -12,7 +18,7 @@ smartgears_loglevel: "WARN" smartgears_log_use_timesize_appender: True orchestrator_user: "orchestrator" -orchestrator_ssh_key: +orchestrator_ssh_key: #orchestrator_ssh_key: "ssh-rsa placeholder orchestrator@placeholder" java_jdk: "java8-jdk" #### either java8-jdk or openjdk-8 diff --git a/smartgears/smartgears-base-image/files/smartgears_run.sh b/smartgears/smartgears-base-image/files/smartgears_run.sh index 081a29d3..cca86672 100755 --- a/smartgears/smartgears-base-image/files/smartgears_run.sh +++ b/smartgears/smartgears-base-image/files/smartgears_run.sh @@ -9,12 +9,10 @@ #### let's configure the container #### if no token is set refuse to run if [[ -z "$CONTAINER_TOKENS" ]]; - ## spacchetta_token! then echo "CONTAINER_TOKENS not set, failed to configure the container. Exiting with errors."; exit 1 else - #echo "tokens: $CONTAINER_TOKENS" OLDIFS=$IFS IFS="," read -r -a tokens <<< "$CONTAINER_TOKENS" diff --git a/smartgears/smartgears-base-image/meta/main.yml b/smartgears/smartgears-base-image/meta/main.yml index 96a30ae1..106a9fc4 100644 --- a/smartgears/smartgears-base-image/meta/main.yml +++ b/smartgears/smartgears-base-image/meta/main.yml @@ -1,3 +1,3 @@ dependencies: + - role: "../../docker/" # - role: java-17 - - role: ../roles/docker diff --git a/smartgears/smartgears-base-image/tasks/main.yml b/smartgears/smartgears-base-image/tasks/main.yml index b127eefd..0789730d 100644 --- a/smartgears/smartgears-base-image/tasks/main.yml +++ b/smartgears/smartgears-base-image/tasks/main.yml @@ -1,4 +1,3 @@ - - name: create temporary build directory shell: mktemp -d register: tempdir diff --git a/smartgears/smartgears-base-image/templates/Dockerfile b/smartgears/smartgears-base-image/templates/Dockerfile index 0fb733af..8e24eaee 100644 --- a/smartgears/smartgears-base-image/templates/Dockerfile +++ b/smartgears/smartgears-base-image/templates/Dockerfile @@ -7,8 +7,14 @@ ENV GHN_HOME {{ smartgears_user_home }} WORKDIR {{ smartgears_user_home }} ADD {{ smartgears_url }} {{ smartgears_user_home }} ADD smartgears_run.sh {{ smartgears_user_home }} -COPY common-scope-maps-patched.ja* {{ smartgears_user_home }} -COPY common-authorization-patched.ja* {{ smartgears_user_home }} + +{% if patch_common_scope %} + COPY common-scope-maps-patched.ja* {{ smartgears_user_home }} +{% endif %} + +{% if patch_common_authorization %} + COPY common-authorization-patched.ja* {{ smartgears_user_home }} +{% endif %} RUN \ #### install either the Oracle JDK or OpenJDK