From fc69dbf31f43c0431d22d3b9a8b991b1584acd52 Mon Sep 17 00:00:00 2001 From: Ali Nikravesh <34384792+seyadava@users.noreply.github.com> Date: Fri, 29 Jun 2018 14:24:02 -0700 Subject: [PATCH] Eth nva (#356) * temp eth upload * Update vmExtension.json * Update joiningVmExtension.json * Update joiningVmExtension.json * Update joiningVmExtension.json * removed old eth * added new eth --- .../genesis-template.json | 21 + .../Connection/createUiDefinition.json | 641 ++++++++++++++++ .../marketplace/Connection/mainTemplate.json | 92 +++ .../ConsortiumLeader/createUiDefinition.json | 611 +++++++++++++++ .../ConsortiumLeader/mainTemplate.json | 662 ++++++++++++++++ .../JoiningMember/createUiDefinition.json | 600 +++++++++++++++ .../JoiningMember/mainTemplate.json | 720 ++++++++++++++++++ .../EULA (final 110216).htm | 100 +++ .../logos/blockchain-logo-hero-815x290p.png | Bin 0 -> 24754 bytes .../logos/blockchain-logo-large-115p.png | Bin 0 -> 5927 bytes .../logos/blockchain-logo-medium-90p.png | Bin 0 -> 4563 bytes .../logos/blockchain-logo-small-40p.png | Bin 0 -> 1908 bytes .../logos/blockchain-logo-wide-255x115p.png | Bin 0 -> 6009 bytes .../sample-images/eth-network-533x324p.png | Bin 0 -> 48317 bytes .../nested/joiningNVAExtension.json | 53 ++ .../nested/joiningVmExtension.json | 104 +++ .../nested/joiningVmExtension.json.bak | 104 +++ .../nested/loadBalancer.json | 181 +++++ .../nested/mnVMAuth-password.json | 142 ++++ .../nested/mnVMAuth-sshPublicKey.json | 155 ++++ .../nested/networkVirtualAppliance.json | 149 ++++ .../nested/txVMAuth-password.json | 162 ++++ .../nested/txVMAuth-sshPublicKey.json | 173 +++++ .../nested/updateRouteTableExtension.json | 44 ++ .../nested/vmExtension.json | 110 +++ .../powershell/BlockchainPackage.psm1 | 53 ++ .../powershell/ConsortiumBridge.psm1 | 45 ++ .../quickstart/README.md | 186 +++++ .../quickstart/azuredeploy.json | 556 ++++++++++++++ .../quickstart/azuredeploy.parameters.json | 39 + .../quickstart/images/admin-site.png | Bin 0 -> 69404 bytes .../quickstart/images/azure1.png | Bin 0 -> 143186 bytes .../quickstart/images/azure10.png | Bin 0 -> 38003 bytes .../quickstart/images/azure11.png | Bin 0 -> 31359 bytes .../quickstart/images/azure12.png | Bin 0 -> 25224 bytes .../quickstart/images/azure2.png | Bin 0 -> 62148 bytes .../quickstart/images/azure3.png | Bin 0 -> 23714 bytes .../quickstart/images/azure4.png | Bin 0 -> 133131 bytes .../quickstart/images/azure5.png | Bin 0 -> 30483 bytes .../quickstart/images/azure6.png | Bin 0 -> 31810 bytes .../quickstart/images/azure7.png | Bin 0 -> 48159 bytes .../quickstart/images/azure8.png | Bin 0 -> 73299 bytes .../quickstart/images/azure9.png | Bin 0 -> 26738 bytes .../quickstart/images/contracts1.png | Bin 0 -> 38208 bytes .../quickstart/images/contracts10.png | Bin 0 -> 24432 bytes .../quickstart/images/contracts11.png | Bin 0 -> 24063 bytes .../quickstart/images/contracts12.png | Bin 0 -> 15722 bytes .../quickstart/images/contracts2.png | Bin 0 -> 19720 bytes .../quickstart/images/contracts3.png | Bin 0 -> 34910 bytes .../quickstart/images/contracts4.png | Bin 0 -> 54148 bytes .../quickstart/images/contracts5.png | Bin 0 -> 24045 bytes .../quickstart/images/contracts6.png | Bin 0 -> 36451 bytes .../quickstart/images/contracts7.png | Bin 0 -> 12214 bytes .../quickstart/images/contracts8.png | Bin 0 -> 16982 bytes .../quickstart/images/contracts9.png | Bin 0 -> 14681 bytes .../quickstart/images/deployment.png | Bin 0 -> 186841 bytes .../quickstart/images/eth-network.png | Bin 0 -> 47680 bytes .../quickstart/images/output.png | Bin 0 -> 186841 bytes .../quickstart/metadata.json | 7 + .../ethereum-consortium-blockchain-1.0.0.zip | Bin 0 -> 26756 bytes .../ethereum-consortium-blockchain-1.0.1.zip | Bin 0 -> 26704 bytes .../ethereum-consortium-blockchain-1.0.2.zip | Bin 0 -> 31878 bytes .../scripts/ConsortiumBridge.sh | 19 + .../scripts/CreateVPN.ps1 | 35 + .../scripts/UpdateRouteTable.ps1 | 20 + .../configure-geth-azureuser-joining.sh | 103 +++ .../scripts/configure-geth-azureuser.sh | 118 +++ .../scripts/configure-geth-joining.sh | 42 + .../scripts/configure-geth.sh | 42 + .../scripts/deployment-utility.sh | 188 +++++ .../scripts/deployment-utility.sh.bak | 188 +++++ .../scripts/etheradmin/app.js | 170 +++++ .../scripts/etheradmin/etheradmin.handlebars | 62 ++ .../etheradmin/etherstartup.handlebars | 14 + .../scripts/etheradmin/main.handlebars | 11 + .../scripts/etheradmin/npm-shrinkwrap.json | 578 ++++++++++++++ .../scripts/etheradmin/package.json | 20 + .../scripts/etheradmin/skeleton.css | 418 ++++++++++ .../scripts/sample-contracts.sol | 47 ++ .../scripts/start-private-blockchain.sh | 111 +++ .../validation/Readme.md | 13 + .../automated-validation-template-params.ps1 | 10 + .../automated-validation-variables.ps1 | 18 + .../validation/automated-validation.ps1 | 69 ++ .../validation/dummyTemplate.json | 20 + .../validation/manual-validation.ps1 | 75 ++ .../modules/ARMTemplateDeployment.psm1 | 242 ++++++ .../modules/ServicePrinciplePasswdLoader.ps1 | 26 + .../validation/modules/Utility.psm1 | 14 + .../multinetwork-validation-variables.ps1 | 25 + .../validation/multinetwork-validation.ps1 | 203 +++++ .../param-sets/azureDeploy-param-set-A1-7.ps1 | 76 ++ .../azureDeploy-param-set-canary.ps1 | 34 + .../param-sets/dummyTemplate-param-set.ps1 | 11 + .../mainTemplate-param-set-A1-7.ps1 | 100 +++ .../mainTemplate-param-set-A8-11.ps1 | 63 ++ .../mainTemplate-param-set-D1-14.ps1 | 100 +++ .../mainTemplate-param-set-D1-15_v2.ps1 | 119 +++ .../mainTemplate-param-set-DS1-14.ps1 | 100 +++ .../mainTemplate-param-set-DS1-15_v2.ps1 | 119 +++ .../mainTemplate-param-set-F1-16.ps1 | 81 ++ .../mainTemplate-param-set-all-DSs.ps1 | 195 +++++ .../mainTemplate-param-set-all-Ds.ps1 | 195 +++++ .../mainTemplate-param-set-canary.ps1 | 62 ++ .../mainTemplate-param-set-happy-path.ps1 | 97 +++ .../mainTemplate-param-set-max-nodes.ps1 | 43 ++ ...late-param-set-multinetwork-join-step2.ps1 | 49 ++ ...inTemplate-param-set-multinetwork-join.ps1 | 49 ++ .../mainTemplate-param-set-multinetwork.ps1 | 70 ++ .../mainTemplate-param-set-single.ps1 | 43 ++ 110 files changed, 10217 insertions(+) create mode 100644 ethereum-consortium-blockchain/genesis-template.json create mode 100644 ethereum-consortium-blockchain/marketplace/Connection/createUiDefinition.json create mode 100644 ethereum-consortium-blockchain/marketplace/Connection/mainTemplate.json create mode 100644 ethereum-consortium-blockchain/marketplace/ConsortiumLeader/createUiDefinition.json create mode 100644 ethereum-consortium-blockchain/marketplace/ConsortiumLeader/mainTemplate.json create mode 100644 ethereum-consortium-blockchain/marketplace/JoiningMember/createUiDefinition.json create mode 100644 ethereum-consortium-blockchain/marketplace/JoiningMember/mainTemplate.json create mode 100644 ethereum-consortium-blockchain/marketplace/publisher-portal-assets/EULA (final 110216).htm create mode 100644 ethereum-consortium-blockchain/marketplace/publisher-portal-assets/logos/blockchain-logo-hero-815x290p.png create mode 100644 ethereum-consortium-blockchain/marketplace/publisher-portal-assets/logos/blockchain-logo-large-115p.png create mode 100644 ethereum-consortium-blockchain/marketplace/publisher-portal-assets/logos/blockchain-logo-medium-90p.png create mode 100644 ethereum-consortium-blockchain/marketplace/publisher-portal-assets/logos/blockchain-logo-small-40p.png create mode 100644 ethereum-consortium-blockchain/marketplace/publisher-portal-assets/logos/blockchain-logo-wide-255x115p.png create mode 100644 ethereum-consortium-blockchain/marketplace/publisher-portal-assets/sample-images/eth-network-533x324p.png create mode 100644 ethereum-consortium-blockchain/nested/joiningNVAExtension.json create mode 100644 ethereum-consortium-blockchain/nested/joiningVmExtension.json create mode 100644 ethereum-consortium-blockchain/nested/joiningVmExtension.json.bak create mode 100644 ethereum-consortium-blockchain/nested/loadBalancer.json create mode 100644 ethereum-consortium-blockchain/nested/mnVMAuth-password.json create mode 100644 ethereum-consortium-blockchain/nested/mnVMAuth-sshPublicKey.json create mode 100644 ethereum-consortium-blockchain/nested/networkVirtualAppliance.json create mode 100644 ethereum-consortium-blockchain/nested/txVMAuth-password.json create mode 100644 ethereum-consortium-blockchain/nested/txVMAuth-sshPublicKey.json create mode 100644 ethereum-consortium-blockchain/nested/updateRouteTableExtension.json create mode 100644 ethereum-consortium-blockchain/nested/vmExtension.json create mode 100644 ethereum-consortium-blockchain/powershell/BlockchainPackage.psm1 create mode 100644 ethereum-consortium-blockchain/powershell/ConsortiumBridge.psm1 create mode 100644 ethereum-consortium-blockchain/quickstart/README.md create mode 100644 ethereum-consortium-blockchain/quickstart/azuredeploy.json create mode 100644 ethereum-consortium-blockchain/quickstart/azuredeploy.parameters.json create mode 100644 ethereum-consortium-blockchain/quickstart/images/admin-site.png create mode 100644 ethereum-consortium-blockchain/quickstart/images/azure1.png create mode 100644 ethereum-consortium-blockchain/quickstart/images/azure10.png create mode 100644 ethereum-consortium-blockchain/quickstart/images/azure11.png create mode 100644 ethereum-consortium-blockchain/quickstart/images/azure12.png create mode 100644 ethereum-consortium-blockchain/quickstart/images/azure2.png create mode 100644 ethereum-consortium-blockchain/quickstart/images/azure3.png create mode 100644 ethereum-consortium-blockchain/quickstart/images/azure4.png create mode 100644 ethereum-consortium-blockchain/quickstart/images/azure5.png create mode 100644 ethereum-consortium-blockchain/quickstart/images/azure6.png create mode 100644 ethereum-consortium-blockchain/quickstart/images/azure7.png create mode 100644 ethereum-consortium-blockchain/quickstart/images/azure8.png create mode 100644 ethereum-consortium-blockchain/quickstart/images/azure9.png create mode 100644 ethereum-consortium-blockchain/quickstart/images/contracts1.png create mode 100644 ethereum-consortium-blockchain/quickstart/images/contracts10.png create mode 100644 ethereum-consortium-blockchain/quickstart/images/contracts11.png create mode 100644 ethereum-consortium-blockchain/quickstart/images/contracts12.png create mode 100644 ethereum-consortium-blockchain/quickstart/images/contracts2.png create mode 100644 ethereum-consortium-blockchain/quickstart/images/contracts3.png create mode 100644 ethereum-consortium-blockchain/quickstart/images/contracts4.png create mode 100644 ethereum-consortium-blockchain/quickstart/images/contracts5.png create mode 100644 ethereum-consortium-blockchain/quickstart/images/contracts6.png create mode 100644 ethereum-consortium-blockchain/quickstart/images/contracts7.png create mode 100644 ethereum-consortium-blockchain/quickstart/images/contracts8.png create mode 100644 ethereum-consortium-blockchain/quickstart/images/contracts9.png create mode 100644 ethereum-consortium-blockchain/quickstart/images/deployment.png create mode 100644 ethereum-consortium-blockchain/quickstart/images/eth-network.png create mode 100644 ethereum-consortium-blockchain/quickstart/images/output.png create mode 100644 ethereum-consortium-blockchain/quickstart/metadata.json create mode 100644 ethereum-consortium-blockchain/release/ethereum-consortium-blockchain-1.0.0.zip create mode 100644 ethereum-consortium-blockchain/release/ethereum-consortium-blockchain-1.0.1.zip create mode 100644 ethereum-consortium-blockchain/release/ethereum-consortium-blockchain-1.0.2.zip create mode 100644 ethereum-consortium-blockchain/scripts/ConsortiumBridge.sh create mode 100644 ethereum-consortium-blockchain/scripts/CreateVPN.ps1 create mode 100644 ethereum-consortium-blockchain/scripts/UpdateRouteTable.ps1 create mode 100644 ethereum-consortium-blockchain/scripts/configure-geth-azureuser-joining.sh create mode 100644 ethereum-consortium-blockchain/scripts/configure-geth-azureuser.sh create mode 100644 ethereum-consortium-blockchain/scripts/configure-geth-joining.sh create mode 100644 ethereum-consortium-blockchain/scripts/configure-geth.sh create mode 100644 ethereum-consortium-blockchain/scripts/deployment-utility.sh create mode 100644 ethereum-consortium-blockchain/scripts/deployment-utility.sh.bak create mode 100644 ethereum-consortium-blockchain/scripts/etheradmin/app.js create mode 100644 ethereum-consortium-blockchain/scripts/etheradmin/etheradmin.handlebars create mode 100644 ethereum-consortium-blockchain/scripts/etheradmin/etherstartup.handlebars create mode 100644 ethereum-consortium-blockchain/scripts/etheradmin/main.handlebars create mode 100644 ethereum-consortium-blockchain/scripts/etheradmin/npm-shrinkwrap.json create mode 100644 ethereum-consortium-blockchain/scripts/etheradmin/package.json create mode 100644 ethereum-consortium-blockchain/scripts/etheradmin/skeleton.css create mode 100644 ethereum-consortium-blockchain/scripts/sample-contracts.sol create mode 100644 ethereum-consortium-blockchain/scripts/start-private-blockchain.sh create mode 100644 ethereum-consortium-blockchain/validation/Readme.md create mode 100644 ethereum-consortium-blockchain/validation/automated-validation-template-params.ps1 create mode 100644 ethereum-consortium-blockchain/validation/automated-validation-variables.ps1 create mode 100644 ethereum-consortium-blockchain/validation/automated-validation.ps1 create mode 100644 ethereum-consortium-blockchain/validation/dummyTemplate.json create mode 100644 ethereum-consortium-blockchain/validation/manual-validation.ps1 create mode 100644 ethereum-consortium-blockchain/validation/modules/ARMTemplateDeployment.psm1 create mode 100644 ethereum-consortium-blockchain/validation/modules/ServicePrinciplePasswdLoader.ps1 create mode 100644 ethereum-consortium-blockchain/validation/modules/Utility.psm1 create mode 100644 ethereum-consortium-blockchain/validation/multinetwork-validation-variables.ps1 create mode 100644 ethereum-consortium-blockchain/validation/multinetwork-validation.ps1 create mode 100644 ethereum-consortium-blockchain/validation/param-sets/azureDeploy-param-set-A1-7.ps1 create mode 100644 ethereum-consortium-blockchain/validation/param-sets/azureDeploy-param-set-canary.ps1 create mode 100644 ethereum-consortium-blockchain/validation/param-sets/dummyTemplate-param-set.ps1 create mode 100644 ethereum-consortium-blockchain/validation/param-sets/mainTemplate-param-set-A1-7.ps1 create mode 100644 ethereum-consortium-blockchain/validation/param-sets/mainTemplate-param-set-A8-11.ps1 create mode 100644 ethereum-consortium-blockchain/validation/param-sets/mainTemplate-param-set-D1-14.ps1 create mode 100644 ethereum-consortium-blockchain/validation/param-sets/mainTemplate-param-set-D1-15_v2.ps1 create mode 100644 ethereum-consortium-blockchain/validation/param-sets/mainTemplate-param-set-DS1-14.ps1 create mode 100644 ethereum-consortium-blockchain/validation/param-sets/mainTemplate-param-set-DS1-15_v2.ps1 create mode 100644 ethereum-consortium-blockchain/validation/param-sets/mainTemplate-param-set-F1-16.ps1 create mode 100644 ethereum-consortium-blockchain/validation/param-sets/mainTemplate-param-set-all-DSs.ps1 create mode 100644 ethereum-consortium-blockchain/validation/param-sets/mainTemplate-param-set-all-Ds.ps1 create mode 100644 ethereum-consortium-blockchain/validation/param-sets/mainTemplate-param-set-canary.ps1 create mode 100644 ethereum-consortium-blockchain/validation/param-sets/mainTemplate-param-set-happy-path.ps1 create mode 100644 ethereum-consortium-blockchain/validation/param-sets/mainTemplate-param-set-max-nodes.ps1 create mode 100644 ethereum-consortium-blockchain/validation/param-sets/mainTemplate-param-set-multinetwork-join-step2.ps1 create mode 100644 ethereum-consortium-blockchain/validation/param-sets/mainTemplate-param-set-multinetwork-join.ps1 create mode 100644 ethereum-consortium-blockchain/validation/param-sets/mainTemplate-param-set-multinetwork.ps1 create mode 100644 ethereum-consortium-blockchain/validation/param-sets/mainTemplate-param-set-single.ps1 diff --git a/ethereum-consortium-blockchain/genesis-template.json b/ethereum-consortium-blockchain/genesis-template.json new file mode 100644 index 0000000..07a5150 --- /dev/null +++ b/ethereum-consortium-blockchain/genesis-template.json @@ -0,0 +1,21 @@ +{ + "alloc": { + "#PREFUND_ADDRESS": { + "balance": "1000000000000000000000000000000" + } + }, + "config": { + "homesteadBlock": 0, + "chainID": #NETWORKID, + "eip155Block": 0, + "eip158Block": 0 + }, + "nonce": "0x0000000000000042", + "difficulty": "#DIFFICULTY", + "mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "coinbase": "0x0000000000000000000000000000000000000000", + "timestamp": "0x00", + "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "extraData": "0x11bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa", + "gasLimit": "0x4c4b40" +} diff --git a/ethereum-consortium-blockchain/marketplace/Connection/createUiDefinition.json b/ethereum-consortium-blockchain/marketplace/Connection/createUiDefinition.json new file mode 100644 index 0000000..07f5e7e --- /dev/null +++ b/ethereum-consortium-blockchain/marketplace/Connection/createUiDefinition.json @@ -0,0 +1,641 @@ +{ + "handler": "Microsoft.Compute.MultiVm", + "version": "0.0.1-preview", + "parameters": { + "basics": [ + { + "name": "namePrefix", + "type": "Microsoft.Common.TextBox", + "label": "Resource prefix", + "toolTip": "String used as a base for naming resources (6 alphanumeric characters or less). A unique hash is prepended to the string for some resources, while resource-specific information is appended.", + "constraints": { + "required": true, + "regex": "^[a-z][a-z0-9-]{1,5}$", + "validationMessage": "Resource prefix must be between 2 and 6 characters long, must begin with a lowercase letter, and can contain only numbers and lowercase letters." + } + }, + { + "name": "adminUsername", + "type": "Microsoft.Compute.UserNameTextBox", + "label": "VM user name", + "defaultValue": "gethadmin", + "toolTip": "Admin username for all of the deployed virtual machines.", + "osPlatform": "Linux" + }, + { + "name": "adminCredentials", + "type": "Microsoft.Compute.CredentialsCombo", + "label": { + "authenticationType": "Authentication type", + "password": "Password", + "confirmPassword": "Confirm password", + "sshPublicKey": "SSH public key" + }, + "toolTip": { + "authenticationType": "", + "password": "VM password must be 12 characters and have 3 of the following: 1 lower case character, 1 upper case character, 1 number, and 1 special character.", + "sshPublicKey": "" + }, + "constraints": { + "required": true + }, + "options": { + "hideConfirmation": false + }, + "osPlatform": "Linux" + } + ], + "steps": [ + { + "name": "NetworkSize", + "label": "Network size and performance", + "subLabel": { + "preValidation": "Define the number and size and nodes in the network", + "postValidation": "Done" + }, + "bladeTitle": "Network Size and Performance", + "elements": [ + { + "name": "consortiumMemberIdValue", + "type": "Microsoft.Common.DropDown", + "label": "Consortium Member Id", + "toolTip": "The Member Id for this Consortium. Each Member Id must be unique.", + "constraints": { + "allowedValues": [ + { + "label": "0", + "value": 0 + }, + { + "label": "1", + "value": 1 + }, + { + "label": "2", + "value": 2 + }, + { + "label": "3", + "value": 3 + }, + { + "label": "4", + "value": 4 + }, + { + "label": "5", + "value": 5 + }, + { + "label": "6", + "value": 6 + }, + { + "label": "7", + "value": 7 + }, + { + "label": "8", + "value": 8 + }, + { + "label": "9", + "value": 9 + }, + { + "label": "10", + "value": 10 + }, + { + "label": "11", + "value": 11 + }, + { + "label": "11", + "value": 11 + }, + { + "label": "12", + "value": 12 + }, + { + "label": "13", + "value": 13 + }, + { + "label": "14", + "value": 14 + }, + { + "label": "15", + "value": 15 + } + ] + }, + "visible": true + }, + { + "name": "mnSection", + "type": "Microsoft.Common.Section", + "label": "Mining Nodes", + "elements": [ + { + "name": "numberOfMiningNodes", + "type": "Microsoft.Common.DropDown", + "label": "Number of mining nodes per member", + "defaultValue": "2", + "toolTip": "Mining nodes record transactions within a blockchain network. Choose the number of nodes that meet your availability and security requirements.", + "constraints": { + "allowedValues": [ + { + "label": "2", + "value": 2 + }, + { + "label": "3", + "value": 3 + }, + { + "label": "4", + "value": 4 + }, + { + "label": "5", + "value": 5 + }, + { + "label": "6", + "value": 6 + }, + { + "label": "7", + "value": 7 + }, + { + "label": "8", + "value": 8 + }, + { + "label": "9", + "value": 9 + }, + { + "label": "10", + "value": 10 + }, + { + "label": "11", + "value": 11 + }, + { + "label": "12", + "value": 12 + }, + { + "label": "13", + "value": 13 + }, + { + "label": "14", + "value": 14 + }, + { + "label": "15", + "value": 15 + } + ] + }, + "visible": true + }, + { + "name": "mnStoragePerformance", + "type": "Microsoft.Common.OptionsGroup", + "label": "Mining node storage performance", + "defaultValue": "Standard", + "toolTip": "Standard storage is backed by magnetic drives and provides the lowest cost per GB. Premium storage accounts are backed by solid state drives and offer consistent, low-latency performance. They can only be used with Azure virtual machine disks, and are best for I/O-intensive applications. This setting can't be changed after the storage account is created. [Learn more](https://azure.microsoft.com/documentation/articles/storage-introduction/#introducing-the-azure-storage-services)", + "constraints": { + "allowedValues": [ + { + "label": "Standard", + "value": "Standard" + }, + { + "label": "Premium", + "value": "Premium" + } + ] + }, + "visible": true + }, + { + "name": "mnStorageReplication-Standard", + "type": "Microsoft.Common.DropDown", + "label": "Mining node storage replication", + "defaultValue": "Locally-redundant storage (LRS)", + "toolTip": "Data Azure storage is always replicated to ensure durability and high availability. Choose a replication strategy that matches your durability requirements. Some settings can't be changed after the storage account is created. [Learn more](https://azure.microsoft.com/documentation/articles/storage-redundancy/)", + "constraints": { + "allowedValues": [ + { + "label": "Locally-redundant storage (LRS)", + "value": "LRS" + }, + { + "label": "Geo-redundant storage (GRS)", + "value": "GRS" + }, + { + "label": "Read-access geo-redundant storage (RAGRS)", + "value": "RAGRS" + } + ] + }, + "visible": "[equals(steps('NetworkSize').mnSection.mnStoragePerformance, 'Standard')]" + }, + { + "name": "mnStorageReplication-Premium", + "type": "Microsoft.Common.DropDown", + "label": "Mining node storage replication", + "defaultValue": "Locally-redundant storage (LRS)", + "toolTip": "Data Azure storage is always replicated to ensure durability and high availability. Choose a replication strategy that matches your durability requirements. Some settings can't be changed after the storage account is created. [Learn more](https://azure.microsoft.com/documentation/articles/storage-redundancy/)", + "constraints": { + "allowedValues": [ + { + "label": "Locally-redundant storage (LRS)", + "value": "LRS" + } + ] + }, + "visible": "[equals(steps('NetworkSize').mnSection.mnStoragePerformance, 'Premium')]" + }, + { + "name": "mnNodeVMSizeHDD", + "type": "Microsoft.Compute.SizeSelector", + "label": "Mining node virtual machine size", + "toolTip": "", + "recommendedSizes": [ + "Standard_D1_v2", + "Standard_D1", + "Standard_A1" + ], + "constraints": { + "allowedSizes": [ + "Standard_A1", + "Standard_A2", + "Standard_A3", + "Standard_A4", + "Standard_A5", + "Standard_A6", + "Standard_A7", + "Standard_A8", + "Standard_A9", + "Standard_A10", + "Standard_A11", + "Standard_D1", + "Standard_D2", + "Standard_D3", + "Standard_D4", + "Standard_D11", + "Standard_D12", + "Standard_D13", + "Standard_D14", + "Standard_D1_v2", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F1", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16" + ], + "excludedSizes": [] + }, + "osPlatform": "Linux", + "count": "[steps('NetworkSize').mnSection.numberOfMiningNodes]", + "visible": "[equals(steps('NetworkSize').mnSection.mnStoragePerformance, 'Standard')]" + }, + { + "name": "mnNodeVMSizeSSD", + "type": "Microsoft.Compute.SizeSelector", + "label": "Mining node virtual machine size", + "toolTip": "", + "recommendedSizes": [ + "Standard_DS1_v2", + "Standard_DS1", + "Standard_F1s" + ], + "constraints": { + "allowedSizes": [ + "Standard_DS1", + "Standard_DS2", + "Standard_DS3", + "Standard_DS4", + "Standard_DS11", + "Standard_DS12", + "Standard_DS13", + "Standard_DS14", + "Standard_DS1_v2", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2", + "Standard_F1s", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s" + ], + "excludedSizes": [] + }, + "osPlatform": "Linux", + "count": "[steps('NetworkSize').mnSection.numberOfMiningNodes]", + "visible": "[equals(steps('NetworkSize').mnSection.mnStoragePerformance, 'Premium')]" + } + ] + }, + { + "name": "txSection", + "type": "Microsoft.Common.Section", + "label": "Transaction Nodes", + "elements": [ + { + "name": "numTXNodes", + "type": "Microsoft.Common.DropDown", + "label": "Number of load balanced transaction nodes", + "defaultValue": "1", + "toolTip": "An application or user interacts with a load balanced set of transaction nodes to submit transactions to the network. Choose the number of nodes that meets your availability requirements.", + "constraints": { + "allowedValues": [ + { + "label": "1", + "value": 1 + }, + { + "label": "2", + "value": 2 + }, + { + "label": "3", + "value": 3 + }, + { + "label": "4", + "value": 4 + }, + { + "label": "5", + "value": 5 + } + ] + }, + "visible": true + }, + { + "name": "txStoragePerformance", + "type": "Microsoft.Common.OptionsGroup", + "label": "Transaction node storage performance", + "defaultValue": "Standard", + "toolTip": "Standard storage is backed by magnetic drives and provides the lowest cost per GB. Premium storage accounts are backed by solid state drives and offer consistent, low-latency performance. They can only be used with Azure virtual machine disks, and are best for I/O-intensive applications. This setting can't be changed after the storage account is created. [Learn more](https://azure.microsoft.com/documentation/articles/storage-introduction/#introducing-the-azure-storage-services)", + "constraints": { + "allowedValues": [ + { + "label": "Standard", + "value": "Standard" + }, + { + "label": "Premium", + "value": "Premium" + } + ] + }, + "visible": true + }, + { + "name": "txStorageReplication-Standard", + "type": "Microsoft.Common.DropDown", + "label": "Transaction node storage replication", + "defaultValue": "Locally-redundant storage (LRS)", + "toolTip": "Data Azure storage is always replicated to ensure durability and high availability. Choose a replication strategy that matches your durability requirements. Some settings can't be changed after the storage account is created. [Learn more](https://azure.microsoft.com/documentation/articles/storage-redundancy/)", + "constraints": { + "allowedValues": [ + { + "label": "Locally-redundant storage (LRS)", + "value": "LRS" + }, + { + "label": "Geo-redundant storage (GRS)", + "value": "GRS" + }, + { + "label": "Read-access geo-redundant storage (RAGRS)", + "value": "RAGRS" + } + ] + }, + "visible": "[equals(steps('NetworkSize').txSection.txStoragePerformance, 'Standard')]" + }, + { + "name": "txStorageReplication-Premium", + "type": "Microsoft.Common.DropDown", + "label": "Transaction node storage replication", + "defaultValue": "Locally-redundant storage (LRS)", + "toolTip": "Data Azure storage is always replicated to ensure durability and high availability. Choose a replication strategy that matches your durability requirements. Some settings can't be changed after the storage account is created. [Learn more](https://azure.microsoft.com/documentation/articles/storage-redundancy/)", + "constraints": { + "allowedValues": [ + { + "label": "Locally-redundant storage (LRS)", + "value": "LRS" + } + ] + }, + "visible": "[equals(steps('NetworkSize').txSection.txStoragePerformance, 'Premium')]" + }, + { + "name": "txNodeVMSizeHDD", + "type": "Microsoft.Compute.SizeSelector", + "label": "Transaction node virtual machine size", + "toolTip": "", + "recommendedSizes": [ + "Standard_D1_v2", + "Standard_D1", + "Standard_A1" + ], + "constraints": { + "allowedSizes": [ + "Standard_A1", + "Standard_A2", + "Standard_A3", + "Standard_A4", + "Standard_A5", + "Standard_A6", + "Standard_A7", + "Standard_A8", + "Standard_A9", + "Standard_A10", + "Standard_A11", + "Standard_D1", + "Standard_D2", + "Standard_D3", + "Standard_D4", + "Standard_D11", + "Standard_D12", + "Standard_D13", + "Standard_D14", + "Standard_D1_v2", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F1", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16" + ], + "excludedSizes": [] + }, + "osPlatform": "Linux", + "count": "[steps('NetworkSize').txSection.numTXNodes]", + "visible": "[equals(steps('NetworkSize').txSection.txStoragePerformance, 'Standard')]" + }, + { + "name": "txNodeVMSizeSSD", + "type": "Microsoft.Compute.SizeSelector", + "label": "Transaction node virtual machine size", + "toolTip": "", + "recommendedSizes": [ + "Standard_DS1_v2", + "Standard_DS1", + "Standard_F1s" + ], + "constraints": { + "allowedSizes": [ + "Standard_DS1", + "Standard_DS2", + "Standard_DS3", + "Standard_DS4", + "Standard_DS11", + "Standard_DS12", + "Standard_DS13", + "Standard_DS14", + "Standard_DS1_v2", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2", + "Standard_F1s", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s" + ], + "excludedSizes": [] + }, + "osPlatform": "Linux", + "count": "[steps('NetworkSize').txSection.numTXNodes]", + "visible": "[equals(steps('NetworkSize').txSection.txStoragePerformance, 'Premium')]" + } + ] + } + ] + }, + { + "name": "EthereumSettings", + "label": "Ethereum Settings", + "subLabel": { + "preValidation": "Configure the Ethereum nodes", + "postValidation": "Done" + }, + "bladeTitle": "Ethereum Settings", + "elements": [ + { + "name": "consortiumInformation", + "type": "Microsoft.Common.TextBox", + "label": "Consortium Data Url", + "defaultValue": "", + "toolTip": "Url to the consortium data.", + "constraints": { + "required": true + }, + "visible": "true" + }, + { + "name": "ethereumAccountPsswd", + "type": "Microsoft.Common.PasswordBox", + "label": { + "password": "Ethereum account password", + "confirmPassword": "Confirm password" + }, + "toolTip": "Password used to secure the default Ethereum account that will be generated.", + "constraints": { + "required": true, + "regex": "^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])[^\"]{12,}$", + "validationMessage": "Password must be 12 characters or more with a minimum of 1 lower case, 1 upper case and one number. Double quotes are not allowed." + }, + "options": { + "hideConfirmation": false + }, + "visible": true + }, + { + "name": "ethereumAccountPassphrase", + "type": "Microsoft.Common.PasswordBox", + "label": { + "password": "Ethereum private key passphrase", + "confirmPassword": "Confirm passphrase" + }, + "toolTip": "Passphrase used to generate the private key associated with the default Ethereum account that is generated. Consider a passphrase with sufficient randomness to ensure a strong private key.", + "constraints": { + "required": true, + "regex": "^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])[^\"]{12,}$", + "validationMessage": "Password must be 12 characters or more with a minimum of 1 lower case, 1 upper case and one number. Double quotes are not allowed." + }, + "options": { + "hideConfirmation": false + }, + "visible": true + } + ] + } + ], + "outputs": { + "namePrefix": "[basics('namePrefix')]", + "authType": "[basics('adminCredentials').authenticationType]", + "adminUsername": "[basics('adminUsername')]", + "adminPassword": "[basics('adminCredentials').password]", + "adminSSHKey": "[basics('adminCredentials').sshPublicKey]", + "ethereumAccountPsswd": "[steps('EthereumSettings').ethereumAccountPsswd]", + "ethereumAccountPassphrase": "[steps('EthereumSettings').ethereumAccountPassphrase]", + "consortiumMemberId": "[steps('NetworkSize').consortiumMemberIdValue]", + "numMiningNodes": "[steps('NetworkSize').mnSection.numberOfMiningNodes]", + "mnNodeVMSize": "[coalesce(steps('NetworkSize').mnSection.mnNodeVMSizeHDD, steps('NetworkSize').mnSection.mnNodeVMSizeSSD)]", + "mnStorageAccountType": "[concat(steps('NetworkSize').mnSection.mnStoragePerformance, '_', coalesce(steps('NetworkSize').mnSection.mnStorageReplication-Standard, steps('NetworkSize').mnSection.mnStorageReplication-Premium))]", + "numTXNodes": "[steps('NetworkSize').txSection.numTXNodes]", + "txNodeVMSize": "[coalesce(steps('NetworkSize').txSection.txNodeVMSizeHDD, steps('NetworkSize').txSection.txNodeVMSizeSSD)]", + "txStorageAccountType": "[concat(steps('NetworkSize').txSection.txStoragePerformance, '_', coalesce(steps('NetworkSize').txSection.txStorageReplication-Standard, steps('NetworkSize').txSection.txStorageReplication-Premium))]", + "consortiumData": "[steps('EthereumSettings').consortiumInformation]", + "location": "[location()]" + } + } +} diff --git a/ethereum-consortium-blockchain/marketplace/Connection/mainTemplate.json b/ethereum-consortium-blockchain/marketplace/Connection/mainTemplate.json new file mode 100644 index 0000000..15b7769 --- /dev/null +++ b/ethereum-consortium-blockchain/marketplace/Connection/mainTemplate.json @@ -0,0 +1,92 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "MemberNamePrefix": { + "type": "string", + "metadata": { + "description": "String used as a base for naming resources (6 alphanumeric characters or less). A unique hash is prepended to the string for some resources, while resource-specific information is appended." + } + }, + "MemberRouteTableName": { + "type": "string", + "metadata": { + "description": "RouteTableName" + } + }, + "RemoteMemberVnetAddressSpace": { + "type": "string", + "metadata": { + "description": "The Address Space of the Consortium Member VNet to connect to" + } + }, + "RemoteMemberNvaPublicIP": { + "type": "string", + "metadata": { + "description": "The Public IP address of the Consortium Member NVA to connect to" + } + }, + "connectionSharedKey": { + "type": "string", + "metadata": { + "description": "Shared Key for the Gateway Connection" + } + }, + "MemberNvaPrivateIp": + { + "type": "string" + }, + "baseUrl": { + "type": "string", + "metadata": { + "description": "The base URL for dependent assets", + "artifactsBaseUrl": "" + }, + "defaultValue": "https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/ethereum-consortium-blockchain" + } + }, + "variables": { + "apiVersionDeployments": "2016-02-01", + "apiVersionRouteTables": "2015-06-15", + "namingInfix": "[toLower(substring(concat(parameters('MemberNamePrefix'), uniqueString(resourceGroup().id)), 0, 9))]", + "nvaVMName": "[concat(variables('namingInfix'), '-nva')]", + "vpnName": "[concat('v', uniqueString(variables('namingInfix'), parameters('RemoteMemberVnetAddressSpace')), '-vpn')]", + "NvaRouteName": "[concat('r', uniqueString(variables('namingInfix'), parameters('RemoteMemberVnetAddressSpace')), '-Route')]", + "location": "[resourceGroup().location]" + }, + "resources": [ + { + "apiVersion": "[variables('apiVersionRouteTables')]", + "type": "Microsoft.Network/routeTables/routes", + "name": "[concat(parameters('MemberRouteTableName'), '/', variables('NvaRouteName'))]", + "location": "[variables('location')]", + "properties": { + "addressPrefix": "[parameters('RemoteMemberVnetAddressSpace')]", + "nextHopType": "VirtualAppliance", + "nextHopIpAddress": "[parameters('MemberNvaPrivateIp')]" + } + }, + { + "apiVersion": "[variables('apiVersionDeployments')]", + "name": "nvaExtension", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(parameters('baseUrl'), '/nested/joiningNVAExtension.json')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "nvaVMName": {"value": "[variables('nvaVMName')]" }, + "location": {"value": "[variables('location')]" }, + "remoteIpAddress": { "value": "[parameters('RemoteMemberNvaPublicIP')]" }, + "remoteAddressSpace": { "value": "[parameters('RemoteMemberVnetAddressSpace')]" }, + "sharedKey": { "value": "[parameters('connectionSharedKey')]" }, + "vpnName": { "value": "[variables('vpnName')]" }, + "artifactsLocationURL": { "value": "[parameters('baseUrl')]" } + } + } + } + ], + "outputs": {} +} \ No newline at end of file diff --git a/ethereum-consortium-blockchain/marketplace/ConsortiumLeader/createUiDefinition.json b/ethereum-consortium-blockchain/marketplace/ConsortiumLeader/createUiDefinition.json new file mode 100644 index 0000000..44dfcbc --- /dev/null +++ b/ethereum-consortium-blockchain/marketplace/ConsortiumLeader/createUiDefinition.json @@ -0,0 +1,611 @@ +{ + "handler": "Microsoft.Compute.MultiVm", + "version": "0.0.1-preview", + "parameters": { + "basics": [ + { + "name": "namePrefix", + "type": "Microsoft.Common.TextBox", + "label": "Resource prefix", + "toolTip": "String used as a base for naming resources (6 alphanumeric characters or less). A unique hash is prepended to the string for some resources, while resource-specific information is appended.", + "constraints": { + "required": true, + "regex": "^[a-z][a-z0-9-]{1,5}$", + "validationMessage": "Resource prefix must be between 2 and 6 characters long, must begin with a lowercase letter, and can contain only numbers and lowercase letters." + } + }, + { + "name": "adminUsername", + "type": "Microsoft.Compute.UserNameTextBox", + "label": "VM user name", + "defaultValue": "gethadmin", + "toolTip": "Admin username for all of the deployed virtual machines.", + "osPlatform": "Linux" + }, + { + "name": "adminCredentials", + "type": "Microsoft.Compute.CredentialsCombo", + "label": { + "authenticationType": "Authentication type", + "password": "Password", + "confirmPassword": "Confirm password", + "sshPublicKey": "SSH public key" + }, + "toolTip": { + "authenticationType": "", + "password": "VM password must be 12 characters and have 3 of the following: 1 lower case character, 1 upper case character, 1 number, and 1 special character.", + "sshPublicKey": "" + }, + "constraints": { + "required": true + }, + "options": { + "hideConfirmation": false + }, + "osPlatform": "Linux" + } + ], + "steps": [ + { + "name": "NetworkSize", + "label": "Network size and performance", + "subLabel": { + "preValidation": "Define the number and size and nodes in the network", + "postValidation": "Done" + }, + "bladeTitle": "Network Size and Performance", + "elements": [ + { + "name": "consortiumMemberIdValue", + "type": "Microsoft.Common.TextBox", + "label": "Consortium Member Id", + "defaultValue": "0", + "toolTip": "The Id associated with each member participating in the consortium network. Member Id should be unique across different members in the same network.", + "constraints": { + "required": true, + "regex": "^(?:25[0-5]|2[0-4]\\d|[01]\\d\\d|\\d?\\d)$", + "validationMessage": "Must be between 0 and 255" + }, + "visible": "true" + }, + { + "name": "mnSection", + "type": "Microsoft.Common.Section", + "label": "Mining Nodes", + "elements": [ + { + "name": "numberOfMiningNodes", + "type": "Microsoft.Common.DropDown", + "label": "Number of mining nodes per member", + "defaultValue": "2", + "toolTip": "Mining nodes record transactions within a blockchain network. Choose the number of nodes that meet your availability and security requirements.", + "constraints": { + "allowedValues": [ + { + "label": "2", + "value": 2 + }, + { + "label": "3", + "value": 3 + }, + { + "label": "4", + "value": 4 + }, + { + "label": "5", + "value": 5 + }, + { + "label": "6", + "value": 6 + }, + { + "label": "7", + "value": 7 + }, + { + "label": "8", + "value": 8 + }, + { + "label": "9", + "value": 9 + }, + { + "label": "10", + "value": 10 + }, + { + "label": "11", + "value": 11 + }, + { + "label": "12", + "value": 12 + }, + { + "label": "13", + "value": 13 + }, + { + "label": "14", + "value": 14 + }, + { + "label": "15", + "value": 15 + } + ] + }, + "visible": true + }, + { + "name": "mnStoragePerformance", + "type": "Microsoft.Common.OptionsGroup", + "label": "Mining node storage performance", + "defaultValue": "Standard", + "toolTip": "Standard storage is backed by magnetic drives and provides the lowest cost per GB. Premium storage accounts are backed by solid state drives and offer consistent, low-latency performance. They can only be used with Azure virtual machine disks, and are best for I/O-intensive applications. This setting can't be changed after the storage account is created. [Learn more](https://azure.microsoft.com/documentation/articles/storage-introduction/#introducing-the-azure-storage-services)", + "constraints": { + "allowedValues": [ + { + "label": "Standard", + "value": "Standard" + }, + { + "label": "Premium", + "value": "Premium" + } + ] + }, + "visible": true + }, + { + "name": "mnStorageReplication-Standard", + "type": "Microsoft.Common.DropDown", + "label": "Mining node storage replication", + "defaultValue": "Locally-redundant storage (LRS)", + "toolTip": "Data Azure storage is always replicated to ensure durability and high availability. Choose a replication strategy that matches your durability requirements. Some settings can't be changed after the storage account is created. [Learn more](https://azure.microsoft.com/documentation/articles/storage-redundancy/)", + "constraints": { + "allowedValues": [ + { + "label": "Locally-redundant storage (LRS)", + "value": "LRS" + }, + { + "label": "Geo-redundant storage (GRS)", + "value": "GRS" + }, + { + "label": "Read-access geo-redundant storage (RAGRS)", + "value": "RAGRS" + } + ] + }, + "visible": "[equals(steps('NetworkSize').mnSection.mnStoragePerformance, 'Standard')]" + }, + { + "name": "mnStorageReplication-Premium", + "type": "Microsoft.Common.DropDown", + "label": "Mining node storage replication", + "defaultValue": "Locally-redundant storage (LRS)", + "toolTip": "Data Azure storage is always replicated to ensure durability and high availability. Choose a replication strategy that matches your durability requirements. Some settings can't be changed after the storage account is created. [Learn more](https://azure.microsoft.com/documentation/articles/storage-redundancy/)", + "constraints": { + "allowedValues": [ + { + "label": "Locally-redundant storage (LRS)", + "value": "LRS" + } + ] + }, + "visible": "[equals(steps('NetworkSize').mnSection.mnStoragePerformance, 'Premium')]" + }, + { + "name": "mnNodeVMSizeHDD", + "type": "Microsoft.Compute.SizeSelector", + "label": "Mining node virtual machine size", + "toolTip": "", + "recommendedSizes": [ + "Standard_D1_v2", + "Standard_D1", + "Standard_A1" + ], + "constraints": { + "allowedSizes": [ + "Standard_A1", + "Standard_A2", + "Standard_A3", + "Standard_A4", + "Standard_A5", + "Standard_A6", + "Standard_A7", + "Standard_A8", + "Standard_A9", + "Standard_A10", + "Standard_A11", + "Standard_D1", + "Standard_D2", + "Standard_D3", + "Standard_D4", + "Standard_D11", + "Standard_D12", + "Standard_D13", + "Standard_D14", + "Standard_D1_v2", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F1", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16" + ], + "excludedSizes": [] + }, + "osPlatform": "Linux", + "count": "[steps('NetworkSize').mnSection.numberOfMiningNodes]", + "visible": "[equals(steps('NetworkSize').mnSection.mnStoragePerformance, 'Standard')]" + }, + { + "name": "mnNodeVMSizeSSD", + "type": "Microsoft.Compute.SizeSelector", + "label": "Mining node virtual machine size", + "toolTip": "", + "recommendedSizes": [ + "Standard_DS1_v2", + "Standard_DS1", + "Standard_F1s" + ], + "constraints": { + "allowedSizes": [ + "Standard_DS1", + "Standard_DS2", + "Standard_DS3", + "Standard_DS4", + "Standard_DS11", + "Standard_DS12", + "Standard_DS13", + "Standard_DS14", + "Standard_DS1_v2", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2", + "Standard_F1s", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s" + ], + "excludedSizes": [] + }, + "osPlatform": "Linux", + "count": "[steps('NetworkSize').mnSection.numberOfMiningNodes]", + "visible": "[equals(steps('NetworkSize').mnSection.mnStoragePerformance, 'Premium')]" + } + ] + }, + { + "name": "txSection", + "type": "Microsoft.Common.Section", + "label": "Transaction Nodes", + "elements": [ + { + "name": "numTXNodes", + "type": "Microsoft.Common.DropDown", + "label": "Number of load balanced transaction nodes", + "defaultValue": "1", + "toolTip": "An application or user interacts with a load balanced set of transaction nodes to submit transactions to the network. Choose the number of nodes that meets your availability requirements.", + "constraints": { + "allowedValues": [ + { + "label": "1", + "value": 1 + }, + { + "label": "2", + "value": 2 + }, + { + "label": "3", + "value": 3 + }, + { + "label": "4", + "value": 4 + }, + { + "label": "5", + "value": 5 + } + ] + }, + "visible": true + }, + { + "name": "txStoragePerformance", + "type": "Microsoft.Common.OptionsGroup", + "label": "Transaction node storage performance", + "defaultValue": "Standard", + "toolTip": "Standard storage is backed by magnetic drives and provides the lowest cost per GB. Premium storage accounts are backed by solid state drives and offer consistent, low-latency performance. They can only be used with Azure virtual machine disks, and are best for I/O-intensive applications. This setting can't be changed after the storage account is created. [Learn more](https://azure.microsoft.com/documentation/articles/storage-introduction/#introducing-the-azure-storage-services)", + "constraints": { + "allowedValues": [ + { + "label": "Standard", + "value": "Standard" + }, + { + "label": "Premium", + "value": "Premium" + } + ] + }, + "visible": true + }, + { + "name": "txStorageReplication-Standard", + "type": "Microsoft.Common.DropDown", + "label": "Transaction node storage replication", + "defaultValue": "Locally-redundant storage (LRS)", + "toolTip": "Data Azure storage is always replicated to ensure durability and high availability. Choose a replication strategy that matches your durability requirements. Some settings can't be changed after the storage account is created. [Learn more](https://azure.microsoft.com/documentation/articles/storage-redundancy/)", + "constraints": { + "allowedValues": [ + { + "label": "Locally-redundant storage (LRS)", + "value": "LRS" + }, + { + "label": "Geo-redundant storage (GRS)", + "value": "GRS" + }, + { + "label": "Read-access geo-redundant storage (RAGRS)", + "value": "RAGRS" + } + ] + }, + "visible": "[equals(steps('NetworkSize').txSection.txStoragePerformance, 'Standard')]" + }, + { + "name": "txStorageReplication-Premium", + "type": "Microsoft.Common.DropDown", + "label": "Transaction node storage replication", + "defaultValue": "Locally-redundant storage (LRS)", + "toolTip": "Data Azure storage is always replicated to ensure durability and high availability. Choose a replication strategy that matches your durability requirements. Some settings can't be changed after the storage account is created. [Learn more](https://azure.microsoft.com/documentation/articles/storage-redundancy/)", + "constraints": { + "allowedValues": [ + { + "label": "Locally-redundant storage (LRS)", + "value": "LRS" + } + ] + }, + "visible": "[equals(steps('NetworkSize').txSection.txStoragePerformance, 'Premium')]" + }, + { + "name": "txNodeVMSizeHDD", + "type": "Microsoft.Compute.SizeSelector", + "label": "Transaction node virtual machine size", + "toolTip": "", + "recommendedSizes": [ + "Standard_D1_v2", + "Standard_D1", + "Standard_A1" + ], + "constraints": { + "allowedSizes": [ + "Standard_A1", + "Standard_A2", + "Standard_A3", + "Standard_A4", + "Standard_A5", + "Standard_A6", + "Standard_A7", + "Standard_A8", + "Standard_A9", + "Standard_A10", + "Standard_A11", + "Standard_D1", + "Standard_D2", + "Standard_D3", + "Standard_D4", + "Standard_D11", + "Standard_D12", + "Standard_D13", + "Standard_D14", + "Standard_D1_v2", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F1", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16" + ], + "excludedSizes": [] + }, + "osPlatform": "Linux", + "count": "[steps('NetworkSize').txSection.numTXNodes]", + "visible": "[equals(steps('NetworkSize').txSection.txStoragePerformance, 'Standard')]" + }, + { + "name": "txNodeVMSizeSSD", + "type": "Microsoft.Compute.SizeSelector", + "label": "Transaction node virtual machine size", + "toolTip": "", + "recommendedSizes": [ + "Standard_DS1_v2", + "Standard_DS1", + "Standard_F1s" + ], + "constraints": { + "allowedSizes": [ + "Standard_DS1", + "Standard_DS2", + "Standard_DS3", + "Standard_DS4", + "Standard_DS11", + "Standard_DS12", + "Standard_DS13", + "Standard_DS14", + "Standard_DS1_v2", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2", + "Standard_F1s", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s" + ], + "excludedSizes": [] + }, + "osPlatform": "Linux", + "count": "[steps('NetworkSize').txSection.numTXNodes]", + "visible": "[equals(steps('NetworkSize').txSection.txStoragePerformance, 'Premium')]" + } + ] + } + ] + }, + { + "name": "EthereumSettings", + "label": "Ethereum Settings", + "subLabel": { + "preValidation": "Configure the Ethereum nodes", + "postValidation": "Done" + }, + "bladeTitle": "Ethereum Settings", + "elements": [ + { + "name": "ethereumNetworkID", + "type": "Microsoft.Common.TextBox", + "label": "Network ID", + "defaultValue": "10101010", + "toolTip": "ID used to name the private Ethereum network created. Only nodes that share the same ID peer with each other.", + "constraints": { + "required": true, + "regex": "^[0-9]{1,9}$", + "validationMessage": "Only numeric values up to 9 characters long allowed." + }, + "visible": "true" + }, + { + "type": "Microsoft.Common.OptionsGroup", + "name": "genesisBlockCreation", + "label": "Custom Genesis Block", + "toolTip": "Option to either automatically generate a genesis block or provide a custom one.", + "defaultValue": "No", + "constraints": { + "allowedValues": [ + { + "label": "Yes", + "value": "GENESIS" + }, + { + "label": "No", + "value": "PASSWORD" + } + ], + "required": true + } + }, + { + "name": "genesisBlock", + "type": "Microsoft.Common.TextBox", + "label": "Genesis Block", + "defaultValue": "", + "toolTip": "JSON string representing custom genesis block", + "constraints": { + "required": "[contains(steps('EthereumSettings').genesisBlockCreation, 'GENESIS')]" + }, + "visible": "[contains(steps('EthereumSettings').genesisBlockCreation, 'GENESIS')]" + }, + { + "name": "ethereumAccountPsswd", + "type": "Microsoft.Common.PasswordBox", + "label": { + "password": "Ethereum account password", + "confirmPassword": "Confirm password" + }, + "defaultValue": "", + "toolTip": "Password used to secure the default Ethereum account that will be generated.", + "constraints": { + "required": "[contains(steps('EthereumSettings').genesisBlockCreation, 'PASSWORD')]", + "regex": "^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])[^\"]{12,}$", + "validationMessage": "Password must be 12 characters or more with a minimum of 1 lower case, 1 upper case and one number. Double quotes are not allowed." + }, + "options": { + "hideConfirmation": false + }, + "visible": "[contains(steps('EthereumSettings').genesisBlockCreation, 'PASSWORD')]" + }, + { + "name": "ethereumAccountPassphrase", + "type": "Microsoft.Common.PasswordBox", + "label": { + "password": "Ethereum private key passphrase", + "confirmPassword": "Confirm passphrase" + }, + "defaultValue": "", + "toolTip": "Passphrase used to generate the private key associated with the default Ethereum account that is generated. Consider a passphrase with sufficient randomness to ensure a strong private key.", + "constraints": { + "required": "[contains(steps('EthereumSettings').genesisBlockCreation, 'PASSWORD')]", + "regex": "^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])[^\"]{12,}$", + "validationMessage": "Password must be 12 characters or more with a minimum of 1 lower case, 1 upper case and one number. Double quotes are not allowed." + }, + "options": { + "hideConfirmation": false + }, + "visible": "[contains(steps('EthereumSettings').genesisBlockCreation, 'PASSWORD')]" + } + ] + } + ], + "outputs": { + "namePrefix": "[basics('namePrefix')]", + "authType": "[basics('adminCredentials').authenticationType]", + "adminUsername": "[basics('adminUsername')]", + "adminPassword": "[basics('adminCredentials').password]", + "adminSSHKey": "[basics('adminCredentials').sshPublicKey]", + "ethereumNetworkID": "[int(steps('EthereumSettings').ethereumNetworkID)]", + "ethereumAccountPsswd": "[steps('EthereumSettings').ethereumAccountPsswd]", + "ethereumAccountPassphrase": "[steps('EthereumSettings').ethereumAccountPassphrase]", + "consortiumMemberId": "[int(steps('NetworkSize').consortiumMemberIdValue)]", + "numMiningNodes": "[steps('NetworkSize').mnSection.numberOfMiningNodes]", + "mnNodeVMSize": "[coalesce(steps('NetworkSize').mnSection.mnNodeVMSizeHDD, steps('NetworkSize').mnSection.mnNodeVMSizeSSD)]", + "mnStorageAccountType": "[concat(steps('NetworkSize').mnSection.mnStoragePerformance, '_', coalesce(steps('NetworkSize').mnSection.mnStorageReplication-Standard, steps('NetworkSize').mnSection.mnStorageReplication-Premium))]", + "numTXNodes": "[steps('NetworkSize').txSection.numTXNodes]", + "txNodeVMSize": "[coalesce(steps('NetworkSize').txSection.txNodeVMSizeHDD, steps('NetworkSize').txSection.txNodeVMSizeSSD)]", + "txStorageAccountType": "[concat(steps('NetworkSize').txSection.txStoragePerformance, '_', coalesce(steps('NetworkSize').txSection.txStorageReplication-Standard, steps('NetworkSize').txSection.txStorageReplication-Premium))]", + "location": "[location()]", + "genesisBlock": "[steps('EthereumSettings').genesisBlock]" + } + } +} \ No newline at end of file diff --git a/ethereum-consortium-blockchain/marketplace/ConsortiumLeader/mainTemplate.json b/ethereum-consortium-blockchain/marketplace/ConsortiumLeader/mainTemplate.json new file mode 100644 index 0000000..308b964 --- /dev/null +++ b/ethereum-consortium-blockchain/marketplace/ConsortiumLeader/mainTemplate.json @@ -0,0 +1,662 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "namePrefix": { + "type": "string", + "metadata": { + "description": "String used as a base for naming resources (6 alphanumeric characters or less). A unique hash is prepended to the string for some resources, while resource-specific information is appended." + }, + "maxLength": 6 + }, + "authType": { + "type": "string", + "allowedValues": [ + "password", + "sshPublicKey" + ], + "metadata": { + "description": "Authorization type for SSH access to VMs" + } + }, + "adminUsername": { + "type": "string", + "defaultValue": "gethadmin", + "metadata": { + "description": "Administrator username of each deployed VM (alphanumeric characters only)" + } + }, + "adminPassword": { + "type": "securestring", + "defaultValue": "", + "metadata": { + "description": "Administrator password for each deployed VM" + } + }, + "adminSSHKey": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "SSH RSA public key file as a string" + } + }, + "genesisBlock": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Genesis Block for the network" + } + }, + "ethereumAccountPsswd": { + "type": "securestring", + "defaultValue": "", + "metadata": { + "description": "Password used to secure the default Ethereum account that will be generated" + } + }, + "ethereumAccountPassphrase": { + "type": "securestring", + "defaultValue": "", + "metadata": { + "description": "Password used to generate the private key associated with the default Ethereum account that is generated. Consider a password with sufficient randomness to ensure a strong private key" + } + }, + "ethereumNetworkID": { + "type": "int", + "defaultValue": 72, + "metadata": { + "description": "Private Ethereum network ID to which to connect (max 9 digit number)" + }, + "maxValue": 2147483647 + }, + "consortiumMemberId": { + "type": "int", + "defaultValue": 0, + "metadata": { + "description": "Unique Identifier for the current member of this consortium" + }, + "minValue": 0, + "maxValue": 255 + }, + "numMiningNodes": { + "type": "int", + "defaultValue": 2, + "metadata": { + "description": "Number of mining nodes to create for each consortium member." + }, + "minValue": 1, + "maxValue": 15 + }, + "mnNodeVMSize": { + "type": "string", + "defaultValue": "Standard_A1", + "allowedValues": [], + "metadata": { + "description": "Size of the virtual machine used for mining nodes" + } + }, + "mnStorageAccountType": { + "type": "string", + "defaultValue": "Standard_LRS", + "allowedValues": [ + "Standard_LRS", + "Standard_GRS", + "Standard_RAGRS", + "Premium_LRS" + ], + "metadata": { + "description": "Type of storage accounts to create" + } + }, + "numTXNodes": { + "type": "int", + "defaultValue": 1, + "metadata": { + "description": "Number of load balanced transaction nodes" + }, + "minValue": 1, + "maxValue": 5 + }, + "txNodeVMSize": { + "type": "string", + "defaultValue": "Standard_A1", + "allowedValues": [], + "metadata": { + "description": "Size of the virtual machine for transaction nodes" + } + }, + "txStorageAccountType": { + "type": "string", + "defaultValue": "Standard_LRS", + "allowedValues": [ + "Standard_LRS", + "Standard_GRS", + "Standard_RAGRS", + "Premium_LRS" + ], + "metadata": { + "description": "Type of storage accounts to create" + } + }, + "baseUrl": { + "type": "string", + "metadata": { + "description": "The base URL for dependent assets", + "artifactsBaseUrl": "" + }, + "defaultValue": "https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/ethereum-consortium-blockchain" + } + }, + "variables": { + "adminHash": "[uniqueString(parameters('adminPassword'))]", + "apiVersionRouteTables": "2015-06-15", + "apiVersionDeployments": "2015-01-01", + "apiVersionStorageAccounts": "2015-06-15", + "apiVersionAvailabilitySets": "2016-03-30", + "apiVersionNetworkSecurityGroups": "2015-06-15", + "apiVersionNetworkInterfaces": "2015-06-15", + "apiVersionVirtualMachines": "2015-06-15", + "apiVersionVirtualNetworks": "2015-06-15", + "namingInfix": "[toLower(substring(concat(parameters('namePrefix'), uniqueString(resourceGroup().id)), 0, 9))]", + "availabilitySetName": "[concat(variables('namingInfix'), 'AvSet')]", + "httpPort": 80, + "adminSitePort": 3000, + "sshPort": 22, + "sshNATFrontEndStartingPort": 3000, + "genesisBlock": "[parameters('genesisBlock')]", + "gethRPCPort": 8545, + "gethIPCPort": 30303, + "routeTableName": "NVARouteTable", + "loadBalancerName": "[concat(variables('namingInfix'), '-LB')]", + "routeTableName": "VNARouteTable", + "loadBalancerName": "[concat(variables('namingInfix'), '-LB')]", + "loadBalancerBackendAddressPoolName": "LoadBalancerBackend1", + "loadBalancerInboundNatRuleNamePrefix": "SSH-VM", + "location": "[resourceGroup().location]", + "numMNNodes": "[parameters('numMiningNodes')]", + "maxVMsPerStorageAcct": 20, + "mnStorageAcctCount": "[add(div(variables('numMNNodes'), variables('maxVMsPerStorageAcct')), 1)]", + "mnStorageAcctNames": [ + "[concat(uniqueString(resourceGroup().id, variables('namingInfix')), 'mn0')]" + ], + "nvaNICName": "nic-nva", + "nvaVMName": "[concat(variables('namingInfix'), '-nva')]", + "nvaStorageAcctName": "[concat(uniqueString(resourceGroup().id, variables('namingInfix')), 'nva')]", + "nvaStorageAccountType": "Standard_LRS", + "nvaNodeVMSize": "Standard_A1", + "nvaPublicIpName": "nvaPip", + "nvaSubnetName": "[concat(uniqueString(concat(resourceGroup().id, concat(variables('namingInfix'), 'subnet')), 'nva'))]", + "nvaSubnetPrefix": "[replace('10._.14.0/27','_', string(parameters('consortiumMemberId')))]", + "nvaNetPrefix": "10.0.0.0/12", + "mnVMNamePrefix": "[concat(variables('namingInfix'), '-mn')]", + "mnNICPrefix": "nic-mn", + "vnaNICName": "nic-vna", + "vnaVMName": "[concat(variables('namingInfix'), '-vna')]", + "vnaStorageAcctName": "[concat(uniqueString(resourceGroup().id, variables('namingInfix')), 'vna')]", + "vnaStorageAccountType": "Standard_LRS", + "vnaNodeVMSize": "Standard_A1", + "vnaPublicIpName": "vnaPip", + "vnaSubnetName": "[concat(uniqueString(concat(resourceGroup().id, concat(variables('namingInfix'), 'subnet')), 'vna'))]", + "vnaSubnetPrefix": "[replace('10._.14.0/27','_', string(parameters('consortiumMemberId')))]", + "vnaNetPrefix": "10.0.0.0/12", + "mnVMNamePrefix": "[concat(variables('namingInfix'), '-mn')]", + "mnNICPrefix": "nic-mn", + "txStorageAcctName": "[concat(uniqueString(resourceGroup().id, variables('namingInfix')), 'tx')]", + "txVMNamePrefix": "[concat(variables('namingInfix'), '-tx')]", + "txSubnetName": "[concat(uniqueString(concat(resourceGroup().id, concat(variables('namingInfix'), 'subnet')), 'tx'))]", + "txSubnetPrefix": "[replace('10._.0.0/24','_', string(parameters('consortiumMemberId')))]", + "txNIPrefix": "nic-tx", + "txNsgName": "[concat(variables('namingInfix'), 'TXNsg')]", + "mnNsgName": "[concat(variables('namingInfix'), 'MNNsg')]", + "mnSubnetName": "[concat(uniqueString(resourceGroup().id, variables('namingInfix')), 'snet-mn0')]", + "mnSubnetPrefix": "[replace('10._.1.0/24','_', string(parameters('consortiumMemberId')))]", + "numSubnets": 3, + "subnetPropertiesArray": [ + { + "name": "[variables('txSubnetName')]", + "properties": { + "addressPrefix": "[variables('txSubnetPrefix')]", + "routeTable": { + "id": "[resourceId ('Microsoft.Network/routeTables', variables('routeTableName'))]" + }, + "networkSecurityGroup": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('txNsgName'))]" + } + } + }, + { + "name": "[variables('mnSubnetName')]", + "properties": { + "addressPrefix": "[variables('mnSubnetPrefix')]", + "routeTable": { + "id": "[resourceId ('Microsoft.Network/routeTables', variables('routeTableName'))]" + }, + "networkSecurityGroup": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('mnNsgName'))]" + } + } + }, + { + "name": "[variables('nvaSubnetName')]", + "properties": { + "addressPrefix": "[replace('10._.14.0/27','_',string(parameters('consortiumMemberId')))]" + } + } + ], + "ubuntuImage": { + "publisher": "Canonical", + "offer": "UbuntuServer", + "sku": "16.04-LTS", + "version": "latest" + }, + "windowsImage": { + "publisher": "MicrosoftWindowsServer", + "offer": "WindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "vNet": { + "name": "[concat(variables('namingInfix'), 'vnet')]", + "addressSpacePrefix": "[replace('10._.0.0/20', '_',string(parameters('consortiumMemberId')))]", + "asn": "[add(parameters('consortiumMemberId'),65050)]" + }, + "vnetRef": "[resourceId('Microsoft.Network/virtualNetworks',variables('vNet').name)]", + "vnetID": "[resourceId('Microsoft.Network/virtualNetworks', variables('vNet').name)]", + "txSubnetRef": "[concat(variables('vnetID'),'/subnets/', variables('txSubnetName'))]", + "mnSubnetRefArray": [ + "[concat(variables('vnetID'),'/subnets/', variables('mnSubnetName'))]" + ], + "nvaSubnetRef": "[concat(variables('vnetID'),'/subnets/', variables('nvaSubnetName'))]" + }, + "resources": [ + { + "apiVersion": "[variables('apiVersionAvailabilitySets')]", + "type": "Microsoft.Compute/availabilitySets", + "name": "[variables('availabilitySetName')]", + "location": "[variables('location')]", + "properties": {} + }, + { + "apiVersion": "[variables('apiVersionRouteTables')]", + "type": "Microsoft.Network/routeTables", + "name": "[variables('routeTableName')]", + "location": "[variables('location')]", + "properties": {} + }, + { + "apiVersion": "[variables('apiVersionDeployments')]", + "name": "loadBalancerLinkedTemplate", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "incremental", + "templateLink": { + "uri": "[concat(parameters('baseUrl'), '/nested/loadBalancer.json')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "loadBalancerName": { "value": "[variables('loadBalancerName')]" }, + "dnsHostName": { "value": "[variables('namingInfix')]" }, + "loadBalancerBackendAddressPoolName": { "value": "[variables('loadBalancerBackendAddressPoolName')]" }, + "loadBalancerInboundNatRuleNamePrefix": { "value": "[variables('loadBalancerInboundNatRuleNamePrefix')]" }, + "frontendPort1": { "value": "[variables('httpPort')]" }, + "backendPort1": { "value": "[variables('adminSitePort')]" }, + "frontendPort2": { "value": "[variables('gethRPCPort')]" }, + "backendPort2": { "value": "[variables('gethRPCPort')]" }, + "numInboundNATRules": { "value": "[parameters('numTXNodes')]" }, + "inboundNATRuleFrontendStartingPort": { "value": "[variables('sshNATFrontEndStartingPort')]" }, + "inboundNATRuleBackendPort": { "value": "[variables('sshPort')]" }, + "location": { "value": "[variables('location')]" } + } + } + }, + { + "apiVersion": "[variables('apiVersionNetworkSecurityGroups')]", + "type": "Microsoft.Network/networkSecurityGroups", + "name": "[variables('mnNsgName')]", + "location": "[variables('location')]", + "tags": { + "displayName": "NSG - Mining (MN)" + }, + "properties": { + "securityRules": [ + { + "name": "allow-nva-bootnodes", + "properties": { + "description": "Allows NVA Bootnodes access", + "protocol": "*", + "sourcePortRange": "*", + "destinationPortRange": "[variables('gethIPCPort')]", + "sourceAddressPrefix": "[variables('vNet').addressSpacePrefix]", + "destinationAddressPrefix": "[variables('nvaNetPrefix')]", + "access": "Allow", + "priority": 100, + "direction": "Outbound" + } + }, + { + "name": "block-internet-bootnodes", + "properties": { + "description": "Block Internet Bootnodes", + "protocol": "*", + "sourcePortRange": "*", + "destinationPortRange": "[variables('gethIPCPort')]", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "Internet", + "access": "Deny", + "priority": 101, + "direction": "Outbound" + } + }, + { + "name": "allow-nva-inbound", + "properties": { + "description": "Allow NVA inbound access", + "protocol": "*", + "sourcePortRange": "*", + "destinationPortRange": "*", + "sourceAddressPrefix": "[variables('nvaNetPrefix')]", + "destinationAddressPrefix": "[variables('vNet').addressSpacePrefix]", + "access": "Allow", + "priority": 100, + "direction": "Inbound" + } + } + ] + } + }, + { + "apiVersion": "[variables('apiVersionNetworkSecurityGroups')]", + "type": "Microsoft.Network/networkSecurityGroups", + "name": "[variables('txNsgName')]", + "location": "[variables('location')]", + "tags": { + "displayName": "NSG - Transaction (TX)" + }, + "properties": { + "securityRules": [ + { + "name": "allow-ssh", + "properties": { + "description": "Allow SSH", + "protocol": "*", + "sourcePortRange": "*", + "destinationPortRange": "22", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": 100, + "direction": "Inbound" + } + }, + { + "name": "allow-geth-rpc", + "properties": { + "description": "Allow geth RPC", + "protocol": "*", + "sourcePortRange": "*", + "destinationPortRange": "8545", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": 101, + "direction": "Inbound" + } + }, + { + "name": "allow-etheradmin", + "properties": { + "description": "Allow etheradmin web service", + "protocol": "*", + "sourcePortRange": "*", + "destinationPortRange": "3000", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": 102, + "direction": "Inbound" + } + }, + { + "name": "allow-nva-inbound", + "properties": { + "description": "Allow NVA inbound access", + "protocol": "*", + "sourcePortRange": "*", + "destinationPortRange": "*", + "sourceAddressPrefix": "[variables('nvaNetPrefix')]", + "destinationAddressPrefix": "[variables('vNet').addressSpacePrefix]", + "access": "Allow", + "priority": 103, + "direction": "Inbound" + } + }, + { + "name": "allow-nva-bootnodes", + "properties": { + "description": "Allows NVA Bootnodes access", + "protocol": "*", + "sourcePortRange": "*", + "destinationPortRange": "[variables('gethIPCPort')]", + "sourceAddressPrefix": "[variables('vNet').addressSpacePrefix]", + "destinationAddressPrefix": "[variables('nvaNetPrefix')]", + "access": "Allow", + "priority": 100, + "direction": "Outbound" + } + }, + { + "name": "block-internet-bootnodes", + "properties": { + "description": "Block Internet Bootnodes", + "protocol": "*", + "sourcePortRange": "*", + "destinationPortRange": "[variables('gethIPCPort')]", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "Internet", + "access": "Deny", + "priority": 101, + "direction": "Outbound" + } + } + ] + } + }, + { + "apiVersion": "[variables('apiVersionVirtualNetworks')]", + "type": "Microsoft.Network/virtualNetworks", + "name": "[variables('vNet').name]", + "location": "[variables('location')]", + "dependsOn": [ + "[concat('Microsoft.Network/networkSecurityGroups/', variables('txNsgName'))]", + "[concat('Microsoft.Network/networkSecurityGroups/', variables('mnNsgName'))]", + "[concat('Microsoft.Network/routeTables/', variables('routeTableName'))]" + ], + "properties": { + "addressSpace": { + "addressPrefixes": [ + "[variables('vNet').addressSpacePrefix]" + ] + }, + "subnets": "[take(variables('subnetPropertiesArray'), variables('numSubnets'))]" + } + }, + { + "apiVersion": "[variables('apiVersionDeployments')]", + "name": "txVMLinkedTemplate", + "type": "Microsoft.Resources/deployments", + "dependsOn": [ + "[concat('Microsoft.Network/virtualNetworks/', variables('vNet').name)]", + "[concat('Microsoft.Compute/availabilitySets/', variables('availabilitySetName'))]", + "loadBalancerLinkedTemplate" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(parameters('baseUrl'), '/nested/txVMAuth', '-', parameters('authType'), '.json')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "apiVersionVirtualMachines": { "value": "[variables('apiVersionVirtualMachines')]" }, + "apiVersionNetworkInterfaces": { "value": "[variables('apiVersionNetworkInterfaces')]" }, + "apiVersionStorageAccounts": { "value": "[variables('apiVersionStorageAccounts')]" }, + "loadBalancerName": { "value": "[variables('loadBalancerName')]" }, + "loadBalancerBackendAddressPoolName": { "value": "[variables('loadBalancerBackendAddressPoolName')]" }, + "loadBalancerInboundNatRuleNamePrefix": { "value": "[variables('loadBalancerInboundNatRuleNamePrefix')]" }, + "txSubnetRef": { "value": "[variables('txSubnetRef')]" }, + "txVMNamePrefix": { "value": "[variables('txVMNamePrefix')]" }, + "numTXNodes": { "value": "[parameters('numTXNodes')]" }, + "txStorageAcctName": { "value": "[variables('txStorageAcctName')]" }, + "txNIPrefix": { "value": "[variables('txNIPrefix')]" }, + "storageAccountType": { "value": "[parameters('txStorageAccountType')]" }, + "availabilitySetName": { "value": "[variables('availabilitySetName')]" }, + "txNodeVMSize": { "value": "[parameters('txNodeVMSize')]" }, + "adminUsername": { "value": "[parameters('adminUsername')]" }, + "adminPassword": { "value": "[parameters('adminPassword')]" }, + "adminSSHKey": { "value": "[parameters('adminSSHKey')]" }, + "ubuntuImage": { "value": "[variables('ubuntuImage')]" }, + "namingInfix": { "value": "[variables('namingInfix')]" }, + "location": { "value": "[variables('location')]" } + } + } + }, + { + "apiVersion": "[variables('apiVersionDeployments')]", + "name": "mnVMLinkedTemplate", + "type": "Microsoft.Resources/deployments", + "dependsOn": [ + "[concat('Microsoft.Network/virtualNetworks/', variables('vNet').name)]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(parameters('baseUrl'), '/nested/mnVMAuth', '-', parameters('authType'), '.json')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "apiVersionVirtualMachines": { "value": "[variables('apiVersionVirtualMachines')]" }, + "apiVersionNetworkInterfaces": { "value": "[variables('apiVersionNetworkInterfaces')]" }, + "apiVersionStorageAccounts": { "value": "[variables('apiVersionStorageAccounts')]" }, + "mnVMNamePrefix": { "value": "[variables('mnVMNamePrefix')]" }, + "numMNNodes": { "value": "[variables('numMNNodes')]" }, + "mnNICPrefix": { "value": "[variables('mnNICPrefix')]" }, + "mnStorageAcctNames": { "value": "[variables('mnStorageAcctNames')]" }, + "mnStorageAcctCount": { "value": "[variables('mnStorageAcctCount')]" }, + "mnSubnetRefArray": { "value": "[variables('mnSubnetRefArray')]" }, + "numConsortiumMembers": { "value": 1 }, + "storageAccountType": { "value": "[parameters('mnStorageAccountType')]" }, + "mnNodeVMSize": { "value": "[parameters('mnNodeVMSize')]" }, + "adminUsername": { "value": "[parameters('adminUsername')]" }, + "adminPassword": { "value": "[parameters('adminPassword')]" }, + "adminSSHKey": { "value": "[parameters('adminSSHKey')]" }, + "ubuntuImage": { "value": "[variables('ubuntuImage')]" }, + "namingInfix": { "value": "[variables('namingInfix')]" }, + "location": { "value": "[variables('location')]" } + } + } + }, + { + "apiVersion": "[variables('apiVersionDeployments')]", + "name": "nvaResources", + "type": "Microsoft.Resources/deployments", + "dependsOn": [ + "[concat('Microsoft.Network/virtualNetworks/', variables('vNet').name)]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(parameters('baseUrl'), '/nested/networkVirtualAppliance.json')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "apiVersionVirtualMachines": { "value": "[variables('apiVersionVirtualMachines')]" }, + "apiVersionNetworkInterfaces": { "value": "[variables('apiVersionNetworkInterfaces')]" }, + "apiVersionStorageAccounts": { "value": "[variables('apiVersionStorageAccounts')]" }, + "nvaVMName": { "value": "[variables('nvaVMName')]" }, + "nvaNICName": { "value": "[variables('nvaNICName')]" }, + "nvaStorageAcctName": { "value": "[variables('nvaStorageAcctName')]" }, + "nvaSubnetRef": { "value": "[variables('nvaSubnetRef')]" }, + "storageAccountType": { "value": "[variables('nvaStorageAccountType')]" }, + "nvaNodeVMSize": { "value": "[variables('nvaNodeVMSize')]" }, + "adminUsername": { "value": "[parameters('adminUsername')]" }, + "adminPassword": { "value": "[parameters('adminPassword')]" }, + "windowsImage": { "value": "[variables('windowsImage')]" }, + "namingInfix": { "value": "[variables('namingInfix')]" }, + "nvaPublicIpName": { "value": "[variables('nvaPublicIpName')]" }, + "location": { "value": "[variables('location')]" } + } + } + }, + { + "apiVersion": "[variables('apiVersionDeployments')]", + "name": "vmExtensionLinkedTemplate", + "type": "Microsoft.Resources/deployments", + "dependsOn": [ + "txVMLinkedTemplate", + "mnVMLinkedTemplate" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(parameters('baseUrl'), '/nested/vmExtension.json')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "numBootNodes": { "value": 2 }, + "txVMNamePrefix": { "value": "[variables('txVMNamePrefix')]" }, + "numTXNodes": { "value": "[parameters('numTXNodes')]" }, + "mnVMNamePrefix": { "value": "[variables('mnVMNamePrefix')]" }, + "numMNNodes": { "value": "[variables('numMNNodes')]" }, + "artifactsLocationURL": { "value": "[parameters('baseUrl')]" }, + "adminUsername": { "value": "[parameters('adminUsername')]" }, + "ethereumAccountPsswd": { "value": "[parameters('ethereumAccountPsswd')]" }, + "ethereumAccountPassphrase": { "value": "[parameters('ethereumAccountPassphrase')]" }, + "ethereumNetworkID": { "value": "[parameters('ethereumNetworkID')]" }, + "consortiumMemberId": { "value": "[parameters('consortiumMemberId')]" }, + "gethIPCPort": { "value": "[variables('gethIPCPort')]" }, + "adminSitePort": { "value": "[variables('adminSitePort')]" }, + "location": { "value": "[variables('location')]" }, + "genesisBlock": { "value": "[variables('genesisBlock')]" }, + "adminHash": { "value": "[variables('adminHash')]" } + } + } + } + ], + "outputs": { + "admin-site": { + "type": "string", + "value": "[concat('http://', reference('loadBalancerLinkedTemplate').outputs.fqdn.value)]" + }, + "ethereum-rpc-endpoint": { + "type": "string", + "value": "[concat('http://', reference('loadBalancerLinkedTemplate').outputs.fqdn.value, ':', variables('gethRPCPort'))]" + }, + "ssh-to-first-tx-node": { + "type": "string", + "value": "[concat('ssh -p ', variables('sshNATFrontEndStartingPort'), ' ', parameters('adminUsername'), '@', reference('loadBalancerLinkedTemplate').outputs.fqdn.value)]" + }, + "consortium-data": { + "type": "string", + "value": "[concat('http://', reference('loadBalancerLinkedTemplate').outputs.fqdn.value)]" + }, + "member-nva-ipaddress": { + "type": "string", + "value": "[reference('nvaResources').outputs.nvaPrivateIpAddress.value]" + }, + "member-nva-public-ipaddress": { + "type": "string", + "value": "[reference('nvaResources').outputs.nvaPublicIpAddress.value]" + }, + "member-vnet-address-space": { + "type": "string", + "value": "[string(reference(variables('vNet').name).AddressSpace.AddressPrefixes[0])]" + }, + "member-prefix": { + "type": "string", + "value": "[variables('namingInfix')]" + }, + "member-routetable-name": { + "type": "string", + "value": "[variables('routeTableName')]" + } + } +} \ No newline at end of file diff --git a/ethereum-consortium-blockchain/marketplace/JoiningMember/createUiDefinition.json b/ethereum-consortium-blockchain/marketplace/JoiningMember/createUiDefinition.json new file mode 100644 index 0000000..797859d --- /dev/null +++ b/ethereum-consortium-blockchain/marketplace/JoiningMember/createUiDefinition.json @@ -0,0 +1,600 @@ +{ + "handler": "Microsoft.Compute.MultiVm", + "version": "0.0.1-preview", + "parameters": { + "basics": [ + { + "name": "namePrefix", + "type": "Microsoft.Common.TextBox", + "label": "Resource prefix", + "toolTip": "String used as a base for naming resources (6 alphanumeric characters or less). A unique hash is prepended to the string for some resources, while resource-specific information is appended.", + "constraints": { + "required": true, + "regex": "^[a-z][a-z0-9-]{1,5}$", + "validationMessage": "Resource prefix must be between 2 and 6 characters long, must begin with a lowercase letter, and can contain only numbers and lowercase letters." + } + }, + { + "name": "adminUsername", + "type": "Microsoft.Compute.UserNameTextBox", + "label": "VM user name", + "defaultValue": "gethadmin", + "toolTip": "Admin username for all of the deployed virtual machines.", + "osPlatform": "Linux" + }, + { + "name": "adminCredentials", + "type": "Microsoft.Compute.CredentialsCombo", + "label": { + "authenticationType": "Authentication type", + "password": "Password", + "confirmPassword": "Confirm password", + "sshPublicKey": "SSH public key" + }, + "toolTip": { + "authenticationType": "", + "password": "VM password must be 12 characters and have 3 of the following: 1 lower case character, 1 upper case character, 1 number, and 1 special character.", + "sshPublicKey": "" + }, + "constraints": { + "required": true + }, + "options": { + "hideConfirmation": false + }, + "osPlatform": "Linux" + } + ], + "steps": [ + { + "name": "NetworkSize", + "label": "Network size and performance", + "subLabel": { + "preValidation": "Define the number and size and nodes in the network", + "postValidation": "Done" + }, + "bladeTitle": "Network Size and Performance", + "elements": [ + { + "name": "consortiumMemberIdValue", + "type": "Microsoft.Common.TextBox", + "label": "Consortium Member Id", + "toolTip": "The Id associated with each member participating in the consortium network. Member Id should be unique across different members in the same network.", + "constraints": { + "required": true, + "regex": "^(?:25[0-5]|2[0-4]\\d|[01]\\d\\d|\\d?\\d)$", + "validationMessage": "Must be between 0 and 255" + }, + "visible": "true" + }, + { + "name": "mnSection", + "type": "Microsoft.Common.Section", + "label": "Mining Nodes", + "elements": [ + { + "name": "numberOfMiningNodes", + "type": "Microsoft.Common.DropDown", + "label": "Number of mining nodes per member", + "defaultValue": "2", + "toolTip": "Mining nodes record transactions within a blockchain network. Choose the number of nodes that meet your availability and security requirements.", + "constraints": { + "allowedValues": [ + { + "label": "2", + "value": 2 + }, + { + "label": "3", + "value": 3 + }, + { + "label": "4", + "value": 4 + }, + { + "label": "5", + "value": 5 + }, + { + "label": "6", + "value": 6 + }, + { + "label": "7", + "value": 7 + }, + { + "label": "8", + "value": 8 + }, + { + "label": "9", + "value": 9 + }, + { + "label": "10", + "value": 10 + }, + { + "label": "11", + "value": 11 + }, + { + "label": "12", + "value": 12 + }, + { + "label": "13", + "value": 13 + }, + { + "label": "14", + "value": 14 + }, + { + "label": "15", + "value": 15 + } + ] + }, + "visible": true + }, + { + "name": "mnStoragePerformance", + "type": "Microsoft.Common.OptionsGroup", + "label": "Mining node storage performance", + "defaultValue": "Standard", + "toolTip": "Standard storage is backed by magnetic drives and provides the lowest cost per GB. Premium storage accounts are backed by solid state drives and offer consistent, low-latency performance. They can only be used with Azure virtual machine disks, and are best for I/O-intensive applications. This setting can't be changed after the storage account is created. [Learn more](https://azure.microsoft.com/documentation/articles/storage-introduction/#introducing-the-azure-storage-services)", + "constraints": { + "allowedValues": [ + { + "label": "Standard", + "value": "Standard" + }, + { + "label": "Premium", + "value": "Premium" + } + ] + }, + "visible": true + }, + { + "name": "mnStorageReplication-Standard", + "type": "Microsoft.Common.DropDown", + "label": "Mining node storage replication", + "defaultValue": "Locally-redundant storage (LRS)", + "toolTip": "Data Azure storage is always replicated to ensure durability and high availability. Choose a replication strategy that matches your durability requirements. Some settings can't be changed after the storage account is created. [Learn more](https://azure.microsoft.com/documentation/articles/storage-redundancy/)", + "constraints": { + "allowedValues": [ + { + "label": "Locally-redundant storage (LRS)", + "value": "LRS" + }, + { + "label": "Geo-redundant storage (GRS)", + "value": "GRS" + }, + { + "label": "Read-access geo-redundant storage (RAGRS)", + "value": "RAGRS" + } + ] + }, + "visible": "[equals(steps('NetworkSize').mnSection.mnStoragePerformance, 'Standard')]" + }, + { + "name": "mnStorageReplication-Premium", + "type": "Microsoft.Common.DropDown", + "label": "Mining node storage replication", + "defaultValue": "Locally-redundant storage (LRS)", + "toolTip": "Data Azure storage is always replicated to ensure durability and high availability. Choose a replication strategy that matches your durability requirements. Some settings can't be changed after the storage account is created. [Learn more](https://azure.microsoft.com/documentation/articles/storage-redundancy/)", + "constraints": { + "allowedValues": [ + { + "label": "Locally-redundant storage (LRS)", + "value": "LRS" + } + ] + }, + "visible": "[equals(steps('NetworkSize').mnSection.mnStoragePerformance, 'Premium')]" + }, + { + "name": "mnNodeVMSizeHDD", + "type": "Microsoft.Compute.SizeSelector", + "label": "Mining node virtual machine size", + "toolTip": "", + "recommendedSizes": [ + "Standard_D1_v2", + "Standard_D1", + "Standard_A1" + ], + "constraints": { + "allowedSizes": [ + "Standard_A1", + "Standard_A2", + "Standard_A3", + "Standard_A4", + "Standard_A5", + "Standard_A6", + "Standard_A7", + "Standard_A8", + "Standard_A9", + "Standard_A10", + "Standard_A11", + "Standard_D1", + "Standard_D2", + "Standard_D3", + "Standard_D4", + "Standard_D11", + "Standard_D12", + "Standard_D13", + "Standard_D14", + "Standard_D1_v2", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F1", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16" + ], + "excludedSizes": [] + }, + "osPlatform": "Linux", + "count": "[steps('NetworkSize').mnSection.numberOfMiningNodes]", + "visible": "[equals(steps('NetworkSize').mnSection.mnStoragePerformance, 'Standard')]" + }, + { + "name": "mnNodeVMSizeSSD", + "type": "Microsoft.Compute.SizeSelector", + "label": "Mining node virtual machine size", + "toolTip": "", + "recommendedSizes": [ + "Standard_DS1_v2", + "Standard_DS1", + "Standard_F1s" + ], + "constraints": { + "allowedSizes": [ + "Standard_DS1", + "Standard_DS2", + "Standard_DS3", + "Standard_DS4", + "Standard_DS11", + "Standard_DS12", + "Standard_DS13", + "Standard_DS14", + "Standard_DS1_v2", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2", + "Standard_F1s", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s" + ], + "excludedSizes": [] + }, + "osPlatform": "Linux", + "count": "[steps('NetworkSize').mnSection.numberOfMiningNodes]", + "visible": "[equals(steps('NetworkSize').mnSection.mnStoragePerformance, 'Premium')]" + } + ] + }, + { + "name": "txSection", + "type": "Microsoft.Common.Section", + "label": "Transaction Nodes", + "elements": [ + { + "name": "numTXNodes", + "type": "Microsoft.Common.DropDown", + "label": "Number of load balanced transaction nodes", + "defaultValue": "1", + "toolTip": "An application or user interacts with a load balanced set of transaction nodes to submit transactions to the network. Choose the number of nodes that meets your availability requirements.", + "constraints": { + "allowedValues": [ + { + "label": "1", + "value": 1 + }, + { + "label": "2", + "value": 2 + }, + { + "label": "3", + "value": 3 + }, + { + "label": "4", + "value": 4 + }, + { + "label": "5", + "value": 5 + } + ] + }, + "visible": true + }, + { + "name": "txStoragePerformance", + "type": "Microsoft.Common.OptionsGroup", + "label": "Transaction node storage performance", + "defaultValue": "Standard", + "toolTip": "Standard storage is backed by magnetic drives and provides the lowest cost per GB. Premium storage accounts are backed by solid state drives and offer consistent, low-latency performance. They can only be used with Azure virtual machine disks, and are best for I/O-intensive applications. This setting can't be changed after the storage account is created. [Learn more](https://azure.microsoft.com/documentation/articles/storage-introduction/#introducing-the-azure-storage-services)", + "constraints": { + "allowedValues": [ + { + "label": "Standard", + "value": "Standard" + }, + { + "label": "Premium", + "value": "Premium" + } + ] + }, + "visible": true + }, + { + "name": "txStorageReplication-Standard", + "type": "Microsoft.Common.DropDown", + "label": "Transaction node storage replication", + "defaultValue": "Locally-redundant storage (LRS)", + "toolTip": "Data Azure storage is always replicated to ensure durability and high availability. Choose a replication strategy that matches your durability requirements. Some settings can't be changed after the storage account is created. [Learn more](https://azure.microsoft.com/documentation/articles/storage-redundancy/)", + "constraints": { + "allowedValues": [ + { + "label": "Locally-redundant storage (LRS)", + "value": "LRS" + }, + { + "label": "Geo-redundant storage (GRS)", + "value": "GRS" + }, + { + "label": "Read-access geo-redundant storage (RAGRS)", + "value": "RAGRS" + } + ] + }, + "visible": "[equals(steps('NetworkSize').txSection.txStoragePerformance, 'Standard')]" + }, + { + "name": "txStorageReplication-Premium", + "type": "Microsoft.Common.DropDown", + "label": "Transaction node storage replication", + "defaultValue": "Locally-redundant storage (LRS)", + "toolTip": "Data Azure storage is always replicated to ensure durability and high availability. Choose a replication strategy that matches your durability requirements. Some settings can't be changed after the storage account is created. [Learn more](https://azure.microsoft.com/documentation/articles/storage-redundancy/)", + "constraints": { + "allowedValues": [ + { + "label": "Locally-redundant storage (LRS)", + "value": "LRS" + } + ] + }, + "visible": "[equals(steps('NetworkSize').txSection.txStoragePerformance, 'Premium')]" + }, + { + "name": "txNodeVMSizeHDD", + "type": "Microsoft.Compute.SizeSelector", + "label": "Transaction node virtual machine size", + "toolTip": "", + "recommendedSizes": [ + "Standard_D1_v2", + "Standard_D1", + "Standard_A1" + ], + "constraints": { + "allowedSizes": [ + "Standard_A1", + "Standard_A2", + "Standard_A3", + "Standard_A4", + "Standard_A5", + "Standard_A6", + "Standard_A7", + "Standard_A8", + "Standard_A9", + "Standard_A10", + "Standard_A11", + "Standard_D1", + "Standard_D2", + "Standard_D3", + "Standard_D4", + "Standard_D11", + "Standard_D12", + "Standard_D13", + "Standard_D14", + "Standard_D1_v2", + "Standard_D2_v2", + "Standard_D3_v2", + "Standard_D4_v2", + "Standard_D5_v2", + "Standard_D11_v2", + "Standard_D12_v2", + "Standard_D13_v2", + "Standard_D14_v2", + "Standard_D15_v2", + "Standard_F1", + "Standard_F2", + "Standard_F4", + "Standard_F8", + "Standard_F16" + ], + "excludedSizes": [] + }, + "osPlatform": "Linux", + "count": "[steps('NetworkSize').txSection.numTXNodes]", + "visible": "[equals(steps('NetworkSize').txSection.txStoragePerformance, 'Standard')]" + }, + { + "name": "txNodeVMSizeSSD", + "type": "Microsoft.Compute.SizeSelector", + "label": "Transaction node virtual machine size", + "toolTip": "", + "recommendedSizes": [ + "Standard_DS1_v2", + "Standard_DS1", + "Standard_F1s" + ], + "constraints": { + "allowedSizes": [ + "Standard_DS1", + "Standard_DS2", + "Standard_DS3", + "Standard_DS4", + "Standard_DS11", + "Standard_DS12", + "Standard_DS13", + "Standard_DS14", + "Standard_DS1_v2", + "Standard_DS2_v2", + "Standard_DS3_v2", + "Standard_DS4_v2", + "Standard_DS5_v2", + "Standard_DS11_v2", + "Standard_DS12_v2", + "Standard_DS13_v2", + "Standard_DS14_v2", + "Standard_DS15_v2", + "Standard_F1s", + "Standard_F2s", + "Standard_F4s", + "Standard_F8s", + "Standard_F16s" + ], + "excludedSizes": [] + }, + "osPlatform": "Linux", + "count": "[steps('NetworkSize').txSection.numTXNodes]", + "visible": "[equals(steps('NetworkSize').txSection.txStoragePerformance, 'Premium')]" + } + ] + } + ] + }, + { + "name": "EthereumSettings", + "label": "Ethereum Settings", + "subLabel": { + "preValidation": "Configure the Ethereum nodes", + "postValidation": "Done" + }, + "bladeTitle": "Ethereum Settings", + "elements": [ + { + "name": "consortiumInformation", + "type": "Microsoft.Common.TextBox", + "label": "Consortium Data Location", + "defaultValue": "", + "toolTip": "The URL pointing to consortium configuration data provided by another member's deployment", + "constraints": { + "required": true + }, + "visible": "true" + }, + { + "name": "consortiumMemberGateway", + "type": "Microsoft.Common.TextBox", + "label": "VNet Gateway to Connect to", + "defaultValue": "", + "toolTip": "The resource path of the VNet Gateway to which to connect. This information is provided by an already connected member who has a deployment", + "constraints": { + "required": true + }, + "visible": "true" + }, + { + "name": "connectionSharedKey", + "type": "Microsoft.Common.TextBox", + "label": "Shared Key for Connection", + "defaultValue": "", + "toolTip": "A mixture of letters and numbers, used to establish encryption for the connection. The same shared key must be used in both the virtual network gateways", + "constraints": { + "required": true, + "regex": "^[A-Za-z0-9]{1,128}$", + "validationMessage": "Must only be letters and numbers between 1 and 128 characters." + }, + "visible": "true" + }, + { + "name": "ethereumAccountPsswd", + "type": "Microsoft.Common.PasswordBox", + "label": { + "password": "Ethereum account password", + "confirmPassword": "Confirm password" + }, + "toolTip": "Password used to secure the default Ethereum account that will be generated.", + "constraints": { + "required": true, + "regex": "^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])[^\"]{12,}$", + "validationMessage": "Password must be 12 characters or more with a minimum of 1 lower case, 1 upper case and one number. Double quotes are not allowed." + }, + "options": { + "hideConfirmation": false + }, + "visible": true + }, + { + "name": "ethereumAccountPassphrase", + "type": "Microsoft.Common.PasswordBox", + "label": { + "password": "Ethereum private key passphrase", + "confirmPassword": "Confirm passphrase" + }, + "toolTip": "Passphrase used to generate the private key associated with the default Ethereum account that is generated. Consider a passphrase with sufficient randomness to ensure a strong private key.", + "constraints": { + "required": true, + "regex": "^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])[^\"]{12,}$", + "validationMessage": "Password must be 12 characters or more with a minimum of 1 lower case, 1 upper case and one number. Double quotes are not allowed." + }, + "options": { + "hideConfirmation": false + }, + "visible": true + } + ] + } + ], + "outputs": { + "namePrefix": "[basics('namePrefix')]", + "authType": "[basics('adminCredentials').authenticationType]", + "adminUsername": "[basics('adminUsername')]", + "adminPassword": "[basics('adminCredentials').password]", + "adminSSHKey": "[basics('adminCredentials').sshPublicKey]", + "ethereumAccountPsswd": "[steps('EthereumSettings').ethereumAccountPsswd]", + "ethereumAccountPassphrase": "[steps('EthereumSettings').ethereumAccountPassphrase]", + "consortiumMemberId": "[int(steps('NetworkSize').consortiumMemberIdValue)]", + "numMiningNodes": "[steps('NetworkSize').mnSection.numberOfMiningNodes]", + "mnNodeVMSize": "[coalesce(steps('NetworkSize').mnSection.mnNodeVMSizeHDD, steps('NetworkSize').mnSection.mnNodeVMSizeSSD)]", + "mnStorageAccountType": "[concat(steps('NetworkSize').mnSection.mnStoragePerformance, '_', coalesce(steps('NetworkSize').mnSection.mnStorageReplication-Standard, steps('NetworkSize').mnSection.mnStorageReplication-Premium))]", + "numTXNodes": "[steps('NetworkSize').txSection.numTXNodes]", + "txNodeVMSize": "[coalesce(steps('NetworkSize').txSection.txNodeVMSizeHDD, steps('NetworkSize').txSection.txNodeVMSizeSSD)]", + "txStorageAccountType": "[concat(steps('NetworkSize').txSection.txStoragePerformance, '_', coalesce(steps('NetworkSize').txSection.txStorageReplication-Standard, steps('NetworkSize').txSection.txStorageReplication-Premium))]", + "consortiumData": "[steps('EthereumSettings').consortiumInformation]", + "location": "[location()]", + "consortiumMemberGateway": "[steps('EthereumSettings').consortiumMemberGateway]", + "connectionSharedKey": "[steps('EthereumSettings').connectionSharedKey]" + } + } +} diff --git a/ethereum-consortium-blockchain/marketplace/JoiningMember/mainTemplate.json b/ethereum-consortium-blockchain/marketplace/JoiningMember/mainTemplate.json new file mode 100644 index 0000000..70fe3bc --- /dev/null +++ b/ethereum-consortium-blockchain/marketplace/JoiningMember/mainTemplate.json @@ -0,0 +1,720 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "namePrefix": { + "type": "string", + "metadata": { + "description": "String used as a base for naming resources (6 alphanumeric characters or less). A unique hash is prepended to the string for some resources, while resource-specific information is appended." + }, + "maxLength": 6 + }, + "authType": { + "type": "string", + "allowedValues": [ + "password", + "sshPublicKey" + ], + "metadata": { + "description": "Authorization type for SSH access to VMs" + } + }, + "adminUsername": { + "type": "string", + "defaultValue": "gethadmin", + "metadata": { + "description": "Administrator username of each deployed VM (alphanumeric characters only)" + } + }, + "adminPassword": { + "type": "securestring", + "defaultValue": "", + "metadata": { + "description": "Administrator password for each deployed VM" + } + }, + "adminSSHKey": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "SSH RSA public key file as a string" + } + }, + "ethereumAccountPsswd": { + "type": "securestring", + "metadata": { + "description": "Password used to secure the default Ethereum account that will be generated" + } + }, + "ethereumAccountPassphrase": { + "type": "securestring", + "metadata": { + "description": "Password used to generate the private key associated with the default Ethereum account that is generated. Consider a password with sufficient randomness to ensure a strong private key" + } + }, + "consortiumMemberId": { + "type": "int", + "metadata": { + "description": "Unique Identifier for the current member of this consortium" + }, + "minValue": 0, + "maxValue": 255 + }, + "numMiningNodes": { + "type": "int", + "defaultValue": 2, + "metadata": { + "description": "Number of mining nodes to create for each consortium member." + }, + "minValue": 2, + "maxValue": 15 + }, + "mnNodeVMSize": { + "type": "string", + "defaultValue": "Standard_A1", + "allowedValues": [], + "metadata": { + "description": "Size of the virtual machine used for mining nodes" + } + }, + "mnStorageAccountType": { + "type": "string", + "defaultValue": "Standard_LRS", + "allowedValues": [ + "Standard_LRS", + "Standard_GRS", + "Standard_RAGRS", + "Premium_LRS" + ], + "metadata": { + "description": "Type of storage accounts to create" + } + }, + "numTXNodes": { + "type": "int", + "defaultValue": 1, + "metadata": { + "description": "Number of load balanced transaction nodes" + }, + "minValue": 1, + "maxValue": 5 + }, + "txNodeVMSize": { + "type": "string", + "defaultValue": "Standard_A1", + "allowedValues": [], + "metadata": { + "description": "Size of the virtual machine for transaction nodes" + } + }, + "txStorageAccountType": { + "type": "string", + "defaultValue": "Standard_LRS", + "allowedValues": [ + "Standard_LRS", + "Standard_GRS", + "Standard_RAGRS", + "Premium_LRS" + ], + "metadata": { + "description": "Type of storage accounts to create" + } + }, + "consortiumData": { + "type": "string", + "metadata": { + "description": "The URL pointing to the consortium configuration data provided by another member's deployment" + } + }, + "RemoteMemberVnetAddressSpace": { + "type": "string", + "metadata": { + "description": "The Address Space of the Consortium Member VNet to connect to" + } + }, + "RemoteMemberNVAPublicIP": { + "type": "string", + "metadata": { + "description": "The Public IP address of the Consortium Member NVA to connect to" + } + }, + "connectionSharedKey": { + "type": "string", + "metadata": { + "description": "Shared Key for the Gateway Connection" + } + }, + "baseUrl": { + "type": "string", + "metadata": { + "description": "The base URL for dependent assets", + "artifactsBaseUrl": "" + }, + "defaultValue": "https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/ethereum-consortium-blockchain" + } + }, + "variables": { + "apiVersionRouteTables": "2015-06-15", + "apiVersionDeployments": "2016-02-01", + "apiVersionStorageAccounts": "2015-06-15", + "apiVersionAvailabilitySets": "2016-03-30", + "apiVersionNetworkSecurityGroups": "2015-06-15", + "apiVersionNetworkInterfaces": "2015-06-15", + "apiVersionVirtualMachines": "2015-06-15", + "apiVersionVirtualNetworks": "2015-06-15", + "namingInfix": "[toLower(substring(concat(parameters('namePrefix'), uniqueString(resourceGroup().id)), 0, 9))]", + "availabilitySetName": "[concat(variables('namingInfix'), 'AvSet')]", + "httpPort": 80, + "adminSitePort": 3000, + "sshPort": 22, + "sshNATFrontEndStartingPort": 3000, + "gethRPCPort": 8545, + "gethIPCPort": 30303, + "routeTableName": "NVARouteTable", + "NvaRouteName": "[concat(variables('namingInfix'), '-Route')]", + "loadBalancerName": "[concat(variables('namingInfix'), '-LB')]", + "loadBalancerBackendAddressPoolName": "LoadBalancerBackend1", + "loadBalancerInboundNatRuleNamePrefix": "SSH-VM", + "location": "[resourceGroup().location]", + "numMNNodes": "[parameters('numMiningNodes')]", + "maxVMsPerStorageAcct": 20, + "mnStorageAcctCount": "[add(div(variables('numMNNodes'), variables('maxVMsPerStorageAcct')), 1)]", + "mnStorageAcctNames": [ + "[concat(uniqueString(resourceGroup().id, variables('namingInfix')), 'mn')]" + ], + "nvaNICName": "nic-nva", + "nvaVMName": "[concat(variables('namingInfix'), '-nva')]", + "vpnName": "[concat('v', uniqueString(resourceGroup().id), '-vpn')]", + "nvaStorageAcctName": "[concat(uniqueString(resourceGroup().id, variables('namingInfix')), 'nva')]", + "nvaStorageAccountType": "Standard_LRS", + "nvaNodeVMSize": "Standard_A1", + "nvaPublicIpName": "nvaPip", + "nvaSubnetName": "[concat(uniqueString(concat(resourceGroup().id, concat(variables('namingInfix'), 'subnet')), 'nva'))]", + "nvaSubnetPrefix": "[replace('10._.14.0/27','_', string(parameters('consortiumMemberId')))]", + "nvaPrivateIp": "[replace('10._.14.4','_', string(parameters('consortiumMemberId')))]", + "nvaNetPrefix": "10.0.0.0/12", + "mnVMNamePrefix": "[concat(variables('namingInfix'), '-mn')]", + "mnNICPrefix": "nic-mn", + "txStorageAcctName": "[concat(uniqueString(resourceGroup().id, variables('namingInfix')), 'tx')]", + "txVMNamePrefix": "[concat(variables('namingInfix'), '-tx')]", + "txSubnetName": "[concat(uniqueString(concat(resourceGroup().id, concat(variables('namingInfix'), 'subnet')), 'tx'))]", + "txSubnetPrefix": "[replace('10._.0.0/24','_', string(parameters('consortiumMemberId')))]", + "txNIPrefix": "nic-tx", + "txNsgName": "[concat(variables('namingInfix'), 'TXNsg')]", + "mnNsgName": "[concat(variables('namingInfix'), 'MNNsg')]", + "mnSubnetName": "[concat(uniqueString(resourceGroup().id, variables('namingInfix')), 'snet-mn0')]", + "mnSubnetPrefix": "[replace('10._.1.0/24','_', string(parameters('consortiumMemberId')))]", + "subnetPropertiesArray": [ + { + "name": "[variables('txSubnetName')]", + "properties": { + "addressPrefix": "[variables('txSubnetPrefix')]", + "routeTable": { + "id": "[resourceId ('Microsoft.Network/routeTables', variables('routeTableName'))]" + }, + "networkSecurityGroup": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('txNsgName'))]" + } + } + }, + { + "name": "[variables('mnSubnetName')]", + "properties": { + "addressPrefix": "[variables('mnSubnetPrefix')]", + "routeTable": { + "id": "[resourceId ('Microsoft.Network/routeTables', variables('routeTableName'))]" + }, + "networkSecurityGroup": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('mnNsgName'))]" + } + } + }, + { + "name": "[variables('nvaSubnetName')]", + "properties": { + "addressPrefix": "[replace('10._.14.0/27','_',string(parameters('consortiumMemberId')))]" + } + } + ], + "ubuntuImage": { + "publisher": "Canonical", + "offer": "UbuntuServer", + "sku": "16.04-LTS", + "version": "latest" + }, + "windowsImage": { + "publisher": "MicrosoftWindowsServer", + "offer": "WindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + + + "vNet": { + "name": "[concat('vNet',string(parameters('consortiumMemberId')),'-', resourceGroup().location)]", + "addressSpacePrefix": "[replace('10._.0.0/20', '_',string(parameters('consortiumMemberId')))]", + "subnetName": "[concat('subnet-', resourceGroup().location, variables('namingInfix'))]", + "subnetPrefix": "[replace('10._.1.0/24','_', string(parameters('consortiumMemberId')))]", + "asn": "[add(parameters('consortiumMemberId'),65050)]" + }, + "vnetRef": "[resourceId('Microsoft.Network/virtualNetworks',variables('vNet').name)]", + "vnetID": "[resourceId('Microsoft.Network/virtualNetworks', variables('vNet').name)]", + "txSubnetRef": "[concat(variables('vnetID'),'/subnets/', variables('txSubnetName'))]", + "memberVNetRef": "[resourceId('Microsoft.Network/virtualNetworks',variables('vNet').name)]", + "mnSubnetRefArray": [ + "[concat(variables('vnetID'),'/subnets/', variables('mnSubnetName'))]" + ], + "nvaSubnetRef": "[concat(variables('vnetID'),'/subnets/', variables('nvaSubnetName'))]" + }, + "resources": [ + { + "apiVersion": "[variables('apiVersionAvailabilitySets')]", + "type": "Microsoft.Compute/availabilitySets", + "name": "[variables('availabilitySetName')]", + "location": "[variables('location')]", + "properties": {} + }, + { + "apiVersion": "[variables('apiVersionRouteTables')]", + "type": "Microsoft.Network/routeTables", + "name": "[variables('routeTableName')]", + "location": "[variables('location')]", + "properties": {} + }, + { + "apiVersion": "[variables('apiVersionDeployments')]", + "name": "loadBalancerLinkedTemplate", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "incremental", + "templateLink": { + "uri": "[concat(parameters('baseUrl'), '/nested/loadBalancer.json')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "loadBalancerName": { "value": "[variables('loadBalancerName')]" }, + "dnsHostName": { "value": "[variables('namingInfix')]" }, + "loadBalancerBackendAddressPoolName": { "value": "[variables('loadBalancerBackendAddressPoolName')]" }, + "loadBalancerInboundNatRuleNamePrefix": { "value": "[variables('loadBalancerInboundNatRuleNamePrefix')]" }, + "frontendPort1": { "value": "[variables('httpPort')]" }, + "backendPort1": { "value": "[variables('adminSitePort')]" }, + "frontendPort2": { "value": "[variables('gethRPCPort')]" }, + "backendPort2": { "value": "[variables('gethRPCPort')]" }, + "numInboundNATRules": { "value": "[parameters('numTXNodes')]" }, + "inboundNATRuleFrontendStartingPort": { "value": "[variables('sshNATFrontEndStartingPort')]" }, + "inboundNATRuleBackendPort": { "value": "[variables('sshPort')]" }, + "location": { "value": "[variables('location')]" } + } + } + }, + { + "apiVersion": "[variables('apiVersionNetworkSecurityGroups')]", + "type": "Microsoft.Network/networkSecurityGroups", + "name": "[variables('mnNsgName')]", + "location": "[variables('location')]", + "tags": { + "displayName": "NSG - Mining (MN)" + }, + "properties": { + "securityRules": [ + { + "name": "allow-nva-bootnodes", + "properties": { + "description": "Allows NVA Bootnodes access", + "protocol": "*", + "sourcePortRange": "*", + "destinationPortRange": "[variables('gethIPCPort')]", + "sourceAddressPrefix": "[variables('vNet').addressSpacePrefix]", + "destinationAddressPrefix": "[variables('nvaNetPrefix')]", + "access": "Allow", + "priority": 100, + "direction": "Outbound" + } + }, + { + "name": "block-internet-bootnodes", + "properties": { + "description": "Block Internet Bootnodes", + "protocol": "*", + "sourcePortRange": "*", + "destinationPortRange": "[variables('gethIPCPort')]", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "Internet", + "access": "Deny", + "priority": 101, + "direction": "Outbound" + } + }, + { + "name": "allow-nva-inbound", + "properties": { + "description": "Allow NVA inbound access", + "protocol": "*", + "sourcePortRange": "*", + "destinationPortRange": "*", + "sourceAddressPrefix": "[variables('nvaNetPrefix')]", + "destinationAddressPrefix": "[variables('vNet').addressSpacePrefix]", + "access": "Allow", + "priority": 100, + "direction": "Inbound" + } + } + ] + } + }, + { + "apiVersion": "[variables('apiVersionNetworkSecurityGroups')]", + "type": "Microsoft.Network/networkSecurityGroups", + "name": "[variables('txNsgName')]", + "location": "[variables('location')]", + "tags": { + "displayName": "NSG - Transaction (TX)" + }, + "properties": { + "securityRules": [ + { + "name": "allow-ssh", + "properties": { + "description": "Allow SSH", + "protocol": "*", + "sourcePortRange": "*", + "destinationPortRange": "22", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": 100, + "direction": "Inbound" + } + }, + { + "name": "allow-geth-rpc", + "properties": { + "description": "Allow geth RPC", + "protocol": "*", + "sourcePortRange": "*", + "destinationPortRange": "8545", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": 101, + "direction": "Inbound" + } + }, + { + "name": "allow-etheradmin", + "properties": { + "description": "Allow etheradmin web service", + "protocol": "*", + "sourcePortRange": "*", + "destinationPortRange": "3000", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": 102, + "direction": "Inbound" + } + }, + { + "name": "allow-nva-inbound", + "properties": { + "description": "Allow NVA inbound access", + "protocol": "*", + "sourcePortRange": "*", + "destinationPortRange": "*", + "sourceAddressPrefix": "[variables('nvaNetPrefix')]", + "destinationAddressPrefix": "[variables('vNet').addressSpacePrefix]", + "access": "Allow", + "priority": 103, + "direction": "Inbound" + } + }, + { + "name": "allow-nva-bootnodes", + "properties": { + "description": "Allows NVA Bootnodes access", + "protocol": "*", + "sourcePortRange": "*", + "destinationPortRange": "[variables('gethIPCPort')]", + "sourceAddressPrefix": "[variables('vNet').addressSpacePrefix]", + "destinationAddressPrefix": "[variables('nvaNetPrefix')]", + "access": "Allow", + "priority": 100, + "direction": "Outbound" + } + }, + { + "name": "block-bootnodes", + "properties": { + "description": "Block Internet Bootnodes", + "protocol": "*", + "sourcePortRange": "*", + "destinationPortRange": "[variables('gethIPCPort')]", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "Internet", + "access": "Deny", + "priority": 101, + "direction": "Outbound" + } + } + ] + } + }, + { + "apiVersion": "2015-06-15", + "type": "Microsoft.Network/virtualNetworks", + "name": "[variables('vNet').name]", + "location": "[variables('location')]", + "dependsOn": [ + "[concat('Microsoft.Network/networkSecurityGroups/', variables('txNsgName'))]", + "[concat('Microsoft.Network/networkSecurityGroups/', variables('mnNsgName'))]", + "[concat('Microsoft.Network/routeTables/', variables('routeTableName'))]" + ], + "comments": "This is my vNet", + "properties": { + "addressSpace": { + "addressPrefixes": [ + "[variables('vNet').addressSpacePrefix]" + ] + }, + "subnets": "[variables('subnetPropertiesArray')]" + } + }, + { + "apiVersion": "[variables('apiVersionDeployments')]", + "name": "txVMLinkedTemplate", + "type": "Microsoft.Resources/deployments", + "dependsOn": [ + "[concat('Microsoft.Network/virtualNetworks/', variables('vNet').name)]", + "[concat('Microsoft.Compute/availabilitySets/', variables('availabilitySetName'))]", + "loadBalancerLinkedTemplate" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(parameters('baseUrl'), '/nested/txVMAuth', '-', parameters('authType'), '.json')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "apiVersionVirtualMachines": { "value": "[variables('apiVersionVirtualMachines')]" }, + "apiVersionNetworkInterfaces": { "value": "[variables('apiVersionNetworkInterfaces')]" }, + "apiVersionStorageAccounts": { "value": "[variables('apiVersionStorageAccounts')]" }, + "loadBalancerName": { "value": "[variables('loadBalancerName')]" }, + "loadBalancerBackendAddressPoolName": { "value": "[variables('loadBalancerBackendAddressPoolName')]" }, + "loadBalancerInboundNatRuleNamePrefix": { "value": "[variables('loadBalancerInboundNatRuleNamePrefix')]" }, + "txSubnetRef": { "value": "[variables('txSubnetRef')]" }, + "txVMNamePrefix": { "value": "[variables('txVMNamePrefix')]" }, + "numTXNodes": { "value": "[parameters('numTXNodes')]" }, + "txStorageAcctName": { "value": "[variables('txStorageAcctName')]" }, + "txNIPrefix": { "value": "[variables('txNIPrefix')]" }, + "storageAccountType": { "value": "[parameters('txStorageAccountType')]" }, + "availabilitySetName": { "value": "[variables('availabilitySetName')]" }, + "txNodeVMSize": { "value": "[parameters('txNodeVMSize')]" }, + "adminUsername": { "value": "[parameters('adminUsername')]" }, + "adminPassword": { "value": "[parameters('adminPassword')]" }, + "adminSSHKey": { "value": "[parameters('adminSSHKey')]" }, + "ubuntuImage": { "value": "[variables('ubuntuImage')]" }, + "namingInfix": { "value": "[variables('namingInfix')]" }, + "location": { "value": "[variables('location')]" } + } + } + }, + { + "apiVersion": "[variables('apiVersionDeployments')]", + "name": "mnVMLinkedTemplate", + "type": "Microsoft.Resources/deployments", + "dependsOn": [ + "[concat('Microsoft.Network/virtualNetworks/', variables('vNet').name)]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(parameters('baseUrl'), '/nested/mnVMAuth', '-', parameters('authType'), '.json')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "apiVersionVirtualMachines": { "value": "[variables('apiVersionVirtualMachines')]" }, + "apiVersionNetworkInterfaces": { "value": "[variables('apiVersionNetworkInterfaces')]" }, + "apiVersionStorageAccounts": { "value": "[variables('apiVersionStorageAccounts')]" }, + "mnVMNamePrefix": { "value": "[variables('mnVMNamePrefix')]" }, + "numMNNodes": { "value": "[variables('numMNNodes')]" }, + "mnNICPrefix": { "value": "[variables('mnNICPrefix')]" }, + "mnStorageAcctNames": { "value": "[variables('mnStorageAcctNames')]" }, + "mnStorageAcctCount": { "value": "[variables('mnStorageAcctCount')]" }, + "mnSubnetRefArray": { "value": "[variables('mnSubnetRefArray')]" }, + "numConsortiumMembers": { "value": 1 }, + "storageAccountType": { "value": "[parameters('mnStorageAccountType')]" }, + "mnNodeVMSize": { "value": "[parameters('mnNodeVMSize')]" }, + "adminUsername": { "value": "[parameters('adminUsername')]" }, + "adminPassword": { "value": "[parameters('adminPassword')]" }, + "adminSSHKey": { "value": "[parameters('adminSSHKey')]" }, + "ubuntuImage": { "value": "[variables('ubuntuImage')]" }, + "namingInfix": { "value": "[variables('namingInfix')]" }, + "location": { "value": "[variables('location')]" } + } + } + }, + { + "apiVersion": "[variables('apiVersionDeployments')]", + "name": "nvaResources", + "type": "Microsoft.Resources/deployments", + "dependsOn": [ + "[concat('Microsoft.Network/virtualNetworks/', variables('vNet').name)]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(parameters('baseUrl'), '/nested/networkVirtualAppliance.json')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "apiVersionVirtualMachines": { "value": "[variables('apiVersionVirtualMachines')]" }, + "apiVersionNetworkInterfaces": { "value": "[variables('apiVersionNetworkInterfaces')]" }, + "apiVersionStorageAccounts": { "value": "[variables('apiVersionStorageAccounts')]" }, + "nvaVMName": { "value": "[variables('nvaVMName')]" }, + "nvaNICName": { "value": "[variables('nvaNICName')]" }, + "nvaStorageAcctName": { "value": "[variables('nvaStorageAcctName')]" }, + "nvaSubnetRef": { "value": "[variables('nvaSubnetRef')]" }, + "storageAccountType": { "value": "[variables('nvaStorageAccountType')]" }, + "nvaNodeVMSize": { "value": "[variables('nvaNodeVMSize')]" }, + "adminUsername": { "value": "[parameters('adminUsername')]" }, + "adminPassword": { "value": "[parameters('adminPassword')]" }, + "windowsImage": { "value": "[variables('windowsImage')]" }, + "namingInfix": { "value": "[variables('namingInfix')]" }, + "nvaPublicIpName": { "value": "[variables('nvaPublicIpName')]" }, + "location": { "value": "[variables('location')]" } + } + } + }, + { + "apiVersion": "[variables('apiVersionDeployments')]", + "type": "Microsoft.Resources/deployments", + "name": "updateRouteTable", + "dependsOn": [ + "nvaResources" + ], + "properties": { + "mode": "Incremental", + "template": { + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": {}, + "variables": {}, + "resources": [ + { + "apiVersion": "[variables('apiVersionRouteTables')]", + "name": "[variables('routeTableName')]", + "location": "[variables('location')]", + "type": "Microsoft.Network/routeTables", + "properties": { + "routes": [ + { + "name": "[variables('NvaRouteName')]", + "properties": { + "addressPrefix": "[parameters('RemoteMemberVnetAddressSpace')]", + "nextHopType": "VirtualAppliance", + "nextHopIpAddress": "[reference('nvaResources').outputs.nvaPrivateIpAddress.value]" + } + } + ] + } + } + ] + } + } + }, + { + "apiVersion": "[variables('apiVersionDeployments')]", + "name": "nvaExtension", + "type": "Microsoft.Resources/deployments", + "dependsOn": [ + "nvaResources" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(parameters('baseUrl'), '/nested/joiningNVAExtension.json')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "nvaVMName": {"value": "[variables('nvaVMName')]" }, + "location": {"value": "[variables('location')]" }, + "remoteIpAddress": { "value": "[parameters('RemoteMemberNVAPublicIP')]" }, + "remoteAddressSpace": { "value": "[parameters('RemoteMemberVnetAddressSpace')]" }, + "sharedKey": { "value": "[parameters('connectionSharedKey')]" }, + "vpnName": { "value": "[variables('vpnName')]" }, + "artifactsLocationURL": { "value": "[parameters('baseUrl')]" } + } + } + }, + { + "apiVersion": "[variables('apiVersionDeployments')]", + "name": "vmExtensionLinkedTemplate", + "type": "Microsoft.Resources/deployments", + "dependsOn": [ + "txVMLinkedTemplate", + "mnVMLinkedTemplate" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(parameters('baseUrl'), '/nested/joiningVmExtension.json')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "numBootNodes": { "value": 2 }, + "txVMNamePrefix": { "value": "[variables('txVMNamePrefix')]" }, + "numTXNodes": { "value": "[parameters('numTXNodes')]" }, + "mnVMNamePrefix": { "value": "[variables('mnVMNamePrefix')]" }, + "numMNNodes": { "value": "[variables('numMNNodes')]" }, + "artifactsLocationURL": { "value": "[parameters('baseUrl')]" }, + "adminUsername": { "value": "[parameters('adminUsername')]" }, + "ethereumAccountPsswd": { "value": "[parameters('ethereumAccountPsswd')]" }, + "ethereumAccountPassphrase": { "value": "[parameters('ethereumAccountPassphrase')]" }, + "consortiumData": { "value": "[parameters('consortiumData')]" }, + "consortiumMemberId": { "value": "[parameters('consortiumMemberId')]" }, + "gethIPCPort": { "value": "[variables('gethIPCPort')]" }, + "adminSitePort": { "value": "[variables('adminSitePort')]" }, + "location": { "value": "[variables('location')]" } + } + } + } + ], + "outputs": { + "admin-site": { + "type": "string", + "value": "[concat('http://', reference('loadBalancerLinkedTemplate').outputs.fqdn.value)]" + }, + "ethereum-rpc-endpoint": { + "type": "string", + "value": "[concat('http://', reference('loadBalancerLinkedTemplate').outputs.fqdn.value, ':', variables('gethRPCPort'))]" + }, + "ssh-to-first-tx-node": { + "type": "string", + "value": "[concat('ssh -p ', variables('sshNATFrontEndStartingPort'), ' ', parameters('adminUsername'), '@', reference('loadBalancerLinkedTemplate').outputs.fqdn.value)]" + }, + "consortium-data": { + "type": "string", + "value": "[concat('http://', reference('loadBalancerLinkedTemplate').outputs.fqdn.value)]" + }, + "member-nva-ipaddress": { + "type": "string", + "value": "[reference('nvaResources').outputs.nvaPrivateIpAddress.value]" + }, + "member-nva-public-ipaddress": { + "type": "string", + "value": "[reference('nvaResources').outputs.nvaPublicIpAddress.value]" + }, + "member-vnet-address-space": { + "type": "string", + "value": "[string(reference(variables('vNet').name).AddressSpace.AddressPrefixes[0])]" + }, + "member-prefix": { + "type": "string", + "value": "[variables('namingInfix')]" + }, + "member-routetable-name": { + "type": "string", + "value": "[variables('routeTableName')]" + } + } +} \ No newline at end of file diff --git a/ethereum-consortium-blockchain/marketplace/publisher-portal-assets/EULA (final 110216).htm b/ethereum-consortium-blockchain/marketplace/publisher-portal-assets/EULA (final 110216).htm new file mode 100644 index 0000000..6de24a3 --- /dev/null +++ b/ethereum-consortium-blockchain/marketplace/publisher-portal-assets/EULA (final 110216).htm @@ -0,0 +1,100 @@ +
MICROSOFT TERMS OF USE
+MICROSOFT-PUBLISHED ETHEREUM BLOCKCHAIN SOLUTION TEMPLATE FOR USE IN MICROSOFT AZURE
+These terms of use are an agreement between Microsoft Corporation (or based on where you live, one of its affiliates) and you. They apply to the solution templates named below (each a "solution template") and described below. The terms also apply to any Microsoft
+for this solution template, unless other terms accompany those items. If so, those terms apply.
+By using the solution template, you accept these terms. If you do not accept them, +do not use the solution template.
+As described below, using some features also operates as your consent to the transmission of certain standard computer information for Internet-based services.
+FOR AUSTRALIA – You have statutory guarantees under the Australian Consumer Law, and nothing in these terms is intended to affect those rights.
This limitation applies to
+B!&*l+v7Y&lv~sno7y k_pc_K%tT`mT{Jqibj43HB{G<
z&Ukxw&*}$mMKvBA)AER$vqm)BEYtgzSC*4L?0Ge{Kr8iZfXQf{*|gT=xa Yhn2?rr# 1b@qf6W86%Cg`qgBNS6G!4l@bvXO81xqtNm2+g4l%j+o^2|_mY0iv
z%ypLWmb4G!E`eihyg)*f4ZD<7=FQIblN6mHn;c7>~WNyzU#W+FP7iETh1r2WQ75@M8dx-x;P
zhQmhm)AuaFDT%1fpS7Zc$Gj^zT4&+s0)&|3KUc*F)xYky4DQHzx)49G|D3r$w0>s|
zZGvkl8dxJkM#du!18NI}FC91
0OpP_pytDRFir8)fi{4oTzs(O
zvi|;jj9Tov;a{}99
0j+f&NtT8QrR&SV*P-ie9)z{Gdz3-Nl_^@b5n3H#yL^`2wJ
zaV(t!5}|_3EAsmI;44F&icCQ#6pG&
z)Y0J$dRR)jH{~%e{abZK2h2^eFmuuW9iiz|&9c+s-CitLq9~3vng7wDe%#=4m5iRp
z<1b>vmPA7NNo7AZ8vp@LCy1bd1n_XD85P
a^X_7O+~?i0O82z_4@&T0uC{?(S8q^Sq