Skip to content

Commit

Permalink
Build setup
Browse files Browse the repository at this point in the history
  • Loading branch information
mefellows committed Aug 29, 2015
2 parents 94f837d + 6fae7b9 commit c094435
Show file tree
Hide file tree
Showing 4 changed files with 121 additions and 1 deletion.
27 changes: 26 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,26 @@
muck
# Compiled Object files, Static and Dynamic libs (Shared Objects)
bin
pkg
*.o
*.a
*.so

# Folders
_obj
_test

# Architecture specific extensions/prefixes
*.[568vq]
[568vq].out

*.cgo1.go
*.cgo2.c
_cgo_defun.c
_cgo_gotypes.go
_cgo_export.*

_testmain.go

*.exe
*.test
*.prof
22 changes: 22 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
The MIT License (MIT)

Copyright (c) 2015 Matt Fellows

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

43 changes: 43 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Muxy

Simulating real-world distributed system failures to improve resilience in your applications.

## Introduction

Muxy is a proxy that _mucks_ around with your system and application context, allowing you to simulate common failure scenarios from the perspective of an application under test - such as an API or a web application.

If you are building a distributed system, Muxy can help you test your resilience and fault tolerance patterns

## Installation

Download a [release](https://github.com/mefellows/muxy/releases) for your platform
and put it somewhere on the `PATH`.

### On Mac OSX using Homebrew

If you are using [Homebrew](http://brew.sh) you can follow these steps to install Muck:

```bash
brew install https://raw.githubusercontent.com/mefellows/muxy/master/scripts/muxy.rb
```

### Using Go Get

```
go get github.com/mefellows/muxy
```

## Using Muxy

1. Create an application
2. Build in fault tolerence (e.g. using something like [Hystrix](https://github.com/Netflix/Hystrix))
3. Create integration tests
1. Run Muxy configuring a *proxy* such as HTTP, and one or more *symptom*s such as network latency, partition or HTTP error
2. Point your app at Muxy
3. Run tests and check if system behaved as expected
4. Profit!

### Notes

Muxy is a stateful system, and mucks with your low-level (system) networking interfaces and therefore cannot be run in parallel with other tests.
It is also recommended to run within a container/virtual machine to avoid unintended consequences (like breaking Internet access from the host).
30 changes: 30 additions & 0 deletions wercker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
box: tcnksm/gox
build:
steps:
- setup-go-workspace
- script:
name: go get
code: |
go get -t ./...
- script:
name: go test
code: |
make test
- script:
name: Publish Coveralls
code: goveralls -service="wercker.com" -coverprofile=profile.cov -repotoken $COVERALLS_TOKEN
- script:
name: gox build
code: |
XC_OS="linux darwin freebsd" XC_ARCH="386 amd64" make bin
- tcnksm/zip:
input: pkg
output: $WERCKER_OUTPUT_DIR/dist
deploy:
steps:
- tcnksm/ghr:
token: $GITHUB_TOKEN
version: $RELEASE_VERSION
input: dist
replace: true
pre-release: $RELEASE_IS_DRAFT

0 comments on commit c094435

Please sign in to comment.