-
Notifications
You must be signed in to change notification settings - Fork 4
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
148 [DEV] added dockerized jepsen environment #237
Conversation
lagerta-jepsen/README.md
Outdated
docker exec jepsen-control bin/bash -c "cd /jepsen-0.1.4/jepsen && lein test" | ||
``` | ||
|
||
All tests placed in src/test and witten on [clojure](https://clojure.org/) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: should be "written"
lagerta-jepsen/README.md
Outdated
start jepsen environment | ||
|
||
``` | ||
sh build.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As build.sh is placed within subdirectory it's better to write all commands from module root or specify that one should navigate to docker dir.
Please check that there is a newline at the end of each file. |
lagerta-jepsen/docker/build.sh
Outdated
ssh-keygen -t rsa -N "" -f ./secret/id_rsa -C "epam.com" | ||
|
||
INFO "Generating ./secret/control.env" | ||
echo '# generated by lagerta-jepsen/docker/build.sh' > ./secret/control.env |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can use bash commands for get path to script, like as:
SCRIPT=`realpath $0`
lagerta-jepsen/docker/build.sh
Outdated
fi | ||
if [ ! -f ./secret/node.env ]; then | ||
INFO "Generating key pair" | ||
ssh-keygen -t rsa -N "" -f ./secret/id_rsa -C "epam.com" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if I will run build script from other directory, not from Lagerta/lagerta-jepsen/docker then secret file will create there I executed script. may be use ablsolutly path to sectet folder?
for it use next commands:
WHERE_BUILD_SCRIPT=`realpath $0`
FOLDER_WITH_SCRIPT=`dirname $WHERE_BUILD_SCRIPT`
lagerta-jepsen/docker/build.sh
Outdated
|
||
INFO "Building images" | ||
docker build -t java-base --network host base/. | ||
docker build -t jepsen-control --network host jepsen-control/. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I propose start build jepsen-control only if build java-base was success, else would case when new build java-base is fail and jepsen-control will build from old version java-base.
# install jepsen | ||
ADD https://github.com/jepsen-io/jepsen/archive/${JEPSEN_VERSION}.tar.gz /jepsen | ||
RUN chmod +x jepsen && tar xfz jepsen && rm -f jepsen | ||
RUN cd /jepsen-${JEPSEN_VERSION}/jepsen && lein install |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
may will change as:
RUN chmod +x jepsen && tar xfz jepsen && rm -f jepsen && \
cd /jepsen-${JEPSEN_VERSION}/jepsen && lein install
ARG JEPSEN_VERSION=0.1.4 | ||
ENV LEIN_ROOT true | ||
|
||
RUN wget https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you try use ADD docker command for script?
closes #214