1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-07 03:22:57 +03:00
This commit is contained in:
David Hill
2017-01-06 15:11:43 -06:00
parent fbe46f62f6
commit 72f020cc1a
4 changed files with 28 additions and 121 deletions

View File

@@ -443,10 +443,6 @@
<SystemLogConfigFile>unassigned</SystemLogConfigFile> <SystemLogConfigFile>unassigned</SystemLogConfigFile>
<rpw>mariadb1</rpw> <rpw>mariadb1</rpw>
<Cloud>unassigned</Cloud> <Cloud>unassigned</Cloud>
<AmazonAccessKey>unassigned</AmazonAccessKey>
<AmazonSecretKey>unassigned</AmazonSecretKey>
<AmazonZone>unassigned</AmazonZone>
<AmazonSubNetID>unassigned</AmazonSubNetID>
<AmazonVPCNextPrivateIP>autoassign</AmazonVPCNextPrivateIP> <AmazonVPCNextPrivateIP>autoassign</AmazonVPCNextPrivateIP>
<UMInstanceType>unassigned</UMInstanceType> <UMInstanceType>unassigned</UMInstanceType>
<UMSecurityGroup>unassigned</UMSecurityGroup> <UMSecurityGroup>unassigned</UMSecurityGroup>
@@ -466,8 +462,6 @@
<GlusterCopies>0</GlusterCopies> <GlusterCopies>0</GlusterCopies>
<GlusterStorageType>unassigned</GlusterStorageType> <GlusterStorageType>unassigned</GlusterStorageType>
<CoreFileFlag>n</CoreFileFlag> <CoreFileFlag>n</CoreFileFlag>
<JavaHome>unassigned</JavaHome>
<JavaPath>unassigned</JavaPath>
<MySQLPort>3306</MySQLPort> <MySQLPort>3306</MySQLPort>
<MySQLPasswordConfig>unassigned</MySQLPasswordConfig> <MySQLPasswordConfig>unassigned</MySQLPasswordConfig>
<AmazonDeviceName>/dev/xvd</AmazonDeviceName> <AmazonDeviceName>/dev/xvd</AmazonDeviceName>

View File

@@ -4863,16 +4863,6 @@ int processCommand(string* arguments)
} }
catch(...) {} catch(...) {}
if ( cloud == "amazon-vpc" )
{
string AmazonSubNetID = oam::UnassignedName;
try{
oam.getSystemConfig("AmazonSubNetID", AmazonSubNetID);
cout << "AmazonSubNetID = " << AmazonSubNetID << endl;
}
catch(...) {}
}
} }
cout << endl; cout << endl;

View File

@@ -153,7 +153,6 @@ bool thread_remote_installer = true;
string singleServerInstall = "1"; string singleServerInstall = "1";
string reuseConfig ="n"; string reuseConfig ="n";
string oldFileName; string oldFileName;
string AmazonRegion;
string glusterCopies; string glusterCopies;
string glusterInstalled = "n"; string glusterInstalled = "n";
string hadoopInstalled = "n"; string hadoopInstalled = "n";
@@ -833,7 +832,6 @@ int main(int argc, char *argv[])
//amazon install setup check //amazon install setup check
bool amazonInstall = false; bool amazonInstall = false;
string amazonSubNet = oam::UnassignedName;
string cloud = oam::UnassignedName; string cloud = oam::UnassignedName;
system("aws --version > /tmp/amazon.log 2>&1"); system("aws --version > /tmp/amazon.log 2>&1");
@@ -870,43 +868,41 @@ int main(int argc, char *argv[])
cout << "NOTE: Amazon AWS CLI Tools are installed and allow MariaDB ColumnStore to create Instances and ABS Volumes" << endl << endl; cout << "NOTE: Amazon AWS CLI Tools are installed and allow MariaDB ColumnStore to create Instances and ABS Volumes" << endl << endl;
while(true) { while(true) {
string enable = "y"; string enable = "y";
prompt = "Do you want to have ColumnStore use the Amazon AWS CLI Tools [y,n] (y) > "; prompt = "Do you want to have ColumnStore use the Amazon AWS CLI Tools [y,n] (y) > ";
pcommand = callReadline(prompt.c_str()); pcommand = callReadline(prompt.c_str());
if (pcommand) { if (pcommand) {
if (strlen(pcommand) > 0) enable = pcommand; if (strlen(pcommand) > 0) enable = pcommand;
callFree(pcommand); callFree(pcommand);
if (enable == "n") { if (enable == "n") {
amazonInstall = false; amazonInstall = false;
try { try {
sysConfig->setConfig(InstallSection, "Cloud", "disable"); sysConfig->setConfig(InstallSection, "Cloud", "disable");
} }
catch(...) catch(...)
{}; {};
break;
}
}
if ( enable != "y" )
{
cout << "Invalid Entry, please enter 'y' for yes or 'n' for no" << endl;
if ( noPrompting )
exit(1);
}
break; break;
}
} }
}
if ( enable != "y" )
{
cout << "Invalid Entry, please enter 'y' for yes or 'n' for no" << endl;
if ( noPrompting )
exit(1);
}
break;
}
}
else else
cout << "NOTE: Configured to have ColumnStore use the Amazon AWS CLI Tools" << endl << endl; cout << "NOTE: Configured to have ColumnStore use the Amazon AWS CLI Tools" << endl << endl;
if ( amazonInstall ) if ( amazonInstall )
{ {
bool noKey = false;
string cmd = installDir + "/bin/MCSgetCredentials.sh >/dev/null 2>&1"; string cmd = installDir + "/bin/MCSgetCredentials.sh >/dev/null 2>&1";
int rtnCode = system(cmd.c_str()); int rtnCode = system(cmd.c_str());
if ( WEXITSTATUS(rtnCode) != 0 ) { if ( WEXITSTATUS(rtnCode) != 0 ) {
@@ -921,55 +917,13 @@ int main(int argc, char *argv[])
exit(1); exit(1);
} }
sleep(1);
//get subnetID
try {
amazonSubNet = sysConfig->getConfig(InstallSection, "AmazonSubNetID");
}
catch(...)
{}
if ( amazonSubNet == oam::UnassignedName )
{
//check if this is a vpc system by checking for subnet setup
amazonSubNet = oam.getEC2LocalInstanceSubnet();
// cout << "amazonSubNet = " << amazonSubNet << endl;
if ( amazonSubNet == "failed" || amazonSubNet == "" )
{
amazonSubNet = oam::UnassignedName;
cloud = "amazon-ec2";
}
else
{
cloud = "amazon-vpc";
}
//set subnetID
try {
sysConfig->setConfig(InstallSection, "AmazonSubNetID", amazonSubNet);
}
catch(...)
{}
}
else
cloud = "amazon-vpc";
try { try {
sysConfig->setConfig(InstallSection, "Cloud", cloud); sysConfig->setConfig(InstallSection, "Cloud", "amazon-vpc");
} }
catch(...) catch(...)
{} {}
} }
else
{
try {
sysConfig->setConfig(InstallSection, "Cloud", oam::UnassignedName);
}
catch(...)
{}
}
if ( pmwithum ) if ( pmwithum )
cout << endl << "NOTE: Local Query Feature is enabled" << endl; cout << endl << "NOTE: Local Query Feature is enabled" << endl;
@@ -993,6 +947,7 @@ int main(int argc, char *argv[])
cout << endl; cout << endl;
// prompt for system name
setSystemName(); setSystemName();
cout << endl; cout << endl;

View File

@@ -147,20 +147,7 @@ int main(int argc, char *argv[])
{} {}
bool build40 = false; bool build40 = false;
if ( !CoreFileFlag.empty() ) bool build401 = true;
build40 = true;
//build 4.0.1 flag
string AmazonSubNetID;
try {
AmazonSubNetID = sysConfigNew->getConfig(InstallSection, "AmazonSubNetID");
}
catch(...)
{}
bool build401 = false;
if ( !AmazonSubNetID.empty() )
build401 = true;
//set install config flag //set install config flag
try { try {
@@ -1283,18 +1270,13 @@ int main(int argc, char *argv[])
// //
if (build3) { if (build3) {
//setup cloud parameters //setup cloud parameters
string x509Cert;
string x509PriKey;
string UMStorageType; string UMStorageType;
string rpw;
string PMInstanceType; string PMInstanceType;
string UMInstanceType; string UMInstanceType;
string UMSecurityGroup; string UMSecurityGroup;
string UMVolumeSize; string UMVolumeSize;
string PMVolumeSize; string PMVolumeSize;
string AmazonAutoTagging; string AmazonAutoTagging;
string AmazonRegion;
string AmazonZone;
string AmazonVPCNextPrivateIP; string AmazonVPCNextPrivateIP;
string AmazonDeviceName; string AmazonDeviceName;
string UMVolumeType; string UMVolumeType;
@@ -1305,20 +1287,14 @@ int main(int argc, char *argv[])
try { try {
cloud = sysConfigOld->getConfig(InstallSection, "Cloud"); cloud = sysConfigOld->getConfig(InstallSection, "Cloud");
x509Cert = sysConfigOld->getConfig(InstallSection, "AmazonX509Certificate");
x509PriKey = sysConfigOld->getConfig(InstallSection, "AmazonX509PrivateKey");
UMStorageType = sysConfigOld->getConfig(InstallSection, "UMStorageType"); UMStorageType = sysConfigOld->getConfig(InstallSection, "UMStorageType");
rpw = sysConfigOld->getConfig(InstallSection, "rpw");
PMInstanceType = sysConfigOld->getConfig(InstallSection, "PMInstanceType"); PMInstanceType = sysConfigOld->getConfig(InstallSection, "PMInstanceType");
UMInstanceType = sysConfigOld->getConfig(InstallSection, "UMInstanceType"); UMInstanceType = sysConfigOld->getConfig(InstallSection, "UMInstanceType");
UMSecurityGroup = sysConfigOld->getConfig(InstallSection, "UMSecurityGroup"); UMSecurityGroup = sysConfigOld->getConfig(InstallSection, "UMSecurityGroup");
UMVolumeSize = sysConfigOld->getConfig(InstallSection, "UMVolumeSize"); UMVolumeSize = sysConfigOld->getConfig(InstallSection, "UMVolumeSize");
PMVolumeSize = sysConfigOld->getConfig(InstallSection, "PMVolumeSize"); PMVolumeSize = sysConfigOld->getConfig(InstallSection, "PMVolumeSize");
AmazonAutoTagging = sysConfigOld->getConfig(InstallSection, "AmazonAutoTagging"); AmazonAutoTagging = sysConfigOld->getConfig(InstallSection, "AmazonAutoTagging");
AmazonRegion = sysConfigOld->getConfig(InstallSection, "AmazonRegion");
AmazonZone = sysConfigOld->getConfig(InstallSection, "AmazonZone");
AmazonVPCNextPrivateIP = sysConfigOld->getConfig(InstallSection, "AmazonVPCNextPrivateIP"); AmazonVPCNextPrivateIP = sysConfigOld->getConfig(InstallSection, "AmazonVPCNextPrivateIP");
AmazonSubNetID = sysConfigOld->getConfig(InstallSection, "AmazonSubNetID");
AmazonDeviceName = sysConfigOld->getConfig(InstallSection, "AmazonDeviceName"); AmazonDeviceName = sysConfigOld->getConfig(InstallSection, "AmazonDeviceName");
UMVolumeType = sysConfigOld->getConfig(InstallSection, "UMVolumeType"); UMVolumeType = sysConfigOld->getConfig(InstallSection, "UMVolumeType");
UMVolumeIOPS = sysConfigOld->getConfig(InstallSection, "UMVolumeIOPS"); UMVolumeIOPS = sysConfigOld->getConfig(InstallSection, "UMVolumeIOPS");
@@ -1355,13 +1331,10 @@ int main(int argc, char *argv[])
cloud = oam::UnassignedName; cloud = oam::UnassignedName;
if ( cloud == "amazon") if ( cloud == "amazon")
cloud = "amazon-ec2"; cloud = "amazon-ec2";
if ( AmazonSubNetID.empty() )
AmazonSubNetID = oam::UnassignedName;
if ( AmazonVPCNextPrivateIP.empty() ) if ( AmazonVPCNextPrivateIP.empty() )
AmazonVPCNextPrivateIP = oam::UnassignedName; AmazonVPCNextPrivateIP = oam::UnassignedName;
try { try {
sysConfigNew->setConfig(InstallSection, "AmazonSubNetID", AmazonSubNetID);
sysConfigNew->setConfig(InstallSection, "AmazonVPCNextPrivateIP", AmazonVPCNextPrivateIP); sysConfigNew->setConfig(InstallSection, "AmazonVPCNextPrivateIP", AmazonVPCNextPrivateIP);
} }
catch(...) catch(...)
@@ -1373,18 +1346,13 @@ int main(int argc, char *argv[])
try { try {
sysConfigNew->setConfig(InstallSection, "Cloud", cloud); sysConfigNew->setConfig(InstallSection, "Cloud", cloud);
sysConfigNew->setConfig(InstallSection, "AmazonX509Certificate", x509Cert);
sysConfigNew->setConfig(InstallSection, "AmazonX509PrivateKey", x509PriKey);
sysConfigNew->setConfig(InstallSection, "UMStorageType", UMStorageType); sysConfigNew->setConfig(InstallSection, "UMStorageType", UMStorageType);
sysConfigNew->setConfig(InstallSection, "rpw", rpw);
sysConfigNew->setConfig(InstallSection, "PMInstanceType", PMInstanceType); sysConfigNew->setConfig(InstallSection, "PMInstanceType", PMInstanceType);
sysConfigNew->setConfig(InstallSection, "UMInstanceType", UMInstanceType); sysConfigNew->setConfig(InstallSection, "UMInstanceType", UMInstanceType);
sysConfigNew->setConfig(InstallSection, "UMSecurityGroup", UMSecurityGroup); sysConfigNew->setConfig(InstallSection, "UMSecurityGroup", UMSecurityGroup);
sysConfigNew->setConfig(InstallSection, "UMVolumeSize", UMVolumeSize); sysConfigNew->setConfig(InstallSection, "UMVolumeSize", UMVolumeSize);
sysConfigNew->setConfig(InstallSection, "PMVolumeSize", PMVolumeSize); sysConfigNew->setConfig(InstallSection, "PMVolumeSize", PMVolumeSize);
sysConfigNew->setConfig(InstallSection, "AmazonAutoTagging", AmazonAutoTagging); sysConfigNew->setConfig(InstallSection, "AmazonAutoTagging", AmazonAutoTagging);
sysConfigNew->setConfig(InstallSection, "AmazonRegion", AmazonRegion);
sysConfigNew->setConfig(InstallSection, "AmazonZone", AmazonZone);
sysConfigNew->setConfig(InstallSection, "AmazonDeviceName", AmazonDeviceName); sysConfigNew->setConfig(InstallSection, "AmazonDeviceName", AmazonDeviceName);
sysConfigNew->setConfig(InstallSection, "UMVolumeType", UMVolumeType); sysConfigNew->setConfig(InstallSection, "UMVolumeType", UMVolumeType);