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

Impossible automate setup/bootstrap node via several reasons. #1050

Open
minzak opened this issue Jul 13, 2022 · 0 comments
Open

Impossible automate setup/bootstrap node via several reasons. #1050

minzak opened this issue Jul 13, 2022 · 0 comments

Comments

@minzak
Copy link

minzak commented Jul 13, 2022

When we used command like this:
./boot-tools/bootstrap key --address "consensus-001.nodes.flow.com:3569" --role consensus -o ./bootstrap
We cannot use the standard output for the next steps.
Because no option for output in plain text or JSON format.

Ok, we can use > for forward output to a text file and then parse it.
But we got not just a text, we have ANSI colored text with ESC codes (((

And on this step, we also must parse all ESC chars.

Common who did this?
How to use it with ansible?
See how trivial tasks mutate to monster, and I am just in the first steps of the manual.

bootstrap key --address "flow.domain.org:3569" --role collection  -o /var/flow/bootstrap > result.txt
YOUR_MACHINE_ACCOUNT_ADDRESS=$(echo $(cat result.txt |sed 's/\x1b\[[0-9;]*[mGKHF]//g' | grep machineAccountPubKey | cut -d '=' -f2) )
echo ${YOUR_MACHINE_ACCOUNT_ADDRESS}
bootstrap machine-account --address ${YOUR_MACHINE_ACCOUNT_ADDRESS} -o /var/flow/bootstrap
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

No branches or pull requests

1 participant