-
Notifications
You must be signed in to change notification settings - Fork 2
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 Compose setup of non-sBTC Components #141
Conversation
What should we look for / be able to do with this PR? Can you provide some tests or some commands that we can use to verify that this is doing or able to handle some expected behavior? |
I mentioned this in the other PR, but two things that would be helpful with this PR are:
|
…s node docker config
- Refactored the Dockerfile of the stacks node to just run the entrypoint.sh
- Bitcoin Miner correctly mines blocks
…ddress on the fly
- Added INSTRUCTIONS.md to devenv/local/docker-compose - Added stacks-old container - Added tests/ folder with runs automated devnet tests
Some problems:
Remaining Notes:
|
The Stacks Node successfully finds the UTXOs now. The whole Testnet should work except for 2 caveats. [1] The Stacks Explorer devnet shows up as offline in Stacks Explorer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good! Mainly would like to see a few "process" changes:
- Rename
SETUP-README
andINSTRUCTION
files to justREADME
. - Update this PR's description to note exactly what is (and isn't) included
devenv/local/.gitignore
Outdated
K8S | ||
CUSTOM-K8S-DOCKER-BUILDS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you move this (and the .gitignore inside docker-compose) into the top-level .gitignore
? That way it's much easier to debug where/why folders are ignored
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've removed the extra .gitignore
files and changed md file names
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice job! Everything is working well. I'd like to see a few small changes, but mainly unrelated to the actual docker compose setup.
Also, nice job on writing a test for this!
###### Mempool Frontend: `http://localhost:3020` | ||
###### Stacks Explorer: `http://localhost:8083` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These links are backwards
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
#### (i) _Postgres Tools_ | ||
|
||
``` | ||
brew install libpq | ||
echo 'export PATH="/opt/homebrew/opt/libpq/bin:$PATH"' >> ~/.zshrc | ||
source ~/.zshrc | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is very specific install instructions for MacOs with zsh, so if it's necessary it's probably better to just link to a "how to install postgres" page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a section where any OS user can download from the Postgres website. I also added specific instructions for each type of OS
|
||
STX_SYNC_WITH_BTC_UTXO_SUCCESS=false | ||
STX_SYNC_WITH_BTC_UTXO_SUCCESS_FRMT=$(echo "\033[1;31m$STX_SYNC_WITH_BTC_UTXO_SUCCESS\033[0m❌") | ||
if [[ $STACKS_DOCKER_LOGS == *"UTXOs found"* ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test doesn't pass for me, even though I can see the "UTXOs found" log
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just wrote the RPC approach instead of using Docker logs. The problem with the using the logs from the Stacks node is that not all of the logs are being captured. The RPC approach is more reliable
echo " ---------------------------------------------------------------" | ||
|
||
|
||
GET_STACKS_API_PING=$(curl -s "http://localhost:3700") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the port for the API's event observer, which is good, but we should also have a liveness check for the "public" API (port 3999)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just added the STACKS_PUBLIC_API_LIVENESS_SUCCESS
test. Everything passes now
echo "----------------------------------------------------------" | ||
echo "| SUMMARY |" | ||
echo "----------------------------------------------------------" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because this is a test file, it should exit with code 1 unless every test passes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests return a 0 or 1 now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Nice work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -0,0 +1,3 @@ | |||
cloud | |||
K8S | |||
local-commands.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this file contain things that would be useful for us? It could be checked in to a scripts
folder then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does but it will be push in the next PR
## [1] Build all containers: | ||
|
||
##### `sh build.sh` | ||
|
||
## [2] Spin up all containers: | ||
|
||
##### `sh up.sh` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we consider adding top-level make targets for spinning up the local dev env? It would be nice to be able to run make local-dev-env
from the project root. It can definitely be done as a follow-up.
# hostname: bitcoin | ||
# networks: | ||
# devnet: | ||
# # ipv4_address: 172.16.238.200 | ||
# aliases: | ||
# - bitcoin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume this is stale config that should be cleaned up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Along with the other blocks of commented-out-configuration in this file.
This PR includes the Docker Compose Setup of:
docker-compose.yml
file.sh
files:build.sh
for docker buildsup.sh
for docker spin updown.sh
for docker spin downdevnet-liveness.sh
file for testingdevenv/local/docker-compose/README.md
for setupThis PR does NOT include:
To setup and test, follow the instructions in
./devenv/local/docker-compose/README.md