Skip to content

Commit

Permalink
Move manual install script functions to separate file
Browse files Browse the repository at this point in the history
  • Loading branch information
kolbe committed May 23, 2024
1 parent 51567ec commit 728ac5d
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 13 deletions.
23 changes: 10 additions & 13 deletions scripts/manual_install_84.sh → scripts/manual_install.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#!/bin/bash
set -xe

version=8.4.0

# careful, this ubuntu:full-latest image is VERY large ... like 50GB!!!
# docker run -ti --platform=linux/amd64 ghcr.io/catthehacker/ubuntu:full-latest
#
# source this file to get the following functions:
# - setup: install required packages
# - activate <version>: download and extract the specified version of MySQL
# - initialize_mysql <name>: initialize a MySQL data directory
# - start_mysql <name> <port> <server_id>: start a MySQL server
# - check_mysql <name>: check if a MySQL server is running
# - deploy_replication <num_nodes> <base_port>: deploy a replication setup
# - exec_mysql_sock <name> <query>: execute a query on a MySQL server

#sudo apt install -y libncurses6 #???
#sudo apt install -y libncurses5 libaio1

pushd /tmp
set -xe

setup() {
local cmd=()
Expand Down Expand Up @@ -162,6 +162,3 @@ exec_mysql_sock() {
./bin/mysql -u root -S "$datadir/mysql.sock" -e "$2"
}

setup
activate "$version"
deploy_replication
13 changes: 13 additions & 0 deletions scripts/manual_install84.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

set -xe

source "${0%/*}"/manual_install.sh

version=8.4.0

pushd /tmp

setup
activate "$version"
deploy_replication

0 comments on commit 728ac5d

Please sign in to comment.