Code Monkey home page Code Monkey logo

iris-bench's Introduction

Running the demo

  • Create a new RSA key using ssh-keygen
  • Create a new etcd discovery token at: https://discovery.etcd.io/new
  • Copy yml file: cp launch-user-data.tmpl.yml launch-user-data.yml
  • Edit launch-user-data.yml
    • Paste your RSA private key in (get the indentation right)
    • Paste your etcd discovery token (see: "PUT-YOUR-TOKEN-HERE")
  • Edit launch.sh
    • You'll need VPC subnet id and a security group id
  • Install the AWS python command line tools (pip install awscli)
  • Run launch.sh
  • Add your ssh key to ssh-agent so that fleetctl can access it
  • Install the iris-bench server on each client. --tunnel should point at
    • fleetctl --tunnel=change-me.compute.amazonaws.com load fleet/iris-bench.service
    • fleetctl --tunnel=change-me.compute.amazonaws.com start iris-bench.service
    • Verify that it worked: fleetctl --tunnel=change-me.compute.amazonaws.com list-units
      • You should see that iris-bench.service is active on all nodes
  • on one machine run: docker run --net=host coopernurse/iris-bench:v3 /usr/local/bin/iris-bench -m echo -s 10 -c 15 -r 3

Cool things to try:

  • Run launch.sh again to add more machines to the cluster
  • Wait a few minutes, then run: fleetctl --tunnel=change-me.compute.amazonaws.com list-units
    • You should see that the new machines automatically joined the cluster, and ran the iris-bench.service because it's configured as a 'global' service that should run on all nodes
  • Re-run the benchmark, but increase the -r param to the # of machines in the cluster. You should see performance increase as you add machines

Interesting commands

Create image

docker build -no-cache -t="coopernurse/iris-bench:v3" .

Upload image to docker registry

docker push coopernurse/iris-bench:v3

On CoreOS host, run server:

# --net=host is needed to bridge the host Iris process to 
# the container.  it's not the best thing security-wise..
docker run -d --net=host coopernurse/iris-bench:v1

On CoreOS host, run client benchmarker:

# echo 
docker run --net=host coopernurse/iris-bench:v1 /usr/local/bin/iris-bench -m echo -s 10 -c 15

# add
docker run --net=host coopernurse/iris-bench:v1 /usr/local/bin/iris-bench -m add -s 10 -c 15

docker run -e GOMAXPROCS=2 --net=host coopernurse/iris-bench:v1 /usr/local/bin/iris-bench -m add -s 10 -c 15

iris-bench's People

Contributors

coopernurse avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

vdt

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.