-
Notifications
You must be signed in to change notification settings - Fork 80
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
Acp77 remote etna devnet #2233
Merged
Merged
Acp77 remote etna devnet #2233
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
3029c48
etna devnet constants
arturrez c401829
add custom bootrap conf to node create
arturrez 5075d2d
Update cmd/nodecmd/create.go
arturrez 1586d95
add unittests for ip:port pair verificatoion
arturrez 3b41a5f
update etna bootstrap info
arturrez 2c1eeb4
add AvalancheGoConfigOptions struct
arturrez fc97806
etnadevnet network model
arturrez 977cf8c
write data to files
arturrez e63d957
err handling
arturrez 79c59d9
support etna devnet
arturrez 9c3fdd7
fix address input
arturrez 6908418
allow public access to rpc endpoint for etna devnet
arturrez e87ccc9
add ux to report public access to user
arturrez a80c5da
read bls info and nodeid for the cluster
arturrez 4457ec0
added 0x to string, added log
arturrez ed42043
fix issue with http_host reverted after sync
arturrez 650fa21
Merge branch 'acp-77' into acp77-remote-etna-devnet
arturrez 6503265
resolve conflict
arturrez 6ef0096
lint
arturrez b2a96eb
after merge fixes
arturrez File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,17 @@ func ValidateComposeFile(host *models.Host, composeFile string, timeout time.Dur | |
} | ||
|
||
// ComposeSSHSetupNode sets up an AvalancheGo node and dependencies on a remote host over SSH. | ||
func ComposeSSHSetupNode(host *models.Host, network models.Network, avalancheGoVersion string, withMonitoring bool, publicAccessToHTTPPort bool) error { | ||
func ComposeSSHSetupNode( | ||
host *models.Host, | ||
network models.Network, | ||
avalancheGoVersion string, | ||
avalanchegoBootstrapIDs []string, | ||
avalanchegoBootstrapIPs []string, | ||
avalanchegoGenesisFilePath string, | ||
avalanchegoUpgradeFilePath string, | ||
Comment on lines
+32
to
+35
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would it be worth encapsulating all of these options in an |
||
withMonitoring bool, | ||
publicAccessToHTTPPort bool, | ||
) error { | ||
startTime := time.Now() | ||
folderStructure := remoteconfig.RemoteFoldersToCreateAvalanchego() | ||
for _, dir := range folderStructure { | ||
|
@@ -41,7 +51,17 @@ func ComposeSSHSetupNode(host *models.Host, network models.Network, avalancheGoV | |
return err | ||
} | ||
ux.Logger.Info("AvalancheGo Docker image %s ready on %s[%s] after %s", avagoDockerImage, host.NodeID, host.IP, time.Since(startTime)) | ||
nodeConfFile, cChainConfFile, err := prepareAvalanchegoConfig(host, network, publicAccessToHTTPPort) | ||
nodeConfFile, cChainConfFile, err := prepareAvalanchegoConfig( | ||
host, | ||
network, | ||
AvalancheGoConfigOptions{ | ||
BootstrapIDs: avalanchegoBootstrapIDs, | ||
BootstrapIPs: avalanchegoBootstrapIPs, | ||
GenesisPath: avalanchegoGenesisFilePath, | ||
UpgradePath: avalanchegoUpgradeFilePath, | ||
AllowPublicAccess: publicAccessToHTTPPort, | ||
}, | ||
) | ||
if err != nil { | ||
return err | ||
} | ||
|
@@ -60,12 +80,22 @@ func ComposeSSHSetupNode(host *models.Host, network models.Network, avalancheGoV | |
if err := host.Upload(cChainConfFile, remoteconfig.GetRemoteAvalancheCChainConfig(), constants.SSHFileOpsTimeout); err != nil { | ||
return err | ||
} | ||
if avalanchegoGenesisFilePath != "" { | ||
if err := host.Upload(avalanchegoGenesisFilePath, remoteconfig.GetRemoteAvalancheGenesis(), constants.SSHFileOpsTimeout); err != nil { | ||
return err | ||
} | ||
} | ||
if avalanchegoUpgradeFilePath != "" { | ||
if err := host.Upload(avalanchegoUpgradeFilePath, remoteconfig.GetRemoteAvalancheUpgrade(), constants.SSHFileOpsTimeout); err != nil { | ||
return err | ||
} | ||
} | ||
ux.Logger.Info("AvalancheGo configs uploaded to %s[%s] after %s", host.NodeID, host.IP, time.Since(startTime)) | ||
return ComposeOverSSH("Compose Node", | ||
host, | ||
constants.SSHScriptTimeout, | ||
"templates/avalanchego.docker-compose.yml", | ||
dockerComposeInputs{ | ||
DockerComposeInputs{ | ||
AvalanchegoVersion: avalancheGoVersion, | ||
WithMonitoring: withMonitoring, | ||
WithAvalanchego: true, | ||
|
@@ -80,7 +110,7 @@ func ComposeSSHSetupLoadTest(host *models.Host) error { | |
host, | ||
constants.SSHScriptTimeout, | ||
"templates/avalanchego.docker-compose.yml", | ||
dockerComposeInputs{ | ||
DockerComposeInputs{ | ||
WithMonitoring: true, | ||
WithAvalanchego: false, | ||
}) | ||
|
@@ -133,13 +163,13 @@ func ComposeSSHSetupMonitoring(host *models.Host) error { | |
host, | ||
constants.SSHScriptTimeout, | ||
"templates/monitoring.docker-compose.yml", | ||
dockerComposeInputs{}) | ||
DockerComposeInputs{}) | ||
} | ||
|
||
func ComposeSSHSetupAWMRelayer(host *models.Host) error { | ||
return ComposeOverSSH("Setup AWM Relayer", | ||
host, | ||
constants.SSHScriptTimeout, | ||
"templates/awmrelayer.docker-compose.yml", | ||
dockerComposeInputs{}) | ||
DockerComposeInputs{}) | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't think we need to even enable flags for bootstrap ids and bootstrap ips. Lets just set these values to hardcoded values if users want join etna devnet.