-
Notifications
You must be signed in to change notification settings - Fork 22
[DEV-618] BTC Output Node #416
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
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
81d7fdc
[DEV-618] Updated and refactored infrastructure
davidleomay 12b5ed4
[DEV-618] Added BTC out node to node service
davidleomay b2c927e
[DEV-618] Refactored node service
davidleomay ca2ec98
[DEV-618] Updated .env example
davidleomay 7e5be1d
[DEV-618] Assigned NSG to subnet
davidleomay 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 hidden or 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 hidden or 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 |
|---|---|---|
| @@ -1,6 +1,13 @@ | ||
| # Infrastructure Deployment | ||
| 1. Update parameter files (stash) | ||
| 1. Update parameter files | ||
| 1. Temp: Update JWT secret | ||
| 1. Do deployment: `az deployment group create -g rg-dfx-api-{env} -f infrastructure/bicep/dfx-api.bicep -p infrastructure/bicep/parameters/{env}.json` | ||
| 1. Loc: remove unused resources (API app service, app insights) | ||
| 1. Dev: remove unused resources (INT node), node url app configuration | ||
| 1. Loc: remove unused resources (API app service + plan, app insights) | ||
| 1. Dev: remove unused resources (INT node), node url app configuration | ||
|
|
||
| # BTC Node Setup | ||
| 1. Connect to BTC node: `ssh dfx@vm-dfx-btc-{type}-{env}.westeurope.cloudapp.azure.com` | ||
| 1. Create scripts (`setup.sh` and `start.sh` from `infrastructure/scripts/btc`) and make them executable (`chmod +x {file}`) | ||
| 1. Execute setup script: `sudo ./setup.sh` | ||
| 1. Copy content of config file (`infrastructure/config/{env}.conf`) to virtual machine (`.bitcoin/bitcoin.conf`) | ||
| 1. Start the node: `./start.sh` |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,96 @@ | ||
| // --- PARAMETERS --- // | ||
| param location string | ||
|
|
||
| param pipName string | ||
| param vmName string | ||
| param vmDiskName string | ||
| param nicName string | ||
|
|
||
| param vmUser string | ||
| @secure() | ||
| param vmPassword string | ||
|
|
||
| param subnetId string | ||
|
|
||
|
|
||
| // --- RESOURCES --- // | ||
| resource pip 'Microsoft.Network/publicIPAddresses@2020-11-01' = { | ||
| name: pipName | ||
| location: location | ||
| sku: { | ||
| name: 'Standard' | ||
| } | ||
| properties: { | ||
| publicIPAllocationMethod: 'Static' | ||
| dnsSettings: { | ||
| domainNameLabel: vmName | ||
| } | ||
| } | ||
| } | ||
|
|
||
| resource nic 'Microsoft.Network/networkInterfaces@2020-11-01' = { | ||
| name: nicName | ||
| location: location | ||
| properties: { | ||
| ipConfigurations: [ | ||
| { | ||
| name: 'ipconfig1' | ||
| properties: { | ||
| privateIPAllocationMethod: 'Dynamic' | ||
| publicIPAddress: { | ||
| id: pip.id | ||
| } | ||
| subnet: { | ||
| id: subnetId | ||
| } | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| } | ||
|
|
||
| resource vm 'Microsoft.Compute/virtualMachines@2022-03-01' = { | ||
| name: vmName | ||
| location: location | ||
| properties: { | ||
| hardwareProfile: { | ||
| vmSize: 'Standard_B2s' | ||
| } | ||
| storageProfile: { | ||
| imageReference: { | ||
| publisher: 'canonical' | ||
| offer: '0001-com-ubuntu-server-focal' | ||
| sku: '20_04-lts-gen2' | ||
| version: 'latest' | ||
| } | ||
| osDisk: { | ||
| name: vmDiskName | ||
| createOption: 'FromImage' | ||
| caching: 'ReadWrite' | ||
| managedDisk: { | ||
| storageAccountType: 'StandardSSD_LRS' | ||
| } | ||
| diskSizeGB: 1023 | ||
| } | ||
| } | ||
| osProfile: { | ||
| computerName: vmName | ||
| adminUsername: vmUser | ||
| adminPassword: vmPassword | ||
| } | ||
| networkProfile: { | ||
| networkInterfaces: [ | ||
| { | ||
| id: nic.id | ||
| } | ||
| ] | ||
| } | ||
| diagnosticsProfile: { | ||
| bootDiagnostics: { | ||
| enabled: true | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
| output url string = 'http://${nic.properties.ipConfigurations[0].properties.privateIPAddress}:8332' | ||
This file contains hidden or 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
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.
Uh oh!
There was an error while loading. Please reload this page.