-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall
More file actions
executable file
·70 lines (57 loc) · 2.34 KB
/
install
File metadata and controls
executable file
·70 lines (57 loc) · 2.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#!/bin/bash
source ./bits/bootstrap/logging
#-----------
# Configurations
#-----------
export LAUNCHER_OWNER=${LAUNCHER_OWNER-$USER}
export LAUNCHER_DIR=${LAUNCHER_DIR-/var/local}
export REDIS_LAUNCHER_DIR=${REDIS_LAUNCHER_DIR-$LAUNCHER_DIR/redis}
export LOG_DIR=${LOG_DIR-/var/log}
export REDIS_CONFIG_DIR=${REDIS_CONFIG_DIR-$REDIS_LAUNCHER_DIR/config}
export DATA_DIR=${DATA_DIR-/var/local/data}
export REDIS_DATA_DIR=${REDIS_DATA_DIR-$DATA_DIR/redis}
export REDIS_PORT=${REDIS_PORT-6379}
export REDIS_HOST=${REDIS_HOST-"127.0.0.1:"}
export REDIS_VERSION=${REDIS_VERSION-latest}
REDIS_DISPLAY=${REDIS_DISPLAY-standalone} # or internal
#-----------
# Install Script
#-----------
if [[ "$REDIS_DISPLAY" == "standalone" ]]; then
notify "Installing REDIS ($REDIS_VERSION)..."
else
notify " -- Install REDIS ($REDIS_VERSION)..."
fi
OWNER=$LAUNCHER_OWNER ./bits/bootstrap/mkdir \
LAUNCHER_DIR \
REDIS_LAUNCHER_DIR \
REDIS_DATA_DIR \
REDIS_CONFIG_DIR \
${REDIS_LAUNCHER_DIR}/src \
${REDIS_LAUNCHER_DIR}/bin
notify " -- Copying config files"
TEMPLATE=./bits/redis/files/config LOCATION=${REDIS_LAUNCHER_DIR}/config ./bits/docker/copyallif
debug " -- Making logger available on node"
TEMPLATE=./bits/bootstrap/logging LOCATION=$REDIS_LAUNCHER_DIR/bin/logging ./bits/docker/copyif
TEMPLATE=./bits/bootstrap/failonerrors LOCATION=$REDIS_LAUNCHER_DIR/bin/failonerrors ./bits/docker/copyif
OWNER=$LAUNCHER_OWNER TEMPLATE=./bits/redis/files/bin LOCATION=$REDIS_LAUNCHER_DIR/bin \
./bits/docker/copyallif
if [[ "$REDIS_VERSION" != "latest" ]]; then
SRC_NAME=redis-${REDIS_VERSION}.tar.gz SRC_DIR=${REDIS_LAUNCHER_DIR}/src \
NAME="Redis ${REDIS_VERSION}" \
REMOTE_URL=http://download.redis.io/releases \
./bits/bootstrap/wget
TEMPLATE=./bits/redis/files/redis_version.dockerfile LOCATION=$REDIS_LAUNCHER_DIR/Dockerfile \
./bits/docker/copyif \
@REDIS_VERSION@ $REDIS_VERSION
else
TEMPLATE=./bits/redis/files/redis_default.dockerfile LOCATION=$REDIS_LAUNCHER_DIR/Dockerfile ./bits/docker/copyif
fi
LAUNCHER_DIR=$REDIS_LAUNCHER_DIR NAME=redis VERSION=$REDIS_VERSION ./bits/docker/build
NAME=redis DIR=$REDIS_LAUNCHER_DIR BIT=redis VERSION=$REDIS_VERSION ./bits/docker/helpers
DIR=./bits/redis ./bits/bootstrap/cleanup
if [[ "$REDIS_DISPLAY" == "standalone" ]]; then
notify "DONE, Installing REDIS."
else
notify " -- DONE, Installing REDIS."
fi