Creating Hyperv Agent Installer
- Created by Anshul Gangwar, last modified on Jun 29, 2015
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
Creating Hyperv Agent Installer的更多相关文章
- HOW TO: Creating your MSI installer using Microsoft Visual Studio* 2008
Quote from: http://software.intel.com/en-us/articles/how-to-creating-your-msi-installer-using-visual ...
- Symantec Backup Exec 2012 Agent For Linux安装
Backup Exec 2012 介绍 Backup Exec 2012 是一种为虚拟和物理环境提供保护的集成产品,能够简化备份和灾难恢复,并提供了无可匹敌的恢复功能.借助于强大的 Symantec ...
- Oracle 12c(12.1.0.5) oem agent silent install(静默安装agent)
注释: 文章自oracle support 文档 ID 1360083.1,静默安装agent采用的是把OMS服务端(即oem server端)的agent用压缩包download,远程传到agent ...
- How To: Implement a Major Upgrade In Your Installer
When creating an .msi-based installer, you are strongly encouraged to include logic that supports Wi ...
- CLOUDSTACK FOR HYPER-V
原文地址:http://zhu.vn/archives/1040 我这里是内网测试环境,宿主机为Server 2012R2 ,虚拟化技术为HYPER-V,域环境来的(不是域环境玩不了). 先给宿主机安 ...
- 使用Minikube部署本地Kubernetes集群(二十八)
前言 使用Minikube部署本地k8s集群相对比较简单,非常推荐将其用于本地k8s开发环境,唯一麻烦点的仅仅是网络问题. 在本篇教程中,我们使用了国内的镜像来完成本地k8s集群的搭建.如果搭建过程中 ...
- 【8.0.0_r4】AMS分析(十六)(ActivityManagerService.java上)
代码位于frameworks/base/services/core/java/com/android/server/am/,一共有七十个文件. Java源码位于package com.android. ...
- Linux下命令行安装weblogic10.3.6
Linux下命令行安装weblogic10.3.6 一.安装前准备工作: 1.创建用户useradd weblogic;创建用户成功linux系统会自动创建一个和用户名相同的分组,并将该用户分到改组中 ...
- 详解 ML2 Core Plugin(I) - 每天5分钟玩转 OpenStack(71)
我们在 Neutron Server 小节学习到 Core Plugin,其功能是维护数据库中 network, subnet 和 port 的状态,并负责调用相应的 agent 在 network ...
随机推荐
- vue2.0 vue-cli+webpack使用less和scss的说明
config 目录下好像都不需要相关配置,但是package.json里面 使用less cnpm install --save-dev less less-loader //下面不需要配置,可省略 ...
- windows下 php集成环境如何通过cmd执行命令
---恢复内容开始--- php学习过程中 Windows环境下的php集成程序很多 这样方便了学习 但是在熟悉命令使用方面可以说是十分不便 本文将从两个方便 向大家介绍如何快速通过cmd命令实现命令 ...
- hibernate笔记4--qbc查询
Criteria:是一种完全面向对象的查询方式,Criteria查询也叫做qbc查询(query by Criteria). 查询全部,分页查询,统计查询,条件查询,排序查询,离线查询 ...
- python基础-数据运算
*按位取反运算规则(按位取反再加1) 详解http://blog.csdn.net/wenxinwukui234/article/details/42119265 详细内容ht ...
- uvm_sqr_ifs——TLM1事务级建模方法(四)
与uvm_tlm_if_base 一样,这个类也没有派生自任何类,定义了如下几个接口:get_next_item, try_next_item, item_done, get, peek, put, ...
- python logging 模块记录日志
#日志记录到多文件示例 import logging def error_log(message): file_1_1 = logging.FileHandler('error.log', 'a+', ...
- LAMP stack-5.6.22 (OpenLogic CentOS 7.2)
平台: CentOS 类型: 虚拟机镜像 软件包: apache2.4.20 mysql5.6.30 php5.6.22 apache application server basic softwar ...
- SAP成都研究院的体育故事
"平生不识陈近南,纵称英雄也枉然". 这是清朝反government武装圈子里流传的一句话,给予了天地会CEO陈近南极高的评价. 同样,如果您是SAP体育运动界的一份子,而您还不认 ...
- 利用Python实现 队列的算法
以下内容都是来自“悟空“大神的讲解,听他的视频课,利用Python实现堆栈的算法,自己做了一些小总结,可能会存在自己理解的一些误区, 1.栈的实现 队列的特征是先进先出,同我们生活中的队列具有相同的特 ...
- POJ 3421 X-factor Chains(构造)
这条链依次乘一个因子.因为n<2^20,sqrt(n)分解因子,相同的因子相对顺序取一个. 组合公式计算一下就好. #include<cstdio> #include<iost ...