传统Windows服务迁移到Service Fabric [英] Migration of Traditional Windows Service to Service Fabric

查看:89
本文介绍了传统Windows服务迁移到Service Fabric的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为Windows Servers Service Fabric的预览版感到不知所措: 创建和管理正在运行的群集在Windows Server上

I'm kicking the tires on the preview release of Service Fabric for Windows Servers found here: Create and manage a cluster running on Windows Server

我们正在尝试解决人们认为过多的Windows服务无法手动管理的问题,并考虑了可以使服务更加自动管理的基础架构.当前,我们在本地运行,因此我们正在研究Windows Server的Service Fabric,而不是Azure上的Service Fabric.

We are trying to solve the problem of the perception of too many Windows services to manually manage, contemplating infrastructures that would make the services more automatically managed. We currently run on-premises, so we are looking at Service Fabric for Windows Servers, not Service Fabric on Azure.

我有一个在Embarcadero C ++ Builder XE7中编译的本机Windows服务(Windows NT服务),当前将/install本身和/uninstall到Windows Service Control Manager中.该服务使用 WebBroker 绑定到端口以接收HTTP请求.当前正在从Oracle数据库中检索数据.它的范围很小,但在我看来还不够先进,无法称之为微服务.

I have a native Windows service (Windows NT Service) compiled in Embarcadero C++ Builder XE7 that currently /install and /uninstall's itself into the Windows Service Control Manager. The service binds to a port using a WebBroker to receive HTTP requests. Data is currently being retrieved from an Oracle database. It is small in scope, but in my opinion not advanced enough to call a microservice.

这些特定服务不能在控制台上运行.它们通过WinMain()方法而不是main()运行.我们确实利用命令行参数弹出了一个运行服务进程的表单,以便在开发中轻松调试,但是如果在控制台上运行,则不会阻塞.

These particular services do not run with a console. They run via a WinMain() method instead of a main(). We do utilize a command-line parameter to pop up a form that runs the service process for easy debugging in development, but this does not block if run on the console.

以guest虚拟机可执行文件的身份启动和运行该应用程序会涉及什么?是否需要将项目重新编译为控制台应用程序才能在服务结构中运行?您还有其他陷阱吗?

What would be involved in getting this application up and running as a guest executable? Does the project need to be recompiled as a console application to run within service fabric? Any other gotcha's you foresee?

我了解这是一个预览版本,因此,如果RTM中的信息存在差异,我致力于进行研究以更新答案.

I understand that this is a preview release, so I commit to doing the research to get the answer updated if there are discrepancies with the info in the RTM.

推荐答案

  • 此处开始来宾可执行文件.任何可执行文件都可以,否 需要控制台.
  • 要侦听传入流量,需要将端口映射到 ServiceManifest文件.
  • 此处进行解释,以提升的特权运行.
  • 确保可执行文件不需要用户交互 控制台级别.
    • Start here for Guest executables. Any executable will do, no console is needed.
    • Listening for incoming traffic requires ports to be mapped in the ServiceManifest file.
    • Running with elevated privileges is explained here.
    • Make sure your executable doesn't require user interaction at the console level.
    • 这篇关于传统Windows服务迁移到Service Fabric的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆