onflow / onflow/flow

Impossible automate setup/bootstrap node via several reasons.

Open
#1,050 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
361
Forks
159
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the ./boot-tools/bootstrap entry point and reproduce the key and machine-account commands shown in the issue. Check how their output is formatted and where ANSI color codes are added; done should provide plain-text or JSON output that can be consumed directly by shell scripts or Ansible without escape-code parsing.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli, devops
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.