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

fix: Update interactive installer for any node changes and test [DEV-1901] #454

Merged
merged 49 commits into from
Dec 1, 2022

Conversation

benyam7
Copy link
Contributor

@benyam7 benyam7 commented Nov 25, 2022

No description provided.

@ankurdotb
Copy link
Contributor

@benyam7 benyam7 changed the base branch from main to develop November 25, 2022 15:32
@ankurdotb ankurdotb changed the title fix: Update interactive installer for any node changes and test[DEV-1901] fix: Update interactive installer for any node changes and test [DEV-1901] Nov 25, 2022
@benyam7 benyam7 changed the base branch from develop to main November 25, 2022 15:55
@ankurdotb ankurdotb marked this pull request as ready for review November 25, 2022 16:29
Copy link
Contributor

@ankurdotb ankurdotb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please make these additional changes?

  1. Add a question for persistent_peers and add them in (default input blank, file has blank/no value)
  2. Ask user about log_level and set default input to error (by default, the file has info)
  3. Ask user about log_format and set default input to json (by default, file has plain)
  4. By default, without asking the user, set create_empty_blocks to false (we want this as network-wide behaviour)
  5. This installer only works with the default version 0.6.9 since it looks assets/files which have a version number without v prefix. If I choose one of the non-default options such as v1.0.0-develop.11, the installer fails because the asset path will be different.
root@installer-test:~# wget -q https://raw.githubusercontent.com/cheqd/cheqd-node/fix-installer/installer/installer.py && sudo python3 installer.py
*********  Latest stable cheqd-noded release version is Name: 0.6.9
*********  List of cheqd-noded releases: 
1) 0.6.9
2) v1.0.0-develop.11
3) v1.0.0-develop.10
4) v1.0.0-develop.9
5) v1.0.0-develop.8
Choose list option number above to select version of cheqd-node to install [default: 1]:
2
Set path for cheqd user's home directory [default: /home/cheqd]:

Do you want to setup a new cheqd-node? (yes/no) [default: yes]:

Select cheqd network to join (testnet/mainnet) [default: mainnet]:
        
*********  INFO: Installing cheqd-node with Cosmovisor allows for automatic unattended upgrades for valid software upgrade proposals.
Install cheqd-noded using Cosmovisor? (yes/no) [default: yes]:

CAUTION: Downloading a snapshot replaces your existing copy of chain data. Usually safe to use this option when doing a fresh installation. Do you want to download a snapshot of the existing chain to speed up node synchronisation? (yes/no) [default: yes]:
no
Provide a moniker for your cheqd-node [default: installer-test]:
ankurs-test
What is the externally-reachable IP address or DNS name for your cheqd-node? [default: Fetch automatically via DNS resolver lookup]: 
142.93.170.2
Specify port for Tendermint RPC [default: 26657]:
26667
Specify port for Tendermint P2P [default: 26656]:
26666
Specify minimum gas price for transactions [default: 25ncheq]:
100ncheq
*********  Downloading cheqd-noded binary...
Reason for failure: No asset found to download for release: v1.0.0-develop.11
Exiting...
Reason for failure: Failed to get cheqd-node binaries from Github
Exiting...
Reason for failure: Unable to install cheqd-node.
Exiting...

The reason why this doesn't work anymore is previously, our release versions did NOT have the v prefix in the 0.6.x release. We realised that this actually caused issues in being able to call the repo as a golang dependency in other repos, e.g., did-resolver. So, starting from v1.x.x, we're going back to adding the v prefix.

The simplest way to deal with this is to check if the asset download URL exists WITHOUT the v prefix (since the binary files don't have this), rather than going by the release name. Check the 0.6.9 release vs one of the newer v1.0.0-develop releases to see what I mean in the URL structure for the assets.

@benyam7 benyam7 requested a review from ankurdotb November 30, 2022 08:29
@ankurdotb ankurdotb enabled auto-merge (squash) December 1, 2022 15:00
@ankurdotb ankurdotb merged commit a25474b into main Dec 1, 2022
@ankurdotb ankurdotb deleted the fix-installer branch December 1, 2022 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants