Customize CIAB image creation, for automation base image 7.6 #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
We need to support Skai's MemSQL automation image use case:
Q: Aren't the default SingleStore scripts sufficient for this use case?
A: No, because they don't allow the retention of data after having populated the image with data and committed it.
Additionally, with the image built by the default scripts, it's impossible to start the image twice (i.e. start the committed image), due to the usage of the
sdb-toolbox
tool in the startup script.Implementation
The main changes in the PR are:
VOLUME
command, presumably to allow data retention on the image once we use it in our Jenkins automations.Instructions - build base image
The customized scripts, all in all, serve for us to build a clean CIAB 7.6 image, ready to be populated with data.
We can do it locally, or with a jenkins job (that would do the same things we'd do locally):
cd
to repo base directory.make
- create the base image(s) for the Dockerfiles in the repodocker build -t kenshoo-docker.jfrog.io/ks-db-memsql-76-cluster-in-a-box-base -f Dockerfile-ciab .
- build a cluster-in-a-box image on top of the default image, tagged for our artifactorydocker push kenshoo-docker.jfrog.io/ks-db-memsql-76-cluster-in-a-box-base
- push it to the artifactoryThen, to create a populated MemSQL docker image for the automation jobs, run the
automation-tests-db-upload
on Jenkins-Search.Recommendations - discovery for next version upgrade
When it's time to upgrade from 7.6 to some new version, one of the steps will be to create a new base image for Skai's automation environment.
I suggest trying it like this:
deployment-docker
scripts repository since the version we forked.2 methods for doing that:
git remote add -f memsql_src git@github.com:memsql/deployment-docker.git
git remote update
git diff master remotes/memsql_src/master
git remote rm memsql_src
If they seem necessary, apply them to the repo on your local machine.
sdb-toolbox-config unregister-host
. All the others were workarounds to issues we ran into.