IronFoundry Warden/DEA 在win2012中 安装和配置

本文详细介绍了如何在Windows环境下生成IronFoundry Release文件并安装IronFoundry Warden/DEA的过程,包括所需的依赖软件安装及配置步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >


第一部分:生成IronFoundry 的Release文件

一、下载IronFoundry发布包

下载地址:https://github.com/IronFoundry/if_release

二、确保编译机器已经安装了Visual stiduo 2013

三、安装一些编译依赖程序,windows版的 go和git:

四、以管理员身份启动PowerShell,并进入到 if_release 目录。

五、运行 .\build.ps1 构建 发布包。

示例:

?
PS E:\MyProject\if_release> .\build.ps1
Updating submodules
Building Warden: 0.0 . 0
   Restoring packages from NuGet...
   Installing 'Newtonsoft.Json 6.0.1' .
   Installing 'CommandLineParser 1.9.71' .
   Installing 'NDesk.Options 0.2.1' .
   Installing 'protobuf-net 2.0.0.668' .
   Successfully installed 'NDesk.Options 0.2.1' .
   Successfully installed 'CommandLineParser 1.9.71' .
   Installing 'Topshelf 3.1.3' .
   Installing 'NLog 2.1.0' .
   Successfully installed 'Newtonsoft.Json 6.0.1' .
   Successfully installed 'Topshelf 3.1.3' .
   Installing 'NSubstitute 1.7.1.0' .
   Installing 'Topshelf.NLog 3.1.3' .
   Successfully installed 'Topshelf.NLog 3.1.3' .
   Successfully installed 'NSubstitute 1.7.1.0' .
   Successfully installed 'NLog 2.1.0' .
   Installing 'xunit 2.0.0-alpha-build2576' .
   Successfully installed 'xunit 2.0.0-alpha-build2576' .
   Installing 'SharpZipLib 0.86.0' .
   Installing 'xunit.assert 2.0.0-alpha-build2576' .
   Successfully installed 'xunit.assert 2.0.0-alpha-build2576' .
   Installing 'xunit.abstractions 2.0.0-alpha-build2576' .
   Successfully installed 'SharpZipLib 0.86.0' .
   Successfully installed 'xunit.abstractions 2.0.0-alpha-build2576' .
   Installing 'xunit.core 2.0.0-alpha-build2576' .
   Successfully installed 'xunit.core 2.0.0-alpha-build2576' .
   Successfully installed 'protobuf-net 2.0.0.668' .
   IronFoundry.Warden.TestHelper -> E:\MyProject\if_release\if_warden\IronFoundry.Warden.TestHelper\bin\Release\IFTestHelper.exe
   IronFoundry.Warden.Shared -> E:\MyProject\if_release\if_warden\IronFoundry.Warden.Shared\bin\Release\IronFoundry.Warden.Shared.dll
   IronFoundry.Warden.Protocol -> E:\MyProject\if_release\if_warden\IronFoundry.Warden.Protocol\bin\Release\IronFoundry.Warden.Protocol.dll
   IronFoundry.Warden.IISHost -> E:\MyProject\if_release\if_warden\IronFoundry.Warden.IISHost\bin\Release\iishost.exe
   IronFoundry.Warden -> E:\MyProject\if_release\if_warden\IronFoundry.Warden\bin\Release\IronFoundry.Warden.dll
   IronFoundry.Warden.ContainerHost -> E:\MyProject\if_release\if_warden\IronFoundry.Warden.ContainerHost\bin\Release\IronFoundry.Warden.ContainerHost.exe
   IronFoundry.Warden.Service -> E:\MyProject\if_release\if_warden\IronFoundry.Warden.Service\bin\Release\IronFoundry.Warden.Service.exe
   IronFoundry.Warden.Test -> E:\MyProject\if_release\if_warden\IronFoundry.Warden.Test\bin\Release\IronFoundry.Warden.Test.dll
   xUnit.net MSBuild runner ( 64 -bit .NET 4.0 . 30319.18444 )
     Started: IronFoundry.Warden.Test.dll
E:\MyProject\if_release\if_warden\build\build.targets( 140 , 9 ): warning : IronFoundry.Warden.Test.ContainerStubTests+When
InitializedWithTestUserAccount.CanLaunchProcessAsAlternateUser: Unreliable on build server, review build server settings [E:\MyProject\if_release\if_warden\build\build.proj]
E:\MyProject\if_release\if_warden\build\build.targets( 140 , 9 ): warning : IronFoundry.Warden.Test.ContainerStubTests+When
InitializedWithTestUserAccount.WhenImpersonationRequested_LaunchesProcessImpersonated: Unreliable on build server, review build server settings[E:\MyProject\if_release\if_warden\build\build.proj]
     Finished: IronFoundry.Warden.Test.dll
   === TEST EXECUTION SUMMARY ===
     IronFoundry.Warden.Test.dll  Total: 281 , Failed: 0 , Skipped: 2
*** BUILD SUCCESSFUL ***
Building GO WinRunner
Staging the release
Creating the release
PS E:\MyProject\if_release>

 

六、在release文件夹生成得到 ironfoundry_0.0.0.exe的一个7z压缩包文件。


第二部份: 在windows server 2012中安装IronFoundry Warden/DEA

一、准备一台新安装的windows server2 012的实体机或虚拟机,并确保能访问Internet。

二、拷贝已经生成好的 ironfoundry_0.0.0.exe到windows server 2012的机器中,例如文件夹C:\iron,双击释放到当前文件夹

三、安装运行依赖程序和修改ruby源:(点击下载,如不能下载请搜索后下载)


  • Git  (安装步骤如下:)
    注意以下几个选项就可以了
    A:

    B:

    C:

 

 

  • Go(安装步骤:一直一下步)

  • ruby1.9.3 (安装步骤:注意如下选项,安装好后配置源地址,配置方法如下:)
  • A:修改Ruby gem安装源

           ①、以管理员身份运行PowerShell 

           ②、

?
PS C:\> gem sources -l
*** CURRENT SOURCES ***
http: //rubygems.org/
PS C:\> gem sources --remove http: //rubygems.org/   有的版本是:https://rubygems.org/
http: //rubygems.org/ removed from sources
PS C:\> gem sources -a http: //ruby.taobao.org/
http: //ruby.taobao.org/ added to sources
PS C:\> gem sources -l
*** CURRENT SOURCES ***
http: //ruby.taobao.org/

 

  • Devkit  (建议用32位版)安装步骤:
    1.解压DevKit-tdm-32-4.5.2-20111229-1559-sfx到C:\DevKit
    2.从PowerShell进入到 DevKit目录(按以下步骤操作)

    ?
    PS C:\DevKit> ruby dk.rb init
    [INFO] found RubyInstaller v1.9.3 at C: /Ruby193
    Initialization complete! Please review and modify the auto-generated
    'config.yml' file to ensure it contains the root directories to all
    of the installed Rubies you want enhanced by the DevKit.
    PS C:\DevKit>  ruby dk.rb review    #检查要添加DevKit支持的Ruby列表是否有误,可以略过
    Based upon the settings in the 'config.yml' file generated
    from running 'ruby dk.rb init' and any of your customizations,
    DevKit functionality will be injected ino the following Rubies
    when you run 'ruby dk.rb install' .
    C: /Ruby193
    PS C:\DevKit> ruby dk.rb install     #安装备
    [INFO] Updating convenience notice gem override for 'C:/Ruby193'
    [INFO] Installing 'C:/Ruby193/lib/ruby/site_ruby/devkit.rb'
    PS C:\DevKit> gem install rdiscount --platform=ruby     #检查是否成功安装,如打印以下信息,则成功安装
    Fetching: rdiscount-2.1.7.1.gem (100%)
    Temporarily enhancing PATH to include DevKit...
    Building native extensions.  This could take a while ...
    Successfully installed rdiscount-2.1.7.1
    1 gem installed
    Installing ri documentation for rdiscount-2.1.7.1...
    Installing RDoc documentation for rdiscount-2.1.7.1...
     
    然后运行:
    PS C:\DevKit> gem install debugger
    Fetching: columnize-0.8.9.gem (100%)
    Fetching: debugger-ruby_core_source-1.3.7.gem (100%)
    Fetching: debugger-linecache-1.2.0.gem (100%)
    Fetching: debugger-1.6.8.gem (100%)
    Temporarily enhancing PATH to include DevKit...
    Building native extensions.  This could take a while ...
    Successfully installed columnize-0.8.9
    Successfully installed debugger-ruby_core_source-1.3.7
    Successfully installed debugger-linecache-1.2.0
    Successfully installed debugger-1.6.8
    4 gems installed
    Installing ri documentation for columnize-0.8.9...
    Installing ri documentation for debugger-ruby_core_source-1.3.7...
    Installing ri documentation for debugger-linecache-1.2.0...
    Installing ri documentation for debugger-1.6.8...
    Installing RDoc documentation for columnize-0.8.9...
    Installing RDoc documentation for debugger-ruby_core_source-1.3.7...
    Installing RDoc documentation for debugger-linecache-1.2.0...
    Installing RDoc documentation for debugger-1.6.8...
    PS C:\DevKit>

四、安装windows dea先决条件(根据网速快慢,需要的时间长短不等,一般需要几十分钟)。

       切换PowerShell目录到 Iron

       执行:PS C:\Iron> .\install-prerequisites.ps1  示例如下:

?
PS C:\Iron> .\install-prerequisites.ps1
Installing Hostable Web Core . . .
部署映像服务和管理工具
版本: 6.3 . 9600.16384
映像版本: 6.3 . 9600.16384
启用一个或多个功能
[========================== 100.0 %==========================]
操作成功完成。
部署映像服务和管理工具
版本: 6.3 . 9600.16384
映像版本: 6.3 . 9600.16384
启用一个或多个功能
[========================== 100.0 %==========================]
操作成功完成。
部署映像服务和管理工具
版本: 6.3 . 9600.16384
映像版本: 6.3 . 9600.16384
启用一个或多个功能
[========================== 100.0 %==========================]
操作成功完成。
Found go.exe.
Found ruby.exe, not install ruby or devkit
Updating Ruby gems...
Found git.exe, not installing mysisgit
Done.
PS C:\Iron>


五、拷贝BOSH配置文件dea.yml到 C:\Iron

配置文件在BOSH服务器的位置为: /var/vcap/jobs/dea_next/config/dea.yml   

六、开始安装Windows DEA, 这需要花费一些时间。

执行:PS C:\iron> .\ironfoundry-install.ps1
位于命令管道位置 1 的 cmdlet ironfoundry-install.ps1
请为以下参数提供值:
Dea_Yml_File: dea.yml  (要求输入配置文件名,我放在这个目录下,只需要输入文件名就可以了)
IF_WardenUser_Password: ZXCVbnm, 1234   (要输入密码,复杂度是有要求的,太简单会失败)
以下是示例:

 

?
 PS C:\Iron> .\ironfoundry-install.ps1
位于命令管道位置 1 的 cmdlet ironfoundry-install.ps1
请为以下参数提供值:
Dea_Yml_File: dea.yml
IF_WardenUser_Password: ZXCVbnm, 1234
Verifying dependencies
Copy IronFoundry data structure to C:\IronFoundry
Updating configuration file into to C:\IronFoundry\dea_ng\config\dea.yml
Wrote config file to 'C:/IronFoundry/dea_ng/config/dea.yml'
Verifying dependencies
Stopping and removing existing DEA Service
[SC] ControlService 失败 1062 :
服务尚未启动。
[SC] DeleteService 成功
Installing DEA dependent GEMs ( this may take a while )
Updating GEM packages for dea_ng
Latest version currently installed. Aborting.
Successfully installed bundle- 0.0 . 1
1 gem installed
Retrieving and installing patron gem
Temporarily enhancing PATH to include DevKit...
Building native extensions with: '-- --with-curl-lib=C:\Iron\ 0.0 . 0 \dea_ng\tools\curl\bin --with-curl-include=C:\Iron\ 0.0
. 0 \dea_ng\tools\curl\include'
This could take a while ...
Successfully installed patron- 0.4 . 18
1 gem installed
Finished Installing DEA dependent GEMs
Build and install custom event machine
fatal: destination path 'eventmachine' already exists and is not an empty directory.
Successfully uninstalled eventmachine- 1.0 . 3
WARNING:  pessimistic dependency on rake-compiler (~> 0.8 . 3 , development) may be overly strict
   if rake-compiler is semantically versioned, use:
     add_development_dependency 'rake-compiler' , '~> 0.8' , '>= 0.8.3'
WARNING:  open-ended dependency on yard (>= 0.8 . 5.2 , development) is not recommended
   if yard is semantically versioned, use:
     add_development_dependency 'yard' , '~> 0.8' , '>= 0.8.5.2'
WARNING:  open-ended dependency on bluecloth (>= 0 , development) is not recommended
   if bluecloth is semantically versioned, use:
     add_development_dependency 'bluecloth' , '~> 0'
WARNING:  See http: //guides.rubygems.org/specification-reference/ for help
   Successfully built RubyGem
   Name: eventmachine
   Version: 1.0 . 3
   File: eventmachine- 1.0 . 3 .gem
Building native extensions.  This could take a while ...
Successfully installed eventmachine- 1.0 . 3
Installing ri documentation for eventmachine- 1.0 . 3
1 gem installed
Installing Directory Service
已删除 1 规则。
确定。
 
没有与指定标准相匹配的规则。
WinRunner Exe: C:\Iron\ 0.0 . 0 \dea_ng\go\winrunner.exe
Dea Path: C:\IronFoundry\dea_ng\config\dea.yml
2014 / 12 / 02 17 : 26 : 34 failed to stop IFDeaDirSvc: could not send control= 1 : The service has not been started.
确定。
确定。
Finished Installing Directory Service
Installing dea_ng Service
已删除 1 规则。
确定。
 
没有与指定标准相匹配的规则。
[SC] CreateService 成功
[SC] ChangeServiceConfig2 成功
确定。
确定。
Finished Installing dea_ng Service
Reconfiguring DEA to auto start and restart
[SC] ChangeServiceConfig 成功
[SC] ChangeServiceConfig2 成功
Creating local user IFWardenService and adding to Administrators
Installing warden service
2014 - 12 - 02 17 : 26 : 40.7984 |INFO| 1 |Program|Current directory is: 'C:\Iron\0.0.0\if_warden'
2014 - 12 - 02 17 : 26 : 41.0015 |INFO| 1 |HostFactory|Configuration Result:
[Success] Name ironfoundry.warden
[Success] DisplayName Iron Foundry Warden Service
[Success] Description Iron Foundry Warden Service
[Success] ServiceName ironfoundry.warden
2014 - 12 - 02 17 : 26 : 41.0172 |INFO| 1 |HostConfiguratorImpl|Topshelf v3. 1.122 . 0 , .NET Framework v4. 0.30319 . 33440
2014 - 12 - 02 17 : 26 : 41.0328 |DEBUG| 1 |StopHost|Stopping ironfoundry.warden
2014 - 12 - 02 17 : 26 : 41.0484 |INFO| 1 |WindowsHostEnvironment|The ironfoundry.warden service is not running.
2014 - 12 - 02 17 : 26 : 41.0484 |INFO| 1 |StopHost|The ironfoundry.warden service was stopped.
2014 - 12 - 02 17 : 26 : 41.3140 |INFO| 1 |Program|Current directory is: 'C:\Iron\0.0.0\if_warden'
2014 - 12 - 02 17 : 26 : 41.5172 |INFO| 1 |HostFactory|Configuration Result:
[Success] Name ironfoundry.warden
[Success] DisplayName Iron Foundry Warden Service
[Success] Description Iron Foundry Warden Service
[Success] ServiceName ironfoundry.warden
2014 - 12 - 02 17 : 26 : 41.5328 |INFO| 1 |HostConfiguratorImpl|Topshelf v3. 1.122 . 0 , .NET Framework v4. 0.30319 . 33440
2014 - 12 - 02 17 : 26 : 41.5484 |DEBUG| 1 |UninstallHost|Uninstalling ironfoundry.warden
 
正在开始卸载。
2014 - 12 - 02 17 : 26 : 41.6422 |INFO| 1 |HostInstaller|Uninstalling ironfoundry.warden service
正在移除 EventLog 源 ironfoundry.warden。
正在从系统中移除服务 ironfoundry.warden...
已成功地从系统中移除服务 ironfoundry.warden。
卸载完成。
2014 - 12 - 02 17 : 26 : 46.9859 |INFO| 1 |Program|Current directory is: 'C:\Iron\0.0.0\if_warden'
2014 - 12 - 02 17 : 26 : 47.2203 |INFO| 1 |HostFactory|Configuration Result:
[Success] Name ironfoundry.warden
[Success] DisplayName Iron Foundry Warden Service
[Success] Description Iron Foundry Warden Service
[Success] ServiceName ironfoundry.warden
2014 - 12 - 02 17 : 26 : 47.2359 |INFO| 1 |HostConfiguratorImpl|Topshelf v3. 1.122 . 0 , .NET Framework v4. 0.30319 . 33440
2014 - 12 - 02 17 : 26 : 47.2672 |DEBUG| 1 |InstallHost|Attempting to install 'ironfoundry.warden'
正在运行事务处理安装。
正在开始安装的“安装”阶段。
2014 - 12 - 02 17 : 26 : 47.3922 |INFO| 1 |HostInstaller|Installing Iron Foundry Warden Service service
正在安装服务 ironfoundry.warden...
已成功安装服务 ironfoundry.warden。
正在日志 Application 中创建 EventLog 源 ironfoundry.warden...
2014 - 12 - 02 17 : 26 : 47.8296 |DEBUG| 1 |HostInstaller|Opening Registry
2014 - 12 - 02 17 : 26 : 47.8296 |DEBUG| 1 |HostInstaller|Service path: "C:\Iron\0.0.0\if_warden\IronFoundry.Warden.Service.exe"
2014 - 12 - 02 17 : 26 : 47.8296 |DEBUG| 1 |HostInstaller|Image path: "C:\Iron\0.0.0\if_warden\IronFoundry.Warden.Service.exe"  -displayname "Iron Foundry Warden Service" -servicename "ironfoundry.warden"
2014 - 12 - 02 17 : 26 : 47.8296 |DEBUG| 1 |HostInstaller|Closing Registry
“安装”阶段已成功完成,正在开始“提交”阶段。
“提交”阶段已成功完成。
已完成事务处理安装。
Creating Group for Warden Users: WardenUsers
Group already exists.
Updating configuration file
IronFoundry Installed
PS C:\Iron>

 

 

七、启动Windows DEA 服务,出现如下信息,表示启动成功。

?
PS C:\Iron> .\start- if -services.ps1
Starting IronFoundry for .NET Services...
警告: 正在等待服务“Iron Foundry DEA (IFDeaSvc)”启动...
警告: 正在等待服务“Iron Foundry DEA (IFDeaSvc)”启动...
PS C:\Iron> .\stop- if -services.ps1
Stopping IronFoundry for .NET Services...
PS C:\Iron>

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值