ig-group / havoc Goto Github PK
View Code? Open in Web Editor NEWLibrary to do automated resilience testing using Docker, Clojure and Property Based testing
License: Apache License 2.0
Library to do automated resilience testing using Docker, Clojure and Property Based testing
License: Apache License 2.0
trying to execute below code and i am getting 301 when the code hits the docker api for starting a specific container.
(ns resilienceautomation.core
(:require [clojure.java.shell :as shell]
[clojure.tools.logging :as log]
[ig.havoc.core :as havoc]))
(defn foo
"I don't do a whole lot."
[x]
(println x "Hello, World!"))
;;This functions help starting the dockerized environment through docker-compose up
(defn start-system []
(log/info "Starting system ...")
(shell/sh "docker-compose"
"-p" "Resilience"
"-f" "docker-compose.yml" "up"
"-d"
"--build"
"--force-recreate"))
;;This functions help stopping the dockerized environment through docker-compose down
(defn stop-system []
(log/info "Stopping system ...")
(shell/sh "docker-compose"
"-p" "Resilience"
"-f" "docker-compose.yml" "down" "-v" "--remove-orphans"))
;;Controller to control individual docker containers in the above environment
(def docker (havoc/create-docker "http://localhost:4243" "Resilience"))
(havoc/exec! docker
{:command :container/start
:host :zoo1})
version: '2'
networks:
app-tier:
driver: bridge
services:
zoo1:
image: wurstmeister/zookeeper:3.4.6
privileged: true
cassandra1:
image: cassandra:latest
privileged: true
volumes:
{:status 301,
:headers
{"Location" "/containers/stop",
"Date"
"Fri, 11 Jan 2019 05:00:39 GMT",
"Content-Length" "0",
"Content-Type"
"text/plain; charset=utf-8",
"Connection" "close"},
:body "",
:request-time 9,
:trace-redirects
["http://localhost:4243/containers//stop"],
:orig-content-encoding nil}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.