Testnet: refactor testnet script and Dockerfiles #925
Conversation
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.
In commit 0d42c37
Arch doesn't support building OpenSSL statically (needed for Crypto++).
It's only for cpp-netlib. crypto++ is not reliant on openssl. Can you fix the message in that commit?
@@ -28,12 +28,16 @@ | |||
|
|||
FROM greyltc/archlinux:latest | |||
|
|||
ARG userid | |||
|
|||
ENV userid=$userid |
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.
Build Web Docker image? [httpd:2.4] [Y/n] y
Sending build context to Docker daemon 741MB
Step 1/1 : FROM httpd:2.4
---> fb2f3851a971
[Warning] One or more build-args [userid] were not consumed
I'm imagining this is expected because the apache dockerfile wasn't updated (and it doesn't need to be)?
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.
No, I missed this when refactoring. Will remove the build-arg from the web Docker image.
Or am I assuming that the plugins were to be installed via docker? |
Absolutely, the compiler error message made me think it was for crypto++. Will update the message.
No, it wasn't, just to make actually building the testnet easier. I can keep working on the Grafana in another PR.
If their API supports installing plugins, we can do it during Docker setup. Otherwise, maybe we just include instructions for manually installing the plugins? |
As automated as possible. |
I thinks it's working (had same screen after login), it's not required to add more users or apps&plugins. If you click on "Home", you should see a list of dashboards that you can click on (hopefully 😅 ) |
Can confirm, it's working. I added a commit to install the InfluxDB admin panel, which you can add to any dashboard. It lets you view and kill InfluxDB queries for that dashboard. If this isn't useful/wanted, I can drop the commit. |
Does anyone want to try fixing this now or should we merge? |
i'll take a look tonight |
I can look as well. |
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 changes 👍
Since this enables monitoring by default, it should add
"--i2pcontroladdress 0.0.0.0 --i2pcontrolport 7650" to "KOVRI_BIN_ARGS" and "KOVRI_FW_BIN_ARGS"
Also (unrelated to this PR), if you don't mind adding this:
--- a/contrib/testnet/monitoring/collect.sh
+++ b/contrib/testnet/monitoring/collect.sh
@@ -37,7 +37,7 @@ docker_base_name=$5
while true; do
sleep 15
data=""
- for _seq in $($sequence); do
+ for _seq in $(eval $sequence); do
_host="${network_octets}.$((10#${_seq}))"
There is one last error (unrelated to this PR), don't know yet how to solve it : after the changes to boost log sinks management, variable "stats" in contrib/testnet/monitoring/collect.sh is not populated. Will take a look but if someone has an idea 😄
@@ -271,7 +272,14 @@ set_bins() | |||
mount_repo_bins="-v ${KOVRI_REPO}/build/kovri:/usr/bin/kovri \ | |||
-v ${KOVRI_REPO}/build/kovri-util:/usr/bin/kovri-util" | |||
|
|||
read_bool_input "Build repo binaries from within the container?" KOVRI_BUILD_REPO_BINS "Exec make release-static" | |||
build_cmd="make clean" |
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.
make clean
make clean util
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 not sure this is necessary. make release
and make release-static
include rules for making util
, but I can add this in case those recipes change.
Will do, maybe this is what's causing |
5c6d09e
to
e9774ee
Compare
I added your recommended changes @MoroccanMalinois, and will see if that solves the problem with Thank you @anonimal and @MoroccanMalinois for your help on this PR. I will rebase against |
Thank YOU @coneiric (not just for this PR 😄 ) Got this last work-around
And btw, it can take ~2min after |
And with this, it looks like everything is working. I removed If you had another reason for including |
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.
Thanks for working on this you two. @coneiric can you please reference this PR number (and optionally/preferably give credit to @MoroccanMalinois for the applicable changes)?
Absolutely, will do both, updating now. |
Ensure container user has same UID as Docker host user. Referencing monero-project#925
Arch doesn't support building OpenSSL statically (needed for cpp-netlib). Credit to anonimal for correction about OpenSSL dependency. Referencing monero-project#925
Print with parentheses is valid for Python2/3, without parentheses is broken in Python3. Referencing monero-project#925
Enable graphical monitoring by default, and add I2PControl to testnet instances. Credit to MoroccanMalinois for enabling I2PControl. Referencing monero-project#925
Helper function to detect if monitoring containers exist. Referencing monero-project#925
Install panel to view and kill currently running queries. Referencing monero-project#925
Credit to MoroccanMalinois. Referencing monero-project#925
Disable file logs, color console logging, and redirect stderr to stdout. Credit to MoroccanMalinois. Referencing monero-project#925
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.
If you had another reason for including util in the build command, I'll add it back.
Nah sorry, must have been a pb with my local copy
fb4ac97 Testnet: workaround for stats collector logs (oneiric) 11979f3 Testnet: add eval for sequence bash variable (oneiric) 771c141 Testnet: install InfluxDB admin panel (oneiric) 62704d9 Testnet: detect monitoring containers (oneiric) 76fa304 Testnet: enable monitoring by default (oneiric) e71f276 Testnet: use print with parens for Grafana API key (oneiric) 2125eea Testnet: support Arch container dynamic builds (oneiric) 26ce47b Testnet: set container uid to Docker host user (oneiric)
By submitting this pull-request, I confirm the following:
Number of small refactors to make creating and using the testnet easier: