-
Notifications
You must be signed in to change notification settings - Fork 68
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
Docker files #713
Docker files #713
Conversation
Prepare containers to run lotus, boost in debug mode
Boost container's IP can change and gui can't deal with it
And some other minor text cleaning
This is great! I was able to build the docker containers from within build/devnet, run:
Then start the containers from examples/devnet, run:
and I ran ./sample/make-a-deal.sh and got stuck on @nonsense, will you please review the PR next week to provide any feedback to @airenas? As we discussed at colo a few weeks ago this is meant for devs to be able to spin up a lotus and boost for testing quickly and for people generally new to the project to be able to try it quickly. |
Perhaps the error is dropped from the command: |
Fix problem when nginx caches boost IP and GUI is not functioning after `docker compose up` finishes
Overall looks good, great work @airenas Here are my comments having tried this setup:
|
I rebuilt the containers and reran and got through the whole make a deal script! I then used the UI to publish and got this error --
Something wrong with the volume mounting? |
I have reproduced the error, but don't know what is going on. boost container runs with root user permissions and it has full control of /var/lib/boost directory. I see the only error in the log |
Thanks, @nonsense for the review. I can extend the demo with the publish and the retrieve. The current demo was based on this: https://boost.filecoin.io/tutorials/how-to-store-files-with-boost-on-filecoin. So it stops on the deal stage :). Is there any similar info/doc on how to publish/retrieve? What tools to use for it? |
@airenas you can trigger a publish of all pending deals with the GraphQL interface:
See more docs at: https://boost.filecoin.io/graphql-api You can trigger a retrieval from a client with:
|
@LexLuthr , any ideas here? |
@airenas I was testing this pull request and keep running into rustup-init error when building lotus image.
Problem is because I am running it on M1 Mac and it requires the image to be compatible with platform. Issue seems to be coming from lotus repo but our Makefile should be compatible with Apple silicon as well as intel. Can you create a conditional to set platform based on the architecture? Similar issue can be found in boost related images as well. I am trying to debug the issue with dagstore. I don't think this PR should be merged till we sort out all the issues. |
Thanks, @LexLuthr for the good point. I didn't test on arm. I will try to play on aws arm instance now. Definitely, the solution must start on Mac as this is a demo for developers. From your request to change the makefile, I understood, that you were able to run the solution using
thank you. From my side I'll try to complete the https://github.com/filecoin-project/boost/blob/main/documentation/devnet.md locally without docker again. First time, when starting the task, I completed it up to the deal step but did not go further. |
Yes. But, it seems building on linux/arm64 does work as libraries required are not found. Thus, I had to force the build on linux/amd64 and then buildkit started creating problem. It won't let me build lotus-dev, lotus-miner-dev and boost images because of amd64 vs amr64 mismatch. So, I had to build manually by disabling buildkit within the Makefile for each of these images. At this point, it is very clear that lotus team need to fix their Dockerfile and ensure that both arm64 and amd64 are supported. I don't think boost will fail compilation on arm64 if once lotus is fixed. Let me know if you have any questions. Unfortunately, I am still building/testing different combination so I can't confirm that final images will work. |
boost keep crashing for me. As soon as it sends fil to boost wallets, the container for boost and lotus both crash. Perhaps, we should use init containers for boost and lotus (to add default wallet) |
I just tried to test on AWS arm64 instance (20.04.1-Ubuntu aarch64 GNU/Linux). The outcome is this: Building
Running - I used published containers on dockerhub for amd64 and using the
So it looks like it won't work with amd64 images. What do we do? |
The initialization is idempotent in the happy day scenarios (sure not today :)). As the containers are crashing the init container would not help: it would leave the system in a semi-initialized state. |
I think we should focus on getting this PR to be working for x86_64 and focus on other architectures later, as a separate issue, to keep scope reasonable for this PR. |
I tried to debug boost and found the problem. It turned out that Will update the PR soon. |
@nonsense, I have just tested. I run the command on a demo boost container, and it retrieves the file. But the file is saved on a machine running the Solved: found |
Local address of a miner was passed to the boost container
From pkg/devnet/devnet.go
As a follow up (doesn't have to be in this PR):
(see https://github.com/filecoin-project/boost/blob/main/itests/framework/framework.go#L114)
|
Co-authored-by: Anton Evangelatov <anton.evangelatov@gmail.com>
@airenas why do we need a separate |
I got the answer on this from @jacobheun : #695 (comment) |
@airenas right, sorry, I just saw this comment too... Still I don't see the necessity for a separate container, we can just hit 8080 on |
@airenas approving as I think this is already a good first step and mostly works as we need it to. I suggest merging and continuing with outstanding tasks in separate PRs, as this one is getting quite large and hard to follow for any new changes. We are also relying on this setup for the metrics/tracing docker setup, so it'd make it easier if this is already merged. |
Thank you @airenas , great work!!! |
I've added a new issue - #742 - feel free to add any outstanding tasks there that I might have missed. |
Resolves #695
Prepared docker files for:
lotus-dev
andlotus-miner-dev
- based on official lotus image fileI intentionally added the
dev
suffix as the images contain tools that are built in debug mode. As the images are for demo purposes, I made some simplifications, like container's processes run with root permissions. Doing otherwise needs to solve issues with mapped volumes. It is doable but it is not worth demo containers.Docker compose contains:
I documented:
In order to test the devnet now:
examples\devnet\.env
file and change the docker user fromfilecoin
toairenas
.If the pull request is OK then what next?
Someone having access to the
filecoin
dockerhub account should publish the images. It would allow users to test the devnet without building these images on local machines