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

Make launching containers non-interactive for xud-ui #743

Closed
ghost opened this issue Oct 2, 2020 · 4 comments
Closed

Make launching containers non-interactive for xud-ui #743

ghost opened this issue Oct 2, 2020 · 4 comments
Assignees
Labels
P2 mid priority tbd To Be Discussed

Comments

@ghost
Copy link

ghost commented Oct 2, 2020

Current state of xud-docker requires user input after starting the script to launch containers.

In order to provide smooth user experience for UI projects we'll need non-interactive mode.

bash xud.sh --non-interactive --mainnet should:

  1. Start all containers for mainnet
  2. Setup temporary backup directory
  3. Initialize the wallet with default password xud-docker (since we're using aezeed we can change the password later via API call)
@ghost ghost added the tbd To Be Discussed label Oct 2, 2020
@reliveyy
Copy link
Collaborator

reliveyy commented Oct 2, 2020

@erkarl I suggest we use command-line options to disable interactive questions.

  • --network simnet disables interactive networking choosing
  • --wallet-password disables interactive password setting during wallet creation
  • --backup-dir disables interactive backup folder setting and create/restore selection (if no --restore-dir then create)
  • --restore-dir disables interactive restore folder setting and create/restore selection (if having --restore-dir then restore)

E.g.

# Example 1 (create)
bash xud.sh --network testnet --backup-dir ~/.xud-docker/testnet/backup --wallet-password 'secret'

# Example 2 (restore)
bash xud.sh --network mainnet --backup-dir /new/backup/location --wallet-password 'unlock' \
--restore-dir /old/xud-docker/mainnet 

# Example 3 (discard --wallet-password in command-line)
source vault.env # contains XUD_DOCKER_WALLET_PASSWORD='deepsecret'
bash xud.sh --network mainnet --backup-dir ... 

P.S. If using non-interactive create then seed.txt will be saved under network-dir.

@kilrau kilrau added the P2 mid priority label Oct 21, 2020
@kilrau kilrau changed the title Make launching containers non-interactive Make launching containers non-interactive for xud-ui Oct 21, 2020
@reliveyy
Copy link
Collaborator

--network is added in #750

@ghost
Copy link
Author

ghost commented Oct 23, 2020

@reliveyy how would this work for Windows?

Could we provide these options as environment variables?

docker run --env ENV_CONFIG="..."

@ghost
Copy link
Author

ghost commented Oct 23, 2020

@reliveyy how would this work for Windows?

Making this work on Windows is probably out of context of this issue though.

@ghost ghost closed this as completed Nov 6, 2020
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 mid priority tbd To Be Discussed
Projects
None yet
Development

No branches or pull requests

2 participants