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
add in storage type
This commit is contained in:
@ -453,8 +453,12 @@
|
|||||||
<UMInstanceType>unassigned</UMInstanceType>
|
<UMInstanceType>unassigned</UMInstanceType>
|
||||||
<UMSecurityGroup>unassigned</UMSecurityGroup>
|
<UMSecurityGroup>unassigned</UMSecurityGroup>
|
||||||
<UMVolumeSize>unassigned</UMVolumeSize>
|
<UMVolumeSize>unassigned</UMVolumeSize>
|
||||||
|
<UMVolumeType>standard</UMVolumeType>
|
||||||
|
<UMVolumeIOPS>unassigned</UMVolumeiops>
|
||||||
<PMInstanceType>unassigned</PMInstanceType>
|
<PMInstanceType>unassigned</PMInstanceType>
|
||||||
<PMVolumeSize>unassigned</PMVolumeSize>
|
<PMVolumeSize>unassigned</PMVolumeSize>
|
||||||
|
<PMVolumeType>standard</PMVolumeType>
|
||||||
|
<PMVolumeIOPS>unassigned</PMVolumeiops>
|
||||||
<AmazonPMFailover>y</AmazonPMFailover>
|
<AmazonPMFailover>y</AmazonPMFailover>
|
||||||
<AmazonAutoTagging>y</AmazonAutoTagging>
|
<AmazonAutoTagging>y</AmazonAutoTagging>
|
||||||
<AmazonElasticIPCount>0</AmazonElasticIPCount>
|
<AmazonElasticIPCount>0</AmazonElasticIPCount>
|
||||||
|
@ -139,6 +139,11 @@ string UMStorageType;
|
|||||||
|
|
||||||
string PMVolumeSize = oam::UnassignedName;
|
string PMVolumeSize = oam::UnassignedName;
|
||||||
string UMVolumeSize = oam::UnassignedName;
|
string UMVolumeSize = oam::UnassignedName;
|
||||||
|
string UMVolumeType = "standard";
|
||||||
|
string PMVolumeType = "standard";
|
||||||
|
string PMVolumeIOPS = oam::UnassignedName;
|
||||||
|
string UMVolumeIOPS = oam::UnassignedName;
|
||||||
|
|
||||||
|
|
||||||
int DBRootCount;
|
int DBRootCount;
|
||||||
string deviceName;
|
string deviceName;
|
||||||
@ -4325,6 +4330,46 @@ bool storageSetup(bool amazonInstall)
|
|||||||
{
|
{
|
||||||
UMStorageType = "external";
|
UMStorageType = "external";
|
||||||
|
|
||||||
|
cout << endl;
|
||||||
|
try {
|
||||||
|
oam.getSystemConfig("UMVolumeType", UMVolumeType);
|
||||||
|
}
|
||||||
|
catch(...)
|
||||||
|
{}
|
||||||
|
|
||||||
|
if ( UMVolumeType.empty() || UMVolumeType == "")
|
||||||
|
UMVolumeType = "standard";
|
||||||
|
|
||||||
|
while(true)
|
||||||
|
{
|
||||||
|
string prompt = "Enter EBS Volume Type (standard, gp2, io1) : (" + UMVolumeType + ") > ";
|
||||||
|
pcommand = callReadline(prompt);
|
||||||
|
if (pcommand)
|
||||||
|
{
|
||||||
|
if (strlen(pcommand) > 0) UMVolumeType = pcommand;
|
||||||
|
callFree(pcommand);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( UMVolumeType == "standard" || UMVolumeType == "gp2" || UMVolumeType == "io1" )
|
||||||
|
break;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cout << endl << "Invalid Entry, please re-enter" << endl << endl;
|
||||||
|
if ( noPrompting )
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//set UMVolumeType
|
||||||
|
try {
|
||||||
|
sysConfig->setConfig(InstallSection, "UMVolumeType", UMVolumeType);
|
||||||
|
}
|
||||||
|
catch(...)
|
||||||
|
{
|
||||||
|
cout << "ERROR: Problem setting UMVolumeType in the InfiniDB System Configuration file" << endl;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
cout << endl;
|
cout << endl;
|
||||||
try {
|
try {
|
||||||
oam.getSystemConfig("UMVolumeSize", UMVolumeSize);
|
oam.getSystemConfig("UMVolumeSize", UMVolumeSize);
|
||||||
@ -4335,15 +4380,33 @@ bool storageSetup(bool amazonInstall)
|
|||||||
if ( UMVolumeSize.empty() || UMVolumeSize == "")
|
if ( UMVolumeSize.empty() || UMVolumeSize == "")
|
||||||
UMVolumeSize = oam::UnassignedName;
|
UMVolumeSize = oam::UnassignedName;
|
||||||
|
|
||||||
string prompt = "Enter EBS Volume storage size in GB: (" + UMVolumeSize + ") > ";
|
string minSize = "1";
|
||||||
pcommand = callReadline(prompt);
|
string maxSize = "16384";
|
||||||
if (pcommand)
|
|
||||||
|
if (UMVolumeType == "io1")
|
||||||
|
minSize = "4";
|
||||||
|
|
||||||
|
while(true)
|
||||||
{
|
{
|
||||||
if (strlen(pcommand) > 0) UMVolumeSize = pcommand;
|
string prompt = "Enter EBS Volume storage size in GB: [" + minSize + "," + maxSize + "] (" + UMVolumeSize + ") > ";
|
||||||
callFree(pcommand);
|
pcommand = callReadline(prompt);
|
||||||
|
if (pcommand)
|
||||||
|
{
|
||||||
|
if (strlen(pcommand) > 0) UMVolumeSize = pcommand;
|
||||||
|
callFree(pcommand);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( atoi(UMVolumeSize.c_str()) < atoi(minSize.c_str()) || atoi(UMVolumeSize.c_str()) > atoi(maxSize.c_str()) )
|
||||||
|
{
|
||||||
|
cout << endl << "Invalid Entry, please re-enter" << endl << endl;
|
||||||
|
if ( noPrompting )
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
//set DBRootStorageType
|
//set UMVolumeSize
|
||||||
try {
|
try {
|
||||||
sysConfig->setConfig(InstallSection, "UMVolumeSize", UMVolumeSize);
|
sysConfig->setConfig(InstallSection, "UMVolumeSize", UMVolumeSize);
|
||||||
}
|
}
|
||||||
@ -4352,9 +4415,55 @@ bool storageSetup(bool amazonInstall)
|
|||||||
cout << "ERROR: Problem setting UMVolumeSize in the InfiniDB System Configuration file" << endl;
|
cout << "ERROR: Problem setting UMVolumeSize in the InfiniDB System Configuration file" << endl;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
if ( UMVolumeType == "io1" )
|
||||||
|
{
|
||||||
|
string minIOPS = UMVolumeSize;
|
||||||
|
string maxIOPS = oam.itoa(atoi(UMVolumeSize.c_str()) * 30);
|
||||||
|
|
||||||
|
cout << endl;
|
||||||
|
try {
|
||||||
|
oam.getSystemConfig("UMVolumeIOPS", UMVolumeIOPS);
|
||||||
|
}
|
||||||
|
catch(...)
|
||||||
|
{}
|
||||||
|
|
||||||
|
if ( UMVolumeIOPS.empty() || UMVolumeIOPS == "")
|
||||||
|
UMVolumeIOPS = maxIOPS;
|
||||||
|
|
||||||
|
while(true)
|
||||||
|
{
|
||||||
|
string prompt = "Enter EBS Volume IOPS: [" + minIOPS + "," + maxIOPS + "] (" + UMVolumeIOPS + ") > ";
|
||||||
|
pcommand = callReadline(prompt);
|
||||||
|
if (pcommand)
|
||||||
|
{
|
||||||
|
if (strlen(pcommand) > 0) UMVolumeSize = pcommand;
|
||||||
|
callFree(pcommand);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( atoi(UMVolumeSize.c_str()) < atoi(minIOPS.c_str()) || atoi(UMVolumeSize.c_str()) > atoi(maxIOPS.c_str()) )
|
||||||
|
{
|
||||||
|
cout << endl << "Invalid Entry, please re-enter" << endl << endl;
|
||||||
|
if ( noPrompting )
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
//set UMVolumeIOPS
|
||||||
|
try {
|
||||||
|
sysConfig->setConfig(InstallSection, "UMVolumeIOPS", UMVolumeIOPS);
|
||||||
|
}
|
||||||
|
catch(...)
|
||||||
|
{
|
||||||
|
cout << "ERROR: Problem setting UMVolumeIOPS in the InfiniDB System Configuration file" << endl;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
sysConfig->setConfig(InstallSection, "UMStorageType", UMStorageType);
|
sysConfig->setConfig(InstallSection, "UMStorageType", UMStorageType);
|
||||||
}
|
}
|
||||||
@ -4554,6 +4663,46 @@ bool storageSetup(bool amazonInstall)
|
|||||||
// if external and amazon, prompt for storage size
|
// if external and amazon, prompt for storage size
|
||||||
if ( storageType == "2" && amazonInstall)
|
if ( storageType == "2" && amazonInstall)
|
||||||
{
|
{
|
||||||
|
cout << endl;
|
||||||
|
try {
|
||||||
|
oam.getSystemConfig("PMVolumeType", PMVolumeType);
|
||||||
|
}
|
||||||
|
catch(...)
|
||||||
|
{}
|
||||||
|
|
||||||
|
if ( PMVolumeType.empty() || PMVolumeType == "")
|
||||||
|
PMVolumeType = "standard";
|
||||||
|
|
||||||
|
while(true)
|
||||||
|
{
|
||||||
|
string prompt = "Enter EBS Volume Type (standard, gp2, io1) : (" + PMVolumeType + ") > ";
|
||||||
|
pcommand = callReadline(prompt);
|
||||||
|
if (pcommand)
|
||||||
|
{
|
||||||
|
if (strlen(pcommand) > 0) PMVolumeType = pcommand;
|
||||||
|
callFree(pcommand);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( PMVolumeType == "standard" || PMVolumeType == "gp2" || PMVolumeType == "io1" )
|
||||||
|
break;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cout << endl << "Invalid Entry, please re-enter" << endl << endl;
|
||||||
|
if ( noPrompting )
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//set PMVolumeType
|
||||||
|
try {
|
||||||
|
sysConfig->setConfig(InstallSection, "PMVolumeType", PMVolumeType);
|
||||||
|
}
|
||||||
|
catch(...)
|
||||||
|
{
|
||||||
|
cout << "ERROR: Problem setting PMVolumeType in the InfiniDB System Configuration file" << endl;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
cout << endl;
|
cout << endl;
|
||||||
try {
|
try {
|
||||||
oam.getSystemConfig("PMVolumeSize", PMVolumeSize);
|
oam.getSystemConfig("PMVolumeSize", PMVolumeSize);
|
||||||
@ -4561,15 +4710,90 @@ bool storageSetup(bool amazonInstall)
|
|||||||
catch(...)
|
catch(...)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
if ( PMVolumeSize.empty() || PMVolumeSize == "" )
|
if ( PMVolumeSize.empty() || PMVolumeSize == "")
|
||||||
PMVolumeSize = oam::UnassignedName;
|
PMVolumeSize = oam::UnassignedName;
|
||||||
|
|
||||||
string prompt = "Enter EBS Volume storage size in GB: (" + PMVolumeSize + ") > ";
|
string minSize = "1";
|
||||||
pcommand = callReadline(prompt);
|
string maxSize = "16384";
|
||||||
if (pcommand)
|
|
||||||
|
if (PMVolumeType == "io1")
|
||||||
|
minSize = "4";
|
||||||
|
|
||||||
|
while(true)
|
||||||
{
|
{
|
||||||
if (strlen(pcommand) > 0) PMVolumeSize = pcommand;
|
string prompt = "Enter EBS Volume storage size in GB: [" + minSize + "," + maxSize + "] (" + PMVolumeSize + ") > ";
|
||||||
callFree(pcommand);
|
pcommand = callReadline(prompt);
|
||||||
|
if (pcommand)
|
||||||
|
{
|
||||||
|
if (strlen(pcommand) > 0) PMVolumeSize = pcommand;
|
||||||
|
callFree(pcommand);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( atoi(PMVolumeSize.c_str()) < atoi(minSize.c_str()) || atoi(PMVolumeSize.c_str()) > atoi(maxSize.c_str()) )
|
||||||
|
{
|
||||||
|
cout << endl << "Invalid Entry, please re-enter" << endl << endl;
|
||||||
|
if ( noPrompting )
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
//set PMVolumeSize
|
||||||
|
try {
|
||||||
|
sysConfig->setConfig(InstallSection, "PMVolumeSize", PMVolumeSize);
|
||||||
|
}
|
||||||
|
catch(...)
|
||||||
|
{
|
||||||
|
cout << "ERROR: Problem setting PMVolumeSize in the InfiniDB System Configuration file" << endl;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if ( PMVolumeType == "io1" )
|
||||||
|
{
|
||||||
|
string minIOPS = PMVolumeSize;
|
||||||
|
string maxIOPS = oam.itoa(atoi(PMVolumeSize.c_str()) * 30);
|
||||||
|
|
||||||
|
cout << endl;
|
||||||
|
try {
|
||||||
|
oam.getSystemConfig("PMVolumeIOPS", PMVolumeIOPS);
|
||||||
|
}
|
||||||
|
catch(...)
|
||||||
|
{}
|
||||||
|
|
||||||
|
if ( PMVolumeIOPS.empty() || PMVolumeIOPS == "")
|
||||||
|
PMVolumeIOPS = maxIOPS;
|
||||||
|
|
||||||
|
while(true)
|
||||||
|
{
|
||||||
|
string prompt = "Enter EBS Volume IOPS: [" + minIOPS + "," + maxIOPS + "] (" + PMVolumeIOPS + ") > ";
|
||||||
|
pcommand = callReadline(prompt);
|
||||||
|
if (pcommand)
|
||||||
|
{
|
||||||
|
if (strlen(pcommand) > 0) PMVolumeSize = pcommand;
|
||||||
|
callFree(pcommand);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( atoi(PMVolumeSize.c_str()) < atoi(minIOPS.c_str()) || atoi(PMVolumeSize.c_str()) > atoi(maxIOPS.c_str()) )
|
||||||
|
{
|
||||||
|
cout << endl << "Invalid Entry, please re-enter" << endl << endl;
|
||||||
|
if ( noPrompting )
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
//set PMVolumeIOPS
|
||||||
|
try {
|
||||||
|
sysConfig->setConfig(InstallSection, "PMVolumeIOPS", PMVolumeIOPS);
|
||||||
|
}
|
||||||
|
catch(...)
|
||||||
|
{
|
||||||
|
cout << "ERROR: Problem setting PMVolumeIOPS in the InfiniDB System Configuration file" << endl;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//set DBRootStorageType
|
//set DBRootStorageType
|
||||||
|
@ -1303,6 +1303,12 @@ int main(int argc, char *argv[])
|
|||||||
string AmazonZone;
|
string AmazonZone;
|
||||||
string AmazonVPCNextPrivateIP;
|
string AmazonVPCNextPrivateIP;
|
||||||
string AmazonDeviceName;
|
string AmazonDeviceName;
|
||||||
|
string UMVolumeType;
|
||||||
|
string UMVolumeIOPS;
|
||||||
|
string PMVolumeType;
|
||||||
|
string PMVolumeIOPS;
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
cloud = sysConfigOld->getConfig(InstallSection, "Cloud");
|
cloud = sysConfigOld->getConfig(InstallSection, "Cloud");
|
||||||
x509Cert = sysConfigOld->getConfig(InstallSection, "AmazonX509Certificate");
|
x509Cert = sysConfigOld->getConfig(InstallSection, "AmazonX509Certificate");
|
||||||
@ -1320,6 +1326,10 @@ int main(int argc, char *argv[])
|
|||||||
AmazonVPCNextPrivateIP = sysConfigOld->getConfig(InstallSection, "AmazonVPCNextPrivateIP");
|
AmazonVPCNextPrivateIP = sysConfigOld->getConfig(InstallSection, "AmazonVPCNextPrivateIP");
|
||||||
AmazonSubNetID = sysConfigOld->getConfig(InstallSection, "AmazonSubNetID");
|
AmazonSubNetID = sysConfigOld->getConfig(InstallSection, "AmazonSubNetID");
|
||||||
AmazonDeviceName = sysConfigOld->getConfig(InstallSection, "AmazonDeviceName");
|
AmazonDeviceName = sysConfigOld->getConfig(InstallSection, "AmazonDeviceName");
|
||||||
|
UMVolumeType = sysConfigOld->getConfig(InstallSection, "UMVolumeType");
|
||||||
|
UMVolumeIOPS = sysConfigOld->getConfig(InstallSection, "UMVolumeIOPS");
|
||||||
|
PMVolumeType = sysConfigOld->getConfig(InstallSection, "PMVolumeType");
|
||||||
|
PMVolumeIOPS = sysConfigOld->getConfig(InstallSection, "PMVolumeIOPS");
|
||||||
}
|
}
|
||||||
catch(...)
|
catch(...)
|
||||||
{ }
|
{ }
|
||||||
@ -1382,6 +1392,11 @@ int main(int argc, char *argv[])
|
|||||||
sysConfigNew->setConfig(InstallSection, "AmazonRegion", AmazonRegion);
|
sysConfigNew->setConfig(InstallSection, "AmazonRegion", AmazonRegion);
|
||||||
sysConfigNew->setConfig(InstallSection, "AmazonZone", AmazonZone);
|
sysConfigNew->setConfig(InstallSection, "AmazonZone", AmazonZone);
|
||||||
sysConfigNew->setConfig(InstallSection, "AmazonDeviceName", AmazonDeviceName);
|
sysConfigNew->setConfig(InstallSection, "AmazonDeviceName", AmazonDeviceName);
|
||||||
|
|
||||||
|
sysConfigNew->setConfig(InstallSection, "UMVolumeType", UMVolumeType);
|
||||||
|
sysConfigNew->setConfig(InstallSection, "UMVolumeIOPS", UMVolumeIOPS);
|
||||||
|
sysConfigNew->setConfig(InstallSection, "PMVolumeType", PMVolumeType);
|
||||||
|
sysConfigNew->setConfig(InstallSection, "PMVolumeIOPS", PMVolumeIOPS);
|
||||||
}
|
}
|
||||||
catch(...)
|
catch(...)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user