–Install On Windows(Manual)

This guide explains how to install CloneDeploy 1.3.0 without using an msi.  You will need some basic server admin experience to complete this.  If the msi isn’t working for you this is the guide you want.

Download and extract CloneDeploy 1.3.0 win-installer-src

Pre-Requisites

  • .NET 4.5 or Greater
  • Windows 7, 8, 10, 2008R2, 2012, 2016
  • A DHCP Server (One is also provided for use on isolated networks.)
  • Assign your server a static IP
  • It is recommended not to have any Anti-Virus software as this may cause a performance decrease or block necessary ports
  • Do not use the following characters when creating any of the passwords < > ” &  ‘ $
  • This guide assumes you are installing on a 64bit OS.  If not, change all instances of c:\program files (x86) to c:\program files
  • All commands in this guide should be run from an elevated cmd prompt.  Do NOT run from powershell.  Some of these commands don’t work with powershell.

I. Install Database

Run win-installer-src\package\appdata\clonedeploy\mariadb-10.2.8-win32.exe

Type a root password when prompted – remember this, you will need it for next couple commands as well as the web server setup.

Check Use UTF8 as default server’s character set

cd "c:\Program Files (x86)\MariaDB 10.2\bin"
mysql.exe --user=root --password --execute="create database clonedeploy" -v

In the following command update the source path to match the location of your win-installer-src directory

mysql.exe --user=root --password --database=clonedeploy --execute="source c:\win-installer-src\package\appdata\clonedeploy\cd.sql" -v

Ignore any error about line 1929

II. Install Web Application

  1. Open win-installer-src\package\pf32\application\Web.config with a text editor
  2. On line 37 change xx_marker1_xx to your database password
  3. On line 122 change xx_marker2_xx to some random characters (alphanumeric only)
  4. Make a new directory in c:\program files (x86) named clonedeploy
  5. Copy all folders from win-installer-src\package\pf32\ to c:\program files (x86)\clonedeploy

A. Install IIS

Windows 7

dism /online /enable-feature /featurename:IIS-WebServerRole /featurename:IIS-WebServer /featurename:IIS-ISAPIFilter /featurename:IIS-ISAPIExtensions /featurename:IIS-NetFxExtensibility /featurename:IIS-ASPNET /norestart

Windows 8 / 10

powershell -command "enable-windowsoptionalfeature -online -featurename iis-webserverrole -norestart;enable-windowsoptionalfeature -online -featurename iis-webserver -norestart;enable-windowsoptionalfeature -online -featurename iis-isapifilter -norestart;enable-windowsoptionalfeature -online -featurename iis-isapiextensions -norestart; enable-windowsoptionalfeature -online -featurename netfx4extended-aspnet45 -norestart; enable-windowsoptionalfeature -online -featurename iis-netfxextensibility45 -norestart;enable-windowsoptionalfeature -online -featurename iis-aspnet45 -all -norestart;"

Server 2008

servermanagercmd -install web-server
servermanagercmd -install web-asp-net

Server 2012

powershell -command "import-module servermanager; add-windowsfeature web-server"
powershell -command "import-module servermanager; add-windowsfeature web-asp-net"
powershell -command "import-module servermanager; add-windowsfeature web-asp-net45"
powershell -command "import-module servermanager; add-windowsfeature web-mgmt-console"

Server 2016

powershell -command "import-module servermanager; add-windowsfeature web-server"
powershell -command "import-module servermanager; add-windowsfeature web-asp-net45"
powershell -command "import-module servermanager; add-windowsfeature web-mgmt-console"

B. Setup Web Site

Open IIS manager

In the Connections Pane expand all drop downs until you get to Default Web Site

  1. Right click Default Web Site
  2. Select Add Application
  3. Type clonedeploy for Alias
  4. Type c:\program files (x86)\clonedeploy\frontend for Physical Path
  5. Click Ok
  6. In the Connections Pane you now have clonedeploy listed under Default Web Site
  7. Right click clonedeploy
  8. Select Add Application
  9. Type api for Alias
  10. Type c:\program files (x86)\clonedeploy\application for Physical Path
  11. Click Ok

C. Set Permissions

icacls "c:\program files (x86)\clonedeploy\application" /T /C /grant IIS_IUSRS:(OI)(CI)M
icacls "c:\program files (x86)\clonedeploy\frontend" /T /C /grant IIS_IUSRS:(OI)(CI)M
icacls "c:\program files (x86)\clonedeploy\cd_dp" /T /C /grant IIS_IUSRS:(OI)(CI)M
icacls "c:\program files (x86)\clonedeploy\tftpboot" /T /C /grant IIS_IUSRS:(OI)(CI)M

D. Enable Web Application – Win7 and 2008 Only

Win7 and Server 2008

C:\windows\microsoft.net\framework\v4.0.30319\aspnet_regiis.exe -i -enable

III. Setup TFTP Server

Open C:\program files (x86)\clonedeploy\tftpd32\tftpd32.ini

Change xx_marker1_xx to C:\Program Files (x86)\clonedeploy\tftpboot\

"c:\program files (x86)\clonedeploy\tftpd32\tftpd32_svc" -install
sc config tftpd32_svc start= auto
net start tftpd32_svc

IV. Create SMB Share and Users

Change each password value below to something else.  Remember them you will need them again.

net user cd_share_ro password /add
net user cd_share_rw password /add
WMIC USERACCOUNT WHERE "Name='cd_share_ro'" SET PasswordExpires=FALSE
WMIC USERACCOUNT WHERE "Name='cd_share_rw'" SET PasswordExpires=FALSE
net share "cd_share=c:\program files (x86)\clonedeploy\cd_dp" /grant:cd_share_ro,READ /grant:cd_share_rw,FULL
icacls "c:\program files (x86)\clonedeploy\cd_dp" /T /C /grant cd_share_ro:(OI)(CI)RX /grant cd_share_rw:(OI)(CI)F

V. Create Firewall Exceptions

netsh advfirewall firewall add rule name=dhcps dir=in action=allow protocol=UDP localport=67 profile=any
netsh advfirewall firewall add rule name=dhcpd dir=in action=allow protocol=UDP localport=68 profile=any 
netsh advfirewall firewall add rule name=tftp dir=in action=allow protocol=UDP localport=69 profile=any
netsh advfirewall firewall add rule name=http dir=in action=allow protocol=TCP localport=80 profile=any
netsh advfirewall firewall add rule name=https dir=in action=allow protocol=TCP localport=443 profile=any
netsh advfirewall firewall add rule name=proxyd dir=in action=allow protocol=UDP localport=4011 profile=any
netsh advfirewall firewall add rule name=udp-sender dir=in action=allow program="c:\program files (x86)\clonedeploy\application\private\apps\udp-sender.exe" enable=yes profile=any
netsh advfirewall firewall add rule name=udp-sender dir=out action=allow program="c:\program files (x86)\clonedeploy\application\private\apps\udp-sender.exe" enable=yes profile=any
netsh advfirewall firewall set rule group="File and Printer Sharing" new enable=Yes

VI. Create Symlinks

mklink /J "c:\program files (x86)\clonedeploy\tftpboot\proxy\bios\kernels" "c:\program files (x86)\clonedeploy\tftpboot\kernels"
mklink /J "c:\program files (x86)\clonedeploy\tftpboot\proxy\bios\images" "c:\program files (x86)\clonedeploy\tftpboot\images"
mklink /J "c:\program files (x86)\clonedeploy\tftpboot\proxy\efi32\kernels" "c:\program files (x86)\clonedeploy\tftpboot\kernels"
mklink /J "c:\program files (x86)\clonedeploy\tftpboot\proxy\efi32\images" "c:\program files (x86)\clonedeploy\tftpboot\images"
mklink /J "c:\program files (x86)\clonedeploy\tftpboot\proxy\efi64\kernels" "c:\program files (x86)\clonedeploy\tftpboot\kernels"
mklink /J "c:\program files (x86)\clonedeploy\tftpboot\proxy\efi64\images" "c:\program files (x86)\clonedeploy\tftpboot\images"

VII. Post Install Setup

Open the CloneDeploy Web Interface

http://localhost/clonedeploy

Login with:

clonedeploy / password

Upon login you will be greeted with the Initial Setup Page

  1. Enter a new clonedeploy password
  2. Enter your server ip address
  3. Enter the Read Only password you created earlier for the cd_share_ro user
  4. Enter the Read Write password you created earlier for the cd_share_rw user
  5. Click Finalize Setup
in Getting Started
Comments are closed.