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

Customize CIAB image creation, for automation base image 7.6 #1

Merged
Merged
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.idea
.vscode
20 changes: 14 additions & 6 deletions Dockerfile-ciab
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
# vim: ft=dockerfile
ARG BASE_IMAGE
# CHANGED FROM SOURCE: set the base image to fit the LOCALLY BUILT image
# (which was built using `make`, based on my changes to the Makefile)
ARG BASE_IMAGE="memsql/cluster-in-a-box"
FROM ${BASE_IMAGE}

# install SingleStore DB packages and additional dependencies
ARG CLIENT_VERSION
ARG SERVER_VERSION
ARG STUDIO_VERSION
ARG TOOLBOX_VERSION
# CHANGED FROM SOURCE: switch to root, add specific versions according to Makefile
USER root
ARG CLIENT_VERSION="1.0.5"
ARG SERVER_VERSION="7.6.13-39da2f5c72"
ARG STUDIO_VERSION="4.0.7"
ARG TOOLBOX_VERSION="1.13.9"
RUN yum install -y \
singlestore-client-${CLIENT_VERSION} \
singlestoredb-server${SERVER_VERSION} \
Expand All @@ -18,7 +22,11 @@ RUN mkdir -p /home/memsql && chown memsql:memsql /home/memsql
ADD ciab-assets/studio.hcl /var/lib/singlestoredb-studio/studio.hcl
RUN chown memsql:memsql /var/lib/singlestoredb-studio/studio.hcl

VOLUME ["/var/lib/memsql"]
# CHANGED FROM SOURCE: switch back from root
USER memsql

# CHANGED FROM SOURCE: commented the VOLUME line to enable persisting data in our automation-db-upload job
#VOLUME ["/var/lib/memsql"]

LABEL name="SingleStore DB Cluster in a Box"
LABEL vendor="SingleStore"
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SERVER_VERSION=7.8.10-375bb758c4
SERVER_VERSION=7.6.13-39da2f5c72 # CHANGED FROM SOURCE: enforce the specific version that we need for Skai's use-case
SERVER_VERSION_PREVIEW=7.9.4-1a8fd43c84
SERVER_VERSION_6_8=6.8.24-8e110b7bed
SERVER_VERSION_7_0=7.0.26-8999f1390b
Expand Down
15 changes: 12 additions & 3 deletions ciab-assets/startup
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,18 @@ else #initialize the cluster
fi
echo Done.

echo Configuring Toolbox...
sdb-toolbox-config register-host -y --localhost --host 127.0.0.1
echo Done.
echo Configuring Toolbox...
sdb-toolbox-config register-host -y --localhost --host 127.0.0.1

# CHANGED FROM SOURCE: added configurations to prevent huge docker image size.
memsqlctl -y update-config --all --set-global --key DEFAULT_PARTITIONS_PER_LEAF --value 2
memsqlctl -y update-config --all --set-global --key SNAPSHOT_TRIGGER_SIZE --value 268435456
memsqlctl -y update-config --all --set-global --key LOG_FILE_SIZE_PARTITIONS --value 268435456
memsqlctl -y update-config --all --set-global --key LOG_FILE_SIZE_REF_DBS --value 67108864

# CHANGED FROM SOURCE: unregistered the host, because it prevents raising the docker twice.
sdb-toolbox-config unregister-host -y --host 127.0.0.1
echo Done.

if [ -f /init.sql ]; then
echo Running /init.sql...
Expand Down