Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure IPFS node #9

Closed
olizilla opened this issue Jul 21, 2022 · 0 comments · Fixed by #23
Closed

Configure IPFS node #9

olizilla opened this issue Jul 21, 2022 · 0 comments · Fixed by #23

Comments

@olizilla
Copy link
Contributor

olizilla commented Jul 21, 2022

For this we will need to provide ipfs as a custom dockerfile, same as we do for the pickup worker image here https://github.com/olizilla/pickup/blob/65a1d9b1b20201119f80a9fe659455b394091e7a/stacks/PickupStack.ts#L14

An example of setting up your ipfs node from a container init script is here
https://github.com/ipfs-shipyard/go-ipfs-docker-examples/blob/main/gateway/Dockerfile

Some config changes to make

# dont add provider records to the dht
ipfs config --json Experimental.StrategicProviding true

# maybe have go faster dht... but makes it unusable for the first 5 mins!! https://github.com/ipfs/kubo/blob/master/docs/experimental-features.md#accelerated-dht-client
ipfs config --json Experimental.AcceleratedDHTClient true

# as per gateways
ipfs config --json Swarm.DisableBandwidthMetrics true

# no MDNS plz
ipfs config --json Discovery.MDNS.Enabled false

# plz fail early if bits get flipped in blockstore
ipfs config --json Datastore.HashOnRead true

if we want auto GC-ing then... but might be better to just do it manually.

# Gotta GC, set with reference to the ephemeral storage available
ipfs config --json Datastore.StorageMax "200GB"
ipfs config --json Datastore.StorageGCWatermark "50"
ipfs config --json Datastore."GCPeriod" "10m"
# Maybe manually GC after each upload as well.
olizilla added a commit that referenced this issue Aug 16, 2022
- Adds a dockerfile to init kubo with customised config.
- Forces platform to amd64 for images intended to run in ECS. I can't see a way to configure aws-cdk to set the platform when building, so we have to force it in the docker file. Thanks to https://stackoverflow.com/a/70614305/6490163

fixes #9
fixes #21

License: MIT
Signed-off-by: Oli Evans <[email protected]>
olizilla added a commit that referenced this issue Aug 17, 2022
- Adds a dockerfile to init kubo with customised config.
- Updating sst and aws-sdk-lib so we can set the platform per aws/aws-cdk#20563
  - Without this, the images built locally are platform dependant, and will fail if built from, say, and an `arm64` machine.

fixes #9
fixes #21

License: MIT
Signed-off-by: Oli Evans <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant