Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

To build on windows you have to follow instructions of step 1 at https://cwiki.apache.org/confluence/display/CLOUDSTACK/Setting+up+a+CloudStack+dev+environment+on+Windows.

In addition to packages mentioned there you have to select wget package also.

Install mono on windows. You can download mono from http://www.go-mono.com/mono-downloads/download.html.

Before building  import all certificates using below command in Cygwin

mozroots --import --ask-remove

After setting up the environment you can build the agent using Cygwin. In Cygwin you have to execute  buildagent.sh script. This script is present in (cloudstack src folder)/plugins/hypervisors/hyperv

To build on Linux you can refer to Donal's blog http://dlafferty.blogspot.in/2013/08/building-your-microsoft-solution-with.html.

Installing and uninstalling Service from Command line

After building you will get the output/executable in (cloudstack src folder)//plugins/hypervisors/hyperv/DotNet/ServerResource/AgentShell/bin/Debug

That output folder can be zipped and can be distributed.

In that output folder there is one executable generated AgentShell.exe.

From command line that can be used to install and uninstall service as follows

To install service

  • AgentShell.exe --install

To uninstall service

  • AgentShell.exe --uninstall

To build clickable installer

First you have to download the source code from github https://github.com/anshul1886/CloudStackAgentSetup.

Copy the CloudStackAgentSetup folder (inside CloudStackAgentSetup) in (cloudstack src folder)//plugins/hypervisors/hyperv/DotNet/ServerResource

Note: exclude readme and git folders

After building the agent run one of the following command in (cloudstack src folder)//plugins/hypervisors/hyperv/DotNet/ServerResource/CloudStackAgentSetup

  • msbuild CloudAgentSetup.wixproj 

                   or

  • MSBuild.exe CloudAgentSetup.wixproj

Installer will be generated in bin/debug folder of CloudAgentSetup proj (cloudstack src folder)//plugins/hypervisors/hyperv/DotNet/ServerResource/CloudStackAgentSetup/bin/Debug

To build clickable installer using Visual studio

Add the project to visual Studio and build it Visual Studio as normal build

(cloudstack src folder)//plugins/hypervisors/hyperv/DotNet/ServerResource/CloudStackAgentSetup

Troubleshooting

If any command is not working make sure that it is environment path

To get msbuild on path add the following path to Path environment variable

C:\Windows\Microsoft.NET\Framework\v4.0.30319

.