Skip to content

Commit

Permalink
add 3 flags smp, memory and cpuset
Browse files Browse the repository at this point in the history
  • Loading branch information
s.djellali authored and s.djellali committed Jul 3, 2024
1 parent da3334b commit 30dc1be
Show file tree
Hide file tree
Showing 19 changed files with 123 additions and 86 deletions.
Empty file.
Empty file modified bitnami/scylladb/5.4/debian-12/prebuildfs/usr/sbin/run-script
100755 → 100644
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file modified bitnami/scylladb/6.0/debian-12/prebuildfs/usr/sbin/run-script
100755 → 100644
Empty file.
Empty file.
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,7 @@ cassandra_validate() {
check_positive_value DB_CQL_PORT_NUMBER
check_positive_value DB_JMX_PORT_NUMBER
check_positive_value DB_TRANSPORT_PORT_NUMBER
check_positive_value DB_SMP

check_conflicting_ports DB_CQL_PORT_NUMBER DB_JMX_PORT_NUMBER DB_TRANSPORT_PORT_NUMBER

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ scylladb_env_vars=(
SCYLLADB_PROMETHEUS_PORT_NUMBER
SCYLLADB_DEVELOPER_MODE
SCYLLADB_RUN_JMX_PROXY
SCYLLADB_SMP
SCYLLADB_CPUSET
SCYLLADB_MEMORY
)
for env_var in "${scylladb_env_vars[@]}"; do
file_env_var="${env_var}_FILE"
Expand All @@ -102,6 +105,12 @@ export SCYLLADB_DATA_DIR="${DB_VOLUME_DIR}/data"
export DB_DATA_DIR="$SCYLLADB_DATA_DIR"
export SCYLLADB_COMMITLOG_DIR="${DB_DATA_DIR}/commitlog"
export DB_COMMITLOG_DIR="$SCYLLADB_COMMITLOG_DIR"
export SCYLLADB_DATA2_DIR="${DB_DATA_DIR}/data"
export DB_DATA2_DIR="$SCYLLADB_DATA2_DIR"
export SCYLLADB_HINTS_DIR="${DB_DATA_DIR}/hints"
export DB_HINTS_DIR="$SCYLLADB_HINTS_DIR"
export SCYLLADB_VIEW_HINTS_DIR="${DB_DATA_DIR}/view_hints"
export DB_VIEW_HINTS_DIR="$SCYLLADB_VIEW_HINTS_DIR"
export SCYLLADB_INITSCRIPTS_DIR="/docker-entrypoint-initdb.d"
export DB_INITSCRIPTS_DIR="$SCYLLADB_INITSCRIPTS_DIR"
export SCYLLADB_LOG_DIR="${DB_BASE_DIR}/logs"
Expand Down Expand Up @@ -153,6 +162,12 @@ export SCYLLADB_INTERNODE_ENCRYPTION="${SCYLLADB_INTERNODE_ENCRYPTION:-none}"
export DB_INTERNODE_ENCRYPTION="$SCYLLADB_INTERNODE_ENCRYPTION"
export SCYLLADB_NUM_TOKENS="${SCYLLADB_NUM_TOKENS:-256}"
export DB_NUM_TOKENS="$SCYLLADB_NUM_TOKENS"
export SCYLLADB_SMP="${SCYLLADB_SMP:-2}"
export DB_SMP="$SCYLLADB_SMP"
export SCYLLADB_CPUSET="${SCYLLADB_CPUSET:-}"
export DB_CPUSET="$SCYLLADB_CPUSET"
export SCYLLADB_MEMORY="${SCYLLADB_MEMORY:-8G}"
export DB_MEMORY="$SCYLLADB_MEMORY"
export SCYLLADB_PASSWORD_SEEDER="${SCYLLADB_PASSWORD_SEEDER:-no}"
export DB_PASSWORD_SEEDER="$SCYLLADB_PASSWORD_SEEDER"
export SCYLLADB_SEEDS="${SCYLLADB_SEEDS:-$DB_HOST}"
Expand Down
Empty file.
2 changes: 1 addition & 1 deletion bitnami/scylladb/6.0/debian-12/rootfs/opt/bitnami/scripts/scylladb/postunpack.sh
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
. /opt/bitnami/scripts/scylladb-env.sh


for dir in "$DB_INITSCRIPTS_DIR" "$DB_TMP_DIR" "$DB_LOG_DIR" "$DB_CONF_DIR" "$DB_MOUNTED_CONF_DIR" "$DB_VOLUME_DIR" "$DB_DEFAULT_CONF_DIR"; do
for dir in "$DB_INITSCRIPTS_DIR" "$DB_TMP_DIR" "$DB_LOG_DIR" "$DB_CONF_DIR" "$DB_MOUNTED_CONF_DIR" "$DB_VOLUME_DIR" "$DB_DEFAULT_CONF_DIR" "$DB_COMMITLOG_DIR" "$DB_DATA2_DIR" "$DB_HINTS_DIR" "$DB_VIEW_HINTS_DIR"; do
ensure_dir_exists "$dir"
chmod -R g+rwX "$dir"
done
Expand Down
15 changes: 15 additions & 0 deletions bitnami/scylladb/6.0/debian-12/rootfs/opt/bitnami/scripts/scylladb/run.sh
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,21 @@ if is_boolean_yes "$SCYLLADB_DEVELOPER_MODE"; then
flags+=("--developer-mode" "true")
fi

# Add DB_SMP flag if the variable is set
if [[ -n "${DB_SMP}" ]]; then
flags+=("--smp" "$DB_SMP")
fi

# Add DB_CPUSET flag if the variable is set
if [[ -n "${DB_CPUSET}" ]]; then
flags+=("--cpuset" "$DB_CPUSET")
fi

# Add DB_MEMORY flag if the variable is set
if [[ -n "${DB_MEMORY}" ]]; then
flags+=("--memory" "$DB_MEMORY")
fi

# Add flags passed to this script
flags+=("$@")

Expand Down
Empty file.
176 changes: 91 additions & 85 deletions bitnami/scylladb/README.md

Large diffs are not rendered by default.

0 comments on commit 30dc1be

Please sign in to comment.