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

148 [DEV] added dockerized jepsen environment #237

Merged
merged 12 commits into from
May 3, 2017
Merged

148 [DEV] added dockerized jepsen environment #237

merged 12 commits into from
May 3, 2017

Conversation

tonycox
Copy link
Collaborator

@tonycox tonycox commented May 2, 2017

closes #214

@tonycox tonycox self-assigned this May 2, 2017
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/)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: should be "written"

start jepsen environment

```
sh build.sh
Copy link
Collaborator

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.

@YevIgn
Copy link
Collaborator

YevIgn commented May 2, 2017

Please check that there is a newline at the end of each file.

@YevIgn YevIgn closed this May 2, 2017
@YevIgn YevIgn removed the in progress label May 2, 2017
@YevIgn YevIgn reopened this May 2, 2017
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
Copy link
Collaborator

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`

fi
if [ ! -f ./secret/node.env ]; then
INFO "Generating key pair"
ssh-keygen -t rsa -N "" -f ./secret/id_rsa -C "epam.com"
Copy link
Collaborator

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`


INFO "Building images"
docker build -t java-base --network host base/.
docker build -t jepsen-control --network host jepsen-control/.
Copy link
Collaborator

@ex00 ex00 May 2, 2017

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
Copy link
Collaborator

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 && \
Copy link
Collaborator

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?

@tonycox tonycox merged commit 62185b5 into develop May 3, 2017
@tonycox tonycox deleted the feature/148 branch May 3, 2017 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants