Compare commits
141 Commits
Author | SHA1 | Date | |
---|---|---|---|
dbe2f8c31b | |||
0ae267ac1d | |||
a616bd2aad | |||
3fb5bc40bc | |||
9a2139036e | |||
bfde8d8d24 | |||
6391b007eb | |||
2d91ef6330 | |||
44ede54a60 | |||
e05c3282ef | |||
2e8105ef3a | |||
0eb21d2083 | |||
0022ebaf88 | |||
|
cab63d6b76 | ||
6c17b20c55 | |||
27ccc54458 | |||
f66b7ab587 | |||
dd93be535c | |||
|
48d5c6fe90 | ||
|
3e141e5318 | ||
69b5949f71 | |||
45edd76c8b | |||
467d7aa015 | |||
|
b1b94336b2 | ||
0460f1c793 | |||
7e34a5a7b1 | |||
99e60f656c | |||
|
13b02aa115 | ||
4593e5bddb | |||
7a66f37556 | |||
|
bcb8130f78 | ||
|
aaffb0371e | ||
|
c87a732e2a | ||
32bf461026 | |||
560f1ff34b | |||
|
ec26b84dc9 | ||
|
0b89e88905 | ||
|
9f42fcfcc4 | ||
|
96e323a705 | ||
|
de2f6cf0c4 | ||
67a952003d | |||
|
4b85b640ae | ||
|
84c284677e | ||
|
18399ecf15 | ||
|
3f7f19a3c6 | ||
|
09e139cdf8 | ||
|
c446a854ee | ||
|
49977ae8a2 | ||
|
2f36e01c57 | ||
|
bd78aba16d | ||
|
d732ab47d7 | ||
|
767dcfa82a | ||
|
1661db5d47 | ||
|
e9169c8419 | ||
|
6278bea13b | ||
|
f187283bd5 | ||
|
f1e0aacee3 | ||
|
1c9b924eab | ||
453cd37217 | |||
|
21ce1d3567 | ||
|
8e76a2e1c9 | ||
|
c0412f6eba | ||
|
3c8171af8e | ||
|
e03fc296ee | ||
|
d1fe47db6f | ||
|
e1cd5774f1 | ||
8bfc231a7e | |||
|
0288082cd5 | ||
|
af74eaaeeb | ||
|
3442702197 | ||
|
b82285e3cc | ||
|
5d9865b26d | ||
|
459383b733 | ||
|
8ab87cda82 | ||
62993ea985 | |||
3cb1d9bf20 | |||
|
f99aa7536e | ||
|
801a520255 | ||
|
d083edc2f3 | ||
6c118a82c0 | |||
3c35f84913 | |||
|
43036b4312 | ||
|
0f5adff167 | ||
df0e91fb23 | |||
d70ea75fb7 | |||
|
c1f27d51f7 | ||
|
54f959ac23 | ||
|
ae9e3acbd2 | ||
|
2aeaf86e59 | ||
|
5968184b08 | ||
|
af820f23d9 | ||
|
a923fb1adc | ||
bc5c654154 | |||
|
b027a83aad | ||
|
1bd387413e | ||
|
53d815b93d | ||
|
3141f97f41 | ||
|
ad27697bc7 | ||
|
332f035622 | ||
|
3b205d80a5 | ||
|
e3768280ac | ||
|
f6c0495c04 | ||
|
c126c34972 | ||
|
ef044f1cf1 | ||
6fe4b4dfbe | |||
|
ee818c8149 | ||
9d75a87dd6 | |||
|
47956d1ac6 | ||
6b8f5bf013 | |||
|
1e917ec3e8 | ||
|
9d8e6cf216 | ||
|
96b0e82113 | ||
|
01b5056671 | ||
|
1d2c7103e4 | ||
|
292d30d1bd | ||
add257fd5e | |||
b6488fa36f | |||
|
778535a437 | ||
084270bbb8 | |||
|
1bc6ec6813 | ||
98c38b4fcf | |||
1d13b8e746 | |||
861cf82f67 | |||
|
7a0488df74 | ||
44cc0929bd | |||
|
5a2cc7a131 | ||
|
e869fb9699 | ||
|
33ab37c661 | ||
|
8fba9136b2 | ||
|
df53236853 | ||
bce3619638 | |||
247768b5d6 | |||
4c5da8eed6 | |||
1c4da28480 | |||
|
343d33270a | ||
|
430055a6ff | ||
|
3f4f2f4a1b | ||
|
b4efa1ee54 | ||
|
f97188cdad | ||
|
32ecd6a5d4 | ||
|
fdb7d2bf64 |
@@ -26,12 +26,28 @@ services:
|
|||||||
- "traefik.http.routers.http-catchall.middlewares=redirect-to-https"
|
- "traefik.http.routers.http-catchall.middlewares=redirect-to-https"
|
||||||
- "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
|
- "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
|
||||||
|
|
||||||
|
tapas-db:
|
||||||
|
image: mongo
|
||||||
|
restart: unless-stopped
|
||||||
|
container_name: tapas_mongodb
|
||||||
|
environment:
|
||||||
|
MONGO_INITDB_ROOT_USERNAME: root
|
||||||
|
MONGO_INITDB_ROOT_PASSWORD: password
|
||||||
|
ports:
|
||||||
|
- "27017:27017"
|
||||||
|
command: mongod --quiet --logpath /dev/null
|
||||||
|
|
||||||
tapas-tasks:
|
tapas-tasks:
|
||||||
image: openjdk
|
image: openjdk
|
||||||
command: "java -jar /data/tapas-tasks-0.0.1-SNAPSHOT.jar"
|
command: "java -jar /data/tapas-tasks-0.0.1-SNAPSHOT.jar"
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
depends_on:
|
||||||
|
- tapas-db
|
||||||
volumes:
|
volumes:
|
||||||
- ./:/data/
|
- ./:/data/
|
||||||
|
environment:
|
||||||
|
roster.uri: http://roster:8082
|
||||||
|
spring.data.mongodb.uri: mongodb://root:password@tapas-db:27017
|
||||||
labels:
|
labels:
|
||||||
- "traefik.enable=true"
|
- "traefik.enable=true"
|
||||||
- "traefik.http.routers.tapas-tasks.rule=Host(`tapas-tasks.${PUB_IP}.nip.io`)"
|
- "traefik.http.routers.tapas-tasks.rule=Host(`tapas-tasks.${PUB_IP}.nip.io`)"
|
||||||
@@ -45,8 +61,15 @@ services:
|
|||||||
image: openjdk
|
image: openjdk
|
||||||
command: "java -jar /data/tapas-auction-house-0.0.1-SNAPSHOT.jar"
|
command: "java -jar /data/tapas-auction-house-0.0.1-SNAPSHOT.jar"
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
depends_on:
|
||||||
|
- tapas-db
|
||||||
volumes:
|
volumes:
|
||||||
- ./:/data/
|
- ./:/data/
|
||||||
|
environment:
|
||||||
|
mqtt.broker.uri: tcp://broker.hivemq.com:1883
|
||||||
|
discovery.endpoint.uri: https://tapas-auction-house.86-119-34-242.nip.io
|
||||||
|
auction.house.uri: https://tapas-auction-house.86-119-35-40.nip.io
|
||||||
|
tasks.list.uri: https://tapas-tasks.86-119-35-40.nip.io
|
||||||
labels:
|
labels:
|
||||||
- "traefik.enable=true"
|
- "traefik.enable=true"
|
||||||
- "traefik.http.routers.tapas-auction-house.rule=Host(`tapas-auction-house.${PUB_IP}.nip.io`)"
|
- "traefik.http.routers.tapas-auction-house.rule=Host(`tapas-auction-house.${PUB_IP}.nip.io`)"
|
||||||
@@ -56,27 +79,43 @@ services:
|
|||||||
- "traefik.http.routers.tapas-auction-house.entryPoints=web,websecure"
|
- "traefik.http.routers.tapas-auction-house.entryPoints=web,websecure"
|
||||||
- "traefik.http.routers.tapas-auction-house.tls.certresolver=le"
|
- "traefik.http.routers.tapas-auction-house.tls.certresolver=le"
|
||||||
|
|
||||||
assignment:
|
roster:
|
||||||
image: openjdk
|
image: openjdk
|
||||||
command: "java -jar /data/assignment-0.0.1-SNAPSHOT.jar"
|
command: "java -jar /data/roster-0.0.1-SNAPSHOT.jar"
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
depends_on:
|
||||||
|
- tapas-db
|
||||||
volumes:
|
volumes:
|
||||||
- ./:/data/
|
- ./:/data/
|
||||||
|
environment:
|
||||||
|
task.list.uri: http://tapas-tasks:8081
|
||||||
|
auction.house.uri: http://tapas-auction-house:8086
|
||||||
|
executor.robot.uri: http://executor-robot:8084
|
||||||
|
executor.computation.uri: http://executor-computation:8085
|
||||||
|
executor.humidity.uri: http://executor-humidity:8087
|
||||||
|
executor.humidity.demo.uri: http://executor-humidity-demo:8088
|
||||||
|
mqtt.broker.uri: tcp://broker.hivemq.com:1883
|
||||||
|
spring.data.mongodb.uri: mongodb://root:password@tapas-db:27017
|
||||||
labels:
|
labels:
|
||||||
- "traefik.enable=true"
|
- "traefik.enable=true"
|
||||||
- "traefik.http.routers.assignment.rule=Host(`assignment.${PUB_IP}.nip.io`)"
|
- "traefik.http.routers.roster.rule=Host(`roster.${PUB_IP}.nip.io`)"
|
||||||
- "traefik.http.routers.assignment.service=assignment"
|
- "traefik.http.routers.roster.service=roster"
|
||||||
- "traefik.http.services.assignment.loadbalancer.server.port=8082"
|
- "traefik.http.services.roster.loadbalancer.server.port=8082"
|
||||||
- "traefik.http.routers.assignment.tls=true"
|
- "traefik.http.routers.roster.tls=true"
|
||||||
- "traefik.http.routers.assignment.entryPoints=web,websecure"
|
- "traefik.http.routers.roster.entryPoints=web,websecure"
|
||||||
- "traefik.http.routers.assignment.tls.certresolver=le"
|
- "traefik.http.routers.roster.tls.certresolver=le"
|
||||||
|
|
||||||
executor-pool:
|
executor-pool:
|
||||||
image: openjdk
|
image: openjdk
|
||||||
command: "java -jar /data/executor-pool-0.0.1-SNAPSHOT.jar"
|
command: "java -jar /data/executor-pool-0.0.1-SNAPSHOT.jar"
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
depends_on:
|
||||||
|
- tapas-db
|
||||||
volumes:
|
volumes:
|
||||||
- ./:/data/
|
- ./:/data/
|
||||||
|
environment:
|
||||||
|
mqtt.broker.uri: tcp://broker.hivemq.com:1883
|
||||||
|
spring.data.mongodb.uri: mongodb://root:password@tapas-db:27017
|
||||||
labels:
|
labels:
|
||||||
- "traefik.enable=true"
|
- "traefik.enable=true"
|
||||||
- "traefik.http.routers.executor-pool.rule=Host(`executor-pool.${PUB_IP}.nip.io`)"
|
- "traefik.http.routers.executor-pool.rule=Host(`executor-pool.${PUB_IP}.nip.io`)"
|
||||||
@@ -86,38 +125,87 @@ services:
|
|||||||
- "traefik.http.routers.executor-pool.entryPoints=web,websecure"
|
- "traefik.http.routers.executor-pool.entryPoints=web,websecure"
|
||||||
- "traefik.http.routers.executor-pool.tls.certresolver=le"
|
- "traefik.http.routers.executor-pool.tls.certresolver=le"
|
||||||
|
|
||||||
executor1:
|
executor-computation:
|
||||||
image: openjdk
|
image: openjdk
|
||||||
command: "java -jar /data/executor1-0.0.1-SNAPSHOT.jar"
|
command: "java -jar /data/executor-computation-0.0.1-SNAPSHOT.jar"
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
depends_on:
|
depends_on:
|
||||||
- executor-pool
|
- executor-pool
|
||||||
- assignment
|
- roster
|
||||||
|
- tapas-db
|
||||||
volumes:
|
volumes:
|
||||||
- ./:/data/
|
- ./:/data/
|
||||||
|
environment:
|
||||||
|
EXECUTOR_POOL_URI: http://executor-pool:8083
|
||||||
|
ROSTER_URI: http://roster:8082
|
||||||
labels:
|
labels:
|
||||||
- "traefik.enable=true"
|
- "traefik.enable=true"
|
||||||
- "traefik.http.routers.executor1.rule=Host(`executor1.${PUB_IP}.nip.io`)"
|
- "traefik.http.routers.executor-computation.rule=Host(`executor-computation.${PUB_IP}.nip.io`)"
|
||||||
- "traefik.http.routers.executor1.service=executor1"
|
- "traefik.http.routers.executor-computation.service=executor-computation"
|
||||||
- "traefik.http.services.executor1.loadbalancer.server.port=8084"
|
- "traefik.http.services.executor-computation.loadbalancer.server.port=8084"
|
||||||
- "traefik.http.routers.executor1.tls=true"
|
- "traefik.http.routers.executor-computation.tls=true"
|
||||||
- "traefik.http.routers.executor1.entryPoints=web,websecure"
|
- "traefik.http.routers.executor-computation.entryPoints=web,websecure"
|
||||||
- "traefik.http.routers.executor1.tls.certresolver=le"
|
- "traefik.http.routers.executor-computation.tls.certresolver=le"
|
||||||
|
executor-robot:
|
||||||
executor2:
|
|
||||||
image: openjdk
|
image: openjdk
|
||||||
command: "java -jar /data/executor2-0.0.1-SNAPSHOT.jar"
|
command: "java -jar /data/executor-robot-0.0.1-SNAPSHOT.jar"
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
depends_on:
|
depends_on:
|
||||||
- executor-pool
|
- executor-pool
|
||||||
- assignment
|
- roster
|
||||||
|
- tapas-db
|
||||||
volumes:
|
volumes:
|
||||||
- ./:/data/
|
- ./:/data/
|
||||||
|
environment:
|
||||||
|
EXECUTOR_POOL_URI: http://executor-pool:8083
|
||||||
|
ROSTER_URI: http://roster:8082
|
||||||
labels:
|
labels:
|
||||||
- "traefik.enable=true"
|
- "traefik.enable=true"
|
||||||
- "traefik.http.routers.executor2.rule=Host(`executor2.${PUB_IP}.nip.io`)"
|
- "traefik.http.routers.executor-robot.rule=Host(`executor-robot.${PUB_IP}.nip.io`)"
|
||||||
- "traefik.http.routers.executor2.service=executor2"
|
- "traefik.http.routers.executor-robot.service=executor-robot"
|
||||||
- "traefik.http.services.executor2.loadbalancer.server.port=8085"
|
- "traefik.http.services.executor-robot.loadbalancer.server.port=8085"
|
||||||
- "traefik.http.routers.executor2.tls=true"
|
- "traefik.http.routers.executor-robot.tls=true"
|
||||||
- "traefik.http.routers.executor2.entryPoints=web,websecure"
|
- "traefik.http.routers.executor-robot.entryPoints=web,websecure"
|
||||||
- "traefik.http.routers.executor2.tls.certresolver=le"
|
- "traefik.http.routers.executor-robot.tls.certresolver=le"
|
||||||
|
executor-humidity:
|
||||||
|
image: openjdk
|
||||||
|
command: "java -jar /data/executor-humidity-0.0.1-SNAPSHOT.jar"
|
||||||
|
restart: unless-stopped
|
||||||
|
depends_on:
|
||||||
|
- executor-pool
|
||||||
|
- roster
|
||||||
|
- tapas-db
|
||||||
|
volumes:
|
||||||
|
- ./:/data/
|
||||||
|
environment:
|
||||||
|
EXECUTOR_POOL_URI: http://executor-pool:8083
|
||||||
|
ROSTER_URI: http://roster:8082
|
||||||
|
labels:
|
||||||
|
- "traefik.enable=true"
|
||||||
|
- "traefik.http.routers.executor-humidity.rule=Host(`executor-humidity.${PUB_IP}.nip.io`)"
|
||||||
|
- "traefik.http.routers.executor-humidity.service=executor-humidity"
|
||||||
|
- "traefik.http.services.executor-humidity.loadbalancer.server.port=8087"
|
||||||
|
- "traefik.http.routers.executor-humidity.tls=true"
|
||||||
|
- "traefik.http.routers.executor-humidity.entryPoints=web,websecure"
|
||||||
|
- "traefik.http.routers.executor-humidity.tls.certresolver=le"
|
||||||
|
executor-humidity-demo:
|
||||||
|
image: openjdk
|
||||||
|
command: "java -jar /data/executor-humidity-demo-0.0.1-SNAPSHOT.jar"
|
||||||
|
restart: unless-stopped
|
||||||
|
depends_on:
|
||||||
|
- executor-pool
|
||||||
|
- roster
|
||||||
|
- tapas-db
|
||||||
|
volumes:
|
||||||
|
- ./:/data/
|
||||||
|
environment:
|
||||||
|
EXECUTOR_POOL_URI: http://executor-pool:8083
|
||||||
|
ROSTER_URI: http://roster:8082
|
||||||
|
labels:
|
||||||
|
- "traefik.enable=true"
|
||||||
|
- "traefik.http.routers.executor-humidity-demo.rule=Host(`executor-humidity-demo.${PUB_IP}.nip.io`)"
|
||||||
|
- "traefik.http.routers.executor-humidity-demo.service=executor-humidity-demo"
|
||||||
|
- "traefik.http.services.executor-humidity-demo.loadbalancer.server.port=8088"
|
||||||
|
- "traefik.http.routers.executor-humidity-demo.tls=true"
|
||||||
|
- "traefik.http.routers.executor-humidity-demo.entryPoints=web,websecure"
|
||||||
|
- "traefik.http.routers.executor-humidity-demo.tls.certresolver=le"
|
||||||
|
266
.experiments/executor-computation/chaostoolkit.log
Normal file
266
.experiments/executor-computation/chaostoolkit.log
Normal file
@@ -0,0 +1,266 @@
|
|||||||
|
[36m[2021-11-28 16:28:04 DEBUG] [cli:103][39m ###############################################################################
|
||||||
|
[36m[2021-11-28 16:28:04 DEBUG] [cli:104][39m Running command 'run'
|
||||||
|
[36m[2021-11-28 16:28:04 DEBUG] [cli:108][39m Using settings file '/Users/maece/.chaostoolkit/settings.yaml'
|
||||||
|
[36m[2021-11-28 16:28:05 DEBUG] [settings:30][39m The Chaos Toolkit settings file could not be found at '/Users/maece/.chaostoolkit/settings.yaml'.
|
||||||
|
[36m[2021-11-28 16:28:05 DEBUG] [__init__:389][39m No controls to apply on 'loader'
|
||||||
|
[36m[2021-11-28 16:28:05 DEBUG] [__init__:389][39m No controls to apply on 'loader'
|
||||||
|
[36m[2021-11-28 16:28:05 DEBUG] [caching:24][39m Building activity cache...
|
||||||
|
[36m[2021-11-28 16:28:05 DEBUG] [caching:35][39m Cached 2 activities
|
||||||
|
[32m[2021-11-28 16:28:05 INFO] [experiment:58][39m Validating the experiment's syntax
|
||||||
|
[36m[2021-11-28 16:28:05 DEBUG] [configuration:54][39m Loading configuration...
|
||||||
|
[36m[2021-11-28 16:28:05 DEBUG] [secret:78][39m Loading secrets...
|
||||||
|
[36m[2021-11-28 16:28:05 DEBUG] [secret:104][39m Done loading secrets
|
||||||
|
[32m[2021-11-28 16:28:05 INFO] [experiment:109][39m Experiment looks valid
|
||||||
|
[36m[2021-11-28 16:28:05 DEBUG] [caching:42][39m Clearing activities cache
|
||||||
|
[36m[2021-11-28 16:28:05 DEBUG] [caching:24][39m Building activity cache...
|
||||||
|
[36m[2021-11-28 16:28:05 DEBUG] [caching:35][39m Cached 2 activities
|
||||||
|
[36m[2021-11-28 16:28:05 DEBUG] [configuration:54][39m Loading configuration...
|
||||||
|
[36m[2021-11-28 16:28:05 DEBUG] [secret:78][39m Loading secrets...
|
||||||
|
[36m[2021-11-28 16:28:05 DEBUG] [secret:104][39m Done loading secrets
|
||||||
|
[32m[2021-11-28 16:28:05 INFO] [run:319][39m Running experiment: What is the impact of an expired certificate on our application chain?
|
||||||
|
[36m[2021-11-28 16:28:05 DEBUG] [__init__:49][39m Initializing controls
|
||||||
|
[32m[2021-11-28 16:28:05 INFO] [run:336][39m Steady-state strategy: default
|
||||||
|
[32m[2021-11-28 16:28:05 INFO] [run:340][39m Rollbacks strategy: default
|
||||||
|
[32m[2021-11-28 16:28:05 INFO] [run:345][39m No steady state hypothesis defined. That's ok, just exploring.
|
||||||
|
[36m[2021-11-28 16:28:05 DEBUG] [__init__:389][39m No controls to apply on 'experiment'
|
||||||
|
[32m[2021-11-28 16:28:05 INFO] [run:599][39m Playing your experiment's method now...
|
||||||
|
[36m[2021-11-28 16:28:05 DEBUG] [__init__:389][39m No controls to apply on 'method'
|
||||||
|
[36m[2021-11-28 16:28:05 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[32m[2021-11-28 16:28:05 INFO] [activity:188][39m Action: enable_chaosmonkey
|
||||||
|
[36m[2021-11-28 16:28:05 DEBUG] [python:33][39m Activity 'enable_chaosmonkey' loaded from '/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaosspring/actions.py'
|
||||||
|
[36m[2021-11-28 16:28:05 DEBUG] [activity:260][39m Activity failed
|
||||||
|
Traceback (most recent call last):
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/urllib3/connection.py", line 174, in _new_conn
|
||||||
|
conn = connection.create_connection(
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/urllib3/util/connection.py", line 96, in create_connection
|
||||||
|
raise err
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/urllib3/util/connection.py", line 86, in create_connection
|
||||||
|
sock.connect(sa)
|
||||||
|
ConnectionRefusedError: [Errno 61] Connection refused
|
||||||
|
|
||||||
|
During handling of the above exception, another exception occurred:
|
||||||
|
|
||||||
|
Traceback (most recent call last):
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/urllib3/connectionpool.py", line 699, in urlopen
|
||||||
|
httplib_response = self._make_request(
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/urllib3/connectionpool.py", line 394, in _make_request
|
||||||
|
conn.request(method, url, **httplib_request_kw)
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/urllib3/connection.py", line 239, in request
|
||||||
|
super(HTTPConnection, self).request(method, url, body=body, headers=headers)
|
||||||
|
File "/opt/homebrew/Cellar/python@3.9/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1279, in request
|
||||||
|
self._send_request(method, url, body, headers, encode_chunked)
|
||||||
|
File "/opt/homebrew/Cellar/python@3.9/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1325, in _send_request
|
||||||
|
self.endheaders(body, encode_chunked=encode_chunked)
|
||||||
|
File "/opt/homebrew/Cellar/python@3.9/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1274, in endheaders
|
||||||
|
self._send_output(message_body, encode_chunked=encode_chunked)
|
||||||
|
File "/opt/homebrew/Cellar/python@3.9/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1034, in _send_output
|
||||||
|
self.send(msg)
|
||||||
|
File "/opt/homebrew/Cellar/python@3.9/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 974, in send
|
||||||
|
self.connect()
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/urllib3/connection.py", line 205, in connect
|
||||||
|
conn = self._new_conn()
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/urllib3/connection.py", line 186, in _new_conn
|
||||||
|
raise NewConnectionError(
|
||||||
|
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x10438d220>: Failed to establish a new connection: [Errno 61] Connection refused
|
||||||
|
|
||||||
|
During handling of the above exception, another exception occurred:
|
||||||
|
|
||||||
|
Traceback (most recent call last):
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/requests/adapters.py", line 439, in send
|
||||||
|
resp = conn.urlopen(
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/urllib3/connectionpool.py", line 755, in urlopen
|
||||||
|
retries = retries.increment(
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/urllib3/util/retry.py", line 574, in increment
|
||||||
|
raise MaxRetryError(_pool, url, error or ResponseError(cause))
|
||||||
|
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8085): Max retries exceeded with url: /actuator/chaosmonkey/enable (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x10438d220>: Failed to establish a new connection: [Errno 61] Connection refused'))
|
||||||
|
|
||||||
|
During handling of the above exception, another exception occurred:
|
||||||
|
|
||||||
|
Traceback (most recent call last):
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaoslib/provider/python.py", line 56, in run_python_activity
|
||||||
|
return func(**arguments)
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaosspring/actions.py", line 24, in enable_chaosmonkey
|
||||||
|
response = api.call_api(
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaosspring/api.py", line 56, in call_api
|
||||||
|
return requests.request(
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/requests/api.py", line 61, in request
|
||||||
|
return session.request(method=method, url=url, **kwargs)
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/requests/sessions.py", line 542, in request
|
||||||
|
resp = self.send(prep, **send_kwargs)
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/requests/sessions.py", line 655, in send
|
||||||
|
r = adapter.send(request, **kwargs)
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/requests/adapters.py", line 516, in send
|
||||||
|
raise ConnectionError(e, request=request)
|
||||||
|
requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8085): Max retries exceeded with url: /actuator/chaosmonkey/enable (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x10438d220>: Failed to establish a new connection: [Errno 61] Connection refused'))
|
||||||
|
|
||||||
|
During handling of the above exception, another exception occurred:
|
||||||
|
|
||||||
|
Traceback (most recent call last):
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaoslib/activity.py", line 253, in run_activity
|
||||||
|
result = run_python_activity(activity, configuration, secrets)
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaoslib/provider/python.py", line 58, in run_python_activity
|
||||||
|
raise ActivityFailed(
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaoslib/provider/python.py", line 56, in run_python_activity
|
||||||
|
return func(**arguments)
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaosspring/actions.py", line 24, in enable_chaosmonkey
|
||||||
|
response = api.call_api(
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaosspring/api.py", line 56, in call_api
|
||||||
|
return requests.request(
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/requests/api.py", line 61, in request
|
||||||
|
return session.request(method=method, url=url, **kwargs)
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/requests/sessions.py", line 542, in request
|
||||||
|
resp = self.send(prep, **send_kwargs)
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/requests/sessions.py", line 655, in send
|
||||||
|
r = adapter.send(request, **kwargs)
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/requests/adapters.py", line 516, in send
|
||||||
|
raise ConnectionError(e, request=request)
|
||||||
|
chaoslib.exceptions.ActivityFailed: requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8085): Max retries exceeded with url: /actuator/chaosmonkey/enable (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x10438d220>: Failed to establish a new connection: [Errno 61] Connection refused'))
|
||||||
|
[31m[2021-11-28 16:28:05 ERROR] [activity:213][39m => failed: requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8085): Max retries exceeded with url: /actuator/chaosmonkey/enable (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x10438d220>: Failed to establish a new connection: [Errno 61] Connection refused'))
|
||||||
|
[36m[2021-11-28 16:28:05 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[36m[2021-11-28 16:28:05 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[32m[2021-11-28 16:28:05 INFO] [activity:188][39m Action: configure_assaults
|
||||||
|
[36m[2021-11-28 16:28:05 DEBUG] [python:33][39m Activity 'configure_assaults' loaded from '/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaosspring/actions.py'
|
||||||
|
[36m[2021-11-28 16:28:05 DEBUG] [activity:260][39m Activity failed
|
||||||
|
Traceback (most recent call last):
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/urllib3/connection.py", line 174, in _new_conn
|
||||||
|
conn = connection.create_connection(
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/urllib3/util/connection.py", line 96, in create_connection
|
||||||
|
raise err
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/urllib3/util/connection.py", line 86, in create_connection
|
||||||
|
sock.connect(sa)
|
||||||
|
ConnectionRefusedError: [Errno 61] Connection refused
|
||||||
|
|
||||||
|
During handling of the above exception, another exception occurred:
|
||||||
|
|
||||||
|
Traceback (most recent call last):
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/urllib3/connectionpool.py", line 699, in urlopen
|
||||||
|
httplib_response = self._make_request(
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/urllib3/connectionpool.py", line 394, in _make_request
|
||||||
|
conn.request(method, url, **httplib_request_kw)
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/urllib3/connection.py", line 239, in request
|
||||||
|
super(HTTPConnection, self).request(method, url, body=body, headers=headers)
|
||||||
|
File "/opt/homebrew/Cellar/python@3.9/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1279, in request
|
||||||
|
self._send_request(method, url, body, headers, encode_chunked)
|
||||||
|
File "/opt/homebrew/Cellar/python@3.9/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1325, in _send_request
|
||||||
|
self.endheaders(body, encode_chunked=encode_chunked)
|
||||||
|
File "/opt/homebrew/Cellar/python@3.9/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1274, in endheaders
|
||||||
|
self._send_output(message_body, encode_chunked=encode_chunked)
|
||||||
|
File "/opt/homebrew/Cellar/python@3.9/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1034, in _send_output
|
||||||
|
self.send(msg)
|
||||||
|
File "/opt/homebrew/Cellar/python@3.9/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 974, in send
|
||||||
|
self.connect()
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/urllib3/connection.py", line 205, in connect
|
||||||
|
conn = self._new_conn()
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/urllib3/connection.py", line 186, in _new_conn
|
||||||
|
raise NewConnectionError(
|
||||||
|
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x10438de50>: Failed to establish a new connection: [Errno 61] Connection refused
|
||||||
|
|
||||||
|
During handling of the above exception, another exception occurred:
|
||||||
|
|
||||||
|
Traceback (most recent call last):
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/requests/adapters.py", line 439, in send
|
||||||
|
resp = conn.urlopen(
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/urllib3/connectionpool.py", line 755, in urlopen
|
||||||
|
retries = retries.increment(
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/urllib3/util/retry.py", line 574, in increment
|
||||||
|
raise MaxRetryError(_pool, url, error or ResponseError(cause))
|
||||||
|
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8085): Max retries exceeded with url: /actuator/chaosmonkey/assaults (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x10438de50>: Failed to establish a new connection: [Errno 61] Connection refused'))
|
||||||
|
|
||||||
|
During handling of the above exception, another exception occurred:
|
||||||
|
|
||||||
|
Traceback (most recent call last):
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaoslib/provider/python.py", line 56, in run_python_activity
|
||||||
|
return func(**arguments)
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaosspring/actions.py", line 83, in change_assaults_configuration
|
||||||
|
response = api.call_api(
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaosspring/api.py", line 56, in call_api
|
||||||
|
return requests.request(
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/requests/api.py", line 61, in request
|
||||||
|
return session.request(method=method, url=url, **kwargs)
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/requests/sessions.py", line 542, in request
|
||||||
|
resp = self.send(prep, **send_kwargs)
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/requests/sessions.py", line 655, in send
|
||||||
|
r = adapter.send(request, **kwargs)
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/requests/adapters.py", line 516, in send
|
||||||
|
raise ConnectionError(e, request=request)
|
||||||
|
requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8085): Max retries exceeded with url: /actuator/chaosmonkey/assaults (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x10438de50>: Failed to establish a new connection: [Errno 61] Connection refused'))
|
||||||
|
|
||||||
|
During handling of the above exception, another exception occurred:
|
||||||
|
|
||||||
|
Traceback (most recent call last):
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaoslib/activity.py", line 253, in run_activity
|
||||||
|
result = run_python_activity(activity, configuration, secrets)
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaoslib/provider/python.py", line 58, in run_python_activity
|
||||||
|
raise ActivityFailed(
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaoslib/provider/python.py", line 56, in run_python_activity
|
||||||
|
return func(**arguments)
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaosspring/actions.py", line 83, in change_assaults_configuration
|
||||||
|
response = api.call_api(
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaosspring/api.py", line 56, in call_api
|
||||||
|
return requests.request(
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/requests/api.py", line 61, in request
|
||||||
|
return session.request(method=method, url=url, **kwargs)
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/requests/sessions.py", line 542, in request
|
||||||
|
resp = self.send(prep, **send_kwargs)
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/requests/sessions.py", line 655, in send
|
||||||
|
r = adapter.send(request, **kwargs)
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/requests/adapters.py", line 516, in send
|
||||||
|
raise ConnectionError(e, request=request)
|
||||||
|
chaoslib.exceptions.ActivityFailed: requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8085): Max retries exceeded with url: /actuator/chaosmonkey/assaults (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x10438de50>: Failed to establish a new connection: [Errno 61] Connection refused'))
|
||||||
|
[31m[2021-11-28 16:28:05 ERROR] [activity:213][39m => failed: requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8085): Max retries exceeded with url: /actuator/chaosmonkey/assaults (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x10438de50>: Failed to establish a new connection: [Errno 61] Connection refused'))
|
||||||
|
[36m[2021-11-28 16:28:05 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[36m[2021-11-28 16:28:05 DEBUG] [__init__:389][39m No controls to apply on 'method'
|
||||||
|
[32m[2021-11-28 16:28:05 INFO] [run:885][39m Let's rollback...
|
||||||
|
[36m[2021-11-28 16:28:05 DEBUG] [__init__:389][39m No controls to apply on 'rollback'
|
||||||
|
[32m[2021-11-28 16:28:05 INFO] [rollback:27][39m No declared rollbacks, let's move on.
|
||||||
|
[36m[2021-11-28 16:28:05 DEBUG] [__init__:389][39m No controls to apply on 'rollback'
|
||||||
|
[32m[2021-11-28 16:28:05 INFO] [run:450][39m Experiment ended with status: completed
|
||||||
|
[36m[2021-11-28 16:28:05 DEBUG] [__init__:389][39m No controls to apply on 'experiment'
|
||||||
|
[36m[2021-11-28 16:28:05 DEBUG] [__init__:82][39m Cleaning up controls
|
||||||
|
[36m[2021-11-28 16:28:05 DEBUG] [caching:42][39m Clearing activities cache
|
||||||
|
[36m[2021-11-28 16:54:22 DEBUG] [cli:103][39m ###############################################################################
|
||||||
|
[36m[2021-11-28 16:54:22 DEBUG] [cli:104][39m Running command 'run'
|
||||||
|
[36m[2021-11-28 16:54:22 DEBUG] [cli:108][39m Using settings file '/Users/maece/.chaostoolkit/settings.yaml'
|
||||||
|
[36m[2021-11-28 16:54:23 DEBUG] [settings:30][39m The Chaos Toolkit settings file could not be found at '/Users/maece/.chaostoolkit/settings.yaml'.
|
||||||
|
[36m[2021-11-28 16:54:23 DEBUG] [__init__:389][39m No controls to apply on 'loader'
|
||||||
|
[36m[2021-11-28 16:54:23 DEBUG] [__init__:389][39m No controls to apply on 'loader'
|
||||||
|
[36m[2021-11-28 16:54:23 DEBUG] [caching:24][39m Building activity cache...
|
||||||
|
[36m[2021-11-28 16:54:23 DEBUG] [caching:35][39m Cached 2 activities
|
||||||
|
[32m[2021-11-28 16:54:23 INFO] [experiment:58][39m Validating the experiment's syntax
|
||||||
|
[36m[2021-11-28 16:54:23 DEBUG] [configuration:54][39m Loading configuration...
|
||||||
|
[36m[2021-11-28 16:54:23 DEBUG] [secret:78][39m Loading secrets...
|
||||||
|
[36m[2021-11-28 16:54:23 DEBUG] [secret:104][39m Done loading secrets
|
||||||
|
[32m[2021-11-28 16:54:23 INFO] [experiment:109][39m Experiment looks valid
|
||||||
|
[36m[2021-11-28 16:54:23 DEBUG] [caching:42][39m Clearing activities cache
|
||||||
|
[36m[2021-11-28 16:54:23 DEBUG] [caching:24][39m Building activity cache...
|
||||||
|
[36m[2021-11-28 16:54:23 DEBUG] [caching:35][39m Cached 2 activities
|
||||||
|
[36m[2021-11-28 16:54:23 DEBUG] [configuration:54][39m Loading configuration...
|
||||||
|
[36m[2021-11-28 16:54:23 DEBUG] [secret:78][39m Loading secrets...
|
||||||
|
[36m[2021-11-28 16:54:23 DEBUG] [secret:104][39m Done loading secrets
|
||||||
|
[32m[2021-11-28 16:54:23 INFO] [run:319][39m Running experiment: What is the impact of an expired certificate on our application chain?
|
||||||
|
[36m[2021-11-28 16:54:23 DEBUG] [__init__:49][39m Initializing controls
|
||||||
|
[32m[2021-11-28 16:54:23 INFO] [run:336][39m Steady-state strategy: default
|
||||||
|
[32m[2021-11-28 16:54:23 INFO] [run:340][39m Rollbacks strategy: default
|
||||||
|
[32m[2021-11-28 16:54:23 INFO] [run:345][39m No steady state hypothesis defined. That's ok, just exploring.
|
||||||
|
[36m[2021-11-28 16:54:23 DEBUG] [__init__:389][39m No controls to apply on 'experiment'
|
||||||
|
[32m[2021-11-28 16:54:23 INFO] [run:599][39m Playing your experiment's method now...
|
||||||
|
[36m[2021-11-28 16:54:23 DEBUG] [__init__:389][39m No controls to apply on 'method'
|
||||||
|
[36m[2021-11-28 16:54:23 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[32m[2021-11-28 16:54:23 INFO] [activity:188][39m Action: enable_chaosmonkey
|
||||||
|
[36m[2021-11-28 16:54:23 DEBUG] [python:33][39m Activity 'enable_chaosmonkey' loaded from '/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaosspring/actions.py'
|
||||||
|
[36m[2021-11-28 16:54:24 DEBUG] [activity:205][39m => succeeded with '{"status":"Chaos Monkey is enabled","enabledAt":"2021-11-28T15:54:24.502699Z"}'
|
||||||
|
[36m[2021-11-28 16:54:24 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[36m[2021-11-28 16:54:24 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[32m[2021-11-28 16:54:24 INFO] [activity:188][39m Action: configure_assaults
|
||||||
|
[36m[2021-11-28 16:54:24 DEBUG] [python:33][39m Activity 'configure_assaults' loaded from '/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaosspring/actions.py'
|
||||||
|
[36m[2021-11-28 16:54:25 DEBUG] [activity:205][39m => succeeded with 'Assault config has changed'
|
||||||
|
[36m[2021-11-28 16:54:25 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[36m[2021-11-28 16:54:25 DEBUG] [__init__:389][39m No controls to apply on 'method'
|
||||||
|
[32m[2021-11-28 16:54:25 INFO] [run:885][39m Let's rollback...
|
||||||
|
[36m[2021-11-28 16:54:25 DEBUG] [__init__:389][39m No controls to apply on 'rollback'
|
||||||
|
[32m[2021-11-28 16:54:25 INFO] [rollback:27][39m No declared rollbacks, let's move on.
|
||||||
|
[36m[2021-11-28 16:54:25 DEBUG] [__init__:389][39m No controls to apply on 'rollback'
|
||||||
|
[32m[2021-11-28 16:54:25 INFO] [run:450][39m Experiment ended with status: completed
|
||||||
|
[36m[2021-11-28 16:54:25 DEBUG] [__init__:389][39m No controls to apply on 'experiment'
|
||||||
|
[36m[2021-11-28 16:54:25 DEBUG] [__init__:82][39m Cleaning up controls
|
||||||
|
[36m[2021-11-28 16:54:25 DEBUG] [caching:42][39m Clearing activities cache
|
24
.experiments/executor-computation/disable.json
Normal file
24
.experiments/executor-computation/disable.json
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
{
|
||||||
|
"title": "Disable chaos monkey",
|
||||||
|
"description": "Disable",
|
||||||
|
"tags": [],
|
||||||
|
"steady-state-hypothesis": {
|
||||||
|
"title": "Hypothesis",
|
||||||
|
"probes": []
|
||||||
|
},
|
||||||
|
"method": [],
|
||||||
|
"rollbacks": [
|
||||||
|
{
|
||||||
|
"name": "disable_chaosmonkey",
|
||||||
|
"provider": {
|
||||||
|
"arguments": {
|
||||||
|
"base_url": "http://localhost:8085/actuator"
|
||||||
|
},
|
||||||
|
"func": "disable_chaosmonkey",
|
||||||
|
"module": "chaosspring.actions",
|
||||||
|
"type": "python"
|
||||||
|
},
|
||||||
|
"type": "action"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
54
.experiments/executor-computation/exception.json
Normal file
54
.experiments/executor-computation/exception.json
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
{
|
||||||
|
"title": "Testing exceptions",
|
||||||
|
"description": "Testing exceptions!",
|
||||||
|
"tags": [],
|
||||||
|
"steady-state-hypothesis": {
|
||||||
|
"title": "Hypothesis",
|
||||||
|
"probes": []
|
||||||
|
},
|
||||||
|
"method": [
|
||||||
|
{
|
||||||
|
"name": "enable_chaosmonkey",
|
||||||
|
"provider": {
|
||||||
|
"arguments": {
|
||||||
|
"base_url": "http://localhost:8085/actuator"
|
||||||
|
},
|
||||||
|
"func": "enable_chaosmonkey",
|
||||||
|
"module": "chaosspring.actions",
|
||||||
|
"type": "python"
|
||||||
|
},
|
||||||
|
"type": "action"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "configure_assaults",
|
||||||
|
"provider": {
|
||||||
|
"arguments": {
|
||||||
|
"base_url": "http://localhost:8085/actuator",
|
||||||
|
"assaults_configuration": {
|
||||||
|
"level": 5,
|
||||||
|
"latencyRangeStart": 2000,
|
||||||
|
"latencyRangeEnd": 15000,
|
||||||
|
"latencyActive": false,
|
||||||
|
"killApplicationActive": false,
|
||||||
|
"restartApplicationActive": false,
|
||||||
|
"exceptionsActive": true,
|
||||||
|
"exception": {
|
||||||
|
"type": "java.lang.RuntimeException",
|
||||||
|
"arguments": [
|
||||||
|
{
|
||||||
|
"className": "java.lang.String",
|
||||||
|
"value": "Exception assault has been carried out"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"func": "change_assaults_configuration",
|
||||||
|
"module": "chaosspring.actions",
|
||||||
|
"type": "python"
|
||||||
|
},
|
||||||
|
"type": "action"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"rollbacks": []
|
||||||
|
}
|
113
.experiments/executor-computation/journal.json
Normal file
113
.experiments/executor-computation/journal.json
Normal file
@@ -0,0 +1,113 @@
|
|||||||
|
{
|
||||||
|
"chaoslib-version": "1.23.0",
|
||||||
|
"platform": "macOS-12.0-arm64-arm-64bit",
|
||||||
|
"node": "Marcels-MBP-M1",
|
||||||
|
"experiment": {
|
||||||
|
"title": "What is the impact of an expired certificate on our application chain?",
|
||||||
|
"description": "If a certificate expires, we should gracefully deal with the issue.",
|
||||||
|
"tags": [
|
||||||
|
"tls"
|
||||||
|
],
|
||||||
|
"steady-state-hypothesis": {
|
||||||
|
"title": "Hypothesis",
|
||||||
|
"probes": []
|
||||||
|
},
|
||||||
|
"method": [
|
||||||
|
{
|
||||||
|
"name": "enable_chaosmonkey",
|
||||||
|
"provider": {
|
||||||
|
"arguments": {
|
||||||
|
"base_url": "http://localhost:8085/actuator"
|
||||||
|
},
|
||||||
|
"func": "enable_chaosmonkey",
|
||||||
|
"module": "chaosspring.actions",
|
||||||
|
"type": "python"
|
||||||
|
},
|
||||||
|
"type": "action"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "configure_assaults",
|
||||||
|
"provider": {
|
||||||
|
"arguments": {
|
||||||
|
"base_url": "http://localhost:8085/actuator",
|
||||||
|
"assaults_configuration": {
|
||||||
|
"level": 5,
|
||||||
|
"latencyRangeStart": 2000,
|
||||||
|
"latencyRangeEnd": 15000,
|
||||||
|
"latencyActive": true,
|
||||||
|
"exceptionsActive": false,
|
||||||
|
"killApplicationActive": false,
|
||||||
|
"restartApplicationActive": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"func": "change_assaults_configuration",
|
||||||
|
"module": "chaosspring.actions",
|
||||||
|
"type": "python"
|
||||||
|
},
|
||||||
|
"type": "action"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"rollbacks": [],
|
||||||
|
"dry": null
|
||||||
|
},
|
||||||
|
"start": "2021-11-28T15:54:23.134945",
|
||||||
|
"status": "completed",
|
||||||
|
"deviated": false,
|
||||||
|
"steady_states": {
|
||||||
|
"before": null,
|
||||||
|
"after": null,
|
||||||
|
"during": []
|
||||||
|
},
|
||||||
|
"run": [
|
||||||
|
{
|
||||||
|
"activity": {
|
||||||
|
"name": "enable_chaosmonkey",
|
||||||
|
"provider": {
|
||||||
|
"arguments": {
|
||||||
|
"base_url": "http://localhost:8085/actuator"
|
||||||
|
},
|
||||||
|
"func": "enable_chaosmonkey",
|
||||||
|
"module": "chaosspring.actions",
|
||||||
|
"type": "python"
|
||||||
|
},
|
||||||
|
"type": "action"
|
||||||
|
},
|
||||||
|
"output": "{\"status\":\"Chaos Monkey is enabled\",\"enabledAt\":\"2021-11-28T15:54:24.502699Z\"}",
|
||||||
|
"status": "succeeded",
|
||||||
|
"start": "2021-11-28T15:54:23.135657",
|
||||||
|
"end": "2021-11-28T15:54:24.853870",
|
||||||
|
"duration": 1.718213
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"activity": {
|
||||||
|
"name": "configure_assaults",
|
||||||
|
"provider": {
|
||||||
|
"arguments": {
|
||||||
|
"base_url": "http://localhost:8085/actuator",
|
||||||
|
"assaults_configuration": {
|
||||||
|
"level": 5,
|
||||||
|
"latencyRangeStart": 2000,
|
||||||
|
"latencyRangeEnd": 15000,
|
||||||
|
"latencyActive": true,
|
||||||
|
"exceptionsActive": false,
|
||||||
|
"killApplicationActive": false,
|
||||||
|
"restartApplicationActive": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"func": "change_assaults_configuration",
|
||||||
|
"module": "chaosspring.actions",
|
||||||
|
"type": "python"
|
||||||
|
},
|
||||||
|
"type": "action"
|
||||||
|
},
|
||||||
|
"output": "Assault config has changed",
|
||||||
|
"status": "succeeded",
|
||||||
|
"start": "2021-11-28T15:54:24.854282",
|
||||||
|
"end": "2021-11-28T15:54:25.705360",
|
||||||
|
"duration": 0.851078
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"rollbacks": [],
|
||||||
|
"end": "2021-11-28T15:54:25.706100",
|
||||||
|
"duration": 2.609093189239502
|
||||||
|
}
|
45
.experiments/executor-computation/kill-restart.json
Normal file
45
.experiments/executor-computation/kill-restart.json
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
{
|
||||||
|
"title": "Testing kill & restart",
|
||||||
|
"description": "Testing behavoir when killing and restarting the application",
|
||||||
|
"tags": [],
|
||||||
|
"steady-state-hypothesis": {
|
||||||
|
"title": "Hypothesis",
|
||||||
|
"probes": []
|
||||||
|
},
|
||||||
|
"method": [
|
||||||
|
{
|
||||||
|
"name": "enable_chaosmonkey",
|
||||||
|
"provider": {
|
||||||
|
"arguments": {
|
||||||
|
"base_url": "http://localhost:8085/actuator"
|
||||||
|
},
|
||||||
|
"func": "enable_chaosmonkey",
|
||||||
|
"module": "chaosspring.actions",
|
||||||
|
"type": "python"
|
||||||
|
},
|
||||||
|
"type": "action"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "configure_assaults",
|
||||||
|
"provider": {
|
||||||
|
"arguments": {
|
||||||
|
"base_url": "http://localhost:8085/actuator",
|
||||||
|
"assaults_configuration": {
|
||||||
|
"level": 5,
|
||||||
|
"latencyRangeStart": 2000,
|
||||||
|
"latencyRangeEnd": 5000,
|
||||||
|
"latencyActive": false,
|
||||||
|
"exceptionsActive": false,
|
||||||
|
"killApplicationActive": true,
|
||||||
|
"restartApplicationActive": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"func": "change_assaults_configuration",
|
||||||
|
"module": "chaosspring.actions",
|
||||||
|
"type": "python"
|
||||||
|
},
|
||||||
|
"type": "action"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"rollbacks": []
|
||||||
|
}
|
45
.experiments/executor-computation/latency.json
Normal file
45
.experiments/executor-computation/latency.json
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
{
|
||||||
|
"title": "Testing latency",
|
||||||
|
"description": "Testing latency!",
|
||||||
|
"tags": [],
|
||||||
|
"steady-state-hypothesis": {
|
||||||
|
"title": "Hypothesis",
|
||||||
|
"probes": []
|
||||||
|
},
|
||||||
|
"method": [
|
||||||
|
{
|
||||||
|
"name": "enable_chaosmonkey",
|
||||||
|
"provider": {
|
||||||
|
"arguments": {
|
||||||
|
"base_url": "http://localhost:8085/actuator"
|
||||||
|
},
|
||||||
|
"func": "enable_chaosmonkey",
|
||||||
|
"module": "chaosspring.actions",
|
||||||
|
"type": "python"
|
||||||
|
},
|
||||||
|
"type": "action"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "configure_assaults",
|
||||||
|
"provider": {
|
||||||
|
"arguments": {
|
||||||
|
"base_url": "http://localhost:8085/actuator",
|
||||||
|
"assaults_configuration": {
|
||||||
|
"level": 5,
|
||||||
|
"latencyRangeStart": 2000,
|
||||||
|
"latencyRangeEnd": 15000,
|
||||||
|
"latencyActive": true,
|
||||||
|
"exceptionsActive": false,
|
||||||
|
"killApplicationActive": false,
|
||||||
|
"restartApplicationActive": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"func": "change_assaults_configuration",
|
||||||
|
"module": "chaosspring.actions",
|
||||||
|
"type": "python"
|
||||||
|
},
|
||||||
|
"type": "action"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"rollbacks": []
|
||||||
|
}
|
49
.experiments/executor-computation/memory.json
Normal file
49
.experiments/executor-computation/memory.json
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
{
|
||||||
|
"title": "Testing memory",
|
||||||
|
"description": "Testing memory!",
|
||||||
|
"tags": [],
|
||||||
|
"steady-state-hypothesis": {
|
||||||
|
"title": "Hypothesis",
|
||||||
|
"probes": []
|
||||||
|
},
|
||||||
|
"method": [
|
||||||
|
{
|
||||||
|
"name": "enable_chaosmonkey",
|
||||||
|
"provider": {
|
||||||
|
"arguments": {
|
||||||
|
"base_url": "http://localhost:8085/actuator"
|
||||||
|
},
|
||||||
|
"func": "enable_chaosmonkey",
|
||||||
|
"module": "chaosspring.actions",
|
||||||
|
"type": "python"
|
||||||
|
},
|
||||||
|
"type": "action"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "configure_assaults",
|
||||||
|
"provider": {
|
||||||
|
"arguments": {
|
||||||
|
"base_url": "http://localhost:8085/actuator",
|
||||||
|
"assaults_configuration": {
|
||||||
|
"level": 5,
|
||||||
|
"latencyActive": false,
|
||||||
|
"killApplicationActive": false,
|
||||||
|
"restartApplicationActive": false,
|
||||||
|
"exceptionsActive": false,
|
||||||
|
"memoryActive": true,
|
||||||
|
"memoryMillisecondsHoldFilledMemory": 90000,
|
||||||
|
"memoryMillisecondsWaitNextIncrease": 100,
|
||||||
|
"memoryFillIncrementFraction": 0.9,
|
||||||
|
"memoryFillTargetFraction": 0.95,
|
||||||
|
"runtimeAssaultCronExpression": "*/1 * * * * ?"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"func": "change_assaults_configuration",
|
||||||
|
"module": "chaosspring.actions",
|
||||||
|
"type": "python"
|
||||||
|
},
|
||||||
|
"type": "action"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"rollbacks": []
|
||||||
|
}
|
14
.experiments/readme.md
Normal file
14
.experiments/readme.md
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
# Create python env
|
||||||
|
|
||||||
|
python3 -m venv ~/.venvs/chaostk
|
||||||
|
|
||||||
|
# Activate python env
|
||||||
|
source ~/.venvs/chaostk/bin/activate
|
||||||
|
|
||||||
|
# Run tests
|
||||||
|
chaos run latency.json
|
||||||
|
chaos run kill-restart.json
|
||||||
|
|
||||||
|
# Disable tests
|
||||||
|
|
||||||
|
chaos run disable.json
|
135
.experiments/roster/chaostoolkit.log
Normal file
135
.experiments/roster/chaostoolkit.log
Normal file
@@ -0,0 +1,135 @@
|
|||||||
|
[36m[2021-11-28 14:43:28 DEBUG] [cli:103][39m ###############################################################################
|
||||||
|
[36m[2021-11-28 14:43:28 DEBUG] [cli:104][39m Running command 'run'
|
||||||
|
[36m[2021-11-28 14:43:28 DEBUG] [cli:108][39m Using settings file '/Users/maece/.chaostoolkit/settings.yaml'
|
||||||
|
[36m[2021-11-28 14:43:42 DEBUG] [cli:103][39m ###############################################################################
|
||||||
|
[36m[2021-11-28 14:43:42 DEBUG] [cli:104][39m Running command 'run'
|
||||||
|
[36m[2021-11-28 14:43:42 DEBUG] [cli:108][39m Using settings file '/Users/maece/.chaostoolkit/settings.yaml'
|
||||||
|
[36m[2021-11-28 14:43:42 DEBUG] [settings:30][39m The Chaos Toolkit settings file could not be found at '/Users/maece/.chaostoolkit/settings.yaml'.
|
||||||
|
[36m[2021-11-28 14:43:42 DEBUG] [__init__:389][39m No controls to apply on 'loader'
|
||||||
|
[36m[2021-11-28 14:43:42 DEBUG] [__init__:389][39m No controls to apply on 'loader'
|
||||||
|
[36m[2021-11-28 14:43:42 DEBUG] [caching:24][39m Building activity cache...
|
||||||
|
[36m[2021-11-28 14:43:42 DEBUG] [caching:35][39m Cached 2 activities
|
||||||
|
[32m[2021-11-28 14:43:42 INFO] [experiment:58][39m Validating the experiment's syntax
|
||||||
|
[36m[2021-11-28 14:43:42 DEBUG] [configuration:54][39m Loading configuration...
|
||||||
|
[36m[2021-11-28 14:43:42 DEBUG] [secret:78][39m Loading secrets...
|
||||||
|
[36m[2021-11-28 14:43:42 DEBUG] [secret:104][39m Done loading secrets
|
||||||
|
[32m[2021-11-28 14:43:42 INFO] [experiment:109][39m Experiment looks valid
|
||||||
|
[36m[2021-11-28 14:43:42 DEBUG] [caching:42][39m Clearing activities cache
|
||||||
|
[36m[2021-11-28 14:43:42 DEBUG] [caching:24][39m Building activity cache...
|
||||||
|
[36m[2021-11-28 14:43:42 DEBUG] [caching:35][39m Cached 2 activities
|
||||||
|
[36m[2021-11-28 14:43:42 DEBUG] [configuration:54][39m Loading configuration...
|
||||||
|
[36m[2021-11-28 14:43:42 DEBUG] [secret:78][39m Loading secrets...
|
||||||
|
[36m[2021-11-28 14:43:42 DEBUG] [secret:104][39m Done loading secrets
|
||||||
|
[32m[2021-11-28 14:43:42 INFO] [run:319][39m Running experiment: What is the impact of an expired certificate on our application chain?
|
||||||
|
[36m[2021-11-28 14:43:42 DEBUG] [__init__:49][39m Initializing controls
|
||||||
|
[32m[2021-11-28 14:43:42 INFO] [run:336][39m Steady-state strategy: default
|
||||||
|
[32m[2021-11-28 14:43:42 INFO] [run:340][39m Rollbacks strategy: default
|
||||||
|
[32m[2021-11-28 14:43:42 INFO] [run:345][39m No steady state hypothesis defined. That's ok, just exploring.
|
||||||
|
[36m[2021-11-28 14:43:42 DEBUG] [__init__:389][39m No controls to apply on 'experiment'
|
||||||
|
[32m[2021-11-28 14:43:42 INFO] [run:599][39m Playing your experiment's method now...
|
||||||
|
[36m[2021-11-28 14:43:42 DEBUG] [__init__:389][39m No controls to apply on 'method'
|
||||||
|
[36m[2021-11-28 14:43:42 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[32m[2021-11-28 14:43:42 INFO] [activity:188][39m Action: enable_chaosmonkey
|
||||||
|
[36m[2021-11-28 14:43:42 DEBUG] [python:33][39m Activity 'enable_chaosmonkey' loaded from '/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaosspring/actions.py'
|
||||||
|
[36m[2021-11-28 14:43:43 DEBUG] [activity:260][39m Activity failed
|
||||||
|
Traceback (most recent call last):
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaoslib/provider/python.py", line 56, in run_python_activity
|
||||||
|
return func(**arguments)
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaosspring/actions.py", line 36, in enable_chaosmonkey
|
||||||
|
raise FailedActivity(f"Enable ChaosMonkey failed: {response.text}")
|
||||||
|
chaoslib.exceptions.ActivityFailed: Enable ChaosMonkey failed: {"timestamp":"2021-11-28T13:43:43.069+00:00","status":404,"error":"Not Found","message":"No message available","path":"/actuator/chaosmonkey/enable"}
|
||||||
|
|
||||||
|
During handling of the above exception, another exception occurred:
|
||||||
|
|
||||||
|
Traceback (most recent call last):
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaoslib/activity.py", line 253, in run_activity
|
||||||
|
result = run_python_activity(activity, configuration, secrets)
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaoslib/provider/python.py", line 58, in run_python_activity
|
||||||
|
raise ActivityFailed(
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaoslib/provider/python.py", line 56, in run_python_activity
|
||||||
|
return func(**arguments)
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaosspring/actions.py", line 36, in enable_chaosmonkey
|
||||||
|
raise FailedActivity(f"Enable ChaosMonkey failed: {response.text}")
|
||||||
|
chaoslib.exceptions.ActivityFailed: chaoslib.exceptions.ActivityFailed: Enable ChaosMonkey failed: {"timestamp":"2021-11-28T13:43:43.069+00:00","status":404,"error":"Not Found","message":"No message available","path":"/actuator/chaosmonkey/enable"}
|
||||||
|
[31m[2021-11-28 14:43:43 ERROR] [activity:213][39m => failed: chaoslib.exceptions.ActivityFailed: Enable ChaosMonkey failed: {"timestamp":"2021-11-28T13:43:43.069+00:00","status":404,"error":"Not Found","message":"No message available","path":"/actuator/chaosmonkey/enable"}
|
||||||
|
[36m[2021-11-28 14:43:43 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[36m[2021-11-28 14:43:43 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[32m[2021-11-28 14:43:43 INFO] [activity:188][39m Action: configure_assaults
|
||||||
|
[36m[2021-11-28 14:43:43 DEBUG] [python:33][39m Activity 'configure_assaults' loaded from '/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaosspring/actions.py'
|
||||||
|
[36m[2021-11-28 14:43:43 DEBUG] [activity:260][39m Activity failed
|
||||||
|
Traceback (most recent call last):
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaoslib/provider/python.py", line 56, in run_python_activity
|
||||||
|
return func(**arguments)
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaosspring/actions.py", line 96, in change_assaults_configuration
|
||||||
|
raise FailedActivity(
|
||||||
|
chaoslib.exceptions.ActivityFailed: Change ChaosMonkey Assaults Configuration failed: {"timestamp":"2021-11-28T13:43:43.203+00:00","status":404,"error":"Not Found","message":"No message available","path":"/actuator/chaosmonkey/assaults"}
|
||||||
|
|
||||||
|
During handling of the above exception, another exception occurred:
|
||||||
|
|
||||||
|
Traceback (most recent call last):
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaoslib/activity.py", line 253, in run_activity
|
||||||
|
result = run_python_activity(activity, configuration, secrets)
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaoslib/provider/python.py", line 58, in run_python_activity
|
||||||
|
raise ActivityFailed(
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaoslib/provider/python.py", line 56, in run_python_activity
|
||||||
|
return func(**arguments)
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaosspring/actions.py", line 96, in change_assaults_configuration
|
||||||
|
raise FailedActivity(
|
||||||
|
chaoslib.exceptions.ActivityFailed: chaoslib.exceptions.ActivityFailed: Change ChaosMonkey Assaults Configuration failed: {"timestamp":"2021-11-28T13:43:43.203+00:00","status":404,"error":"Not Found","message":"No message available","path":"/actuator/chaosmonkey/assaults"}
|
||||||
|
[31m[2021-11-28 14:43:43 ERROR] [activity:213][39m => failed: chaoslib.exceptions.ActivityFailed: Change ChaosMonkey Assaults Configuration failed: {"timestamp":"2021-11-28T13:43:43.203+00:00","status":404,"error":"Not Found","message":"No message available","path":"/actuator/chaosmonkey/assaults"}
|
||||||
|
[36m[2021-11-28 14:43:43 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[36m[2021-11-28 14:43:43 DEBUG] [__init__:389][39m No controls to apply on 'method'
|
||||||
|
[32m[2021-11-28 14:43:43 INFO] [run:885][39m Let's rollback...
|
||||||
|
[36m[2021-11-28 14:43:43 DEBUG] [__init__:389][39m No controls to apply on 'rollback'
|
||||||
|
[32m[2021-11-28 14:43:43 INFO] [rollback:27][39m No declared rollbacks, let's move on.
|
||||||
|
[36m[2021-11-28 14:43:43 DEBUG] [__init__:389][39m No controls to apply on 'rollback'
|
||||||
|
[32m[2021-11-28 14:43:43 INFO] [run:450][39m Experiment ended with status: completed
|
||||||
|
[36m[2021-11-28 14:43:43 DEBUG] [__init__:389][39m No controls to apply on 'experiment'
|
||||||
|
[36m[2021-11-28 14:43:43 DEBUG] [__init__:82][39m Cleaning up controls
|
||||||
|
[36m[2021-11-28 14:43:43 DEBUG] [caching:42][39m Clearing activities cache
|
||||||
|
[36m[2021-11-28 16:24:55 DEBUG] [cli:103][39m ###############################################################################
|
||||||
|
[36m[2021-11-28 16:24:55 DEBUG] [cli:104][39m Running command 'run'
|
||||||
|
[36m[2021-11-28 16:24:55 DEBUG] [cli:108][39m Using settings file '/Users/maece/.chaostoolkit/settings.yaml'
|
||||||
|
[36m[2021-11-28 16:24:55 DEBUG] [settings:30][39m The Chaos Toolkit settings file could not be found at '/Users/maece/.chaostoolkit/settings.yaml'.
|
||||||
|
[36m[2021-11-28 16:24:55 DEBUG] [__init__:389][39m No controls to apply on 'loader'
|
||||||
|
[36m[2021-11-28 16:24:55 DEBUG] [__init__:389][39m No controls to apply on 'loader'
|
||||||
|
[36m[2021-11-28 16:24:55 DEBUG] [caching:24][39m Building activity cache...
|
||||||
|
[36m[2021-11-28 16:24:55 DEBUG] [caching:35][39m Cached 2 activities
|
||||||
|
[32m[2021-11-28 16:24:55 INFO] [experiment:58][39m Validating the experiment's syntax
|
||||||
|
[36m[2021-11-28 16:24:55 DEBUG] [configuration:54][39m Loading configuration...
|
||||||
|
[36m[2021-11-28 16:24:55 DEBUG] [secret:78][39m Loading secrets...
|
||||||
|
[36m[2021-11-28 16:24:55 DEBUG] [secret:104][39m Done loading secrets
|
||||||
|
[32m[2021-11-28 16:24:55 INFO] [experiment:109][39m Experiment looks valid
|
||||||
|
[36m[2021-11-28 16:24:55 DEBUG] [caching:42][39m Clearing activities cache
|
||||||
|
[36m[2021-11-28 16:24:55 DEBUG] [caching:24][39m Building activity cache...
|
||||||
|
[36m[2021-11-28 16:24:55 DEBUG] [caching:35][39m Cached 2 activities
|
||||||
|
[36m[2021-11-28 16:24:55 DEBUG] [configuration:54][39m Loading configuration...
|
||||||
|
[36m[2021-11-28 16:24:55 DEBUG] [secret:78][39m Loading secrets...
|
||||||
|
[36m[2021-11-28 16:24:55 DEBUG] [secret:104][39m Done loading secrets
|
||||||
|
[32m[2021-11-28 16:24:55 INFO] [run:319][39m Running experiment: What is the impact of an expired certificate on our application chain?
|
||||||
|
[36m[2021-11-28 16:24:55 DEBUG] [__init__:49][39m Initializing controls
|
||||||
|
[32m[2021-11-28 16:24:55 INFO] [run:336][39m Steady-state strategy: default
|
||||||
|
[32m[2021-11-28 16:24:55 INFO] [run:340][39m Rollbacks strategy: default
|
||||||
|
[32m[2021-11-28 16:24:55 INFO] [run:345][39m No steady state hypothesis defined. That's ok, just exploring.
|
||||||
|
[36m[2021-11-28 16:24:55 DEBUG] [__init__:389][39m No controls to apply on 'experiment'
|
||||||
|
[32m[2021-11-28 16:24:55 INFO] [run:599][39m Playing your experiment's method now...
|
||||||
|
[36m[2021-11-28 16:24:55 DEBUG] [__init__:389][39m No controls to apply on 'method'
|
||||||
|
[36m[2021-11-28 16:24:55 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[32m[2021-11-28 16:24:55 INFO] [activity:188][39m Action: enable_chaosmonkey
|
||||||
|
[36m[2021-11-28 16:24:55 DEBUG] [python:33][39m Activity 'enable_chaosmonkey' loaded from '/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaosspring/actions.py'
|
||||||
|
[36m[2021-11-28 16:24:56 DEBUG] [activity:205][39m => succeeded with '{"status":"Chaos Monkey is enabled","enabledAt":"2021-11-28T15:24:56.52458Z"}'
|
||||||
|
[36m[2021-11-28 16:24:56 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[36m[2021-11-28 16:24:56 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[32m[2021-11-28 16:24:56 INFO] [activity:188][39m Action: configure_assaults
|
||||||
|
[36m[2021-11-28 16:24:56 DEBUG] [python:33][39m Activity 'configure_assaults' loaded from '/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaosspring/actions.py'
|
||||||
|
[36m[2021-11-28 16:24:57 DEBUG] [activity:205][39m => succeeded with 'Assault config has changed'
|
||||||
|
[36m[2021-11-28 16:24:57 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[36m[2021-11-28 16:24:57 DEBUG] [__init__:389][39m No controls to apply on 'method'
|
||||||
|
[32m[2021-11-28 16:24:57 INFO] [run:885][39m Let's rollback...
|
||||||
|
[36m[2021-11-28 16:24:57 DEBUG] [__init__:389][39m No controls to apply on 'rollback'
|
||||||
|
[32m[2021-11-28 16:24:57 INFO] [rollback:27][39m No declared rollbacks, let's move on.
|
||||||
|
[36m[2021-11-28 16:24:57 DEBUG] [__init__:389][39m No controls to apply on 'rollback'
|
||||||
|
[32m[2021-11-28 16:24:57 INFO] [run:450][39m Experiment ended with status: completed
|
||||||
|
[36m[2021-11-28 16:24:57 DEBUG] [__init__:389][39m No controls to apply on 'experiment'
|
||||||
|
[36m[2021-11-28 16:24:57 DEBUG] [__init__:82][39m Cleaning up controls
|
||||||
|
[36m[2021-11-28 16:24:57 DEBUG] [caching:42][39m Clearing activities cache
|
24
.experiments/roster/disable.json
Normal file
24
.experiments/roster/disable.json
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
{
|
||||||
|
"title": "Disable chaos monkey",
|
||||||
|
"description": "Disable",
|
||||||
|
"tags": [],
|
||||||
|
"steady-state-hypothesis": {
|
||||||
|
"title": "Hypothesis",
|
||||||
|
"probes": []
|
||||||
|
},
|
||||||
|
"method": [],
|
||||||
|
"rollbacks": [
|
||||||
|
{
|
||||||
|
"name": "disable_chaosmonkey",
|
||||||
|
"provider": {
|
||||||
|
"arguments": {
|
||||||
|
"base_url": "http://localhost:8082/actuator"
|
||||||
|
},
|
||||||
|
"func": "disable_chaosmonkey",
|
||||||
|
"module": "chaosspring.actions",
|
||||||
|
"type": "python"
|
||||||
|
},
|
||||||
|
"type": "action"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
54
.experiments/roster/exception.json
Normal file
54
.experiments/roster/exception.json
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
{
|
||||||
|
"title": "Testing exceptions",
|
||||||
|
"description": "Testing exceptions!",
|
||||||
|
"tags": [],
|
||||||
|
"steady-state-hypothesis": {
|
||||||
|
"title": "Hypothesis",
|
||||||
|
"probes": []
|
||||||
|
},
|
||||||
|
"method": [
|
||||||
|
{
|
||||||
|
"name": "enable_chaosmonkey",
|
||||||
|
"provider": {
|
||||||
|
"arguments": {
|
||||||
|
"base_url": "http://localhost:8082/actuator"
|
||||||
|
},
|
||||||
|
"func": "enable_chaosmonkey",
|
||||||
|
"module": "chaosspring.actions",
|
||||||
|
"type": "python"
|
||||||
|
},
|
||||||
|
"type": "action"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "configure_assaults",
|
||||||
|
"provider": {
|
||||||
|
"arguments": {
|
||||||
|
"base_url": "http://localhost:8082/actuator",
|
||||||
|
"assaults_configuration": {
|
||||||
|
"level": 5,
|
||||||
|
"latencyRangeStart": 2000,
|
||||||
|
"latencyRangeEnd": 15000,
|
||||||
|
"latencyActive": false,
|
||||||
|
"killApplicationActive": false,
|
||||||
|
"restartApplicationActive": false,
|
||||||
|
"exceptionsActive": true,
|
||||||
|
"exception": {
|
||||||
|
"type": "java.lang.RuntimeException",
|
||||||
|
"arguments": [
|
||||||
|
{
|
||||||
|
"className": "java.lang.String",
|
||||||
|
"value": "Exception assault has been carried out"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"func": "change_assaults_configuration",
|
||||||
|
"module": "chaosspring.actions",
|
||||||
|
"type": "python"
|
||||||
|
},
|
||||||
|
"type": "action"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"rollbacks": []
|
||||||
|
}
|
113
.experiments/roster/journal.json
Normal file
113
.experiments/roster/journal.json
Normal file
@@ -0,0 +1,113 @@
|
|||||||
|
{
|
||||||
|
"chaoslib-version": "1.23.0",
|
||||||
|
"platform": "macOS-12.0-arm64-arm-64bit",
|
||||||
|
"node": "Marcels-MBP-M1",
|
||||||
|
"experiment": {
|
||||||
|
"title": "What is the impact of an expired certificate on our application chain?",
|
||||||
|
"description": "If a certificate expires, we should gracefully deal with the issue.",
|
||||||
|
"tags": [
|
||||||
|
"tls"
|
||||||
|
],
|
||||||
|
"steady-state-hypothesis": {
|
||||||
|
"title": "Hypothesis",
|
||||||
|
"probes": []
|
||||||
|
},
|
||||||
|
"method": [
|
||||||
|
{
|
||||||
|
"name": "enable_chaosmonkey",
|
||||||
|
"provider": {
|
||||||
|
"arguments": {
|
||||||
|
"base_url": "http://localhost:8082/actuator"
|
||||||
|
},
|
||||||
|
"func": "enable_chaosmonkey",
|
||||||
|
"module": "chaosspring.actions",
|
||||||
|
"type": "python"
|
||||||
|
},
|
||||||
|
"type": "action"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "configure_assaults",
|
||||||
|
"provider": {
|
||||||
|
"arguments": {
|
||||||
|
"base_url": "http://localhost:8082/actuator",
|
||||||
|
"assaults_configuration": {
|
||||||
|
"level": 5,
|
||||||
|
"latencyRangeStart": 2000,
|
||||||
|
"latencyRangeEnd": 15000,
|
||||||
|
"latencyActive": true,
|
||||||
|
"exceptionsActive": false,
|
||||||
|
"killApplicationActive": false,
|
||||||
|
"restartApplicationActive": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"func": "change_assaults_configuration",
|
||||||
|
"module": "chaosspring.actions",
|
||||||
|
"type": "python"
|
||||||
|
},
|
||||||
|
"type": "action"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"rollbacks": [],
|
||||||
|
"dry": null
|
||||||
|
},
|
||||||
|
"start": "2021-11-28T15:24:55.984078",
|
||||||
|
"status": "completed",
|
||||||
|
"deviated": false,
|
||||||
|
"steady_states": {
|
||||||
|
"before": null,
|
||||||
|
"after": null,
|
||||||
|
"during": []
|
||||||
|
},
|
||||||
|
"run": [
|
||||||
|
{
|
||||||
|
"activity": {
|
||||||
|
"name": "enable_chaosmonkey",
|
||||||
|
"provider": {
|
||||||
|
"arguments": {
|
||||||
|
"base_url": "http://localhost:8082/actuator"
|
||||||
|
},
|
||||||
|
"func": "enable_chaosmonkey",
|
||||||
|
"module": "chaosspring.actions",
|
||||||
|
"type": "python"
|
||||||
|
},
|
||||||
|
"type": "action"
|
||||||
|
},
|
||||||
|
"output": "{\"status\":\"Chaos Monkey is enabled\",\"enabledAt\":\"2021-11-28T15:24:56.52458Z\"}",
|
||||||
|
"status": "succeeded",
|
||||||
|
"start": "2021-11-28T15:24:55.984855",
|
||||||
|
"end": "2021-11-28T15:24:56.785205",
|
||||||
|
"duration": 0.80035
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"activity": {
|
||||||
|
"name": "configure_assaults",
|
||||||
|
"provider": {
|
||||||
|
"arguments": {
|
||||||
|
"base_url": "http://localhost:8082/actuator",
|
||||||
|
"assaults_configuration": {
|
||||||
|
"level": 5,
|
||||||
|
"latencyRangeStart": 2000,
|
||||||
|
"latencyRangeEnd": 15000,
|
||||||
|
"latencyActive": true,
|
||||||
|
"exceptionsActive": false,
|
||||||
|
"killApplicationActive": false,
|
||||||
|
"restartApplicationActive": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"func": "change_assaults_configuration",
|
||||||
|
"module": "chaosspring.actions",
|
||||||
|
"type": "python"
|
||||||
|
},
|
||||||
|
"type": "action"
|
||||||
|
},
|
||||||
|
"output": "Assault config has changed",
|
||||||
|
"status": "succeeded",
|
||||||
|
"start": "2021-11-28T15:24:56.785494",
|
||||||
|
"end": "2021-11-28T15:24:57.394090",
|
||||||
|
"duration": 0.608596
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"rollbacks": [],
|
||||||
|
"end": "2021-11-28T15:24:57.394597",
|
||||||
|
"duration": 1.4326798915863037
|
||||||
|
}
|
45
.experiments/roster/kill-restart.json
Normal file
45
.experiments/roster/kill-restart.json
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
{
|
||||||
|
"title": "Testing kill & restart",
|
||||||
|
"description": "Testing behavoir when killing and restarting the application",
|
||||||
|
"tags": [],
|
||||||
|
"steady-state-hypothesis": {
|
||||||
|
"title": "Hypothesis",
|
||||||
|
"probes": []
|
||||||
|
},
|
||||||
|
"method": [
|
||||||
|
{
|
||||||
|
"name": "enable_chaosmonkey",
|
||||||
|
"provider": {
|
||||||
|
"arguments": {
|
||||||
|
"base_url": "http://localhost:8082/actuator"
|
||||||
|
},
|
||||||
|
"func": "enable_chaosmonkey",
|
||||||
|
"module": "chaosspring.actions",
|
||||||
|
"type": "python"
|
||||||
|
},
|
||||||
|
"type": "action"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "configure_assaults",
|
||||||
|
"provider": {
|
||||||
|
"arguments": {
|
||||||
|
"base_url": "http://localhost:8082/actuator",
|
||||||
|
"assaults_configuration": {
|
||||||
|
"level": 5,
|
||||||
|
"latencyRangeStart": 2000,
|
||||||
|
"latencyRangeEnd": 5000,
|
||||||
|
"latencyActive": false,
|
||||||
|
"exceptionsActive": false,
|
||||||
|
"killApplicationActive": true,
|
||||||
|
"restartApplicationActive": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"func": "change_assaults_configuration",
|
||||||
|
"module": "chaosspring.actions",
|
||||||
|
"type": "python"
|
||||||
|
},
|
||||||
|
"type": "action"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"rollbacks": []
|
||||||
|
}
|
45
.experiments/roster/latency.json
Normal file
45
.experiments/roster/latency.json
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
{
|
||||||
|
"title": "Testing latency",
|
||||||
|
"description": "Testing latency!",
|
||||||
|
"tags": [],
|
||||||
|
"steady-state-hypothesis": {
|
||||||
|
"title": "Hypothesis",
|
||||||
|
"probes": []
|
||||||
|
},
|
||||||
|
"method": [
|
||||||
|
{
|
||||||
|
"name": "enable_chaosmonkey",
|
||||||
|
"provider": {
|
||||||
|
"arguments": {
|
||||||
|
"base_url": "http://localhost:8082/actuator"
|
||||||
|
},
|
||||||
|
"func": "enable_chaosmonkey",
|
||||||
|
"module": "chaosspring.actions",
|
||||||
|
"type": "python"
|
||||||
|
},
|
||||||
|
"type": "action"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "configure_assaults",
|
||||||
|
"provider": {
|
||||||
|
"arguments": {
|
||||||
|
"base_url": "http://localhost:8082/actuator",
|
||||||
|
"assaults_configuration": {
|
||||||
|
"level": 5,
|
||||||
|
"latencyRangeStart": 2000,
|
||||||
|
"latencyRangeEnd": 15000,
|
||||||
|
"latencyActive": true,
|
||||||
|
"exceptionsActive": false,
|
||||||
|
"killApplicationActive": false,
|
||||||
|
"restartApplicationActive": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"func": "change_assaults_configuration",
|
||||||
|
"module": "chaosspring.actions",
|
||||||
|
"type": "python"
|
||||||
|
},
|
||||||
|
"type": "action"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"rollbacks": []
|
||||||
|
}
|
49
.experiments/roster/memory.json
Normal file
49
.experiments/roster/memory.json
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
{
|
||||||
|
"title": "Testing memory",
|
||||||
|
"description": "Testing memory!",
|
||||||
|
"tags": [],
|
||||||
|
"steady-state-hypothesis": {
|
||||||
|
"title": "Hypothesis",
|
||||||
|
"probes": []
|
||||||
|
},
|
||||||
|
"method": [
|
||||||
|
{
|
||||||
|
"name": "enable_chaosmonkey",
|
||||||
|
"provider": {
|
||||||
|
"arguments": {
|
||||||
|
"base_url": "http://localhost:8082/actuator"
|
||||||
|
},
|
||||||
|
"func": "enable_chaosmonkey",
|
||||||
|
"module": "chaosspring.actions",
|
||||||
|
"type": "python"
|
||||||
|
},
|
||||||
|
"type": "action"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "configure_assaults",
|
||||||
|
"provider": {
|
||||||
|
"arguments": {
|
||||||
|
"base_url": "http://localhost:8082/actuator",
|
||||||
|
"assaults_configuration": {
|
||||||
|
"level": 5,
|
||||||
|
"latencyActive": false,
|
||||||
|
"killApplicationActive": false,
|
||||||
|
"restartApplicationActive": false,
|
||||||
|
"exceptionsActive": false,
|
||||||
|
"memoryActive": true,
|
||||||
|
"memoryMillisecondsHoldFilledMemory": 90000,
|
||||||
|
"memoryMillisecondsWaitNextIncrease": 100,
|
||||||
|
"memoryFillIncrementFraction": 0.9,
|
||||||
|
"memoryFillTargetFraction": 0.95,
|
||||||
|
"runtimeAssaultCronExpression": "*/1 * * * * ?"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"func": "change_assaults_configuration",
|
||||||
|
"module": "chaosspring.actions",
|
||||||
|
"type": "python"
|
||||||
|
},
|
||||||
|
"type": "action"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"rollbacks": []
|
||||||
|
}
|
936
.experiments/tapas-tasks/chaostoolkit.log
Normal file
936
.experiments/tapas-tasks/chaostoolkit.log
Normal file
@@ -0,0 +1,936 @@
|
|||||||
|
[36m[2021-11-27 11:35:02 DEBUG] [cli:103][39m ###############################################################################
|
||||||
|
[36m[2021-11-27 11:35:02 DEBUG] [cli:104][39m Running command 'run'
|
||||||
|
[36m[2021-11-27 11:35:02 DEBUG] [cli:108][39m Using settings file '/Users/maece/.chaostoolkit/settings.yaml'
|
||||||
|
[36m[2021-11-27 11:35:02 DEBUG] [settings:30][39m The Chaos Toolkit settings file could not be found at '/Users/maece/.chaostoolkit/settings.yaml'.
|
||||||
|
[36m[2021-11-27 11:35:02 DEBUG] [__init__:389][39m No controls to apply on 'loader'
|
||||||
|
[36m[2021-11-27 11:35:02 DEBUG] [__init__:389][39m No controls to apply on 'loader'
|
||||||
|
[36m[2021-11-27 11:35:02 DEBUG] [caching:24][39m Building activity cache...
|
||||||
|
[36m[2021-11-27 11:35:02 DEBUG] [caching:35][39m Cached 2 activities
|
||||||
|
[32m[2021-11-27 11:35:02 INFO] [experiment:58][39m Validating the experiment's syntax
|
||||||
|
[36m[2021-11-27 11:35:02 DEBUG] [configuration:54][39m Loading configuration...
|
||||||
|
[36m[2021-11-27 11:35:02 DEBUG] [secret:78][39m Loading secrets...
|
||||||
|
[36m[2021-11-27 11:35:02 DEBUG] [secret:104][39m Done loading secrets
|
||||||
|
[36m[2021-11-27 11:35:02 DEBUG] [caching:42][39m Clearing activities cache
|
||||||
|
[31m[2021-11-27 11:35:02 ERROR] [cli:251][39m hypothesis requires a title
|
||||||
|
[36m[2021-11-27 11:35:02 DEBUG] [cli:252][39m hypothesis requires a title
|
||||||
|
[36m[2021-11-27 11:35:57 DEBUG] [cli:103][39m ###############################################################################
|
||||||
|
[36m[2021-11-27 11:35:57 DEBUG] [cli:104][39m Running command 'run'
|
||||||
|
[36m[2021-11-27 11:35:57 DEBUG] [cli:108][39m Using settings file '/Users/maece/.chaostoolkit/settings.yaml'
|
||||||
|
[36m[2021-11-27 11:35:58 DEBUG] [settings:30][39m The Chaos Toolkit settings file could not be found at '/Users/maece/.chaostoolkit/settings.yaml'.
|
||||||
|
[36m[2021-11-27 11:35:58 DEBUG] [__init__:389][39m No controls to apply on 'loader'
|
||||||
|
[36m[2021-11-27 11:35:58 DEBUG] [__init__:389][39m No controls to apply on 'loader'
|
||||||
|
[36m[2021-11-27 11:35:58 DEBUG] [caching:24][39m Building activity cache...
|
||||||
|
[36m[2021-11-27 11:35:58 DEBUG] [caching:35][39m Cached 2 activities
|
||||||
|
[32m[2021-11-27 11:35:58 INFO] [experiment:58][39m Validating the experiment's syntax
|
||||||
|
[36m[2021-11-27 11:35:58 DEBUG] [caching:42][39m Clearing activities cache
|
||||||
|
[31m[2021-11-27 11:35:58 ERROR] [cli:251][39m experiment requires a description
|
||||||
|
[36m[2021-11-27 11:35:58 DEBUG] [cli:252][39m experiment requires a description
|
||||||
|
[36m[2021-11-27 11:36:18 DEBUG] [cli:103][39m ###############################################################################
|
||||||
|
[36m[2021-11-27 11:36:18 DEBUG] [cli:104][39m Running command 'run'
|
||||||
|
[36m[2021-11-27 11:36:18 DEBUG] [cli:108][39m Using settings file '/Users/maece/.chaostoolkit/settings.yaml'
|
||||||
|
[36m[2021-11-27 11:36:18 DEBUG] [settings:30][39m The Chaos Toolkit settings file could not be found at '/Users/maece/.chaostoolkit/settings.yaml'.
|
||||||
|
[36m[2021-11-27 11:36:18 DEBUG] [__init__:389][39m No controls to apply on 'loader'
|
||||||
|
[36m[2021-11-27 11:36:18 DEBUG] [__init__:389][39m No controls to apply on 'loader'
|
||||||
|
[36m[2021-11-27 11:36:18 DEBUG] [caching:24][39m Building activity cache...
|
||||||
|
[36m[2021-11-27 11:36:18 DEBUG] [caching:35][39m Cached 2 activities
|
||||||
|
[32m[2021-11-27 11:36:18 INFO] [experiment:58][39m Validating the experiment's syntax
|
||||||
|
[36m[2021-11-27 11:36:18 DEBUG] [configuration:54][39m Loading configuration...
|
||||||
|
[36m[2021-11-27 11:36:18 DEBUG] [secret:78][39m Loading secrets...
|
||||||
|
[36m[2021-11-27 11:36:18 DEBUG] [secret:104][39m Done loading secrets
|
||||||
|
[32m[2021-11-27 11:36:18 INFO] [experiment:109][39m Experiment looks valid
|
||||||
|
[36m[2021-11-27 11:36:18 DEBUG] [caching:42][39m Clearing activities cache
|
||||||
|
[36m[2021-11-27 11:36:18 DEBUG] [caching:24][39m Building activity cache...
|
||||||
|
[36m[2021-11-27 11:36:18 DEBUG] [caching:35][39m Cached 2 activities
|
||||||
|
[36m[2021-11-27 11:36:18 DEBUG] [configuration:54][39m Loading configuration...
|
||||||
|
[36m[2021-11-27 11:36:18 DEBUG] [secret:78][39m Loading secrets...
|
||||||
|
[36m[2021-11-27 11:36:18 DEBUG] [secret:104][39m Done loading secrets
|
||||||
|
[32m[2021-11-27 11:36:18 INFO] [run:319][39m Running experiment: Testing kill & restart
|
||||||
|
[36m[2021-11-27 11:36:18 DEBUG] [__init__:49][39m Initializing controls
|
||||||
|
[32m[2021-11-27 11:36:18 INFO] [run:336][39m Steady-state strategy: default
|
||||||
|
[32m[2021-11-27 11:36:18 INFO] [run:340][39m Rollbacks strategy: default
|
||||||
|
[32m[2021-11-27 11:36:18 INFO] [run:345][39m No steady state hypothesis defined. That's ok, just exploring.
|
||||||
|
[36m[2021-11-27 11:36:18 DEBUG] [__init__:389][39m No controls to apply on 'experiment'
|
||||||
|
[32m[2021-11-27 11:36:18 INFO] [run:599][39m Playing your experiment's method now...
|
||||||
|
[36m[2021-11-27 11:36:18 DEBUG] [__init__:389][39m No controls to apply on 'method'
|
||||||
|
[36m[2021-11-27 11:36:18 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[32m[2021-11-27 11:36:18 INFO] [activity:188][39m Action: enable_chaosmonkey
|
||||||
|
[36m[2021-11-27 11:36:18 DEBUG] [python:33][39m Activity 'enable_chaosmonkey' loaded from '/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaosspring/actions.py'
|
||||||
|
[36m[2021-11-27 11:36:19 DEBUG] [activity:205][39m => succeeded with '{"status":"Chaos Monkey is enabled","enabledAt":"2021-11-27T10:36:19.060458Z"}'
|
||||||
|
[36m[2021-11-27 11:36:19 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[36m[2021-11-27 11:36:19 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[32m[2021-11-27 11:36:19 INFO] [activity:188][39m Action: configure_assaults
|
||||||
|
[36m[2021-11-27 11:36:19 DEBUG] [python:33][39m Activity 'configure_assaults' loaded from '/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaosspring/actions.py'
|
||||||
|
[36m[2021-11-27 11:36:19 DEBUG] [activity:205][39m => succeeded with 'Assault config has changed'
|
||||||
|
[36m[2021-11-27 11:36:19 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[36m[2021-11-27 11:36:19 DEBUG] [__init__:389][39m No controls to apply on 'method'
|
||||||
|
[32m[2021-11-27 11:36:19 INFO] [run:885][39m Let's rollback...
|
||||||
|
[36m[2021-11-27 11:36:19 DEBUG] [__init__:389][39m No controls to apply on 'rollback'
|
||||||
|
[32m[2021-11-27 11:36:19 INFO] [rollback:30][39m Rollback: disable_chaosmonkey
|
||||||
|
[36m[2021-11-27 11:36:19 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[32m[2021-11-27 11:36:19 INFO] [activity:188][39m Action: disable_chaosmonkey
|
||||||
|
[36m[2021-11-27 11:36:19 DEBUG] [python:33][39m Activity 'disable_chaosmonkey' loaded from '/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaosspring/actions.py'
|
||||||
|
[36m[2021-11-27 11:36:19 DEBUG] [activity:260][39m Activity failed
|
||||||
|
Traceback (most recent call last):
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/urllib3/connection.py", line 174, in _new_conn
|
||||||
|
conn = connection.create_connection(
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/urllib3/util/connection.py", line 96, in create_connection
|
||||||
|
raise err
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/urllib3/util/connection.py", line 86, in create_connection
|
||||||
|
sock.connect(sa)
|
||||||
|
ConnectionRefusedError: [Errno 61] Connection refused
|
||||||
|
|
||||||
|
During handling of the above exception, another exception occurred:
|
||||||
|
|
||||||
|
Traceback (most recent call last):
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/urllib3/connectionpool.py", line 699, in urlopen
|
||||||
|
httplib_response = self._make_request(
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/urllib3/connectionpool.py", line 394, in _make_request
|
||||||
|
conn.request(method, url, **httplib_request_kw)
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/urllib3/connection.py", line 239, in request
|
||||||
|
super(HTTPConnection, self).request(method, url, body=body, headers=headers)
|
||||||
|
File "/opt/homebrew/Cellar/python@3.9/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1279, in request
|
||||||
|
self._send_request(method, url, body, headers, encode_chunked)
|
||||||
|
File "/opt/homebrew/Cellar/python@3.9/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1325, in _send_request
|
||||||
|
self.endheaders(body, encode_chunked=encode_chunked)
|
||||||
|
File "/opt/homebrew/Cellar/python@3.9/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1274, in endheaders
|
||||||
|
self._send_output(message_body, encode_chunked=encode_chunked)
|
||||||
|
File "/opt/homebrew/Cellar/python@3.9/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1034, in _send_output
|
||||||
|
self.send(msg)
|
||||||
|
File "/opt/homebrew/Cellar/python@3.9/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 974, in send
|
||||||
|
self.connect()
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/urllib3/connection.py", line 205, in connect
|
||||||
|
conn = self._new_conn()
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/urllib3/connection.py", line 186, in _new_conn
|
||||||
|
raise NewConnectionError(
|
||||||
|
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x106688100>: Failed to establish a new connection: [Errno 61] Connection refused
|
||||||
|
|
||||||
|
During handling of the above exception, another exception occurred:
|
||||||
|
|
||||||
|
Traceback (most recent call last):
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/requests/adapters.py", line 439, in send
|
||||||
|
resp = conn.urlopen(
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/urllib3/connectionpool.py", line 755, in urlopen
|
||||||
|
retries = retries.increment(
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/urllib3/util/retry.py", line 574, in increment
|
||||||
|
raise MaxRetryError(_pool, url, error or ResponseError(cause))
|
||||||
|
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8080): Max retries exceeded with url: /actuator/chaosmonkey/disable (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x106688100>: Failed to establish a new connection: [Errno 61] Connection refused'))
|
||||||
|
|
||||||
|
During handling of the above exception, another exception occurred:
|
||||||
|
|
||||||
|
Traceback (most recent call last):
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaoslib/provider/python.py", line 56, in run_python_activity
|
||||||
|
return func(**arguments)
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaosspring/actions.py", line 53, in disable_chaosmonkey
|
||||||
|
response = api.call_api(
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaosspring/api.py", line 56, in call_api
|
||||||
|
return requests.request(
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/requests/api.py", line 61, in request
|
||||||
|
return session.request(method=method, url=url, **kwargs)
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/requests/sessions.py", line 542, in request
|
||||||
|
resp = self.send(prep, **send_kwargs)
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/requests/sessions.py", line 655, in send
|
||||||
|
r = adapter.send(request, **kwargs)
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/requests/adapters.py", line 516, in send
|
||||||
|
raise ConnectionError(e, request=request)
|
||||||
|
requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8080): Max retries exceeded with url: /actuator/chaosmonkey/disable (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x106688100>: Failed to establish a new connection: [Errno 61] Connection refused'))
|
||||||
|
|
||||||
|
During handling of the above exception, another exception occurred:
|
||||||
|
|
||||||
|
Traceback (most recent call last):
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaoslib/activity.py", line 253, in run_activity
|
||||||
|
result = run_python_activity(activity, configuration, secrets)
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaoslib/provider/python.py", line 58, in run_python_activity
|
||||||
|
raise ActivityFailed(
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaoslib/provider/python.py", line 56, in run_python_activity
|
||||||
|
return func(**arguments)
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaosspring/actions.py", line 53, in disable_chaosmonkey
|
||||||
|
response = api.call_api(
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaosspring/api.py", line 56, in call_api
|
||||||
|
return requests.request(
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/requests/api.py", line 61, in request
|
||||||
|
return session.request(method=method, url=url, **kwargs)
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/requests/sessions.py", line 542, in request
|
||||||
|
resp = self.send(prep, **send_kwargs)
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/requests/sessions.py", line 655, in send
|
||||||
|
r = adapter.send(request, **kwargs)
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/requests/adapters.py", line 516, in send
|
||||||
|
raise ConnectionError(e, request=request)
|
||||||
|
chaoslib.exceptions.ActivityFailed: requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8080): Max retries exceeded with url: /actuator/chaosmonkey/disable (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x106688100>: Failed to establish a new connection: [Errno 61] Connection refused'))
|
||||||
|
[31m[2021-11-27 11:36:19 ERROR] [activity:213][39m => failed: requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8080): Max retries exceeded with url: /actuator/chaosmonkey/disable (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x106688100>: Failed to establish a new connection: [Errno 61] Connection refused'))
|
||||||
|
[36m[2021-11-27 11:36:19 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[36m[2021-11-27 11:36:19 DEBUG] [__init__:389][39m No controls to apply on 'rollback'
|
||||||
|
[32m[2021-11-27 11:36:19 INFO] [run:450][39m Experiment ended with status: completed
|
||||||
|
[36m[2021-11-27 11:36:19 DEBUG] [__init__:389][39m No controls to apply on 'experiment'
|
||||||
|
[36m[2021-11-27 11:36:19 DEBUG] [__init__:82][39m Cleaning up controls
|
||||||
|
[36m[2021-11-27 11:36:19 DEBUG] [caching:42][39m Clearing activities cache
|
||||||
|
[36m[2021-11-27 11:36:54 DEBUG] [cli:103][39m ###############################################################################
|
||||||
|
[36m[2021-11-27 11:36:54 DEBUG] [cli:104][39m Running command 'run'
|
||||||
|
[36m[2021-11-27 11:36:54 DEBUG] [cli:108][39m Using settings file '/Users/maece/.chaostoolkit/settings.yaml'
|
||||||
|
[36m[2021-11-27 11:36:54 DEBUG] [settings:30][39m The Chaos Toolkit settings file could not be found at '/Users/maece/.chaostoolkit/settings.yaml'.
|
||||||
|
[36m[2021-11-27 11:36:54 DEBUG] [__init__:389][39m No controls to apply on 'loader'
|
||||||
|
[36m[2021-11-27 11:36:54 DEBUG] [__init__:389][39m No controls to apply on 'loader'
|
||||||
|
[36m[2021-11-27 11:36:54 DEBUG] [caching:24][39m Building activity cache...
|
||||||
|
[36m[2021-11-27 11:36:54 DEBUG] [caching:35][39m Cached 2 activities
|
||||||
|
[32m[2021-11-27 11:36:54 INFO] [experiment:58][39m Validating the experiment's syntax
|
||||||
|
[36m[2021-11-27 11:36:54 DEBUG] [configuration:54][39m Loading configuration...
|
||||||
|
[36m[2021-11-27 11:36:54 DEBUG] [secret:78][39m Loading secrets...
|
||||||
|
[36m[2021-11-27 11:36:54 DEBUG] [secret:104][39m Done loading secrets
|
||||||
|
[32m[2021-11-27 11:36:54 INFO] [experiment:109][39m Experiment looks valid
|
||||||
|
[36m[2021-11-27 11:36:54 DEBUG] [caching:42][39m Clearing activities cache
|
||||||
|
[36m[2021-11-27 11:36:54 DEBUG] [caching:24][39m Building activity cache...
|
||||||
|
[36m[2021-11-27 11:36:54 DEBUG] [caching:35][39m Cached 2 activities
|
||||||
|
[36m[2021-11-27 11:36:54 DEBUG] [configuration:54][39m Loading configuration...
|
||||||
|
[36m[2021-11-27 11:36:54 DEBUG] [secret:78][39m Loading secrets...
|
||||||
|
[36m[2021-11-27 11:36:54 DEBUG] [secret:104][39m Done loading secrets
|
||||||
|
[32m[2021-11-27 11:36:54 INFO] [run:319][39m Running experiment: Testing kill & restart
|
||||||
|
[36m[2021-11-27 11:36:54 DEBUG] [__init__:49][39m Initializing controls
|
||||||
|
[32m[2021-11-27 11:36:54 INFO] [run:336][39m Steady-state strategy: default
|
||||||
|
[32m[2021-11-27 11:36:54 INFO] [run:340][39m Rollbacks strategy: default
|
||||||
|
[32m[2021-11-27 11:36:54 INFO] [run:345][39m No steady state hypothesis defined. That's ok, just exploring.
|
||||||
|
[36m[2021-11-27 11:36:54 DEBUG] [__init__:389][39m No controls to apply on 'experiment'
|
||||||
|
[32m[2021-11-27 11:36:54 INFO] [run:599][39m Playing your experiment's method now...
|
||||||
|
[36m[2021-11-27 11:36:54 DEBUG] [__init__:389][39m No controls to apply on 'method'
|
||||||
|
[36m[2021-11-27 11:36:54 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[32m[2021-11-27 11:36:54 INFO] [activity:188][39m Action: enable_chaosmonkey
|
||||||
|
[36m[2021-11-27 11:36:54 DEBUG] [python:33][39m Activity 'enable_chaosmonkey' loaded from '/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaosspring/actions.py'
|
||||||
|
[36m[2021-11-27 11:36:54 DEBUG] [activity:205][39m => succeeded with '{"status":"Chaos Monkey is enabled","enabledAt":"2021-11-27T10:36:54.668324Z"}'
|
||||||
|
[36m[2021-11-27 11:36:54 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[36m[2021-11-27 11:36:54 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[32m[2021-11-27 11:36:54 INFO] [activity:188][39m Action: configure_assaults
|
||||||
|
[36m[2021-11-27 11:36:54 DEBUG] [python:33][39m Activity 'configure_assaults' loaded from '/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaosspring/actions.py'
|
||||||
|
[36m[2021-11-27 11:36:54 DEBUG] [activity:205][39m => succeeded with 'Assault config has changed'
|
||||||
|
[36m[2021-11-27 11:36:54 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[36m[2021-11-27 11:36:54 DEBUG] [__init__:389][39m No controls to apply on 'method'
|
||||||
|
[32m[2021-11-27 11:36:54 INFO] [run:885][39m Let's rollback...
|
||||||
|
[36m[2021-11-27 11:36:54 DEBUG] [__init__:389][39m No controls to apply on 'rollback'
|
||||||
|
[32m[2021-11-27 11:36:54 INFO] [rollback:30][39m Rollback: disable_chaosmonkey
|
||||||
|
[36m[2021-11-27 11:36:54 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[32m[2021-11-27 11:36:54 INFO] [activity:188][39m Action: disable_chaosmonkey
|
||||||
|
[36m[2021-11-27 11:36:54 DEBUG] [python:33][39m Activity 'disable_chaosmonkey' loaded from '/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaosspring/actions.py'
|
||||||
|
[36m[2021-11-27 11:36:54 DEBUG] [activity:260][39m Activity failed
|
||||||
|
Traceback (most recent call last):
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/urllib3/connection.py", line 174, in _new_conn
|
||||||
|
conn = connection.create_connection(
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/urllib3/util/connection.py", line 96, in create_connection
|
||||||
|
raise err
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/urllib3/util/connection.py", line 86, in create_connection
|
||||||
|
sock.connect(sa)
|
||||||
|
ConnectionRefusedError: [Errno 61] Connection refused
|
||||||
|
|
||||||
|
During handling of the above exception, another exception occurred:
|
||||||
|
|
||||||
|
Traceback (most recent call last):
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/urllib3/connectionpool.py", line 699, in urlopen
|
||||||
|
httplib_response = self._make_request(
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/urllib3/connectionpool.py", line 394, in _make_request
|
||||||
|
conn.request(method, url, **httplib_request_kw)
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/urllib3/connection.py", line 239, in request
|
||||||
|
super(HTTPConnection, self).request(method, url, body=body, headers=headers)
|
||||||
|
File "/opt/homebrew/Cellar/python@3.9/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1279, in request
|
||||||
|
self._send_request(method, url, body, headers, encode_chunked)
|
||||||
|
File "/opt/homebrew/Cellar/python@3.9/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1325, in _send_request
|
||||||
|
self.endheaders(body, encode_chunked=encode_chunked)
|
||||||
|
File "/opt/homebrew/Cellar/python@3.9/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1274, in endheaders
|
||||||
|
self._send_output(message_body, encode_chunked=encode_chunked)
|
||||||
|
File "/opt/homebrew/Cellar/python@3.9/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1034, in _send_output
|
||||||
|
self.send(msg)
|
||||||
|
File "/opt/homebrew/Cellar/python@3.9/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 974, in send
|
||||||
|
self.connect()
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/urllib3/connection.py", line 205, in connect
|
||||||
|
conn = self._new_conn()
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/urllib3/connection.py", line 186, in _new_conn
|
||||||
|
raise NewConnectionError(
|
||||||
|
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x104be0100>: Failed to establish a new connection: [Errno 61] Connection refused
|
||||||
|
|
||||||
|
During handling of the above exception, another exception occurred:
|
||||||
|
|
||||||
|
Traceback (most recent call last):
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/requests/adapters.py", line 439, in send
|
||||||
|
resp = conn.urlopen(
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/urllib3/connectionpool.py", line 755, in urlopen
|
||||||
|
retries = retries.increment(
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/urllib3/util/retry.py", line 574, in increment
|
||||||
|
raise MaxRetryError(_pool, url, error or ResponseError(cause))
|
||||||
|
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8080): Max retries exceeded with url: /actuator/chaosmonkey/disable (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x104be0100>: Failed to establish a new connection: [Errno 61] Connection refused'))
|
||||||
|
|
||||||
|
During handling of the above exception, another exception occurred:
|
||||||
|
|
||||||
|
Traceback (most recent call last):
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaoslib/provider/python.py", line 56, in run_python_activity
|
||||||
|
return func(**arguments)
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaosspring/actions.py", line 53, in disable_chaosmonkey
|
||||||
|
response = api.call_api(
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaosspring/api.py", line 56, in call_api
|
||||||
|
return requests.request(
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/requests/api.py", line 61, in request
|
||||||
|
return session.request(method=method, url=url, **kwargs)
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/requests/sessions.py", line 542, in request
|
||||||
|
resp = self.send(prep, **send_kwargs)
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/requests/sessions.py", line 655, in send
|
||||||
|
r = adapter.send(request, **kwargs)
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/requests/adapters.py", line 516, in send
|
||||||
|
raise ConnectionError(e, request=request)
|
||||||
|
requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8080): Max retries exceeded with url: /actuator/chaosmonkey/disable (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x104be0100>: Failed to establish a new connection: [Errno 61] Connection refused'))
|
||||||
|
|
||||||
|
During handling of the above exception, another exception occurred:
|
||||||
|
|
||||||
|
Traceback (most recent call last):
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaoslib/activity.py", line 253, in run_activity
|
||||||
|
result = run_python_activity(activity, configuration, secrets)
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaoslib/provider/python.py", line 58, in run_python_activity
|
||||||
|
raise ActivityFailed(
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaoslib/provider/python.py", line 56, in run_python_activity
|
||||||
|
return func(**arguments)
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaosspring/actions.py", line 53, in disable_chaosmonkey
|
||||||
|
response = api.call_api(
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaosspring/api.py", line 56, in call_api
|
||||||
|
return requests.request(
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/requests/api.py", line 61, in request
|
||||||
|
return session.request(method=method, url=url, **kwargs)
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/requests/sessions.py", line 542, in request
|
||||||
|
resp = self.send(prep, **send_kwargs)
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/requests/sessions.py", line 655, in send
|
||||||
|
r = adapter.send(request, **kwargs)
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/requests/adapters.py", line 516, in send
|
||||||
|
raise ConnectionError(e, request=request)
|
||||||
|
chaoslib.exceptions.ActivityFailed: requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8080): Max retries exceeded with url: /actuator/chaosmonkey/disable (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x104be0100>: Failed to establish a new connection: [Errno 61] Connection refused'))
|
||||||
|
[31m[2021-11-27 11:36:54 ERROR] [activity:213][39m => failed: requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8080): Max retries exceeded with url: /actuator/chaosmonkey/disable (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x104be0100>: Failed to establish a new connection: [Errno 61] Connection refused'))
|
||||||
|
[36m[2021-11-27 11:36:54 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[36m[2021-11-27 11:36:54 DEBUG] [__init__:389][39m No controls to apply on 'rollback'
|
||||||
|
[32m[2021-11-27 11:36:54 INFO] [run:450][39m Experiment ended with status: completed
|
||||||
|
[36m[2021-11-27 11:36:54 DEBUG] [__init__:389][39m No controls to apply on 'experiment'
|
||||||
|
[36m[2021-11-27 11:36:54 DEBUG] [__init__:82][39m Cleaning up controls
|
||||||
|
[36m[2021-11-27 11:36:54 DEBUG] [caching:42][39m Clearing activities cache
|
||||||
|
[36m[2021-11-27 11:36:59 DEBUG] [cli:103][39m ###############################################################################
|
||||||
|
[36m[2021-11-27 11:36:59 DEBUG] [cli:104][39m Running command 'run'
|
||||||
|
[36m[2021-11-27 11:36:59 DEBUG] [cli:108][39m Using settings file '/Users/maece/.chaostoolkit/settings.yaml'
|
||||||
|
[36m[2021-11-27 11:37:00 DEBUG] [settings:30][39m The Chaos Toolkit settings file could not be found at '/Users/maece/.chaostoolkit/settings.yaml'.
|
||||||
|
[36m[2021-11-27 11:37:00 DEBUG] [__init__:389][39m No controls to apply on 'loader'
|
||||||
|
[36m[2021-11-27 11:37:00 DEBUG] [__init__:389][39m No controls to apply on 'loader'
|
||||||
|
[36m[2021-11-27 11:37:00 DEBUG] [caching:24][39m Building activity cache...
|
||||||
|
[36m[2021-11-27 11:37:00 DEBUG] [caching:35][39m Cached 2 activities
|
||||||
|
[32m[2021-11-27 11:37:00 INFO] [experiment:58][39m Validating the experiment's syntax
|
||||||
|
[36m[2021-11-27 11:37:00 DEBUG] [configuration:54][39m Loading configuration...
|
||||||
|
[36m[2021-11-27 11:37:00 DEBUG] [secret:78][39m Loading secrets...
|
||||||
|
[36m[2021-11-27 11:37:00 DEBUG] [secret:104][39m Done loading secrets
|
||||||
|
[32m[2021-11-27 11:37:00 INFO] [experiment:109][39m Experiment looks valid
|
||||||
|
[36m[2021-11-27 11:37:00 DEBUG] [caching:42][39m Clearing activities cache
|
||||||
|
[36m[2021-11-27 11:37:00 DEBUG] [caching:24][39m Building activity cache...
|
||||||
|
[36m[2021-11-27 11:37:00 DEBUG] [caching:35][39m Cached 2 activities
|
||||||
|
[36m[2021-11-27 11:37:00 DEBUG] [configuration:54][39m Loading configuration...
|
||||||
|
[36m[2021-11-27 11:37:00 DEBUG] [secret:78][39m Loading secrets...
|
||||||
|
[36m[2021-11-27 11:37:00 DEBUG] [secret:104][39m Done loading secrets
|
||||||
|
[32m[2021-11-27 11:37:00 INFO] [run:319][39m Running experiment: Testing kill & restart
|
||||||
|
[36m[2021-11-27 11:37:00 DEBUG] [__init__:49][39m Initializing controls
|
||||||
|
[32m[2021-11-27 11:37:00 INFO] [run:336][39m Steady-state strategy: default
|
||||||
|
[32m[2021-11-27 11:37:00 INFO] [run:340][39m Rollbacks strategy: default
|
||||||
|
[32m[2021-11-27 11:37:00 INFO] [run:345][39m No steady state hypothesis defined. That's ok, just exploring.
|
||||||
|
[36m[2021-11-27 11:37:00 DEBUG] [__init__:389][39m No controls to apply on 'experiment'
|
||||||
|
[32m[2021-11-27 11:37:00 INFO] [run:599][39m Playing your experiment's method now...
|
||||||
|
[36m[2021-11-27 11:37:00 DEBUG] [__init__:389][39m No controls to apply on 'method'
|
||||||
|
[36m[2021-11-27 11:37:00 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[32m[2021-11-27 11:37:00 INFO] [activity:188][39m Action: enable_chaosmonkey
|
||||||
|
[36m[2021-11-27 11:37:00 DEBUG] [python:33][39m Activity 'enable_chaosmonkey' loaded from '/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaosspring/actions.py'
|
||||||
|
[36m[2021-11-27 11:37:00 DEBUG] [activity:205][39m => succeeded with '{"status":"Chaos Monkey is enabled","enabledAt":"2021-11-27T10:37:00.591716Z"}'
|
||||||
|
[36m[2021-11-27 11:37:00 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[36m[2021-11-27 11:37:00 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[32m[2021-11-27 11:37:00 INFO] [activity:188][39m Action: configure_assaults
|
||||||
|
[36m[2021-11-27 11:37:00 DEBUG] [python:33][39m Activity 'configure_assaults' loaded from '/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaosspring/actions.py'
|
||||||
|
[36m[2021-11-27 11:37:00 DEBUG] [activity:205][39m => succeeded with 'Assault config has changed'
|
||||||
|
[36m[2021-11-27 11:37:00 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[36m[2021-11-27 11:37:00 DEBUG] [__init__:389][39m No controls to apply on 'method'
|
||||||
|
[32m[2021-11-27 11:37:00 INFO] [run:885][39m Let's rollback...
|
||||||
|
[36m[2021-11-27 11:37:00 DEBUG] [__init__:389][39m No controls to apply on 'rollback'
|
||||||
|
[32m[2021-11-27 11:37:00 INFO] [rollback:30][39m Rollback: disable_chaosmonkey
|
||||||
|
[36m[2021-11-27 11:37:00 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[32m[2021-11-27 11:37:00 INFO] [activity:188][39m Action: disable_chaosmonkey
|
||||||
|
[36m[2021-11-27 11:37:00 DEBUG] [python:33][39m Activity 'disable_chaosmonkey' loaded from '/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaosspring/actions.py'
|
||||||
|
[36m[2021-11-27 11:37:00 DEBUG] [activity:205][39m => succeeded with '{"status":"Chaos Monkey is disabled","disabledAt":"2021-11-27T10:37:00.650024Z"}'
|
||||||
|
[36m[2021-11-27 11:37:00 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[36m[2021-11-27 11:37:00 DEBUG] [__init__:389][39m No controls to apply on 'rollback'
|
||||||
|
[32m[2021-11-27 11:37:00 INFO] [run:450][39m Experiment ended with status: completed
|
||||||
|
[36m[2021-11-27 11:37:00 DEBUG] [__init__:389][39m No controls to apply on 'experiment'
|
||||||
|
[36m[2021-11-27 11:37:00 DEBUG] [__init__:82][39m Cleaning up controls
|
||||||
|
[36m[2021-11-27 11:37:00 DEBUG] [caching:42][39m Clearing activities cache
|
||||||
|
[36m[2021-11-27 11:38:39 DEBUG] [cli:103][39m ###############################################################################
|
||||||
|
[36m[2021-11-27 11:38:39 DEBUG] [cli:104][39m Running command 'run'
|
||||||
|
[36m[2021-11-27 11:38:39 DEBUG] [cli:108][39m Using settings file '/Users/maece/.chaostoolkit/settings.yaml'
|
||||||
|
[36m[2021-11-27 11:38:40 DEBUG] [settings:30][39m The Chaos Toolkit settings file could not be found at '/Users/maece/.chaostoolkit/settings.yaml'.
|
||||||
|
[36m[2021-11-27 11:38:40 DEBUG] [__init__:389][39m No controls to apply on 'loader'
|
||||||
|
[36m[2021-11-27 11:38:40 DEBUG] [__init__:389][39m No controls to apply on 'loader'
|
||||||
|
[36m[2021-11-27 11:38:40 DEBUG] [caching:24][39m Building activity cache...
|
||||||
|
[36m[2021-11-27 11:38:40 DEBUG] [caching:35][39m Cached 2 activities
|
||||||
|
[32m[2021-11-27 11:38:40 INFO] [experiment:58][39m Validating the experiment's syntax
|
||||||
|
[36m[2021-11-27 11:38:40 DEBUG] [configuration:54][39m Loading configuration...
|
||||||
|
[36m[2021-11-27 11:38:40 DEBUG] [secret:78][39m Loading secrets...
|
||||||
|
[36m[2021-11-27 11:38:40 DEBUG] [secret:104][39m Done loading secrets
|
||||||
|
[32m[2021-11-27 11:38:40 INFO] [experiment:109][39m Experiment looks valid
|
||||||
|
[36m[2021-11-27 11:38:40 DEBUG] [caching:42][39m Clearing activities cache
|
||||||
|
[36m[2021-11-27 11:38:40 DEBUG] [caching:24][39m Building activity cache...
|
||||||
|
[36m[2021-11-27 11:38:40 DEBUG] [caching:35][39m Cached 2 activities
|
||||||
|
[36m[2021-11-27 11:38:40 DEBUG] [configuration:54][39m Loading configuration...
|
||||||
|
[36m[2021-11-27 11:38:40 DEBUG] [secret:78][39m Loading secrets...
|
||||||
|
[36m[2021-11-27 11:38:40 DEBUG] [secret:104][39m Done loading secrets
|
||||||
|
[32m[2021-11-27 11:38:40 INFO] [run:319][39m Running experiment: Testing kill & restart
|
||||||
|
[36m[2021-11-27 11:38:40 DEBUG] [__init__:49][39m Initializing controls
|
||||||
|
[32m[2021-11-27 11:38:40 INFO] [run:336][39m Steady-state strategy: default
|
||||||
|
[32m[2021-11-27 11:38:40 INFO] [run:340][39m Rollbacks strategy: default
|
||||||
|
[32m[2021-11-27 11:38:40 INFO] [run:345][39m No steady state hypothesis defined. That's ok, just exploring.
|
||||||
|
[36m[2021-11-27 11:38:40 DEBUG] [__init__:389][39m No controls to apply on 'experiment'
|
||||||
|
[32m[2021-11-27 11:38:40 INFO] [run:599][39m Playing your experiment's method now...
|
||||||
|
[36m[2021-11-27 11:38:40 DEBUG] [__init__:389][39m No controls to apply on 'method'
|
||||||
|
[36m[2021-11-27 11:38:40 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[32m[2021-11-27 11:38:40 INFO] [activity:188][39m Action: enable_chaosmonkey
|
||||||
|
[36m[2021-11-27 11:38:40 DEBUG] [python:33][39m Activity 'enable_chaosmonkey' loaded from '/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaosspring/actions.py'
|
||||||
|
[36m[2021-11-27 11:38:41 DEBUG] [activity:205][39m => succeeded with '{"status":"Chaos Monkey is enabled","enabledAt":"2021-11-27T10:38:40.795245Z"}'
|
||||||
|
[36m[2021-11-27 11:38:41 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[36m[2021-11-27 11:38:41 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[32m[2021-11-27 11:38:41 INFO] [activity:188][39m Action: configure_assaults
|
||||||
|
[36m[2021-11-27 11:38:41 DEBUG] [python:33][39m Activity 'configure_assaults' loaded from '/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaosspring/actions.py'
|
||||||
|
[36m[2021-11-27 11:38:41 DEBUG] [activity:205][39m => succeeded with 'Assault config has changed'
|
||||||
|
[36m[2021-11-27 11:38:41 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[36m[2021-11-27 11:38:41 DEBUG] [__init__:389][39m No controls to apply on 'method'
|
||||||
|
[32m[2021-11-27 11:38:41 INFO] [run:885][39m Let's rollback...
|
||||||
|
[36m[2021-11-27 11:38:41 DEBUG] [__init__:389][39m No controls to apply on 'rollback'
|
||||||
|
[32m[2021-11-27 11:38:41 INFO] [rollback:30][39m Rollback: disable_chaosmonkey
|
||||||
|
[36m[2021-11-27 11:38:41 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[32m[2021-11-27 11:38:41 INFO] [activity:188][39m Action: disable_chaosmonkey
|
||||||
|
[36m[2021-11-27 11:38:41 DEBUG] [python:33][39m Activity 'disable_chaosmonkey' loaded from '/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaosspring/actions.py'
|
||||||
|
[36m[2021-11-27 11:38:41 DEBUG] [activity:205][39m => succeeded with '{"status":"Chaos Monkey is disabled","disabledAt":"2021-11-27T10:38:41.923689Z"}'
|
||||||
|
[36m[2021-11-27 11:38:41 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[36m[2021-11-27 11:38:41 DEBUG] [__init__:389][39m No controls to apply on 'rollback'
|
||||||
|
[32m[2021-11-27 11:38:41 INFO] [run:450][39m Experiment ended with status: completed
|
||||||
|
[36m[2021-11-27 11:38:41 DEBUG] [__init__:389][39m No controls to apply on 'experiment'
|
||||||
|
[36m[2021-11-27 11:38:41 DEBUG] [__init__:82][39m Cleaning up controls
|
||||||
|
[36m[2021-11-27 11:38:41 DEBUG] [caching:42][39m Clearing activities cache
|
||||||
|
[36m[2021-11-27 11:42:14 DEBUG] [cli:103][39m ###############################################################################
|
||||||
|
[36m[2021-11-27 11:42:14 DEBUG] [cli:104][39m Running command 'run'
|
||||||
|
[36m[2021-11-27 11:42:14 DEBUG] [cli:108][39m Using settings file '/Users/maece/.chaostoolkit/settings.yaml'
|
||||||
|
[36m[2021-11-27 11:42:15 DEBUG] [settings:30][39m The Chaos Toolkit settings file could not be found at '/Users/maece/.chaostoolkit/settings.yaml'.
|
||||||
|
[36m[2021-11-27 11:42:15 DEBUG] [__init__:389][39m No controls to apply on 'loader'
|
||||||
|
[36m[2021-11-27 11:42:15 DEBUG] [__init__:389][39m No controls to apply on 'loader'
|
||||||
|
[36m[2021-11-27 11:42:15 DEBUG] [caching:24][39m Building activity cache...
|
||||||
|
[36m[2021-11-27 11:42:15 DEBUG] [caching:35][39m Cached 2 activities
|
||||||
|
[32m[2021-11-27 11:42:15 INFO] [experiment:58][39m Validating the experiment's syntax
|
||||||
|
[36m[2021-11-27 11:42:15 DEBUG] [configuration:54][39m Loading configuration...
|
||||||
|
[36m[2021-11-27 11:42:15 DEBUG] [secret:78][39m Loading secrets...
|
||||||
|
[36m[2021-11-27 11:42:15 DEBUG] [secret:104][39m Done loading secrets
|
||||||
|
[32m[2021-11-27 11:42:15 INFO] [experiment:109][39m Experiment looks valid
|
||||||
|
[36m[2021-11-27 11:42:15 DEBUG] [caching:42][39m Clearing activities cache
|
||||||
|
[36m[2021-11-27 11:42:15 DEBUG] [caching:24][39m Building activity cache...
|
||||||
|
[36m[2021-11-27 11:42:15 DEBUG] [caching:35][39m Cached 2 activities
|
||||||
|
[36m[2021-11-27 11:42:15 DEBUG] [configuration:54][39m Loading configuration...
|
||||||
|
[36m[2021-11-27 11:42:15 DEBUG] [secret:78][39m Loading secrets...
|
||||||
|
[36m[2021-11-27 11:42:15 DEBUG] [secret:104][39m Done loading secrets
|
||||||
|
[32m[2021-11-27 11:42:15 INFO] [run:319][39m Running experiment: Testing kill & restart
|
||||||
|
[36m[2021-11-27 11:42:15 DEBUG] [__init__:49][39m Initializing controls
|
||||||
|
[32m[2021-11-27 11:42:15 INFO] [run:336][39m Steady-state strategy: default
|
||||||
|
[32m[2021-11-27 11:42:15 INFO] [run:340][39m Rollbacks strategy: default
|
||||||
|
[32m[2021-11-27 11:42:15 INFO] [run:345][39m No steady state hypothesis defined. That's ok, just exploring.
|
||||||
|
[36m[2021-11-27 11:42:15 DEBUG] [__init__:389][39m No controls to apply on 'experiment'
|
||||||
|
[32m[2021-11-27 11:42:15 INFO] [run:599][39m Playing your experiment's method now...
|
||||||
|
[36m[2021-11-27 11:42:15 DEBUG] [__init__:389][39m No controls to apply on 'method'
|
||||||
|
[36m[2021-11-27 11:42:15 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[32m[2021-11-27 11:42:15 INFO] [activity:188][39m Action: enable_chaosmonkey
|
||||||
|
[36m[2021-11-27 11:42:15 DEBUG] [python:33][39m Activity 'enable_chaosmonkey' loaded from '/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaosspring/actions.py'
|
||||||
|
[36m[2021-11-27 11:42:15 DEBUG] [activity:205][39m => succeeded with '{"status":"Chaos Monkey is enabled","enabledAt":"2021-11-27T10:42:15.310527Z"}'
|
||||||
|
[36m[2021-11-27 11:42:15 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[36m[2021-11-27 11:42:15 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[32m[2021-11-27 11:42:15 INFO] [activity:188][39m Action: configure_assaults
|
||||||
|
[36m[2021-11-27 11:42:15 DEBUG] [python:33][39m Activity 'configure_assaults' loaded from '/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaosspring/actions.py'
|
||||||
|
[36m[2021-11-27 11:42:15 DEBUG] [activity:205][39m => succeeded with 'Assault config has changed'
|
||||||
|
[36m[2021-11-27 11:42:15 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[36m[2021-11-27 11:42:15 DEBUG] [__init__:389][39m No controls to apply on 'method'
|
||||||
|
[32m[2021-11-27 11:42:15 INFO] [run:885][39m Let's rollback...
|
||||||
|
[36m[2021-11-27 11:42:15 DEBUG] [__init__:389][39m No controls to apply on 'rollback'
|
||||||
|
[32m[2021-11-27 11:42:15 INFO] [rollback:27][39m No declared rollbacks, let's move on.
|
||||||
|
[36m[2021-11-27 11:42:15 DEBUG] [__init__:389][39m No controls to apply on 'rollback'
|
||||||
|
[32m[2021-11-27 11:42:15 INFO] [run:450][39m Experiment ended with status: completed
|
||||||
|
[36m[2021-11-27 11:42:15 DEBUG] [__init__:389][39m No controls to apply on 'experiment'
|
||||||
|
[36m[2021-11-27 11:42:15 DEBUG] [__init__:82][39m Cleaning up controls
|
||||||
|
[36m[2021-11-27 11:42:15 DEBUG] [caching:42][39m Clearing activities cache
|
||||||
|
[36m[2021-11-27 11:43:22 DEBUG] [cli:103][39m ###############################################################################
|
||||||
|
[36m[2021-11-27 11:43:22 DEBUG] [cli:104][39m Running command 'run'
|
||||||
|
[36m[2021-11-27 11:43:22 DEBUG] [cli:108][39m Using settings file '/Users/maece/.chaostoolkit/settings.yaml'
|
||||||
|
[36m[2021-11-27 11:43:23 DEBUG] [settings:30][39m The Chaos Toolkit settings file could not be found at '/Users/maece/.chaostoolkit/settings.yaml'.
|
||||||
|
[36m[2021-11-27 11:43:23 DEBUG] [__init__:389][39m No controls to apply on 'loader'
|
||||||
|
[36m[2021-11-27 11:43:23 DEBUG] [__init__:389][39m No controls to apply on 'loader'
|
||||||
|
[36m[2021-11-27 11:43:23 DEBUG] [caching:24][39m Building activity cache...
|
||||||
|
[36m[2021-11-27 11:43:23 DEBUG] [caching:35][39m Cached 2 activities
|
||||||
|
[32m[2021-11-27 11:43:23 INFO] [experiment:58][39m Validating the experiment's syntax
|
||||||
|
[36m[2021-11-27 11:43:23 DEBUG] [configuration:54][39m Loading configuration...
|
||||||
|
[36m[2021-11-27 11:43:23 DEBUG] [secret:78][39m Loading secrets...
|
||||||
|
[36m[2021-11-27 11:43:23 DEBUG] [secret:104][39m Done loading secrets
|
||||||
|
[32m[2021-11-27 11:43:23 INFO] [experiment:109][39m Experiment looks valid
|
||||||
|
[36m[2021-11-27 11:43:23 DEBUG] [caching:42][39m Clearing activities cache
|
||||||
|
[36m[2021-11-27 11:43:23 DEBUG] [caching:24][39m Building activity cache...
|
||||||
|
[36m[2021-11-27 11:43:23 DEBUG] [caching:35][39m Cached 2 activities
|
||||||
|
[36m[2021-11-27 11:43:23 DEBUG] [configuration:54][39m Loading configuration...
|
||||||
|
[36m[2021-11-27 11:43:23 DEBUG] [secret:78][39m Loading secrets...
|
||||||
|
[36m[2021-11-27 11:43:23 DEBUG] [secret:104][39m Done loading secrets
|
||||||
|
[32m[2021-11-27 11:43:23 INFO] [run:319][39m Running experiment: What is the impact of an expired certificate on our application chain?
|
||||||
|
[36m[2021-11-27 11:43:23 DEBUG] [__init__:49][39m Initializing controls
|
||||||
|
[32m[2021-11-27 11:43:23 INFO] [run:336][39m Steady-state strategy: default
|
||||||
|
[32m[2021-11-27 11:43:23 INFO] [run:340][39m Rollbacks strategy: default
|
||||||
|
[32m[2021-11-27 11:43:23 INFO] [run:345][39m No steady state hypothesis defined. That's ok, just exploring.
|
||||||
|
[36m[2021-11-27 11:43:23 DEBUG] [__init__:389][39m No controls to apply on 'experiment'
|
||||||
|
[32m[2021-11-27 11:43:23 INFO] [run:599][39m Playing your experiment's method now...
|
||||||
|
[36m[2021-11-27 11:43:23 DEBUG] [__init__:389][39m No controls to apply on 'method'
|
||||||
|
[36m[2021-11-27 11:43:23 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[32m[2021-11-27 11:43:23 INFO] [activity:188][39m Action: enable_chaosmonkey
|
||||||
|
[36m[2021-11-27 11:43:23 DEBUG] [python:33][39m Activity 'enable_chaosmonkey' loaded from '/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaosspring/actions.py'
|
||||||
|
[36m[2021-11-27 11:43:23 DEBUG] [activity:205][39m => succeeded with '{"status":"Chaos Monkey is enabled","enabledAt":"2021-11-27T10:43:23.565576Z"}'
|
||||||
|
[36m[2021-11-27 11:43:23 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[36m[2021-11-27 11:43:23 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[32m[2021-11-27 11:43:23 INFO] [activity:188][39m Action: configure_assaults
|
||||||
|
[36m[2021-11-27 11:43:23 DEBUG] [python:33][39m Activity 'configure_assaults' loaded from '/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaosspring/actions.py'
|
||||||
|
[36m[2021-11-27 11:43:23 DEBUG] [activity:205][39m => succeeded with 'Assault config has changed'
|
||||||
|
[36m[2021-11-27 11:43:23 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[36m[2021-11-27 11:43:23 DEBUG] [__init__:389][39m No controls to apply on 'method'
|
||||||
|
[32m[2021-11-27 11:43:23 INFO] [run:885][39m Let's rollback...
|
||||||
|
[36m[2021-11-27 11:43:23 DEBUG] [__init__:389][39m No controls to apply on 'rollback'
|
||||||
|
[32m[2021-11-27 11:43:23 INFO] [rollback:27][39m No declared rollbacks, let's move on.
|
||||||
|
[36m[2021-11-27 11:43:23 DEBUG] [__init__:389][39m No controls to apply on 'rollback'
|
||||||
|
[32m[2021-11-27 11:43:23 INFO] [run:450][39m Experiment ended with status: completed
|
||||||
|
[36m[2021-11-27 11:43:23 DEBUG] [__init__:389][39m No controls to apply on 'experiment'
|
||||||
|
[36m[2021-11-27 11:43:23 DEBUG] [__init__:82][39m Cleaning up controls
|
||||||
|
[36m[2021-11-27 11:43:23 DEBUG] [caching:42][39m Clearing activities cache
|
||||||
|
[36m[2021-11-27 11:43:50 DEBUG] [cli:103][39m ###############################################################################
|
||||||
|
[36m[2021-11-27 11:43:50 DEBUG] [cli:104][39m Running command 'run'
|
||||||
|
[36m[2021-11-27 11:43:50 DEBUG] [cli:108][39m Using settings file '/Users/maece/.chaostoolkit/settings.yaml'
|
||||||
|
[36m[2021-11-27 11:43:50 DEBUG] [settings:30][39m The Chaos Toolkit settings file could not be found at '/Users/maece/.chaostoolkit/settings.yaml'.
|
||||||
|
[36m[2021-11-27 11:43:50 DEBUG] [__init__:389][39m No controls to apply on 'loader'
|
||||||
|
[36m[2021-11-27 11:43:50 DEBUG] [__init__:389][39m No controls to apply on 'loader'
|
||||||
|
[36m[2021-11-27 11:43:50 DEBUG] [caching:24][39m Building activity cache...
|
||||||
|
[36m[2021-11-27 11:43:50 DEBUG] [caching:35][39m Cached 2 activities
|
||||||
|
[32m[2021-11-27 11:43:50 INFO] [experiment:58][39m Validating the experiment's syntax
|
||||||
|
[36m[2021-11-27 11:43:50 DEBUG] [configuration:54][39m Loading configuration...
|
||||||
|
[36m[2021-11-27 11:43:50 DEBUG] [secret:78][39m Loading secrets...
|
||||||
|
[36m[2021-11-27 11:43:50 DEBUG] [secret:104][39m Done loading secrets
|
||||||
|
[32m[2021-11-27 11:43:50 INFO] [experiment:109][39m Experiment looks valid
|
||||||
|
[36m[2021-11-27 11:43:50 DEBUG] [caching:42][39m Clearing activities cache
|
||||||
|
[36m[2021-11-27 11:43:50 DEBUG] [caching:24][39m Building activity cache...
|
||||||
|
[36m[2021-11-27 11:43:50 DEBUG] [caching:35][39m Cached 2 activities
|
||||||
|
[36m[2021-11-27 11:43:50 DEBUG] [configuration:54][39m Loading configuration...
|
||||||
|
[36m[2021-11-27 11:43:50 DEBUG] [secret:78][39m Loading secrets...
|
||||||
|
[36m[2021-11-27 11:43:50 DEBUG] [secret:104][39m Done loading secrets
|
||||||
|
[32m[2021-11-27 11:43:50 INFO] [run:319][39m Running experiment: What is the impact of an expired certificate on our application chain?
|
||||||
|
[36m[2021-11-27 11:43:50 DEBUG] [__init__:49][39m Initializing controls
|
||||||
|
[32m[2021-11-27 11:43:50 INFO] [run:336][39m Steady-state strategy: default
|
||||||
|
[32m[2021-11-27 11:43:50 INFO] [run:340][39m Rollbacks strategy: default
|
||||||
|
[32m[2021-11-27 11:43:50 INFO] [run:345][39m No steady state hypothesis defined. That's ok, just exploring.
|
||||||
|
[36m[2021-11-27 11:43:50 DEBUG] [__init__:389][39m No controls to apply on 'experiment'
|
||||||
|
[32m[2021-11-27 11:43:50 INFO] [run:599][39m Playing your experiment's method now...
|
||||||
|
[36m[2021-11-27 11:43:50 DEBUG] [__init__:389][39m No controls to apply on 'method'
|
||||||
|
[36m[2021-11-27 11:43:50 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[32m[2021-11-27 11:43:50 INFO] [activity:188][39m Action: enable_chaosmonkey
|
||||||
|
[36m[2021-11-27 11:43:50 DEBUG] [python:33][39m Activity 'enable_chaosmonkey' loaded from '/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaosspring/actions.py'
|
||||||
|
[36m[2021-11-27 11:43:50 DEBUG] [activity:205][39m => succeeded with '{"status":"Chaos Monkey is enabled","enabledAt":"2021-11-27T10:43:50.888054Z"}'
|
||||||
|
[36m[2021-11-27 11:43:50 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[36m[2021-11-27 11:43:50 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[32m[2021-11-27 11:43:50 INFO] [activity:188][39m Action: configure_assaults
|
||||||
|
[36m[2021-11-27 11:43:50 DEBUG] [python:33][39m Activity 'configure_assaults' loaded from '/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaosspring/actions.py'
|
||||||
|
[36m[2021-11-27 11:43:50 DEBUG] [activity:205][39m => succeeded with 'Assault config has changed'
|
||||||
|
[36m[2021-11-27 11:43:50 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[36m[2021-11-27 11:43:50 DEBUG] [__init__:389][39m No controls to apply on 'method'
|
||||||
|
[32m[2021-11-27 11:43:50 INFO] [run:885][39m Let's rollback...
|
||||||
|
[36m[2021-11-27 11:43:50 DEBUG] [__init__:389][39m No controls to apply on 'rollback'
|
||||||
|
[32m[2021-11-27 11:43:50 INFO] [rollback:27][39m No declared rollbacks, let's move on.
|
||||||
|
[36m[2021-11-27 11:43:50 DEBUG] [__init__:389][39m No controls to apply on 'rollback'
|
||||||
|
[32m[2021-11-27 11:43:50 INFO] [run:450][39m Experiment ended with status: completed
|
||||||
|
[36m[2021-11-27 11:43:50 DEBUG] [__init__:389][39m No controls to apply on 'experiment'
|
||||||
|
[36m[2021-11-27 11:43:50 DEBUG] [__init__:82][39m Cleaning up controls
|
||||||
|
[36m[2021-11-27 11:43:50 DEBUG] [caching:42][39m Clearing activities cache
|
||||||
|
[36m[2021-11-27 11:47:20 DEBUG] [cli:103][39m ###############################################################################
|
||||||
|
[36m[2021-11-27 11:47:20 DEBUG] [cli:104][39m Running command 'run'
|
||||||
|
[36m[2021-11-27 11:47:20 DEBUG] [cli:108][39m Using settings file '/Users/maece/.chaostoolkit/settings.yaml'
|
||||||
|
[36m[2021-11-27 11:47:21 DEBUG] [settings:30][39m The Chaos Toolkit settings file could not be found at '/Users/maece/.chaostoolkit/settings.yaml'.
|
||||||
|
[36m[2021-11-27 11:47:21 DEBUG] [__init__:389][39m No controls to apply on 'loader'
|
||||||
|
[36m[2021-11-27 11:47:21 DEBUG] [__init__:389][39m No controls to apply on 'loader'
|
||||||
|
[36m[2021-11-27 11:47:21 DEBUG] [caching:24][39m Building activity cache...
|
||||||
|
[36m[2021-11-27 11:47:21 DEBUG] [caching:35][39m Cached 0 activities
|
||||||
|
[32m[2021-11-27 11:47:21 INFO] [experiment:58][39m Validating the experiment's syntax
|
||||||
|
[36m[2021-11-27 11:47:21 DEBUG] [configuration:54][39m Loading configuration...
|
||||||
|
[36m[2021-11-27 11:47:21 DEBUG] [secret:78][39m Loading secrets...
|
||||||
|
[36m[2021-11-27 11:47:21 DEBUG] [secret:104][39m Done loading secrets
|
||||||
|
[32m[2021-11-27 11:47:21 INFO] [experiment:109][39m Experiment looks valid
|
||||||
|
[36m[2021-11-27 11:47:21 DEBUG] [caching:42][39m Clearing activities cache
|
||||||
|
[36m[2021-11-27 11:47:21 DEBUG] [caching:24][39m Building activity cache...
|
||||||
|
[36m[2021-11-27 11:47:21 DEBUG] [caching:35][39m Cached 0 activities
|
||||||
|
[36m[2021-11-27 11:47:21 DEBUG] [configuration:54][39m Loading configuration...
|
||||||
|
[36m[2021-11-27 11:47:21 DEBUG] [secret:78][39m Loading secrets...
|
||||||
|
[36m[2021-11-27 11:47:21 DEBUG] [secret:104][39m Done loading secrets
|
||||||
|
[32m[2021-11-27 11:47:21 INFO] [run:319][39m Running experiment: Disable chaos monkey
|
||||||
|
[36m[2021-11-27 11:47:21 DEBUG] [__init__:49][39m Initializing controls
|
||||||
|
[32m[2021-11-27 11:47:21 INFO] [run:336][39m Steady-state strategy: default
|
||||||
|
[32m[2021-11-27 11:47:21 INFO] [run:340][39m Rollbacks strategy: default
|
||||||
|
[32m[2021-11-27 11:47:21 INFO] [run:345][39m No steady state hypothesis defined. That's ok, just exploring.
|
||||||
|
[36m[2021-11-27 11:47:21 DEBUG] [__init__:389][39m No controls to apply on 'experiment'
|
||||||
|
[32m[2021-11-27 11:47:21 INFO] [run:599][39m Playing your experiment's method now...
|
||||||
|
[36m[2021-11-27 11:47:21 DEBUG] [__init__:389][39m No controls to apply on 'method'
|
||||||
|
[32m[2021-11-27 11:47:21 INFO] [activity:113][39m No declared activities, let's move on.
|
||||||
|
[36m[2021-11-27 11:47:21 DEBUG] [__init__:389][39m No controls to apply on 'method'
|
||||||
|
[32m[2021-11-27 11:47:21 INFO] [run:885][39m Let's rollback...
|
||||||
|
[36m[2021-11-27 11:47:21 DEBUG] [__init__:389][39m No controls to apply on 'rollback'
|
||||||
|
[32m[2021-11-27 11:47:21 INFO] [rollback:30][39m Rollback: disable_chaosmonkey
|
||||||
|
[36m[2021-11-27 11:47:21 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[32m[2021-11-27 11:47:21 INFO] [activity:188][39m Action: disable_chaosmonkey
|
||||||
|
[36m[2021-11-27 11:47:21 DEBUG] [python:33][39m Activity 'disable_chaosmonkey' loaded from '/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaosspring/actions.py'
|
||||||
|
[36m[2021-11-27 11:47:21 DEBUG] [activity:260][39m Activity failed
|
||||||
|
Traceback (most recent call last):
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/urllib3/connection.py", line 174, in _new_conn
|
||||||
|
conn = connection.create_connection(
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/urllib3/util/connection.py", line 96, in create_connection
|
||||||
|
raise err
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/urllib3/util/connection.py", line 86, in create_connection
|
||||||
|
sock.connect(sa)
|
||||||
|
ConnectionRefusedError: [Errno 61] Connection refused
|
||||||
|
|
||||||
|
During handling of the above exception, another exception occurred:
|
||||||
|
|
||||||
|
Traceback (most recent call last):
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/urllib3/connectionpool.py", line 699, in urlopen
|
||||||
|
httplib_response = self._make_request(
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/urllib3/connectionpool.py", line 394, in _make_request
|
||||||
|
conn.request(method, url, **httplib_request_kw)
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/urllib3/connection.py", line 239, in request
|
||||||
|
super(HTTPConnection, self).request(method, url, body=body, headers=headers)
|
||||||
|
File "/opt/homebrew/Cellar/python@3.9/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1279, in request
|
||||||
|
self._send_request(method, url, body, headers, encode_chunked)
|
||||||
|
File "/opt/homebrew/Cellar/python@3.9/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1325, in _send_request
|
||||||
|
self.endheaders(body, encode_chunked=encode_chunked)
|
||||||
|
File "/opt/homebrew/Cellar/python@3.9/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1274, in endheaders
|
||||||
|
self._send_output(message_body, encode_chunked=encode_chunked)
|
||||||
|
File "/opt/homebrew/Cellar/python@3.9/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1034, in _send_output
|
||||||
|
self.send(msg)
|
||||||
|
File "/opt/homebrew/Cellar/python@3.9/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 974, in send
|
||||||
|
self.connect()
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/urllib3/connection.py", line 205, in connect
|
||||||
|
conn = self._new_conn()
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/urllib3/connection.py", line 186, in _new_conn
|
||||||
|
raise NewConnectionError(
|
||||||
|
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x1024bf220>: Failed to establish a new connection: [Errno 61] Connection refused
|
||||||
|
|
||||||
|
During handling of the above exception, another exception occurred:
|
||||||
|
|
||||||
|
Traceback (most recent call last):
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/requests/adapters.py", line 439, in send
|
||||||
|
resp = conn.urlopen(
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/urllib3/connectionpool.py", line 755, in urlopen
|
||||||
|
retries = retries.increment(
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/urllib3/util/retry.py", line 574, in increment
|
||||||
|
raise MaxRetryError(_pool, url, error or ResponseError(cause))
|
||||||
|
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8080): Max retries exceeded with url: /actuator/chaosmonkey/disable (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x1024bf220>: Failed to establish a new connection: [Errno 61] Connection refused'))
|
||||||
|
|
||||||
|
During handling of the above exception, another exception occurred:
|
||||||
|
|
||||||
|
Traceback (most recent call last):
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaoslib/provider/python.py", line 56, in run_python_activity
|
||||||
|
return func(**arguments)
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaosspring/actions.py", line 53, in disable_chaosmonkey
|
||||||
|
response = api.call_api(
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaosspring/api.py", line 56, in call_api
|
||||||
|
return requests.request(
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/requests/api.py", line 61, in request
|
||||||
|
return session.request(method=method, url=url, **kwargs)
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/requests/sessions.py", line 542, in request
|
||||||
|
resp = self.send(prep, **send_kwargs)
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/requests/sessions.py", line 655, in send
|
||||||
|
r = adapter.send(request, **kwargs)
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/requests/adapters.py", line 516, in send
|
||||||
|
raise ConnectionError(e, request=request)
|
||||||
|
requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8080): Max retries exceeded with url: /actuator/chaosmonkey/disable (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x1024bf220>: Failed to establish a new connection: [Errno 61] Connection refused'))
|
||||||
|
|
||||||
|
During handling of the above exception, another exception occurred:
|
||||||
|
|
||||||
|
Traceback (most recent call last):
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaoslib/activity.py", line 253, in run_activity
|
||||||
|
result = run_python_activity(activity, configuration, secrets)
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaoslib/provider/python.py", line 58, in run_python_activity
|
||||||
|
raise ActivityFailed(
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaoslib/provider/python.py", line 56, in run_python_activity
|
||||||
|
return func(**arguments)
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaosspring/actions.py", line 53, in disable_chaosmonkey
|
||||||
|
response = api.call_api(
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaosspring/api.py", line 56, in call_api
|
||||||
|
return requests.request(
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/requests/api.py", line 61, in request
|
||||||
|
return session.request(method=method, url=url, **kwargs)
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/requests/sessions.py", line 542, in request
|
||||||
|
resp = self.send(prep, **send_kwargs)
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/requests/sessions.py", line 655, in send
|
||||||
|
r = adapter.send(request, **kwargs)
|
||||||
|
File "/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/requests/adapters.py", line 516, in send
|
||||||
|
raise ConnectionError(e, request=request)
|
||||||
|
chaoslib.exceptions.ActivityFailed: requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8080): Max retries exceeded with url: /actuator/chaosmonkey/disable (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x1024bf220>: Failed to establish a new connection: [Errno 61] Connection refused'))
|
||||||
|
[31m[2021-11-27 11:47:21 ERROR] [activity:213][39m => failed: requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8080): Max retries exceeded with url: /actuator/chaosmonkey/disable (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x1024bf220>: Failed to establish a new connection: [Errno 61] Connection refused'))
|
||||||
|
[36m[2021-11-27 11:47:21 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[36m[2021-11-27 11:47:21 DEBUG] [__init__:389][39m No controls to apply on 'rollback'
|
||||||
|
[32m[2021-11-27 11:47:21 INFO] [run:450][39m Experiment ended with status: completed
|
||||||
|
[36m[2021-11-27 11:47:21 DEBUG] [__init__:389][39m No controls to apply on 'experiment'
|
||||||
|
[36m[2021-11-27 11:47:21 DEBUG] [__init__:82][39m Cleaning up controls
|
||||||
|
[36m[2021-11-27 11:47:21 DEBUG] [caching:42][39m Clearing activities cache
|
||||||
|
[36m[2021-11-27 11:47:29 DEBUG] [cli:103][39m ###############################################################################
|
||||||
|
[36m[2021-11-27 11:47:29 DEBUG] [cli:104][39m Running command 'run'
|
||||||
|
[36m[2021-11-27 11:47:29 DEBUG] [cli:108][39m Using settings file '/Users/maece/.chaostoolkit/settings.yaml'
|
||||||
|
[36m[2021-11-27 11:47:30 DEBUG] [settings:30][39m The Chaos Toolkit settings file could not be found at '/Users/maece/.chaostoolkit/settings.yaml'.
|
||||||
|
[36m[2021-11-27 11:47:30 DEBUG] [__init__:389][39m No controls to apply on 'loader'
|
||||||
|
[36m[2021-11-27 11:47:30 DEBUG] [__init__:389][39m No controls to apply on 'loader'
|
||||||
|
[36m[2021-11-27 11:47:30 DEBUG] [caching:24][39m Building activity cache...
|
||||||
|
[36m[2021-11-27 11:47:30 DEBUG] [caching:35][39m Cached 0 activities
|
||||||
|
[32m[2021-11-27 11:47:30 INFO] [experiment:58][39m Validating the experiment's syntax
|
||||||
|
[36m[2021-11-27 11:47:30 DEBUG] [configuration:54][39m Loading configuration...
|
||||||
|
[36m[2021-11-27 11:47:30 DEBUG] [secret:78][39m Loading secrets...
|
||||||
|
[36m[2021-11-27 11:47:30 DEBUG] [secret:104][39m Done loading secrets
|
||||||
|
[32m[2021-11-27 11:47:30 INFO] [experiment:109][39m Experiment looks valid
|
||||||
|
[36m[2021-11-27 11:47:30 DEBUG] [caching:42][39m Clearing activities cache
|
||||||
|
[36m[2021-11-27 11:47:30 DEBUG] [caching:24][39m Building activity cache...
|
||||||
|
[36m[2021-11-27 11:47:30 DEBUG] [caching:35][39m Cached 0 activities
|
||||||
|
[36m[2021-11-27 11:47:30 DEBUG] [configuration:54][39m Loading configuration...
|
||||||
|
[36m[2021-11-27 11:47:30 DEBUG] [secret:78][39m Loading secrets...
|
||||||
|
[36m[2021-11-27 11:47:30 DEBUG] [secret:104][39m Done loading secrets
|
||||||
|
[32m[2021-11-27 11:47:30 INFO] [run:319][39m Running experiment: Disable chaos monkey
|
||||||
|
[36m[2021-11-27 11:47:30 DEBUG] [__init__:49][39m Initializing controls
|
||||||
|
[32m[2021-11-27 11:47:30 INFO] [run:336][39m Steady-state strategy: default
|
||||||
|
[32m[2021-11-27 11:47:30 INFO] [run:340][39m Rollbacks strategy: default
|
||||||
|
[32m[2021-11-27 11:47:30 INFO] [run:345][39m No steady state hypothesis defined. That's ok, just exploring.
|
||||||
|
[36m[2021-11-27 11:47:30 DEBUG] [__init__:389][39m No controls to apply on 'experiment'
|
||||||
|
[32m[2021-11-27 11:47:30 INFO] [run:599][39m Playing your experiment's method now...
|
||||||
|
[36m[2021-11-27 11:47:30 DEBUG] [__init__:389][39m No controls to apply on 'method'
|
||||||
|
[32m[2021-11-27 11:47:30 INFO] [activity:113][39m No declared activities, let's move on.
|
||||||
|
[36m[2021-11-27 11:47:30 DEBUG] [__init__:389][39m No controls to apply on 'method'
|
||||||
|
[32m[2021-11-27 11:47:30 INFO] [run:885][39m Let's rollback...
|
||||||
|
[36m[2021-11-27 11:47:30 DEBUG] [__init__:389][39m No controls to apply on 'rollback'
|
||||||
|
[32m[2021-11-27 11:47:30 INFO] [rollback:30][39m Rollback: disable_chaosmonkey
|
||||||
|
[36m[2021-11-27 11:47:30 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[32m[2021-11-27 11:47:30 INFO] [activity:188][39m Action: disable_chaosmonkey
|
||||||
|
[36m[2021-11-27 11:47:30 DEBUG] [python:33][39m Activity 'disable_chaosmonkey' loaded from '/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaosspring/actions.py'
|
||||||
|
[36m[2021-11-27 11:47:30 DEBUG] [activity:205][39m => succeeded with '{"status":"Chaos Monkey is disabled","disabledAt":"2021-11-27T10:47:30.172107Z"}'
|
||||||
|
[36m[2021-11-27 11:47:30 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[36m[2021-11-27 11:47:30 DEBUG] [__init__:389][39m No controls to apply on 'rollback'
|
||||||
|
[32m[2021-11-27 11:47:30 INFO] [run:450][39m Experiment ended with status: completed
|
||||||
|
[36m[2021-11-27 11:47:30 DEBUG] [__init__:389][39m No controls to apply on 'experiment'
|
||||||
|
[36m[2021-11-27 11:47:30 DEBUG] [__init__:82][39m Cleaning up controls
|
||||||
|
[36m[2021-11-27 11:47:30 DEBUG] [caching:42][39m Clearing activities cache
|
||||||
|
[36m[2021-11-27 11:49:33 DEBUG] [cli:103][39m ###############################################################################
|
||||||
|
[36m[2021-11-27 11:49:33 DEBUG] [cli:104][39m Running command 'run'
|
||||||
|
[36m[2021-11-27 11:49:33 DEBUG] [cli:108][39m Using settings file '/Users/maece/.chaostoolkit/settings.yaml'
|
||||||
|
[36m[2021-11-27 11:49:33 DEBUG] [settings:30][39m The Chaos Toolkit settings file could not be found at '/Users/maece/.chaostoolkit/settings.yaml'.
|
||||||
|
[36m[2021-11-27 11:49:33 DEBUG] [__init__:389][39m No controls to apply on 'loader'
|
||||||
|
[36m[2021-11-27 11:49:33 DEBUG] [__init__:389][39m No controls to apply on 'loader'
|
||||||
|
[36m[2021-11-27 11:49:33 DEBUG] [caching:24][39m Building activity cache...
|
||||||
|
[36m[2021-11-27 11:49:33 DEBUG] [caching:35][39m Cached 2 activities
|
||||||
|
[32m[2021-11-27 11:49:33 INFO] [experiment:58][39m Validating the experiment's syntax
|
||||||
|
[36m[2021-11-27 11:49:33 DEBUG] [configuration:54][39m Loading configuration...
|
||||||
|
[36m[2021-11-27 11:49:33 DEBUG] [secret:78][39m Loading secrets...
|
||||||
|
[36m[2021-11-27 11:49:33 DEBUG] [secret:104][39m Done loading secrets
|
||||||
|
[32m[2021-11-27 11:49:33 INFO] [experiment:109][39m Experiment looks valid
|
||||||
|
[36m[2021-11-27 11:49:33 DEBUG] [caching:42][39m Clearing activities cache
|
||||||
|
[36m[2021-11-27 11:49:33 DEBUG] [caching:24][39m Building activity cache...
|
||||||
|
[36m[2021-11-27 11:49:33 DEBUG] [caching:35][39m Cached 2 activities
|
||||||
|
[36m[2021-11-27 11:49:33 DEBUG] [configuration:54][39m Loading configuration...
|
||||||
|
[36m[2021-11-27 11:49:33 DEBUG] [secret:78][39m Loading secrets...
|
||||||
|
[36m[2021-11-27 11:49:33 DEBUG] [secret:104][39m Done loading secrets
|
||||||
|
[32m[2021-11-27 11:49:33 INFO] [run:319][39m Running experiment: What is the impact of an expired certificate on our application chain?
|
||||||
|
[36m[2021-11-27 11:49:33 DEBUG] [__init__:49][39m Initializing controls
|
||||||
|
[32m[2021-11-27 11:49:33 INFO] [run:336][39m Steady-state strategy: default
|
||||||
|
[32m[2021-11-27 11:49:33 INFO] [run:340][39m Rollbacks strategy: default
|
||||||
|
[32m[2021-11-27 11:49:33 INFO] [run:345][39m No steady state hypothesis defined. That's ok, just exploring.
|
||||||
|
[36m[2021-11-27 11:49:33 DEBUG] [__init__:389][39m No controls to apply on 'experiment'
|
||||||
|
[32m[2021-11-27 11:49:33 INFO] [run:599][39m Playing your experiment's method now...
|
||||||
|
[36m[2021-11-27 11:49:33 DEBUG] [__init__:389][39m No controls to apply on 'method'
|
||||||
|
[36m[2021-11-27 11:49:33 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[32m[2021-11-27 11:49:33 INFO] [activity:188][39m Action: enable_chaosmonkey
|
||||||
|
[36m[2021-11-27 11:49:33 DEBUG] [python:33][39m Activity 'enable_chaosmonkey' loaded from '/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaosspring/actions.py'
|
||||||
|
[36m[2021-11-27 11:49:33 DEBUG] [activity:205][39m => succeeded with '{"status":"Chaos Monkey is enabled","enabledAt":"2021-11-27T10:49:33.912573Z"}'
|
||||||
|
[36m[2021-11-27 11:49:33 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[36m[2021-11-27 11:49:33 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[32m[2021-11-27 11:49:33 INFO] [activity:188][39m Action: configure_assaults
|
||||||
|
[36m[2021-11-27 11:49:33 DEBUG] [python:33][39m Activity 'configure_assaults' loaded from '/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaosspring/actions.py'
|
||||||
|
[36m[2021-11-27 11:49:34 DEBUG] [activity:205][39m => succeeded with 'Assault config has changed'
|
||||||
|
[36m[2021-11-27 11:49:34 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[36m[2021-11-27 11:49:34 DEBUG] [__init__:389][39m No controls to apply on 'method'
|
||||||
|
[32m[2021-11-27 11:49:34 INFO] [run:885][39m Let's rollback...
|
||||||
|
[36m[2021-11-27 11:49:34 DEBUG] [__init__:389][39m No controls to apply on 'rollback'
|
||||||
|
[32m[2021-11-27 11:49:34 INFO] [rollback:27][39m No declared rollbacks, let's move on.
|
||||||
|
[36m[2021-11-27 11:49:34 DEBUG] [__init__:389][39m No controls to apply on 'rollback'
|
||||||
|
[32m[2021-11-27 11:49:34 INFO] [run:450][39m Experiment ended with status: completed
|
||||||
|
[36m[2021-11-27 11:49:34 DEBUG] [__init__:389][39m No controls to apply on 'experiment'
|
||||||
|
[36m[2021-11-27 11:49:34 DEBUG] [__init__:82][39m Cleaning up controls
|
||||||
|
[36m[2021-11-27 11:49:34 DEBUG] [caching:42][39m Clearing activities cache
|
||||||
|
[36m[2021-11-27 11:50:00 DEBUG] [cli:103][39m ###############################################################################
|
||||||
|
[36m[2021-11-27 11:50:00 DEBUG] [cli:104][39m Running command 'run'
|
||||||
|
[36m[2021-11-27 11:50:00 DEBUG] [cli:108][39m Using settings file '/Users/maece/.chaostoolkit/settings.yaml'
|
||||||
|
[36m[2021-11-27 11:50:01 DEBUG] [settings:30][39m The Chaos Toolkit settings file could not be found at '/Users/maece/.chaostoolkit/settings.yaml'.
|
||||||
|
[36m[2021-11-27 11:50:01 DEBUG] [__init__:389][39m No controls to apply on 'loader'
|
||||||
|
[36m[2021-11-27 11:50:01 DEBUG] [__init__:389][39m No controls to apply on 'loader'
|
||||||
|
[36m[2021-11-27 11:50:01 DEBUG] [caching:24][39m Building activity cache...
|
||||||
|
[36m[2021-11-27 11:50:01 DEBUG] [caching:35][39m Cached 0 activities
|
||||||
|
[32m[2021-11-27 11:50:01 INFO] [experiment:58][39m Validating the experiment's syntax
|
||||||
|
[36m[2021-11-27 11:50:01 DEBUG] [configuration:54][39m Loading configuration...
|
||||||
|
[36m[2021-11-27 11:50:01 DEBUG] [secret:78][39m Loading secrets...
|
||||||
|
[36m[2021-11-27 11:50:01 DEBUG] [secret:104][39m Done loading secrets
|
||||||
|
[32m[2021-11-27 11:50:01 INFO] [experiment:109][39m Experiment looks valid
|
||||||
|
[36m[2021-11-27 11:50:01 DEBUG] [caching:42][39m Clearing activities cache
|
||||||
|
[36m[2021-11-27 11:50:01 DEBUG] [caching:24][39m Building activity cache...
|
||||||
|
[36m[2021-11-27 11:50:01 DEBUG] [caching:35][39m Cached 0 activities
|
||||||
|
[36m[2021-11-27 11:50:01 DEBUG] [configuration:54][39m Loading configuration...
|
||||||
|
[36m[2021-11-27 11:50:01 DEBUG] [secret:78][39m Loading secrets...
|
||||||
|
[36m[2021-11-27 11:50:01 DEBUG] [secret:104][39m Done loading secrets
|
||||||
|
[32m[2021-11-27 11:50:01 INFO] [run:319][39m Running experiment: Disable chaos monkey
|
||||||
|
[36m[2021-11-27 11:50:01 DEBUG] [__init__:49][39m Initializing controls
|
||||||
|
[32m[2021-11-27 11:50:01 INFO] [run:336][39m Steady-state strategy: default
|
||||||
|
[32m[2021-11-27 11:50:01 INFO] [run:340][39m Rollbacks strategy: default
|
||||||
|
[32m[2021-11-27 11:50:01 INFO] [run:345][39m No steady state hypothesis defined. That's ok, just exploring.
|
||||||
|
[36m[2021-11-27 11:50:01 DEBUG] [__init__:389][39m No controls to apply on 'experiment'
|
||||||
|
[32m[2021-11-27 11:50:01 INFO] [run:599][39m Playing your experiment's method now...
|
||||||
|
[36m[2021-11-27 11:50:01 DEBUG] [__init__:389][39m No controls to apply on 'method'
|
||||||
|
[32m[2021-11-27 11:50:01 INFO] [activity:113][39m No declared activities, let's move on.
|
||||||
|
[36m[2021-11-27 11:50:01 DEBUG] [__init__:389][39m No controls to apply on 'method'
|
||||||
|
[32m[2021-11-27 11:50:01 INFO] [run:885][39m Let's rollback...
|
||||||
|
[36m[2021-11-27 11:50:01 DEBUG] [__init__:389][39m No controls to apply on 'rollback'
|
||||||
|
[32m[2021-11-27 11:50:01 INFO] [rollback:30][39m Rollback: disable_chaosmonkey
|
||||||
|
[36m[2021-11-27 11:50:01 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[32m[2021-11-27 11:50:01 INFO] [activity:188][39m Action: disable_chaosmonkey
|
||||||
|
[36m[2021-11-27 11:50:01 DEBUG] [python:33][39m Activity 'disable_chaosmonkey' loaded from '/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaosspring/actions.py'
|
||||||
|
[36m[2021-11-27 11:50:01 DEBUG] [activity:205][39m => succeeded with '{"status":"Chaos Monkey is disabled","disabledAt":"2021-11-27T10:50:01.207712Z"}'
|
||||||
|
[36m[2021-11-27 11:50:01 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[36m[2021-11-27 11:50:01 DEBUG] [__init__:389][39m No controls to apply on 'rollback'
|
||||||
|
[32m[2021-11-27 11:50:01 INFO] [run:450][39m Experiment ended with status: completed
|
||||||
|
[36m[2021-11-27 11:50:01 DEBUG] [__init__:389][39m No controls to apply on 'experiment'
|
||||||
|
[36m[2021-11-27 11:50:01 DEBUG] [__init__:82][39m Cleaning up controls
|
||||||
|
[36m[2021-11-27 11:50:01 DEBUG] [caching:42][39m Clearing activities cache
|
||||||
|
[36m[2021-11-28 18:00:15 DEBUG] [cli:103][39m ###############################################################################
|
||||||
|
[36m[2021-11-28 18:00:15 DEBUG] [cli:104][39m Running command 'run'
|
||||||
|
[36m[2021-11-28 18:00:15 DEBUG] [cli:108][39m Using settings file '/Users/maece/.chaostoolkit/settings.yaml'
|
||||||
|
[36m[2021-11-28 18:00:15 DEBUG] [settings:30][39m The Chaos Toolkit settings file could not be found at '/Users/maece/.chaostoolkit/settings.yaml'.
|
||||||
|
[36m[2021-11-28 18:00:15 DEBUG] [__init__:389][39m No controls to apply on 'loader'
|
||||||
|
[36m[2021-11-28 18:00:15 DEBUG] [__init__:389][39m No controls to apply on 'loader'
|
||||||
|
[36m[2021-11-28 18:00:15 DEBUG] [caching:24][39m Building activity cache...
|
||||||
|
[36m[2021-11-28 18:00:15 DEBUG] [caching:35][39m Cached 2 activities
|
||||||
|
[32m[2021-11-28 18:00:15 INFO] [experiment:58][39m Validating the experiment's syntax
|
||||||
|
[36m[2021-11-28 18:00:15 DEBUG] [configuration:54][39m Loading configuration...
|
||||||
|
[36m[2021-11-28 18:00:15 DEBUG] [secret:78][39m Loading secrets...
|
||||||
|
[36m[2021-11-28 18:00:15 DEBUG] [secret:104][39m Done loading secrets
|
||||||
|
[32m[2021-11-28 18:00:15 INFO] [experiment:109][39m Experiment looks valid
|
||||||
|
[36m[2021-11-28 18:00:15 DEBUG] [caching:42][39m Clearing activities cache
|
||||||
|
[36m[2021-11-28 18:00:15 DEBUG] [caching:24][39m Building activity cache...
|
||||||
|
[36m[2021-11-28 18:00:15 DEBUG] [caching:35][39m Cached 2 activities
|
||||||
|
[36m[2021-11-28 18:00:15 DEBUG] [configuration:54][39m Loading configuration...
|
||||||
|
[36m[2021-11-28 18:00:15 DEBUG] [secret:78][39m Loading secrets...
|
||||||
|
[36m[2021-11-28 18:00:15 DEBUG] [secret:104][39m Done loading secrets
|
||||||
|
[32m[2021-11-28 18:00:15 INFO] [run:319][39m Running experiment: Testing latency
|
||||||
|
[36m[2021-11-28 18:00:15 DEBUG] [__init__:49][39m Initializing controls
|
||||||
|
[32m[2021-11-28 18:00:15 INFO] [run:336][39m Steady-state strategy: default
|
||||||
|
[32m[2021-11-28 18:00:15 INFO] [run:340][39m Rollbacks strategy: default
|
||||||
|
[32m[2021-11-28 18:00:15 INFO] [run:345][39m No steady state hypothesis defined. That's ok, just exploring.
|
||||||
|
[36m[2021-11-28 18:00:15 DEBUG] [__init__:389][39m No controls to apply on 'experiment'
|
||||||
|
[32m[2021-11-28 18:00:15 INFO] [run:599][39m Playing your experiment's method now...
|
||||||
|
[36m[2021-11-28 18:00:15 DEBUG] [__init__:389][39m No controls to apply on 'method'
|
||||||
|
[36m[2021-11-28 18:00:15 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[32m[2021-11-28 18:00:15 INFO] [activity:188][39m Action: enable_chaosmonkey
|
||||||
|
[36m[2021-11-28 18:00:15 DEBUG] [python:33][39m Activity 'enable_chaosmonkey' loaded from '/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaosspring/actions.py'
|
||||||
|
[36m[2021-11-28 18:00:17 DEBUG] [activity:205][39m => succeeded with '{"status":"Chaos Monkey is enabled","enabledAt":"2021-11-28T17:00:16.734825Z"}'
|
||||||
|
[36m[2021-11-28 18:00:17 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[36m[2021-11-28 18:00:17 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[32m[2021-11-28 18:00:17 INFO] [activity:188][39m Action: configure_assaults
|
||||||
|
[36m[2021-11-28 18:00:17 DEBUG] [python:33][39m Activity 'configure_assaults' loaded from '/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaosspring/actions.py'
|
||||||
|
[36m[2021-11-28 18:00:19 DEBUG] [activity:205][39m => succeeded with 'Assault config has changed'
|
||||||
|
[36m[2021-11-28 18:00:19 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[36m[2021-11-28 18:00:19 DEBUG] [__init__:389][39m No controls to apply on 'method'
|
||||||
|
[32m[2021-11-28 18:00:19 INFO] [run:885][39m Let's rollback...
|
||||||
|
[36m[2021-11-28 18:00:19 DEBUG] [__init__:389][39m No controls to apply on 'rollback'
|
||||||
|
[32m[2021-11-28 18:00:19 INFO] [rollback:27][39m No declared rollbacks, let's move on.
|
||||||
|
[36m[2021-11-28 18:00:19 DEBUG] [__init__:389][39m No controls to apply on 'rollback'
|
||||||
|
[32m[2021-11-28 18:00:19 INFO] [run:450][39m Experiment ended with status: completed
|
||||||
|
[36m[2021-11-28 18:00:19 DEBUG] [__init__:389][39m No controls to apply on 'experiment'
|
||||||
|
[36m[2021-11-28 18:00:19 DEBUG] [__init__:82][39m Cleaning up controls
|
||||||
|
[36m[2021-11-28 18:00:19 DEBUG] [caching:42][39m Clearing activities cache
|
||||||
|
[36m[2021-11-28 18:07:50 DEBUG] [cli:103][39m ###############################################################################
|
||||||
|
[36m[2021-11-28 18:07:50 DEBUG] [cli:104][39m Running command 'run'
|
||||||
|
[36m[2021-11-28 18:07:50 DEBUG] [cli:108][39m Using settings file '/Users/maece/.chaostoolkit/settings.yaml'
|
||||||
|
[36m[2021-11-28 18:07:50 DEBUG] [settings:30][39m The Chaos Toolkit settings file could not be found at '/Users/maece/.chaostoolkit/settings.yaml'.
|
||||||
|
[36m[2021-11-28 18:07:50 DEBUG] [__init__:389][39m No controls to apply on 'loader'
|
||||||
|
[36m[2021-11-28 18:07:50 DEBUG] [__init__:389][39m No controls to apply on 'loader'
|
||||||
|
[36m[2021-11-28 18:07:50 DEBUG] [caching:24][39m Building activity cache...
|
||||||
|
[36m[2021-11-28 18:07:50 DEBUG] [caching:35][39m Cached 2 activities
|
||||||
|
[32m[2021-11-28 18:07:50 INFO] [experiment:58][39m Validating the experiment's syntax
|
||||||
|
[36m[2021-11-28 18:07:50 DEBUG] [configuration:54][39m Loading configuration...
|
||||||
|
[36m[2021-11-28 18:07:50 DEBUG] [secret:78][39m Loading secrets...
|
||||||
|
[36m[2021-11-28 18:07:50 DEBUG] [secret:104][39m Done loading secrets
|
||||||
|
[32m[2021-11-28 18:07:50 INFO] [experiment:109][39m Experiment looks valid
|
||||||
|
[36m[2021-11-28 18:07:50 DEBUG] [caching:42][39m Clearing activities cache
|
||||||
|
[36m[2021-11-28 18:07:50 DEBUG] [caching:24][39m Building activity cache...
|
||||||
|
[36m[2021-11-28 18:07:50 DEBUG] [caching:35][39m Cached 2 activities
|
||||||
|
[36m[2021-11-28 18:07:50 DEBUG] [configuration:54][39m Loading configuration...
|
||||||
|
[36m[2021-11-28 18:07:50 DEBUG] [secret:78][39m Loading secrets...
|
||||||
|
[36m[2021-11-28 18:07:51 DEBUG] [secret:104][39m Done loading secrets
|
||||||
|
[32m[2021-11-28 18:07:51 INFO] [run:319][39m Running experiment: Testing latency
|
||||||
|
[36m[2021-11-28 18:07:51 DEBUG] [__init__:49][39m Initializing controls
|
||||||
|
[32m[2021-11-28 18:07:51 INFO] [run:336][39m Steady-state strategy: default
|
||||||
|
[32m[2021-11-28 18:07:51 INFO] [run:340][39m Rollbacks strategy: default
|
||||||
|
[32m[2021-11-28 18:07:51 INFO] [run:345][39m No steady state hypothesis defined. That's ok, just exploring.
|
||||||
|
[36m[2021-11-28 18:07:51 DEBUG] [__init__:389][39m No controls to apply on 'experiment'
|
||||||
|
[32m[2021-11-28 18:07:51 INFO] [run:599][39m Playing your experiment's method now...
|
||||||
|
[36m[2021-11-28 18:07:51 DEBUG] [__init__:389][39m No controls to apply on 'method'
|
||||||
|
[36m[2021-11-28 18:07:51 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[32m[2021-11-28 18:07:51 INFO] [activity:188][39m Action: enable_chaosmonkey
|
||||||
|
[36m[2021-11-28 18:07:51 DEBUG] [python:33][39m Activity 'enable_chaosmonkey' loaded from '/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaosspring/actions.py'
|
||||||
|
[36m[2021-11-28 18:07:51 DEBUG] [activity:205][39m => succeeded with '{"status":"Chaos Monkey is enabled","enabledAt":"2021-11-28T17:07:51.182021Z"}'
|
||||||
|
[36m[2021-11-28 18:07:51 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[36m[2021-11-28 18:07:51 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[32m[2021-11-28 18:07:51 INFO] [activity:188][39m Action: configure_assaults
|
||||||
|
[36m[2021-11-28 18:07:51 DEBUG] [python:33][39m Activity 'configure_assaults' loaded from '/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaosspring/actions.py'
|
||||||
|
[36m[2021-11-28 18:07:51 DEBUG] [activity:205][39m => succeeded with 'Assault config has changed'
|
||||||
|
[36m[2021-11-28 18:07:51 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[36m[2021-11-28 18:07:51 DEBUG] [__init__:389][39m No controls to apply on 'method'
|
||||||
|
[32m[2021-11-28 18:07:51 INFO] [run:885][39m Let's rollback...
|
||||||
|
[36m[2021-11-28 18:07:51 DEBUG] [__init__:389][39m No controls to apply on 'rollback'
|
||||||
|
[32m[2021-11-28 18:07:51 INFO] [rollback:27][39m No declared rollbacks, let's move on.
|
||||||
|
[36m[2021-11-28 18:07:51 DEBUG] [__init__:389][39m No controls to apply on 'rollback'
|
||||||
|
[32m[2021-11-28 18:07:51 INFO] [run:450][39m Experiment ended with status: completed
|
||||||
|
[36m[2021-11-28 18:07:51 DEBUG] [__init__:389][39m No controls to apply on 'experiment'
|
||||||
|
[36m[2021-11-28 18:07:51 DEBUG] [__init__:82][39m Cleaning up controls
|
||||||
|
[36m[2021-11-28 18:07:51 DEBUG] [caching:42][39m Clearing activities cache
|
||||||
|
[36m[2021-11-28 18:09:39 DEBUG] [cli:103][39m ###############################################################################
|
||||||
|
[36m[2021-11-28 18:09:39 DEBUG] [cli:104][39m Running command 'run'
|
||||||
|
[36m[2021-11-28 18:09:39 DEBUG] [cli:108][39m Using settings file '/Users/maece/.chaostoolkit/settings.yaml'
|
||||||
|
[36m[2021-11-28 18:09:40 DEBUG] [settings:30][39m The Chaos Toolkit settings file could not be found at '/Users/maece/.chaostoolkit/settings.yaml'.
|
||||||
|
[36m[2021-11-28 18:09:40 DEBUG] [__init__:389][39m No controls to apply on 'loader'
|
||||||
|
[36m[2021-11-28 18:09:40 DEBUG] [__init__:389][39m No controls to apply on 'loader'
|
||||||
|
[36m[2021-11-28 18:09:40 DEBUG] [caching:24][39m Building activity cache...
|
||||||
|
[36m[2021-11-28 18:09:40 DEBUG] [caching:35][39m Cached 0 activities
|
||||||
|
[32m[2021-11-28 18:09:40 INFO] [experiment:58][39m Validating the experiment's syntax
|
||||||
|
[36m[2021-11-28 18:09:40 DEBUG] [configuration:54][39m Loading configuration...
|
||||||
|
[36m[2021-11-28 18:09:40 DEBUG] [secret:78][39m Loading secrets...
|
||||||
|
[36m[2021-11-28 18:09:40 DEBUG] [secret:104][39m Done loading secrets
|
||||||
|
[32m[2021-11-28 18:09:40 INFO] [experiment:109][39m Experiment looks valid
|
||||||
|
[36m[2021-11-28 18:09:40 DEBUG] [caching:42][39m Clearing activities cache
|
||||||
|
[36m[2021-11-28 18:09:40 DEBUG] [caching:24][39m Building activity cache...
|
||||||
|
[36m[2021-11-28 18:09:40 DEBUG] [caching:35][39m Cached 0 activities
|
||||||
|
[36m[2021-11-28 18:09:40 DEBUG] [configuration:54][39m Loading configuration...
|
||||||
|
[36m[2021-11-28 18:09:40 DEBUG] [secret:78][39m Loading secrets...
|
||||||
|
[36m[2021-11-28 18:09:40 DEBUG] [secret:104][39m Done loading secrets
|
||||||
|
[32m[2021-11-28 18:09:40 INFO] [run:319][39m Running experiment: Disable chaos monkey
|
||||||
|
[36m[2021-11-28 18:09:40 DEBUG] [__init__:49][39m Initializing controls
|
||||||
|
[32m[2021-11-28 18:09:40 INFO] [run:336][39m Steady-state strategy: default
|
||||||
|
[32m[2021-11-28 18:09:40 INFO] [run:340][39m Rollbacks strategy: default
|
||||||
|
[32m[2021-11-28 18:09:40 INFO] [run:345][39m No steady state hypothesis defined. That's ok, just exploring.
|
||||||
|
[36m[2021-11-28 18:09:40 DEBUG] [__init__:389][39m No controls to apply on 'experiment'
|
||||||
|
[32m[2021-11-28 18:09:40 INFO] [run:599][39m Playing your experiment's method now...
|
||||||
|
[36m[2021-11-28 18:09:40 DEBUG] [__init__:389][39m No controls to apply on 'method'
|
||||||
|
[32m[2021-11-28 18:09:40 INFO] [activity:113][39m No declared activities, let's move on.
|
||||||
|
[36m[2021-11-28 18:09:40 DEBUG] [__init__:389][39m No controls to apply on 'method'
|
||||||
|
[32m[2021-11-28 18:09:40 INFO] [run:885][39m Let's rollback...
|
||||||
|
[36m[2021-11-28 18:09:40 DEBUG] [__init__:389][39m No controls to apply on 'rollback'
|
||||||
|
[32m[2021-11-28 18:09:40 INFO] [rollback:30][39m Rollback: disable_chaosmonkey
|
||||||
|
[36m[2021-11-28 18:09:40 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[32m[2021-11-28 18:09:40 INFO] [activity:188][39m Action: disable_chaosmonkey
|
||||||
|
[36m[2021-11-28 18:09:40 DEBUG] [python:33][39m Activity 'disable_chaosmonkey' loaded from '/Users/maece/.venvs/chaostk/lib/python3.9/site-packages/chaosspring/actions.py'
|
||||||
|
[36m[2021-11-28 18:09:40 DEBUG] [activity:205][39m => succeeded with '{"status":"Chaos Monkey is disabled","disabledAt":"2021-11-28T17:09:40.443253Z"}'
|
||||||
|
[36m[2021-11-28 18:09:40 DEBUG] [__init__:389][39m No controls to apply on 'activity'
|
||||||
|
[36m[2021-11-28 18:09:40 DEBUG] [__init__:389][39m No controls to apply on 'rollback'
|
||||||
|
[32m[2021-11-28 18:09:40 INFO] [run:450][39m Experiment ended with status: completed
|
||||||
|
[36m[2021-11-28 18:09:40 DEBUG] [__init__:389][39m No controls to apply on 'experiment'
|
||||||
|
[36m[2021-11-28 18:09:40 DEBUG] [__init__:82][39m Cleaning up controls
|
||||||
|
[36m[2021-11-28 18:09:40 DEBUG] [caching:42][39m Clearing activities cache
|
24
.experiments/tapas-tasks/disable.json
Normal file
24
.experiments/tapas-tasks/disable.json
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
{
|
||||||
|
"title": "Disable chaos monkey",
|
||||||
|
"description": "Disable",
|
||||||
|
"tags": [],
|
||||||
|
"steady-state-hypothesis": {
|
||||||
|
"title": "Hypothesis",
|
||||||
|
"probes": []
|
||||||
|
},
|
||||||
|
"method": [],
|
||||||
|
"rollbacks": [
|
||||||
|
{
|
||||||
|
"name": "disable_chaosmonkey",
|
||||||
|
"provider": {
|
||||||
|
"arguments": {
|
||||||
|
"base_url": "http://localhost:8081/actuator"
|
||||||
|
},
|
||||||
|
"func": "disable_chaosmonkey",
|
||||||
|
"module": "chaosspring.actions",
|
||||||
|
"type": "python"
|
||||||
|
},
|
||||||
|
"type": "action"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
54
.experiments/tapas-tasks/exception.json
Normal file
54
.experiments/tapas-tasks/exception.json
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
{
|
||||||
|
"title": "Testing exceptions",
|
||||||
|
"description": "Testing exceptions!",
|
||||||
|
"tags": [],
|
||||||
|
"steady-state-hypothesis": {
|
||||||
|
"title": "Hypothesis",
|
||||||
|
"probes": []
|
||||||
|
},
|
||||||
|
"method": [
|
||||||
|
{
|
||||||
|
"name": "enable_chaosmonkey",
|
||||||
|
"provider": {
|
||||||
|
"arguments": {
|
||||||
|
"base_url": "http://localhost:8081/actuator"
|
||||||
|
},
|
||||||
|
"func": "enable_chaosmonkey",
|
||||||
|
"module": "chaosspring.actions",
|
||||||
|
"type": "python"
|
||||||
|
},
|
||||||
|
"type": "action"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "configure_assaults",
|
||||||
|
"provider": {
|
||||||
|
"arguments": {
|
||||||
|
"base_url": "http://localhost:8081/actuator",
|
||||||
|
"assaults_configuration": {
|
||||||
|
"level": 5,
|
||||||
|
"latencyRangeStart": 2000,
|
||||||
|
"latencyRangeEnd": 15000,
|
||||||
|
"latencyActive": false,
|
||||||
|
"killApplicationActive": false,
|
||||||
|
"restartApplicationActive": false,
|
||||||
|
"exceptionsActive": true,
|
||||||
|
"exception": {
|
||||||
|
"type": "java.lang.RuntimeException",
|
||||||
|
"arguments": [
|
||||||
|
{
|
||||||
|
"className": "java.lang.String",
|
||||||
|
"value": "Exception assault has been carried out"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"func": "change_assaults_configuration",
|
||||||
|
"module": "chaosspring.actions",
|
||||||
|
"type": "python"
|
||||||
|
},
|
||||||
|
"type": "action"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"rollbacks": []
|
||||||
|
}
|
62
.experiments/tapas-tasks/journal.json
Normal file
62
.experiments/tapas-tasks/journal.json
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
{
|
||||||
|
"chaoslib-version": "1.23.0",
|
||||||
|
"platform": "macOS-12.0-arm64-arm-64bit",
|
||||||
|
"node": "Marcels-MBP-M1",
|
||||||
|
"experiment": {
|
||||||
|
"title": "Disable chaos monkey",
|
||||||
|
"description": "Disable",
|
||||||
|
"tags": [],
|
||||||
|
"steady-state-hypothesis": {
|
||||||
|
"title": "Hypothesis",
|
||||||
|
"probes": []
|
||||||
|
},
|
||||||
|
"method": [],
|
||||||
|
"rollbacks": [
|
||||||
|
{
|
||||||
|
"name": "disable_chaosmonkey",
|
||||||
|
"provider": {
|
||||||
|
"arguments": {
|
||||||
|
"base_url": "http://localhost:8081/actuator"
|
||||||
|
},
|
||||||
|
"func": "disable_chaosmonkey",
|
||||||
|
"module": "chaosspring.actions",
|
||||||
|
"type": "python"
|
||||||
|
},
|
||||||
|
"type": "action"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"dry": null
|
||||||
|
},
|
||||||
|
"start": "2021-11-28T17:09:40.224824",
|
||||||
|
"status": "completed",
|
||||||
|
"deviated": false,
|
||||||
|
"steady_states": {
|
||||||
|
"before": null,
|
||||||
|
"after": null,
|
||||||
|
"during": []
|
||||||
|
},
|
||||||
|
"run": [],
|
||||||
|
"rollbacks": [
|
||||||
|
{
|
||||||
|
"activity": {
|
||||||
|
"name": "disable_chaosmonkey",
|
||||||
|
"provider": {
|
||||||
|
"arguments": {
|
||||||
|
"base_url": "http://localhost:8081/actuator"
|
||||||
|
},
|
||||||
|
"func": "disable_chaosmonkey",
|
||||||
|
"module": "chaosspring.actions",
|
||||||
|
"type": "python"
|
||||||
|
},
|
||||||
|
"type": "action"
|
||||||
|
},
|
||||||
|
"output": "{\"status\":\"Chaos Monkey is disabled\",\"disabledAt\":\"2021-11-28T17:09:40.443253Z\"}",
|
||||||
|
"status": "succeeded",
|
||||||
|
"start": "2021-11-28T17:09:40.226419",
|
||||||
|
"end": "2021-11-28T17:09:40.531586",
|
||||||
|
"duration": 0.305167
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"end": "2021-11-28T17:09:40.531671",
|
||||||
|
"duration": 0.33724117279052734
|
||||||
|
}
|
45
.experiments/tapas-tasks/kill-restart.json
Normal file
45
.experiments/tapas-tasks/kill-restart.json
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
{
|
||||||
|
"title": "Testing kill & restart",
|
||||||
|
"description": "Testing behavoir when killing and restarting the application",
|
||||||
|
"tags": [],
|
||||||
|
"steady-state-hypothesis": {
|
||||||
|
"title": "Hypothesis",
|
||||||
|
"probes": []
|
||||||
|
},
|
||||||
|
"method": [
|
||||||
|
{
|
||||||
|
"name": "enable_chaosmonkey",
|
||||||
|
"provider": {
|
||||||
|
"arguments": {
|
||||||
|
"base_url": "http://localhost:8081/actuator"
|
||||||
|
},
|
||||||
|
"func": "enable_chaosmonkey",
|
||||||
|
"module": "chaosspring.actions",
|
||||||
|
"type": "python"
|
||||||
|
},
|
||||||
|
"type": "action"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "configure_assaults",
|
||||||
|
"provider": {
|
||||||
|
"arguments": {
|
||||||
|
"base_url": "http://localhost:8081/actuator",
|
||||||
|
"assaults_configuration": {
|
||||||
|
"level": 5,
|
||||||
|
"latencyRangeStart": 2000,
|
||||||
|
"latencyRangeEnd": 5000,
|
||||||
|
"latencyActive": false,
|
||||||
|
"exceptionsActive": false,
|
||||||
|
"killApplicationActive": true,
|
||||||
|
"restartApplicationActive": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"func": "change_assaults_configuration",
|
||||||
|
"module": "chaosspring.actions",
|
||||||
|
"type": "python"
|
||||||
|
},
|
||||||
|
"type": "action"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"rollbacks": []
|
||||||
|
}
|
45
.experiments/tapas-tasks/latency.json
Normal file
45
.experiments/tapas-tasks/latency.json
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
{
|
||||||
|
"title": "Testing latency",
|
||||||
|
"description": "Testing latency!",
|
||||||
|
"tags": [],
|
||||||
|
"steady-state-hypothesis": {
|
||||||
|
"title": "Hypothesis",
|
||||||
|
"probes": []
|
||||||
|
},
|
||||||
|
"method": [
|
||||||
|
{
|
||||||
|
"name": "enable_chaosmonkey",
|
||||||
|
"provider": {
|
||||||
|
"arguments": {
|
||||||
|
"base_url": "http://localhost:8081/actuator"
|
||||||
|
},
|
||||||
|
"func": "enable_chaosmonkey",
|
||||||
|
"module": "chaosspring.actions",
|
||||||
|
"type": "python"
|
||||||
|
},
|
||||||
|
"type": "action"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "configure_assaults",
|
||||||
|
"provider": {
|
||||||
|
"arguments": {
|
||||||
|
"base_url": "http://localhost:8081/actuator",
|
||||||
|
"assaults_configuration": {
|
||||||
|
"level": 5,
|
||||||
|
"latencyRangeStart": 2000,
|
||||||
|
"latencyRangeEnd": 15000,
|
||||||
|
"latencyActive": true,
|
||||||
|
"exceptionsActive": false,
|
||||||
|
"killApplicationActive": false,
|
||||||
|
"restartApplicationActive": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"func": "change_assaults_configuration",
|
||||||
|
"module": "chaosspring.actions",
|
||||||
|
"type": "python"
|
||||||
|
},
|
||||||
|
"type": "action"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"rollbacks": []
|
||||||
|
}
|
49
.experiments/tapas-tasks/memory.json
Normal file
49
.experiments/tapas-tasks/memory.json
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
{
|
||||||
|
"title": "Testing memory",
|
||||||
|
"description": "Testing memory!",
|
||||||
|
"tags": [],
|
||||||
|
"steady-state-hypothesis": {
|
||||||
|
"title": "Hypothesis",
|
||||||
|
"probes": []
|
||||||
|
},
|
||||||
|
"method": [
|
||||||
|
{
|
||||||
|
"name": "enable_chaosmonkey",
|
||||||
|
"provider": {
|
||||||
|
"arguments": {
|
||||||
|
"base_url": "http://localhost:8081/actuator"
|
||||||
|
},
|
||||||
|
"func": "enable_chaosmonkey",
|
||||||
|
"module": "chaosspring.actions",
|
||||||
|
"type": "python"
|
||||||
|
},
|
||||||
|
"type": "action"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "configure_assaults",
|
||||||
|
"provider": {
|
||||||
|
"arguments": {
|
||||||
|
"base_url": "http://localhost:8081/actuator",
|
||||||
|
"assaults_configuration": {
|
||||||
|
"level": 5,
|
||||||
|
"latencyActive": false,
|
||||||
|
"killApplicationActive": false,
|
||||||
|
"restartApplicationActive": false,
|
||||||
|
"exceptionsActive": false,
|
||||||
|
"memoryActive": true,
|
||||||
|
"memoryMillisecondsHoldFilledMemory": 90000,
|
||||||
|
"memoryMillisecondsWaitNextIncrease": 100,
|
||||||
|
"memoryFillIncrementFraction": 0.9,
|
||||||
|
"memoryFillTargetFraction": 0.95,
|
||||||
|
"runtimeAssaultCronExpression": "*/1 * * * * ?"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"func": "change_assaults_configuration",
|
||||||
|
"module": "chaosspring.actions",
|
||||||
|
"type": "python"
|
||||||
|
},
|
||||||
|
"type": "action"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"rollbacks": []
|
||||||
|
}
|
40
.github/workflows/build-and-deploy.yml
vendored
40
.github/workflows/build-and-deploy.yml
vendored
@@ -33,30 +33,41 @@ jobs:
|
|||||||
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
|
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
|
||||||
restore-keys: ${{ runner.os }}-m2
|
restore-keys: ${{ runner.os }}-m2
|
||||||
|
|
||||||
- name: Build with Maven
|
- name: Build common library
|
||||||
run: mvn -f assignment/pom.xml --batch-mode --update-snapshots verify
|
run: mvn -f common/pom.xml --batch-mode --update-snapshots install
|
||||||
- run: cp ./assignment/target/assignment-0.0.1-SNAPSHOT.jar ./target
|
|
||||||
|
|
||||||
- name: Build with Maven
|
- name: Build roster service
|
||||||
|
run: mvn -f roster/pom.xml --batch-mode --update-snapshots verify
|
||||||
|
- run: cp ./roster/target/roster-0.0.1-SNAPSHOT.jar ./target
|
||||||
|
|
||||||
|
- name: Build executor-pool service
|
||||||
run: mvn -f executor-pool/pom.xml --batch-mode --update-snapshots verify
|
run: mvn -f executor-pool/pom.xml --batch-mode --update-snapshots verify
|
||||||
- run: cp ./executor-pool/target/executor-pool-0.0.1-SNAPSHOT.jar ./target
|
- run: cp ./executor-pool/target/executor-pool-0.0.1-SNAPSHOT.jar ./target
|
||||||
|
|
||||||
- name: Build with Maven
|
- name: Build executor-base library
|
||||||
run: mvn -f executor-base/pom.xml --batch-mode --update-snapshots install
|
run: mvn -f executor-base/pom.xml --batch-mode --update-snapshots install
|
||||||
|
|
||||||
- name: Build with Maven
|
- name: Build executor-computation service
|
||||||
run: mvn -f executor1/pom.xml --batch-mode --update-snapshots verify
|
run: mvn -f executor-computation/pom.xml --batch-mode --update-snapshots verify
|
||||||
- run: cp ./executor1/target/executor1-0.0.1-SNAPSHOT.jar ./target
|
- run: cp ./executor-computation/target/executor-computation-0.0.1-SNAPSHOT.jar ./target
|
||||||
|
|
||||||
- name: Build with Maven
|
- name: Build executor-robot service
|
||||||
run: mvn -f executor2/pom.xml --batch-mode --update-snapshots verify
|
run: mvn -f executor-robot/pom.xml --batch-mode --update-snapshots verify
|
||||||
- run: cp ./executor2/target/executor2-0.0.1-SNAPSHOT.jar ./target
|
- run: cp ./executor-robot/target/executor-robot-0.0.1-SNAPSHOT.jar ./target
|
||||||
|
|
||||||
- name: Build with Maven
|
- name: Build executor-humidity service
|
||||||
|
run: mvn -f executor-humidity/pom.xml --batch-mode --update-snapshots verify
|
||||||
|
- run: cp ./executor-humidity/target/executor-humidity-0.0.1-SNAPSHOT.jar ./target
|
||||||
|
|
||||||
|
- name: Build executor-humidity-demo service
|
||||||
|
run: mvn -f executor-humidity-demo/pom.xml --batch-mode --update-snapshots verify
|
||||||
|
- run: cp ./executor-humidity-demo/target/executor-humidity-demo-0.0.1-SNAPSHOT.jar ./target
|
||||||
|
|
||||||
|
- name: Build tapas-task service
|
||||||
run: mvn -f tapas-tasks/pom.xml --batch-mode --update-snapshots verify
|
run: mvn -f tapas-tasks/pom.xml --batch-mode --update-snapshots verify
|
||||||
- run: cp ./tapas-tasks/target/tapas-tasks-0.0.1-SNAPSHOT.jar ./target
|
- run: cp ./tapas-tasks/target/tapas-tasks-0.0.1-SNAPSHOT.jar ./target
|
||||||
|
|
||||||
- name: Build with Maven
|
- name: Build tapas-auction-house service
|
||||||
run: mvn -f tapas-auction-house/pom.xml --batch-mode --update-snapshots verify
|
run: mvn -f tapas-auction-house/pom.xml --batch-mode --update-snapshots verify
|
||||||
- run: cp ./tapas-auction-house/target/tapas-auction-house-0.0.1-SNAPSHOT.jar ./target
|
- run: cp ./tapas-auction-house/target/tapas-auction-house-0.0.1-SNAPSHOT.jar ./target
|
||||||
|
|
||||||
@@ -100,5 +111,6 @@ jobs:
|
|||||||
cd /home/${{ secrets.SSH_USER }}/
|
cd /home/${{ secrets.SSH_USER }}/
|
||||||
touch acme.json
|
touch acme.json
|
||||||
sudo chmod 0600 acme.json
|
sudo chmod 0600 acme.json
|
||||||
|
sudo docker-compose down --remove-orphans
|
||||||
sudo echo "PUB_IP=$(wget -qO- http://ipecho.net/plain | xargs echo)" | sed -e 's/\./-/g' > .env
|
sudo echo "PUB_IP=$(wget -qO- http://ipecho.net/plain | xargs echo)" | sed -e 's/\./-/g' > .env
|
||||||
sudo docker-compose up -d --build --force-recreate
|
sudo docker-compose up -d
|
||||||
|
41
.github/workflows/ci.assignment.yml
vendored
41
.github/workflows/ci.assignment.yml
vendored
@@ -1,41 +0,0 @@
|
|||||||
name: CI Assignment
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [main, dev]
|
|
||||||
paths:
|
|
||||||
- "assignment/**"
|
|
||||||
pull_request:
|
|
||||||
branches: [main, dev]
|
|
||||||
paths:
|
|
||||||
- "assignment/**"
|
|
||||||
|
|
||||||
workflow_dispatch:
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
name: Build
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
- name: Set up JDK 11
|
|
||||||
uses: actions/setup-java@v1
|
|
||||||
with:
|
|
||||||
java-version: 11
|
|
||||||
- name: Cache SonarCloud packages
|
|
||||||
uses: actions/cache@v1
|
|
||||||
with:
|
|
||||||
path: ~/.sonar/cache
|
|
||||||
key: ${{ runner.os }}-sonar
|
|
||||||
restore-keys: ${{ runner.os }}-sonar
|
|
||||||
- name: Cache Maven packages
|
|
||||||
uses: actions/cache@v1
|
|
||||||
with:
|
|
||||||
path: ~/.m2
|
|
||||||
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
|
|
||||||
restore-keys: ${{ runner.os }}-m2
|
|
||||||
- name: Build and analyze
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
|
||||||
run: mvn -f assignment/pom.xml -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=scs-asse-fs21-group1_tapas-assignment
|
|
@@ -1,15 +1,17 @@
|
|||||||
name: CI Executor 2
|
name: CI executor-computation
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main, dev]
|
branches: [main, dev]
|
||||||
paths:
|
paths:
|
||||||
- "executor-base/**"
|
- "executor-base/**"
|
||||||
- "executor2/**"
|
- "executor-computation/**"
|
||||||
|
- "common/**"
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [main, dev]
|
branches: [main, dev]
|
||||||
paths:
|
paths:
|
||||||
- "executor-base/**"
|
- "executor-base/**"
|
||||||
- "executor2/**"
|
- "executor-computation/**"
|
||||||
|
- "common/**"
|
||||||
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
jobs:
|
jobs:
|
||||||
@@ -36,10 +38,12 @@ jobs:
|
|||||||
path: ~/.m2
|
path: ~/.m2
|
||||||
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
|
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
|
||||||
restore-keys: ${{ runner.os }}-m2
|
restore-keys: ${{ runner.os }}-m2
|
||||||
|
- name: Build common
|
||||||
|
run: mvn -f common/pom.xml -B install
|
||||||
- name: Build executorBase
|
- name: Build executorBase
|
||||||
run: mvn -f executor-base/pom.xml -B install
|
run: mvn -f executor-base/pom.xml -B install
|
||||||
- name: Build and analyze
|
- name: Build and analyze
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||||
run: mvn -f executor2/pom.xml -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=scs-asse-fs21-group1_tapas-executor2
|
run: mvn -f executor-computation/pom.xml -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=scs-asse-fs21-group1_tapas-executor2
|
@@ -1,15 +1,17 @@
|
|||||||
name: CI Executor 1
|
name: CI executor-robot
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main, dev]
|
branches: [main, dev]
|
||||||
paths:
|
paths:
|
||||||
- "executor-base/**"
|
- "executor-base/**"
|
||||||
- "executor1/**"
|
- "executor-robot/**"
|
||||||
|
- "common/**"
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [main, dev]
|
branches: [main, dev]
|
||||||
paths:
|
paths:
|
||||||
- "executor-base/**"
|
- "executor-base/**"
|
||||||
- "executor1/**"
|
- "executor-robot/**"
|
||||||
|
- "common/**"
|
||||||
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
jobs:
|
jobs:
|
||||||
@@ -36,10 +38,12 @@ jobs:
|
|||||||
path: ~/.m2
|
path: ~/.m2
|
||||||
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
|
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
|
||||||
restore-keys: ${{ runner.os }}-m2
|
restore-keys: ${{ runner.os }}-m2
|
||||||
|
- name: Build executorBase
|
||||||
|
run: mvn -f common/pom.xml -B install
|
||||||
- name: Build executorBase
|
- name: Build executorBase
|
||||||
run: mvn -f executor-base/pom.xml -B install
|
run: mvn -f executor-base/pom.xml -B install
|
||||||
- name: Build and analyze
|
- name: Build and analyze
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||||
run: mvn -f executor1/pom.xml -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=scs-asse-fs21-group1_tapas-executor1
|
run: mvn -f executor-robot/pom.xml -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=scs-asse-fs21-group1_tapas-executor1
|
45
.github/workflows/ci.roster.yml
vendored
Normal file
45
.github/workflows/ci.roster.yml
vendored
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
name: CI Roster
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main, dev]
|
||||||
|
paths:
|
||||||
|
- "roster/**"
|
||||||
|
- "common/**"
|
||||||
|
pull_request:
|
||||||
|
branches: [main, dev]
|
||||||
|
paths:
|
||||||
|
- "roster/**"
|
||||||
|
- "common/**"
|
||||||
|
|
||||||
|
workflow_dispatch:
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Set up JDK 11
|
||||||
|
uses: actions/setup-java@v1
|
||||||
|
with:
|
||||||
|
java-version: 11
|
||||||
|
- name: Cache SonarCloud packages
|
||||||
|
uses: actions/cache@v1
|
||||||
|
with:
|
||||||
|
path: ~/.sonar/cache
|
||||||
|
key: ${{ runner.os }}-sonar
|
||||||
|
restore-keys: ${{ runner.os }}-sonar
|
||||||
|
- name: Cache Maven packages
|
||||||
|
uses: actions/cache@v1
|
||||||
|
with:
|
||||||
|
path: ~/.m2
|
||||||
|
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
|
||||||
|
restore-keys: ${{ runner.os }}-m2
|
||||||
|
- name: Build common package
|
||||||
|
run: mvn -f common/pom.xml -B install
|
||||||
|
- name: Build and analyze
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||||
|
run: mvn -f roster/pom.xml -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=scs-asse-fs21-group1_tapas-assignment
|
3
Californium3.properties
Normal file
3
Californium3.properties
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# Californium3 CoAP Properties file
|
||||||
|
# Wed Dec 15 21:41:00 CET 2021
|
||||||
|
#
|
13
app/Dockerfile
Normal file
13
app/Dockerfile
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
# Dockerfile/Docker-Compose file based on an initial version authored by Alexander Lontke (ASSE, Fall Semester 2021)
|
||||||
|
|
||||||
|
FROM maven as build
|
||||||
|
|
||||||
|
COPY . /app
|
||||||
|
|
||||||
|
RUN mvn -f app/pom.xml --batch-mode --update-snapshots verify
|
||||||
|
|
||||||
|
FROM openjdk
|
||||||
|
|
||||||
|
COPY --from=build /app/target/app-0.1.0.jar ./app-0.1.0.jar
|
||||||
|
|
||||||
|
CMD java -jar app-0.1.0.jar
|
@@ -0,0 +1,21 @@
|
|||||||
|
# 2. Seperate service for Executor Pool
|
||||||
|
|
||||||
|
Date: 2021-11-21
|
||||||
|
|
||||||
|
## Status
|
||||||
|
|
||||||
|
Accepted
|
||||||
|
|
||||||
|
## Context
|
||||||
|
|
||||||
|
The Executor Pool has to keep track of which Executors are online and what task types they can execute. The Roster keeps track of tasks that need to be executed and assigns Executors to tasks. The Executor Pool functionalty could be implemented in a seperate service or as a part of the Roster.
|
||||||
|
|
||||||
|
## Decision
|
||||||
|
|
||||||
|
The executor pool will be implemented as a seperate service. (TODO decision might change. Need to reevaluate)
|
||||||
|
|
||||||
|
TODO explain why.
|
||||||
|
|
||||||
|
## Consequences
|
||||||
|
|
||||||
|
TODO
|
@@ -1,21 +0,0 @@
|
|||||||
# 2. Seperate service for Executors
|
|
||||||
|
|
||||||
Date: 2021-10-18
|
|
||||||
|
|
||||||
## Status
|
|
||||||
|
|
||||||
Accepted
|
|
||||||
|
|
||||||
## Context
|
|
||||||
|
|
||||||
The users need to be able to add new executors to the executor pool. The functionality of the executor is currently unknown.
|
|
||||||
|
|
||||||
## Decision
|
|
||||||
|
|
||||||
We will use a separate microservice for each executor.
|
|
||||||
New executors will be added/removed during runtime. Therefore, we need a high extensibility.
|
|
||||||
Different executors can have different execution times and a different load. This means the executors scale differently.
|
|
||||||
|
|
||||||
## Consequences
|
|
||||||
|
|
||||||
Having executors as its own service we can deploy new executors independently and easily add new executors during runtime and guarantee high scalability as well as evolvability.
|
|
@@ -1,21 +0,0 @@
|
|||||||
# 3. Seperate service for assignment domain
|
|
||||||
|
|
||||||
Date: 2021-10-18
|
|
||||||
|
|
||||||
## Status
|
|
||||||
|
|
||||||
Accepted
|
|
||||||
|
|
||||||
## Context
|
|
||||||
|
|
||||||
The Assignment Service handles the assignment of a task to a corresponding and available executor. It keeps track of all the connections between tasks and executors.
|
|
||||||
|
|
||||||
## Decision
|
|
||||||
|
|
||||||
The assignment domain will be its own service.
|
|
||||||
The assignment service will be a central point in our application. It will have most of the business logic in it and will communicate with all the different services. Therefore, other services can be kind of “dumb” and only need to focus on their simple tasks.
|
|
||||||
The code of the assignment will change more often than the code of the other services, thus having the assignment service split from the other makes it more deployable.
|
|
||||||
|
|
||||||
## Consequences
|
|
||||||
|
|
||||||
Having this system as its own service we reduce the Fault tolerance because the assignment service can be the single point of failure. We can mitigate this risk by implementing (server) replication and/or having an event driven communication with persisting messages. Therefore, all other services can run independently, and the assignment service can recover from a crash.
|
|
@@ -0,0 +1,21 @@
|
|||||||
|
# 3. Separate service for the Roster
|
||||||
|
|
||||||
|
Date: 2021-11-21
|
||||||
|
|
||||||
|
## Status
|
||||||
|
|
||||||
|
Accepted
|
||||||
|
|
||||||
|
## Context
|
||||||
|
|
||||||
|
The roster acts as an orchestrator for the system. It communicates directly with the task list, the executors, the executor pool, and the auction house. It handles the assignment of a task to a corresponding and available executor, keeps track of all the connections between tasks and executors, and communicates the status of tasks and executors to other services.
|
||||||
|
|
||||||
|
## Decision
|
||||||
|
|
||||||
|
The Roster domain will be its own service.
|
||||||
|
The Roster service will be a central point in our application. It will have most of the workflow logic in it and will communicate with all the different services. Therefore, other services can focus on their business logic and be largely ignorant of the overall workflow.
|
||||||
|
The code of the assignment will change more often than the code of the other services, thus having the assignment service split from the other makes it more deployable.
|
||||||
|
|
||||||
|
## Consequences
|
||||||
|
|
||||||
|
Having this system as its own service will reduce the fault tolerance because the assignment service can be the single point of failure. We can mitigate this risk by implementing (server) replication and/or having an event driven communication with persisting messages. Therefore, all other services can run independently, and the assignment service can recover from a crash. Additionally, we need to ensure a high level of interoperability, since the roster has to communicate with all other parts of the system.
|
@@ -1,21 +0,0 @@
|
|||||||
# 4. Seperate service for executor pool
|
|
||||||
|
|
||||||
Date: 2021-10-18
|
|
||||||
|
|
||||||
## Status
|
|
||||||
|
|
||||||
Accepted
|
|
||||||
|
|
||||||
## Context
|
|
||||||
|
|
||||||
The Executor pool keeps track of the connected executors and their purpose and status.
|
|
||||||
|
|
||||||
## Decision
|
|
||||||
|
|
||||||
We will have a separate service for the executor pool.
|
|
||||||
There are no other domains which share the same or similar functionality.
|
|
||||||
The executor pool also scales differently than other services.
|
|
||||||
|
|
||||||
## Consequences
|
|
||||||
|
|
||||||
Having the executor pool as a separate service will help with the deployability of this service but will make the overall structure more complex and reduces testability.
|
|
@@ -0,0 +1,20 @@
|
|||||||
|
# 4. Separate service for the Task List
|
||||||
|
|
||||||
|
Date: 2021-11-21
|
||||||
|
|
||||||
|
## Status
|
||||||
|
|
||||||
|
Accepted
|
||||||
|
|
||||||
|
## Context
|
||||||
|
|
||||||
|
Tasks are created in the task list, and the status of each task (created, assigned, executing, executed) is tracked in the task list as well. The task list mainly communicates with the roster so that tasks can get assigned and the roster will give the task list feedback about the tasks’ status.
|
||||||
|
|
||||||
|
## Decision
|
||||||
|
|
||||||
|
The task list will be its own service.
|
||||||
|
The task list needs to scale based on the number of active users and the intensity of their activity at any time while the scaling of other parts of the system can be constrained by other factors.
|
||||||
|
|
||||||
|
## Consequences
|
||||||
|
|
||||||
|
Although having the task list as its own service might slightly increase the complexity of the system and decrease the testability, it also makes the system easier to deploy and protective of its data. However, to ensure that this data is always available and does not get lost, the task list needs to be able to recover all its data (the entire history of all tasks) in case it goes down.
|
@@ -4,7 +4,7 @@ Date: 2021-10-18
|
|||||||
|
|
||||||
## Status
|
## Status
|
||||||
|
|
||||||
Accepted
|
Superceded by [8. Switch to an event-driven microservices architecture](0008-switch-to-an-event-driven-microservices-architecture.md)
|
||||||
|
|
||||||
## Context
|
## Context
|
||||||
|
|
||||||
|
@@ -0,0 +1,22 @@
|
|||||||
|
# 7. Seperate service for Auction House
|
||||||
|
|
||||||
|
Date: 2021-11-21
|
||||||
|
|
||||||
|
## Status
|
||||||
|
|
||||||
|
Accepted
|
||||||
|
|
||||||
|
## Context
|
||||||
|
|
||||||
|
The auction house is the service that can connect to other groups’ auction houses. If there is a task whose task type does not match that of our executors, the auction house can start an auction where other groups can bid on doing the task for us. Moreover, it can also bid on other groups’ auctions.
|
||||||
|
|
||||||
|
## Decision
|
||||||
|
|
||||||
|
The auction house will be its own service.
|
||||||
|
The auction house is the only part of our system that has external communication; therefore, it makes sense to have it as its own service, also to guarantee better deployability.
|
||||||
|
The auction house does not scale directly based on the number of tasks, but only the proportion which needs external executors. Moreover, there could be limits on the number of auctions that could be started. Therefore, the auction house scales differently to other services.
|
||||||
|
Moreover, having the auction house as its own service also improves the fault tolerance of our system.
|
||||||
|
|
||||||
|
## Consequences
|
||||||
|
|
||||||
|
Since the auction house will be a standalone service, we have to make sure that if it goes down, it can recover its data in some way (which auctions it has launched, which auctions it has placed bids on or even won, etc.). Even though the testability and latency of our system might worsen by having a separate service for the auction house, we can implement different kinds of communication for internal and external communication in a much easier way.
|
@@ -0,0 +1,26 @@
|
|||||||
|
# 8. Switch to an event-driven microservices architecture
|
||||||
|
|
||||||
|
Date: 2021-11-21
|
||||||
|
|
||||||
|
## Status
|
||||||
|
|
||||||
|
Proposed
|
||||||
|
|
||||||
|
Supercedes [5. Event driven communication](0005-event-driven-communication.md) TODO Fix this. Should only supercede it if this has been accepted. This should also subercede 0013 - Microservice Architecture if accepted.
|
||||||
|
|
||||||
|
## Context
|
||||||
|
|
||||||
|
Our Tapas App is currently implemented based on a microservice architecture, where the services communicate synchronously via request-response. Each service encapsulates a different bounded context with different functional and non-functional requirements. Internal communication could also be done using asynchronous or event-driven communication.
|
||||||
|
|
||||||
|
## Decision
|
||||||
|
|
||||||
|
Pros:
|
||||||
|
Scalability: Different services within the Tapas app are not always able to scale at the same rate. For example, we could have thousands of users adding printing tasks at the same time, but maybe we only have one printer. In this scenario we might want to scale the task-list service up to handle the creation load, but scaling up the printing executor operates on a different time-scale (i.e. adding a printer takes time). Moreover, we could have a lot of new tasks coming in, most of which can be executed internally. In this case we want to be able to scale up the task list but might not need to scale up the auction house. Event-driven communication would decrease the coupling of services. Consequently, the scalability of individual services would be enhanced as they no longer depend on the scalability of other services. This improves the apps overall scalability. Since scalability is one of the systems top 3 -ility, this seems quite important.
|
||||||
|
Fault tolerance: Another of the systems top 3 -ilities is fault tolerance. We could have highly unstable IoT executors that fail often. This should not disrupt the system’s overall operation. The decoupling facilitated by event-driven, asynchronous, communication ensures that when individual services go down, the impact of other services is limited and once they go back up then can recover the systems state from persisted messages.
|
||||||
|
Cons:
|
||||||
|
Error handling, workflow control, and event timing:
|
||||||
|
The aforementioned topics outline the drawbacks of event- driven architecture. These drawbacks can be mitigated by using an orchestrator (like we currently do with the roster) to orchestrate assignment of tasks, auctioning off tasks and error handling when executors fail. More research needed.
|
||||||
|
|
||||||
|
## Consequences
|
||||||
|
|
||||||
|
Consequences to be determined but would relate to the three concepts mentioned as cons.
|
@@ -0,0 +1,19 @@
|
|||||||
|
# 9. common library for shared code
|
||||||
|
|
||||||
|
Date: 2021-11-21
|
||||||
|
|
||||||
|
## Status
|
||||||
|
|
||||||
|
Accepted
|
||||||
|
|
||||||
|
## Context
|
||||||
|
|
||||||
|
The numerous services that make up the Tapas app all have common, non-domain specific, functionality that can be shared via a common library, or be replicated in each service.
|
||||||
|
|
||||||
|
## Decision
|
||||||
|
|
||||||
|
Use a common code library for shared code which does not change frequently, but if it would be changed, would need to be changed everywhere.
|
||||||
|
|
||||||
|
## Consequences
|
||||||
|
|
||||||
|
Changes in the common code will most likely require multiple services to be redeployed. However, those services would most likely have to have been changed individually and redepolyed anyways. Another consequence is that versioning becomes more complicated.
|
20
doc/architecture/decisions/0010-executor-base-library.md
Normal file
20
doc/architecture/decisions/0010-executor-base-library.md
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# 10. executor base library
|
||||||
|
|
||||||
|
Date: 2021-11-21
|
||||||
|
|
||||||
|
## Status
|
||||||
|
|
||||||
|
Accepted
|
||||||
|
|
||||||
|
## Context
|
||||||
|
|
||||||
|
Executors all use the same logic to communicate with other services. This means that their code base is near identical except for the code that implements their specific task execution. The code that implements the executor's shared logic can either be implemented by a shared library, or replicated across all executors.
|
||||||
|
|
||||||
|
## Decision
|
||||||
|
|
||||||
|
Since all executors use the same logic to communicate with other services, any change to this logic would have to be made for every executor. We will therefore use a shared library for executors, called executor-base. The library includes all the shared logic which every executor needs.
|
||||||
|
Having this shared logic in a separate library makes it easy to change the common logic at one place. The code sharing happens at compile time, which reduces the chance of runtime errors, compared to other code sharing approaches. If other people need to create executors, they can just reference the executor-base library and implement the actual execution part. Therefore they don’t need to worry about the the connection implementations to the Tapas system.
|
||||||
|
|
||||||
|
## Consequences
|
||||||
|
|
||||||
|
It becomes easier to change the way that the executors communicate with the rest of the system. Moreover, changes are less risky as they only need to be implemented once. It also becomes easier for other teams within the organisation to create executors as they can use the executor-base to implement the shared logic. However, using a shared library will increase the complexity of the executors. Also there needs to be a clear way to use proper versioning. Lastly, by using this library we might be making assumptions for future executors that might not hold. For example, if we want to create more lightweight executors for IoT devices we might need to create a separate base package (if the current one becomes too fat), so that the executors can stay lightweight and don’t implement unused code.
|
@@ -0,0 +1,19 @@
|
|||||||
|
# 11. seperation of common and executor-base library
|
||||||
|
|
||||||
|
Date: 2021-11-21
|
||||||
|
|
||||||
|
## Status
|
||||||
|
|
||||||
|
Accepted
|
||||||
|
|
||||||
|
## Context
|
||||||
|
|
||||||
|
We have two code sharing libraries, the executor-base and the common library. The executor-base implements shared logic that all executors need, but other services don't. The common library has much more wide reaching implementations, such as the implementation of the SelfValidating class. These could form a single common library, or two seperate common libraries.
|
||||||
|
|
||||||
|
## Decision
|
||||||
|
|
||||||
|
There will be a separate library for common and executor-base. The libraries share different type of code, and have different reasons to change. It would not make sense to have the shared code from executors in every other service which needs access to other shared code. Services that use the code in the common library should not need to be dependent in any way on the executor-base.
|
||||||
|
|
||||||
|
## Consequences
|
||||||
|
|
||||||
|
Changes impact fewer services. However, this decision will increase the number of service dependencies and therefore increase complexity in managing those dependencies.
|
@@ -0,0 +1,27 @@
|
|||||||
|
# 12. seperate service for each executor
|
||||||
|
|
||||||
|
Date: 2021-11-21
|
||||||
|
|
||||||
|
## Status
|
||||||
|
|
||||||
|
Accepted
|
||||||
|
|
||||||
|
## Context
|
||||||
|
|
||||||
|
Executors must receive tasks of different types and execute them. The executors could either all be implemented within one service or as multiple services, one for each type of executor.
|
||||||
|
|
||||||
|
## Decision
|
||||||
|
|
||||||
|
We will have a seperate service for each type of executor.
|
||||||
|
|
||||||
|
Firstly, execution time differs significantly between task types. Therefore, having seperate services will allow the executos to scale differently based on their tasks' specific needs.
|
||||||
|
|
||||||
|
Secondly, the systems functioning should not be disrupted in case an Executor fails. Having each type of executor in a seperate service will increase fault tolerance in this regard.
|
||||||
|
|
||||||
|
Lastly, extensibilty is one of the systems most important non-functional requirement and providers of executors need to be able to easily add executors to the executor pool. These factors are also positively impacted by having seperate services.
|
||||||
|
|
||||||
|
There should not be any shared data between the executors. Additionally, there should be no flow of information between them. Thus, there should be no issues due to workflow and data concerns due to this decision.
|
||||||
|
|
||||||
|
## Consequences
|
||||||
|
|
||||||
|
Executors share a lot of functionality when it comes to connecting to the rest of the system. Therefore, this decision means that we will either have to duplicate the code that implements the common functionality, or we have to have a way to share the code (e.g. through a common library)
|
23
doc/architecture/decisions/0013-microservice-architecture.md
Normal file
23
doc/architecture/decisions/0013-microservice-architecture.md
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
# 13. microservice architecture
|
||||||
|
|
||||||
|
Date: 2021-12-02
|
||||||
|
|
||||||
|
## Status
|
||||||
|
|
||||||
|
Accepted
|
||||||
|
|
||||||
|
## Context
|
||||||
|
|
||||||
|
The system is made up of five distinct bounded contexts, namely the Task Domain, the Roster Domain, the Executor Pool Domain, the Executor Domain, and the Auction Domain. The way that these bounded contexts function together to fulfil the system requirements can be based on many different architectures. (Feedback needed. Should we name specific 'next-best' alternative architectures to compare, or just leave it as is since technically all architectures were considered)
|
||||||
|
|
||||||
|
## Decision
|
||||||
|
|
||||||
|
The system will follow the Microservice architecture.
|
||||||
|
|
||||||
|
Scalability and fault tolerance are two of the systems top 3 -ilities. Moreover, elasticity and evolvability are two of the systems other main -ilities. These are all non-functional requirements that the Microservice architecture excels at.
|
||||||
|
|
||||||
|
We do not expect to have a single monolithic database, so this is not a concern.
|
||||||
|
|
||||||
|
## Consequences
|
||||||
|
|
||||||
|
There is a considerable amount of communication between bounded contexts. This could cause responsiveness and performance issues due to added latency. This could therefore mean we would need to use asynchronous REST calls or publish-subscribe communication to mitigate these issues as much of the communication does not have to be synchronous.
|
19
doc/architecture/decisions/0014-data-ownership.md
Normal file
19
doc/architecture/decisions/0014-data-ownership.md
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
# 14. data ownership
|
||||||
|
|
||||||
|
Date: 2021-12-02
|
||||||
|
|
||||||
|
## Status
|
||||||
|
|
||||||
|
Accepted
|
||||||
|
|
||||||
|
## Context
|
||||||
|
|
||||||
|
The issue motivating this decision, and any context that influences or constrains the decision.
|
||||||
|
|
||||||
|
## Decision
|
||||||
|
|
||||||
|
The change that we're proposing or have agreed to implement.
|
||||||
|
|
||||||
|
## Consequences
|
||||||
|
|
||||||
|
What becomes easier or more difficult to do and any risks introduced by the change that will need to be mitigated.
|
File diff suppressed because it is too large
Load Diff
BIN
doc/workflow.png
BIN
doc/workflow.png
Binary file not shown.
Before Width: | Height: | Size: 817 KiB After Width: | Height: | Size: 2.0 MiB |
@@ -1,5 +1,20 @@
|
|||||||
version: "3.6"
|
version: "3.6"
|
||||||
services:
|
services:
|
||||||
|
tapas-db:
|
||||||
|
image: mongo
|
||||||
|
restart: unless-stopped
|
||||||
|
container_name: tapas_mongodb
|
||||||
|
environment:
|
||||||
|
MONGO_INITDB_ROOT_USERNAME: root
|
||||||
|
MONGO_INITDB_ROOT_PASSWORD: password
|
||||||
|
ports:
|
||||||
|
- "27017:27017"
|
||||||
|
command: mongod --quiet --logpath /dev/null
|
||||||
|
hivemq:
|
||||||
|
image: hivemq/hivemq4
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- "1883:1883"
|
||||||
tapas-tasks:
|
tapas-tasks:
|
||||||
container_name: tapas-tasks
|
container_name: tapas-tasks
|
||||||
build:
|
build:
|
||||||
@@ -9,54 +24,63 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- "8081:8081"
|
- "8081:8081"
|
||||||
- "5005:5005"
|
- "5005:5005"
|
||||||
|
depends_on:
|
||||||
|
- tapas-db
|
||||||
|
# - hivemq
|
||||||
volumes:
|
volumes:
|
||||||
- ./tapas-tasks/src:/opt/app/src
|
- ./tapas-tasks/src:/opt/app/src
|
||||||
- ./tapas-tasks/target:/opt/app/target
|
- ./tapas-tasks/target:/opt/app/target
|
||||||
assignment:
|
roster:
|
||||||
container_name: assignment
|
container_name: roster
|
||||||
build:
|
build:
|
||||||
context: "./assignment"
|
context: "."
|
||||||
dockerfile: "Dockerfile"
|
dockerfile: "./roster/Dockerfile"
|
||||||
target: development
|
target: development
|
||||||
|
depends_on:
|
||||||
|
- tapas-db
|
||||||
|
# - hivemq
|
||||||
ports:
|
ports:
|
||||||
- "8082:8082"
|
- "8082:8082"
|
||||||
- "5006:5005"
|
- "5006:5005"
|
||||||
volumes:
|
volumes:
|
||||||
- ./assignment/src:/opt/app/src
|
- ./roster/src:/opt/app/src
|
||||||
- ./assignment/target:/opt/app/target
|
- ./roster/target:/opt/app/target
|
||||||
executor-pool:
|
executor-pool:
|
||||||
container_name: executor-pool
|
container_name: executor-pool
|
||||||
build:
|
build:
|
||||||
context: "./executor-pool"
|
context: "./executor-pool"
|
||||||
dockerfile: "Dockerfile"
|
dockerfile: "Dockerfile"
|
||||||
target: development
|
target: development
|
||||||
|
depends_on:
|
||||||
|
- tapas-db
|
||||||
|
# - hivemq
|
||||||
ports:
|
ports:
|
||||||
- "8083:8083"
|
- "8083:8083"
|
||||||
- "5007:5005"
|
- "5007:5005"
|
||||||
volumes:
|
volumes:
|
||||||
- ./executor-pool/src:/opt/app/src
|
- ./executor-pool/src:/opt/app/src
|
||||||
- ./executor-pool/target:/opt/app/target
|
- ./executor-pool/target:/opt/app/target
|
||||||
executor1:
|
executor-computation:
|
||||||
container_name: executor1
|
container_name: executor-computation
|
||||||
build:
|
build:
|
||||||
context: "./executor1"
|
context: "."
|
||||||
dockerfile: "Dockerfile"
|
dockerfile: "./executor-computation/Dockerfile"
|
||||||
target: development
|
|
||||||
ports:
|
|
||||||
- "8084:8084"
|
|
||||||
- "5008:5005"
|
|
||||||
volumes:
|
|
||||||
- ./executor1/src:/opt/app/src
|
|
||||||
- ./executor1/target:/opt/app/target
|
|
||||||
executor2:
|
|
||||||
container_name: executor2
|
|
||||||
build:
|
|
||||||
context: "./executor2"
|
|
||||||
dockerfile: "Dockerfile"
|
|
||||||
target: development
|
target: development
|
||||||
ports:
|
ports:
|
||||||
- "8085:8085"
|
- "8085:8085"
|
||||||
- "5009:5005"
|
- "5008:5005"
|
||||||
volumes:
|
volumes:
|
||||||
- ./executor2/src:/opt/app/src
|
- ./executor-computation/src:/opt/app/src
|
||||||
- ./executor2/target:/opt/app/target
|
- ./executor-computation/target:/opt/app/target
|
||||||
|
# executor-robot:
|
||||||
|
# container_name: executor-robot
|
||||||
|
# build:
|
||||||
|
# context: "."
|
||||||
|
# dockerfile: "./executor-robot/Dockerfile"
|
||||||
|
# target: development
|
||||||
|
# ports:
|
||||||
|
# - "8084:8084"
|
||||||
|
# - "5009:5005"
|
||||||
|
# volumes:
|
||||||
|
# - ./executor-robot/src:/opt/app/src
|
||||||
|
# - ./executor-robot/target:/opt/app/target
|
||||||
|
@@ -9,9 +9,9 @@
|
|||||||
<relativePath/> <!-- lookup parent from repository -->
|
<relativePath/> <!-- lookup parent from repository -->
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>ch.unisg</groupId>
|
<groupId>ch.unisg</groupId>
|
||||||
<artifactId>executorbase</artifactId>
|
<artifactId>executor-base</artifactId>
|
||||||
<version>0.0.1-SNAPSHOT</version>
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
<name>executorbase</name>
|
<name>executor-base</name>
|
||||||
<description>Demo project for Spring Boot</description>
|
<description>Demo project for Spring Boot</description>
|
||||||
<properties>
|
<properties>
|
||||||
<java.version>11</java.version>
|
<java.version>11</java.version>
|
||||||
@@ -66,6 +66,21 @@
|
|||||||
<artifactId>common</artifactId>
|
<artifactId>common</artifactId>
|
||||||
<version>0.0.1-SNAPSHOT</version>
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>de.codecentric</groupId>
|
||||||
|
<artifactId>chaos-monkey-spring-boot</artifactId>
|
||||||
|
<version>2.5.4</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-test</artifactId>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
@@ -1,5 +1,7 @@
|
|||||||
package ch.unisg.executorbase.executor.adapter.in.web;
|
package ch.unisg.executorbase.executor.adapter.in.web;
|
||||||
|
|
||||||
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
import org.springframework.http.HttpHeaders;
|
import org.springframework.http.HttpHeaders;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
@@ -19,6 +21,8 @@ public class TaskAvailableController {
|
|||||||
this.taskAvailableUseCase = taskAvailableUseCase;
|
this.taskAvailableUseCase = taskAvailableUseCase;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Logger logger = Logger.getLogger(TaskAvailableController.class.getName());
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Controller for notification about new events.
|
* Controller for notification about new events.
|
||||||
* @return 200 OK
|
* @return 200 OK
|
||||||
@@ -26,6 +30,8 @@ public class TaskAvailableController {
|
|||||||
@GetMapping(path = "/newtask/{taskType}", consumes = { "application/json" })
|
@GetMapping(path = "/newtask/{taskType}", consumes = { "application/json" })
|
||||||
public ResponseEntity<String> retrieveTaskFromTaskList(@PathVariable("taskType") String taskType) {
|
public ResponseEntity<String> retrieveTaskFromTaskList(@PathVariable("taskType") String taskType) {
|
||||||
|
|
||||||
|
logger.info("ExecutorBase | New " + taskType + " task available");
|
||||||
|
|
||||||
if (ExecutorType.contains(taskType.toUpperCase())) {
|
if (ExecutorType.contains(taskType.toUpperCase())) {
|
||||||
TaskAvailableCommand command = new TaskAvailableCommand(
|
TaskAvailableCommand command = new TaskAvailableCommand(
|
||||||
ExecutorType.valueOf(taskType.toUpperCase()));
|
ExecutorType.valueOf(taskType.toUpperCase()));
|
||||||
|
@@ -9,15 +9,15 @@ import java.util.logging.Level;
|
|||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
|
||||||
|
|
||||||
import ch.unisg.executorbase.executor.application.port.out.ExecutionFinishedEventPort;
|
import ch.unisg.executorbase.executor.application.port.out.ExecutionFinishedEventPort;
|
||||||
import ch.unisg.executorbase.executor.domain.ExecutionFinishedEvent;
|
import ch.unisg.executorbase.executor.domain.ExecutionFinishedEvent;
|
||||||
|
|
||||||
public class ExecutionFinishedEventAdapter implements ExecutionFinishedEventPort {
|
public class ExecutionFinishedEventAdapter implements ExecutionFinishedEventPort {
|
||||||
|
|
||||||
@Value("${roster.url}")
|
String server = System.getenv("ROSTER_URI") == null ?
|
||||||
String server;
|
"http://localhost:8082" : System.getenv("ROSTER_URI");
|
||||||
|
|
||||||
|
|
||||||
Logger logger = Logger.getLogger(ExecutionFinishedEventAdapter.class.getName());
|
Logger logger = Logger.getLogger(ExecutionFinishedEventAdapter.class.getName());
|
||||||
|
|
||||||
@@ -28,9 +28,11 @@ public class ExecutionFinishedEventAdapter implements ExecutionFinishedEventPort
|
|||||||
@Override
|
@Override
|
||||||
public void publishExecutionFinishedEvent(ExecutionFinishedEvent event) {
|
public void publishExecutionFinishedEvent(ExecutionFinishedEvent event) {
|
||||||
|
|
||||||
|
logger.log(Level.INFO, "ExecutorBase | Sending finish execution event....");
|
||||||
|
|
||||||
String body = new JSONObject()
|
String body = new JSONObject()
|
||||||
.put("taskID", event.getTaskID())
|
.put("taskID", event.getTaskID())
|
||||||
.put("result", event.getResult())
|
.put("outputData", event.getOutputData())
|
||||||
.put("status", event.getStatus())
|
.put("status", event.getStatus())
|
||||||
.toString();
|
.toString();
|
||||||
|
|
||||||
@@ -41,6 +43,7 @@ public class ExecutionFinishedEventAdapter implements ExecutionFinishedEventPort
|
|||||||
.POST(HttpRequest.BodyPublishers.ofString(body))
|
.POST(HttpRequest.BodyPublishers.ofString(body))
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
client.send(request, HttpResponse.BodyHandlers.ofString());
|
client.send(request, HttpResponse.BodyHandlers.ofString());
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
@@ -50,8 +53,7 @@ public class ExecutionFinishedEventAdapter implements ExecutionFinishedEventPort
|
|||||||
logger.log(Level.SEVERE, e.getLocalizedMessage(), e);
|
logger.log(Level.SEVERE, e.getLocalizedMessage(), e);
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.log(Level.INFO, "Finish execution event sent with result: {}", event.getResult());
|
logger.log(Level.INFO, "ExecutorBase | Finish execution event sent with result: {0}", event.getOutputData());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -8,8 +8,8 @@ import java.net.http.HttpResponse;
|
|||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
|
||||||
import org.springframework.context.annotation.Primary;
|
import org.springframework.context.annotation.Primary;
|
||||||
|
import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import ch.unisg.common.valueobject.ExecutorURI;
|
import ch.unisg.common.valueobject.ExecutorURI;
|
||||||
@@ -23,8 +23,8 @@ import org.json.JSONObject;
|
|||||||
@Primary
|
@Primary
|
||||||
public class GetAssignmentAdapter implements GetAssignmentPort {
|
public class GetAssignmentAdapter implements GetAssignmentPort {
|
||||||
|
|
||||||
@Value("${roster.url}")
|
String server = System.getenv("ROSTER_URI") == null ?
|
||||||
String server;
|
"http://localhost:8082" : System.getenv("ROSTER_URI");
|
||||||
|
|
||||||
Logger logger = Logger.getLogger(GetAssignmentAdapter.class.getName());
|
Logger logger = Logger.getLogger(GetAssignmentAdapter.class.getName());
|
||||||
|
|
||||||
@@ -49,14 +49,19 @@ public class GetAssignmentAdapter implements GetAssignmentPort {
|
|||||||
.build();
|
.build();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
logger.info("Sending getAssignment Request");
|
logger.info("ExecutorBase | Sending getAssignment request");
|
||||||
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
|
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
|
||||||
logger.log(Level.INFO, "getAssignment request result:\n {}", response.body());
|
if (response.statusCode() != HttpStatus.OK.value()) {
|
||||||
if (response.body().equals("")) {
|
logger.info("ExecutorBase | No task assigned");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
logger.info("ExecutorBase | Task assigned");
|
||||||
JSONObject responseBody = new JSONObject(response.body());
|
JSONObject responseBody = new JSONObject(response.body());
|
||||||
return new Task(responseBody.getString("taskID"), responseBody.getString("input"));
|
|
||||||
|
if (!responseBody.get("inputData").equals(null)) {
|
||||||
|
return new Task(responseBody.getString("taskID"), responseBody.getString("inputData"));
|
||||||
|
}
|
||||||
|
return new Task(responseBody.getString("taskID"));
|
||||||
|
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
logger.log(Level.SEVERE, e.getLocalizedMessage(), e);
|
logger.log(Level.SEVERE, e.getLocalizedMessage(), e);
|
||||||
|
@@ -9,7 +9,6 @@ import java.util.logging.Level;
|
|||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
|
||||||
import org.springframework.context.annotation.Primary;
|
import org.springframework.context.annotation.Primary;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
@@ -22,8 +21,8 @@ import ch.unisg.executorbase.executor.domain.ExecutorType;
|
|||||||
@Primary
|
@Primary
|
||||||
public class NotifyExecutorPoolAdapter implements NotifyExecutorPoolPort {
|
public class NotifyExecutorPoolAdapter implements NotifyExecutorPoolPort {
|
||||||
|
|
||||||
@Value("${executor-pool.url}")
|
String server = System.getenv("EXECUTOR_POOL_URI") == null ?
|
||||||
String server;
|
"http://localhost:8083" : System.getenv("EXECUTOR_POOL_URI");
|
||||||
|
|
||||||
Logger logger = Logger.getLogger(NotifyExecutorPoolAdapter.class.getName());
|
Logger logger = Logger.getLogger(NotifyExecutorPoolAdapter.class.getName());
|
||||||
|
|
||||||
@@ -36,12 +35,12 @@ public class NotifyExecutorPoolAdapter implements NotifyExecutorPoolPort {
|
|||||||
|
|
||||||
String body = new JSONObject()
|
String body = new JSONObject()
|
||||||
.put("executorTaskType", executorType)
|
.put("executorTaskType", executorType)
|
||||||
.put("executorURI", executorURI.getValue())
|
.put("executorUri", executorURI.getValue())
|
||||||
.toString();
|
.toString();
|
||||||
|
|
||||||
HttpClient client = HttpClient.newHttpClient();
|
HttpClient client = HttpClient.newHttpClient();
|
||||||
HttpRequest request = HttpRequest.newBuilder()
|
HttpRequest request = HttpRequest.newBuilder()
|
||||||
.uri(URI.create(server+"/executor-pool/AddExecutor"))
|
.uri(URI.create(server+"/executor-pool/executors"))
|
||||||
.header("Content-Type", "application/json")
|
.header("Content-Type", "application/json")
|
||||||
.POST(HttpRequest.BodyPublishers.ofString(body))
|
.POST(HttpRequest.BodyPublishers.ofString(body))
|
||||||
.build();
|
.build();
|
||||||
|
@@ -4,9 +4,11 @@ import javax.validation.constraints.NotNull;
|
|||||||
|
|
||||||
import ch.unisg.common.validation.SelfValidating;
|
import ch.unisg.common.validation.SelfValidating;
|
||||||
import ch.unisg.executorbase.executor.domain.ExecutorType;
|
import ch.unisg.executorbase.executor.domain.ExecutorType;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.Value;
|
import lombok.Value;
|
||||||
|
|
||||||
@Value
|
@Value
|
||||||
|
@EqualsAndHashCode(callSuper=false)
|
||||||
public class TaskAvailableCommand extends SelfValidating<TaskAvailableCommand> {
|
public class TaskAvailableCommand extends SelfValidating<TaskAvailableCommand> {
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
|
@@ -15,6 +15,6 @@ public class TaskAvailableService implements TaskAvailableUseCase {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void newTaskAvailable(TaskAvailableCommand command) {
|
public void newTaskAvailable(TaskAvailableCommand command) {
|
||||||
// Placeholder so spring can create a bean, implementation of this function is inside the executors
|
// Placeholder so spring can create a bean, implementation of this service is inside the individual executors
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -8,14 +8,14 @@ public class ExecutionFinishedEvent {
|
|||||||
private String taskID;
|
private String taskID;
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
private String result;
|
private String outputData;
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
private String status;
|
private String status;
|
||||||
|
|
||||||
public ExecutionFinishedEvent(String taskID, String result, String status) {
|
public ExecutionFinishedEvent(String taskID, String outputData, String status) {
|
||||||
this.taskID = taskID;
|
this.taskID = taskID;
|
||||||
this.result = result;
|
this.outputData = outputData;
|
||||||
this.status = status;
|
this.status = status;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
package ch.unisg.executorbase.executor.domain;
|
package ch.unisg.executorbase.executor.domain;
|
||||||
|
|
||||||
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
import ch.unisg.common.valueobject.ExecutorURI;
|
import ch.unisg.common.valueobject.ExecutorURI;
|
||||||
@@ -23,9 +24,8 @@ public abstract class ExecutorBase {
|
|||||||
@Getter
|
@Getter
|
||||||
private ExecutorStatus status;
|
private ExecutorStatus status;
|
||||||
|
|
||||||
// TODO Violation of the Dependency Inversion Principle?, but we havn't really got a better solutions to send a http request / access a service from a domain model
|
// TODO Violation of the Dependency Inversion Principle?,
|
||||||
// TODO I guess we can implement the execution as a service but there still is the problem with the startup request.
|
// TODO do this with only services
|
||||||
// TODO I guess we can somehow autowire this but I don't know why it's not working :D
|
|
||||||
private final NotifyExecutorPoolPort notifyExecutorPoolPort = new NotifyExecutorPoolAdapter();
|
private final NotifyExecutorPoolPort notifyExecutorPoolPort = new NotifyExecutorPoolAdapter();
|
||||||
private final NotifyExecutorPoolService notifyExecutorPoolService = new NotifyExecutorPoolService(notifyExecutorPoolPort);
|
private final NotifyExecutorPoolService notifyExecutorPoolService = new NotifyExecutorPoolService(notifyExecutorPoolPort);
|
||||||
private final GetAssignmentPort getAssignmentPort = new GetAssignmentAdapter();
|
private final GetAssignmentPort getAssignmentPort = new GetAssignmentAdapter();
|
||||||
@@ -34,16 +34,19 @@ public abstract class ExecutorBase {
|
|||||||
Logger logger = Logger.getLogger(ExecutorBase.class.getName());
|
Logger logger = Logger.getLogger(ExecutorBase.class.getName());
|
||||||
|
|
||||||
protected ExecutorBase(ExecutorType executorType) {
|
protected ExecutorBase(ExecutorType executorType) {
|
||||||
logger.info("Starting Executor");
|
logger.info("ExecutorBase | Starting Executor");
|
||||||
this.status = ExecutorStatus.STARTING_UP;
|
this.status = ExecutorStatus.STARTING_UP;
|
||||||
this.executorType = executorType;
|
this.executorType = executorType;
|
||||||
// TODO set this automaticly
|
// TODO set this automaticly
|
||||||
this.executorURI = new ExecutorURI("localhost:8084");
|
this.executorURI = new ExecutorURI("http://localhost:8084");
|
||||||
|
// TODO do this in main
|
||||||
// Notify executor-pool about existence. If executor-pools response is successfull start with getting an assignment, else shut down executor.
|
// Notify executor-pool about existence. If executor-pools response is successfull start with getting an assignment, else shut down executor.
|
||||||
|
logger.info("ExecutorBase | Notifying executor-pool about existens");
|
||||||
if(!notifyExecutorPoolService.notifyExecutorPool(this.executorURI, this.executorType)) {
|
if(!notifyExecutorPoolService.notifyExecutorPool(this.executorURI, this.executorType)) {
|
||||||
|
logger.log(Level.WARNING, "ExecutorBase | Executor could not connect to executor pool! Shuting down!");
|
||||||
System.exit(0);
|
System.exit(0);
|
||||||
} else {
|
} else {
|
||||||
|
logger.info("ExecutorBase | Executor conntected to executor pool");
|
||||||
this.status = ExecutorStatus.IDLING;
|
this.status = ExecutorStatus.IDLING;
|
||||||
getAssignment();
|
getAssignment();
|
||||||
}
|
}
|
||||||
@@ -56,8 +59,10 @@ public abstract class ExecutorBase {
|
|||||||
public void getAssignment() {
|
public void getAssignment() {
|
||||||
Task newTask = getAssignmentPort.getAssignment(this.getExecutorType(), this.getExecutorURI());
|
Task newTask = getAssignmentPort.getAssignment(this.getExecutorType(), this.getExecutorURI());
|
||||||
if (newTask != null) {
|
if (newTask != null) {
|
||||||
|
logger.info("ExecutorBase | Executor got a new task");
|
||||||
this.executeTask(newTask);
|
this.executeTask(newTask);
|
||||||
} else {
|
} else {
|
||||||
|
logger.info("ExecutorBase | Executor got no new task");
|
||||||
this.status = ExecutorStatus.IDLING;
|
this.status = ExecutorStatus.IDLING;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -67,16 +72,16 @@ public abstract class ExecutorBase {
|
|||||||
* @return void
|
* @return void
|
||||||
**/
|
**/
|
||||||
private void executeTask(Task task) {
|
private void executeTask(Task task) {
|
||||||
logger.info("Starting execution");
|
logger.info("ExecutorBase | Starting execution");
|
||||||
this.status = ExecutorStatus.EXECUTING;
|
this.status = ExecutorStatus.EXECUTING;
|
||||||
|
|
||||||
task.setResult(execution(task.getInput()));
|
task.setOutputData(execution(task.getInputData()));
|
||||||
|
|
||||||
// TODO implement logic if execution was not successful
|
// TODO implement logic if execution was not successful
|
||||||
executionFinishedEventPort.publishExecutionFinishedEvent(
|
executionFinishedEventPort.publishExecutionFinishedEvent(
|
||||||
new ExecutionFinishedEvent(task.getTaskID(), task.getResult(), "SUCCESS"));
|
new ExecutionFinishedEvent(task.getTaskID(), task.getOutputData(), "SUCCESS"));
|
||||||
|
|
||||||
logger.info("Finish execution");
|
logger.info("ExecutorBase | Finish execution");
|
||||||
getAssignment();
|
getAssignment();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -84,6 +89,6 @@ public abstract class ExecutorBase {
|
|||||||
* Implementation of the actual execution method of an executor
|
* Implementation of the actual execution method of an executor
|
||||||
* @return the execution result
|
* @return the execution result
|
||||||
**/
|
**/
|
||||||
protected abstract String execution(String... input);
|
protected abstract String execution(String input);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -1,11 +1,11 @@
|
|||||||
package ch.unisg.executorbase.executor.domain;
|
package ch.unisg.executorbase.executor.domain;
|
||||||
|
|
||||||
public enum ExecutorType {
|
public enum ExecutorType {
|
||||||
ADDITION, ROBOT;
|
COMPUTATION, SMALLROBOT, HUMIDITY, HUMIDITY_DEMO;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if the give executor type exists.
|
* Checks if the give executor type exists.
|
||||||
* @return Wheter the given executor type exists
|
* @return Whether the given executor type exists
|
||||||
**/
|
**/
|
||||||
public static boolean contains(String test) {
|
public static boolean contains(String test) {
|
||||||
|
|
||||||
|
@@ -10,14 +10,21 @@ public class Task {
|
|||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
private String result;
|
private String outputData;
|
||||||
|
|
||||||
|
// TODO maybe create a value object for inputData so we can make sure it is in the right
|
||||||
|
// format.
|
||||||
@Getter
|
@Getter
|
||||||
private String[] input;
|
private String inputData;
|
||||||
|
|
||||||
public Task(String taskID, String... input) {
|
public Task(String taskID, String inputData) {
|
||||||
this.taskID = taskID;
|
this.taskID = taskID;
|
||||||
this.input = input;
|
this.inputData = inputData;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Task(String taskID) {
|
||||||
|
this.taskID = taskID;
|
||||||
|
this.inputData = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -1,6 +1,15 @@
|
|||||||
server.port=8081
|
server.port=8081
|
||||||
roster.url=http://127.0.0.1:8082
|
roster.url=http://127.0.0.1:8082
|
||||||
executor-pool.url=http://127.0.0.1:8083
|
executor.pool.url=http://127.0.0.1:8083
|
||||||
executor1.url=http://127.0.0.1:8084
|
|
||||||
executor2.url=http://127.0.0.1:8085
|
spring.profiles.active=chaos-monkey
|
||||||
task-list.url=http://127.0.0.1:8081
|
chaos.monkey.enabled=false
|
||||||
|
management.endpoint.chaosmonkey.enabled=true
|
||||||
|
management.endpoint.chaosmonkeyjmx.enabled=true
|
||||||
|
# include specific endpoints
|
||||||
|
management.endpoints.web.exposure.include=health,info,chaosmonkey
|
||||||
|
chaos.monkey.watcher.controller=true
|
||||||
|
chaos.monkey.watcher.restController=true
|
||||||
|
chaos.monkey.watcher.service=true
|
||||||
|
chaos.monkey.watcher.repository=true
|
||||||
|
chaos.monkey.watcher.component=true
|
||||||
|
31
executor-computation/Dockerfile
Normal file
31
executor-computation/Dockerfile
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
FROM openjdk:11 AS development
|
||||||
|
|
||||||
|
WORKDIR /opt/app
|
||||||
|
|
||||||
|
ENV EXECUTOR_POOL_URI=http://executor-pool:8083
|
||||||
|
ENV ROSTER_URI=http://roster:8082
|
||||||
|
|
||||||
|
COPY executor-computation/.mvn ./.mvn
|
||||||
|
COPY executor-computation/mvnw executor-computation/pom.xml executor-computation/mvnw.cmd ./
|
||||||
|
|
||||||
|
RUN apt-get clean && apt-get update && apt-get install dos2unix
|
||||||
|
RUN dos2unix mvnw
|
||||||
|
|
||||||
|
COPY common/pom.xml /opt/app/common/
|
||||||
|
COPY common/src /opt/app/common/src
|
||||||
|
COPY common/*target /opt/app/common/target
|
||||||
|
|
||||||
|
COPY executor-base/pom.xml /opt/app/executor-base/
|
||||||
|
COPY executor-base/src /opt/app/executor-base/src
|
||||||
|
COPY executor-base/*target /opt/app/executor-base/target
|
||||||
|
|
||||||
|
COPY executor-computation/src /opt/app/src
|
||||||
|
COPY executor-computation/*target /opt/app/target
|
||||||
|
|
||||||
|
RUN ./mvnw -f /opt/app/common/pom.xml clean install
|
||||||
|
|
||||||
|
RUN ./mvnw -f /opt/app/executor-base/pom.xml clean install
|
||||||
|
|
||||||
|
RUN ./mvnw clean install
|
||||||
|
|
||||||
|
CMD ["./mvnw", "spring-boot:run", "-Dspring-boot.run.jvmArguments=\"-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005\"", "-Dspring.devtools.restart.enabled=true"]
|
@@ -9,9 +9,9 @@
|
|||||||
<relativePath/> <!-- lookup parent from repository -->
|
<relativePath/> <!-- lookup parent from repository -->
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>ch.unisg</groupId>
|
<groupId>ch.unisg</groupId>
|
||||||
<artifactId>executorcomputation</artifactId>
|
<artifactId>executor-computation</artifactId>
|
||||||
<version>0.0.1-SNAPSHOT</version>
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
<name>executorcomputation</name>
|
<name>executor-computation</name>
|
||||||
<description>Demo project for Spring Boot</description>
|
<description>Demo project for Spring Boot</description>
|
||||||
<properties>
|
<properties>
|
||||||
<java.version>11</java.version>
|
<java.version>11</java.version>
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>ch.unisg</groupId>
|
<groupId>ch.unisg</groupId>
|
||||||
<artifactId>executorbase</artifactId>
|
<artifactId>executor-base</artifactId>
|
||||||
<version>0.0.1-SNAPSHOT</version>
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
@@ -52,6 +52,32 @@
|
|||||||
<artifactId>json</artifactId>
|
<artifactId>json</artifactId>
|
||||||
<version>20210307</version>
|
<version>20210307</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>de.codecentric</groupId>
|
||||||
|
<artifactId>chaos-monkey-spring-boot</artifactId>
|
||||||
|
<version>2.5.4</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-test</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.graalvm.js</groupId>
|
||||||
|
<artifactId>js</artifactId>
|
||||||
|
<version>21.3.0</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.graalvm.js</groupId>
|
||||||
|
<artifactId>js-scriptengine</artifactId>
|
||||||
|
<version>21.3.0</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
@@ -1,5 +1,9 @@
|
|||||||
package ch.unisg.executorcomputation;
|
package ch.unisg.executorcomputation;
|
||||||
|
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
|
||||||
@@ -8,6 +12,8 @@ import ch.unisg.executorcomputation.executor.domain.Executor;
|
|||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
public class ExecutorcomputationApplication {
|
public class ExecutorcomputationApplication {
|
||||||
|
|
||||||
|
static Logger logger = Logger.getLogger(ExecutorcomputationApplication.class.getName());
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
SpringApplication.run(ExecutorcomputationApplication.class, args);
|
SpringApplication.run(ExecutorcomputationApplication.class, args);
|
||||||
Executor.getExecutor();
|
Executor.getExecutor();
|
@@ -0,0 +1,58 @@
|
|||||||
|
package ch.unisg.executorcomputation.executor.domain;
|
||||||
|
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
|
import javax.script.ScriptEngine;
|
||||||
|
import javax.script.ScriptEngineManager;
|
||||||
|
import javax.script.ScriptException;
|
||||||
|
|
||||||
|
import ch.unisg.executorbase.executor.domain.ExecutorBase;
|
||||||
|
import ch.unisg.executorbase.executor.domain.ExecutorType;
|
||||||
|
|
||||||
|
public class Executor extends ExecutorBase {
|
||||||
|
|
||||||
|
private static Logger executorLogger = Logger.getLogger(Executor.class.getName());
|
||||||
|
|
||||||
|
private static final Executor executor = new Executor(ExecutorType.COMPUTATION);
|
||||||
|
|
||||||
|
public static Executor getExecutor() {
|
||||||
|
return executor;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Executor(ExecutorType executorType) {
|
||||||
|
super(executorType);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected
|
||||||
|
String execution(String inputData) {
|
||||||
|
|
||||||
|
executorLogger.info("Executor | Starting execution with inputData: " + inputData);
|
||||||
|
|
||||||
|
ScriptEngineManager mgr = new ScriptEngineManager();
|
||||||
|
ScriptEngine engine = mgr.getEngineByName("JavaScript");
|
||||||
|
|
||||||
|
String result = "";
|
||||||
|
try {
|
||||||
|
result = engine.eval(inputData).toString();
|
||||||
|
} catch (ScriptException e1) {
|
||||||
|
// TODO some logic if execution fails
|
||||||
|
executorLogger.severe(e1.getMessage());
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
TimeUnit.SECONDS.sleep(1);
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
return result;
|
||||||
|
// executorLogger.log(Level.SEVERE, e.getLocalizedMessage(), e);
|
||||||
|
// Thread.currentThread().interrupt();
|
||||||
|
}
|
||||||
|
|
||||||
|
executorLogger.info("Executor | Finish execution");
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@@ -0,0 +1,14 @@
|
|||||||
|
server.port=8085
|
||||||
|
|
||||||
|
spring.profiles.active=chaos-monkey
|
||||||
|
chaos.monkey.enabled=false
|
||||||
|
management.endpoint.chaosmonkey.enabled=true
|
||||||
|
management.endpoint.chaosmonkeyjmx.enabled=true
|
||||||
|
# include specific endpoints
|
||||||
|
management.endpoints.web.exposure.include=health,info,chaosmonkey
|
||||||
|
chaos.monkey.watcher.controller=true
|
||||||
|
chaos.monkey.watcher.restController=true
|
||||||
|
chaos.monkey.watcher.service=true
|
||||||
|
chaos.monkey.watcher.repository=true
|
||||||
|
chaos.monkey.watcher.component=true
|
||||||
|
|
3
executor-humidity-demo/Californium3.properties
Normal file
3
executor-humidity-demo/Californium3.properties
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# Californium3 CoAP Properties file
|
||||||
|
# Wed Dec 15 22:23:03 CET 2021
|
||||||
|
#
|
81
executor-humidity-demo/pom.xml
Normal file
81
executor-humidity-demo/pom.xml
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-parent</artifactId>
|
||||||
|
<version>2.5.5</version>
|
||||||
|
<relativePath/> <!-- lookup parent from repository -->
|
||||||
|
</parent>
|
||||||
|
<groupId>ch.unisg</groupId>
|
||||||
|
<artifactId>executor-humidity-demo</artifactId>
|
||||||
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
|
<name>executor-humidity-demo</name>
|
||||||
|
<description>Demo project for Spring Boot</description>
|
||||||
|
<properties>
|
||||||
|
<java.version>11</java.version>
|
||||||
|
</properties>
|
||||||
|
<repositories>
|
||||||
|
<repository>
|
||||||
|
<id>jitpack.io</id>
|
||||||
|
<url>https://jitpack.io</url>
|
||||||
|
</repository>
|
||||||
|
</repositories>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-autoconfigure</artifactId>
|
||||||
|
<version>2.5.5</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-web</artifactId>
|
||||||
|
<version>5.3.10</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-devtools</artifactId>
|
||||||
|
<scope>runtime</scope>
|
||||||
|
<optional>true</optional>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>ch.unisg</groupId>
|
||||||
|
<artifactId>executor-base</artifactId>
|
||||||
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.eclipse.californium</groupId>
|
||||||
|
<artifactId>californium-core</artifactId>
|
||||||
|
<version>3.0.0</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.Interactions-HSG</groupId>
|
||||||
|
<artifactId>wot-td-java</artifactId>
|
||||||
|
<version>0.1.1</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<excludes>
|
||||||
|
<exclude>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
</exclude>
|
||||||
|
</excludes>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
</project>
|
@@ -0,0 +1,16 @@
|
|||||||
|
package ch.unisg.executorhumidity;
|
||||||
|
|
||||||
|
import org.springframework.boot.SpringApplication;
|
||||||
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
|
||||||
|
import ch.unisg.executorhumidity.executor.domain.Executor;
|
||||||
|
|
||||||
|
@SpringBootApplication
|
||||||
|
public class ExecutorhumidityApplication {
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
SpringApplication.run(ExecutorhumidityApplication.class, args);
|
||||||
|
Executor.getExecutor();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@@ -0,0 +1,38 @@
|
|||||||
|
package ch.unisg.executorhumidity.executor.adapter.in.web;
|
||||||
|
|
||||||
|
import org.springframework.http.HttpHeaders;
|
||||||
|
import org.springframework.http.HttpStatus;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import ch.unisg.executorbase.executor.application.port.in.TaskAvailableCommand;
|
||||||
|
import ch.unisg.executorbase.executor.application.port.in.TaskAvailableUseCase;
|
||||||
|
import ch.unisg.executorbase.executor.domain.ExecutorType;
|
||||||
|
|
||||||
|
import java.util.concurrent.CompletableFuture;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
public class TaskAvailableController {
|
||||||
|
private final TaskAvailableUseCase taskAvailableUseCase;
|
||||||
|
|
||||||
|
public TaskAvailableController(TaskAvailableUseCase taskAvailableUseCase) {
|
||||||
|
this.taskAvailableUseCase = taskAvailableUseCase;
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping(path="/newtask/{taskType}")
|
||||||
|
public ResponseEntity<String> retrieveTaskfromTaskList(@PathVariable("taskType") String taskType) {
|
||||||
|
|
||||||
|
if (ExecutorType.contains(taskType.toUpperCase())) {
|
||||||
|
TaskAvailableCommand command = new TaskAvailableCommand(
|
||||||
|
ExecutorType.valueOf(taskType.toUpperCase()));
|
||||||
|
CompletableFuture.runAsync(() -> taskAvailableUseCase.newTaskAvailable(command));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add the content type as a response header
|
||||||
|
HttpHeaders responseHeaders = new HttpHeaders();
|
||||||
|
|
||||||
|
return new ResponseEntity<>("OK", responseHeaders, HttpStatus.OK);
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,114 @@
|
|||||||
|
package ch.unisg.executorhumidity.executor.adapter.out;
|
||||||
|
|
||||||
|
import ch.unisg.executorhumidity.executor.application.port.out.GetHumidityPort;
|
||||||
|
import ch.unisg.ics.interactions.wot.td.ThingDescription;
|
||||||
|
import ch.unisg.ics.interactions.wot.td.affordances.Form;
|
||||||
|
import ch.unisg.ics.interactions.wot.td.affordances.PropertyAffordance;
|
||||||
|
import ch.unisg.ics.interactions.wot.td.clients.TDCoapRequest;
|
||||||
|
import ch.unisg.ics.interactions.wot.td.clients.TDCoapResponse;
|
||||||
|
import ch.unisg.ics.interactions.wot.td.io.TDGraphReader;
|
||||||
|
import ch.unisg.ics.interactions.wot.td.schemas.ObjectSchema;
|
||||||
|
import ch.unisg.ics.interactions.wot.td.vocabularies.TD;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.context.annotation.Primary;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import org.w3c.dom.Document;
|
||||||
|
import org.w3c.dom.Node;
|
||||||
|
import org.w3c.dom.NodeList;
|
||||||
|
import org.xml.sax.InputSource;
|
||||||
|
import org.xml.sax.SAXException;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.StringReader;
|
||||||
|
import java.net.URI;
|
||||||
|
import java.net.http.HttpClient;
|
||||||
|
import java.net.http.HttpRequest;
|
||||||
|
import java.net.http.HttpResponse;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
import javax.xml.parsers.DocumentBuilder;
|
||||||
|
import javax.xml.parsers.DocumentBuilderFactory;
|
||||||
|
import javax.xml.parsers.ParserConfigurationException;
|
||||||
|
|
||||||
|
|
||||||
|
@Component
|
||||||
|
@Primary
|
||||||
|
public class GetHumidityAdapter implements GetHumidityPort {
|
||||||
|
|
||||||
|
String endpoint = System.getenv("SEARCH_ENGINE_URI") == null ?
|
||||||
|
"https://api.interactions.ics.unisg.ch/search/searchEngine" : System.getenv("SEARCH_ENGINE_URI");
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getHumidity() {
|
||||||
|
|
||||||
|
String input = "@prefix dct: <http://purl.org/dc/terms/> . select ?title where { ?title dct:title 'Mirogate' }";
|
||||||
|
|
||||||
|
var httpRequest = HttpRequest.newBuilder()
|
||||||
|
.uri(URI.create(endpoint))
|
||||||
|
.header("Content-Type", "application/sparql-query")
|
||||||
|
.POST(HttpRequest.BodyPublishers.ofString(input))
|
||||||
|
.build();
|
||||||
|
|
||||||
|
var client = HttpClient.newHttpClient();
|
||||||
|
|
||||||
|
try {
|
||||||
|
String description = client.send(httpRequest, HttpResponse.BodyHandlers.ofString()).body();
|
||||||
|
String mirogateUri = null;
|
||||||
|
|
||||||
|
DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
|
||||||
|
DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
|
||||||
|
Document doc = dBuilder.parse(new InputSource(new StringReader(description)));
|
||||||
|
|
||||||
|
doc.getDocumentElement().normalize();
|
||||||
|
|
||||||
|
NodeList results = doc.getElementsByTagName("uri");
|
||||||
|
for (int temp = 0; temp < results.getLength(); temp += 1) {
|
||||||
|
Node nNode = results.item(temp);
|
||||||
|
if (nNode.getTextContent().contains("mirogate")) {
|
||||||
|
mirogateUri = nNode.getTextContent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (mirogateUri == null) {
|
||||||
|
// TODO implement logic if execution failed
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Parse a TD from a string
|
||||||
|
ThingDescription td = TDGraphReader.readFromURL(ThingDescription.TDFormat.RDF_TURTLE, mirogateUri);
|
||||||
|
|
||||||
|
Optional<PropertyAffordance> humidity = td.getPropertyByName("humidity");
|
||||||
|
|
||||||
|
if (humidity.isPresent()) {
|
||||||
|
Optional<Form> form = humidity.get().getFirstFormForOperationType(TD.readProperty);
|
||||||
|
|
||||||
|
// System.out.println(humidity.get().getDataSchema().getDatatype());
|
||||||
|
if (form.isPresent()) {
|
||||||
|
TDCoapRequest request = new TDCoapRequest(form.get(), TD.readProperty);
|
||||||
|
try {
|
||||||
|
TDCoapResponse response = request.execute();
|
||||||
|
Map<String, Object> payload = response.getPayloadAsObject((ObjectSchema) humidity.get().getDataSchema());
|
||||||
|
Object result = payload.get("https://interactions.ics.unisg.ch/mirogate#HumidityValue");
|
||||||
|
return result.toString();
|
||||||
|
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (ParserConfigurationException e1) {
|
||||||
|
// TODO Auto-generated catch block
|
||||||
|
e1.printStackTrace();
|
||||||
|
} catch (SAXException e1) {
|
||||||
|
// TODO Auto-generated catch block
|
||||||
|
e1.printStackTrace();
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,9 @@
|
|||||||
|
package ch.unisg.executorhumidity.executor.application.port.out;
|
||||||
|
|
||||||
|
import org.eclipse.californium.elements.exception.ConnectorException;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
public interface GetHumidityPort {
|
||||||
|
String getHumidity();
|
||||||
|
}
|
@@ -0,0 +1,27 @@
|
|||||||
|
package ch.unisg.executorhumidity.executor.application.service;
|
||||||
|
|
||||||
|
import ch.unisg.executorbase.executor.domain.ExecutorStatus;
|
||||||
|
import ch.unisg.executorhumidity.executor.domain.Executor;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import ch.unisg.executorbase.executor.application.port.in.TaskAvailableCommand;
|
||||||
|
import ch.unisg.executorbase.executor.application.port.in.TaskAvailableUseCase;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
|
||||||
|
import javax.transaction.Transactional;
|
||||||
|
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Component
|
||||||
|
@Transactional
|
||||||
|
public class TaskAvailableService implements TaskAvailableUseCase {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void newTaskAvailable(TaskAvailableCommand command) {
|
||||||
|
|
||||||
|
Executor executor = Executor.getExecutor();
|
||||||
|
|
||||||
|
if(executor.getExecutorType() == command.getTaskType() &&
|
||||||
|
executor.getStatus() == ExecutorStatus.IDLING) {
|
||||||
|
executor.getAssignment();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,31 @@
|
|||||||
|
package ch.unisg.executorhumidity.executor.domain;
|
||||||
|
|
||||||
|
import ch.unisg.executorbase.executor.domain.ExecutorBase;
|
||||||
|
import ch.unisg.executorbase.executor.domain.ExecutorType;
|
||||||
|
import ch.unisg.executorhumidity.executor.adapter.out.GetHumidityAdapter;
|
||||||
|
import ch.unisg.executorhumidity.executor.application.port.out.GetHumidityPort;
|
||||||
|
import org.eclipse.californium.elements.exception.ConnectorException;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
public class Executor extends ExecutorBase {
|
||||||
|
|
||||||
|
private static final Executor executor = new Executor(ExecutorType.HUMIDITY_DEMO);
|
||||||
|
|
||||||
|
private final GetHumidityPort getHumidityPort = new GetHumidityAdapter();
|
||||||
|
|
||||||
|
private Executor(ExecutorType executorType) {super(executorType);}
|
||||||
|
|
||||||
|
public static Executor getExecutor() {return executor;}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected
|
||||||
|
String execution(String input) {
|
||||||
|
//TODO: Fill
|
||||||
|
|
||||||
|
String result = getHumidityPort.getHumidity();
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,16 @@
|
|||||||
|
server.port=8088
|
||||||
|
|
||||||
|
search.engine.uri=https://api.interactions.ics.unisg.ch/search/searchEngine
|
||||||
|
|
||||||
|
spring.profiles.active=chaos-monkey
|
||||||
|
chaos.monkey.enabled=false
|
||||||
|
management.endpoint.chaosmonkey.enabled=true
|
||||||
|
management.endpoint.chaosmonkeyjmx.enabled=true
|
||||||
|
# include specific endpoints
|
||||||
|
management.endpoints.web.exposure.include=health,info,chaosmonkey
|
||||||
|
chaos.monkey.watcher.controller=true
|
||||||
|
chaos.monkey.watcher.restController=true
|
||||||
|
chaos.monkey.watcher.service=true
|
||||||
|
chaos.monkey.watcher.repository=true
|
||||||
|
chaos.monkey.watcher.component=true
|
||||||
|
|
33
executor-humidity/.gitignore
vendored
Normal file
33
executor-humidity/.gitignore
vendored
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
HELP.md
|
||||||
|
target/
|
||||||
|
!.mvn/wrapper/maven-wrapper.jar
|
||||||
|
!**/src/main/**/target/
|
||||||
|
!**/src/test/**/target/
|
||||||
|
|
||||||
|
### STS ###
|
||||||
|
.apt_generated
|
||||||
|
.classpath
|
||||||
|
.factorypath
|
||||||
|
.project
|
||||||
|
.settings
|
||||||
|
.springBeans
|
||||||
|
.sts4-cache
|
||||||
|
|
||||||
|
### IntelliJ IDEA ###
|
||||||
|
.idea
|
||||||
|
*.iws
|
||||||
|
*.iml
|
||||||
|
*.ipr
|
||||||
|
|
||||||
|
### NetBeans ###
|
||||||
|
/nbproject/private/
|
||||||
|
/nbbuild/
|
||||||
|
/dist/
|
||||||
|
/nbdist/
|
||||||
|
/.nb-gradle/
|
||||||
|
build/
|
||||||
|
!**/src/main/**/build/
|
||||||
|
!**/src/test/**/build/
|
||||||
|
|
||||||
|
### VS Code ###
|
||||||
|
.vscode/
|
117
executor-humidity/.mvn/wrapper/MavenWrapperDownloader.java
vendored
Normal file
117
executor-humidity/.mvn/wrapper/MavenWrapperDownloader.java
vendored
Normal file
@@ -0,0 +1,117 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2007-present the original author or authors.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
import java.net.*;
|
||||||
|
import java.io.*;
|
||||||
|
import java.nio.channels.*;
|
||||||
|
import java.util.Properties;
|
||||||
|
|
||||||
|
public class MavenWrapperDownloader {
|
||||||
|
|
||||||
|
private static final String WRAPPER_VERSION = "0.5.6";
|
||||||
|
/**
|
||||||
|
* Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
|
||||||
|
*/
|
||||||
|
private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/"
|
||||||
|
+ WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
|
||||||
|
* use instead of the default one.
|
||||||
|
*/
|
||||||
|
private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
|
||||||
|
".mvn/wrapper/maven-wrapper.properties";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Path where the maven-wrapper.jar will be saved to.
|
||||||
|
*/
|
||||||
|
private static final String MAVEN_WRAPPER_JAR_PATH =
|
||||||
|
".mvn/wrapper/maven-wrapper.jar";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Name of the property which should be used to override the default download url for the wrapper.
|
||||||
|
*/
|
||||||
|
private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
|
||||||
|
|
||||||
|
public static void main(String args[]) {
|
||||||
|
System.out.println("- Downloader started");
|
||||||
|
File baseDirectory = new File(args[0]);
|
||||||
|
System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
|
||||||
|
|
||||||
|
// If the maven-wrapper.properties exists, read it and check if it contains a custom
|
||||||
|
// wrapperUrl parameter.
|
||||||
|
File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
|
||||||
|
String url = DEFAULT_DOWNLOAD_URL;
|
||||||
|
if(mavenWrapperPropertyFile.exists()) {
|
||||||
|
FileInputStream mavenWrapperPropertyFileInputStream = null;
|
||||||
|
try {
|
||||||
|
mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
|
||||||
|
Properties mavenWrapperProperties = new Properties();
|
||||||
|
mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
|
||||||
|
url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
|
||||||
|
} catch (IOException e) {
|
||||||
|
System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
if(mavenWrapperPropertyFileInputStream != null) {
|
||||||
|
mavenWrapperPropertyFileInputStream.close();
|
||||||
|
}
|
||||||
|
} catch (IOException e) {
|
||||||
|
// Ignore ...
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
System.out.println("- Downloading from: " + url);
|
||||||
|
|
||||||
|
File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
|
||||||
|
if(!outputFile.getParentFile().exists()) {
|
||||||
|
if(!outputFile.getParentFile().mkdirs()) {
|
||||||
|
System.out.println(
|
||||||
|
"- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
|
||||||
|
try {
|
||||||
|
downloadFileFromURL(url, outputFile);
|
||||||
|
System.out.println("Done");
|
||||||
|
System.exit(0);
|
||||||
|
} catch (Throwable e) {
|
||||||
|
System.out.println("- Error downloading");
|
||||||
|
e.printStackTrace();
|
||||||
|
System.exit(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void downloadFileFromURL(String urlString, File destination) throws Exception {
|
||||||
|
if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
|
||||||
|
String username = System.getenv("MVNW_USERNAME");
|
||||||
|
char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
|
||||||
|
Authenticator.setDefault(new Authenticator() {
|
||||||
|
@Override
|
||||||
|
protected PasswordAuthentication getPasswordAuthentication() {
|
||||||
|
return new PasswordAuthentication(username, password);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
URL website = new URL(urlString);
|
||||||
|
ReadableByteChannel rbc;
|
||||||
|
rbc = Channels.newChannel(website.openStream());
|
||||||
|
FileOutputStream fos = new FileOutputStream(destination);
|
||||||
|
fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
|
||||||
|
fos.close();
|
||||||
|
rbc.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
BIN
executor-humidity/.mvn/wrapper/maven-wrapper.jar
vendored
Normal file
BIN
executor-humidity/.mvn/wrapper/maven-wrapper.jar
vendored
Normal file
Binary file not shown.
2
executor-humidity/.mvn/wrapper/maven-wrapper.properties
vendored
Normal file
2
executor-humidity/.mvn/wrapper/maven-wrapper.properties
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.2/apache-maven-3.8.2-bin.zip
|
||||||
|
wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar
|
3
executor-humidity/Californium3.properties
Normal file
3
executor-humidity/Californium3.properties
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# Californium3 CoAP Properties file
|
||||||
|
# Wed Dec 15 22:23:03 CET 2021
|
||||||
|
#
|
310
executor-humidity/mvnw
vendored
Executable file
310
executor-humidity/mvnw
vendored
Executable file
@@ -0,0 +1,310 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
# or more contributor license agreements. See the NOTICE file
|
||||||
|
# distributed with this work for additional information
|
||||||
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
|
# to you under the Apache License, Version 2.0 (the
|
||||||
|
# "License"); you may not use this file except in compliance
|
||||||
|
# with the License. You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing,
|
||||||
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
# Maven Start Up Batch script
|
||||||
|
#
|
||||||
|
# Required ENV vars:
|
||||||
|
# ------------------
|
||||||
|
# JAVA_HOME - location of a JDK home dir
|
||||||
|
#
|
||||||
|
# Optional ENV vars
|
||||||
|
# -----------------
|
||||||
|
# M2_HOME - location of maven2's installed home dir
|
||||||
|
# MAVEN_OPTS - parameters passed to the Java VM when running Maven
|
||||||
|
# e.g. to debug Maven itself, use
|
||||||
|
# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
|
||||||
|
# MAVEN_SKIP_RC - flag to disable loading of mavenrc files
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
if [ -z "$MAVEN_SKIP_RC" ] ; then
|
||||||
|
|
||||||
|
if [ -f /etc/mavenrc ] ; then
|
||||||
|
. /etc/mavenrc
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f "$HOME/.mavenrc" ] ; then
|
||||||
|
. "$HOME/.mavenrc"
|
||||||
|
fi
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
# OS specific support. $var _must_ be set to either true or false.
|
||||||
|
cygwin=false;
|
||||||
|
darwin=false;
|
||||||
|
mingw=false
|
||||||
|
case "`uname`" in
|
||||||
|
CYGWIN*) cygwin=true ;;
|
||||||
|
MINGW*) mingw=true;;
|
||||||
|
Darwin*) darwin=true
|
||||||
|
# Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
|
||||||
|
# See https://developer.apple.com/library/mac/qa/qa1170/_index.html
|
||||||
|
if [ -z "$JAVA_HOME" ]; then
|
||||||
|
if [ -x "/usr/libexec/java_home" ]; then
|
||||||
|
export JAVA_HOME="`/usr/libexec/java_home`"
|
||||||
|
else
|
||||||
|
export JAVA_HOME="/Library/Java/Home"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if [ -z "$JAVA_HOME" ] ; then
|
||||||
|
if [ -r /etc/gentoo-release ] ; then
|
||||||
|
JAVA_HOME=`java-config --jre-home`
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$M2_HOME" ] ; then
|
||||||
|
## resolve links - $0 may be a link to maven's home
|
||||||
|
PRG="$0"
|
||||||
|
|
||||||
|
# need this for relative symlinks
|
||||||
|
while [ -h "$PRG" ] ; do
|
||||||
|
ls=`ls -ld "$PRG"`
|
||||||
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||||
|
if expr "$link" : '/.*' > /dev/null; then
|
||||||
|
PRG="$link"
|
||||||
|
else
|
||||||
|
PRG="`dirname "$PRG"`/$link"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
saveddir=`pwd`
|
||||||
|
|
||||||
|
M2_HOME=`dirname "$PRG"`/..
|
||||||
|
|
||||||
|
# make it fully qualified
|
||||||
|
M2_HOME=`cd "$M2_HOME" && pwd`
|
||||||
|
|
||||||
|
cd "$saveddir"
|
||||||
|
# echo Using m2 at $M2_HOME
|
||||||
|
fi
|
||||||
|
|
||||||
|
# For Cygwin, ensure paths are in UNIX format before anything is touched
|
||||||
|
if $cygwin ; then
|
||||||
|
[ -n "$M2_HOME" ] &&
|
||||||
|
M2_HOME=`cygpath --unix "$M2_HOME"`
|
||||||
|
[ -n "$JAVA_HOME" ] &&
|
||||||
|
JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
|
||||||
|
[ -n "$CLASSPATH" ] &&
|
||||||
|
CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
|
||||||
|
fi
|
||||||
|
|
||||||
|
# For Mingw, ensure paths are in UNIX format before anything is touched
|
||||||
|
if $mingw ; then
|
||||||
|
[ -n "$M2_HOME" ] &&
|
||||||
|
M2_HOME="`(cd "$M2_HOME"; pwd)`"
|
||||||
|
[ -n "$JAVA_HOME" ] &&
|
||||||
|
JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$JAVA_HOME" ]; then
|
||||||
|
javaExecutable="`which javac`"
|
||||||
|
if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
|
||||||
|
# readlink(1) is not available as standard on Solaris 10.
|
||||||
|
readLink=`which readlink`
|
||||||
|
if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
|
||||||
|
if $darwin ; then
|
||||||
|
javaHome="`dirname \"$javaExecutable\"`"
|
||||||
|
javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
|
||||||
|
else
|
||||||
|
javaExecutable="`readlink -f \"$javaExecutable\"`"
|
||||||
|
fi
|
||||||
|
javaHome="`dirname \"$javaExecutable\"`"
|
||||||
|
javaHome=`expr "$javaHome" : '\(.*\)/bin'`
|
||||||
|
JAVA_HOME="$javaHome"
|
||||||
|
export JAVA_HOME
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$JAVACMD" ] ; then
|
||||||
|
if [ -n "$JAVA_HOME" ] ; then
|
||||||
|
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||||
|
# IBM's JDK on AIX uses strange locations for the executables
|
||||||
|
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||||
|
else
|
||||||
|
JAVACMD="$JAVA_HOME/bin/java"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
JAVACMD="`which java`"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -x "$JAVACMD" ] ; then
|
||||||
|
echo "Error: JAVA_HOME is not defined correctly." >&2
|
||||||
|
echo " We cannot execute $JAVACMD" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$JAVA_HOME" ] ; then
|
||||||
|
echo "Warning: JAVA_HOME environment variable is not set."
|
||||||
|
fi
|
||||||
|
|
||||||
|
CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
|
||||||
|
|
||||||
|
# traverses directory structure from process work directory to filesystem root
|
||||||
|
# first directory with .mvn subdirectory is considered project base directory
|
||||||
|
find_maven_basedir() {
|
||||||
|
|
||||||
|
if [ -z "$1" ]
|
||||||
|
then
|
||||||
|
echo "Path not specified to find_maven_basedir"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
basedir="$1"
|
||||||
|
wdir="$1"
|
||||||
|
while [ "$wdir" != '/' ] ; do
|
||||||
|
if [ -d "$wdir"/.mvn ] ; then
|
||||||
|
basedir=$wdir
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
# workaround for JBEAP-8937 (on Solaris 10/Sparc)
|
||||||
|
if [ -d "${wdir}" ]; then
|
||||||
|
wdir=`cd "$wdir/.."; pwd`
|
||||||
|
fi
|
||||||
|
# end of workaround
|
||||||
|
done
|
||||||
|
echo "${basedir}"
|
||||||
|
}
|
||||||
|
|
||||||
|
# concatenates all lines of a file
|
||||||
|
concat_lines() {
|
||||||
|
if [ -f "$1" ]; then
|
||||||
|
echo "$(tr -s '\n' ' ' < "$1")"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
BASE_DIR=`find_maven_basedir "$(pwd)"`
|
||||||
|
if [ -z "$BASE_DIR" ]; then
|
||||||
|
exit 1;
|
||||||
|
fi
|
||||||
|
|
||||||
|
##########################################################################################
|
||||||
|
# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
|
||||||
|
# This allows using the maven wrapper in projects that prohibit checking in binary data.
|
||||||
|
##########################################################################################
|
||||||
|
if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
|
||||||
|
if [ "$MVNW_VERBOSE" = true ]; then
|
||||||
|
echo "Found .mvn/wrapper/maven-wrapper.jar"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if [ "$MVNW_VERBOSE" = true ]; then
|
||||||
|
echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
|
||||||
|
fi
|
||||||
|
if [ -n "$MVNW_REPOURL" ]; then
|
||||||
|
jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
|
||||||
|
else
|
||||||
|
jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
|
||||||
|
fi
|
||||||
|
while IFS="=" read key value; do
|
||||||
|
case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
|
||||||
|
esac
|
||||||
|
done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
|
||||||
|
if [ "$MVNW_VERBOSE" = true ]; then
|
||||||
|
echo "Downloading from: $jarUrl"
|
||||||
|
fi
|
||||||
|
wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar"
|
||||||
|
if $cygwin; then
|
||||||
|
wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if command -v wget > /dev/null; then
|
||||||
|
if [ "$MVNW_VERBOSE" = true ]; then
|
||||||
|
echo "Found wget ... using wget"
|
||||||
|
fi
|
||||||
|
if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
|
||||||
|
wget "$jarUrl" -O "$wrapperJarPath"
|
||||||
|
else
|
||||||
|
wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath"
|
||||||
|
fi
|
||||||
|
elif command -v curl > /dev/null; then
|
||||||
|
if [ "$MVNW_VERBOSE" = true ]; then
|
||||||
|
echo "Found curl ... using curl"
|
||||||
|
fi
|
||||||
|
if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
|
||||||
|
curl -o "$wrapperJarPath" "$jarUrl" -f
|
||||||
|
else
|
||||||
|
curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f
|
||||||
|
fi
|
||||||
|
|
||||||
|
else
|
||||||
|
if [ "$MVNW_VERBOSE" = true ]; then
|
||||||
|
echo "Falling back to using Java to download"
|
||||||
|
fi
|
||||||
|
javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
|
||||||
|
# For Cygwin, switch paths to Windows format before running javac
|
||||||
|
if $cygwin; then
|
||||||
|
javaClass=`cygpath --path --windows "$javaClass"`
|
||||||
|
fi
|
||||||
|
if [ -e "$javaClass" ]; then
|
||||||
|
if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
|
||||||
|
if [ "$MVNW_VERBOSE" = true ]; then
|
||||||
|
echo " - Compiling MavenWrapperDownloader.java ..."
|
||||||
|
fi
|
||||||
|
# Compiling the Java class
|
||||||
|
("$JAVA_HOME/bin/javac" "$javaClass")
|
||||||
|
fi
|
||||||
|
if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
|
||||||
|
# Running the downloader
|
||||||
|
if [ "$MVNW_VERBOSE" = true ]; then
|
||||||
|
echo " - Running MavenWrapperDownloader.java ..."
|
||||||
|
fi
|
||||||
|
("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR")
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
##########################################################################################
|
||||||
|
# End of extension
|
||||||
|
##########################################################################################
|
||||||
|
|
||||||
|
export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
|
||||||
|
if [ "$MVNW_VERBOSE" = true ]; then
|
||||||
|
echo $MAVEN_PROJECTBASEDIR
|
||||||
|
fi
|
||||||
|
MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
|
||||||
|
|
||||||
|
# For Cygwin, switch paths to Windows format before running java
|
||||||
|
if $cygwin; then
|
||||||
|
[ -n "$M2_HOME" ] &&
|
||||||
|
M2_HOME=`cygpath --path --windows "$M2_HOME"`
|
||||||
|
[ -n "$JAVA_HOME" ] &&
|
||||||
|
JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
|
||||||
|
[ -n "$CLASSPATH" ] &&
|
||||||
|
CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
|
||||||
|
[ -n "$MAVEN_PROJECTBASEDIR" ] &&
|
||||||
|
MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Provide a "standardized" way to retrieve the CLI args that will
|
||||||
|
# work with both Windows and non-Windows executions.
|
||||||
|
MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
|
||||||
|
export MAVEN_CMD_LINE_ARGS
|
||||||
|
|
||||||
|
WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
|
||||||
|
|
||||||
|
exec "$JAVACMD" \
|
||||||
|
$MAVEN_OPTS \
|
||||||
|
-classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
|
||||||
|
"-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
|
||||||
|
${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
|
182
executor-humidity/mvnw.cmd
vendored
Normal file
182
executor-humidity/mvnw.cmd
vendored
Normal file
@@ -0,0 +1,182 @@
|
|||||||
|
@REM ----------------------------------------------------------------------------
|
||||||
|
@REM Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
@REM or more contributor license agreements. See the NOTICE file
|
||||||
|
@REM distributed with this work for additional information
|
||||||
|
@REM regarding copyright ownership. The ASF licenses this file
|
||||||
|
@REM to you under the Apache License, Version 2.0 (the
|
||||||
|
@REM "License"); you may not use this file except in compliance
|
||||||
|
@REM with the License. You may obtain a copy of the License at
|
||||||
|
@REM
|
||||||
|
@REM https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
@REM
|
||||||
|
@REM Unless required by applicable law or agreed to in writing,
|
||||||
|
@REM software distributed under the License is distributed on an
|
||||||
|
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
@REM KIND, either express or implied. See the License for the
|
||||||
|
@REM specific language governing permissions and limitations
|
||||||
|
@REM under the License.
|
||||||
|
@REM ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@REM ----------------------------------------------------------------------------
|
||||||
|
@REM Maven Start Up Batch script
|
||||||
|
@REM
|
||||||
|
@REM Required ENV vars:
|
||||||
|
@REM JAVA_HOME - location of a JDK home dir
|
||||||
|
@REM
|
||||||
|
@REM Optional ENV vars
|
||||||
|
@REM M2_HOME - location of maven2's installed home dir
|
||||||
|
@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
|
||||||
|
@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending
|
||||||
|
@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
|
||||||
|
@REM e.g. to debug Maven itself, use
|
||||||
|
@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
|
||||||
|
@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
|
||||||
|
@REM ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
|
||||||
|
@echo off
|
||||||
|
@REM set title of command window
|
||||||
|
title %0
|
||||||
|
@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on'
|
||||||
|
@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
|
||||||
|
|
||||||
|
@REM set %HOME% to equivalent of $HOME
|
||||||
|
if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
|
||||||
|
|
||||||
|
@REM Execute a user defined script before this one
|
||||||
|
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
|
||||||
|
@REM check for pre script, once with legacy .bat ending and once with .cmd ending
|
||||||
|
if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
|
||||||
|
if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
|
||||||
|
:skipRcPre
|
||||||
|
|
||||||
|
@setlocal
|
||||||
|
|
||||||
|
set ERROR_CODE=0
|
||||||
|
|
||||||
|
@REM To isolate internal variables from possible post scripts, we use another setlocal
|
||||||
|
@setlocal
|
||||||
|
|
||||||
|
@REM ==== START VALIDATION ====
|
||||||
|
if not "%JAVA_HOME%" == "" goto OkJHome
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo Error: JAVA_HOME not found in your environment. >&2
|
||||||
|
echo Please set the JAVA_HOME variable in your environment to match the >&2
|
||||||
|
echo location of your Java installation. >&2
|
||||||
|
echo.
|
||||||
|
goto error
|
||||||
|
|
||||||
|
:OkJHome
|
||||||
|
if exist "%JAVA_HOME%\bin\java.exe" goto init
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo Error: JAVA_HOME is set to an invalid directory. >&2
|
||||||
|
echo JAVA_HOME = "%JAVA_HOME%" >&2
|
||||||
|
echo Please set the JAVA_HOME variable in your environment to match the >&2
|
||||||
|
echo location of your Java installation. >&2
|
||||||
|
echo.
|
||||||
|
goto error
|
||||||
|
|
||||||
|
@REM ==== END VALIDATION ====
|
||||||
|
|
||||||
|
:init
|
||||||
|
|
||||||
|
@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
|
||||||
|
@REM Fallback to current working directory if not found.
|
||||||
|
|
||||||
|
set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
|
||||||
|
IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
|
||||||
|
|
||||||
|
set EXEC_DIR=%CD%
|
||||||
|
set WDIR=%EXEC_DIR%
|
||||||
|
:findBaseDir
|
||||||
|
IF EXIST "%WDIR%"\.mvn goto baseDirFound
|
||||||
|
cd ..
|
||||||
|
IF "%WDIR%"=="%CD%" goto baseDirNotFound
|
||||||
|
set WDIR=%CD%
|
||||||
|
goto findBaseDir
|
||||||
|
|
||||||
|
:baseDirFound
|
||||||
|
set MAVEN_PROJECTBASEDIR=%WDIR%
|
||||||
|
cd "%EXEC_DIR%"
|
||||||
|
goto endDetectBaseDir
|
||||||
|
|
||||||
|
:baseDirNotFound
|
||||||
|
set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
|
||||||
|
cd "%EXEC_DIR%"
|
||||||
|
|
||||||
|
:endDetectBaseDir
|
||||||
|
|
||||||
|
IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
|
||||||
|
|
||||||
|
@setlocal EnableExtensions EnableDelayedExpansion
|
||||||
|
for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
|
||||||
|
@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
|
||||||
|
|
||||||
|
:endReadAdditionalConfig
|
||||||
|
|
||||||
|
SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
|
||||||
|
set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
|
||||||
|
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
|
||||||
|
|
||||||
|
set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
|
||||||
|
|
||||||
|
FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
|
||||||
|
IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
|
||||||
|
)
|
||||||
|
|
||||||
|
@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
|
||||||
|
@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
|
||||||
|
if exist %WRAPPER_JAR% (
|
||||||
|
if "%MVNW_VERBOSE%" == "true" (
|
||||||
|
echo Found %WRAPPER_JAR%
|
||||||
|
)
|
||||||
|
) else (
|
||||||
|
if not "%MVNW_REPOURL%" == "" (
|
||||||
|
SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
|
||||||
|
)
|
||||||
|
if "%MVNW_VERBOSE%" == "true" (
|
||||||
|
echo Couldn't find %WRAPPER_JAR%, downloading it ...
|
||||||
|
echo Downloading from: %DOWNLOAD_URL%
|
||||||
|
)
|
||||||
|
|
||||||
|
powershell -Command "&{"^
|
||||||
|
"$webclient = new-object System.Net.WebClient;"^
|
||||||
|
"if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^
|
||||||
|
"$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^
|
||||||
|
"}"^
|
||||||
|
"[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^
|
||||||
|
"}"
|
||||||
|
if "%MVNW_VERBOSE%" == "true" (
|
||||||
|
echo Finished downloading %WRAPPER_JAR%
|
||||||
|
)
|
||||||
|
)
|
||||||
|
@REM End of extension
|
||||||
|
|
||||||
|
@REM Provide a "standardized" way to retrieve the CLI args that will
|
||||||
|
@REM work with both Windows and non-Windows executions.
|
||||||
|
set MAVEN_CMD_LINE_ARGS=%*
|
||||||
|
|
||||||
|
%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
|
||||||
|
if ERRORLEVEL 1 goto error
|
||||||
|
goto end
|
||||||
|
|
||||||
|
:error
|
||||||
|
set ERROR_CODE=1
|
||||||
|
|
||||||
|
:end
|
||||||
|
@endlocal & set ERROR_CODE=%ERROR_CODE%
|
||||||
|
|
||||||
|
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
|
||||||
|
@REM check for post script, once with legacy .bat ending and once with .cmd ending
|
||||||
|
if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
|
||||||
|
if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
|
||||||
|
:skipRcPost
|
||||||
|
|
||||||
|
@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
|
||||||
|
if "%MAVEN_BATCH_PAUSE%" == "on" pause
|
||||||
|
|
||||||
|
if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
|
||||||
|
|
||||||
|
exit /B %ERROR_CODE%
|
81
executor-humidity/pom.xml
Normal file
81
executor-humidity/pom.xml
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-parent</artifactId>
|
||||||
|
<version>2.5.5</version>
|
||||||
|
<relativePath/> <!-- lookup parent from repository -->
|
||||||
|
</parent>
|
||||||
|
<groupId>ch.unisg</groupId>
|
||||||
|
<artifactId>executor-humidity</artifactId>
|
||||||
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
|
<name>executor-humidity</name>
|
||||||
|
<description>Demo project for Spring Boot</description>
|
||||||
|
<properties>
|
||||||
|
<java.version>11</java.version>
|
||||||
|
</properties>
|
||||||
|
<repositories>
|
||||||
|
<repository>
|
||||||
|
<id>jitpack.io</id>
|
||||||
|
<url>https://jitpack.io</url>
|
||||||
|
</repository>
|
||||||
|
</repositories>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-autoconfigure</artifactId>
|
||||||
|
<version>2.5.5</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-web</artifactId>
|
||||||
|
<version>5.3.10</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-devtools</artifactId>
|
||||||
|
<scope>runtime</scope>
|
||||||
|
<optional>true</optional>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>ch.unisg</groupId>
|
||||||
|
<artifactId>executor-base</artifactId>
|
||||||
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.eclipse.californium</groupId>
|
||||||
|
<artifactId>californium-core</artifactId>
|
||||||
|
<version>3.0.0</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.Interactions-HSG</groupId>
|
||||||
|
<artifactId>wot-td-java</artifactId>
|
||||||
|
<version>0.1.1</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<excludes>
|
||||||
|
<exclude>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
</exclude>
|
||||||
|
</excludes>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
</project>
|
@@ -0,0 +1,16 @@
|
|||||||
|
package ch.unisg.executorhumidity;
|
||||||
|
|
||||||
|
import org.springframework.boot.SpringApplication;
|
||||||
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
|
||||||
|
import ch.unisg.executorhumidity.executor.domain.Executor;
|
||||||
|
|
||||||
|
@SpringBootApplication
|
||||||
|
public class ExecutorhumidityApplication {
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
SpringApplication.run(ExecutorhumidityApplication.class, args);
|
||||||
|
Executor.getExecutor();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@@ -0,0 +1,38 @@
|
|||||||
|
package ch.unisg.executorhumidity.executor.adapter.in.web;
|
||||||
|
|
||||||
|
import org.springframework.http.HttpHeaders;
|
||||||
|
import org.springframework.http.HttpStatus;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import ch.unisg.executorbase.executor.application.port.in.TaskAvailableCommand;
|
||||||
|
import ch.unisg.executorbase.executor.application.port.in.TaskAvailableUseCase;
|
||||||
|
import ch.unisg.executorbase.executor.domain.ExecutorType;
|
||||||
|
|
||||||
|
import java.util.concurrent.CompletableFuture;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
public class TaskAvailableController {
|
||||||
|
private final TaskAvailableUseCase taskAvailableUseCase;
|
||||||
|
|
||||||
|
public TaskAvailableController(TaskAvailableUseCase taskAvailableUseCase) {
|
||||||
|
this.taskAvailableUseCase = taskAvailableUseCase;
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping(path="/newtask/{taskType}")
|
||||||
|
public ResponseEntity<String> retrieveTaskfromTaskList(@PathVariable("taskType") String taskType) {
|
||||||
|
|
||||||
|
if (ExecutorType.contains(taskType.toUpperCase())) {
|
||||||
|
TaskAvailableCommand command = new TaskAvailableCommand(
|
||||||
|
ExecutorType.valueOf(taskType.toUpperCase()));
|
||||||
|
CompletableFuture.runAsync(() -> taskAvailableUseCase.newTaskAvailable(command));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add the content type as a response header
|
||||||
|
HttpHeaders responseHeaders = new HttpHeaders();
|
||||||
|
|
||||||
|
return new ResponseEntity<>("OK", responseHeaders, HttpStatus.OK);
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,114 @@
|
|||||||
|
package ch.unisg.executorhumidity.executor.adapter.out;
|
||||||
|
|
||||||
|
import ch.unisg.executorhumidity.executor.application.port.out.GetHumidityPort;
|
||||||
|
import ch.unisg.ics.interactions.wot.td.ThingDescription;
|
||||||
|
import ch.unisg.ics.interactions.wot.td.affordances.Form;
|
||||||
|
import ch.unisg.ics.interactions.wot.td.affordances.PropertyAffordance;
|
||||||
|
import ch.unisg.ics.interactions.wot.td.clients.TDCoapRequest;
|
||||||
|
import ch.unisg.ics.interactions.wot.td.clients.TDCoapResponse;
|
||||||
|
import ch.unisg.ics.interactions.wot.td.io.TDGraphReader;
|
||||||
|
import ch.unisg.ics.interactions.wot.td.schemas.ObjectSchema;
|
||||||
|
import ch.unisg.ics.interactions.wot.td.vocabularies.TD;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.context.annotation.Primary;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import org.w3c.dom.Document;
|
||||||
|
import org.w3c.dom.Node;
|
||||||
|
import org.w3c.dom.NodeList;
|
||||||
|
import org.xml.sax.InputSource;
|
||||||
|
import org.xml.sax.SAXException;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.StringReader;
|
||||||
|
import java.net.URI;
|
||||||
|
import java.net.http.HttpClient;
|
||||||
|
import java.net.http.HttpRequest;
|
||||||
|
import java.net.http.HttpResponse;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
import javax.xml.parsers.DocumentBuilder;
|
||||||
|
import javax.xml.parsers.DocumentBuilderFactory;
|
||||||
|
import javax.xml.parsers.ParserConfigurationException;
|
||||||
|
|
||||||
|
|
||||||
|
@Component
|
||||||
|
@Primary
|
||||||
|
public class GetHumidityAdapter implements GetHumidityPort {
|
||||||
|
|
||||||
|
String endpoint = System.getenv("SEARCH_ENGINE_URI") == null ?
|
||||||
|
"https://api.interactions.ics.unisg.ch/search/searchEngine" : System.getenv("SEARCH_ENGINE_URI");
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getHumidity() {
|
||||||
|
|
||||||
|
String input = "@prefix dct: <http://purl.org/dc/terms/> . select ?title where { ?title dct:title 'Mirogate' }";
|
||||||
|
|
||||||
|
var httpRequest = HttpRequest.newBuilder()
|
||||||
|
.uri(URI.create(endpoint))
|
||||||
|
.header("Content-Type", "application/sparql-query")
|
||||||
|
.POST(HttpRequest.BodyPublishers.ofString(input))
|
||||||
|
.build();
|
||||||
|
|
||||||
|
var client = HttpClient.newHttpClient();
|
||||||
|
|
||||||
|
try {
|
||||||
|
String description = client.send(httpRequest, HttpResponse.BodyHandlers.ofString()).body();
|
||||||
|
String mirogateUri = null;
|
||||||
|
|
||||||
|
DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
|
||||||
|
DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
|
||||||
|
Document doc = dBuilder.parse(new InputSource(new StringReader(description)));
|
||||||
|
|
||||||
|
doc.getDocumentElement().normalize();
|
||||||
|
|
||||||
|
NodeList results = doc.getElementsByTagName("uri");
|
||||||
|
for (int temp = 0; temp < results.getLength(); temp += 1) {
|
||||||
|
Node nNode = results.item(temp);
|
||||||
|
if (nNode.getTextContent().contains("mirogate")) {
|
||||||
|
mirogateUri = nNode.getTextContent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (mirogateUri == null) {
|
||||||
|
// TODO implement logic if execution failed
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Parse a TD from a string
|
||||||
|
ThingDescription td = TDGraphReader.readFromURL(ThingDescription.TDFormat.RDF_TURTLE, mirogateUri);
|
||||||
|
|
||||||
|
Optional<PropertyAffordance> humidity = td.getPropertyByName("humidity");
|
||||||
|
|
||||||
|
if (humidity.isPresent()) {
|
||||||
|
Optional<Form> form = humidity.get().getFirstFormForOperationType(TD.readProperty);
|
||||||
|
|
||||||
|
// System.out.println(humidity.get().getDataSchema().getDatatype());
|
||||||
|
if (form.isPresent()) {
|
||||||
|
TDCoapRequest request = new TDCoapRequest(form.get(), TD.readProperty);
|
||||||
|
try {
|
||||||
|
TDCoapResponse response = request.execute();
|
||||||
|
Map<String, Object> payload = response.getPayloadAsObject((ObjectSchema) humidity.get().getDataSchema());
|
||||||
|
Object result = payload.get("https://interactions.ics.unisg.ch/mirogate#HumidityValue");
|
||||||
|
return result.toString();
|
||||||
|
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (ParserConfigurationException e1) {
|
||||||
|
// TODO Auto-generated catch block
|
||||||
|
e1.printStackTrace();
|
||||||
|
} catch (SAXException e1) {
|
||||||
|
// TODO Auto-generated catch block
|
||||||
|
e1.printStackTrace();
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user