+# Dubaicoin Blockchain Node on Ubuntu VM
+
+This template delivers the Dubaicoin network to your VM in about 15 minutes (PPA install). Everything you need to get started using the Dubaicoin blockchain from the command line is included.
+You may select to build from source or install from the community provided Personal Package Archive (PPA).Once installed, 'dubaicoind' will begin syncing the public blockchain.
+You may then connect via SSH to the VM and launch 'dubaicoind' to interface with the dubaicoin blockchain.
+
+
+
+
+# What is Dubaicoin?
+
+A new and exciting Open Source currency that will revolutionize Gold/Diamond purchases based on fair-play rules.
+
+Dubaicoin using secure POS algorithm.
+
+DubaiCoin - DBIC
+
+Ticker: DBIC
+Algorithm: SHA-256
+Supply: 10 500 000
+Premine: 1%
+Pos: 10% pa
+Number Of Blocks: 280 000
+60 Seconds Per Block
+10 Blocks to Confirm
+Min. Staking Age: 1 hour
+
+Block Rewards:
+
+1: ~ 1% Premine
+2-100: 0 (instamine protection)
+101-40,000: 100 (~ 1 month)
+40,001-80,000: 50 (~ 1 month)
+80,001-120,000: 25 (~ 1 month)
+120,001-160,000: 12.5 (~ 1 month)
+160,001-200,000: 6.25 (~ 1 month)
+200,001-240,000: 3.125 (~ 1 month)
+240,001-280,000: 1.5625 (~ 1 month)
+
+For more information, as well as an immediately useable, binary version of
+the Dubaicoin client sofware, see https://dubaicoin.org/.
+
+
+# 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 Dubaicoin 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 how to install the software. The default is using the community provided PPA. You may choose to install from source, but be advised this method takes substantially longer to complete.
+* `vmSize`: This is the size of the VM to use. Recommendations: Use the A series for PPA installs, and 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 dubaicoind `sudo dubaicoind`
+* dubaicoin will run automatically on restart
+
+# Licensing
+
+Dubaicoin is released under the terms of the MIT license. See `COPYING` for more information or see http://opensource.org/licenses/MIT.
View
28 baas-artifacts/linux-dubaicoin/artifactfile.json
@@ -0,0 +1,28 @@
+{
+ "$schema": "https://raw.githubusercontent.com/Azure/azure-devtestlab/master/schemas/2015-01-01/dtlArtifacts.json",
+ "title": "Dubaicoin Gold and Diamond Blockchain",
+ "description": "Add an Linux Dubaicoin node to the Lab",
+ "tags": [
+ "Dubaicoin",
+
"Gold",
+
"Diamond",
+ "Blockchain",
+ "Linux"
+ ],
+ "iconUri": "https://raw.githubusercontent.com/Azure/azure-blockchain-projects/master/baas-artifacts/linux-dubaicoin/dubaicoinArtifact.png",
+ "targetOsType": "Linux",
+ "parameters": {
+ "installMethod": {
+ "type": "string",
+ "displayName": "Method to install Dubaicoin. From_PPA: unofficial community bianaries. From_Source: official Dubaicoin repo on GitHub.",
+ "defaultValue": "From_Source",
+ "allowedValues": [
+ "From_PPA",
+ "From_Source"
+ ]
+ }
+ },
+ "runCommand": {
+ "commandToExecute": "[concat('sh', ' ', 'build_dubaicoin.sh', ' ', parameters('installMethod'))]"
+ }
+}
View
79 baas-artifacts/linux-dubaicoin/build_dubaicoin.sh
@@ -0,0 +1,79 @@
+#!/bin/bash
+
+set -e
+
+date
+ps axjf
+
+
+if [ $1 = 'From_Source' ]; then
+#################################################################
+# Update Ubuntu and install prerequisites for running DubaiCoin #
+#################################################################
+sudo apt-get update
+#################################################################
+# Build DubaiCoin from source #
+#################################################################
+NPROC=$(nproc)
+echo "nproc: $NPROC"
+#################################################################
+# Install all necessary packages for building DubaiCoin #
+#################################################################
+sudo apt-get -y install git unzip wget build-essential libtool autotools-dev autoconf pkg-config libssl-dev libevent-dev bsdmainutils libboost-all-dev libminiupnpc-dev libzmq3-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/DubaiCoin
+if [ ! -e "$file" ]
+then
+
sudo git clone https://github.com/DubaiCoinDev/DubaiCoin.git
+fi
+
+cd /usr/local/DubaiCoin
+file=/usr/local/DubaiCoin/src/DubaiCoind
+if [ ! -e "$file" ]
+then
+
sudo make -f makefile.unix -j $NPROC
+fi
+
+sudo cp /usr/local/DubaiCoin/src/DubaiCoind /usr/bin/DubaiCoind
+
+else
+#################################################################
+# Install DubaiCoin from PPA #
+#################################################################
+#sudo add-apt-repository -y ppa:DubaiCoin/DubaiCoin
+#sudo apt-get update
+#sudo apt-get install -y DubaiCoin
+cd /usr/local/src/
+DOWNLOADFILE=$(curl -s https://api.github.com/repos/DubaiCoinDev/DubaiCoin/releases | grep browser_download_url | grep linux64 | head -n 1 | cut -d '"' -f 4)
+DOWNLOADNAME=$(curl -s https://api.github.com/repos/DubaiCoinDev/DubaiCoin/releases | grep name | grep linux64 | head -n 1 | cut -d '"' -f 4)
+sudo wget $DOWNLOADFILE
+sudo unzip $DOWNLOADNAME
+sudo cp DubaiCoind /usr/bin/DubaiCoind
+
+fi
+
+################################################################
+# Configure to auto start at boot
#
+################################################################
+file=$HOME/.DubaiCoin
+if [ ! -e "$file" ]
+then
+
sudo mkdir $HOME/.DubaiCoin
+fi
+printf '%s\n%s\n%s\n%s\n' 'daemon=1' 'server=1' 'rpcuser=u' 'rpcpassword=p' | sudo tee $HOME/.DubaiCoin/DubaiCoin.conf
+file=/etc/init.d/DubaiCoin
+if [ ! -e "$file" ]
+then
+
printf '%s\n%s\n' '#!/bin/sh' 'sudo DubaiCoind' | sudo tee /etc/init.d/DubaiCoin
+
sudo chmod +x /etc/init.d/DubaiCoin
+
sudo update-rc.d DubaiCoin defaults
+fi
+
+/usr/bin/DubaiCoind & exit 0
+
+echo "DubaiCoin Blockchain has been setup successfully and is running... Have Fun ..."
+exit 0