├── .dockerignore ├── .gitignore ├── Dockerfile ├── LICENSE ├── Makefile ├── README.md ├── confd ├── conf.d │ ├── chaos.toml │ ├── client.toml │ ├── conformity.toml │ ├── janitor.toml │ ├── log4j.toml │ ├── simianarmy.toml │ └── volumeTagging.toml └── templates │ ├── chaos.properties.tmpl │ ├── client.properties.tmpl │ ├── conformity.properties.tmpl │ ├── janitor.properties.tmpl │ ├── log4j.properties.tmpl │ ├── simianarmy.properties.tmpl │ └── volumeTagging.properties.tmpl ├── docs ├── api.md ├── configuration-properties.md ├── configuration.md ├── notifications.md └── usage.md └── entrypoint.sh /.dockerignore: -------------------------------------------------------------------------------- 1 | .git 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .project 2 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM openjdk:8-alpine 2 | 3 | MAINTAINER Mathias Lafeldt 4 | 5 | ENV SIMIANARMY_VERSION v2.5.3 6 | ENV CONFD_VERSION 0.16.0 7 | 8 | WORKDIR /simianarmy 9 | 10 | RUN apk update \ 11 | && apk upgrade \ 12 | && apk add bash curl git \ 13 | && git clone git://github.com/Netflix/SimianArmy.git . \ 14 | && git checkout -qf $SIMIANARMY_VERSION \ 15 | && ./gradlew build --no-daemon \ 16 | && curl -fsSL https://github.com/kelseyhightower/confd/releases/download/v${CONFD_VERSION}/confd-${CONFD_VERSION}-linux-amd64 -o /usr/local/bin/confd \ 17 | && chmod +x /usr/local/bin/confd 18 | 19 | COPY confd/ /etc/confd 20 | 21 | COPY entrypoint.sh / 22 | ENTRYPOINT ["/entrypoint.sh"] 23 | 24 | EXPOSE 8080 25 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Mozilla Public License, version 2.0 2 | 3 | 1. Definitions 4 | 5 | 1.1. “Contributor” 6 | 7 | means each individual or legal entity that creates, contributes to the 8 | creation of, or owns Covered Software. 9 | 10 | 1.2. “Contributor Version” 11 | 12 | means the combination of the Contributions of others (if any) used by a 13 | Contributor and that particular Contributor’s Contribution. 14 | 15 | 1.3. “Contribution” 16 | 17 | means Covered Software of a particular Contributor. 18 | 19 | 1.4. “Covered Software” 20 | 21 | means Source Code Form to which the initial Contributor has attached the 22 | notice in Exhibit A, the Executable Form of such Source Code Form, and 23 | Modifications of such Source Code Form, in each case including portions 24 | thereof. 25 | 26 | 1.5. “Incompatible With Secondary Licenses” 27 | means 28 | 29 | a. that the initial Contributor has attached the notice described in 30 | Exhibit B to the Covered Software; or 31 | 32 | b. that the Covered Software was made available under the terms of version 33 | 1.1 or earlier of the License, but not also under the terms of a 34 | Secondary License. 35 | 36 | 1.6. “Executable Form” 37 | 38 | means any form of the work other than Source Code Form. 39 | 40 | 1.7. “Larger Work” 41 | 42 | means a work that combines Covered Software with other material, in a separate 43 | file or files, that is not Covered Software. 44 | 45 | 1.8. “License” 46 | 47 | means this document. 48 | 49 | 1.9. “Licensable” 50 | 51 | means having the right to grant, to the maximum extent possible, whether at the 52 | time of the initial grant or subsequently, any and all of the rights conveyed by 53 | this License. 54 | 55 | 1.10. “Modifications” 56 | 57 | means any of the following: 58 | 59 | a. any file in Source Code Form that results from an addition to, deletion 60 | from, or modification of the contents of Covered Software; or 61 | 62 | b. any new file in Source Code Form that contains any Covered Software. 63 | 64 | 1.11. “Patent Claims” of a Contributor 65 | 66 | means any patent claim(s), including without limitation, method, process, 67 | and apparatus claims, in any patent Licensable by such Contributor that 68 | would be infringed, but for the grant of the License, by the making, 69 | using, selling, offering for sale, having made, import, or transfer of 70 | either its Contributions or its Contributor Version. 71 | 72 | 1.12. “Secondary License” 73 | 74 | means either the GNU General Public License, Version 2.0, the GNU Lesser 75 | General Public License, Version 2.1, the GNU Affero General Public 76 | License, Version 3.0, or any later versions of those licenses. 77 | 78 | 1.13. “Source Code Form” 79 | 80 | means the form of the work preferred for making modifications. 81 | 82 | 1.14. “You” (or “Your”) 83 | 84 | means an individual or a legal entity exercising rights under this 85 | License. For legal entities, “You” includes any entity that controls, is 86 | controlled by, or is under common control with You. For purposes of this 87 | definition, “control” means (a) the power, direct or indirect, to cause 88 | the direction or management of such entity, whether by contract or 89 | otherwise, or (b) ownership of more than fifty percent (50%) of the 90 | outstanding shares or beneficial ownership of such entity. 91 | 92 | 93 | 2. License Grants and Conditions 94 | 95 | 2.1. Grants 96 | 97 | Each Contributor hereby grants You a world-wide, royalty-free, 98 | non-exclusive license: 99 | 100 | a. under intellectual property rights (other than patent or trademark) 101 | Licensable by such Contributor to use, reproduce, make available, 102 | modify, display, perform, distribute, and otherwise exploit its 103 | Contributions, either on an unmodified basis, with Modifications, or as 104 | part of a Larger Work; and 105 | 106 | b. under Patent Claims of such Contributor to make, use, sell, offer for 107 | sale, have made, import, and otherwise transfer either its Contributions 108 | or its Contributor Version. 109 | 110 | 2.2. Effective Date 111 | 112 | The licenses granted in Section 2.1 with respect to any Contribution become 113 | effective for each Contribution on the date the Contributor first distributes 114 | such Contribution. 115 | 116 | 2.3. Limitations on Grant Scope 117 | 118 | The licenses granted in this Section 2 are the only rights granted under this 119 | License. No additional rights or licenses will be implied from the distribution 120 | or licensing of Covered Software under this License. Notwithstanding Section 121 | 2.1(b) above, no patent license is granted by a Contributor: 122 | 123 | a. for any code that a Contributor has removed from Covered Software; or 124 | 125 | b. for infringements caused by: (i) Your and any other third party’s 126 | modifications of Covered Software, or (ii) the combination of its 127 | Contributions with other software (except as part of its Contributor 128 | Version); or 129 | 130 | c. under Patent Claims infringed by Covered Software in the absence of its 131 | Contributions. 132 | 133 | This License does not grant any rights in the trademarks, service marks, or 134 | logos of any Contributor (except as may be necessary to comply with the 135 | notice requirements in Section 3.4). 136 | 137 | 2.4. Subsequent Licenses 138 | 139 | No Contributor makes additional grants as a result of Your choice to 140 | distribute the Covered Software under a subsequent version of this License 141 | (see Section 10.2) or under the terms of a Secondary License (if permitted 142 | under the terms of Section 3.3). 143 | 144 | 2.5. Representation 145 | 146 | Each Contributor represents that the Contributor believes its Contributions 147 | are its original creation(s) or it has sufficient rights to grant the 148 | rights to its Contributions conveyed by this License. 149 | 150 | 2.6. Fair Use 151 | 152 | This License is not intended to limit any rights You have under applicable 153 | copyright doctrines of fair use, fair dealing, or other equivalents. 154 | 155 | 2.7. Conditions 156 | 157 | Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in 158 | Section 2.1. 159 | 160 | 161 | 3. Responsibilities 162 | 163 | 3.1. Distribution of Source Form 164 | 165 | All distribution of Covered Software in Source Code Form, including any 166 | Modifications that You create or to which You contribute, must be under the 167 | terms of this License. You must inform recipients that the Source Code Form 168 | of the Covered Software is governed by the terms of this License, and how 169 | they can obtain a copy of this License. You may not attempt to alter or 170 | restrict the recipients’ rights in the Source Code Form. 171 | 172 | 3.2. Distribution of Executable Form 173 | 174 | If You distribute Covered Software in Executable Form then: 175 | 176 | a. such Covered Software must also be made available in Source Code Form, 177 | as described in Section 3.1, and You must inform recipients of the 178 | Executable Form how they can obtain a copy of such Source Code Form by 179 | reasonable means in a timely manner, at a charge no more than the cost 180 | of distribution to the recipient; and 181 | 182 | b. You may distribute such Executable Form under the terms of this License, 183 | or sublicense it under different terms, provided that the license for 184 | the Executable Form does not attempt to limit or alter the recipients’ 185 | rights in the Source Code Form under this License. 186 | 187 | 3.3. Distribution of a Larger Work 188 | 189 | You may create and distribute a Larger Work under terms of Your choice, 190 | provided that You also comply with the requirements of this License for the 191 | Covered Software. If the Larger Work is a combination of Covered Software 192 | with a work governed by one or more Secondary Licenses, and the Covered 193 | Software is not Incompatible With Secondary Licenses, this License permits 194 | You to additionally distribute such Covered Software under the terms of 195 | such Secondary License(s), so that the recipient of the Larger Work may, at 196 | their option, further distribute the Covered Software under the terms of 197 | either this License or such Secondary License(s). 198 | 199 | 3.4. Notices 200 | 201 | You may not remove or alter the substance of any license notices (including 202 | copyright notices, patent notices, disclaimers of warranty, or limitations 203 | of liability) contained within the Source Code Form of the Covered 204 | Software, except that You may alter any license notices to the extent 205 | required to remedy known factual inaccuracies. 206 | 207 | 3.5. Application of Additional Terms 208 | 209 | You may choose to offer, and to charge a fee for, warranty, support, 210 | indemnity or liability obligations to one or more recipients of Covered 211 | Software. However, You may do so only on Your own behalf, and not on behalf 212 | of any Contributor. You must make it absolutely clear that any such 213 | warranty, support, indemnity, or liability obligation is offered by You 214 | alone, and You hereby agree to indemnify every Contributor for any 215 | liability incurred by such Contributor as a result of warranty, support, 216 | indemnity or liability terms You offer. You may include additional 217 | disclaimers of warranty and limitations of liability specific to any 218 | jurisdiction. 219 | 220 | 4. Inability to Comply Due to Statute or Regulation 221 | 222 | If it is impossible for You to comply with any of the terms of this License 223 | with respect to some or all of the Covered Software due to statute, judicial 224 | order, or regulation then You must: (a) comply with the terms of this License 225 | to the maximum extent possible; and (b) describe the limitations and the code 226 | they affect. Such description must be placed in a text file included with all 227 | distributions of the Covered Software under this License. Except to the 228 | extent prohibited by statute or regulation, such description must be 229 | sufficiently detailed for a recipient of ordinary skill to be able to 230 | understand it. 231 | 232 | 5. Termination 233 | 234 | 5.1. The rights granted under this License will terminate automatically if You 235 | fail to comply with any of its terms. However, if You become compliant, 236 | then the rights granted under this License from a particular Contributor 237 | are reinstated (a) provisionally, unless and until such Contributor 238 | explicitly and finally terminates Your grants, and (b) on an ongoing basis, 239 | if such Contributor fails to notify You of the non-compliance by some 240 | reasonable means prior to 60 days after You have come back into compliance. 241 | Moreover, Your grants from a particular Contributor are reinstated on an 242 | ongoing basis if such Contributor notifies You of the non-compliance by 243 | some reasonable means, this is the first time You have received notice of 244 | non-compliance with this License from such Contributor, and You become 245 | compliant prior to 30 days after Your receipt of the notice. 246 | 247 | 5.2. If You initiate litigation against any entity by asserting a patent 248 | infringement claim (excluding declaratory judgment actions, counter-claims, 249 | and cross-claims) alleging that a Contributor Version directly or 250 | indirectly infringes any patent, then the rights granted to You by any and 251 | all Contributors for the Covered Software under Section 2.1 of this License 252 | shall terminate. 253 | 254 | 5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user 255 | license agreements (excluding distributors and resellers) which have been 256 | validly granted by You or Your distributors under this License prior to 257 | termination shall survive termination. 258 | 259 | 6. Disclaimer of Warranty 260 | 261 | Covered Software is provided under this License on an “as is” basis, without 262 | warranty of any kind, either expressed, implied, or statutory, including, 263 | without limitation, warranties that the Covered Software is free of defects, 264 | merchantable, fit for a particular purpose or non-infringing. The entire 265 | risk as to the quality and performance of the Covered Software is with You. 266 | Should any Covered Software prove defective in any respect, You (not any 267 | Contributor) assume the cost of any necessary servicing, repair, or 268 | correction. This disclaimer of warranty constitutes an essential part of this 269 | License. No use of any Covered Software is authorized under this License 270 | except under this disclaimer. 271 | 272 | 7. Limitation of Liability 273 | 274 | Under no circumstances and under no legal theory, whether tort (including 275 | negligence), contract, or otherwise, shall any Contributor, or anyone who 276 | distributes Covered Software as permitted above, be liable to You for any 277 | direct, indirect, special, incidental, or consequential damages of any 278 | character including, without limitation, damages for lost profits, loss of 279 | goodwill, work stoppage, computer failure or malfunction, or any and all 280 | other commercial damages or losses, even if such party shall have been 281 | informed of the possibility of such damages. This limitation of liability 282 | shall not apply to liability for death or personal injury resulting from such 283 | party’s negligence to the extent applicable law prohibits such limitation. 284 | Some jurisdictions do not allow the exclusion or limitation of incidental or 285 | consequential damages, so this exclusion and limitation may not apply to You. 286 | 287 | 8. Litigation 288 | 289 | Any litigation relating to this License may be brought only in the courts of 290 | a jurisdiction where the defendant maintains its principal place of business 291 | and such litigation shall be governed by laws of that jurisdiction, without 292 | reference to its conflict-of-law provisions. Nothing in this Section shall 293 | prevent a party’s ability to bring cross-claims or counter-claims. 294 | 295 | 9. Miscellaneous 296 | 297 | This License represents the complete agreement concerning the subject matter 298 | hereof. If any provision of this License is held to be unenforceable, such 299 | provision shall be reformed only to the extent necessary to make it 300 | enforceable. Any law or regulation which provides that the language of a 301 | contract shall be construed against the drafter shall not be used to construe 302 | this License against a Contributor. 303 | 304 | 305 | 10. Versions of the License 306 | 307 | 10.1. New Versions 308 | 309 | Mozilla Foundation is the license steward. Except as provided in Section 310 | 10.3, no one other than the license steward has the right to modify or 311 | publish new versions of this License. Each version will be given a 312 | distinguishing version number. 313 | 314 | 10.2. Effect of New Versions 315 | 316 | You may distribute the Covered Software under the terms of the version of 317 | the License under which You originally received the Covered Software, or 318 | under the terms of any subsequent version published by the license 319 | steward. 320 | 321 | 10.3. Modified Versions 322 | 323 | If you create software not governed by this License, and you want to 324 | create a new license for such software, you may create and use a modified 325 | version of this License if you rename the license and remove any 326 | references to the name of the license steward (except to note that such 327 | modified license differs from this License). 328 | 329 | 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses 330 | If You choose to distribute Source Code Form that is Incompatible With 331 | Secondary Licenses under the terms of this version of the License, the 332 | notice described in Exhibit B of this License must be attached. 333 | 334 | Exhibit A - Source Code Form License Notice 335 | 336 | This Source Code Form is subject to the 337 | terms of the Mozilla Public License, v. 338 | 2.0. If a copy of the MPL was not 339 | distributed with this file, You can 340 | obtain one at 341 | http://mozilla.org/MPL/2.0/. 342 | 343 | If it is not possible or desirable to put the notice in a particular file, then 344 | You may include the notice in a location (such as a LICENSE file in a relevant 345 | directory) where a recipient would be likely to look for such a notice. 346 | 347 | You may add additional accurate notices of copyright ownership. 348 | 349 | Exhibit B - “Incompatible With Secondary Licenses” Notice 350 | 351 | This Source Code Form is “Incompatible 352 | With Secondary Licenses”, as defined by 353 | the Mozilla Public License, v. 2.0. 354 | 355 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | IMAGE := mlafeldt/simianarmy 2 | 3 | CHAOS_ASG_ENABLED := false 4 | CHAOS_LEASHED := true 5 | 6 | ENV := -e CONFD_OPTS="$(CONFD_OPTS)" \ 7 | -e SIMIANARMY_CLIENT_AWS_ACCOUNTKEY=$(AWS_ACCESS_KEY_ID) \ 8 | -e SIMIANARMY_CLIENT_AWS_SECRETKEY=$(AWS_SECRET_ACCESS_KEY) \ 9 | -e SIMIANARMY_CLIENT_AWS_REGION=$(AWS_REGION) \ 10 | -e SIMIANARMY_CLIENT_LOCALDB_ENABLED=true \ 11 | -e SIMIANARMY_CALENDAR_ISMONKEYTIME=true \ 12 | -e SIMIANARMY_CHAOS_ASG_ENABLED=$(CHAOS_ASG_ENABLED) \ 13 | -e SIMIANARMY_CHAOS_LEASHED=$(CHAOS_LEASHED) \ 14 | -e SIMIANARMY_CHAOS_TERMINATEONDEMAND_ENABLED=true 15 | 16 | build: 17 | docker build --force-rm -t $(IMAGE) . 18 | 19 | rebuild: 20 | docker build --pull --no-cache --force-rm -t $(IMAGE) . 21 | 22 | run: build 23 | docker run -it --rm -p 8080:8080 $(ENV) $(IMAGE) 24 | 25 | # For debugging. 26 | shell: build 27 | docker run -it --rm -p 8080:8080 $(ENV) $(IMAGE) /bin/bash 28 | 29 | # Mount checkout of Simian Army for local development. Set SIMIANARMY_CHECKOUT 30 | # to the directory where the Git repo is checked out. Inside the container, run 31 | # /entrypoint.sh to start the server. 32 | dev: build 33 | docker run -it --rm -p 8080:8080 \ 34 | -v "$(SIMIANARMY_CHECKOUT)/src:/simianarmy/src" \ 35 | $(ENV) $(IMAGE) /bin/bash 36 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # The Simian Army - Docker Edition 2 | 3 | [![](https://images.microbadger.com/badges/image/mlafeldt/simianarmy.svg)](https://microbadger.com/images/mlafeldt/simianarmy) 4 | [![](https://img.shields.io/docker/pulls/mlafeldt/simianarmy.svg?maxAge=604800)](https://hub.docker.com/r/mlafeldt/simianarmy/) 5 | 6 | This project provides a highly configurable Docker image of the [Simian Army](https://github.com/Netflix/SimianArmy) as a sound basis for [automating chaos experiments](https://medium.com/production-ready/chaos-monkey-for-fun-and-profit-87e2f343db31). 7 | 8 | > The Simian Army is a suite of tools for keeping your cloud operating in top form. Chaos Monkey, the first member, is a resiliency tool that helps ensure that your applications can tolerate random instance failures 9 | 10 | ## Quick Start 11 | 12 | As an example, this command will start a Docker container running the Simian Army and instruct Chaos Monkey to consider all auto scaling groups (ASGs) in the given AWS account for termination: 13 | 14 | ```bash 15 | docker run -d \ 16 | -e SIMIANARMY_CLIENT_AWS_ACCOUNTKEY=$AWS_ACCESS_KEY_ID \ 17 | -e SIMIANARMY_CLIENT_AWS_SECRETKEY=$AWS_SECRET_ACCESS_KEY \ 18 | -e SIMIANARMY_CLIENT_AWS_REGION=$AWS_REGION \ 19 | -e SIMIANARMY_CALENDAR_ISMONKEYTIME=true \ 20 | -e SIMIANARMY_CHAOS_ASG_ENABLED=true \ 21 | mlafeldt/simianarmy 22 | ``` 23 | 24 | This example is safe to run as Chaos Monkey will operate in dry-run mode by default. It's a good way for getting a feeling of the application without taking a risk. 25 | 26 | The second example is more realistic. This time, Chaos Monkey will randomly terminate instances of the auto scaling groups tagged with a specific key-value pair: 27 | 28 | ```bash 29 | docker run -d \ 30 | -e SIMIANARMY_CLIENT_AWS_ACCOUNTKEY=$AWS_ACCESS_KEY_ID \ 31 | -e SIMIANARMY_CLIENT_AWS_SECRETKEY=$AWS_SECRET_ACCESS_KEY \ 32 | -e SIMIANARMY_CLIENT_AWS_REGION=$AWS_REGION \ 33 | -e SIMIANARMY_CALENDAR_ISMONKEYTIME=true \ 34 | -e SIMIANARMY_CHAOS_ASG_ENABLED=true \ 35 | -e SIMIANARMY_CHAOS_ASGTAG_KEY=chaos_monkey \ 36 | -e SIMIANARMY_CHAOS_ASGTAG_VALUE=true \ 37 | -e SIMIANARMY_CHAOS_LEASHED=false \ 38 | mlafeldt/simianarmy 39 | ``` 40 | 41 | Note that this command will actually *unleash* the monkey. But don't worry: you still need to tag your ASGs accordingly for any instances to be killed. 42 | 43 | There are many more configuration settings you can pass to the Docker image, including ones to control frequency, probability, and type of terminations. Also, you can (and should) configure Chaos Monkey to send email notifications about terminations. I encourage you to read the following documentation to learn more. 44 | 45 | ## Documentation 46 | 47 | * [Usage](https://github.com/mlafeldt/docker-simianarmy/blob/master/docs/usage.md) 48 | * [Configuration](https://github.com/mlafeldt/docker-simianarmy/blob/master/docs/configuration.md) 49 | * [Configuration Properties](https://github.com/mlafeldt/docker-simianarmy/blob/master/docs/configuration-properties.md) 50 | * [Notifications](https://github.com/mlafeldt/docker-simianarmy/blob/master/docs/notifications.md) 51 | * [REST API](https://github.com/mlafeldt/docker-simianarmy/blob/master/docs/api.md) 52 | 53 | ## Author 54 | 55 | This project is being developed by [Mathias Lafeldt](https://twitter.com/mlafeldt). 56 | -------------------------------------------------------------------------------- /confd/conf.d/chaos.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "chaos.properties.tmpl" 3 | dest = "/simianarmy/src/main/resources/chaos.properties" 4 | keys = [ 5 | "/simianarmy", 6 | ] 7 | -------------------------------------------------------------------------------- /confd/conf.d/client.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "client.properties.tmpl" 3 | dest = "/simianarmy/src/main/resources/client.properties" 4 | keys = [ 5 | "/simianarmy", 6 | ] 7 | -------------------------------------------------------------------------------- /confd/conf.d/conformity.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "conformity.properties.tmpl" 3 | dest = "/simianarmy/src/main/resources/conformity.properties" 4 | -------------------------------------------------------------------------------- /confd/conf.d/janitor.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "janitor.properties.tmpl" 3 | dest = "/simianarmy/src/main/resources/janitor.properties" 4 | keys = [ 5 | "/simianarmy", 6 | ] -------------------------------------------------------------------------------- /confd/conf.d/log4j.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "log4j.properties.tmpl" 3 | dest = "/simianarmy/src/main/resources/log4j.properties" 4 | -------------------------------------------------------------------------------- /confd/conf.d/simianarmy.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "simianarmy.properties.tmpl" 3 | dest = "/simianarmy/src/main/resources/simianarmy.properties" 4 | keys = [ 5 | "/simianarmy", 6 | ] 7 | -------------------------------------------------------------------------------- /confd/conf.d/volumeTagging.toml: -------------------------------------------------------------------------------- 1 | [template] 2 | src = "volumeTagging.properties.tmpl" 3 | dest = "/simianarmy/src/main/resources/volumeTagging.properties" 4 | -------------------------------------------------------------------------------- /confd/templates/chaos.properties.tmpl: -------------------------------------------------------------------------------- 1 | # 2 | # Chaos Monkey Properties 3 | # See https://github.com/Netflix/SimianArmy/wiki/Chaos-Settings 4 | # and https://github.com/Netflix/SimianArmy/wiki/The-Chaos-Monkey-Army 5 | # vim: ft=jproperties 6 | # 7 | 8 | simianarmy.chaos.enabled = {{getv "/simianarmy/chaos/enabled" "true"}} 9 | simianarmy.chaos.leashed = {{getv "/simianarmy/chaos/leashed" "true"}} 10 | simianarmy.chaos.burnmoney = {{getv "/simianarmy/chaos/burnmoney" "false"}} 11 | simianarmy.chaos.terminateOndemand.enabled = {{getv "/simianarmy/chaos/terminateondemand/enabled" "false"}} 12 | 13 | simianarmy.chaos.mandatoryTermination.enabled = {{getv "/simianarmy/chaos/mandatorytermination/enabled" "false"}} 14 | {{if exists "/simianarmy/chaos/mandatorytermination/windowindays" -}} 15 | simianarmy.chaos.mandatoryTermination.windowInDays = {{getv "/simianarmy/chaos/mandatorytermination/windowindays"}} 16 | {{end -}} 17 | {{if exists "/simianarmy/chaos/mandatorytermination/defaultprobability" -}} 18 | simianarmy.chaos.mandatoryTermination.defaultProbability = {{getv "/simianarmy/chaos/mandatorytermination/defaultprobability"}} 19 | {{end -}} 20 | 21 | simianarmy.chaos.ASG.enabled = {{getv "/simianarmy/chaos/asg/enabled" "false"}} 22 | simianarmy.chaos.ASG.probability = {{getv "/simianarmy/chaos/asg/probability" "1.0"}} 23 | simianarmy.chaos.ASG.maxTerminationsPerDay = {{getv "/simianarmy/chaos/asg/maxterminationsperday" "1.0"}} 24 | {{if exists "/simianarmy/chaos/asgtag/key" -}} 25 | simianarmy.chaos.ASGtag.key = {{getv "/simianarmy/chaos/asgtag/key"}} 26 | {{end -}} 27 | {{if exists "/simianarmy/chaos/asgtag/value" -}} 28 | simianarmy.chaos.ASGtag.value = {{getv "/simianarmy/chaos/asgtag/value"}} 29 | {{end -}} 30 | 31 | simianarmy.chaos.shutdowninstance.enabled = {{getv "/simianarmy/chaos/shutdowninstance/enabled" "true"}} 32 | simianarmy.chaos.blockallnetworktraffic.enabled = {{getv "/simianarmy/chaos/blockallnetworktraffic/enabled" "false"}} 33 | simianarmy.chaos.detachvolumes.enabled = {{getv "/simianarmy/chaos/detachvolumes/enabled" "false"}} 34 | simianarmy.chaos.burncpu.enabled = {{getv "/simianarmy/chaos/burncpu/enabled" "false"}} 35 | simianarmy.chaos.burnio.enabled = {{getv "/simianarmy/chaos/burnio/enabled" "false"}} 36 | simianarmy.chaos.killprocesses.enabled = {{getv "/simianarmy/chaos/killprocesses/enabled" "false"}} 37 | simianarmy.chaos.nullroute.enabled = {{getv "/simianarmy/chaos/nullroute/enabled" "false"}} 38 | simianarmy.chaos.failec2.enabled = {{getv "/simianarmy/chaos/failec2/enabled" "false"}} 39 | simianarmy.chaos.faildns.enabled = {{getv "/simianarmy/chaos/faildns/enabled" "false"}} 40 | simianarmy.chaos.faildynamodb.enabled = {{getv "/simianarmy/chaos/faildynamodb/enabled" "false"}} 41 | simianarmy.chaos.fails3.enabled = {{getv "/simianarmy/chaos/fails3/enabled" "false"}} 42 | simianarmy.chaos.filldisk.enabled = {{getv "/simianarmy/chaos/filldisk/enabled" "false"}} 43 | simianarmy.chaos.networkcorruption.enabled = {{getv "/simianarmy/chaos/networkcorruption/enabled" "false"}} 44 | simianarmy.chaos.networklatency.enabled = {{getv "/simianarmy/chaos/networklatency/enabled" "false"}} 45 | simianarmy.chaos.networkloss.enabled = {{getv "/simianarmy/chaos/networkloss/enabled" "false"}} 46 | 47 | simianarmy.chaos.notification.global.enabled = {{getv "/simianarmy/chaos/notification/global/enabled" "false"}} 48 | {{if exists "/simianarmy/chaos/notification/sourceemail" -}} 49 | simianarmy.chaos.notification.sourceEmail = {{getv "/simianarmy/chaos/notification/sourceemail"}} 50 | {{end -}} 51 | {{if exists "/simianarmy/chaos/notification/receiveremail" -}} 52 | simianarmy.chaos.notification.global.receiverEmail = {{getv "/simianarmy/chaos/notification/receiveremail"}} 53 | {{end -}} 54 | -------------------------------------------------------------------------------- /confd/templates/client.properties.tmpl: -------------------------------------------------------------------------------- 1 | # 2 | # Client Properties 3 | # See https://github.com/Netflix/SimianArmy/wiki/Client-Settings 4 | # vim: ft=jproperties 5 | # 6 | 7 | {{if exists "/simianarmy/client/aws/accountkey" -}} 8 | simianarmy.client.aws.accountKey = {{getv "/simianarmy/client/aws/accountkey"}} 9 | {{end -}} 10 | {{if exists "/simianarmy/client/aws/secretkey" -}} 11 | simianarmy.client.aws.secretKey = {{getv "/simianarmy/client/aws/secretkey"}} 12 | {{end -}} 13 | {{if exists "/simianarmy/client/aws/region" -}} 14 | simianarmy.client.aws.region = {{getv "/simianarmy/client/aws/region"}} 15 | {{end -}} 16 | {{if exists "/simianarmy/client/aws/assumerolearn" -}} 17 | simianarmy.client.aws.assumeRoleArn = {{getv "/simianarmy/client/aws/assumerolearn"}} 18 | {{end -}} 19 | {{if exists "/simianarmy/client/aws/accountname" -}} 20 | simianarmy.client.aws.accountName = {{getv "/simianarmy/client/aws/accountname"}} 21 | {{end -}} 22 | {{if exists "/simianarmy/client/aws/proxyhost" -}} 23 | simianarmy.client.aws.proxyHost = {{getv "/simianarmy/client/aws/proxyhost"}} 24 | {{end -}} 25 | {{if exists "/simianarmy/client/aws/proxyport" -}} 26 | simianarmy.client.aws.proxyPort = {{getv "/simianarmy/client/aws/proxyport"}} 27 | {{end -}} 28 | {{if exists "/simianarmy/client/aws/proxyuser" -}} 29 | simianarmy.client.aws.proxyUser = {{getv "/simianarmy/client/aws/proxyuser"}} 30 | {{end -}} 31 | {{if exists "/simianarmy/client/aws/proxypassword" -}} 32 | simianarmy.client.aws.proxyPassword = {{getv "/simianarmy/client/aws/proxypassword"}} 33 | {{end -}} 34 | 35 | {{if eq (getv "/simianarmy/client/localdb/enabled" "false") "true" -}} 36 | simianarmy.client.recorder.class = com.netflix.simianarmy.basic.LocalDbRecorder 37 | {{end -}} 38 | {{if eq (getv "/simianarmy/client/cloudformationmode/enabled" "false") "true" -}} 39 | simianarmy.client.chaos.class = com.netflix.simianarmy.basic.chaos.CloudFormationChaosMonkey 40 | {{end -}} 41 | -------------------------------------------------------------------------------- /confd/templates/conformity.properties.tmpl: -------------------------------------------------------------------------------- 1 | # Disable Conformity Monkey 2 | simianarmy.conformity.enabled = false 3 | -------------------------------------------------------------------------------- /confd/templates/janitor.properties.tmpl: -------------------------------------------------------------------------------- 1 | # see documentation at: 2 | # https://github.com/Netflix/SimianArmy/wiki/Configuration 3 | 4 | simianarmy.janitor.enabled = {{getv "/simianarmy/janitor/enabled" "false"}} 5 | 6 | simianarmy.janitor.leashed = {{getv "/simianarmy/janitor/leashed" "true"}} 7 | 8 | simianarmy.janitor.resources.sdb.domain = {{getv "/simianarmy/janitor/resources/sdb/domain" "SIMIAN_ARMY"}} 9 | 10 | {{if exists "/simianarmy/calendar/ismonkeytime" -}} 11 | simianarmy.calendar.isMonkeyTime = {{getv "/simianarmy/calendar/ismonkeytime" "true"}} 12 | {{end -}} 13 | 14 | simianarmy.janitor.enabledResources = {{getv "/simianarmy/janitor/enabledresources" "Instance, ASG, EBS_Volume, EBS_Snapshot, Launch_Config"}} 15 | 16 | simianarmy.janitor.notification.sourceEmail = {{getv "/simianarmy/janitor/notification/sourceemail" "foo@bar.com"}} 17 | 18 | simianarmy.janitor.summaryEmail.to = {{getv "/simianarmy/janitor/summaryemail/to" "foo@bar.com"}} 19 | 20 | simianarmy.janitor.notification.defaultEmail = {{getv "/simianarmy/janitor/notification/defaultemail" "foo@bar.com"}} 21 | 22 | simianarmy.janitor.notification.daysBeforeTermination = {{getv "/simianarmy/janitor/notification/daysbeforetermination" "2"}} 23 | 24 | {{if exists "/simianarmy/janitor/snapshots/ownerid" -}} 25 | simianarmy.janitor.snapshots.ownerId = {{getv "/simianarmy/janitor/snapshots/ownerid" "012345678"}} 26 | {{end -}} 27 | 28 | simianarmy.janitor.rule.orphanedInstanceRule.enabled = {{getv "/simianarmy/janitor/rule/orphanedinstancerule/enabled" "true"}} 29 | simianarmy.janitor.rule.orphanedInstanceRule.instanceAgeThreshold = {{getv "/simianarmy/janitor/rule/orphanedinstancerule/instanceagethreshold" "2"}} 30 | simianarmy.janitor.rule.orphanedInstanceRule.retentionDaysWithOwner = {{getv "/simianarmy/janitor/rule/orphanedinstancerule/retentiondayswithowner" "3"}} 31 | simianarmy.janitor.rule.orphanedInstanceRule.retentionDaysWithoutOwner = {{getv "/simianarmy/janitor/rule/orphanedinstancerule/retentiondayswithoutowner" "8"}} 32 | simianarmy.janitor.rule.orphanedInstanceRule.opsworks.parentage = {{getv "/simianarmy/janitor/rule/orphanedinstancerule/opsworks/parentage" "false"}} 33 | 34 | simianarmy.janitor.rule.untaggedRule.enabled = {{getv "/simianarmy/janitor/rule/untaggedrule/enabled" "false"}} 35 | simianarmy.janitor.rule.untaggedRule.requiredTags = {{getv "/simianarmy/janitor/rule/untaggedrule/requiredtags" "owner, purpose, project"}} 36 | simianarmy.janitor.rule.untaggedRule.resources = {{getv "/simianarmy/janitor/rule/untaggedrule/resources" "Instance, ASG, EBS_Volume, EBS_Snapshot"}} 37 | simianarmy.janitor.rule.untaggedRule.retentionDaysWithOwner = {{getv "/simianarmy/janitor/rule/untaggedrule/retentiondayswithowner" "2"}} 38 | simianarmy.janitor.rule.untaggedRule.retentionDaysWithoutOwner = {{getv "/simianarmy/janitor/rule/untaggedrule/retentiondayswithoutowner" "2"}} 39 | 40 | simianarmy.janitor.rule.oldDetachedVolumeRule.enabled = {{getv "/simianarmy/janitor/rule/olddetachedvolumerule/enabled" "true"}} 41 | simianarmy.janitor.rule.oldDetachedVolumeRule.detachDaysThreshold = {{getv "/simianarmy/janitor/rule/olddetachedvolumerule/detachdaysthreshold" "30"}} 42 | simianarmy.janitor.rule.oldDetachedVolumeRule.retentionDays = {{getv "/simianarmy/janitor/rule/olddetachedvolumerule/retentiondays" "7"}} 43 | 44 | simianarmy.janitor.rule.deleteOnTerminationRule.enabled = {{getv "/simianarmy/janitor/rule/deleteonterminationrule/enabled" "true"}} 45 | simianarmy.janitor.rule.deleteOnTerminationRule.retentionDays = {{getv "/simianarmy/janitor/rule/deleteonterminationrule/retentiondays" "3"}} 46 | 47 | simianarmy.janitor.rule.noGeneratedAMIRule.enabled = {{getv "/simianarmy/janitor/rule/nogeneratedamirule/enabled" "true"}} 48 | simianarmy.janitor.rule.noGeneratedAMIRule.ageThreshold = {{getv "/simianarmy/janitor/rule/nogeneratedamirule/agethreshold" "30"}} 49 | simianarmy.janitor.rule.noGeneratedAMIRule.retentionDays = {{getv "/simianarmy/janitor/rule/nogeneratedamirule/retentiondays" "7"}} 50 | 51 | simianarmy.janitor.rule.oldEmptyASGRule.enabled = {{getv "/simianarmy/janitor/rule/oldemptyasgrule/enabled" "true"}} 52 | simianarmy.janitor.rule.oldEmptyASGRule.launchConfigAgeThreshold = {{getv "/simianarmy/janitor/rule/oldemptyasgrule/launchconfigagethreshold" "50"}} 53 | simianarmy.janitor.rule.oldEmptyASGRule.retentionDays = {{getv "/simianarmy/janitor/rule/oldemptyasgrule/retentiondays" "10"}} 54 | 55 | simianarmy.janitor.rule.suspendedASGRule.enabled = {{getv "/simianarmy/janitor/rule/suspendedasgrule/enabled" "true"}} 56 | simianarmy.janitor.rule.suspendedASGRule.suspensionAgeThreshold = {{getv "/simianarmy/janitor/rule/suspendedasgrule/suspensionagethreshold" "2"}} 57 | simianarmy.janitor.rule.suspendedASGRule.retentionDays = {{getv "/simianarmy/janitor/rule/suspendedasgrule/retentiondays" "5"}} 58 | 59 | simianarmy.janitor.Eureka.enabled = {{getv "/simianarmy/janitor/eureka/enabled" "false"}} 60 | 61 | simianarmy.janitor.rule.oldUnusedLaunchConfigRule.enabled = {{getv "/simianarmy/janitor/rule/oldunusedlaunchconfigrule/enabled" "true"}} 62 | simianarmy.janitor.rule.oldUnusedLaunchConfigRule.ageThreshold = {{getv "/simianarmy/janitor/rule/oldunusedlaunchconfigrule/agethreshold" "4"}} 63 | simianarmy.janitor.rule.oldUnusedLaunchConfigRule.retentionDays = {{getv "/simianarmy/janitor/rule/oldunusedlaunchconfigrule/retentiondays" "3"}} 64 | 65 | simianarmy.janitor.image.crawler.lookBackDays = {{getv "/simianarmy/janitor/image/crawler/lookbackdays" "60"}} 66 | {{if exists "/simianarmy/janitor/image/ownerid" -}} 67 | simianarmy.janitor.image.ownerId = {{getv "/simianarmy/janitor/image/ownerid" "1234567890"}} 68 | {{end -}} 69 | 70 | simianarmy.janitor.rule.unusedImageRule.enabled = {{getv "/simianarmy/janitor/rule/unusedimagerule/enabled" "false"}} 71 | simianarmy.janitor.rule.unusedImageRule.lastReferenceDaysThreshold = {{getv "/simianarmy/janitor/rule/unusedimagerule/lastreferencedaysthreshold" "45"}} 72 | simianarmy.janitor.rule.unusedImageRule.retentionDays = {{getv "/simianarmy/janitor/rule/unusedimagerule/retentiondays" "3"}} 73 | 74 | {{if exists "/simianarmy/janitor/edda/enabled" -}} 75 | simianarmy.janitor.edda.enabled = {{getv "/simianarmy/janitor/edda/enabled" "true"}} 76 | {{end -}} 77 | {{if exists "/simianarmy/janitor/edda/endpoint/useast1" -}} 78 | simianarmy.janitor.edda.endpoint.us-east-1 = {{getv "/simianarmy/janitor/edda/endpoint/useast1" "http://localhost:8080"}} 79 | {{end -}} 80 | 81 | {{if exists "/simianarmy/janitor/edda/client/timeout" -}} 82 | simianarmy.janitor.edda.client.timeout = {{getv "/simianarmy/janitor/edda/client/timeout" "30000"}} 83 | {{end -}} 84 | {{if exists "/simianarmy/janitor/edda/client/retries" -}} 85 | simianarmy.janitor.edda.client.retries = {{getv "/simianarmy/janitor/edda/client/retries" "3"}} 86 | {{end -}} 87 | {{if exists "/simianarmy/janitor/edda/client/retryinterval" -}} 88 | simianarmy.janitor.edda.client.retryInterval = {{getv "/simianarmy/janitor/edda/client/retryinterval" "1000"}} 89 | {{end -}} 90 | 91 | {{if exists "/simianarmy/janitor/notification/owneremaildomain" -}} 92 | simianarmy.janitor.notification.ownerEmailDomain = {{getv "/simianarmy/janitor/notification/owneremaildomain" "bar.com"}} 93 | {{end -}} 94 | -------------------------------------------------------------------------------- /confd/templates/log4j.properties.tmpl: -------------------------------------------------------------------------------- 1 | log4j.rootLogger=INFO, stdout 2 | 3 | # stdout 4 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 5 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 6 | log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss.SSS} - %-5p %C{1} - [%F:%L] %m%n 7 | -------------------------------------------------------------------------------- /confd/templates/simianarmy.properties.tmpl: -------------------------------------------------------------------------------- 1 | # 2 | # Global Properties 3 | # See https://github.com/Netflix/SimianArmy/wiki/Global-Settings 4 | # vim: ft=jproperties 5 | # 6 | 7 | {{if exists "/simianarmy/recorder/sdb/domain" -}} 8 | simianarmy.recorder.sdb.domain = {{getv "/simianarmy/recorder/sdb/domain"}} 9 | {{end -}} 10 | {{if exists "/simianarmy/recorder/localdb/file" -}} 11 | simianarmy.recorder.localdb.file = {{getv "/simianarmy/recorder/localdb/file"}} 12 | {{end -}} 13 | {{if exists "/simianarmy/recorder/localdb/maxevents" -}} 14 | simianarmy.recorder.localdb.max_events = {{getv "/simianarmy/recorder/localdb/maxevents"}} 15 | {{end -}} 16 | {{if exists "/simianarmy/recorder/localdb/password" -}} 17 | simianarmy.recorder.localdb.password = {{getv "/simianarmy/recorder/localdb/password"}} 18 | {{end -}} 19 | 20 | simianarmy.scheduler.frequency = {{getv "/simianarmy/scheduler/frequency" "1"}} 21 | simianarmy.scheduler.frequencyUnit = {{getv "/simianarmy/scheduler/frequencyunit" "HOURS"}} 22 | simianarmy.scheduler.threads = {{getv "/simianarmy/scheduler/threads" "1"}} 23 | 24 | simianarmy.calendar.openHour = {{getv "/simianarmy/calendar/openhour" "9"}} 25 | simianarmy.calendar.closeHour = {{getv "/simianarmy/calendar/closehour" "15"}} 26 | simianarmy.calendar.timezone = {{getv "/simianarmy/calendar/timezone" "America/Los_Angeles"}} 27 | simianarmy.calendar.isMonkeyTime = {{getv "/simianarmy/calendar/ismonkeytime" "false"}} 28 | 29 | {{if exists "/simianarmy/tags/owner" -}} 30 | simianarmy.tags.owner = {{getv "/simianarmy/tags/owner"}} 31 | {{end -}} 32 | 33 | {{if exists "/simianarmy/aws/email/region" -}} 34 | simianarmy.aws.email.region = {{getv "/simianarmy/aws/email/region"}} 35 | {{end -}} 36 | -------------------------------------------------------------------------------- /confd/templates/volumeTagging.properties.tmpl: -------------------------------------------------------------------------------- 1 | # Disable VolumeTagging Monkey 2 | simianarmy.volumeTagging.enabled = false 3 | -------------------------------------------------------------------------------- /docs/api.md: -------------------------------------------------------------------------------- 1 | # REST API 2 | 3 | Chaos Monkey provides a [REST API](https://github.com/Netflix/SimianArmy/wiki/REST) that can be used to trigger and retrieve chaos events. 4 | 5 | In order to trigger chaos events via the API, you need to define the following configuration properties: 6 | 7 | | Key | Value | 8 | | --- | ----- | 9 | | /simianarmy/chaos/leashed | Must be `false` to unleash the monkey | 10 | | /simianarmy/chaos/terminateondemand/enabled | Must be `true` to enable on-demand termination | 11 | 12 | # Client 13 | 14 | [chaosmonkey](https://github.com/mlafeldt/chaosmonkey) provides both a Go library and a command-line tool to talk to the Chaos Monkey REST API. 15 | -------------------------------------------------------------------------------- /docs/configuration-properties.md: -------------------------------------------------------------------------------- 1 | # Configuration Properties 2 | 3 | What follows is an overview of all configuration properties you can set. See [Configuration](configuration.md) on how to pass properties to the Docker image. 4 | 5 | Properties marked with an asterisk (\*) are custom properties added by this Docker image to simplify configuration, e.g. to avoid having to configure long Java class names. 6 | 7 | ## Client Properties 8 | 9 | | Key | Default | 10 | | --- | ------- | 11 | | /simianarmy/client/aws/accountkey | | 12 | | /simianarmy/client/aws/secretkey | | 13 | | /simianarmy/client/aws/region | | 14 | | /simianarmy/client/aws/assumerolearn | | 15 | | /simianarmy/client/aws/accountname | | 16 | | /simianarmy/client/aws/proxyhost | | 17 | | /simianarmy/client/aws/proxyport | | 18 | | /simianarmy/client/aws/proxyuser | | 19 | | /simianarmy/client/aws/proxypassword | | 20 | | /simianarmy/client/localdb/enabled\* | false | 21 | | /simianarmy/client/cloudformationmode/enabled\* | false | 22 | 23 | See https://github.com/Netflix/SimianArmy/wiki/Client-Settings for a detailed description of the properties. 24 | 25 | ## Global Properties 26 | 27 | | Key | Default | 28 | | --- | ------- | 29 | | /simianarmy/recorder/sdb/domain | | 30 | | /simianarmy/recorder/localdb/file | | 31 | | /simianarmy/recorder/localdb/maxevents | | 32 | | /simianarmy/recorder/localdb/password | | 33 | | /simianarmy/scheduler/frequency | 1 | 34 | | /simianarmy/scheduler/frequencyunit | HOURS | 35 | | /simianarmy/scheduler/threads | 1 | 36 | | /simianarmy/calendar/openhour | 9 | 37 | | /simianarmy/calendar/closehour | 15 | 38 | | /simianarmy/calendar/timezone | America/Los_Angeles | 39 | | /simianarmy/calendar/ismonkeytime | false | 40 | | /simianarmy/tags/owner | | 41 | | /simianarmy/aws/email/region | | 42 | 43 | See https://github.com/Netflix/SimianArmy/wiki/Global-Settings for a detailed description of the properties. 44 | 45 | ## Chaos Monkey Properties 46 | 47 | | Key | Default | 48 | | --- | ------- | 49 | | /simianarmy/chaos/enabled | true | 50 | | /simianarmy/chaos/leashed | true | 51 | | /simianarmy/chaos/burnmoney | false | 52 | | /simianarmy/chaos/terminateondemand/enabled | false | 53 | | /simianarmy/chaos/mandatorytermination/enabled | false | 54 | | /simianarmy/chaos/mandatorytermination/windowindays | | 55 | | /simianarmy/chaos/mandatorytermination/defaultprobability | | 56 | | /simianarmy/chaos/asg/enabled | false | 57 | | /simianarmy/chaos/asg/probability | 1.0 | 58 | | /simianarmy/chaos/asg/maxterminationsperday | 1.0 | 59 | | /simianarmy/chaos/asgtag/key | | 60 | | /simianarmy/chaos/asgtag/value | | 61 | | /simianarmy/chaos/shutdowninstance/enabled | true | 62 | | /simianarmy/chaos/blockallnetworktraffic/enabled | false | 63 | | /simianarmy/chaos/detachvolumes/enabled | false | 64 | | /simianarmy/chaos/burncpu/enabled | false | 65 | | /simianarmy/chaos/burnio/enabled | false | 66 | | /simianarmy/chaos/killprocesses/enabled | false | 67 | | /simianarmy/chaos/nullroute/enabled | false | 68 | | /simianarmy/chaos/failec2/enabled | false | 69 | | /simianarmy/chaos/faildns/enabled | false | 70 | | /simianarmy/chaos/faildynamodb/enabled | false | 71 | | /simianarmy/chaos/fails3/enabled | false | 72 | | /simianarmy/chaos/filldisk/enabled | false | 73 | | /simianarmy/chaos/networkcorruption/enabled | false | 74 | | /simianarmy/chaos/networklatency/enabled | false | 75 | | /simianarmy/chaos/networkloss/enabled | false | 76 | | /simianarmy/chaos/notification/global/enabled | false | 77 | | /simianarmy/chaos/notification/sourceemail | | 78 | | /simianarmy/chaos/notification/receiveremail | | 79 | 80 | See https://github.com/Netflix/SimianArmy/wiki/Chaos-Settings for a detailed description of the properties. Also, consult https://github.com/Netflix/SimianArmy/wiki/The-Chaos-Monkey-Army to learn more about the different Chaos Monkey strategies. 81 | 82 | ## Janitor Monkey Properties 83 | 84 | | Key | Default | 85 | | --- | ------- | 86 | | simianarmy/janitor/enabled | false | 87 | | simianarmy/janitor/leashed | true | 88 | | simianarmy/janitor/resources/sdb/domain | SIMIAN_ARMY | 89 | | simianarmy/calendar/isMonkeyTime | | 90 | | simianarmy/janitor/enabledResources | Instance, ASG, EBS_Volume, EBS_Snapshot, Launch_Config | 91 | | simianarmy/janitor/notification/sourceEmail | foo@bar/com | 92 | | simianarmy/janitor/summaryEmail/to | foo@bar/com | 93 | | simianarmy/janitor/notification/defaultEmail | foo@bar/com | 94 | | simianarmy/janitor/notification/daysBeforeTermination | 2 | 95 | | simianarmy/janitor/snapshots/ownerId | | 96 | | simianarmy/janitor/rule/orphanedInstanceRule/enabled | true | 97 | | simianarmy/janitor/rule/orphanedInstanceRule/instanceAgeThreshold | 2 | 98 | | simianarmy/janitor/rule/orphanedInstanceRule/retentionDaysWithOwner | 3 | 99 | | simianarmy/janitor/rule/orphanedInstanceRule/retentionDaysWithoutOwner | 8 | 100 | | simianarmy/janitor/rule/orphanedInstanceRule/opsworks/parentage | false | 101 | | simianarmy/janitor/rule/untaggedRule/enabled | false | 102 | | simianarmy/janitor/rule/untaggedRule/requiredTags | owner, purpose, project | 103 | | simianarmy/janitor/rule/untaggedRule/resources | Instance, ASG, EBS_Volume, EBS_Snapshot | 104 | | simianarmy/janitor/rule/untaggedRule/retentionDaysWithOwner | 2 | 105 | | simianarmy/janitor/rule/untaggedRule/retentionDaysWithoutOwner | 2 | 106 | | simianarmy/janitor/rule/oldDetachedVolumeRule/enabled | true | 107 | | simianarmy/janitor/rule/oldDetachedVolumeRule/detachDaysThreshold | 30 | 108 | | simianarmy/janitor/rule/oldDetachedVolumeRule/retentionDays | 7 | 109 | | simianarmy/janitor/rule/deleteOnTerminationRule/enabled | true | 110 | | simianarmy/janitor/rule/deleteOnTerminationRule/retentionDays | 3 | 111 | | simianarmy/janitor/rule/noGeneratedAMIRule/enabled | true | 112 | | simianarmy/janitor/rule/noGeneratedAMIRule/ageThreshold | 30 | 113 | | simianarmy/janitor/rule/noGeneratedAMIRule/retentionDays | 7 | 114 | | simianarmy/janitor/rule/oldEmptyASGRule/enabled | true | 115 | | simianarmy/janitor/rule/oldEmptyASGRule/launchConfigAgeThreshold | 50 | 116 | | simianarmy/janitor/rule/oldEmptyASGRule/retentionDays | 10 | 117 | | simianarmy/janitor/rule/suspendedASGRule/enabled | true | 118 | | simianarmy/janitor/rule/suspendedASGRule/suspensionAgeThreshold | 2 | 119 | | simianarmy/janitor/rule/suspendedASGRule/retentionDays | 5 | 120 | | simianarmy/janitor/Eureka/enabled | false | 121 | | simianarmy/janitor/rule/oldUnusedLaunchConfigRule/enabled | true | 122 | | simianarmy/janitor/rule/oldUnusedLaunchConfigRule/ageThreshold | 4 | 123 | | simianarmy/janitor/rule/oldUnusedLaunchConfigRule/retentionDays | 3 | 124 | | simianarmy/janitor/image/crawler/lookBackDays | 60 | 125 | | simianarmy/janitor/image/ownerId | | 126 | | simianarmy/janitor/rule/unusedImageRule/enabled | false | 127 | | simianarmy/janitor/rule/unusedImageRule/lastReferenceDaysThreshold | 45 | 128 | | simianarmy/janitor/rule/unusedImageRule/retentionDays | 3 | 129 | | simianarmy/janitor/edda/enabled | | 130 | | simianarmy/janitor/edda/endpoint/useast1 | | 131 | | simianarmy/janitor/edda/client/timeout | | 132 | | simianarmy/janitor/edda/client/retries | | 133 | | simianarmy/janitor/edda/client/retryInterval | | 134 | | simianarmy/janitor/notification/ownerEmailDomain | | 135 | 136 | See https://github.com/Netflix/SimianArmy/wiki/Janitor-Settings for a detailed description of the properties. 137 | 138 | *NOTE*: In order to use JanitorMonkey to clean up AMIs, it requires [Edda](https://github.com/Netflix/edda) to be installed and configured. 139 | 140 | ## Conformity Monkey Properties 141 | 142 | Conformity Monkey is disabled and cannot be configured at the moment. 143 | 144 | ## VolumeTagging Monkey Properties 145 | 146 | VolumeTagging Monkey is disabled and cannot be configured at the moment. 147 | -------------------------------------------------------------------------------- /docs/configuration.md: -------------------------------------------------------------------------------- 1 | # Configuration 2 | 3 | The Simian Army is a Java application that reads [its configuration](https://github.com/Netflix/SimianArmy/wiki/Configuration) from `*.properties` files. The Docker container will update those configuration files dynamically at startup via [confd](https://github.com/kelseyhightower/confd). 4 | 5 | confd can fetch configuration data from different key-value stores such as etcd or Vault, or environment variables passed to the container via `-e` (the default behavior). For this abstraction to work, the following mapping is used: 6 | 7 | | Example property | Key (etcd, Vault) | Environment variable | 8 | | ---------------- | ----------------- | -------------------- | 9 | | simianarmy.chaos.leashed | /simianarmy/chaos/leashed | SIMIANARMY_CHAOS_LEASHED | 10 | | simianarmy.calendar.isMonkeyTime | /simianarmy/calendar/ismonkeytime | SIMIANARMY_CALENDAR_ISMONKEYTIME | 11 | | ... | ... | ... | 12 | 13 | See [Configuration Properties](configuration-properties.md) for a list of all available properties. 14 | 15 | ## Via Environment Variables 16 | 17 | That being said, here is how to configure the Simian Army via environment variables: 18 | 19 | ```bash 20 | docker run -d \ 21 | -e SIMIANARMY_CLIENT_AWS_ACCOUNTKEY=$AWS_ACCESS_KEY_ID \ 22 | -e SIMIANARMY_CLIENT_AWS_SECRETKEY=$AWS_SECRET_ACCESS_KEY \ 23 | -e SIMIANARMY_CLIENT_AWS_REGION=$AWS_REGION \ 24 | -e SIMIANARMY_CALENDAR_ISMONKEYTIME=true \ 25 | -e SIMIANARMY_CHAOS_ASG_ENABLED=true \ 26 | mlafeldt/simianarmy 27 | ``` 28 | 29 | Note: This example is safe to run as Chaos Monkey will operate in dry-run mode (`SIMIANARMY_CHAOS_LEASHED` is `true` by default). 30 | 31 | ## Via etcd 32 | 33 | The same example using etcd: 34 | 35 | ```bash 36 | # Write configuration data to etcd 37 | export ETCDCTL_ENDPOINT=http://$YOUR_ETCD_IP:2379 38 | etcdctl set /simianarmy/client/aws/accountkey $AWS_ACCESS_KEY_ID 39 | etcdctl set /simianarmy/client/aws/secretkey $AWS_SECRET_KEY 40 | etcdctl set /simianarmy/client/aws/region $AWS_REGION 41 | etcdctl set /simianarmy/calendar/ismonkeytime true 42 | 43 | # Start container using data in etcd 44 | docker run -d \ 45 | -e CONFD_OPTS="-backend=etcd -node=$ETCDCTL_ENDPOINT" \ 46 | mlafeldt/simianarmy 47 | ``` 48 | 49 | As this example shows, you can set `CONFD_OPTS` to pass [any available option](https://github.com/kelseyhightower/confd/blob/master/docs/command-line-flags.md) to confd to switch backends, change the log level, etc. 50 | -------------------------------------------------------------------------------- /docs/notifications.md: -------------------------------------------------------------------------------- 1 | # Notifications 2 | 3 | Chaos Monkey can send email notifications about terminations of instances and other chaos events. This is helpful to raise awareness that failures are being injected. 4 | 5 | To set up notifications, you need to define the following configuration properties: 6 | 7 | | Key | Value | 8 | | --- | ----- | 9 | | /simianarmy/chaos/notification/global/enabled | Must be `true` to enable notifications | 10 | | /simianarmy/chaos/notification/sourceemail | Set source email address for sending notifications | 11 | | /simianarmy/chaos/notification/receiveremail | Set recipient email address for notifications | 12 | | /simianarmy/aws/email/region | Optionally configure a different AWS region of SES | 13 | 14 | *Both* source and recipient email addresses have to be verified in Amazon Simple Email Service (SES); otherwise SES will refuse to send any emails. 15 | 16 | Note that the Docker image doesn't support ASG-specific email notifications, nor does it allow to change the subject or body format of emails. 17 | 18 | ## Slack 19 | 20 | Rather than getting (even more) emails, you might prefer notifications to show up in your chat room. Slack's builtin [email integration](https://get.slack.help/hc/en-us/articles/206819278-Sending-emails-to-Slack) allows you to forward emails from Chaos Monkey to Slack. It doesn't get much easier than this! 21 | -------------------------------------------------------------------------------- /docs/usage.md: -------------------------------------------------------------------------------- 1 | ## Usage 2 | 3 | This will start a Docker container running the Simian Army: 4 | 5 | ```bash 6 | docker pull mlafeldt/simianarmy 7 | docker run -d [-e CONFD_OPTS="..."] mlafeldt/simianarmy 8 | ``` 9 | 10 | See [Configuration](configuration.md) on how to configure the Simian Army. 11 | 12 | ## REST API 13 | 14 | If you want to access Simian Army's [REST API](https://github.com/Netflix/SimianArmy/wiki/REST), you additionally need to expose port 8080 like this: 15 | 16 | ```bash 17 | docker run -d -p 8080:8080 mlafeldt/simianarmy 18 | ``` 19 | 20 | ## Troubleshooting 21 | 22 | This will drop you into a login shell, which is useful for debugging: 23 | 24 | ```bash 25 | docker run -it --rm mlafeldt/simianarmy /bin/bash 26 | ``` 27 | 28 | In general, the image will execute any command you pass on the command line. 29 | -------------------------------------------------------------------------------- /entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | # Configure Simian Army 6 | confd -onetime ${CONFD_OPTS:-"-backend=env"} 7 | 8 | # Execute any debugging commands, e.g. "/bin/bash" to get a login shell 9 | if test $# -ge 1; then 10 | exec "$@" 11 | fi 12 | 13 | # Start Simian Army 14 | exec ./gradlew jettyRun --no-daemon 15 | --------------------------------------------------------------------------------