From 139332546912f593022fcd6ceb3fce228e975e41 Mon Sep 17 00:00:00 2001 From: "daniele.pavia" Date: Thu, 4 May 2017 16:09:54 +0200 Subject: [PATCH] added gcore roles and playbooks used to deploy gcore enabling services @ENG, added gcore-smartgears-container role used to generate a smartgears docker container --- curl-tester/defaults/main.yml | 2 + curl-tester/tasks/main.yml | 17 ++ gcore-authorization/defaults/main.yml | 32 +++ gcore-authorization/meta/main.yml | 4 + gcore-authorization/tasks/main.yml | 75 +++++++ .../AuthorizationConfiguration.xml.j2 | 24 +++ gcore-authorization/templates/logback.xml.j2 | 24 +++ .../templates/persistence.xml.j2 | 33 +++ gcore-base/defaults/main.yml | 28 +++ ...-scope-maps-1.0.4-4.2.0-128425-patched.jar | Bin 0 -> 6484 bytes gcore-base/files/d4s.gcubekey | 1 + gcore-base/meta/main.yml | 2 + gcore-base/tasks/main.yml | 66 ++++++ gcore-base/templates/ServiceMap_d4s.xml | 6 + .../templates/ServiceMap_d4stesting.xml | 6 + gcore-base/templates/bashrc.j2 | 1 + gcore-base/templates/d4s.authorization | 1 + gcore-base/templates/gcore-start.sh | 6 + gcore-collector/defaults/main.yml | 21 ++ gcore-collector/meta/main.yml.bckp | 2 + gcore-collector/tasks/main.yml | 73 +++++++ gcore-collector/templates/GHNConfig.xml | 87 ++++++++ gcore-notifier/defaults/main.yml | 13 ++ gcore-notifier/meta/main.yml | 2 + gcore-notifier/tasks/main.yml | 26 +++ gcore-notifier/templates/GHNConfig.xml | 85 ++++++++ gcore-portal/defaults/main.yml | 17 ++ ...-scope-maps-1.0.4-4.2.0-128425-patched.jar | Bin 0 -> 6484 bytes gcore-portal/files/d4s.gcubekey | 1 + gcore-portal/meta/main.yml | 2 + gcore-portal/tasks/main.yml | 69 +++++++ gcore-portal/tasks/main.yml.orig | 188 ++++++++++++++++++ gcore-portal/templates/bashrc | 16 ++ gcore-portal/templates/d4s.authorization | 1 + .../templates/infrastructureproperties | 9 + gcore-portal/templates/portal-ext.properties | 2 + gcore-registry/defaults/main.yml | 13 ++ gcore-registry/meta/main.yml | 2 + gcore-registry/tasks/main.yml | 29 +++ gcore-registry/templates/GHNConfig.xml | 86 ++++++++ gcore-resourcebroker/defaults/main.yml | 23 +++ gcore-resourcebroker/meta/main.yml.old | 2 + gcore-resourcebroker/tasks/main.yml | 31 +++ gcore-resourcebroker/templates/GHNConfig.xml | 87 ++++++++ gcore-resourcemanager/defaults/main.yml | 23 +++ gcore-resourcemanager/meta/main.yml | 2 + gcore-resourcemanager/tasks/main.yml | 31 +++ gcore-resourcemanager/templates/GHNConfig.xml | 86 ++++++++ gcore-smartgears-container/defaults/main.yml | 11 + ...-scope-maps-1.0.4-4.2.0-128425-patched.jar | Bin 0 -> 6484 bytes gcore-smartgears-container/meta/main.yml | 3 + gcore-smartgears-container/tasks/main.yml | 32 +++ .../templates/Dockerfile | 23 +++ .../templates/Dockerfile.bckp | 25 +++ .../templates/d4s.authorization | 1 + gcore-softwaregateway/defaults/main.yml | 13 ++ gcore-softwaregateway/files/settings.xml | 61 ++++++ gcore-softwaregateway/meta/main.yml | 2 + gcore-softwaregateway/tasks/main.yml | 25 +++ gcore-softwaregateway/templates/GHNConfig.xml | 86 ++++++++ 60 files changed, 1639 insertions(+) create mode 100644 curl-tester/defaults/main.yml create mode 100644 curl-tester/tasks/main.yml create mode 100644 gcore-authorization/defaults/main.yml create mode 100644 gcore-authorization/meta/main.yml create mode 100644 gcore-authorization/tasks/main.yml create mode 100644 gcore-authorization/templates/AuthorizationConfiguration.xml.j2 create mode 100644 gcore-authorization/templates/logback.xml.j2 create mode 100644 gcore-authorization/templates/persistence.xml.j2 create mode 100644 gcore-base/defaults/main.yml create mode 100644 gcore-base/files/common-scope-maps-1.0.4-4.2.0-128425-patched.jar create mode 100644 gcore-base/files/d4s.gcubekey create mode 100644 gcore-base/meta/main.yml create mode 100644 gcore-base/tasks/main.yml create mode 100644 gcore-base/templates/ServiceMap_d4s.xml create mode 100644 gcore-base/templates/ServiceMap_d4stesting.xml create mode 100644 gcore-base/templates/bashrc.j2 create mode 100644 gcore-base/templates/d4s.authorization create mode 100755 gcore-base/templates/gcore-start.sh create mode 100644 gcore-collector/defaults/main.yml create mode 100644 gcore-collector/meta/main.yml.bckp create mode 100644 gcore-collector/tasks/main.yml create mode 100755 gcore-collector/templates/GHNConfig.xml create mode 100644 gcore-notifier/defaults/main.yml create mode 100644 gcore-notifier/meta/main.yml create mode 100644 gcore-notifier/tasks/main.yml create mode 100755 gcore-notifier/templates/GHNConfig.xml create mode 100644 gcore-portal/defaults/main.yml create mode 100644 gcore-portal/files/common-scope-maps-1.0.4-4.2.0-128425-patched.jar create mode 100644 gcore-portal/files/d4s.gcubekey create mode 100644 gcore-portal/meta/main.yml create mode 100644 gcore-portal/tasks/main.yml create mode 100644 gcore-portal/tasks/main.yml.orig create mode 100644 gcore-portal/templates/bashrc create mode 100644 gcore-portal/templates/d4s.authorization create mode 100644 gcore-portal/templates/infrastructureproperties create mode 100644 gcore-portal/templates/portal-ext.properties create mode 100644 gcore-registry/defaults/main.yml create mode 100644 gcore-registry/meta/main.yml create mode 100644 gcore-registry/tasks/main.yml create mode 100755 gcore-registry/templates/GHNConfig.xml create mode 100644 gcore-resourcebroker/defaults/main.yml create mode 100644 gcore-resourcebroker/meta/main.yml.old create mode 100644 gcore-resourcebroker/tasks/main.yml create mode 100755 gcore-resourcebroker/templates/GHNConfig.xml create mode 100644 gcore-resourcemanager/defaults/main.yml create mode 100644 gcore-resourcemanager/meta/main.yml create mode 100644 gcore-resourcemanager/tasks/main.yml create mode 100755 gcore-resourcemanager/templates/GHNConfig.xml create mode 100644 gcore-smartgears-container/defaults/main.yml create mode 100644 gcore-smartgears-container/files/common-scope-maps-1.0.4-4.2.0-128425-patched.jar create mode 100644 gcore-smartgears-container/meta/main.yml create mode 100644 gcore-smartgears-container/tasks/main.yml create mode 100644 gcore-smartgears-container/templates/Dockerfile create mode 100644 gcore-smartgears-container/templates/Dockerfile.bckp create mode 100644 gcore-smartgears-container/templates/d4s.authorization create mode 100644 gcore-softwaregateway/defaults/main.yml create mode 100644 gcore-softwaregateway/files/settings.xml create mode 100644 gcore-softwaregateway/meta/main.yml create mode 100644 gcore-softwaregateway/tasks/main.yml create mode 100755 gcore-softwaregateway/templates/GHNConfig.xml diff --git a/curl-tester/defaults/main.yml b/curl-tester/defaults/main.yml new file mode 100644 index 00000000..e39a48d4 --- /dev/null +++ b/curl-tester/defaults/main.yml @@ -0,0 +1,2 @@ +test_port: "8080" +test_URL: "http://{{ inventory_hostname }}:{{ test_port }}" diff --git a/curl-tester/tasks/main.yml b/curl-tester/tasks/main.yml new file mode 100644 index 00000000..e7adcf99 --- /dev/null +++ b/curl-tester/tasks/main.yml @@ -0,0 +1,17 @@ +- name: wait for the service to come up + wait_for: host={{ inventory_hostname }} port={{ test_port }} delay=3 connect_timeout=3 + delegate_to: localhost + +- name: check URL availability with curl + raw: curl -k "{{ test_URL }}" + register: curl_cmd + failed_when: curl_cmd.rc >= 1 + +#raw: curl -k -m 3 "{{ test_URL }}" + +#- name: test the specified URL +# action: uri url={{ test_URL }} +# register: webpage + +#- name : check the returned contents +# fail: msg="service not available" diff --git a/gcore-authorization/defaults/main.yml b/gcore-authorization/defaults/main.yml new file mode 100644 index 00000000..00403c9d --- /dev/null +++ b/gcore-authorization/defaults/main.yml @@ -0,0 +1,32 @@ +--- +#authorization_service_install: False +#authorization_service_upgrade: False +authorization_service_name: authorization-service +#authorization_service_file: '{{ authorization_service_name }}-2.0.0-20160927.120833-1.war' +#authorization_service_url: 'http://maven.research-infrastructures.eu/nexus/content/repositories/gcube-snapshots/org/gcube/common/authorization-service/2.0.0-SNAPSHOT/{{ authorization_service_file }}' +# +#authorization_version: "2.0.1-4.2.0-134808" +authorization_service_version: "2.0.1-4.2.0-134808" + +repo: "gcube-staging" +authorization_service_file: '{{ authorization_service_name }}-{{ authorization_service_version }}.war' +authorization_service_url: 'http://maven.research-infrastructures.eu/nexus/content/repositories/{{ repo }}/org/gcube/common/authorization-service/{{ authorization_service_version }}/{{ authorization_service_file }}' +authorization_service_persistence_dest: WEB-INF/classes/META-INF/persistence.xml +authorization_service_config_dest: WEB-INF/AuthorizationConfiguration.xml +#auth_user: '{{ d4science_user }}' +tomcat_user: "tomcat" +tomcat_document_root: "/usr/share/tomcat/" +authorization_service_loglevel: INFO +authorization_service_root_loglevel: WARN +#authorization_service_http_port: 8080 +authorization_service_http_port: 80 +authorized_ips: +# - 127.0.0.1 + - 0.0.0.0 + +auth_postgresql_host: "localhost" +psql_db_name: "gcoreauthz" +psql_db_user: "gcoreauthz" +authorization_db_pwd: "gcore-authz" +postgres_port: "5431" +pgpool_port: "5432" diff --git a/gcore-authorization/meta/main.yml b/gcore-authorization/meta/main.yml new file mode 100644 index 00000000..c136f5b7 --- /dev/null +++ b/gcore-authorization/meta/main.yml @@ -0,0 +1,4 @@ +dependencies: + - role: tomcat + - role: postgresql + - role: pgpool diff --git a/gcore-authorization/tasks/main.yml b/gcore-authorization/tasks/main.yml new file mode 100644 index 00000000..c2b6d380 --- /dev/null +++ b/gcore-authorization/tasks/main.yml @@ -0,0 +1,75 @@ +--- +- block: + - name: Ensure that postgres is running + service: name=postgresql state=started + + - name: Create postgres database {{ psql_db_name }} and user {{ psql_db_user }} + shell: sudo -u postgres createdb {{ psql_db_name }} && sudo -u postgres createuser -s {{ psql_db_user }} + ignore_errors: True + + - name: Set password for user {{ psql_db_user }} and grant all privileges on database {{ psql_db_name }} + shell: sudo -u postgres psql -c "ALTER USER {{ psql_db_user }} WITH PASSWORD '{{ authorization_db_pwd }}';" && sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE {{ psql_db_name }} TO {{ psql_db_user }}"; + ignore_errors: True + + - name: Change postgres authentication method to password for localhost + lineinfile: dest=/var/lib/pgsql/data/pg_hba.conf state=present regexp='^host all all 127.0.0.1/32' line='host all all 127.0.0.1/32 password' + + - name: Change postgres authentication method to password for localhost ipv6 + lineinfile: dest=/var/lib/pgsql/data/pg_hba.conf state=present regexp='^host all all ::1/128' line='host all all ::1/128 password' + + - name: Change postgres port to {{ postgres_port }} + lineinfile: dest="/usr/lib/systemd/system/postgresql.service" state=present regexp='^Environment=PGPORT=' line='Environment=PGPORT={{ postgres_port }}' + + - name: Change pgpool port to {{ pgpool_port }} + lineinfile: dest="/etc/pgpool-II/pgpool.conf" state=present regexp='^port =' line='port = {{ pgpool_port }}' + + - name: Tell pgpool to connect to postgreqsl on port {{ postgres_port }} + lineinfile: dest="/etc/pgpool-II/pgpool.conf" state=present regexp='^backend_port0 =' line='backend_port0 = {{ postgres_port }}' + + - name: Tell pgpool to enable ssl + lineinfile: dest="/etc/pgpool-II/pgpool.conf" state=present regexp='^ssl = on' line='ssl = on' + + - name: Running semanage to enable postgres to bind port {{ postgres_port }} + seport: ports={{ postgres_port }} proto=tcp setype=postgresql_port_t state=present reload=yes + + - name: Running setsebool to allow tcp connections to the db + seboolean: name=httpd_can_network_connect_db state=yes persistent=yes + +# - name: restart postgres +# service: name=postgresql state=restarted + + #### on CentOS 7 we need to tell systemd to reload the service file since we made changes there + - name: restart postgresql + systemd: name=postgresql state=restarted enabled=yes daemon_reload=yes + + - name: restart pgpool + service: name=pgpool state=restarted + + - name: Stop tomcat when upgrading + service: name=tomcat state=stopped + + - name: Create the authorization service webapp directory + file: dest={{ tomcat_document_root }}/webapps/authorization-service state=directory owner={{ tomcat_user }} group={{ tomcat_user }} + + - name: Get and unpack the authorization war file + unarchive: copy=no src={{ authorization_service_url }} dest={{ tomcat_document_root }}/webapps/authorization-service owner={{ tomcat_user }} group={{ tomcat_user }} + args: + creates: '{{ tomcat_document_root }}/webapps/authorization-service/WEB-INF/AuthorizationConfiguration.xml' + + - name: Install the authorization service AuthorizationConfiguration.xml template + template: src=AuthorizationConfiguration.xml.j2 dest={{ tomcat_document_root }}/webapps/authorization-service/{{ authorization_service_config_dest }} mode=0440 owner={{ tomcat_user }} group={{ tomcat_user }} + + - name: Install the authorization service persistence.xml template + template: src=persistence.xml.j2 dest={{ tomcat_document_root }}/webapps/authorization-service/{{ authorization_service_persistence_dest }} mode=0440 owner={{ tomcat_user }} group={{ tomcat_user }} + + - name: Install the logback configuration + template: src=logback.xml.j2 dest={{ tomcat_document_root }}/lib/logback.xml mode=0644 owner={{ tomcat_user }} group={{ tomcat_user }} + +# - name: restore ownership +# file: dest={{ tomcat_document_root }} owner=root group=tomcat recurse=yes + + - name: Start tomcat + service: name=tomcat state=started + + become: true + become_user: root diff --git a/gcore-authorization/templates/AuthorizationConfiguration.xml.j2 b/gcore-authorization/templates/AuthorizationConfiguration.xml.j2 new file mode 100644 index 00000000..269d41c1 --- /dev/null +++ b/gcore-authorization/templates/AuthorizationConfiguration.xml.j2 @@ -0,0 +1,24 @@ + + + + {% for ip in authorized_ips %} + + {% endfor %} + + + + + {% for ip in authorized_ips %} + + {% endfor %} + + + + + + {% for ip in authorized_ips %} + + {% endfor %} + + + diff --git a/gcore-authorization/templates/logback.xml.j2 b/gcore-authorization/templates/logback.xml.j2 new file mode 100644 index 00000000..c405cf2b --- /dev/null +++ b/gcore-authorization/templates/logback.xml.j2 @@ -0,0 +1,24 @@ + + + + + ${catalina.base}/logs/ghn.log + true + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{0}: %msg%n + + + + ${catalina.base}/logs/ghn.%d{yyyy-MM-dd}.log + 30 + + + + + + + + + + + diff --git a/gcore-authorization/templates/persistence.xml.j2 b/gcore-authorization/templates/persistence.xml.j2 new file mode 100644 index 00000000..3ad39bc0 --- /dev/null +++ b/gcore-authorization/templates/persistence.xml.j2 @@ -0,0 +1,33 @@ + + + + + org.eclipse.persistence.jpa.PersistenceProvider + + + org.gcube.common.authorizationservice.persistence.entities.converters.StringListConverter + + + + org.gcube.common.authorizationservice.persistence.entities.AuthorizationEntity + org.gcube.common.authorizationservice.persistence.entities.ServiceAuthorizationEntity + org.gcube.common.authorizationservice.persistence.entities.UserAuthorizationEntity + org.gcube.common.authorizationservice.persistence.entities.ExternalServiceAuthorizationEntity + org.gcube.common.authorizationservice.persistence.entities.NodeAuthorizationEntity + org.gcube.common.authorizationservice.persistence.entities.PolicyEntity + org.gcube.common.authorizationservice.persistence.entities.ServicePolicyEntity + org.gcube.common.authorizationservice.persistence.entities.UserPolicyEntity + + + + + + + + + + diff --git a/gcore-base/defaults/main.yml b/gcore-base/defaults/main.yml new file mode 100644 index 00000000..f9d26cfe --- /dev/null +++ b/gcore-base/defaults/main.yml @@ -0,0 +1,28 @@ +--- +repo: "gcube-staging" +#ghn_distribution_version: "7.0.0-4.2.1-132334" +ghn_distribution_bundle_version: "7.0.0-4.2.1-132334" + +#### this gets the latest version in the specified repo +#globus_url: "http://maven.research-infrastructures.eu/nexus/service/local/artifact/maven/redirect?r={{ repo }}&g=org/gcube/distribution&a=ghn-distribution&v=LATEST&e=tar.gz" + +#### this is for the ghn-distribution-bundle +#globus_url: "http://maven.research-infrastructures.eu/nexus/service/local/repositories/{{ repo }}/content/org/gcube/distribution/ghn-distribution-bundle/{{ ghn_distribution_bundle_version }}/ghn-distribution-bundle-{{ ghn_distribution_bundle_version }}-bundle.tar.gz" + +globus_url: "http://maven.research-infrastructures.eu/nexus/service/local/repositories/{{ repo }}/content/org/gcube/distribution/ghn-distribution/{{ ghn_distribution_bundle_version }}/ghn-distribution-{{ ghn_distribution_bundle_version }}.tar.gz" +ant_url: 'http://archive.apache.org/dist/ant/binaries/apache-ant-1.6.5-bin.tar.gz' + +ghn_user: 'gCore' +globus_location: "/opt/{{ ghn_user }}" +ant_location: '/opt/ant/' + +ghn_port: 8080 +ghn_hostname: "{{ ansible_hostname }}" +ghn_published_host: "{{ ghn_hostname }}:{{ ghn_port }}" + +gcube_key: 'd4s.gcubekey' +servicemap_xmlfile: 'ServiceMap_d4s.xml' +servicemap_endpoint: "{{ ghn_published_host }}" + +common_scope_maps_file: "common-scope-maps-1.0.4-4.2.0-128425-patched.jar" +patch_common_scope: 0 diff --git a/gcore-base/files/common-scope-maps-1.0.4-4.2.0-128425-patched.jar b/gcore-base/files/common-scope-maps-1.0.4-4.2.0-128425-patched.jar new file mode 100644 index 0000000000000000000000000000000000000000..15c2afdde8ea7a1d2d038d72b85856941e077fad GIT binary patch literal 6484 zcma)Ac{r5o8=kUcCws^;_I=AzsVqarT3ND%p)vNcpRy-pNrPl9%gI)fFxC#TN0=;G zV?tyt${zZCQ=Q+Lk}-1l=qn~0bZ1OkzPU`1ZgtiZCfMZmum z;GqF=fNWhoBs}3BJ`T2U7nqxoAvuUBkw(Tu*RaRL`x+(a5b+EV2=x6+7gbLaB1H$m zY%x(MrOzC$52fRl9@FiMzAP3kep&`YlH(2{ zivz)6c1a^iMGPDl{zwzT*aA%yc%C`z8ikR(Uc;#~P=l#V*Fb-<^i7gL-jeO>v`+Bh z4^mWk4;ntfdMi5=oEO^HKQL{YpuWU6(xAZg(c>>3p;5MxfiB)|9U8yb-1!TqY{%MyQd zM>@4=2woe}@gKEzhp)S#!RK1u`LnG^=Ts6e!LnN*Uzji@MPJz@8jftxhM()GBc769 zx@rKsSHPDFYMg~6A8r(kFm`JVS6J7^&YNOE|8SA#XRd`65C=a7xLErs0f39WEL16= zO&&h`g@yl1;4@AF!{WpYHo;B$QkH+&m_8#%XPZlH*U&N5blS;$wWCly#~x#oe_mra z#>B&3X2MxRzhy{9FFQWvf7hSViqy-unwNFt)VV%bp*kfAhc%}0 z++Ep0wuYjKrxg#3R`5>0^jd(HIcG^^DNrpraQaL?PTvde>E+;x*jqRlIC|XktM(}x zaN1uJ4N1BmU&ya2Y`nzK6g`mY>hwZ@Kh1dCkKxIi#*$L1j=4>!g2_awPr0uJ}UhI~0KAyFL+$bgKq*B`-OK_E{2Vc|}Y|i*L zw-7x!xrCXfx@53nbj90uC%NX(KWC0>`$1VV`9^>NCV&BY90PD4SNJurz2*O|^<(Q@ z4@(2;Ul9dMoOJmMV(t)T!WWo%sX1rh9cx6BfavL=#5%!zMqhTnC(FIgq1R|MJ7)y= zlLgpL+<(SFrqs!`a~gN$mEL1c!*=kmUA2-G$mmX9)yIJ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7<@+7|ja2Fd7HnY%4`o;7XlR96rqi?QID0%LK z{MJGHC7{DN0?FBS+x1e2`=5GhSTbJ<%|z%+Y0KNR2%mUG+jh8vaHDkKChSvu@0^C% z*>KmYl6x*Xwoc|LMx*kpzExjMoP&5SefGOhA49Sh@UjV|FILDA#8xP@0yq}$t@s}F zp%>R`=yP9c=+!*f0n-ALU9^%iW1N!01qzN{3h7p{L0Pw!M)e?{}b)^rA9lj)L`XaX1L8#WWsE(YThHx zx;sXXOSC1jNG;V0p-5E)23`ljCyLkjigYkTA$Jnwj1pR)_oJ1%CLr0SafrP9vz+Z1 zSrQ=Bo;Vfywn(;m6?{{>q5_ypJ|*oNQM6ssRHyvrmZPP=} z%a%in^Fqr=RTAm^l3zN=!KRgqEl-;dwi}kC!`!FJMa~U$wmPm;y;HBFVH$BK-x{)# z!e9g4H<#Ri@WW4W(J_D-Y6S|QIsQDRd2oa~R%X<0W@jp5n%oBLJ@c-8lQ_s5MN75} zx$X?-d7naZe(40&Oqk4e(E!EAXG^&OvtL)HSuSWFI?PG*yFC^wzy$~dkO4y9!2R00 z)gt+^)!LKl_hJ$*iSRMk0nGhZM*ofc>&gWmndtC$WP;NJFmVf*e|g(qmm2t(t3NRJ z>jVILpY_IGA_%ty_|WUXHgLb)!GF_$lPzKF#>XWk`Hs6cgdYr+FxBG2?gFs;XWWA! z6NW>47yxLKbr3B$yYyb{tvH#;82@N*>JNf`{``PV(d(D5Y8A5-G zkBg!Lf%bE&2g4;afB3jj)S&&X;K6_iJrq9heHs9GUq^K?WJ2?Sk6c3wAn$8M4u(uP r!ts&2=|KAq^n>9NPDy;+mZP9wX6ElONl0-Mg#q|n1Aev8 + + + + + diff --git a/gcore-base/templates/ServiceMap_d4stesting.xml b/gcore-base/templates/ServiceMap_d4stesting.xml new file mode 100644 index 00000000..79f604c6 --- /dev/null +++ b/gcore-base/templates/ServiceMap_d4stesting.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/gcore-base/templates/bashrc.j2 b/gcore-base/templates/bashrc.j2 new file mode 100644 index 00000000..ccd0f248 --- /dev/null +++ b/gcore-base/templates/bashrc.j2 @@ -0,0 +1 @@ +# example: registry={{ COMMON_NPM_MIRROR_URL }} diff --git a/gcore-base/templates/d4s.authorization b/gcore-base/templates/d4s.authorization new file mode 100644 index 00000000..7e75ea64 --- /dev/null +++ b/gcore-base/templates/d4s.authorization @@ -0,0 +1 @@ +{{ authorization_hostname }}false{{ authorization_port }} diff --git a/gcore-base/templates/gcore-start.sh b/gcore-base/templates/gcore-start.sh new file mode 100755 index 00000000..60f59396 --- /dev/null +++ b/gcore-base/templates/gcore-start.sh @@ -0,0 +1,6 @@ +#!/bin/bash +export GLOBUS_LOCATION={{ globus_location }} +export PATH=$PATH:$GLOBUS_LOCATION/bin +export ANT_HOME={{ ant_location }} + +nohup {{ globus_location }}/bin/gcore-start-container -p {{ ghn_port }} diff --git a/gcore-collector/defaults/main.yml b/gcore-collector/defaults/main.yml new file mode 100644 index 00000000..0db9f9d8 --- /dev/null +++ b/gcore-collector/defaults/main.yml @@ -0,0 +1,21 @@ +--- +# recent versions of eXist setup do not allow for a quiet installation, therefore we switch to the +# last known working version +#exist_url: 'https://bintray.com/existdb/releases/download_file?file_path=eXist-db-setup-2.2.jar' +exist_jar: 'eXist-setup-1.2.6-rev9165.jar' +exist_url: "http://downloads.sourceforge.net/project/exist/Stable/1.2/{{ exist_jar }}" +exist_location: "{{ globus_location }}/exist/" + +repo: "gcube-staging" +#collector_version: "3.0.2-4.1.0-126944" +is_collector_service_version: "3.0.2-4.1.0-126944" +collector_artifact: "is-collector-service-{{ is_collector_service_version }}" +collector_gar: "{{ collector_artifact }}.gar" +collector_url: "http://maven.research-infrastructures.eu/nexus/service/local/repositories/{{ repo }}/content/org/gcube/informationsystem/is-collector-service/{{ is_collector_service_version }}/{{ collector_gar }}" + +collector_hostname: "d4s.res.eng.it" +collector_port: "8099" +collector_endpoint: "{{ collector_hostname }}:{{ collector_port }}" + +start_scopes: '' +infrastructure: 'd4s' diff --git a/gcore-collector/meta/main.yml.bckp b/gcore-collector/meta/main.yml.bckp new file mode 100644 index 00000000..69d1e2cc --- /dev/null +++ b/gcore-collector/meta/main.yml.bckp @@ -0,0 +1,2 @@ +dependencies: + - role: gcore-base diff --git a/gcore-collector/tasks/main.yml b/gcore-collector/tasks/main.yml new file mode 100644 index 00000000..2d861a3c --- /dev/null +++ b/gcore-collector/tasks/main.yml @@ -0,0 +1,73 @@ +- name: download eXist DB + get_url: url={{ exist_url }} dest=/tmp force=yes + +- name: create exist_location as defined in '../defaults/main.yml' + file: path={{ exist_location }} state=directory owner={{ ghn_user }} group={{ ghn_user }} mode=0755 + +- name: install eXist DB + command: "java -jar /tmp/{{ exist_jar }} -p {{ exist_location }}" + +- name: remove eXist setup jar + file: path="/tmp/{{ exist_jar }}" state=absent + +- name: add the EXIST_HOME parameter to the gcore startup script + lineinfile: dest="{{ globus_location }}/gcore-start.sh" insertafter="^export ANT_HOME" state=present line="export EXIST_HOME={{ exist_location }}" + +# remotely using with_fileglob seems to give all sorts of issues +# while using copy module is out of question since it's not +# capable of using wildcards, hence we'll use the shell module +# when there's a need to use wildcards in filenames +#- name: copy exist libs in "{{ globus_location }}/lib/" +# copy: src={{ item }} dest="{{ globus_location }}/lib/" remote_src=true +# with_fileglob: +# - "{{ exist_location}}/exist.jar" +# - "{{ exist_location}}/lib/core/quartz-*.jar" +# - "{{ exist_location}}/lib/core/xmlrpc-*" +# - "{{ exist_location}}/lib/core/xmldb.jar" +# - "{{ exist_location}}/lib/core/jta.jar" +# - "{{ exist_location}}/lib/core/commons-pool-*.jar" + +- name: copy exist.jar in $GLOBUS_LOCATION/lib + copy: src="{{ exist_location}}/exist.jar" dest="{{ globus_location }}/lib/" remote_src=true + +- name: copy quartz jar in $GLOBUS_LOCATION/lib + shell: cp -R {{ exist_location}}/lib/core/quartz-*.jar {{ globus_location }}/lib/ + +- name: copy xmlrpc-* in $GLOBUS_LOCATION/lib + shell: cp -R {{ exist_location}}/lib/core/xmlrpc-* {{ globus_location }}/lib/ + +- name: copy xmldb in $GLOBUS_LOCATION/lib + copy: src="{{ exist_location}}/lib/core/xmldb.jar" dest="{{ globus_location }}/lib/" remote_src=true + +- name: copy jta.jar in $GLOBUS_LOCATION/lib + copy: src="{{ exist_location}}/lib/core/jta.jar" dest="{{ globus_location }}/lib/" remote_src=true + +- name: copy commons-pool-*.jar in $GLOBUS_LOCATION/lib + shell: cp -R {{ exist_location}}/lib/core/commons-pool-*.jar {{ globus_location }}/lib/ + +- name: download is-collector-service.gar + get_url: url={{ collector_url }} dest=/tmp force=yes + +- name: deploy is-collector-service.gar + shell: export GLOBUS_LOCATION={{ globus_location }} ANT_HOME={{ ant_location }} && {{ globus_location }}/bin/gcore-deploy-service /tmp/{{ collector_gar }} + +- name: add GLOBUS_OPTIONS to the gcore startup script + lineinfile: dest="{{ globus_location }}/gcore-start.sh" insertafter="^export EXIST_HOME" state=present line='export GLOBUS_OPTIONS="-Xms512M -Xmx1024M -Dexist.home=$EXIST_HOME"' + +- name: set logicalhost parameter on {{ globus_location }}/etc/globus_wsrf_core/server-config.wsdd + replace: dest="{{ globus_location }}/etc/globus_wsrf_core/server-config.wsdd" regexp='localhost' replace="{{ collector_hostname }}" + +- name: copy updated GHNConfig.xml + template: src=GHNConfig.xml dest={{ globus_location }}/config/ + +- name: updated is-collector-service jndi-config.xml, add start scopes + lineinfile: dest="{{ globus_location }}/etc/{{ collector_artifact }}/jndi-config.xml" insertafter='.*?' state=present line=" " + when: start_scopes != "" + +- name: restore ownership + file: dest={{ globus_location }} owner={{ ghn_user }} group={{ ghn_user }} recurse=yes + +- name: start gCore + become: yes + become_user: "{{ ghn_user }}" + shell: "{{ globus_location }}/gcore-start.sh" diff --git a/gcore-collector/templates/GHNConfig.xml b/gcore-collector/templates/GHNConfig.xml new file mode 100755 index 00000000..9fd8f9be --- /dev/null +++ b/gcore-collector/templates/GHNConfig.xml @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gcore-notifier/defaults/main.yml b/gcore-notifier/defaults/main.yml new file mode 100644 index 00000000..8345344f --- /dev/null +++ b/gcore-notifier/defaults/main.yml @@ -0,0 +1,13 @@ +--- +repo: "gcube-staging" +notifier_version: "1.4.0-4.1.0-126911" +notifier_artifact: "notifier-service-{{ notifier_version }}" +notifier_gar: "{{ notifier_artifact }}.gar" +notifier_url: "http://maven.research-infrastructures.eu/nexus/service/local/repositories/{{ repo }}/content/org/gcube/informationsystem/notifier-service/{{ notifier_version }}/{{ notifier_gar }}" + +notifier_hostname: "d4s.res.eng.it" +notifier_port: "d4s.res.eng.it" +notifier_endpoint: "{{ notifier_hostname }}:{{ notifier_port }}" + +start_scopes: '' +infrastructure: 'd4s' diff --git a/gcore-notifier/meta/main.yml b/gcore-notifier/meta/main.yml new file mode 100644 index 00000000..69d1e2cc --- /dev/null +++ b/gcore-notifier/meta/main.yml @@ -0,0 +1,2 @@ +dependencies: + - role: gcore-base diff --git a/gcore-notifier/tasks/main.yml b/gcore-notifier/tasks/main.yml new file mode 100644 index 00000000..9e8fea11 --- /dev/null +++ b/gcore-notifier/tasks/main.yml @@ -0,0 +1,26 @@ +- name: download {{ notifier_gar }} + get_url: url={{ notifier_url }} dest=/tmp force=yes + +- name: deploy {{ notifier_gar }} + shell: export GLOBUS_LOCATION={{ globus_location }} ANT_HOME={{ ant_location }} && {{ globus_location }}/bin/gcore-deploy-service /tmp/{{ notifier_gar }} + +- name: add GLOBUS_OPTIONS to the gcore startup script + lineinfile: dest="{{ globus_location }}/gcore-start.sh" insertbefore="^nohup" state=present line='export GLOBUS_OPTIONS="-Xms512M -Xmx1024M"' + +- name: copy updated GHNConfig.xml + template: src=GHNConfig.xml dest={{ globus_location }}/config/ + +## despite what the documentation says, seems there's no need to specify starting scopes for the notifier to work correctly +#- name: copy updated notifier-service jndi-config.xml +# template: src=jndi-config.xml dest={{ globus_location }}/etc/{{ notifier_artifact }}/ + +- name: set logicalhost parameter on {{ globus_location }}/etc/globus_wsrf_core/server-config.wsdd + replace: dest="{{ globus_location }}/etc/globus_wsrf_core/server-config.wsdd" regexp='localhost' replace="{{ notifier_hostname }}" + +- name: restore ownership + file: dest={{ globus_location }} owner={{ ghn_user }} group={{ ghn_user }} recurse=yes + +- name: start gCore + become: yes + become_user: "{{ ghn_user }}" + shell: "{{ globus_location }}/gcore-start.sh" diff --git a/gcore-notifier/templates/GHNConfig.xml b/gcore-notifier/templates/GHNConfig.xml new file mode 100755 index 00000000..5cab62d4 --- /dev/null +++ b/gcore-notifier/templates/GHNConfig.xml @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gcore-portal/defaults/main.yml b/gcore-portal/defaults/main.yml new file mode 100644 index 00000000..160df6d3 --- /dev/null +++ b/gcore-portal/defaults/main.yml @@ -0,0 +1,17 @@ +--- +repo: "gcube-staging" +portal_version: "4.1.0-4.2.0-133176" +portal_bundle: "gcube-portal-bundle-{{ portal_version }}.tar.gz" +portal_url: "http://maven.research-infrastructures.eu/nexus/service/local/repositories/{{ repo }}/content/org/gcube/distribution/gcube-portal-bundle/{{ portal_version }}/{{ portal_bundle }}" + +portal_user: "gCore" +portal_home: "/opt/{{ portal_user }}" + +gcube_key: 'd4s.gcubekey' +tomcat_port: "8080" + +common_scope_maps_file: "common-scope-maps-1.0.4-4.2.0-128425-patched.jar" +patch_common_scope: 0 + +start_scopes: '' +infrastructure: 'd4s' diff --git a/gcore-portal/files/common-scope-maps-1.0.4-4.2.0-128425-patched.jar b/gcore-portal/files/common-scope-maps-1.0.4-4.2.0-128425-patched.jar new file mode 100644 index 0000000000000000000000000000000000000000..15c2afdde8ea7a1d2d038d72b85856941e077fad GIT binary patch literal 6484 zcma)Ac{r5o8=kUcCws^;_I=AzsVqarT3ND%p)vNcpRy-pNrPl9%gI)fFxC#TN0=;G zV?tyt${zZCQ=Q+Lk}-1l=qn~0bZ1OkzPU`1ZgtiZCfMZmum z;GqF=fNWhoBs}3BJ`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A9lj)L`XaX1L8#WWsE(YThHx zx;sXXOSC1jNG;V0p-5E)23`ljCyLkjigYkTA$Jnwj1pR)_oJ1%CLr0SafrP9vz+Z1 zSrQ=Bo;Vfywn(;m6?{{>q5_ypJ|*oNQM6ssRHyvrmZPP=} z%a%in^Fqr=RTAm^l3zN=!KRgqEl-;dwi}kC!`!FJMa~U$wmPm;y;HBFVH$BK-x{)# z!e9g4H<#Ri@WW4W(J_D-Y6S|QIsQDRd2oa~R%X<0W@jp5n%oBLJ@c-8lQ_s5MN75} zx$X?-d7naZe(40&Oqk4e(E!EAXG^&OvtL)HSuSWFI?PG*yFC^wzy$~dkO4y9!2R00 z)gt+^)!LKl_hJ$*iSRMk0nGhZM*ofc>&gWmndtC$WP;NJFmVf*e|g(qmm2t(t3NRJ z>jVILpY_IGA_%ty_|WUXHgLb)!GF_$lPzKF#>XWk`Hs6cgdYr+FxBG2?gFs;XWWA! z6NW>47yxLKbr3B$yYyb{tvH#;82@N*>JNf`{``PV(d(D5Y8A5-G zkBg!Lf%bE&2g4;afB3jj)S&&X;K6_iJrq9heHs9GUq^K?WJ2?Sk6c3wAn$8M4u(uP r!ts&2=|KAq^n>9NPDy;+mZP9wX6ElONl0-Mg#q|n1Aev8{{ authorization_hostname }}false{{ authorization_port }} diff --git a/gcore-portal/templates/infrastructureproperties b/gcore-portal/templates/infrastructureproperties new file mode 100644 index 00000000..de92b968 --- /dev/null +++ b/gcore-portal/templates/infrastructureproperties @@ -0,0 +1,9 @@ +# DO NOT DELETE THIS FILE +# gCube Infrastructure Properties tells the webapps on which infrastructure they run +# Author: Massimiliano Assante, ISTI-CNR + +# a single infrastructure +infrastructure={{ infrastructure }} + +# multiple scopes must be separated by comma (e.g FARM,gCubeApps) +scopes={{ start_scopes }} diff --git a/gcore-portal/templates/portal-ext.properties b/gcore-portal/templates/portal-ext.properties new file mode 100644 index 00000000..fd1450cf --- /dev/null +++ b/gcore-portal/templates/portal-ext.properties @@ -0,0 +1,2 @@ +liferay.home={{ portal_home }} +include-and-override={{ portal_home }}/portal-ext.properties diff --git a/gcore-registry/defaults/main.yml b/gcore-registry/defaults/main.yml new file mode 100644 index 00000000..8bfffadd --- /dev/null +++ b/gcore-registry/defaults/main.yml @@ -0,0 +1,13 @@ +--- +repo: "gcube-staging" +registry_version: "2.1.4-4.1.0-126945" +registry_artifact: "is-registry-service-{{ registry_version }}" +registry_gar: "{{ registry_artifact }}.gar" +registry_url: "http://maven.research-infrastructures.eu/nexus/service/local/repositories/{{ repo }}/content/org/gcube/informationsystem/is-registry-service/{{ registry_version }}/{{ registry_gar }}" + +start_scopes: '' +infrastructure: 'd4s' + +registry_port: '8080' +registry_hostname: "{{ ansible_hostname }}" +registry_published_host: '{{ registry_hostname }}:{{ registry_port }}' diff --git a/gcore-registry/meta/main.yml b/gcore-registry/meta/main.yml new file mode 100644 index 00000000..b102421b --- /dev/null +++ b/gcore-registry/meta/main.yml @@ -0,0 +1,2 @@ +#dependencies: +# - role: gcore-base diff --git a/gcore-registry/tasks/main.yml b/gcore-registry/tasks/main.yml new file mode 100644 index 00000000..9a1b9381 --- /dev/null +++ b/gcore-registry/tasks/main.yml @@ -0,0 +1,29 @@ +- name: download {{ registry_gar }} + get_url: url={{ registry_url }} dest=/tmp force=yes + +- name: deploy {{ registry_gar }} + shell: export GLOBUS_LOCATION={{ globus_location }} && export ANT_HOME={{ ant_location }} && export PATH=$PATH:$GLOBUS_LOCATION/bin && {{ globus_location }}/bin/gcore-deploy-service /tmp/{{ registry_gar }} + +- name: add GLOBUS_OPTIONS to the gcore startup script + lineinfile: dest="{{ globus_location }}/gcore-start.sh" insertbefore="^nohup" state=present line='export GLOBUS_OPTIONS="-Xms512M -Xmx1024M"' + +- name: copy updated GHNConfig.xml + template: src=GHNConfig.xml dest={{ globus_location }}/config/ + +- name: updated is-registry-service jndi-config.xml, add start scopes when needed + lineinfile: dest="{{ globus_location }}/etc/{{ registry_artifact }}/jndi-config.xml" insertafter='.*?' state=present line=" " + when: start_scopes != "" + +- name: set logicalhost parameter on {{ globus_location }}/etc/globus_wsrf_core/server-config.wsdd + replace: dest="{{ globus_location }}/etc/globus_wsrf_core/server-config.wsdd" regexp='localhost' replace="{{ registry_hostname }}" + +- name: add is-registry Servicemap entry + lineinfile: dest="{{ globus_location }}/config/{{ servicemap_xmlfile }}" insertbefore="^" state=present line=' ' + +- name: restore ownership + file: dest={{ globus_location }} owner={{ ghn_user }} group={{ ghn_user }} recurse=yes + +- name: start gCore + become: yes + become_user: "{{ ghn_user }}" + shell: "{{ globus_location }}/gcore-start.sh" diff --git a/gcore-registry/templates/GHNConfig.xml b/gcore-registry/templates/GHNConfig.xml new file mode 100755 index 00000000..e80d5584 --- /dev/null +++ b/gcore-registry/templates/GHNConfig.xml @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gcore-resourcebroker/defaults/main.yml b/gcore-resourcebroker/defaults/main.yml new file mode 100644 index 00000000..647954c5 --- /dev/null +++ b/gcore-resourcebroker/defaults/main.yml @@ -0,0 +1,23 @@ +--- +repo: "gcube-staging" +resourcebroker_version: "1.2.0-4.1.0-126927" +resourcebroker_artifact: "resourcebroker-service-{{ resourcebroker_version }}" +resourcebroker_gar: "{{ resourcebroker_artifact }}.gar" +resourcebroker_url: "http://maven.research-infrastructures.eu/nexus/service/local/repositories/{{ repo }}/content/org/gcube/resourcemanagement/resourcebroker-service/{{ resourcebroker_version }}/{{ resourcebroker_gar }}" + +resourcebroker_serialization_version: "1.2.0-4.1.0-126929" +resourcebroker_serialization_artifact: "resourcebroker-serialization-{{ resourcebroker_serialization_version }}" +resourcebroker_serialization_jar: "{{ resourcebroker_serialization_artifact }}.jar" +resourcebroker_serialization_url: "http://maven.research-infrastructures.eu/nexus/service/local/repositories/{{ repo }}/content/org/gcube/resourcemanagement/resourcebroker-serialization/{{ resourcebroker_serialization_version}}/{{ resourcebroker_serialization_jar }}" + +resourcebroker_stubs_version: "1.2.0-4.1.0-126927" +resourcebroker_stubs_artifact: "rbstubs-{{ resourcebroker_stubs_version }}" +resourcebroker_stubs_jar: "{{ resourcebroker_stubs_artifact }}.jar" +resourcebroker_stubs_url: "http://maven.research-infrastructures.eu/nexus/service/local/repositories/{{ repo }}/content/org/gcube/resourcemanagement/rbstubs/{{ resourcebroker_stubs_version }}/{{ resourcebroker_stubs_jar }}" + +resourcebroker_hostname: "d4s.res.eng.it" +resourcebroker_port: "8399" +resourcebroker_endpoint: "{{ resourcebroker_hostname }}:{{ resourcebroker_port }}" + +start_scopes: '' +infrastructure: 'd4s' diff --git a/gcore-resourcebroker/meta/main.yml.old b/gcore-resourcebroker/meta/main.yml.old new file mode 100644 index 00000000..69d1e2cc --- /dev/null +++ b/gcore-resourcebroker/meta/main.yml.old @@ -0,0 +1,2 @@ +dependencies: + - role: gcore-base diff --git a/gcore-resourcebroker/tasks/main.yml b/gcore-resourcebroker/tasks/main.yml new file mode 100644 index 00000000..b86ccf00 --- /dev/null +++ b/gcore-resourcebroker/tasks/main.yml @@ -0,0 +1,31 @@ +- name: download {{ resourcebroker_gar }} + get_url: url={{ resourcebroker_url }} dest=/tmp force=yes + +- name: deploy {{ resourcebroker_gar }} + shell: export GLOBUS_LOCATION={{ globus_location }} ANT_HOME={{ ant_location }} && {{ globus_location }}/bin/gcore-deploy-service /tmp/{{ resourcebroker_gar }} + +- name: add GLOBUS_OPTIONS to the gcore startup script + lineinfile: dest="{{ globus_location }}/gcore-start.sh" insertbefore="^nohup" state=present line='export GLOBUS_OPTIONS="-Xms512M -Xmx1024M"' + +- name: copy updated GHNConfig.xml + template: src=GHNConfig.xml dest={{ globus_location }}/config/ + +#- name: update the resourcebroker jndi-config.xml, add start scopes when needed +# lineinfile: dest="{{ globus_location }}/etc/{{ registry_artifact }}/jndi-config.xml" insertafter='.*?' state=present line=" " + +- name: deploy {{ resourcebroker_serialization_artifact }} + get_url: url={{ resourcebroker_serialization_url }} dest="{{ globus_location }}/lib/" force=yes + +- name: deploy {{ resourcebroker_stubs_artifact }} + get_url: url={{ resourcebroker_stubs_url }} dest="{{ globus_location }}/lib/" force=yes + +- name: set logicalhost parameter on {{ globus_location }}/etc/globus_wsrf_core/server-config.wsdd + replace: dest="{{ globus_location }}/etc/globus_wsrf_core/server-config.wsdd" regexp='localhost' replace="{{ resourcebroker_hostname }}" + +- name: restore ownership + file: dest={{ globus_location }} owner={{ ghn_user }} group={{ ghn_user }} recurse=yes + +- name: start gCore + become: yes + become_user: "{{ ghn_user }}" + shell: "{{ globus_location }}/gcore-start.sh" diff --git a/gcore-resourcebroker/templates/GHNConfig.xml b/gcore-resourcebroker/templates/GHNConfig.xml new file mode 100755 index 00000000..d23cdb0a --- /dev/null +++ b/gcore-resourcebroker/templates/GHNConfig.xml @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gcore-resourcemanager/defaults/main.yml b/gcore-resourcemanager/defaults/main.yml new file mode 100644 index 00000000..1c1743fc --- /dev/null +++ b/gcore-resourcemanager/defaults/main.yml @@ -0,0 +1,23 @@ +--- +repo: "gcube-staging" +resource_manager_version: "2.2.0-4.1.0-132314" +resource_manager_artifact: "resource-manager-service-{{ resource_manager_version }}" +resource_manager_gar: "{{ resource_manager_artifact }}.gar" +resource_manager_url: "http://maven.research-infrastructures.eu/nexus/service/local/repositories/{{ repo }}/content/org/gcube/resourcemanagement/resource-manager-service/{{ resource_manager_version }}/{{ resource_manager_gar}}" + +resourcebroker_serialization_version: "1.2.0-4.1.0-126929" +resourcebroker_serialization_artifact: "resourcebroker-serialization-{{ resourcebroker_serialization_version }}" +resourcebroker_serialization_jar: "{{ resourcebroker_serialization_artifact }}.jar" +resourcebroker_serialization_url: "http://maven.research-infrastructures.eu/nexus/service/local/repositories/{{ repo }}/content/org/gcube/resourcemanagement/resourcebroker-serialization/{{ resourcebroker_serialization_version}}/{{ resourcebroker_serialization_jar }}" + +resourcebroker_stubs_version: "1.2.0-4.1.0-126927" +resourcebroker_stubs_artifact: "rbstubs-{{ resourcebroker_stubs_version }}" +resourcebroker_stubs_jar: "{{ resourcebroker_stubs_artifact }}.jar" +resourcebroker_stubs_url: "http://maven.research-infrastructures.eu/nexus/service/local/repositories/{{ repo }}/content/org/gcube/resourcemanagement/rbstubs/{{ resourcebroker_stubs_version }}/{{ resourcebroker_stubs_jar }}" + +resource_manager_hostname: "d4s.res.eng.it" +resource_manager_port: "8499" +resource_manager_endpoint: "{{ resource_manager_hostname }}:{{ resource_manager_port }}" + +start_scopes: '' +infrastructure: 'd4s' diff --git a/gcore-resourcemanager/meta/main.yml b/gcore-resourcemanager/meta/main.yml new file mode 100644 index 00000000..69d1e2cc --- /dev/null +++ b/gcore-resourcemanager/meta/main.yml @@ -0,0 +1,2 @@ +dependencies: + - role: gcore-base diff --git a/gcore-resourcemanager/tasks/main.yml b/gcore-resourcemanager/tasks/main.yml new file mode 100644 index 00000000..0a3a9d6d --- /dev/null +++ b/gcore-resourcemanager/tasks/main.yml @@ -0,0 +1,31 @@ +- name: download {{ resource_manager_gar }} + get_url: url={{ resource_manager_url }} dest=/tmp force=yes + +- name: deploy {{ resource_manager_gar }} + shell: export GLOBUS_LOCATION={{ globus_location }} ANT_HOME={{ ant_location }} && {{ globus_location }}/bin/gcore-deploy-service /tmp/{{ resource_manager_gar }} + +- name: add GLOBUS_OPTIONS to the gcore startup script + lineinfile: dest="{{ globus_location }}/gcore-start.sh" insertbefore="^nohup" state=present line='export GLOBUS_OPTIONS="-Xms512M -Xmx1024M"' + +- name: copy updated GHNConfig.xml + template: src=GHNConfig.xml dest={{ globus_location }}/config/ + +#- name: copy updated resource-manager jndi-config.xml +# template: src=jndi-config.xml dest={{ globus_location }}/etc/{{ resource_manager_artifact }}/ + +- name: set logicalhost parameter on {{ globus_location }}/etc/globus_wsrf_core/server-config.wsdd + replace: dest="{{ globus_location }}/etc/globus_wsrf_core/server-config.wsdd" regexp='localhost' replace="{{ resource_manager_hostname }}" + +- name: deploy {{ resourcebroker_serialization_artifact }} + get_url: url={{ resourcebroker_serialization_url }} dest="{{ globus_location }}/lib/" force=yes + +- name: deploy {{ resourcebroker_stubs_artifact }} + get_url: url={{ resourcebroker_stubs_url }} dest="{{ globus_location }}/lib/" force=yes + +- name: restore ownership + file: dest={{ globus_location }} owner={{ ghn_user }} group={{ ghn_user }} recurse=yes + +- name: start gCore + become: yes + become_user: "{{ ghn_user }}" + shell: "{{ globus_location }}/gcore-start.sh" diff --git a/gcore-resourcemanager/templates/GHNConfig.xml b/gcore-resourcemanager/templates/GHNConfig.xml new file mode 100755 index 00000000..f53384cf --- /dev/null +++ b/gcore-resourcemanager/templates/GHNConfig.xml @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gcore-smartgears-container/defaults/main.yml b/gcore-smartgears-container/defaults/main.yml new file mode 100644 index 00000000..1b9265a5 --- /dev/null +++ b/gcore-smartgears-container/defaults/main.yml @@ -0,0 +1,11 @@ +repo: "gcube-staging" +smartgears_version: "2.0.0-4.2.1-133740" +image_name: "smartgears_whn" +image_tag: "{{ smartgears_version }}" +#image_tag: "latest" + + +infrastructure: "d4s" +hostname: "{{ ansible_hostname }}" +token: "24edab1c-6ff6-4c61-8f51-b52d4f5f4611-98187548" +container_mode: "offline" diff --git a/gcore-smartgears-container/files/common-scope-maps-1.0.4-4.2.0-128425-patched.jar b/gcore-smartgears-container/files/common-scope-maps-1.0.4-4.2.0-128425-patched.jar new file mode 100644 index 0000000000000000000000000000000000000000..15c2afdde8ea7a1d2d038d72b85856941e077fad GIT binary patch literal 6484 zcma)Ac{r5o8=kUcCws^;_I=AzsVqarT3ND%p)vNcpRy-pNrPl9%gI)fFxC#TN0=;G zV?tyt${zZCQ=Q+Lk}-1l=qn~0bZ1OkzPU`1ZgtiZCfMZmum z;GqF=fNWhoBs}3BJ`T2U7nqxoAvuUBkw(Tu*RaRL`x+(a5b+EV2=x6+7gbLaB1H$m zY%x(MrOzC$52fRl9@FiMzAP3kep&`YlH(2{ zivz)6c1a^iMGPDl{zwzT*aA%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6?{{>q5_ypJ|*oNQM6ssRHyvrmZPP=} z%a%in^Fqr=RTAm^l3zN=!KRgqEl-;dwi}kC!`!FJMa~U$wmPm;y;HBFVH$BK-x{)# z!e9g4H<#Ri@WW4W(J_D-Y6S|QIsQDRd2oa~R%X<0W@jp5n%oBLJ@c-8lQ_s5MN75} zx$X?-d7naZe(40&Oqk4e(E!EAXG^&OvtL)HSuSWFI?PG*yFC^wzy$~dkO4y9!2R00 z)gt+^)!LKl_hJ$*iSRMk0nGhZM*ofc>&gWmndtC$WP;NJFmVf*e|g(qmm2t(t3NRJ z>jVILpY_IGA_%ty_|WUXHgLb)!GF_$lPzKF#>XWk`Hs6cgdYr+FxBG2?gFs;XWWA! z6NW>47yxLKbr3B$yYyb{tvH#;82@N*>JNf`{``PV(d(D5Y8A5-G zkBg!Lf%bE&2g4;afB3jj)S&&X;K6_iJrq9heHs9GUq^K?WJ2?Sk6c3wAn$8M4u(uP r!ts&2=|KAq^n>9NPDy;+mZP9wX6ElONl0-Mg#q|n1Aev8//" $GHN_HOME/container.xml +RUN sed -ie "s/gcube<\/infrastructure>/{{ infrastructure }}<\/infrastructure>/" $GHN_HOME/container.xml +RUN sed -ie "/<\/infrastructure>/a \ {{ token }}" $GHN_HOME/container.xml + +EXPOSE 8080 + +CMD ./startContainer.sh diff --git a/gcore-smartgears-container/templates/Dockerfile.bckp b/gcore-smartgears-container/templates/Dockerfile.bckp new file mode 100644 index 00000000..8d39cf33 --- /dev/null +++ b/gcore-smartgears-container/templates/Dockerfile.bckp @@ -0,0 +1,25 @@ +from openjdk:7 + +ENV GHN_HOME=/SmartGears-Bundle/ +ENV BUNDLE_HOME=$GHN_HOME +ENV CATALINA_HOME=$GHN_HOME/tomcat/ +ENV CATALINA_OPTS="-Xmx2000m -Xms2000m -XX:MaxPermSize=512M" +ENV CATALINA_PID=$CATALINA_HOME/pid.txt + +#WORKDIR $GHN_HOME/ + +RUN \ + wget http://maven.research-infrastructures.eu/nexus/service/local/repositories/{{ repo }}/content/org/gcube/distribution/smartgears-distribution-bundle/{{ smartgears_version }}/smartgears-distribution-bundle-{{ smartgears_version }}.tar.gz \ + && tar xzvf smartgears-distribution-bundle-{{ smartgears_version }}.tar.gz \ #--strip-components=1 \ + && rm smartgears-distribution-bundle-{{ smartgears_version }}.tar.gz \ + && cd smartgears-distribution-bundle-{{ smartgears_version }} \ + && echo 1 | /bin/bash ./setup.sh -n {{ hostname }} -f \ + && ln -s $GHN_HOME/SmartGears/container.xml $GHN_HOME/container.xml \ + && sed -ie 's/^$CATALINA_HOME\/bin\/startup.sh/$CATALINA_HOME\/bin\/catalina.sh\ run/' startContainer.sh \ + && sed -ie "s///" container.xml \ + && sed -ie "s/gcube<\/infrastructure>/{{ infrastructure }}<\/infrastructure>/" container.xml \ + && sed -ie "/<\/infrastructure>/a \ {{ token }}" container.xml + +EXPOSE 8080 + +CMD /SmartGears-Bundle/startContainer.sh diff --git a/gcore-smartgears-container/templates/d4s.authorization b/gcore-smartgears-container/templates/d4s.authorization new file mode 100644 index 00000000..7e75ea64 --- /dev/null +++ b/gcore-smartgears-container/templates/d4s.authorization @@ -0,0 +1 @@ +{{ authorization_hostname }}false{{ authorization_port }} diff --git a/gcore-softwaregateway/defaults/main.yml b/gcore-softwaregateway/defaults/main.yml new file mode 100644 index 00000000..1e9fcc64 --- /dev/null +++ b/gcore-softwaregateway/defaults/main.yml @@ -0,0 +1,13 @@ +--- +repo: "gcube-staging" +software_gateway_version: "1.1.6-4.1.0-126706" +software_gateway_artifact: "softwaregateway-service-{{ software_gateway_version }}" +software_gateway_gar: "{{ software_gateway_artifact }}.gar" +software_gateway_url: "http://maven.research-infrastructures.eu/nexus/service/local/repositories/{{ repo }}/content/org/gcube/resourcemanagement/softwaregateway-service/{{ software_gateway_version }}/{{ software_gateway_gar }}" + +software_gateway_hostname: "d4s.res.eng.it" +software_gateway_port: "8599" +software_gateway_endpoint: "{{ software_gateway_hostname }}:{{ software_gateway_port }}" + +start_scopes: '' +infrastructure: 'd4s' diff --git a/gcore-softwaregateway/files/settings.xml b/gcore-softwaregateway/files/settings.xml new file mode 100644 index 00000000..28d09bf9 --- /dev/null +++ b/gcore-softwaregateway/files/settings.xml @@ -0,0 +1,61 @@ + + + + gcube-snapshots + gcube-user + maven + + + gcube-releases + gcube-user + maven + + + + + + gcube + + + gcube-staging + gCube Staging + http://maven.research-infrastructures.eu/nexus/content/repositories/gcube-staging + + false + + + true + + + + gcube-externals + gCube Externals + http://maven.research-infrastructures.eu/nexus/content/repositories/gcube-externals + + false + + + true + + + + + + gcube-releases + gCube Releases + http://maven.research-infrastructures.eu/nexus/content/repositories/gcube-releases + + false + + + true + + + + + + + gcube + + diff --git a/gcore-softwaregateway/meta/main.yml b/gcore-softwaregateway/meta/main.yml new file mode 100644 index 00000000..69d1e2cc --- /dev/null +++ b/gcore-softwaregateway/meta/main.yml @@ -0,0 +1,2 @@ +dependencies: + - role: gcore-base diff --git a/gcore-softwaregateway/tasks/main.yml b/gcore-softwaregateway/tasks/main.yml new file mode 100644 index 00000000..5cf61566 --- /dev/null +++ b/gcore-softwaregateway/tasks/main.yml @@ -0,0 +1,25 @@ +- name: download {{ software_gateway_gar }} + get_url: url={{ software_gateway_url }} dest=/tmp force=yes + +- name: deploy {{ software_gateway_gar }} + shell: export GLOBUS_LOCATION={{ globus_location }} ANT_HOME={{ ant_location }} && {{ globus_location }}/bin/gcore-deploy-service /tmp/{{ software_gateway_gar }} + +- name: add GLOBUS_OPTIONS to the gcore startup script + lineinfile: dest="{{ globus_location }}/gcore-start.sh" insertbefore="^nohup" state=present line='export GLOBUS_OPTIONS="-Xms512M -Xmx1024M"' + +- name: copy updated GHNConfig.xml + template: src=GHNConfig.xml dest={{ globus_location }}/config/ + +- name: copy settings.xml as per "https://gcube.wiki.gcube-system.org/gcube/Talk:Creating_gCube_Maven_components:_How-To#Repositories" + copy: src=settings.xml dest={{ globus_location }}/etc/{{ software_gateway_artifact }}/ + +- name: set logicalhost parameter on {{ globus_location }}/etc/globus_wsrf_core/server-config.wsdd + replace: dest="{{ globus_location }}/etc/globus_wsrf_core/server-config.wsdd" regexp='localhost' replace="{{ software_gateway_hostname }}" + +- name: restore ownership + file: dest={{ globus_location }} owner={{ ghn_user }} group={{ ghn_user }} recurse=yes + +- name: start gCore + become: yes + become_user: "{{ ghn_user }}" + shell: "{{ globus_location }}/gcore-start.sh" diff --git a/gcore-softwaregateway/templates/GHNConfig.xml b/gcore-softwaregateway/templates/GHNConfig.xml new file mode 100755 index 00000000..31c2d44e --- /dev/null +++ b/gcore-softwaregateway/templates/GHNConfig.xml @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +