diff --git a/bitswift-blockchain-ubuntu/README.md b/bitswift-blockchain-ubuntu/README.md new file mode 100644 index 000000000000..32f275f8ad8d --- /dev/null +++ b/bitswift-blockchain-ubuntu/README.md @@ -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. + + + + +# 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. diff --git a/bitswift-blockchain-ubuntu/azuredeploy.json b/bitswift-blockchain-ubuntu/azuredeploy.json new file mode 100644 index 000000000000..b012382fa044 --- /dev/null +++ b/bitswift-blockchain-ubuntu/azuredeploy.json @@ -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'))]" + } + } + } + ] +} diff --git a/bitswift-blockchain-ubuntu/azuredeploy.parameters.json b/bitswift-blockchain-ubuntu/azuredeploy.parameters.json new file mode 100644 index 000000000000..af5854f677c2 --- /dev/null +++ b/bitswift-blockchain-ubuntu/azuredeploy.parameters.json @@ -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" + } + } +} diff --git a/bitswift-blockchain-ubuntu/build_swift.sh b/bitswift-blockchain-ubuntu/build_swift.sh new file mode 100644 index 000000000000..a11557842d40 --- /dev/null +++ b/bitswift-blockchain-ubuntu/build_swift.sh @@ -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 diff --git a/bitswift-blockchain-ubuntu/metadata.json b/bitswift-blockchain-ubuntu/metadata.json new file mode 100644 index 000000000000..55aa12fba8b9 --- /dev/null +++ b/bitswift-blockchain-ubuntu/metadata.json @@ -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" +} diff --git a/blocknet-blockchain-on-ubuntu/README.md b/blocknet-blockchain-on-ubuntu/README.md new file mode 100644 index 000000000000..f24294e45c79 --- /dev/null +++ b/blocknet-blockchain-on-ubuntu/README.md @@ -0,0 +1,50 @@ +# Blocknet Blockchain Node on Ubuntu VM + +This template delivers the Blocknet network to your VM in about 20 minutes. Everything you need to get started using the Blocknet blockchain from the command line is included. +You may build from source. Once installed, 'blocknetd' will begin syncing the public blockchain. +You may then connect via SSH to the VM and launch 'blocknetd' to interface with the blockchain. + + + + +# What is Blocknet? + +What is Blocknet? +---------------- + +The Blocknet is a revolutionary advancement in cryptographic technology: +a true peer-to-peer protocol between nodes on different blockchains. This +is the foundation of a technology stack incorporating an API and an +application platform, which enables open-ended application possibilities +and vastly reduces development time. + +Services include: + +The Blocknet enables multi-blockchain services to be delivered to devices that only contain a single blockchain. +Thus, device and network resources are conserved, and a flexible, mobile, indefinitely extensible future is enabled. + +For more information, as well as an immediately useable, binary version of +the Blocknet client sofware and network, see http://www.blocknet.co. + +# 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 Blocknet 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 Blocknet 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 blocknetd `sudo blocknetd` +* `blocknetd` will run automatically on restart + +# Licensing + +Blocknet is released under the terms of the MIT license. See `COPYING` for more information or see http://opensource.org/licenses/MIT. diff --git a/blocknet-blockchain-on-ubuntu/azuredeploy.json b/blocknet-blockchain-on-ubuntu/azuredeploy.json new file mode 100644 index 000000000000..f25d950eee5a --- /dev/null +++ b/blocknet-blockchain-on-ubuntu/azuredeploy.json @@ -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 blocknet. From_Source: official blocknet 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": "blocknetOSDisk", + "imageSKU": "14.04.4-LTS", + "nicName": "blocknetNic", + "addressPrefix": "10.0.0.0/16", + "subnetName": "blocknetSubnet", + "subnetPrefix": "10.0.0.0/24", + "storageAccountType": "Standard_LRS", + "storageAccountName": "[concat(uniquestring(resourceGroup().id, 'blocknet'))]", + "publicIPAddressName": "blocknetPublicIP", + "publicIPAddressType": "Dynamic", + "vmStorageAccountContainerName": "vhds", + "vmName": "[parameters('dnsLabelPrefix')]", + "virtualNetworkName": "blocknetVNET", + "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/blocknet-blockchain-on-ubuntu/build_blocknet.sh" + ], + "commandToExecute": "[concat('sh build_blocknet.sh ', parameters('installMethod'))]" + } + } + } + ] +} diff --git a/blocknet-blockchain-on-ubuntu/azuredeploy.parameters.json b/blocknet-blockchain-on-ubuntu/azuredeploy.parameters.json new file mode 100644 index 000000000000..af5854f677c2 --- /dev/null +++ b/blocknet-blockchain-on-ubuntu/azuredeploy.parameters.json @@ -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" + } + } +} diff --git a/blocknet-blockchain-on-ubuntu/build_blocknet.sh b/blocknet-blockchain-on-ubuntu/build_blocknet.sh new file mode 100644 index 000000000000..087e6bd5dcd6 --- /dev/null +++ b/blocknet-blockchain-on-ubuntu/build_blocknet.sh @@ -0,0 +1,61 @@ +#!/bin/bash + +set -e + +date +ps axjf + +################################################################# +# Update Ubuntu and install prerequisites for running Blocknet # +################################################################# +sudo apt-get update +################################################################# +# Build Blocknet source # +################################################################# +NPROC=$(nproc) +echo "nproc: $NPROC" +################################################################# +# Install all necessary packages for building Blocknet # +################################################################# +sudo apt-get install -y git qt5-default qt5-qmake qtbase5-dev-tools qttools5-dev-tools build-essential libboost-dev libboost-system-dev libboost-filesystem-dev libboost-program-options-dev libboost-thread-dev libssl-dev libdb++-dev libevent-dev libminiupnpc-dev libqrencode-dev +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/blocknet +if [ ! -e "$file" ] +then + sudo git clone https://github.com/atcsecure/blocknet.git blocknet +fi + +cd /usr/local/blocknet/src +mkdir obj +file=/usr/local/blocknet/src/blocknetd +if [ ! -e "$file" ] +then + sudo make -j$NPROC -f makefile.unix +fi + +sudo cp /usr/local/blocknet/src/blocknetd /usr/bin/blocknetd + +################################################################ +# Configure to auto start at boot # +################################################################ +file=$HOME/.blocknet +if [ ! -e "$file" ] +then + sudo mkdir $HOME/.blocknet +fi +printf '%s\n%s\n%s\n%s\n' 'daemon=1' 'server=1' 'rpcuser=u' 'rpcpassword=p' | sudo tee $HOME/.blocknet/blocknet.conf +file=/etc/init.d/blocknet +if [ ! -e "$file" ] +then + printf '%s\n%s\n' '#!/bin/sh' 'sudo blocknetd' | sudo tee /etc/init.d/blocknet + sudo chmod +x /etc/init.d/blocknet + sudo update-rc.d blocknet defaults +fi + +/usr/bin/blocknetd +echo "Blocknet has been setup successfully and is running..." +exit 0 diff --git a/blocknet-blockchain-on-ubuntu/metadata.json b/blocknet-blockchain-on-ubuntu/metadata.json new file mode 100644 index 000000000000..d16799a3c15b --- /dev/null +++ b/blocknet-blockchain-on-ubuntu/metadata.json @@ -0,0 +1,7 @@ +{ + "itemDisplayName": "Blocknet Blockchain on Ubuntu", + "description": "This template deploys a Blocknet node on a Ubuntu virtual machines. Blocknet services include enabling multi-blockchain services to be delivered to devices that only contain a single blockchain", + "summary": "Deploy Blocknet on Ubuntu to take advantage of the services running on the blockchain", + "githubUsername": "sigwo", + "dateUpdated": "2016-03-24" +}