ORLEANS REMOTE DEPLOYMENT
Orleans Remote Deployment
Table of Contents
Overview: 1
Prerequisites. 2
Deployment Steps. 2
Orleans Deployment Manifest 3
Orleans Silo Configuration. 4
Gateway Load Shedding. 5
Orleans Powershell Scripts. 6
Deploying Orleans using Powershell Script 6
Confirming Orleans Status. 7
Monitoring Orleans. 7
Gathering Orleans Log Files. 8
Removing Orleans. 8
Overview:
Orleans based services are xcopy deployable. All you need to do to deploy an Orleans based service to a set of machines is copy the following set of file to the target machines and start the OrleansHost.exe host process:
- · Content of [SDK-Root]\Binaries\OrleansServer folder
- · OrleansConfiguration.xml file with configuration for the deployment to replace the default placeholder from [SDK-Root]\Binaries\OrleansServer
- · Binaries with grain interfaces and grain implementation classes of the service along with any external dependencies to Application\<service name> subdirectory of the folder on the target with binaries from [SDK-Root]\Binaries\OrleansServer
This simple task may be accomplished in many different ways and with different tools, such as Autopilot. The SDK includes a set of PowerShell scripts that provide a way to deploy an Orleans based service to a cluster of machines and remote start the hosting processes on them. There are also scripts for un-deploying a service, monitoring its performance, start and stop it, and collect logs. These are the scripts we found useful for ourselves while building and testing Orleans.
Prerequisites
The following table lists the prerequisites for deploying and running Orleans on a remote machine:
|
Prerequisite |
Details |
|
.Net Framework 4.0 |
Orleans runs under the .Net Framework 4.0, which can be installed from this link: http://www.microsoft.com/downloads/details.aspx?FamilyID=9cfb2d51-5ff4-4491-b0e5-b386f32c0992&displaylang=en |
|
Powershell 2.0 with WinRM |
Windows 7 and Windows Server 2008 R2 should have these installed by default. To confirm you are running the required version of |
|
WinRM Configuration |
Both the source and target machines must be configured winrm quickconfig |
|
Increase PowerShell job memory |
Set the memory limit Set-Item To change it on a
|
|
PowerShell Execution Policy set to run remote scripts |
Open a PowerShell window as an Administrator and run the command Set-ExecutionPolicy RemoteSigned This will set the machine to require signing for remote scripts |
Deployment Steps
Note that the user running the scripts
must be a member of the Administrators Group on the remote machines.
The basic steps are as follows:
1.
Setup a deployment manifest
(Deployment.xml).
2.
Adjust the Orleans
Configuration (OrleansConfiguration.xml) to suit the environment.
3.
Run the PowerShell deployment
scripts to deploy Orleans into your remote environment.
Orleans Deployment Manifest
The Orleans Deployment scripts use a
manifest (XML) file to specify details of the deployment, including source and
destination locations and local or remote machines to be deployed to.
By making small changes to an existing
deployment manifest xml file (typically by listing the different host
machines), the same PowerShell scripts can deploy and run that Orleans system
on a set of remote machines with equal ease as deploying and running that
system on the local machine.
The default file name for the manifest
is Deployment.xml, and if you just modify this file, it will not be necessary
to specify a different name. There are
times, such as during testing, it may be advantageous to maintain multiple
deployment files that specify a different set of silos. These other files may be specified explicitly
to the deployment tools as specified in the respective sections below.
A Deployment manifest contains many
different items, which collectively allow deployment of the Orleans runtime and
applications onto a variety of local and remote configurations:
- ·
Source location for the Orleans system runtime
o Located in the “Path” attribute of the <Deployment><Packages><Package>
element where the “Type” attribute is set to “System”.
o Typically: [ORLEANS-SDK]\Binaries\OrleansServer.
o
Example: <Package Name="Orleans Runtime"
Type="System" Path="." />
- ·
Source location for any
additional Orleans applications / grains
to be included in this Orleans system
o
Also located in the
<Deployment><Packages><Package> nodes.
o
The “Type” attribute must be set to “Application”.
o
Use the “Filter” attribute to
constrain the files deployed
o
<Package
Name="Chirper" Type="Application"
Path="..\Binaries\Applications\Chirper" />
- ·
Source location for the server configuration file to be used by
the Orleans host process
o
Located in the “Path” attribute
<Deployment><RuntimeConfiguration> element.
o
The file name must be OrleansConfiguration.xml – if necessary,
just change the path.
o
Example: <RuntimeConfiguration
Path=".\OrleansConfiguration.xml" />
- ·
Target location to install the Orleans
server-side binaries on each machine.
Typically: C:\Orleans (for test or production nodes) or [ORLEANS-SDK]\LocalSilo (for the local development silo).
o
Located in the <Deployment><TargetLocation>
element.
o
Must be an absolute path (i.e. no “..”
locations).
o
Example: <TargetLocation
Path="C:\Orleans" />
- ·
The set of silos (host machines and optional silo names) this Orleans system
should to be deployed to.
o Located in the <Deployment><Nodes><Node> elements.
o Typically: Primary on localhost, or multiple machines with one silo each.
o The “HostName” attribute specifies the machine name.
o The “NodeName” attribute specifies the name of the silo. Generally, this is arbitrary, with the
exception that if multiple silos will run
on any one machine, then silo names must be unique.
o Example:
<Nodes>
<Node
HostName="MACHINE1" NodeName="Primary" />
<Node
HostName="MACHINE2" NodeName="Node2" />
<Node
HostName="MACHINE3" NodeName="Node3" />
<Nodes />
- ·
Deployment Group ID – this is a GUID
which distinguishes one Orleans runtime system from another, even if both
Orleans systems are running on the same machines.
o
Located in the
<Deployment> element.
o
Example:
<Deployment
Name="Deployment1"
DeploymentGroup="F219832A-1EE1-45DA-B35D-0BB3060C9FDA"
xmlns="urn:xcg-deployment">
Orleans Silo Configuration
Refer to the configuration guide - Orleans-Configuration.docx
- for information on how to configure silos.
Orleans Powershell Scripts
The following sections detail the
PowerShell scripts provided with Orleans to aid with deployment and monitoring.
(Use the /? option to get the latest usage info directly from the scripts.)
|
Script Name |
Parameters |
Description |
|
DeployOrleansSilos.ps1 |
[$deploymentConfigFile] |
Copies the Orleans files to machines specified in the |
|
UndeployOrleansSilos.ps1 |
[$deploymentConfigFile] |
Stops and removes Orleans from the |
|
MonitorOrleansSilos.ps1 |
[$deploymentConfigFile] [$networkInstance] [$repeatHeaderInFile |
Monitors CPU, Memory, Network Send, and |
|
ShowOrleansSilos.ps1 |
[$deploymentConfigFile] |
Does a quick survey of the deployment |
|
GatherOrleansSiloLogs.ps1 |
[$deploymentConfigFile] [$outputPath] |
Retrieve all log files from deployment |
|
UtilityFunctions.ps1 |
none |
Provides ancillary functionality to the |
Deploying Orleans using Powershell
Script
Start a separate
PowerShell command window as an administrator.
Execute the DeployOrleansSilos.ps1script, providing the location of the deployment configuration file
(deployment.xml is the default and will be used if you don’t supply a value).
Examples: .\DeployOrleansSilos.ps1
.\DeployOrleansSilos.ps1
C:\Orleans\MyDeploy.xml
The deployment
will execute the following steps:
1.
Stop any running instances of Orleans that are running on the
deployment machines.
2.
Copy the Orleans files and any application files that are listed in
the deployment manifest.
3.
When the copy is completed, start the silos. This will pause after starting the first silo
so that it is available for the other silos to register with.
4.
Pause to allow the start-up to complete.
5.
Report the progress of the deployment.
When the deployment is complete, Orleans
is ready for clients to connect to it.
Confirming Orleans Status
To determine if Orleans is running on
the servers in the deployment manifest, run the ShowOrleansSilos.ps1 script.
If you have used a deployment manifest
file named something other than the default, specify it on the command line.
Examples:
.\ShowOrleansSilos.ps1
.\ShowOrleansSilos.ps1
C:\Orleans\MyDeploy.xml
Monitoring Orleans
Once Orleans is
deployed, you can start an optional script that will monitor the Orleans
deployment using standard performance counters.
Run a dedicated PowerShell command prompt as an administrator, and
execute the .\MonitorOrleans.ps1
script to start monitor performance counters for an Orleans Deployment.
The following
parameters configure the monitoring to suit individual circumstances:
|
Parameter |
Description |
Default |
|
DeploymentConfigFile |
The deployment manifest used to install |
Deployment.xml |
|
NetworkInstance |
The name of the network for the network performance counters. |
corp |
|
SamplesToLog |
The number of samples to record in the |
480 which taken in one minute intervals |
|
HeaderInterval |
The number of samples to write before repeating the header. |
10 |
|
RepeatHeaderInFile |
If this switch is present, the header will |
Only include the header at the top of the |
The script will
store the data in the following types listed below. The files will be written to a folder called PerformanceData
under the directory where the monitoring script is run from.
|
File |
Description |
FileNameBase |
|
|
Machine Specific |
Contains only the data for a single |
“PerfData-“ + the machine name and the Date/Time stamp. |
|
|
Combined |
Contains all of the data for all machines consolidated into a |
“ConsolidatedPerfData-“ |
|
Gathering Orleans Log Files
To retrieve all log files from
deployment silos and store them in the specified output folder, run the GatherOrleansSiloLogs.ps1 script.
If you have used a deployment manifest
file named something other than the default, specify it on the command line.
You may also specify an output folder where the collected log files will be
stored otherwise a .\logs subdirectory will
be used by default.
Examples:
.\GatherOrleansSiloLogs.ps1
.\GatherOrleansSiloLogs.ps1
C:\Orleans\MyDeploy.xml
.\GatherOrleansSiloLogs.ps1
C:\Orleans\MyDeploy.xml C:\MyLogs
Removing Orleans
When it is time to remove an Orleans
deployment, use the UndeployOrleansSilos.ps1 script.
If you have used a deployment manifest
file named something other than the default, specify it on the command line.
Examples:
.\UnDeployOrleansSilos.ps1
.\UnDeployOrleansSilos.ps1 C:\Orleans\MyDeploy.xml
ORLEANS REMOTE DEPLOYMENT的更多相关文章
- Spark如何使用Akka实现进程、节点通信的简明介绍
<深入理解Spark:核心思想与源码分析>一书前言的内容请看链接<深入理解SPARK:核心思想与源码分析>一书正式出版上市 <深入理解Spark:核心思想与源码分析> ...
- jboss-as 目录结构(转)
jboss-as 目录结构(Directory Structure) Directory Description bin Contains startup, shutdown and other sy ...
- 升级、备份红帽PaaS openshift 上的 wordpress
红帽提供了一个很稳定的PAAS服务平台:openshift!此博客即作为wordpress建在里面. 这里记录怎样升级与备份wordpress. 预备: 安装 openshift command li ...
- Jenkins 七: 部署到Tomcat
在build.xml定义了打包target之后,我们可以将打包生成的war文件直接部署到tomcat. 1. 建立Tomcat用户. 打开Tomcat安装路径下的 conf/tomcat-users. ...
- Java RMI 入门案例
Java Remote Method Invocation(Java RMI) 是一个 Java API, 执行远程方法的调用,相当于 Remote Procedure Calls(RPC).Java ...
- jboss-AS目录结构了解(资料摘取)
Directory Description bin Contains startup, shutdown and other system-specific scripts. Basically al ...
- SPARK如何使用AKKA实现进程、节点通信
SPARK如何使用AKKA实现进程.节点通信 <深入理解Spark:核心思想与源码分析>一书前言的内容请看链接<深入理解SPARK:核心思想与源码分析>一书正式出版上市 < ...
- Akka(9): 分布式运算:Remoting-远程构建式
上篇我们讨论了Akka-Remoting.我们说Akka-Remoting是一种点对点的通讯方式,能使两个不同JVM上Akka-ActorSystem上的两个Actor之间可以相互沟通.Akka-Re ...
- 使用 dotnet core 和 Azure PaaS服务进行devOps开发(Web API 实例)
作者:陈希章 发表于 2017年12月19日 引子 这一篇文章将用一个完整的实例,给大家介绍如何基于dotnet core(微软.NET的最新版本,支持跨平台,跨设备的应用开发,详情请参考 https ...
随机推荐
- 如何用MediaCapture解决二维码扫描问题
二维码扫描的实现,简单的来说可以分三步走:“成像”.“截图”与“识别”. UWP开发中,最常用的媒体工具非MediaCapture莫属了,下面就来简单介绍一下如何利用MediaCapture来实现扫描 ...
- 基于Winform、WPF等的客户端文件下载
有时候,我们用C#写一些客户端应用程序需要从服务器下载一些资源,如图片.dll.配置文件等.下面就来说一下,在Winform及WPF中如何下载文件. 我们的资源大多放在自己的网站上,或者从其他网站下载 ...
- Java提高篇(三四)-----fail-fast机制
在JDK的Collection中我们时常会看到类似于这样的话: 例如,ArrayList: 注意,迭代器的快速失败行为无法得到保证,因为一般来说,不可能对是否出现不同步并发修改做出任何硬性保证.快速失 ...
- Unity3D热更新全书-脚本(二) 两级分化
上篇明确了我们探讨的脚本是什么:是写在文本文件里面的代码,可以作为资源加载,取得字符串再执行. 可是为什么世界上会有那么多的脚本?而其使用方法完全看起来不一样呢?这是因为每种脚本都有自己的定位,在不同 ...
- 腾讯Ubuntu云虚拟主机设置ftp服务器
刚申请了免费的腾讯云主机, 发现还要想办法自己的服务器代码传到云主机上 在网上搜了很多方法介绍, 照着设置完后都无法正常连接 最后半夜尿醒来睡不着找到一篇站内文章, 提到必须注释掉一行代码 这个是其他 ...
- JavaScript语法、对话框。分支语句
一.用法 其所在的位置有三块,1.head里面 2.body里面 3.</html>后 一般都写在</html>后 其用法为<script></scr ...
- iOS-应用上架
其实挺讨厌苹果这一套上架机制,审核周期长,而且网速又慢,但又没办法,只能上架到AppStore,无奈. 上架前需要确保应用图标齐全,并在Info.plist中的Icon files添加了png图片,不 ...
- linux命令 - ln - 创建和删除软、硬链接
linux命令 - ln - 创建和删除软.硬链接 在Linux系统中,内核为每一个新创建的文件分配一个Inode(索引结点),每个文件都有一个惟一的inode号.文件属性保存在索引结点里,在访问文件 ...
- Android 自定义View及其在布局文件中的使用示例(三):结合Android 4.4.2_r1源码分析onMeasure过程
转载请注明出处 http://www.cnblogs.com/crashmaker/p/3549365.html From crash_coder linguowu linguowu0622@gami ...
- 【解决方案】安装vssdk_full.exe遇到的问题
Stop Block: CompatibilityMode : Windows Program Compatibility mode is on. Turn it off and then try S ...