You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-01 06:46:55 +03:00
chnages for ebs create
This commit is contained in:
@ -111,7 +111,7 @@ export JAVA_HOME=$java
|
||||
|
||||
# get Keys and region
|
||||
AmazonAccessKeyFile=`$prefix/Calpont/bin/getConfig Installation AmazonAccessKey`
|
||||
if [ $AmazonAccessKeyfile == "unassigned" ]; then
|
||||
if [ $AmazonAccessKeyFile == "unassigned" ]; then
|
||||
echo "FAILED: missing Config Setting AmazonAccessKey : $AmazonAccessKeyfile"
|
||||
exit 1
|
||||
fi
|
||||
|
@ -111,7 +111,7 @@ export JAVA_HOME=$java
|
||||
|
||||
# get Keys and region
|
||||
AmazonAccessKeyFile=`$prefix/Calpont/bin/getConfig Installation AmazonAccessKey`
|
||||
if [ $AmazonAccessKeyfile == "unassigned" ]; then
|
||||
if [ $AmazonAccessKeyFile == "unassigned" ]; then
|
||||
echo "FAILED: missing Config Setting AmazonAccessKey : $AmazonAccessKeyfile"
|
||||
exit 1
|
||||
fi
|
||||
@ -193,25 +193,26 @@ createvolume() {
|
||||
|
||||
if [ $moduleType == "um" ]; then
|
||||
# get type
|
||||
volumeType=`$prefix/Calpont/bin/IDBInstanceCmds.sh UMVolumeType`
|
||||
volumeType=`$prefix/Calpont/bin/getConfig Installation UMVolumeType`
|
||||
if [ $volumeType == "io1" ]; then
|
||||
# get IOPS
|
||||
volumeIOPS=`$prefix/Calpont/bin/IDBInstanceCmds.sh UMVolumeIOPS`
|
||||
volumeIOPS=`$prefix/Calpont/bin/getConfig Installation UMVolumeIOPS`
|
||||
fi
|
||||
else # pm
|
||||
# get type
|
||||
volumeType=`$prefix/Calpont/bin/IDBInstanceCmds.sh PMVolumeType`
|
||||
volumeType=`$prefix/Calpont/bin/getConfig Installation PMVolumeType`
|
||||
if [ $volumeType == "io1" ]; then
|
||||
# get IOPS
|
||||
volumeIOPS=`$prefix/Calpont/bin/IDBInstanceCmds.sh PMVolumeIOPS`
|
||||
volumeIOPS=`$prefix/Calpont/bin/getConfig Installation PMVolumeIOPS`
|
||||
fi
|
||||
fi
|
||||
|
||||
#create volume
|
||||
if [ $volumeType == "io1" ]; then
|
||||
volume=`ec2-create-volume -O $AmazonAccessKey -W $AmazonSecretKey --region $Region -z $zone -s $volumeSize -t volumeType -iops $volumeIOPS | awk '{gsub(/^[ \t]+|[ \t]+$/,"");print $2}'`
|
||||
volume=`ec2-create-volume -O $AmazonAccessKey -W $AmazonSecretKey --region $Region -z $zone -s $volumeSize -t $volumeType -iops $volumeIOPS | awk '{gsub(/^[ \t]+|[ \t]+$/,"");print $2}'`
|
||||
else
|
||||
volume=`ec2-create-volume -O $AmazonAccessKey -W $AmazonSecretKey --region $Region -z $zone -s $volumeSize -t volumeType | awk '{gsub(/^[ \t]+|[ \t]+$/,"");print $2}'`
|
||||
volume=`ec2-create-volume -O $AmazonAccessKey -W $AmazonSecretKey --region $Region -z $zone -s $volumeSize -t $volumeType | awk '{gsub(/^[ \t]+|[ \t]+$/,"");print $2}'`
|
||||
fi
|
||||
|
||||
echo $volume
|
||||
return
|
||||
|
@ -5946,7 +5946,7 @@ namespace oam
|
||||
}
|
||||
|
||||
//attach and format volumes
|
||||
device = "/dev/sdf" + itoa(moduleID);
|
||||
device = "/dev/sdf";
|
||||
|
||||
string localInstance = getEC2LocalInstance();
|
||||
|
||||
|
@ -850,7 +850,8 @@ int main(int argc, char *argv[])
|
||||
cloud = oam::UnassignedName;
|
||||
}
|
||||
|
||||
cout << "Amazon EC2-API-TOOLS Instance install. You have 2 install options: " << endl << endl;
|
||||
cout << "===== Amazon EC2-API-TOOLS Instance Install =====" << endl << endl;
|
||||
cout << "You have 2 install options: " << endl << endl;
|
||||
cout << "1. Utilizing the Amazon IDs for instances and volumes which allows for features like" << endl;
|
||||
cout << "automaticly launching instances and EBS volumes when configuring and system expansion." << endl;
|
||||
cout << "This option is recommended and would be use if you are setting up a InfiniDB system." << endl << endl;
|
||||
@ -1316,9 +1317,9 @@ int main(int argc, char *argv[])
|
||||
cout << "===== Setup the Module Configuration =====" << endl << endl;
|
||||
|
||||
if (amazonInstall) {
|
||||
cout << "Amazon Install: For Module Configuration, you will have the option to Enter the Instance IDs" << endl;
|
||||
cout << "if you have already precreated the Instance's you want to install on or have postConfigure create" << endl;
|
||||
cout << "the Instances for you. You will be prompted during the Module Configuration setup section." << endl;
|
||||
cout << "Amazon Install: For Module Configuration, you will have the option to provide the" << endl;
|
||||
cout << "existing Instance IDs or have postConfigure create the Instances used for the other nodes." << endl;
|
||||
cout << "You will be prompted during the Module Configuration setup section." << endl;
|
||||
}
|
||||
|
||||
//get OAM Parent Module IP addresses and Host Name, if it exist
|
||||
@ -1651,13 +1652,15 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( moduleHostName == oam::UnassignedName )
|
||||
{
|
||||
//check if need to create instance or user enter ID
|
||||
string create = "y";
|
||||
|
||||
while(true)
|
||||
{
|
||||
pcommand = callReadline("Do you need the instance created for " + newModuleName + " [y,n] (y) > ");
|
||||
pcommand = callReadline("Create Instance for " + newModuleName + " [y,n] (y) > ");
|
||||
if (pcommand)
|
||||
{
|
||||
if (strlen(pcommand) > 0) create = pcommand;
|
||||
@ -1697,6 +1700,9 @@ int main(int argc, char *argv[])
|
||||
else
|
||||
prompt = "Enter EC2 Instance ID (" + moduleHostName + ") > ";
|
||||
}
|
||||
else
|
||||
prompt = "Enter EC2 Instance ID (" + moduleHostName + ") > ";
|
||||
}
|
||||
}
|
||||
else
|
||||
prompt = "Enter Nic Interface #" + oam.itoa(nicID) + " Host Name (" + moduleHostName + ") > ";
|
||||
@ -2095,8 +2101,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
while(true)
|
||||
{
|
||||
pcommand = callReadline("Do you need the volume created [y,n] (y) > ");
|
||||
if (pcommand)
|
||||
pcommand = callReadline("Create an EBS volume for " + newModuleName + " ? [y,n] (y) > ");
|
||||
{
|
||||
if (strlen(pcommand) > 0) create = pcommand;
|
||||
callFree(pcommand);
|
||||
@ -2132,7 +2137,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
//get device name based on DBRoot ID
|
||||
deviceName = "/dev/sdf" + oam.itoa(moduleID);
|
||||
deviceName = "/dev/sdf";
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -4287,13 +4292,11 @@ bool storageSetup(bool amazonInstall)
|
||||
// get Frontend Data storage type
|
||||
//
|
||||
|
||||
cout << "----- Setup High Availability Frontend MySQL Data Storage Mount Configuration -----" << endl << endl;
|
||||
cout << "----- Setup User Module MySQL Data Storage Mount Configuration -----" << endl << endl;
|
||||
|
||||
cout << "There are 2 options when configuring the storage: internal and external" << endl << endl;
|
||||
cout << " 'internal' - This is specified when a local disk is used for the MySQL Data storage." << endl;
|
||||
cout << " High Availability Server Failover is not Supported in this mode," << endl << endl;
|
||||
cout << " 'external' - This is specified when the MySQL Data directory is externally mounted." << endl;
|
||||
cout << " High Availability Server Failover is Supported in this mode." << endl << endl;
|
||||
cout << " 'internal' - This is specified when a local disk is used for the MySQL Data storage." << endl << endl;
|
||||
cout << " 'external' - This is specified when the MySQL Data directory is externally mounted." << endl << endl;
|
||||
|
||||
try {
|
||||
UMStorageType = sysConfig->getConfig(InstallSection, "UMStorageType");
|
||||
@ -4370,6 +4373,12 @@ bool storageSetup(bool amazonInstall)
|
||||
return false;
|
||||
}
|
||||
|
||||
string minSize = "1";
|
||||
string maxSize = "16384";
|
||||
|
||||
if (UMVolumeType == "io1")
|
||||
minSize = "4";
|
||||
|
||||
cout << endl;
|
||||
try {
|
||||
oam.getSystemConfig("UMVolumeSize", UMVolumeSize);
|
||||
@ -4377,14 +4386,8 @@ bool storageSetup(bool amazonInstall)
|
||||
catch(...)
|
||||
{}
|
||||
|
||||
if ( UMVolumeSize.empty() || UMVolumeSize == "")
|
||||
UMVolumeSize = oam::UnassignedName;
|
||||
|
||||
string minSize = "1";
|
||||
string maxSize = "16384";
|
||||
|
||||
if (UMVolumeType == "io1")
|
||||
minSize = "4";
|
||||
if ( UMVolumeSize.empty() || UMVolumeSize == "" || UMVolumeSize == oam::UnassignedName)
|
||||
UMVolumeSize = "10";
|
||||
|
||||
while(true)
|
||||
{
|
||||
@ -4527,7 +4530,7 @@ bool storageSetup(bool amazonInstall)
|
||||
if ( DBRootStorageType == "hdfs" )
|
||||
storageType = "4";
|
||||
|
||||
cout << endl << "----- Setup High Availability Data Storage Mount Configuration -----" << endl << endl;
|
||||
cout << endl << "----- Setup Performance Module DBRoot Data Storage Mount Configuration -----" << endl << endl;
|
||||
|
||||
if ( glusterInstalled == "n" && hadoopInstalled == "n" )
|
||||
{
|
||||
@ -4710,8 +4713,8 @@ bool storageSetup(bool amazonInstall)
|
||||
catch(...)
|
||||
{}
|
||||
|
||||
if ( PMVolumeSize.empty() || PMVolumeSize == "")
|
||||
PMVolumeSize = oam::UnassignedName;
|
||||
if ( PMVolumeSize.empty() || PMVolumeSize == "" || PMVolumeSize == oam::UnassignedName)
|
||||
PMVolumeSize = "100";
|
||||
|
||||
string minSize = "1";
|
||||
string maxSize = "16384";
|
||||
@ -4762,7 +4765,7 @@ bool storageSetup(bool amazonInstall)
|
||||
catch(...)
|
||||
{}
|
||||
|
||||
if ( PMVolumeIOPS.empty() || PMVolumeIOPS == "")
|
||||
if ( PMVolumeIOPS.empty() || PMVolumeIOPS == "" || PMVolumeIOPS == oam::UnassignedName)
|
||||
PMVolumeIOPS = maxIOPS;
|
||||
|
||||
while(true)
|
||||
@ -4771,11 +4774,11 @@ bool storageSetup(bool amazonInstall)
|
||||
pcommand = callReadline(prompt);
|
||||
if (pcommand)
|
||||
{
|
||||
if (strlen(pcommand) > 0) PMVolumeSize = pcommand;
|
||||
if (strlen(pcommand) > 0) PMVolumeIOPS = pcommand;
|
||||
callFree(pcommand);
|
||||
}
|
||||
|
||||
if ( atoi(PMVolumeSize.c_str()) < atoi(minIOPS.c_str()) || atoi(PMVolumeSize.c_str()) > atoi(maxIOPS.c_str()) )
|
||||
if ( atoi(PMVolumeIOPS.c_str()) < atoi(minIOPS.c_str()) || atoi(PMVolumeIOPS.c_str()) > atoi(maxIOPS.c_str()) )
|
||||
{
|
||||
cout << endl << "Invalid Entry, please re-enter" << endl << endl;
|
||||
if ( noPrompting )
|
||||
|
Reference in New Issue
Block a user