You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
MCOL-520 amazon changes
This commit is contained in:
@ -805,12 +805,16 @@ int main(int argc, char* argv[])
|
||||
{
|
||||
cout << "===== Quick Install Multi-Server Configuration =====" << endl << endl;
|
||||
|
||||
cout << "Multi-Server install defaulting to using local storage" << endl;
|
||||
|
||||
singleServerInstall = "2";
|
||||
}
|
||||
else if (amazon_quick_install)
|
||||
{
|
||||
cout << "===== Quick Install Amazon Configuration =====" << endl << endl;
|
||||
|
||||
cout << "Amazon AMI EC2 install defaulting to using local storage" << endl;
|
||||
|
||||
singleServerInstall = "2";
|
||||
}
|
||||
else
|
||||
@ -856,95 +860,14 @@ int main(int argc, char* argv[])
|
||||
|
||||
if (temp == "1")
|
||||
{
|
||||
singleServerInstall = temp;
|
||||
cout << endl << "Performing the Single Server Install." << endl << endl;
|
||||
|
||||
if ( reuseConfig == "n" )
|
||||
{
|
||||
//setup to Columnstore.xml file for single server
|
||||
singleServerConfigSetup(sysConfig);
|
||||
}
|
||||
|
||||
//module ProcessConfig.xml to setup all apps on the pm
|
||||
if ( !updateProcessConfig() )
|
||||
cout << "Update ProcessConfig.xml error" << endl;
|
||||
|
||||
try
|
||||
{
|
||||
sysConfig->setConfig(InstallSection, "SingleServerInstall", "y");
|
||||
sysConfig->setConfig(InstallSection, "ServerTypeInstall", "2");
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
cout << "ERROR: Problem setting SingleServerInstall from the MariaDB ColumnStore System Configuration file" << endl;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if ( !writeConfig(sysConfig) )
|
||||
{
|
||||
cout << "ERROR: Failed trying to update MariaDB ColumnStore System Configuration file" << endl;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
setSystemName();
|
||||
cout << endl;
|
||||
|
||||
system(cmd.c_str());
|
||||
|
||||
// setup storage
|
||||
if (!storageSetup(false))
|
||||
{
|
||||
cout << "ERROR: Problem setting up storage" << endl;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (hdfs || !rootUser)
|
||||
if ( !updateBash() )
|
||||
cout << "updateBash error" << endl;
|
||||
|
||||
// setup storage
|
||||
if (!singleServerDBrootSetup())
|
||||
{
|
||||
cout << "ERROR: Problem setting up DBRoot IDs" << endl;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
//set system DBRoot count and check 'files per parition' with number of dbroots
|
||||
try
|
||||
{
|
||||
sysConfig->setConfig(SystemSection, "DBRootCount", oam.itoa(DBRootCount));
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
cout << "ERROR: Problem setting DBRoot Count in the MariaDB ColumnStore System Configuration file" << endl;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
//check if dbrm data resides in older directory path and inform user if it does
|
||||
dbrmDirCheck();
|
||||
|
||||
if (startOfflinePrompt)
|
||||
offLineAppCheck();
|
||||
|
||||
checkMysqlPort(mysqlPort, sysConfig);
|
||||
|
||||
if ( !writeConfig(sysConfig) )
|
||||
{
|
||||
cout << "ERROR: Failed trying to update MariaDB ColumnStore System Configuration file" << endl;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
cout << endl << "===== Performing Configuration Setup and MariaDB ColumnStore Startup =====" << endl;
|
||||
|
||||
cmd = installDir + "/bin/installer dummy.rpm dummy.rpm dummy.rpm dummy.rpm dummy.rpm initial dummy " + reuseConfig + " --nodeps ' ' 1 " + installDir;
|
||||
system(cmd.c_str());
|
||||
exit(0);
|
||||
singleServerInstall = "1";
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (temp == "2")
|
||||
{
|
||||
singleServerInstall = temp;
|
||||
singleServerInstall = "2";
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -953,14 +876,99 @@ int main(int argc, char* argv[])
|
||||
|
||||
if ( noPrompting )
|
||||
exit(1);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// perform single server install
|
||||
if (singleServerInstall == "1")
|
||||
{
|
||||
cout << endl << "Performing the Single Server Install." << endl << endl;
|
||||
|
||||
if ( reuseConfig == "n" )
|
||||
{
|
||||
//setup to Columnstore.xml file for single server
|
||||
singleServerConfigSetup(sysConfig);
|
||||
}
|
||||
|
||||
//module ProcessConfig.xml to setup all apps on the pm
|
||||
if ( !updateProcessConfig() )
|
||||
cout << "Update ProcessConfig.xml error" << endl;
|
||||
|
||||
try
|
||||
{
|
||||
sysConfig->setConfig(InstallSection, "SingleServerInstall", "y");
|
||||
sysConfig->setConfig(InstallSection, "ServerTypeInstall", "2");
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
cout << "ERROR: Problem setting SingleServerInstall from the MariaDB ColumnStore System Configuration file" << endl;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if ( !writeConfig(sysConfig) )
|
||||
{
|
||||
cout << "ERROR: Failed trying to update MariaDB ColumnStore System Configuration file" << endl;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
setSystemName();
|
||||
cout << endl;
|
||||
|
||||
system(cmd.c_str());
|
||||
|
||||
// setup storage
|
||||
if (!storageSetup(false))
|
||||
{
|
||||
cout << "ERROR: Problem setting up storage" << endl;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (hdfs || !rootUser)
|
||||
if ( !updateBash() )
|
||||
cout << "updateBash error" << endl;
|
||||
|
||||
// setup storage
|
||||
if (!singleServerDBrootSetup())
|
||||
{
|
||||
cout << "ERROR: Problem setting up DBRoot IDs" << endl;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
//set system DBRoot count and check 'files per parition' with number of dbroots
|
||||
try
|
||||
{
|
||||
sysConfig->setConfig(SystemSection, "DBRootCount", oam.itoa(DBRootCount));
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
cout << "ERROR: Problem setting DBRoot Count in the MariaDB ColumnStore System Configuration file" << endl;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
//check if dbrm data resides in older directory path and inform user if it does
|
||||
dbrmDirCheck();
|
||||
|
||||
if (startOfflinePrompt)
|
||||
offLineAppCheck();
|
||||
|
||||
checkMysqlPort(mysqlPort, sysConfig);
|
||||
|
||||
if ( !writeConfig(sysConfig) )
|
||||
{
|
||||
cout << "ERROR: Failed trying to update MariaDB ColumnStore System Configuration file" << endl;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
cout << endl << "===== Performing Configuration Setup and MariaDB ColumnStore Startup =====" << endl;
|
||||
|
||||
cmd = installDir + "/bin/installer dummy.rpm dummy.rpm dummy.rpm dummy.rpm dummy.rpm initial dummy " + reuseConfig + " --nodeps ' ' 1 " + installDir;
|
||||
system(cmd.c_str());
|
||||
exit(0);
|
||||
}
|
||||
|
||||
// perform multi-node install
|
||||
|
||||
try
|
||||
{
|
||||
sysConfig->setConfig(InstallSection, "SingleServerInstall", "n");
|
||||
|
@ -55,6 +55,7 @@ else
|
||||
fi
|
||||
|
||||
if [[ $HOME = "/root" ]]; then
|
||||
echo ""
|
||||
echo "${bold}Run post-install script${normal}"
|
||||
echo ""
|
||||
/usr/local/mariadb/columnstore/bin/post-install
|
||||
@ -70,13 +71,14 @@ else
|
||||
echo ""
|
||||
$HOME/mariadb/columnstore/bin/post-install --installdir=$HOME/mariadb/columnstore
|
||||
|
||||
tmpDir=`$HOME/mariadb/columnstore/bin/getConfig SystemConfig SystemTempFileDir`
|
||||
|
||||
export COLUMNSTORE_INSTALL_DIR=$HOME/mariadb/columnstore
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/mariadb/columnstore/lib:$HOME/mariadb/columnstore/mysql/lib
|
||||
|
||||
echo "${bold}Run postConfigure script${normal}"
|
||||
echo ""
|
||||
if [[ $umCount = "" ]]; then
|
||||
. $tmpDir;$HOME/mariadb/columnstore/bin/postConfigure -i $HOME/mariadb/columnstore -qa -pm-count $pmCount $systemName -d
|
||||
$HOME/mariadb/columnstore/bin/postConfigure -i $HOME/mariadb/columnstore -qa -pm-count $pmCount $systemName -d
|
||||
else
|
||||
. $tmpDir;$HOME/mariadb/columnstore/bin/postConfigure -i $HOME/mariadb/columnstore -qa -pm-count $pmCount -um-count $umCount $systemName -d
|
||||
$HOME/mariadb/columnstore/bin/postConfigure -i $HOME/mariadb/columnstore -qa -pm-count $pmCount -um-count $umCount $systemName -d
|
||||
fi
|
||||
fi
|
||||
|
@ -61,6 +61,7 @@ else
|
||||
fi
|
||||
|
||||
if [[ $HOME = "/root" ]]; then
|
||||
echo ""
|
||||
echo "${bold}Run post-install script${normal}"
|
||||
echo ""
|
||||
/usr/local/mariadb/columnstore/bin/post-install
|
||||
@ -72,17 +73,19 @@ if [[ $HOME = "/root" ]]; then
|
||||
/usr/local/mariadb/columnstore/bin/postConfigure -qm -pm-ip-addrs $pmIpAddrs -um-ip-addrs $umIpAddrs $nonDistrubutedInstall $systemName
|
||||
fi
|
||||
else
|
||||
echo ""
|
||||
echo "${bold}Run post-install script${normal}"
|
||||
echo ""
|
||||
$HOME/mariadb/columnstore/bin/post-install --installdir=$HOME/mariadb/columnstore
|
||||
|
||||
tmpDir=`$HOME/mariadb/columnstore/bin/getConfig SystemConfig SystemTempFileDir`
|
||||
export COLUMNSTORE_INSTALL_DIR=$HOME/mariadb/columnstore
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/mariadb/columnstore/lib:$HOME/mariadb/columnstore/mysql/lib
|
||||
|
||||
echo "${bold}Run postConfigure script${normal}"
|
||||
echo ""
|
||||
if [[ $umIpAddrs = "" ]]; then
|
||||
. $tmpDir;$HOME/mariadb/columnstore/bin/postConfigure -i $HOME/mariadb/columnstore -qm -pm-ip-addrs $pmIpAddrs $nonDistrubutedInstall $systemName
|
||||
$HOME/mariadb/columnstore/bin/postConfigure -i $HOME/mariadb/columnstore -qm -pm-ip-addrs $pmIpAddrs $nonDistrubutedInstall $systemName
|
||||
else
|
||||
. $tmpDir;$HOME/mariadb/columnstore/bin/postConfigure -i $HOME/mariadb/columnstore -qm -pm-ip-addrs $pmIpAddrs -um-ip-addrs $umIpAddrs $nonDistrubutedInstall $systemName
|
||||
$HOME/mariadb/columnstore/bin/postConfigure -i $HOME/mariadb/columnstore -qm -pm-ip-addrs $pmIpAddrs -um-ip-addrs $umIpAddrs $nonDistrubutedInstall $systemName
|
||||
fi
|
||||
fi
|
||||
|
@ -18,6 +18,7 @@ done
|
||||
|
||||
|
||||
if [ $HOME == "/root" ]; then
|
||||
echo ""
|
||||
echo "Run post-install script"
|
||||
echo ""
|
||||
/usr/local/mariadb/columnstore/bin/post-install
|
||||
@ -29,9 +30,10 @@ else
|
||||
echo ""
|
||||
$HOME/mariadb/columnstore/bin/post-install --installdir=$HOME/mariadb/columnstore
|
||||
|
||||
tmpDir=`$HOME/mariadb/columnstore/bin/getConfig SystemConfig SystemTempFileDir`
|
||||
export COLUMNSTORE_INSTALL_DIR=$HOME/mariadb/columnstore
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/mariadb/columnstore/lib:$HOME/mariadb/columnstore/mysql/lib
|
||||
|
||||
echo "Run postConfigure script"
|
||||
echo ""
|
||||
. $tmpDir; $HOME/mariadb/columnstore/bin/postConfigure -i $HOME/mariadb/columnstore -qs
|
||||
$HOME/mariadb/columnstore/bin/postConfigure -i $HOME/mariadb/columnstore -qs
|
||||
fi
|
||||
|
Reference in New Issue
Block a user