Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DeepDive dependencises #689

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions util/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ INSTALLER_HOME_DIR=$(dirname "$0")/install
running_from_git=true; [[ -e "$INSTALLER_HOME_DIR"/../../.git ]] || running_from_git=false
has() { type "$@"; } &>/dev/null
error() { echo "$@"; false; } >&2
enter() {
local name=$1
local desc=${2:-$name}
local value=${!name:-}
read -p "Enter $desc ${value:+[$value]}: "
eval "$name=\${REPLY:-\${$name:-}}"
}

# common installers ###########################################################
install_deepdive_build_deps() { false; }
Expand Down
26 changes: 26 additions & 0 deletions util/install/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# DeepDive Installer Scripts

## Layout of an Installer Script

Shell functions whose name starts with `install_`.

```bash
install_deepdive_runtime_deps() {
...
}

install_postgres() {
...
}

...
```

## Utilities
Several utility functions are available to the installer scripts.

* `error "Cannot install dependencies without Homebrew (http://brew.sh)"`
* `source_script install.Ubuntu.sh`
* `source_os_script pgxl`
* `enter NUM_DATA_NODES "number of data nodes"`

9 changes: 3 additions & 6 deletions util/install/install.Ubuntu.pgxl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,9 @@ TARGET_DIR=/opt/pgxl
###################################################

# ask for confirmation of key settings
read -p "Enter number of data nodes [$NUM_DATA_NODES]: " CUSTOM_NUM_DATA_NODES
NUM_DATA_NODES=${CUSTOM_NUM_DATA_NODES:-$NUM_DATA_NODES}
read -p "Enter data dir to hold segment data [$DATA_DIR]: " CUSTOM_DATA_DIR
DATA_DIR=${CUSTOM_DATA_DIR:-$DATA_DIR}
read -p "Enter port number [$USER_DB_PORT]: " CUSTOM_USER_DB_PORT
USER_DB_PORT=${CUSTOM_USER_DB_PORT:-$USER_DB_PORT}
enter NUM_DATA_NODES "number of data nodes"
enter DATA_DIR "data dir to hold segment data"
enter USER_DB_PORT "port number"

sudo apt-get update
sudo apt-get -y install -y screen curl git rsync openssl locales openssh-server openssh-client
Expand Down