diff --git a/_collector_files/GHNConfig-2.xml b/_collector_files/GHNConfig-2.xml
new file mode 100644
index 0000000..e5e15f0
--- /dev/null
+++ b/_collector_files/GHNConfig-2.xml
@@ -0,0 +1,74 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/_collector_files/jndi-config-2.xml b/_collector_files/jndi-config-2.xml
new file mode 100644
index 0000000..c5f884e
--- /dev/null
+++ b/_collector_files/jndi-config-2.xml
@@ -0,0 +1,153 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ factory
+
+
+ org.globus.wsrf.jndi.BeanFactory
+
+
+
+
+ entrySweeperInterval
+
+
+ 480000
+
+
+
+
+ entryRemovedCallback
+
+
+ org.gcube.informationsystem.collector.impl.state.ICAggregatorRemoveCallback
+
+
+
+ aggregatorSources
+ org.globus.mds.aggregator.impl.QueryAggregatorSource
+ org.globus.mds.aggregator.impl.SubscriptionAggregatorSource
+ org.globus.mds.aggregator.impl.ExecutionAggregatorSource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ factory
+
+
+ org.globus.wsrf.jndi.BeanFactory
+
+
+
+ resourceClass
+ org.gcube.informationsystem.collector.impl.state.AggregatorRegisteredResource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ factory
+
+
+ org.globus.wsrf.jndi.BeanFactory
+
+
+
+
+
+
+
+
+
+
diff --git a/_collector_files/server-config.wsdd b/_collector_files/server-config.wsdd
new file mode 100644
index 0000000..9f8ff49
--- /dev/null
+++ b/_collector_files/server-config.wsdd
@@ -0,0 +1,197 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ share/schema/core/notification/notification_consumer_service.wsdl
+
+
+
+
+
+
+
+
+
+
+
+ share/schema/core/notification/subscription_manager_service.wsdl
+
+
+
+
+
+
+ share/schema/core/security/secconv/secure_conversation_service.wsdl
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/group_vars/is_registry_devsec/is_registry_devsec.yml b/group_vars/is_registry_devsec/is_registry_devsec.yml
index d7f5c75..98bf8a5 100644
--- a/group_vars/is_registry_devsec/is_registry_devsec.yml
+++ b/group_vars/is_registry_devsec/is_registry_devsec.yml
@@ -2,4 +2,4 @@ start_scopes: 'devsec'
complete_start_scope: '/gcube/devsec'
gcore_host: 'node3.d.d4science.research-infrastructures.eu'
is_registry_docker_stack_name: 'gcore-devsec'
-is_registry_docker_service_server_name: 'is_registry'
+is_registry_docker_service_server_name: 'is-registry'
diff --git a/is-collector.yml b/is-collector.yml
new file mode 100644
index 0000000..e838b79
--- /dev/null
+++ b/is-collector.yml
@@ -0,0 +1,12 @@
+---
+- name: Configurazione IS Collector Service
+ #hosts: is_registry_devsec:is_registry_devnext
+ hosts: all
+ # tasks:
+ # - name:
+ # debug:
+ # var: start_scopes
+ roles:
+ - { role: is-collector }
+
+
diff --git a/is-registry.yml b/is-registry.yml
index 3b76b09..13f4d8d 100644
--- a/is-registry.yml
+++ b/is-registry.yml
@@ -1,5 +1,5 @@
---
-- name: Configurazione IS Registry
+- name: Configurazione IS Registry Service
#hosts: is_registry_devsec:is_registry_devnext
hosts: all
# tasks:
diff --git a/is-registry/README.md b/roles/is-collector/README.md
similarity index 100%
rename from is-registry/README.md
rename to roles/is-collector/README.md
diff --git a/roles/is-collector/defaults/main.yml b/roles/is-collector/defaults/main.yml
new file mode 100644
index 0000000..ed0d4f6
--- /dev/null
+++ b/roles/is-collector/defaults/main.yml
@@ -0,0 +1,15 @@
+---
+# defaults file for is-collector
+start_scopes: 'devNext'
+infrastructure: 'gcube'
+complete_start_scope: '/gcube/devNext'
+gcore_host: 'node8-d-d4s.d4science.org'
+config_dir: 'etc/is-collector-service'
+scope_name: '{{ start_scopes | lower }}'
+is_collector_compose_dir: '/srv/is-collector-stack-{{ scope_name }}'
+is_collector_docker_stack_name: 'is-collector-stack-{{ scope_name }}'
+is_collector_docker_service_server_name: 'is-collector-{{ scope_name }}'
+is_collector_docker_server_image: 'd4science/gcore-is-collector:latest'
+is_collector_docker_network: 'is-collector-network'
+#is_registry_service_port: 8080
+is_registry_haproxy_public_net: 'haproxy-public'
\ No newline at end of file
diff --git a/roles/is-collector/meta/main.yml b/roles/is-collector/meta/main.yml
new file mode 100644
index 0000000..6be6bab
--- /dev/null
+++ b/roles/is-collector/meta/main.yml
@@ -0,0 +1,55 @@
+galaxy_info:
+ author: Antonio Calanducci
+ description: IS Collector
+ company: ISTI-CNR
+
+ # If the issue tracker for your role is not on github, uncomment the
+ # next line and provide a value
+ # issue_tracker_url: http://example.com/issue/tracker
+
+ # Choose a valid license ID from https://spdx.org - some suggested licenses:
+ # - BSD-3-Clause (default)
+ # - MIT
+ # - GPL-2.0-or-later
+ # - GPL-3.0-only
+ # - Apache-2.0
+ # - CC-BY-4.0
+ license: EUPL 1.2+
+
+ min_ansible_version: 2.9
+
+ # If this a Container Enabled role, provide the minimum Ansible Container version.
+ # min_ansible_container_version:
+
+ #
+ # Provide a list of supported platforms, and for each platform a list of versions.
+ # If you don't wish to enumerate all versions for a particular platform, use 'all'.
+ # To view available platforms and versions (or releases), visit:
+ # https://galaxy.ansible.com/api/v1/platforms/
+ #
+ # platforms:
+ # - name: Fedora
+ # versions:
+ # - all
+ # - 25
+ # - name: SomePlatform
+ # versions:
+ # - all
+ # - 1.0
+ # - 7
+ # - 99.99
+
+ galaxy_tags: []
+ # List tags for your role here, one per line. A tag is a keyword that describes
+ # and categorizes the role. Users find roles by searching for tags. Be sure to
+ # remove the '[]' above, if you add tags to this list.
+ #
+ # NOTE: A tag is limited to a single word comprised of alphanumeric characters.
+ # Maximum 20 tags per role.
+
+dependencies: []
+# - name: python3-environment
+# src: git+https://gitea-s2i2s.isti.cnr.it/ISTI-ansible-roles/ansible-role-python3-environment.git
+# version: master
+# state: latest
+
diff --git a/roles/is-collector/tasks/main.yml b/roles/is-collector/tasks/main.yml
new file mode 100644
index 0000000..8539860
--- /dev/null
+++ b/roles/is-collector/tasks/main.yml
@@ -0,0 +1,67 @@
+---
+# tasks file for is-registry
+- name: Create the directory where the compose file will be installed
+ ansible.builtin.file:
+ dest: '{{ is_collector_compose_dir }}'
+ state: directory
+ mode: 0750
+ owner: root
+ group: root
+
+- name: Install the docker compose file
+ ansible.builtin.template:
+ src: docker-compose.yml.j2
+ dest: '{{ is_collector_compose_dir }}/is-collector-docker-compose.yml'
+ owner: root
+ group: root
+ mode: 0400
+
+
+- name: Install the GHNConfig.xml
+ ansible.builtin.template:
+ src: GHNConfig.xml.j2
+ dest: "{{ is_collector_compose_dir }}/GHNConfig.xml"
+ owner: root
+ group: root
+ mode: 0400
+
+- name: Install the jndi-config.xml
+ ansible.builtin.template:
+ src: jndi-config.xml.j2
+ dest: "{{ is_collector_compose_dir }}/jndi-config.xml"
+ owner: root
+ group: root
+ mode: 0400
+
+- name: Install the server-config.wsdd
+ ansible.builtin.template:
+ src: server-config.wsdd.j2
+ dest: "{{ is_collector_compose_dir }}/server-config.wsdd"
+ owner: root
+ group: root
+ mode: 0400
+
+- name: Create the secret for GHNConfig.xml
+ community.docker.docker_secret:
+ name: ghn-config-{{ scope_name }}
+ data_src: '{{ is_collector_compose_dir }}/GHNConfig.xml'
+ state: present
+
+- name: Create the secret for jndi-config.xml
+ community.docker.docker_secret:
+ name: jndi-config-{{ scope_name }}
+ data_src: '{{ is_collector_compose_dir }}/jndi-config.xml'
+ state: present
+
+- name: Create the secret for server-config.wsdd
+ community.docker.docker_secret:
+ name: server-config-{{ scope_name }}
+ data_src: '{{ is_collector_compose_dir }}/server-config.wsdd'
+ state: present
+
+- name: Start the project stack on Docker Swarm
+ community.docker.docker_stack:
+ name: '{{ is_collector_docker_stack_name }}'
+ state: present
+ compose:
+ - '{{ is_collector_compose_dir }}/is-collector-docker-compose.yml'
\ No newline at end of file
diff --git a/is-registry/templates/GHNConfig.xml.j2 b/roles/is-collector/templates/GHNConfig.xml.j2
similarity index 100%
rename from is-registry/templates/GHNConfig.xml.j2
rename to roles/is-collector/templates/GHNConfig.xml.j2
diff --git a/roles/is-collector/templates/docker-compose.yml.j2 b/roles/is-collector/templates/docker-compose.yml.j2
new file mode 100644
index 0000000..9a7a527
--- /dev/null
+++ b/roles/is-collector/templates/docker-compose.yml.j2
@@ -0,0 +1,44 @@
+version: '3.6'
+
+networks:
+ {{ is_collector_docker_network }}:
+ {{ is_collector_haproxy_public_net }}:
+ external: true
+
+secrets:
+ ghn-config-{{ scope_name }}:
+ external: true
+ jndi-config-{{ scope_name }}:
+ external: true
+ server-config-{{ scope_name }}:
+ external: true
+
+services:
+ {{ is_collector_docker_service_server_name }}:
+ image: {{ is_collector_docker_server_image }}
+ networks:
+ - {{ is_collector_docker_network }}
+ - {{ is_collector_haproxy_public_net }}
+ secrets:
+ - source: ghn-config-{{ scope_name }}
+ target: /home/gcube/gCore/config/GHNConfig.xml
+ mode: 0444
+ - source: jndi-config-{{ scope_name }}
+ target: /home/gcube/gCore/etc/is-collector-service/jndi-config.xml
+ mode: 0444
+ - source: server-config-{{ scope_name }}
+ target: /home/gcube/gCore/etc/globus_wsrf_core/server-config.wsdd
+ mode: 0444
+ deploy:
+ mode: replicated
+ replicas: 1
+ endpoint_mode: dnsrr
+ placement:
+ constraints: [node.role == worker]
+ restart_policy:
+ condition: on-failure
+ delay: 5s
+ max_attempts: 5
+ window: 120s
+ logging:
+ driver: 'journald'
diff --git a/is-registry/templates/jndi-config.xml.j2 b/roles/is-collector/templates/jndi-config.xml.j2
similarity index 100%
rename from is-registry/templates/jndi-config.xml.j2
rename to roles/is-collector/templates/jndi-config.xml.j2
diff --git a/is-registry/templates/server-config.wsdd.j2 b/roles/is-collector/templates/server-config.wsdd.j2
similarity index 100%
rename from is-registry/templates/server-config.wsdd.j2
rename to roles/is-collector/templates/server-config.wsdd.j2
diff --git a/is-registry/tests/inventory b/roles/is-collector/tests/inventory
similarity index 100%
rename from is-registry/tests/inventory
rename to roles/is-collector/tests/inventory
diff --git a/is-registry/tests/test.yml b/roles/is-collector/tests/test.yml
similarity index 100%
rename from is-registry/tests/test.yml
rename to roles/is-collector/tests/test.yml
diff --git a/is-registry/vars/main.yml b/roles/is-collector/vars/main.yml
similarity index 100%
rename from is-registry/vars/main.yml
rename to roles/is-collector/vars/main.yml
diff --git a/roles/is-registry/README.md b/roles/is-registry/README.md
new file mode 100644
index 0000000..1511e84
--- /dev/null
+++ b/roles/is-registry/README.md
@@ -0,0 +1,38 @@
+IS Registry Role
+=========
+
+A brief description of the role goes here.
+
+Requirements
+------------
+
+Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required.
+
+Role Variables
+--------------
+
+A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well.
+
+Dependencies
+------------
+
+A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles.
+
+Example Playbook
+----------------
+
+Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
+
+ - hosts: servers
+ roles:
+ - { role: username.rolename, x: 42 }
+
+License
+-------
+
+BSD
+
+Author Information
+------------------
+
+An optional section for the role authors to include contact information, or a website (HTML is not allowed).
diff --git a/is-registry/defaults/main.yml b/roles/is-registry/defaults/main.yml
similarity index 100%
rename from is-registry/defaults/main.yml
rename to roles/is-registry/defaults/main.yml
diff --git a/is-registry/meta/main.yml b/roles/is-registry/meta/main.yml
similarity index 100%
rename from is-registry/meta/main.yml
rename to roles/is-registry/meta/main.yml
diff --git a/is-registry/tasks/main.yml b/roles/is-registry/tasks/main.yml
similarity index 100%
rename from is-registry/tasks/main.yml
rename to roles/is-registry/tasks/main.yml
diff --git a/roles/is-registry/templates/GHNConfig.xml.j2 b/roles/is-registry/templates/GHNConfig.xml.j2
new file mode 100644
index 0000000..f828b00
--- /dev/null
+++ b/roles/is-registry/templates/GHNConfig.xml.j2
@@ -0,0 +1,81 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/is-registry/templates/docker-compose.yml.j2 b/roles/is-registry/templates/docker-compose.yml.j2
similarity index 100%
rename from is-registry/templates/docker-compose.yml.j2
rename to roles/is-registry/templates/docker-compose.yml.j2
diff --git a/roles/is-registry/templates/jndi-config.xml.j2 b/roles/is-registry/templates/jndi-config.xml.j2
new file mode 100644
index 0000000..9280380
--- /dev/null
+++ b/roles/is-registry/templates/jndi-config.xml.j2
@@ -0,0 +1,50 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ factory
+ org.globus.wsrf.jndi.BeanFactory
+
+
+ resourceClass
+ org.gcube.informationsystem.registry.impl.state.RegistryFactoryResource
+
+
+
+
+
+
+
+
+
+
+
diff --git a/roles/is-registry/templates/server-config.wsdd.j2 b/roles/is-registry/templates/server-config.wsdd.j2
new file mode 100644
index 0000000..0e363dc
--- /dev/null
+++ b/roles/is-registry/templates/server-config.wsdd.j2
@@ -0,0 +1,200 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ share/schema/core/notification/notification_consumer_service.wsdl
+
+
+
+
+
+
+
+
+
+
+
+ share/schema/core/notification/subscription_manager_service.wsdl
+
+
+
+
+
+
+ share/schema/core/security/secconv/secure_conversation_service.wsdl
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/roles/is-registry/tests/inventory b/roles/is-registry/tests/inventory
new file mode 100644
index 0000000..878877b
--- /dev/null
+++ b/roles/is-registry/tests/inventory
@@ -0,0 +1,2 @@
+localhost
+
diff --git a/roles/is-registry/tests/test.yml b/roles/is-registry/tests/test.yml
new file mode 100644
index 0000000..1c8901e
--- /dev/null
+++ b/roles/is-registry/tests/test.yml
@@ -0,0 +1,5 @@
+---
+- hosts: localhost
+ remote_user: root
+ roles:
+ - is-registry
diff --git a/roles/is-registry/vars/main.yml b/roles/is-registry/vars/main.yml
new file mode 100644
index 0000000..a6d4649
--- /dev/null
+++ b/roles/is-registry/vars/main.yml
@@ -0,0 +1,8 @@
+---
+# vars file for is-registry
+py3_env_install: True
+py3_env_pip_pkgs:
+ - docker-compose
+ - docker
+ - jsondiff
+ansible_python_interpreter: /usr/bin/python3