Update cc-reinstall.sh

This commit is contained in:
2023-10-18 08:22:46 -05:00
parent 5ea2d4ed70
commit 1229bb103a

View File

@@ -54,11 +54,6 @@ esac
read -n 1 -p "Would you like to now re-install Cluster Control (Y/n)?" choice read -n 1 -p "Would you like to now re-install Cluster Control (Y/n)?" choice
case "$choice" in case "$choice" in
[Nn]) echo ''; exit 0;; [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
@@ -73,12 +68,11 @@ case "$choice" in
echo "Enter the root MySQL password:" 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;" 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 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 echo
echo "Importing Previous Database Clusters" echo "Importing Previous Database Clusters"
if [ "${serverchoice}" == "1" ]; then
/usr/bin/s9s cluster --register \ /usr/bin/s9s cluster --register \
--cluster-type=galera \ --cluster-type=galera \
--nodes="10.10.1.51;10.10.1.52;10.2.1.51" \ --nodes="10.10.1.51;10.10.1.52;10.2.1.51" \
@@ -91,19 +85,18 @@ case "$choice" in
--cluster-name="iDS-MySQL-Galera" \ --cluster-name="iDS-MySQL-Galera" \
--wait --wait
/usr/bin/s9s cluster --register \ # /usr/bin/s9s cluster --register \
--cluster-type=postgresql \ # --cluster-type=postgresql \
--nodes="10.10.0.211;10.10.0.212" \ # --nodes="10.10.0.211;10.10.0.212" \
--vendor=mariadb \ # --vendor=mariadb \
--provider-version=13 \ # --provider-version=13 \
--db-admin="root" \ # --db-admin="root" \
--db-admin-passwd='Dc$@54115' \ # --db-admin-passwd='Dc$@54115' \
--os-user=root \ # --os-user=root \
--os-key-file=/root/.ssh/id_rsa \ # --os-key-file=/root/.ssh/id_rsa \
--cluster-name="IDS-Headscale-PostgreSQL" \ # --cluster-name="IDS-Headscale-PostgreSQL" \
--wait # --wait
elif [ "${serverchoice}" == "2" ]; then
/usr/bin/s9s cluster --register \ /usr/bin/s9s cluster --register \
--cluster-type=galera \ --cluster-type=galera \
--nodes="100.100.55.2;100.100.55.3;100.100.55.4" \ --nodes="100.100.55.2;100.100.55.3;100.100.55.4" \
@@ -127,13 +120,11 @@ case "$choice" in
--os-key-file=/root/.ssh/id_rsa \ --os-key-file=/root/.ssh/id_rsa \
--cluster-name="iDS-LAN-DNS-MySQL-Galera" \ --cluster-name="iDS-LAN-DNS-MySQL-Galera" \
--wait --wait
fi
# bash <(curl -sL https://git.schroedercity.com/voltron/Misc-Scripts/raw/master/install-postfix.sh) # bash <(curl -sL https://git.schroedercity.com/voltron/Misc-Scripts/raw/master/install-postfix.sh)
echo echo
echo "Install Completed" echo "Install Completed"
;; esac ;; esac
;; esac
exit 0 exit 0