-
Notifications
You must be signed in to change notification settings - Fork 16.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1465 from sigwo/master
Adding Blocknet
- Loading branch information
Showing
10 changed files
with
709 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# Bitswift Blockchain Node on Ubuntu VM | ||
|
||
This template delivers the Bitswift network to your VM in about 20 minutes. Everything you need to get started using the Bitswift blockchain from the command line is included. | ||
You may build from source. Once installed, 'bitswiftd' will begin syncing the public blockchain. | ||
You may then connect via SSH to the VM and launch 'bitswiftd' to interface with the blockchain. | ||
|
||
<a href="https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-quickstart-templates%2Fmaster%2Fbitswift-blockchain-ubuntu%2Fazuredeploy.json" target="_blank"><img src="http://azuredeploy.net/deploybutton.png"/></a> | ||
<a href="http://armviz.io/#/?load=https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-quickstart-templates%2Fmaster%2Fbitswift-blockchain-ubuntu%2Fazuredeploy.json" target="_blank"><img src="http://armviz.io/visualizebutton.png"/></a> | ||
|
||
# What is Bitswift? | ||
|
||
+ TECHNOLOGY: Proof of Stake | ||
+ SUPPLY: 4 Million | ||
+ SPEED: 30 seconds | ||
+ INTEREST: 3% | ||
|
||
## Distinctive Attributes | ||
|
||
One click attach and exist (PoE) | ||
Stealth Addressing | ||
Transaction comment fee structure | ||
Narrations | ||
|
||
|
||
## Unique Function | ||
|
||
COMPANY: | ||
Bitswift Decentralized Applications (Canada): | ||
|
||
* equips your platform with monetization options | ||
* increases your user count | ||
* provides additional revenue options | ||
* expands the options of your platform | ||
* enhances your users experience | ||
* allows your platform to be able to prove anything without a doubt | ||
* provides professional business consulting and integration | ||
* enforces security (no single database to corrupt) | ||
* gives your platform an immediate hook into the blockchain ecosystem | ||
* serves 24/7 support | ||
|
||
|
||
Registered business operating out of Canada backing the bitswift blockchain | ||
Canadian Trademark registered on "bitswift" | ||
|
||
For more information, as well as an immediately useable, binary version of | ||
the Bitswift client sofware, see https://bitcointalk.org/index.php?topic=922982.msg10131608#msg10131608. | ||
|
||
|
||
# Template Parameters | ||
|
||
When you click the Deploy to Azure icon above, you need to specify the following template parameters: | ||
|
||
* `adminUsername`: This is the account for connecting to your Bitswift host. | ||
* `adminPassword`: This is your password for the host. Azure requires passwords to have One upper case, one lower case, a special character, and a number. | ||
* `dnsLabelPrefix`: This is used as both the VM name and DNS name of your public IP address. Please ensure an unique name. | ||
* `installMethod`: This tells Azure to install Bitswift from source. | ||
* `vmSize`: This is the size of the VM to use. Recommendations: Use the D series for installations from source. | ||
|
||
# Getting Started Tutorial | ||
|
||
* Click the `Deploy to Azure` icon above | ||
* Complete the template parameters, choose your resource group, accept the terms and click Create | ||
* Wait about 15 minutes for the VM to spin up and install the software | ||
* Connect to the VM via SSH using the DNS name assigned to your Public IP | ||
* If you wish to relaunch bitswiftd `sudo bitswiftd` | ||
* `bitswiftd` will run automatically on restart | ||
|
||
# Licensing | ||
|
||
Bitswift is released under the terms of the MIT license. See `COPYING` for more information or see http://opensource.org/licenses/MIT. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,206 @@ | ||
{ | ||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", | ||
"contentVersion": "1.0.0.0", | ||
"parameters": { | ||
"adminUsername": { | ||
"type": "string", | ||
"metadata": { | ||
"description": "Username for the Virtual Machine." | ||
} | ||
}, | ||
"adminPassword": { | ||
"type": "securestring", | ||
"metadata": { | ||
"description": "Password for the Virtual Machine." | ||
} | ||
}, | ||
"dnsLabelPrefix": { | ||
"type": "string", | ||
"metadata": { | ||
"description": "Hostname assigned to the Public IP, also used as the VM Name. Must be lowercase. It should match with the following regular expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$ or it will raise an error." | ||
} | ||
}, | ||
"installMethod": { | ||
"type": "string", | ||
"defaultValue": "From_Source", | ||
"metadata": { | ||
"description": "Method to install Bitswift. From_Source: official Bitswift repo on GitHub." | ||
} | ||
}, | ||
"vmSize": { | ||
"type": "string", | ||
"defaultValue": "Standard_D1", | ||
"allowedValues": [ | ||
"Standard_A1", | ||
"Standard_A2", | ||
"Standard_A3", | ||
"Standard_D1", | ||
"Standard_D2", | ||
"Standard_D3" | ||
], | ||
"metadata": { | ||
"description": "Size of VM" | ||
} | ||
} | ||
}, | ||
"variables": { | ||
"imagePublisher": "Canonical", | ||
"imageOffer": "UbuntuServer", | ||
"OSDiskName": "BitswiftOSDisk", | ||
"imageSKU": "14.04.4-LTS", | ||
"nicName": "BitswiftNic", | ||
"addressPrefix": "10.0.0.0/16", | ||
"subnetName": "BitswiftSubnet", | ||
"subnetPrefix": "10.0.0.0/24", | ||
"storageAccountType": "Standard_LRS", | ||
"storageAccountName": "[concat(uniquestring(resourceGroup().id, 'bitswift'))]", | ||
"publicIPAddressName": "BitswiftPublicIP", | ||
"publicIPAddressType": "Dynamic", | ||
"vmStorageAccountContainerName": "vhds", | ||
"vmName": "[parameters('dnsLabelPrefix')]", | ||
"virtualNetworkName": "BitswiftVNET", | ||
"vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]", | ||
"subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]", | ||
"apiVersion": "2015-06-15" | ||
}, | ||
"resources": [ | ||
{ | ||
"type": "Microsoft.Storage/storageAccounts", | ||
"name": "[variables('storageAccountName')]", | ||
"apiVersion": "[variables('apiVersion')]", | ||
"location": "[resourceGroup().location]", | ||
"properties": { | ||
"accountType": "[variables('storageAccountType')]" | ||
} | ||
}, | ||
{ | ||
"apiVersion": "[variables('apiVersion')]", | ||
"type": "Microsoft.Network/publicIPAddresses", | ||
"name": "[variables('publicIPAddressName')]", | ||
"location": "[resourceGroup().location]", | ||
"properties": { | ||
"publicIPAllocationMethod": "[variables('publicIPAddressType')]", | ||
"dnsSettings": { | ||
"domainNameLabel": "[parameters('dnsLabelPrefix')]" | ||
} | ||
} | ||
}, | ||
{ | ||
"apiVersion": "[variables('apiVersion')]", | ||
"type": "Microsoft.Network/virtualNetworks", | ||
"name": "[variables('virtualNetworkName')]", | ||
"location": "[resourceGroup().location]", | ||
"properties": { | ||
"addressSpace": { | ||
"addressPrefixes": [ | ||
"[variables('addressPrefix')]" | ||
] | ||
}, | ||
"subnets": [ | ||
{ | ||
"name": "[variables('subnetName')]", | ||
"properties": { | ||
"addressPrefix": "[variables('subnetPrefix')]" | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"apiVersion": "[variables('apiVersion')]", | ||
"type": "Microsoft.Network/networkInterfaces", | ||
"name": "[variables('nicName')]", | ||
"location": "[resourceGroup().location]", | ||
"dependsOn": [ | ||
"[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", | ||
"[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" | ||
], | ||
"properties": { | ||
"ipConfigurations": [ | ||
{ | ||
"name": "ipconfig1", | ||
"properties": { | ||
"privateIPAllocationMethod": "Dynamic", | ||
"publicIPAddress": { | ||
"id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]" | ||
}, | ||
"subnet": { | ||
"id": "[variables('subnetRef')]" | ||
} | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"apiVersion": "[variables('apiVersion')]", | ||
"type": "Microsoft.Compute/virtualMachines", | ||
"name": "[variables('vmName')]", | ||
"location": "[resourceGroup().location]", | ||
"dependsOn": [ | ||
"[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", | ||
"[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]" | ||
], | ||
"properties": { | ||
"hardwareProfile": { | ||
"vmSize": "[parameters('vmSize')]" | ||
}, | ||
"osProfile": { | ||
"computerName": "[variables('vmName')]", | ||
"adminUsername": "[parameters('adminUsername')]", | ||
"adminPassword": "[parameters('adminPassword')]" | ||
}, | ||
"storageProfile": { | ||
"imageReference": { | ||
"publisher": "[variables('imagePublisher')]", | ||
"offer": "[variables('imageOffer')]", | ||
"sku": "[variables('imageSKU')]", | ||
"version": "latest" | ||
}, | ||
"osDisk": { | ||
"name": "osdisk", | ||
"vhd": { | ||
"uri": "[concat('http://',variables('storageAccountName'),'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/',variables('OSDiskName'),'.vhd')]" | ||
}, | ||
"caching": "ReadWrite", | ||
"createOption": "FromImage" | ||
} | ||
}, | ||
"networkProfile": { | ||
"networkInterfaces": [ | ||
{ | ||
"id": "[resourceId('Microsoft.Network/networkInterfaces',variables('nicName'))]" | ||
} | ||
] | ||
}, | ||
"diagnosticsProfile": { | ||
"bootDiagnostics": { | ||
"enabled": "true", | ||
"storageUri": "[concat('http://',variables('storageAccountName'),'.blob.core.windows.net')]" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"type": "Microsoft.Compute/virtualMachines/extensions", | ||
"name": "[concat(variables('vmName'),'/newuserscript')]", | ||
"location": "[resourceGroup().location]", | ||
"apiVersion": "[variables('apiVersion')]", | ||
"dependsOn": [ | ||
"[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" | ||
], | ||
"properties": { | ||
"publisher": "Microsoft.OSTCExtensions", | ||
"type": "CustomScriptForLinux", | ||
"typeHandlerVersion": "1.4", | ||
"autoUpgradeMinorVersion": true, | ||
"settings": { | ||
"fileUris": [ | ||
"https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/bitswift-blockchain-ubuntu/build_swift.sh" | ||
], | ||
"commandToExecute": "[concat('sh build_swift.sh ', parameters('installMethod'))]" | ||
} | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", | ||
"contentVersion": "1.0.0.0", | ||
"parameters": { | ||
"dnsLabelPrefix": { | ||
"value": "GEN-UNIQUE-11" | ||
}, | ||
"adminUsername": { | ||
"value": "azureuser" | ||
}, | ||
"adminPassword": { | ||
"value": "GEN-PASSWORD" | ||
}, | ||
"installMethod": { | ||
"value": "From_Source" | ||
}, | ||
"vmSize": { | ||
"value": "Standard_D1" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
date | ||
ps axjf | ||
|
||
################################################################# | ||
# Update Ubuntu and install prerequisites for running Bitswift # | ||
################################################################# | ||
sudo apt-get update | ||
################################################################# | ||
# Build Bitswift from source # | ||
################################################################# | ||
NPROC=$(nproc) | ||
echo "nproc: $NPROC" | ||
################################################################# | ||
# Install all necessary packages for building Bitswift # | ||
################################################################# | ||
sudo apt-get install -y qt4-qmake libqt4-dev libminiupnpc-dev libdb++-dev libdb-dev libcrypto++-dev libqrencode-dev libboost-all-dev build-essential libboost-system-dev libboost-filesystem-dev libboost-program-options-dev libboost-thread-dev libboost-filesystem-dev libboost-program-options-dev libboost-thread-dev libssl-dev libdb++-dev libssl-dev ufw git | ||
sudo add-apt-repository -y ppa:bitcoin/bitcoin | ||
sudo apt-get update | ||
sudo apt-get install -y libdb4.8-dev libdb4.8++-dev | ||
|
||
cd /usr/local | ||
file=/usr/local/bitswift | ||
if [ ! -e "$file" ] | ||
then | ||
sudo git clone https://github.com/BitSwift-v2/bitswift.git bitswift | ||
fi | ||
|
||
cd /usr/local/bitswift/src | ||
file=/usr/local/bitswift/src/bitswiftd | ||
if [ ! -e "$file" ] | ||
then | ||
sudo make -j$NPROC -f makefile.unix | ||
fi | ||
|
||
sudo cp /usr/local/bitswift/src/bitswiftd /usr/bin/bitswiftd | ||
|
||
################################################################ | ||
# Configure to auto start at boot # | ||
################################################################ | ||
file=$HOME/.bitswift | ||
if [ ! -e "$file" ] | ||
then | ||
sudo mkdir $HOME/.bitswift | ||
fi | ||
printf '%s\n%s\n%s\n%s\n' 'daemon=1' 'server=1' 'rpcuser=u' 'rpcpassword=p' | sudo tee $HOME/.bitswift/bitswift.conf | ||
file=/etc/init.d/bitswift | ||
if [ ! -e "$file" ] | ||
then | ||
printf '%s\n%s\n' '#!/bin/sh' 'sudo bitswiftd' | sudo tee /etc/init.d/bitswift | ||
sudo chmod +x /etc/init.d/bitswift | ||
sudo update-rc.d bitswift defaults | ||
fi | ||
|
||
/usr/bin/bitswiftd | ||
echo "Bitswift has been setup successfully and is running..." | ||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"itemDisplayName": "Bitswift Blockchain on Ubuntu", | ||
"description": "This template deploys a Bitswift node on a Ubuntu virtual machines. Bitswift information can be found at https://bitcointalk.org/index.php?topic=922982.msg10131608#msg10131608", | ||
"summary": "Deploy Bitswift on Ubuntu to take advantage of the services running on the blockchain", | ||
"githubUsername": "sigwo", | ||
"dateUpdated": "2016-03-26" | ||
} |
Oops, something went wrong.