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 ...
随机推荐
- vue-pos : 子组件与子组件通讯
子组件与子组件通讯: 例子子组件1 要与子组件2 通讯 步骤1 : 在父组件新建一个 vue 对象 : const eventHub = new Vue() 步骤2 : 子组件1 发起事件 :this ...
- SpringBoot的核心功能
1.独立运行的Spring项目 SpringBoot可以以jar包的形式独立运行,运行一个SpringBoot项目只需要通过java -jar xx.jar来启动. 2.内嵌Servlet容器 Spr ...
- centOS7虚拟机和本机ping通
1.配置centOS虚拟机网卡 先设置桥接模式 此处的address要和本机的vmware在同一个网段 2.重启centOS网卡 3.关闭本机和虚拟机防火墙,防止ping不通 centOS命令: fi ...
- 基于mllib的协同过滤实战(电影推荐)
//加载需要的包 import org.apache.spark.rdd._ import org.apache.spark.mllib.recommendation.{ALS, Rating, Ma ...
- Sentinel spring-cloud-gateway adapter(1.6)异常错误之@EnableCircuitBreaker
sentinal 大坑 使用gateway adaper包出现@EnableCircuitBreaker did you forget include starter的异常 这时候千万不要学我引入cl ...
- Centos7安装 PostgreSQL步骤
1. 安装服务器即可. Yum install postgresql-server Yum install postgresql-contrib 2. 验证是否安装成功: rpm -aq| grep ...
- java基础编程——二维数组中的查找
题目描述 在一个二维数组中(每个一维数组的长度相同),每一行都按照从左到右递增的顺序排序,每一列都按照从上到下递增的顺序排序.请完成一个函数,输入这样的一个二维数组和一个整数,判断数组中是否含有该整数 ...
- Bootstrap 警告框(Alert)插件
警告消息大多来是用来向终端用户提示警告或确认的消息,使用警告框插件,您可以向所有的警告框消息添加取消功能. 用法 您有以下两种方式启用警告框的可取消功能. 1.通过data属性:通过数据添加可取消功能 ...
- Spring Boot 2.x零基础入门到高级实战教程
一.零基础快速入门SpringBoot2.0 1.SpringBoot2.x课程全套介绍和高手系列知识点 简介:介绍SpringBoot2.x课程大纲章节 java基础,jdk环境,maven基础 2 ...
- java基础面试题:try{}里有一个return语句,那么紧跟在这个try后的finally {}里的code会不会被执行,什么时候被执行,在return前还是后?
package com.swift; public class Try_Catch_Finally_Test { public static void main(String[] args) { /* ...