Merge pull request 'master' (#1) from gCubeSystem/cloudcomputing-platform-portlets:master into master

Reviewed-on: #1
This commit is contained in:
Marco Lettere 2024-07-10 10:37:51 +02:00
commit f4a540e2a7
5 changed files with 56 additions and 30 deletions

View File

@ -4,6 +4,6 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [v1.0.0] - 2023-05-21 ## [v1.0.0] - 2023-06-25
First Release First Release

View File

@ -1,35 +1,54 @@
# VERSION=1.0.0-snapshot #!/bin/bash
# MVN_VERSION=$(mvn -q \ set -e
# -Dexec.executable=echo \
# -Dexec.args='${project.version}' \
# --non-recursive \
# exec:exec)
# echo "MVN_VERSION=${MVN_VERSION}"
# 10.1.30.156 # Define server arrays for different environments
DEST_HOST=lr62-dev SERVERS_PRE=("lr62-pre-01" "lr62-pre-02")
# DEST_HOST=lr62-prod-01 SERVERS_PROD=("lr62-prod-01" "lr62-prod-02")
# DEST_HOST=lr62-prod-02 SERVERS_DEV=("lr62-dev")
# Set default deployment environment to 'dev', can override with 'pre' or 'prod'
ENVIRONMENT=${1:-dev}
# Select the appropriate server array based on the environment
case "$ENVIRONMENT" in
pre)
SERVERS=("${SERVERS_PRE[@]}")
;;
prod)
SERVERS=("${SERVERS_PROD[@]}")
;;
*)
SERVERS=("${SERVERS_DEV[@]}")
;;
esac
echo "Selected environment: $ENVIRONMENT"
echo "Deploying to servers: ${SERVERS[*]}"
# Retrieve Maven project name
MVN_NAME=$(mvn -q \ MVN_NAME=$(mvn -q \
-Dexec.executable=echo \ -Dexec.executable=echo \
-Dexec.args='${project.artifactId}' \ -Dexec.args='${project.artifactId}' \
--non-recursive \ --non-recursive \
exec:exec) exec:exec)
echo "MVN_NAME=${MVN_NAME}" echo "MVN_NAME=${MVN_NAME}"
# Retrieve Maven final name of the build artifact
MVN_FINALNAME=$(mvn -q \ MVN_FINALNAME=$(mvn -q \
-Dexec.executable=echo \ -Dexec.executable=echo \
-Dexec.args='${project.build.finalName}' \ -Dexec.args='${project.build.finalName}' \
--non-recursive \ --non-recursive \
exec:exec) exec:exec)
echo "MVN_FINALNAME=${MVN_FINALNAME}" echo "MVN_FINALNAME=${MVN_FINALNAME}"
# Execute Maven clean and package
mvn clean package mvn clean package
scp target/$MVN_FINALNAME.war life@$DEST_HOST:/home/life/Portal-Bundle/deploy/$MVN_NAME.war # Deploy to each server in the selected list
for HOST in "${SERVERS[@]}"; do
ssh $DEST_HOST "sudo journalctl -fl -u liferay" scp target/$MVN_FINALNAME.war life@$HOST:/home/life/Portal-Bundle/deploy/$MVN_NAME.war
done
# Tail log from the last server in the list
ssh $HOST "sudo journalctl -fl -u liferay"

View File

@ -11,10 +11,10 @@
<relativePath /> <relativePath />
</parent> </parent>
<groupId>org.gcube.portlets.user</groupId> <groupId>org.gcube.portlets.user</groupId>
<artifactId>cloudcomputing-platform-portlet</artifactId> <artifactId>cloudcomputing-platform-portlets</artifactId>
<version>1.0.0</version> <version>1.0.0</version>
<packaging>war</packaging> <packaging>war</packaging>
<name>cloudcomputing-platform-portlet Portlets</name> <name>Cloudcomputing Platform Portlets</name>
<description> <description>
gCube Cloud Computing Platform Portlets. gCube Cloud Computing Platform Portlets.

View File

@ -19,7 +19,7 @@
<mime-type>text/html</mime-type> <mime-type>text/html</mime-type>
</supports> </supports>
<portlet-info> <portlet-info>
<title>CloudComputerPlatform Boot</title> <title>CloudComputingPlatform (CCP)</title>
<short-title>CCP Boot</short-title> <short-title>CCP Boot</short-title>
<keywords>cloudcomputing, boot, platform, ccn</keywords> <keywords>cloudcomputing, boot, platform, ccn</keywords>
</portlet-info> </portlet-info>
@ -39,7 +39,7 @@
<portlet> <portlet>
<portlet-name>cloudcomputing-config-portlet</portlet-name> <portlet-name>cloudcomputing-config-portlet</portlet-name>
<display-name>CloudComputerPlatform Configuration Portlet</display-name> <display-name>CloudComputingPlatform Configuration Portlet</display-name>
<portlet-class> <portlet-class>
org.gcube.portlets.user.cloudcomputing.CC_ConfigurationPortlet org.gcube.portlets.user.cloudcomputing.CC_ConfigurationPortlet
</portlet-class> </portlet-class>
@ -52,7 +52,7 @@
<mime-type>text/html</mime-type> <mime-type>text/html</mime-type>
</supports> </supports>
<portlet-info> <portlet-info>
<title>CloudComputerPlatform Configuration</title> <title>CloudComputingPlatform Configuration</title>
<short-title>CCP Configuration</short-title> <short-title>CCP Configuration</short-title>
<keywords>cloudcomputing, config, configuration, platform, ccn</keywords> <keywords>cloudcomputing, config, configuration, platform, ccn</keywords>
</portlet-info> </portlet-info>

View File

@ -11,5 +11,12 @@
redirect-url="${redirect_url}" redirect-url="${redirect_url}"
url="${auth_url}"/> url="${auth_url}"/>
<script src="${cdn_url}/boot/d4s-boot.js"></script> <script src="${cdn_url}/boot/d4s-boot.js"></script>
<span>
Run your Methods/Algorithms on the Cloud
<!-- </span>
<span style="display: block; text-align: right;"> -->
<a href="https://dev.d4science.org/ccp" target="_blank">Learn more</a>
</span>
</d4s-boot-2> </d4s-boot-2>
</div> </div>