Skip to end of metadata

 

Go to start of metadata

 

Pre-built Hyper-V Agent Installer

If you want to use pre-built Hyper-V Agent Installer then you can download from jenkins.

For master you can download from http://jenkins.buildacloud.org/job/cloudstack-master-hyperv-agent and for other releases search for appropriate job at http://jenkins.buildacloud.org/ .

Creating Hyper-V Agent Installer

To build on windows you have to follow instructions of step 1 athttps://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 -u <username> -p <password>

              where username is of form domain\username or username for example Administrator or blr\Administrator

This user should be part of local Administrators and Hyper-V Administrators group on the host

To uninstall service

  • AgentShell.exe --uninstall

 

Note: Apart from installing service you have to manually create and add ssl certificate. For that you can follow the steps herehttps://cwiki.apache.org/confluence/display/CLOUDSTACK/Manually+Creating+and+installing+self+signed+certificate+for+CloudStack+Management+Server+communication+with+Hyper-V+agent

To build clickable installer

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

Copy the InstallerSetup folder in (cloudstack src folder)//plugins/hypervisors/hyperv/DotNet/

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

  • msbuild CloudStackAgentSetup.wixproj

                   or

  • MSBuild.exe CloudStackAgentSetup.wixproj

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

CloudStackAgentSetup code uses the WixCommonUiExtension.dll with Eclipse Public Licensehttps://github.com/dblock/msiext/blob/master/LICENSE

Installing msi through command line

To install msi through command line quietly one can use the following command

msiexec /i CloudStackAgentSetup.msi /quiet /qn /norestart /log install.log SERVICE_USERNAME=<username> SERVICE_PASSWORD=<password>

If you don't want to install certificate with installer then execute as follows

msiexec /i CloudStackAgentSetup.msi /quiet /qn /norestart /log install.log SERVICE_USERNAME=<username> SERVICE_PASSWORD=<password> INSTALL_CERTIFICATE="False"

Deploy software via Group Policy’s Scheduled Tasks


Create .bat script which does the following

  • copies CloudStackAgentSetup.msi from a networked resource (shared folder) to Hyper-V host
  • installs the CloudStackAgentSetup.msi(use one of the method mentioned in above section, Installing msi through command line)
  • set the appropriate location for logs (replace install.log with your file)
  • deletes the CloudStackAgentSetup.msi from Hyper-V host after installation
  • save the .bat file as install-cloudstack-hyperv-agent.bat .

 

Create and deploy a scheduled task via group policy

  • Open Group Policy Management
  • Navigate to the Organization Unit you wish to receive CloudStack Hyper-V Agent deployment via a schedule task
  • Right-click on your target OU and select “Create a GPO in this domain, and Link it here”
  • Name: Deploy Application via Scheduled Tasks
  • Group Policy Management Editor > Computer Configuration > Preferences > Control Panel Settings > Scheduled Tasks
  • Right-click on Scheduled Tasks > New > Scheduled Tasks
  • Tab Tasks > Action > Create
  • Tab Task > Name > Install CloudStack Hyper-V Agent
  • Tab Task > Run > \\path to bat script\install-cloudstack-hyperv-agent.bat
  • Tab Task > Enabled > checked
  • Tab Schedule > Scheduled Task > Once, 2:00:00 AM
  • Tab Schedule > Scheduled Task Once > Run On > Pick a day that is best for you
  • (optional) Tab Settings > Power Management > Wake the computer to run this task > checked

Link this Group Policy to one or more OUs and under Security Filtering, add Authenticated Users and Domain Computers.

For more details refer to http://www.jasonpearce.com/2010/11/17/deploy-software-via-group-policys-scheduled-tasks/

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/InstallerSetup/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

.

  • No labels

最新文章

  1. 用Taurus.MVC 做个企业站(上)
  2. JVM 备注
  3. 面向对象day1
  4. Postman-进阶
  5. &lt;Oracle Database&gt;逻辑结构
  6. SQL把做个字段组合成一个字符串
  7. matlab s变换
  8. Java设计模式06:常用设计模式之适配器模式(结构型模式)
  9. JDK1.5新特性(一)&hellip;&hellip;Enhanced for Loop
  10. 【MS Office2013小技巧】Word中公式中的等号对齐
  11. openerp service install
  12. JavaScript Maintainable
  13. [转]5个JavaScript面试题
  14. Android - 读取XML文件中的数据
  15. C# json帮助类,JsonHelper,Table转JSon,JSon转Table
  16. Java之指定Junit测试方法的执行顺序举例
  17. 如何设置IntelliJ IDEA智能感知支持Jsp内置对象
  18. 阿里云 配置ssl 在nginx上
  19. WPF GridView的列宽度设置为按比例分配
  20. 6.5 开始进入设计 … Transition to Design

热门文章

  1. python decorator 用法
  2. Reduce侧连接
  3. 全面了解linux情况常用命令
  4. Softmax回归(Softmax Regression
  5. kubernetes-控制器Deployment和DaemonSet(八)
  6. JQuery根据关键字检索html元素并筛选显示
  7. SQL Server中Table字典数据的查询SQL示例代码
  8. C语言正整数除法向上取整
  9. linux内核--定时器API
  10. 爬虫学习(五)——使用handler管理器对象进行数据爬取的步骤