ENTAXY-248 release 1.8.1
This commit is contained in:
@ -24,26 +24,32 @@ echo "Welcome to Entaxy platform installation script"
|
||||
echo "************"
|
||||
|
||||
echo
|
||||
echo "** Checking feature repository: ${project.groupId}/${project.artifactId}/${project.version}/xml/features ..."
|
||||
echo "** Checking feature repository: ru.entaxy.esb/platform/1.8.1/xml/features ..."
|
||||
|
||||
_repo = (feature:repo-list | grep ru.entaxy.esb/platform)
|
||||
_repo = (feature:repo-list | grep ru.entaxy.esb/platform/)
|
||||
_repo_length = ($_repo length)
|
||||
if { $_repo_length'' equals "0" } {
|
||||
echo "\>\> Installing Entaxy repository..."
|
||||
feature:repo-add mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features
|
||||
feature:repo-add mvn:ru.entaxy.esb/platform/1.8.1/xml/features
|
||||
echo "\>\> ... installed"
|
||||
} else {
|
||||
echo "\>\> Entaxy repository is already installed"
|
||||
}
|
||||
|
||||
echo
|
||||
echo "** Checking entaxy-karaf-configuration feature ..."
|
||||
echo "** Checking entaxy-underlying-configuration feature ..."
|
||||
|
||||
service = (service:get org.apache.karaf.features.FeaturesService)
|
||||
|
||||
_config_feature = ($service getFeature entaxy-underlying-configuration)
|
||||
_config_id = $_config_feature getId
|
||||
_status = ($service getState $_config_id) toString
|
||||
|
||||
_in_shutdown = "0"
|
||||
|
||||
_config = [((feature:list | grep entaxy-karaf-configuration) split '\|')]
|
||||
_status = (($_config get 3) trim)
|
||||
if { $_status equals "Uninstalled" } {
|
||||
echo "\>\> Installing feature..."
|
||||
feature:install entaxy-karaf-configuration
|
||||
feature:install entaxy-underlying-configuration
|
||||
echo "\>\> ... installed"
|
||||
echo
|
||||
if { $1'' equals "skipReboot" } {
|
||||
@ -56,30 +62,83 @@ if { $_status equals "Uninstalled" } {
|
||||
echo " \( see etc/jre.properties \)"
|
||||
echo
|
||||
echo "** PLEASE RUN THE SCRIPT AGAIN AFTER RESTART **"
|
||||
_in_shutdown = "1"
|
||||
shutdown -r -f
|
||||
}
|
||||
} else {
|
||||
echo "\>\> Entaxy configuration is already installed"
|
||||
}
|
||||
|
||||
echo
|
||||
_config = [((feature:list | grep entaxy-karaf-configuration) split '\|')]
|
||||
_status = (($_config get 3) trim)
|
||||
if { NOT { $_status equals "Started" } } {
|
||||
echo "** Current configuration feature status is " $_status
|
||||
echo "** Please clean the container and run installation again "
|
||||
} else {
|
||||
echo "** Installing Entaxy platform in verbose mode..."
|
||||
_platform = [((feature:list | grep entaxy-platform) split '\|')]
|
||||
_status = (($_platform get 3) trim)
|
||||
if { $_status equals "Uninstalled" } {
|
||||
feature:install -v entaxy-platform
|
||||
echo
|
||||
echo "\>\> ... installed"
|
||||
} else {
|
||||
echo "\>\> Entaxy platform is already installed"
|
||||
}
|
||||
}
|
||||
if { $_in_shutdown equals "0" } {
|
||||
|
||||
echo
|
||||
echo "** Thank you!"
|
||||
echo
|
||||
_status = ( ($service getState $_config_id) toString )
|
||||
|
||||
if { NOT { $_status equals "Started" } } {
|
||||
echo "** Current configuration feature status is not [Started]"
|
||||
echo "** Please check the feature [entaxy-underlying-configuration]"
|
||||
echo "or clean the container and run installation again "
|
||||
} else {
|
||||
echo "** Installing Entaxy subplatform components in silent mode..."
|
||||
|
||||
echo "*** entaxy-karaf-basic .."
|
||||
_basic_feature = ($service getFeature entaxy-karaf-basic)
|
||||
_basic_id = $_basic_feature getId
|
||||
_basic_status = ( ($service getState $_basic_id) toString )
|
||||
if { NOT { $_basic_status equals "Started" } } {
|
||||
try { feature:install entaxy-karaf-basic } { echo ".. ERROR" } { echo ".. done" }
|
||||
} else {
|
||||
echo ".. already installed"
|
||||
}
|
||||
|
||||
echo "*** entaxy-karaf-runtime .."
|
||||
|
||||
_runtime_feature = ($service getFeature entaxy-karaf-runtime)
|
||||
_runtime_id = $_runtime_feature getId
|
||||
_runtime_status = ( ($service getState $_runtime_id) toString )
|
||||
if { NOT { $_runtime_status equals "Started" } } {
|
||||
echo
|
||||
echo "** NOTICE **"
|
||||
echo " Karaf will refresh bundles during install, so the script may be terminated"
|
||||
echo " if you see karaf prompt or any other information on the screen"
|
||||
echo " PLEASE RUN THE SCRIPT AGAIN"
|
||||
echo "** ** **"
|
||||
echo
|
||||
sleep 10
|
||||
try { feature:install entaxy-karaf-runtime } { echo ".. ERROR" } { echo ".. done" }
|
||||
} else {
|
||||
echo ".. already installed"
|
||||
}
|
||||
|
||||
while { NOT { $_runtime_status equals "Started" } } {
|
||||
echo "... waiting ..."
|
||||
sleep 5
|
||||
_runtime_status = ( ($service getState $_runtime_id) toString )
|
||||
}
|
||||
echo "\>\> ... installed"
|
||||
echo
|
||||
echo "** Installing Entaxy platform in verbose mode..."
|
||||
|
||||
_platform_feature = ($service getFeature entaxy-platform)
|
||||
_platform_id = $_platform_feature getId
|
||||
_status = ( ($service getState $_platform_id) toString )
|
||||
if { $_status equals "Uninstalled" } {
|
||||
feature:install -v -r entaxy-platform
|
||||
echo
|
||||
echo "\>\> ... installed"
|
||||
} else {
|
||||
echo "\>\> Entaxy platform is already installed"
|
||||
}
|
||||
}
|
||||
|
||||
echo
|
||||
echo "** NOTICE **"
|
||||
echo " If you see some bundles in [Failure] or [GracePeriod] state please"
|
||||
echo " (a) restart (bundle:stop and bundle:start) bundles in [Failure] state "
|
||||
echo " or"
|
||||
echo " (b) restart the container "
|
||||
echo "** ** **"
|
||||
echo
|
||||
echo "** Thank you!"
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user