diff --git a/cc-reinstall.sh b/cc-reinstall.sh index c112c26..ef19f69 100755 --- a/cc-reinstall.sh +++ b/cc-reinstall.sh @@ -55,85 +55,76 @@ read -n 1 -p "Would you like to now re-install Cluster Control (Y/n)?" choice case "$choice" in [Nn]) echo ''; exit 0;; * ) - echo -e "Server 1: Pri MySQL & PostgreSQL\nServer 2: LAN & WAN MySQL" - read -n 1 -p "Select which server to install(1/2)? " serverchoice - case "${serverchoice}" in - [Nn]) echo ''; exit 0;; - * ) - ./install-cc -1 + ./install-cc -1 - /opt/copycerts.sh - # apt install -y mailutils xtrabackup - apt install -y mailutils + /opt/copycerts.sh + # apt install -y mailutils xtrabackup + apt install -y mailutils - echo - echo - read -p "Enter a password to set for the Admin account in MySQL: " pwd - echo - echo "Enter the root MySQL password:" - mysql -u root -p -e "CREATE USER 'admin'@'%' IDENTIFIED BY '${pwd}';GRANT ALL PRIVILEGES ON *.* TO 'admin'@'%' WITH GRANT OPTION;" + echo + echo + read -p "Enter a password to set for the Admin account in MySQL: " pwd + echo + echo "Enter the root MySQL password:" + mysql -u root -p -e "CREATE USER 'admin'@'%' IDENTIFIED BY '${pwd}';GRANT ALL PRIVILEGES ON *.* TO 'admin'@'%' WITH GRANT OPTION;" - read -n 1 -p "Login at https://mysql-manager-node${serverchoice}.scity.us and setup the admin user, verify it brings up the deploy prompt. Once complete then press ENTER" choice2 - echo - echo - echo "Importing Previous Database Clusters" - - if [ "${serverchoice}" == "1" ]; then - /usr/bin/s9s cluster --register \ - --cluster-type=galera \ - --nodes="10.10.1.51;10.10.1.52;10.2.1.51" \ - --vendor=mariadb \ - --provider-version=10.4 \ - --db-admin="root" \ - --db-admin-passwd='Dc$@54115' \ - --os-user=root \ - --os-key-file=/root/.ssh/id_rsa \ - --cluster-name="iDS-MySQL-Galera" \ - --wait - - /usr/bin/s9s cluster --register \ - --cluster-type=postgresql \ - --nodes="10.10.0.211;10.10.0.212" \ - --vendor=mariadb \ - --provider-version=13 \ - --db-admin="root" \ - --db-admin-passwd='Dc$@54115' \ - --os-user=root \ - --os-key-file=/root/.ssh/id_rsa \ - --cluster-name="IDS-Headscale-PostgreSQL" \ - --wait - - elif [ "${serverchoice}" == "2" ]; then - /usr/bin/s9s cluster --register \ - --cluster-type=galera \ - --nodes="100.100.55.2;100.100.55.3;100.100.55.4" \ - --vendor=mariadb \ - --provider-version=10.6 \ - --db-admin="root" \ - --db-admin-passwd='Dc$@54115' \ - --os-user=root \ - --os-key-file=/root/.ssh/id_rsa \ - --cluster-name="iDS-WAN-DNS-MySQL-Galera" \ - --wait - - /usr/bin/s9s cluster --register \ - --cluster-type=galera \ - --nodes="100.100.10.1;100.100.10.2;100.100.10.3" \ - --vendor=mariadb \ - --provider-version=10.6 \ - --db-admin="root" \ - --db-admin-passwd='Dc$@54115' \ - --os-user=root \ - --os-key-file=/root/.ssh/id_rsa \ - --cluster-name="iDS-LAN-DNS-MySQL-Galera" \ - --wait - fi - - # bash <(curl -sL https://git.schroedercity.com/voltron/Misc-Scripts/raw/master/install-postfix.sh) + read -n 1 -p "Login at https://mysql.scity.us and setup the admin user, verify it brings up the deploy prompt. Once complete then press ENTER" choice2 + echo + echo + echo "Importing Previous Database Clusters" - echo - echo "Install Completed" - ;; esac + /usr/bin/s9s cluster --register \ + --cluster-type=galera \ + --nodes="10.10.1.51;10.10.1.52;10.2.1.51" \ + --vendor=mariadb \ + --provider-version=10.4 \ + --db-admin="root" \ + --db-admin-passwd='Dc$@54115' \ + --os-user=root \ + --os-key-file=/root/.ssh/id_rsa \ + --cluster-name="iDS-MySQL-Galera" \ + --wait + + # /usr/bin/s9s cluster --register \ + # --cluster-type=postgresql \ + # --nodes="10.10.0.211;10.10.0.212" \ + # --vendor=mariadb \ + # --provider-version=13 \ + # --db-admin="root" \ + # --db-admin-passwd='Dc$@54115' \ + # --os-user=root \ + # --os-key-file=/root/.ssh/id_rsa \ + # --cluster-name="IDS-Headscale-PostgreSQL" \ + # --wait + + /usr/bin/s9s cluster --register \ + --cluster-type=galera \ + --nodes="100.100.55.2;100.100.55.3;100.100.55.4" \ + --vendor=mariadb \ + --provider-version=10.6 \ + --db-admin="root" \ + --db-admin-passwd='Dc$@54115' \ + --os-user=root \ + --os-key-file=/root/.ssh/id_rsa \ + --cluster-name="iDS-WAN-DNS-MySQL-Galera" \ + --wait + + /usr/bin/s9s cluster --register \ + --cluster-type=galera \ + --nodes="100.100.10.1;100.100.10.2;100.100.10.3" \ + --vendor=mariadb \ + --provider-version=10.6 \ + --db-admin="root" \ + --db-admin-passwd='Dc$@54115' \ + --os-user=root \ + --os-key-file=/root/.ssh/id_rsa \ + --cluster-name="iDS-LAN-DNS-MySQL-Galera" \ + --wait + + # bash <(curl -sL https://git.schroedercity.com/voltron/Misc-Scripts/raw/master/install-postfix.sh) + + echo + echo "Install Completed" ;; esac exit 0 \ No newline at end of file