Skip to content

feat: make proxy independent with other services #803

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

Merged
merged 6 commits into from
Dec 8, 2020
Merged

Conversation

reliveyy
Copy link
Collaborator

@reliveyy reliveyy commented Nov 30, 2020

This PR removes the waiting logic for tls.cert of lndbtc, lndltc and xud in proxy entrypoint.sh. And it runs proxy branch "proxy-first" too. It is a necessary step before we providing a native launcher because we could present the status API first to let the frontend know when to call create (after lnds got synced).

How to test?

It should not break anything. And there is no obvious new features introduced. A simple test would be just bring up proxy only and

  • it should not break down
  • it will auto-connect to other services when they are started

Todos

  • Add new SERVICES environment variable
  • Replace /root/config.sh with config.json
  • Replace /root/.xud, /root/.lndbtc and /root/.lndltc with /root/network/data/...

Reminders before merge

  • Switch proxy:latest branch to master
  • Switch mainnet proxy version to 1.2.0 (independent proxy + create/unlock apis)

@reliveyy reliveyy requested review from a user, kilrau, krrprr and raladev November 30, 2020 16:28
@reliveyy reliveyy self-assigned this Nov 30, 2020
@reliveyy reliveyy marked this pull request as draft December 1, 2020 07:56
@kilrau
Copy link
Contributor

kilrau commented Dec 1, 2020

  • test that the regular linux cli setup/create still works

@reliveyy
Copy link
Collaborator Author

reliveyy commented Dec 1, 2020

The SERVICES environment variable means everytime when other services changed (mode or disbaled) the proxy contianer will be recreated. And it's not acceptable (not independent). So I will replace SERVICES with $network_dir/data/config.json.

More about this services.json file inside data dir:

  1. The Golang supports JSON format by default
  2. It's more expressive than KV list like config.sh (So the config.sh idea is generally deprecated. We designed it because it's esay to export and import in bash script)
  3. We only put necessay infomation about other services in config.json like disabled which we cannot tell from a stopped or missing container; and the mode which is needed in status API to print bitcoind/litecoind/geth as light mode not "Disabled" status.

@raladev raladev marked this pull request as ready for review December 7, 2020 23:47
raladev
raladev previously approved these changes Dec 8, 2020
@raladev
Copy link
Contributor

raladev commented Dec 8, 2020

Switch mainnet proxy version to 1.2.0 (independent proxy + create/unlock apis)

version will be bumped in next PR, for now i will change the proxy version to current mainnet version (without create/unlock apis).

@raladev raladev merged commit 94e3d77 into master Dec 8, 2020
@reliveyy reliveyy deleted the proxy-first branch December 17, 2020 12:35
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

Successfully merging this pull request may close these issues.

3 participants