satori-com / mzbench

MZ Benchmarking
BSD 3-Clause "New" or "Revised" License
269 stars 78 forks source link

Error in make_install from git #134

Open trippinCode opened 6 years ago

trippinCode commented 6 years ago

Hello, I setup a instance of mzbench on docker to load test my mqtt broker.

`#!benchDL make_install(git = "https://github.com/erlio/vmq_mzbench.git", branch = "master")

pool(size = 1000, worker_type = mqtt_worker, worker_start = poisson(1000 rps)):

        connect([t(host, "217.172.184.56"),
                t(port,1883),
                t(client,fixed_client_id("", worker_id())),
                t(clean_session,true),
                t(keepalive_interval,60),
                t(proto_version,4), t(reconnect_timeout,4)
                ])

        set_signal(connect1, 1)
        wait_signal(connect1, 1000)
        wait(4 sec)
        loop(time = 5 min, rate = 1 rps):
            publish_to_self("foo", random_binary(240), 3)
        disconnect()`

I got following error trying to run my scenario

`#!benchDL make_install(git = "https://github.com/erlio/vmq_mzbench.git", branch = "master")

pool(size = 1000, worker_type = mqtt_worker, worker_start = poisson(1000 rps)):

        connect([t(host, "217.172.184.56"),
                t(port,1883),
                t(client,fixed_client_id("", worker_id())),
                t(clean_session,true),
                t(keepalive_interval,60),
                t(proto_version,4), t(reconnect_timeout,4)
                ])

        set_signal(connect1, 1)
        wait_signal(connect1, 1000)
        wait(4 sec)
        loop(time = 5 min, rate = 1 rps):
            publish_to_self("foo", random_binary(240), 3)
        disconnect()`
parsifal-47 commented 6 years ago

Hello, looks like something is missing in your message

trippinCode commented 6 years ago

Sorry, i accidentally pasted two times my scenario. My error logs are

14:58:09.855 [error] [ API ] <0.379.0> [ REMOTE EXEC ] Command execution failed: Cmd: bash -c -l "export PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'; mkdir -p /tmp/bench_mzbench_api_e53bb660cf0b_1520_953089_828980 && cd /tmp/bench_mzbench_api_e53bb660cf0b_1520_953089_828980 && git clone https://github.com/erlio/vmq_mzbench.git deployment_code && cd deployment_code && git checkout master && cd ./. && make generate_tgz && mv *.tgz /tmp/bench_mzbench_api_e53bb660cf0b_1520_953089_828900.tgz " Exit code: 127 Output: bash: git: command not found
--
14:58:10.010 [error] [ API ] <0.366.0> Stage 'pipeline - provisioning': failed Command returned 127:  bash -c -l "export PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'; mkdir -p /tmp/bench_mzbench_api_e53bb660cf0b_1520_953089_828980 && cd /tmp/bench_mzbench_api_e53bb660cf0b_1520_953089_828980 && git clone https://github.com/erlio/vmq_mzbench.git deployment_code && cd deployment_code && git checkout master && cd ./. && make generate_tgz && mv *.tgz /tmp/bench_mzbench_api_e53bb660cf0b_1520_953089_828900.tgz " Command output: bash: git: command not found
parsifal-47 commented 6 years ago

looks like, you need to have git on your worker machines, if you setup them manually, run something like sudo apt-get install git for EC2 you may use one of our images listed here: https://github.com/satori-com/mzbench/blob/master/doc/cloud_plugins.md

trippinCode commented 6 years ago

I run your docker container on my pc, is there something i did wrong in the setup?

parsifal-47 commented 6 years ago

oh, everything is right, I see, I forgot about this option, docker container has no tooling for custom workers.

If you are comfortable with Docker, you could try to add git there and see what happens, I'm not completely sure that git is the only missing part, but we'll see. To do that create new Dockerfile in a following way:

FROM docker.io/ridrisov/mzbench
RUN yum -y install git

then build and tag:

docker build . -t custom_mzbench

then run:

docker run -d -p 4800:80 --name mzbench_server custom_mzbench

of course it has to be fixed in our Docker image, I just provided these instructions to speedup the process, feel free to ask any questions!

trippinCode commented 6 years ago

I'm going to add git to the docker container and see if it works. When it works should i make a pull request?

parsifal-47 commented 6 years ago

sure! you are very welcome

trippinCode commented 6 years ago

So i've added git, make, which. I'm just getting a error for get-deps, because yum can't find the repo do i need to add this? Sorry never worked with yum or rpm.

trippinCode commented 6 years ago

Ok i found out that get-deps doesn't exist and that i should install rebar. Rebar is the right package or?

trippinCode commented 6 years ago

Looks like the installation works and the git i tried to install has a syntax errors :disappointed:

trippinCode commented 6 years ago

Thanks for the help i going to create a pull request when i tested the feature

trippinCode commented 6 years ago

I got a syntax error and after a short recap i realized that it was probably a wrong version of a lib i installed. I still can make the pull request if you like, but it would probably not run the plugins...

Sorry for the long waiting period. I had to fix something else on work.

parsifal-47 commented 6 years ago

no worries! feel free to make PR