-
Notifications
You must be signed in to change notification settings - Fork 476
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
container: support kmd #4984
container: support kmd #4984
Conversation
dfa9f33
to
3cc090f
Compare
Codecov Report
@@ Coverage Diff @@
## master #4984 +/- ##
==========================================
+ Coverage 53.64% 53.68% +0.03%
==========================================
Files 432 432
Lines 54068 54068
==========================================
+ Hits 29003 29024 +21
+ Misses 22814 22794 -20
+ Partials 2251 2250 -1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
2978c3c
to
f6db622
Compare
f6db622
to
acbf1c8
Compare
79a0e6d
to
72f1646
Compare
13a288b
to
a49b91a
Compare
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.
Some initial feedback. I haven't tested yet.
Is |
Co-authored-by: Will Winder <wwinder.unh@gmail.com>
Co-authored-by: Will Winder <wwinder.unh@gmail.com>
Co-authored-by: Will Winder <wwinder.unh@gmail.com>
Co-authored-by: Will Winder <wwinder.unh@gmail.com>
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'm still seeing that Warning: Error loading config file from '.'
error in some cases. We'll have to monitor for that and see if it's only an issue with local builds.
Aside from that, seems to work nicely.
Tested with the following:
docker build \
-t algod_test \
--build-arg CHANNEL=nightly \
--build-arg TARGETARCH=amd64 --no-cache \
.
docker run --rm -it -p 4190:8080 -e TOKEN=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -e START_KMD=1 -p 4191:7833 -e KMD_TOKEN=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa algod_test
The service responds:
curl -H "Authorization: bearer aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "http://localhost:4191/swagger.json"
I see it running in docker top
:
UID PID PPID C STIME TTY TIME CMD
systemd+ 3192916 3192896 0 14:04 pts/0 00:00:00 bash /node/run/run.sh
systemd+ 3193140 3192916 0 14:04 pts/0 00:00:00 /node/bin/kmd -d /algod/data/kmd-v0.5 -t 0
systemd+ 3193162 3192916 30 14:04 pts/0 00:00:01 /node/bin/algod -d /algod/data
systemd+ 3193174 3192916 0 14:04 pts/0 00:00:00 tail -f /algod/data/node.log
I was getting a permission denied error when starting KMD. so I went ahead and made sure KMD_DIR has mode 0700 in e0bbf8a |
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 technically looks like this will work and it enables KMD api and port. It seems we are explicitly setting 1 for turning on all the flags as well now.
For some reason it looked a little odd to me when I look at the docker call in the README (I'm still not sure why I feel this way), but it's good that we have consistency and explicitly turning on the flags.
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 looks good to me!
Benefits we get here are:
Per commit builds, ability to have KMD start through environmental variable on our algod container, and simplified documentation.
Thanks @algolucky for all of the work here and @algobarb @excalq and @winder for reviewing!
merge after #4982
Summary
based on #4972
START_KMD=1
environment variable at runtime.apply_configuration
function intoconfigure_data_dir
in the entrypoint script.update-repo-description
job to update the DockerHub Repositories description (README). only executes onmaster
.KMD_PORT
with a default of7833
.kmd_config.json
in$ALGORAND_DATA
1
compared to just checking for existence.DEBUG
environment variable to makeset -x
in the entrypoint conditional. it's too verbose to be the default.Test Plan
example test scecnario