Cherry-pick the following commit from release-0.3:
* Resolve issues with SQLCluster Ic2f5f1763472f13aeab63ef8919a437837d76b2f * Resolve issue with SQLCluster clusterIp property I2103edf9702b51472c32a3e5e789421fa1167c13 * Resolve issue with SQLServer Fixed bug #1245835 Id1adb038926f244ffbed6339a3aa1eb8387f29a5 * Linux+Apache support added, small fixes done I15db406d75e6e47ac2a7ffeb1e84da4a814d49f3 * Fixed linux workflow,templates and shell scripts Ie5ab1bc824dba07771d94686af63f939ab05d5ca * Remove send-command from Demo.xml I48a2ab0995c96c255c9dc95d84937427ae0b6194 * Changed config path and xinet dist based exec Ic03a540526e5807a43d07b70f901ce04dc5615f9 * Fixed FW saving rules on reboot for CentOS Iba4dbd4f5924f16dc6f5b547663157da189793c3 Change-Id: Iba4dbd4f5924f16dc6f5b547663157da189793c3
This commit is contained in:
parent
85c9c442a8
commit
0382648b5b
@ -1,7 +0,0 @@
|
||||
{
|
||||
"Scripts": [
|
||||
],
|
||||
"Commands": [
|
||||
],
|
||||
"RebootOnCompletion": 0
|
||||
}
|
@ -15,8 +15,8 @@ Scripts:
|
||||
Version: 1.0.0
|
||||
EntryPoint: Linux/runTelnetDeploy.sh
|
||||
Files:
|
||||
- Linux/installer.sh
|
||||
- Linux/common.sh
|
||||
- <Linux/installer.sh>
|
||||
- <Linux/common.sh>
|
||||
Options:
|
||||
captureStdout: true
|
||||
captureStderr: false
|
||||
|
@ -1,11 +1,11 @@
|
||||
{
|
||||
"Scripts": [
|
||||
"ImportCoreFunctions.ps1",
|
||||
"OptionParser.ps1",
|
||||
"SQLServerOptionParsers.ps1",
|
||||
"SQLServerInstaller.ps1",
|
||||
"Install-SQLServer.ps1",
|
||||
"Alter-FirewallRulesForSQL.ps1"
|
||||
"/ImportCoreFunctions.ps1",
|
||||
"/OptionParser.ps1",
|
||||
"SQLServer/SQLServerOptionParsers.ps1",
|
||||
"SQLServer/SQLServerInstaller.ps1",
|
||||
"SQLServer/Install-SQLServer.ps1",
|
||||
"/Alter-FirewallRulesForSQL.ps1"
|
||||
],
|
||||
"Commands": [
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"Scripts": [
|
||||
"ImportCoreFunctions.ps1",
|
||||
"SQLServerForAOAG.ps1"
|
||||
"/ImportCoreFunctions.ps1",
|
||||
"/SQLServerForAOAG.ps1"
|
||||
],
|
||||
"Commands": [
|
||||
{
|
||||
|
@ -1,8 +1,8 @@
|
||||
{
|
||||
"Scripts": [
|
||||
"ImportCoreFunctions.ps1",
|
||||
"Start-PowerShellProcess.ps1",
|
||||
"Failover-Cluster.ps1"
|
||||
"/ImportCoreFunctions.ps1",
|
||||
"/Start-PowerShellProcess.ps1",
|
||||
"/Failover-Cluster.ps1"
|
||||
],
|
||||
"Commands": [
|
||||
{
|
||||
@ -13,7 +13,7 @@
|
||||
"DomainName": "$domainName",
|
||||
"ClusterName": "$clusterName",
|
||||
"UserPassword": "$domainAdminAccountPassword",
|
||||
"StaticAddress": "$clusterIP"
|
||||
"StaticAddress": "$clusterIp"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
@ -1,9 +1,9 @@
|
||||
{
|
||||
"Scripts": [
|
||||
"ImportCoreFunctions.ps1",
|
||||
"Update-ServiceConfig.ps1",
|
||||
"SQLServerForAOAG.ps1",
|
||||
"Failover-Cluster.ps1"
|
||||
"/ImportCoreFunctions.ps1",
|
||||
"/Update-ServiceConfig.ps1",
|
||||
"/SQLServerForAOAG.ps1",
|
||||
"/Failover-Cluster.ps1"
|
||||
],
|
||||
"Commands": [
|
||||
{
|
||||
|
@ -1,12 +1,12 @@
|
||||
{
|
||||
"Scripts": [
|
||||
"ImportCoreFunctions.ps1",
|
||||
"OptionParser.ps1",
|
||||
"SQLServerOptionParsers.ps1",
|
||||
"SQLServerInstaller.ps1",
|
||||
"Export-Function.ps1",
|
||||
"Start-PowerShellProcess.ps1",
|
||||
"SQLServerForAOAG.ps1"
|
||||
"/ImportCoreFunctions.ps1",
|
||||
"/OptionParser.ps1",
|
||||
"/SQLServer/SQLServerOptionParsers.ps1",
|
||||
"/SQLServer/SQLServerInstaller.ps1",
|
||||
"/Export-Function.ps1",
|
||||
"/Start-PowerShellProcess.ps1",
|
||||
"/SQLServerForAOAG.ps1"
|
||||
],
|
||||
"Commands": [
|
||||
{
|
||||
|
@ -1,12 +1,12 @@
|
||||
{
|
||||
"Scripts": [
|
||||
"ImportCoreFunctions.ps1",
|
||||
"OptionParser.ps1",
|
||||
"SQLServerOptionParsers.ps1",
|
||||
"SQLServerInstaller.ps1",
|
||||
"Export-Function.ps1",
|
||||
"Start-PowerShellProcess.ps1",
|
||||
"SQLServerForAOAG.ps1"
|
||||
"/ImportCoreFunctions.ps1",
|
||||
"/OptionParser.ps1",
|
||||
"/SQLServer/SQLServerOptionParsers.ps1",
|
||||
"/SQLServer/SQLServerInstaller.ps1",
|
||||
"/Export-Function.ps1",
|
||||
"/Start-PowerShellProcess.ps1",
|
||||
"/SQLServerForAOAG.ps1"
|
||||
],
|
||||
"Commands": [
|
||||
{
|
||||
|
@ -1,12 +1,12 @@
|
||||
{
|
||||
"Scripts": [
|
||||
"ImportCoreFunctions.ps1",
|
||||
"OptionParser.ps1",
|
||||
"SQLServerOptionParsers.ps1",
|
||||
"SQLServerInstaller.ps1",
|
||||
"Export-Function.ps1",
|
||||
"Start-PowerShellProcess.ps1",
|
||||
"SQLServerForAOAG.ps1"
|
||||
"/ImportCoreFunctions.ps1",
|
||||
"/OptionParser.ps1",
|
||||
"/SQLServer/SQLServerOptionParsers.ps1",
|
||||
"/SQLServer/SQLServerInstaller.ps1",
|
||||
"/Export-Function.ps1",
|
||||
"/Start-PowerShellProcess.ps1",
|
||||
"/SQLServerForAOAG.ps1"
|
||||
],
|
||||
"Commands": [
|
||||
{
|
||||
|
@ -1,10 +1,10 @@
|
||||
{
|
||||
"Scripts": [
|
||||
"ImportCoreFunctions.ps1",
|
||||
"OptionParser.ps1",
|
||||
"SQLServerOptionParsers.ps1",
|
||||
"SQLServerInstaller.ps1",
|
||||
"SQLServerForAOAG.ps1"
|
||||
"/ImportCoreFunctions.ps1",
|
||||
"/OptionParser.ps1",
|
||||
"/SQLServer/SQLServerOptionParsers.ps1",
|
||||
"/SQLServer/SQLServerInstaller.ps1",
|
||||
"/SQLServerForAOAG.ps1"
|
||||
],
|
||||
"Commands": [
|
||||
{
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"Resources": {
|
||||
"$portName": {
|
||||
"$port-{instanceName}": {
|
||||
"Properties": {
|
||||
"security_groups" : [ {"Ref" : "ApacheSecurityGroup"} ]
|
||||
}
|
||||
|
@ -137,7 +137,7 @@ function add_fw_rule(){
|
||||
*)
|
||||
_fw_cmd=$(which iptables)
|
||||
_fw_rule=$_rule_string
|
||||
_fw_enable_rules="service $_fw_cmd save"
|
||||
_fw_enable_rules="service $(basename $_fw_cmd) save"
|
||||
;;
|
||||
esac
|
||||
iptcmdsave=$(which iptables-save)
|
||||
|
@ -14,6 +14,7 @@ include "common.sh"
|
||||
# FirewallRules
|
||||
FW_RULE1='-I INPUT 1 -p tcp -m tcp --dport 23 -j ACCEPT -m comment --comment "by murano, Telnet server access on port 23"'
|
||||
APP=''
|
||||
XINIT_CFG=0
|
||||
get_os
|
||||
[[ $? -ne 0 ]] && exit 1
|
||||
case $DistroBasedOn in
|
||||
@ -22,25 +23,27 @@ case $DistroBasedOn in
|
||||
;;
|
||||
"redhat")
|
||||
APP="telnet-server"
|
||||
XINIT_CFG=1
|
||||
;;
|
||||
esac
|
||||
APPS_TO_INSTALL="$APP"
|
||||
bash installer.sh -p sys -i $APPS_TO_INSTALL
|
||||
xinetd_tlnt_cfg="/etc/xinetd.d/telnet"
|
||||
if [ -f "$xinetd_tlnt_cfg" ]; then
|
||||
sed -i '/disable.*=/ s/yes/no/' $xinetd_tlnt_cfg
|
||||
if [ $? -ne 0 ]; then
|
||||
log "can't modify $xinetd_tlnt_cfg"
|
||||
exit 1
|
||||
if [ $XINIT_CFG -gt 0 ]; then
|
||||
xinetd_tlnt_cfg="/etc/xinetd.d/telnet"
|
||||
if [ -f "$xinetd_tlnt_cfg" ]; then
|
||||
sed -i '/disable.*=/ s/yes/no/' $xinetd_tlnt_cfg
|
||||
if [ $? -ne 0 ]; then
|
||||
log "can't modify $xinetd_tlnt_cfg"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
log "$APP startup config not found under $xinetd_tlnt_cfg"
|
||||
fi
|
||||
else
|
||||
log "$APP startup config not found under $xinetd_tlnt_cfg"
|
||||
fi
|
||||
#security tty for telnet
|
||||
setty=/etc/securetty
|
||||
lines=$(sed -ne '/^pts\/[0-9]/,/^pts\/[0-9]/ =' $setty)
|
||||
if [ -z "$lines" ]; then
|
||||
cat >> $setty << "EOF"
|
||||
setty=/etc/securetty
|
||||
lines=$(sed -ne '/^pts\/[0-9]/,/^pts\/[0-9]/ =' $setty)
|
||||
if [ -z "$lines" ]; then
|
||||
cat >> $setty << "EOF"
|
||||
pts/0
|
||||
pts/1
|
||||
pts/2
|
||||
@ -52,12 +55,13 @@ pts/7
|
||||
pts/8
|
||||
pts/9
|
||||
EOF
|
||||
if [ $? -ne 0 ]; then
|
||||
log "Error occured during $setty changing..."
|
||||
exit 1
|
||||
if [ $? -ne 0 ]; then
|
||||
log "Error occured during $setty changing..."
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "$setty has pts/0-9 options..."
|
||||
fi
|
||||
restart_service xinetd
|
||||
fi
|
||||
else
|
||||
echo "$setty has pts/0-9 options..."
|
||||
fi
|
||||
restart_service xinetd
|
||||
add_fw_rule $FW_RULE1
|
||||
|
@ -25,7 +25,15 @@
|
||||
<set path="temp.instanceName"><select path="name"/></set>
|
||||
<report entity="unit">
|
||||
<parameter name="id"><select path="id"/></parameter>
|
||||
<parameter name="text">Instance <select path="state.hostname"/> (<select path="name"/>) created!</parameter>
|
||||
<parameter name="text">Instance <select path="state.hostname"/> (<select path="name"/>) created</parameter>
|
||||
</report>
|
||||
<report entity="unit">
|
||||
<parameter name="id"><select path="id"/></parameter>
|
||||
<parameter name="text">Instance <select path="state.hostname"/> (<select path="name"/>) updated</parameter>
|
||||
</report>
|
||||
<report entity="unit">
|
||||
<parameter name="id"><select path="id"/></parameter>
|
||||
<parameter name="text">Demo service installed on <select path="state.hostname"/> (<select path="name"/>)</parameter>
|
||||
</report>
|
||||
</success>
|
||||
<failure>
|
||||
@ -37,36 +45,4 @@
|
||||
</failure>
|
||||
</update-cf-stack>
|
||||
</rule>
|
||||
|
||||
|
||||
<rule match="$.services[?(@.type == 'demoService')].units[?(@.temp.instanceName and not @.state.demoInstalled)]"
|
||||
desc="Units of demo service which have got an instance deployed but have not got demo service installed">
|
||||
<report entity="unit">
|
||||
<parameter name="id"><select path="id"/></parameter>
|
||||
<parameter name="text">Creating demo service on unit <select path="state.hostname"/> (<select path="name"/>)</parameter>
|
||||
</report>
|
||||
<send-command template="Demo" error='exception'>
|
||||
<parameter name="unit">
|
||||
<select path="id"/>
|
||||
</parameter>
|
||||
<parameter name="service">
|
||||
<select path="::id"/>
|
||||
</parameter>
|
||||
<success>
|
||||
<set path="state.demoInstalled"><true/></set>
|
||||
<report entity="unit">
|
||||
<parameter name="id"><select path="id"/></parameter>
|
||||
<parameter name="text">Demo service <select path="state.hostname"/> (<select path="name"/>) has started</parameter>
|
||||
</report>
|
||||
</success>
|
||||
<failure>
|
||||
<report entity="unit" level="error">
|
||||
<parameter name="id"><select path="id"/></parameter>
|
||||
<parameter name="text">Unable to install demo service on <select path="state.hostname"/> (<select path="name"/>) due to <format-error error="exception"/></parameter>
|
||||
</report>
|
||||
<stop/>
|
||||
</failure>
|
||||
</send-command>
|
||||
</rule>
|
||||
|
||||
</workflow>
|
||||
|
@ -54,11 +54,6 @@
|
||||
<parameter name="service">
|
||||
<select path="::id"/>
|
||||
</parameter>
|
||||
<parameter name="mappings">
|
||||
<map>
|
||||
<mapping name="appName">telnet-server</mapping>
|
||||
</map>
|
||||
</parameter>
|
||||
<success>
|
||||
<set path="state.TelnetInstalled"><true/></set>
|
||||
<report entity="unit">
|
||||
|
@ -183,8 +183,8 @@
|
||||
<mapping name="domainAdminAccountPassword">
|
||||
<select path="::domainAdminPassword"/>
|
||||
</mapping>
|
||||
<mapping name="clusterIP">
|
||||
<select path="::clusterIP"/>
|
||||
<mapping name="clusterIp">
|
||||
<select path="::clusterIp"/>
|
||||
</mapping>
|
||||
<mapping name="shareServer">
|
||||
<select path="state.domainIp"/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user