Comments (3)
Hi @mikebluestein
I think that if running under docker, you might need to inject this my_scenario
into your container, and compile it within. Have a look at this script, you could use it as ./script.sh 2 my_scenario.erl
, it might help:
#!/usr/bin/env bash
NODES=${1:-2}
FILE_PATH="${2:-my_scenario.erl}"
FILE=`basename ${FILE_PATH} .erl`
for i in $(seq 1 $NODES); do
NODE="amoc-${i}"
echo "cp file ${FILE} from path ${FILE_PATH} to node ${NODE}"
docker cp ${FILE_PATH} ${NODE}:/home/amoc/amoc/scenarios
docker exec -it $NODE /home/amoc/amoc/bin/amoc eval "compile:file(\"scenarios/${FILE}\", [{outdir, \"scenarios_ebin\"}, {parse_transform, lager_transform}])."
docker exec -it $NODE /home/amoc/amoc/bin/amoc eval "code:add_patha(\"scenarios_ebin\"), code:purge(${FILE}), code:load_file(${FILE})."
done
So you basically first docker cp
the file into the container, then tell the Erlang vm to compile it and to load it, and then amoc can find it and use it 🙂
from amoc.
dear @mikebluestein.
According to rebar.config it should be compiled and available for execution. But please note that Dockerfile runs "git clean -ffxd" as part of docker image build, so all the non-tracked (by git) files are removed.
anyway, we do not recommend to add scenarios directly to amoc project. the latest release was fully focused on splitting amoc and scenarios, and making amoc just a pure loadtesting framework.
now you can use amoc as rebar dependency, and have a separate dedicated project with your scenarios. Like it's done for amoc-arsenal-xmpp.
we highly recommend to go this way.
from amoc.
@mikebluestein please close the issue if you have no other questions.
from amoc.
Related Issues (8)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from amoc.