-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
175 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
set -euo pipefail | ||
# set -x | ||
|
||
|
||
CONFIGS="image/configs/*.sh" | ||
|
||
aws ecr get-login-password --region eu-west-1 | docker login --username AWS --password-stdin 147263665150.dkr.ecr.eu-west-1.amazonaws.com | ||
|
||
for cf in $CONFIGS | ||
do | ||
if [ -f "$cf" ] | ||
then | ||
file=${cf##*/} | ||
name=${file%.sh} | ||
# Build and push image | ||
echo Building thunderdome:$name | ||
echo docker build --build-arg config=$file -t thunderdome:$name image/ | ||
echo docker tag thunderdome:$name 147263665150.dkr.ecr.eu-west-1.amazonaws.com/thunderdome:$name | ||
echo docker push 147263665150.dkr.ecr.eu-west-1.amazonaws.com/thunderdome:$name | ||
else | ||
echo "Warning: Some problem with \"$cf\"" | ||
fi | ||
|
||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
FROM ipfs/kubo:v0.14.0 | ||
|
||
ADD /container-init.d/* /container-init.d/ | ||
ARG config | ||
ADD /configs/$config /container-init.d/ | ||
RUN chmod a+x /container-init.d/* | ||
|
||
EXPOSE 8080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ipfs config --json Internal.Bitswap.ProviderSearchDelay '0' |
1 change: 1 addition & 0 deletions
1
experiments/providerdelay/image/configs/providerdelay-1000ms.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ipfs config --json Internal.Bitswap.ProviderSearchDelay '1000ms' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ipfs config --json Internal.Bitswap.ProviderSearchDelay '100ms' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ipfs config --json Internal.Bitswap.ProviderSearchDelay '200ms' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ipfs config --json Internal.Bitswap.ProviderSearchDelay '20ms' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ipfs config --json Internal.Bitswap.ProviderSearchDelay '500ms' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ipfs config --json Internal.Bitswap.ProviderSearchDelay '50ms' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ipfs config --json Internal.Bitswap.ProviderSearchDelay '750ms' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/bin/sh | ||
## The shell in the go-ipfs container is busybox, so a version of ash | ||
## Shellcheck might warn on things POSIX sh cant do, but ash can | ||
## In Shellcheck, ash is an alias for dash, but busybox ash can do more than dash | ||
## https://github.com/koalaman/shellcheck/blob/master/src/ShellCheck/Data.hs#L134 | ||
echo "setting config" | ||
ipfs config --json AutoNAT '{ | ||
"ServiceMode": "enabled", | ||
"Throttle": { | ||
"GlobalLimit": 0, | ||
"Interval": "1m", | ||
"PeerLimit": 3 | ||
} | ||
}' | ||
|
||
ipfs config --json Datastore.BloomFilterSize '268435456' | ||
ipfs config --json Datastore.StorageGCWatermark 90 | ||
ipfs config --json Datastore.StorageMax '"200GB"' | ||
ipfs config --json Datastore.GCPeriod '"10m"' | ||
|
||
ipfs config --json Pubsub.StrictSignatureVerification false | ||
|
||
ipfs config --json Reprovider.Interval '"0"' | ||
|
||
ipfs config --json Routing.Type '"dhtserver"' | ||
|
||
ipfs config --json Swarm.ConnMgr.GracePeriod '"2m"' | ||
ipfs config --json Swarm.ConnMgr.HighWater 5000 | ||
ipfs config --json Swarm.ConnMgr.LowWater 3000 | ||
ipfs config --json Swarm.ConnMgr.DisableBandwidthMetrics true | ||
|
||
ipfs config --json Experimental.AcceleratedDHTClient true | ||
ipfs config --json Experimental.StrategicProviding true |
48 changes: 48 additions & 0 deletions
48
experiments/providerdelay/image/container-init.d/gw-config.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#!/bin/sh | ||
## The shell in the go-ipfs container is busybox, so a version of ash | ||
## Shellcheck might warn on things POSIX sh cant do, but ash can | ||
## In Shellcheck, ash is an alias for dash, but busybox ash can do more than dash | ||
## https://github.com/koalaman/shellcheck/blob/master/src/ShellCheck/Data.hs#L134 | ||
echo "setting Gateway config" | ||
ipfs config --json Gateway '{ | ||
"HTTPHeaders": { | ||
"Access-Control-Allow-Origin": [ | ||
"*" | ||
] | ||
}, | ||
"RootRedirect": "", | ||
"Writable": false, | ||
"APICommands": [], | ||
"NoFetch": false, | ||
"NoDNSLink": false, | ||
"PublicGateways": { | ||
"dweb.link": { | ||
"NoDNSLink": false, | ||
"Paths": [ | ||
"/ipfs", | ||
"/ipns", | ||
"/api" | ||
], | ||
"UseSubdomains": true | ||
}, | ||
"gateway.ipfs.io": { | ||
"NoDNSLink": false, | ||
"Paths": [ | ||
"/ipfs", | ||
"/ipns", | ||
"/api" | ||
], | ||
"UseSubdomains": false | ||
}, | ||
"ipfs.io": { | ||
"NoDNSLink": false, | ||
"Paths": [ | ||
"/ipfs", | ||
"/ipns", | ||
"/api" | ||
], | ||
"UseSubdomains": false | ||
} | ||
} | ||
}' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters