Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Blocknet #1465

Merged
merged 36 commits into from
Mar 29, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
d87e3e1
Adding Blocknet
sigwo Mar 24, 2016
75326f3
Adding Blocknet
sigwo Mar 24, 2016
ce7559c
Adding Blocknet
sigwo Mar 24, 2016
ae89ada
Adding Blocknet
sigwo Mar 24, 2016
3e30b4b
Adding Blocknet
sigwo Mar 24, 2016
51c40c5
Update Line 199
sigwo Mar 24, 2016
1bc43ee
Update Lines 7 and 8
sigwo Mar 24, 2016
e5eb02d
Adding Blitz
sigwo Mar 25, 2016
2cc6026
Adding Blitz
sigwo Mar 25, 2016
c813a8f
Adding Blitz
sigwo Mar 25, 2016
f5b2c1c
Removing Blitz
sigwo Mar 25, 2016
f563e6c
Removing Blitz
sigwo Mar 25, 2016
c64a23d
Removing Blitz
sigwo Mar 25, 2016
b2e1a45
Adding Bitswift
sigwo Mar 25, 2016
0469e96
Adding Bitswift
sigwo Mar 25, 2016
e96dcdf
Adding Bitswift
sigwo Mar 25, 2016
d991825
Adding Bitswift
sigwo Mar 25, 2016
64e2435
Adding Bitswift
sigwo Mar 25, 2016
376e64e
Updates per Kay Singh
sigwo Mar 25, 2016
855b55a
Update build_blocknet.sh
sigwo Mar 26, 2016
35361cd
Update azuredeploy.json
sigwo Mar 26, 2016
a339b3d
Update build_blocknet.sh
sigwo Mar 26, 2016
46e0060
Update azuredeploy.json
sigwo Mar 26, 2016
54fac03
Update azuredeploy.parameters.json
sigwo Mar 26, 2016
3be2eb3
Update build_blocknet.sh
sigwo Mar 26, 2016
37d79b1
Update azuredeploy.parameters.json
sigwo Mar 26, 2016
7a81e2b
Update azuredeploy.json
sigwo Mar 26, 2016
81b7dd1
Update azuredeploy.json
sigwo Mar 26, 2016
f03416b
Update metadata.json
sigwo Mar 26, 2016
7c3bbb7
Update build_blocknet.sh
sigwo Mar 26, 2016
ce6f1ba
Merge pull request #1 from sigwo/xc
sigwo Mar 26, 2016
a41e889
Adding Horizon
sigwo Mar 27, 2016
6ccb851
Adding Horizon
sigwo Mar 27, 2016
a1ee61e
Update build_hz.sh
sigwo Mar 27, 2016
65e7b8c
Removed Horizon to separate branch
sigwo Mar 27, 2016
7f34aeb
Update metadata.json
sigwo Mar 27, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions bitswift-blockchain-ubuntu/README.md
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.
206 changes: 206 additions & 0 deletions bitswift-blockchain-ubuntu/azuredeploy.json
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",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a PPA to install from?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, not yet.

"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'))]"
}
}
}
]
}
21 changes: 21 additions & 0 deletions bitswift-blockchain-ubuntu/azuredeploy.parameters.json
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"
}
}
}
60 changes: 60 additions & 0 deletions bitswift-blockchain-ubuntu/build_swift.sh
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
7 changes: 7 additions & 0 deletions bitswift-blockchain-ubuntu/metadata.json
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"
}
Loading