Porting plugin to smart-executor 3.0.0

This commit is contained in:
Luca Frosini 2021-06-11 10:46:00 +02:00
parent 4cf5cb68dc
commit 87dfcbc64e
9 changed files with 39 additions and 53 deletions

View File

@ -2,9 +2,9 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
# Changelog for Resource Checker Smart Executor Plugin # Changelog for Resource Checker Smart Executor Plugin
## [v2.0.0-SNAPSHOT]
## [v2.0.0] [r5.0.0] - - Ported plugin to smart-executor APIs 3.0.0 [#21618]
- Switched smart-executor JSON management to gcube-jackson [#19647] - Switched smart-executor JSON management to gcube-jackson [#19647]
- Creating uberjar in place of jar-with-dependecies - Creating uberjar in place of jar-with-dependecies
- Used smart-executor bom for better dependency management - Used smart-executor bom for better dependency management

26
FUNDING.md Normal file
View File

@ -0,0 +1,26 @@
# Acknowledgments
The projects leading to this software have received funding from a series of European Union programmes including:
- the Sixth Framework Programme for Research and Technological Development
- [DILIGENT](https://cordis.europa.eu/project/id/004260) (grant no. 004260).
- the Seventh Framework Programme for research, technological development and demonstration
- [D4Science](https://cordis.europa.eu/project/id/212488) (grant no. 212488);
- [D4Science-II](https://cordis.europa.eu/project/id/239019) (grant no.239019);
- [ENVRI](https://cordis.europa.eu/project/id/283465) (grant no. 283465);
- [iMarine](https://cordis.europa.eu/project/id/283644) (grant no. 283644);
- [EUBrazilOpenBio](https://cordis.europa.eu/project/id/288754) (grant no. 288754).
- the H2020 research and innovation programme
- [SoBigData](https://cordis.europa.eu/project/id/654024) (grant no. 654024);
- [PARTHENOS](https://cordis.europa.eu/project/id/654119) (grant no. 654119);
- [EGI-Engage](https://cordis.europa.eu/project/id/654142) (grant no. 654142);
- [ENVRI PLUS](https://cordis.europa.eu/project/id/654182) (grant no. 654182);
- [BlueBRIDGE](https://cordis.europa.eu/project/id/675680) (grant no. 675680);
- [PerformFISH](https://cordis.europa.eu/project/id/727610) (grant no. 727610);
- [AGINFRA PLUS](https://cordis.europa.eu/project/id/731001) (grant no. 731001);
- [DESIRA](https://cordis.europa.eu/project/id/818194) (grant no. 818194);
- [ARIADNEplus](https://cordis.europa.eu/project/id/823914) (grant no. 823914);
- [RISIS 2](https://cordis.europa.eu/project/id/824091) (grant no. 824091);
- [EOSC-Pillar](https://cordis.europa.eu/project/id/857650) (grant no. 857650);
- [Blue Cloud](https://cordis.europa.eu/project/id/862409) (grant no. 862409);
- [SoBigData-PlusPlus](https://cordis.europa.eu/project/id/871042) (grant no. 871042);

View File

@ -17,6 +17,7 @@ See [Releases](https://code-repo.d4science.org/gCubeSystem/resource-checker-se-p
## Authors ## Authors
* **Costantino Perciante** ISTI-CNR
* **Luca Frosini** ([ORCID](https://orcid.org/0000-0003-3183-2291)) - [ISTI-CNR Infrascience Group](http://nemis.isti.cnr.it/groups/infrascience) * **Luca Frosini** ([ORCID](https://orcid.org/0000-0003-3183-2291)) - [ISTI-CNR Infrascience Group](http://nemis.isti.cnr.it/groups/infrascience)
## How to Cite this Software ## How to Cite this Software
@ -34,37 +35,16 @@ Tell people how to cite this software.
url = {http://www.gcube-system.org/} url = {http://www.gcube-system.org/}
} }
## License ### License
This project is licensed under the EUPL V.1.1 License - see the [LICENSE.md](LICENSE.md) file for details. This project is licensed under the EUPL V.1.1 License - see the [LICENSE.md](LICENSE.md) file for details.
## About the gCube Framework ## About the gCube Framework
This software is part of the [gCubeFramework](https://www.gcube-system.org/ "gCubeFramework"): an This software is part of the [gCubeFramework](https://www.gcube-system.org/ "gCubeFramework"): an
open-source software toolkit used for building and operating Hybrid Data open-source software toolkit used for building and operating Hybrid Data
Infrastructures enabling the dynamic deployment of Virtual Research Environments Infrastructures enabling the dynamic deployment of Virtual Research Environments
by favouring the realisation of reuse oriented policies. by favouring the realisation of reuse oriented policies.
The projects leading to this software have received funding from a series of European Union programmes including: The projects leading to this software have received funding from a series of European Union programmes see [FUNDING.md](FUNDING.md)
- the Sixth Framework Programme for Research and Technological Development
- DILIGENT (grant no. 004260).
- the Seventh Framework Programme for research, technological development and demonstration
- D4Science (grant no. 212488);
- D4Science-II (grant no.239019);
- ENVRI (grant no. 283465);
- iMarine(grant no. 283644);
- EUBrazilOpenBio (grant no. 288754).
- the H2020 research and innovation programme
- SoBigData (grant no. 654024);
- PARTHENOS (grant no. 654119);
- EGIEngage (grant no. 654142);
- ENVRIplus (grant no. 654182);
- BlueBRIDGE (grant no. 675680);
- PerformFish (grant no. 727610);
- AGINFRAplus (grant no. 731001);
- DESIRA (grant no. 818194);
- ARIADNEplus (grant no. 823914);
- RISIS2 (grant no. 824091);

View File

@ -11,7 +11,7 @@
<artifactId>resource-checker-se-plugin</artifactId> <artifactId>resource-checker-se-plugin</artifactId>
<version>2.0.0-SNAPSHOT</version> <version>2.0.0-SNAPSHOT</version>
<name>Resource Checker Smart Executor Plugin</name> <name>Resource Checker Smart Executor Plugin</name>
<description>Resource Checker Smart Executor Plugin periodically checks the presence of required resources in the IS V.1 in every context</description> <description>Resource Checker Smart Executor Plugin periodically checks the presence of required resources in the gCore IS in every context</description>
<scm> <scm>
<connection>scm:git:https://code-repo.d4science.org/gCubeSystem/${project.artifactId}.git</connection> <connection>scm:git:https://code-repo.d4science.org/gCubeSystem/${project.artifactId}.git</connection>

View File

@ -47,7 +47,6 @@ import org.xml.sax.InputSource;
* The resource-checker-se-plugin implementation class. * The resource-checker-se-plugin implementation class.
* @author Costantino Perciante at ISTI-CNR (costantino.perciante@isti.cnr.it) * @author Costantino Perciante at ISTI-CNR (costantino.perciante@isti.cnr.it)
*/ */
@SuppressWarnings("rawtypes")
public class ResourceCheckerPlugin extends Plugin { public class ResourceCheckerPlugin extends Plugin {
private static final int SECONDS2WAIT = 2; // seconds to wait among IS requests private static final int SECONDS2WAIT = 2; // seconds to wait among IS requests
@ -55,6 +54,7 @@ public class ResourceCheckerPlugin extends Plugin {
public static final String ROLE_TO_NOTIFY = "role"; public static final String ROLE_TO_NOTIFY = "role";
private static final String NAGIOS_PROPERTY_FILE = "/META-INF/plugin_resources/nagios-report-location.properties"; private static final String NAGIOS_PROPERTY_FILE = "/META-INF/plugin_resources/nagios-report-location.properties";
private static final Logger logger = LoggerFactory.getLogger(ResourceCheckerPlugin.class); private static final Logger logger = LoggerFactory.getLogger(ResourceCheckerPlugin.class);
@SuppressWarnings("rawtypes")
private static final DiscoveryClient client = ICFactory.client(); private static final DiscoveryClient client = ICFactory.client();
public ResourceCheckerPlugin(){ public ResourceCheckerPlugin(){
@ -200,6 +200,7 @@ public class ResourceCheckerPlugin extends Plugin {
* @return the identifier of the resource * @return the identifier of the resource
* @throws Exception * @throws Exception
*/ */
@SuppressWarnings("rawtypes")
private String isServicePresent(BasicFunctionalityBean service, DiscoveryClient client, DocumentBuilder docBuilder) throws Exception { private String isServicePresent(BasicFunctionalityBean service, DiscoveryClient client, DocumentBuilder docBuilder) throws Exception {
Class classFor = service.getType() == null? ServiceEndpoint.class : service.getType(); // default is service end point Class classFor = service.getType() == null? ServiceEndpoint.class : service.getType(); // default is service end point

View File

@ -0,0 +1,4 @@
groupId=org.gcube.information-system
artifactId=resource-checker-se-plugin
version=2.0.0-SNAPSHOT
description=Resource Checker Smart Executor Plugin periodically checks the presence of required resources in the gCore IS in every context

View File

@ -1 +0,0 @@
org.gcube.informationsystem.resource_checker.ResourceCheckerPluginDeclaration

View File

@ -1,24 +0,0 @@
<assembly
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
<id>tar.gz</id>
<formats>
<format>tar.gz</format>
</formats>
<baseDirectory>${file.separator}</baseDirectory>
<fileSets>
<fileSet>
<directory>target${file.separator}libs</directory>
<outputDirectory>${file.separator}</outputDirectory>
<useDefaultExcludes>true</useDefaultExcludes>
<fileMode>755</fileMode>
</fileSet>
</fileSets>
<files>
<file>
<source>target${file.separator}${project.artifactId}-${project.version}.jar</source>
<filtered>true</filtered>
</file>
</files>
</assembly>