Project

General

Profile

Actions

Task #9060

closed

Changes to the EGI VMs contextualization script

Added by Andrea Dell'Amico almost 8 years ago. Updated almost 8 years ago.

Status:
Closed
Priority:
Normal
Category:
System Application
Start date:
Jun 27, 2017
Due date:
% Done:

100%

Estimated time:
Infrastructure:
Development, Pre-Production, Production

Description

The EGI dataminer images available right now need a manual intervention after the activation.

There are three problems:

  • the variable 'AUTHORIZED_CHILDREN' is not exported correctly
  • the configuration script does not initialize a variable, and the effect is that the gcube home directory is set with wrong permissions
  • the whn-manager is deployed incorrectly, lot of jar files are missing (the war file is OK).

Files

dev-init-script (1.81 KB) dev-init-script contextualization script, fixed Andrea Dell'Amico, Jun 27, 2017 01:33 PM
Actions #1

Updated by Andrea Dell'Amico almost 8 years ago

  • Status changed from New to In Progress
Actions #2

Updated by Andrea Dell'Amico almost 8 years ago

I'm attaching a contextualization script that fixes all the three problems. It's the one used in dev, but the others differ only for the scopes list.
Here is the diff against the original, too:

--- dev-init-script.orig    2017-06-27 13:20:17.000000000 +0200
+++ dev-init-script 2017-06-27 13:33:07.000000000 +0200
@@ -6,10 +6,10 @@
 export INFRA_NAME="gcube"
 export SMARTGEARS_SCOPES="/gcube /gcube/devsec /gcube/devNext"
 export SMARTGEARS_TOKEN='token'
+export AUTHORIZE_CHILDREN='true'

 # This script is installed into the VM instance
 PATH="/bin:/sbin:/usr/bin:/usr/sbin:$PATH"
-AUTHORIZE_CHILDREN=true
 HOSTS_FILE=/etc/hosts
 PUBLIC_IP=$( wget http://ipecho.net/plain -qO - )
 MAIN_IP=$( ip addr show scope global dev eth0 | grep inet | awk '{ print $2 }' | cut -d "/" -f 1 )
@@ -31,4 +31,15 @@
 grep -v $PUBLIC_IP $HOSTS_FILE > $HOSTS_FILE.tmp
 echo "$PUBLIC_IP $PUB_FQDN_HOST $HOST" >> $HOSTS_FILE.tmp
 mv $HOSTS_FILE.tmp $HOSTS_FILE
+#
+service tomcat-instance-9000 stop
+chmod 755 /home/gcube
+rm -fr /home/gcube/tomcat/webapps/whn-manager
+grep -v authorizeChildrenContext /home/gcube/SmartGears/container.xml > /tmp/container1.xml
+grep -v \<\/container\> /tmp/container1.xml > /tmp/container2.xml
+echo "<authorizeChildrenContext>true</authorizeChildrenContext>" >> /tmp/container2.xml
+echo "</container>" >> /tmp/container2.xml
+mv /tmp/container2.xml /home/gcube/SmartGears/container.xml
+chown gcube:gcube /home/gcube/SmartGears/container.xml
+service tomcat-instance-9000 start
 exit 0
Actions #3

Updated by Andrea Dell'Amico almost 8 years ago

  • % Done changed from 100 to 80

@nunzioandrea.galante@eng.it can you change the fhn-manager so that it uses the new script?

Actions #4

Updated by Nunzio Andrea Galante almost 8 years ago

  • % Done changed from 80 to 100

Thanks Andrea. New references to the context scripts are the following:

Actions #5

Updated by Nunzio Andrea Galante almost 8 years ago

  • Status changed from Feedback to Closed

Information System has been updated as well.

Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 8.91 MB)