Paas环境中的服务堆栈

lee*_*nth 3 azure paas servicestack amazon-elastic-beanstalk

我们有一个方向,那就是该公司应该朝着PaaS(平台即服务)类型的架构发展。我们在ServiceStack.net中开发了服务,而PaaS容器可用于托管在servicestack.net中开发的基于.net的Web服务。ServiceStack是否将提供以下任何托管服务,例如Amazon BeanStalk,Azure Cloud Service?

谢谢

myt*_*thz 5

ServiceStack实际上只是一个标准的ASP.NET Web应用程序,因此可以轻松地部署到ASP.NET Web Apps可以使用的任何位置。

ServiceStack还托管有关部署到AWS的不同方式的指南:

使用AWSSDK

使用MS WebDeploy到AWS

使用章鱼部署

The servicestack.net website is itself deployed on AWS and takes advantage of managed PostgreSQL Databases on AWS RDS and utilizes other AWS features like Amazon SES.

Azure

Since it's just a normal ASP.NET Web Application it was also trivial to deploy on Azure by following the rough guide below:

  1. Create a new Website in Azure Portal
  2. Download the Download the publish profile (link under Publish your App heading) to download the WebDeploy publish profile settings for the new website and save locally
  3. Right-click on the ServiceStack top-level ASP.NET Project and click on Deploy... on the Context Menu.
  4. Import the Azure MS WebDeploy settings saved
  5. Once imported you can then click through the rest of the wizard to deploy your web application

Azure SQL Server

If you're using making use of OrmLite with SQL Server you can create a Basic SQL Server database in the Azure portal. Once the database is created copy the ADO.NET Connection String from the dialog that comes up after clicking the "View SQL Database connection strings for ADO .Net, ODBC, PHP, and JDBC" link in the newly created Database home page.

You can then use the Azure SQL connection string when you register the OrmLite SQL Server connection. To have your Web App use a different SQL Server database locally and Azure DB when it's deployed to Azure you can add this as a Web.Config XDT transform by adding it to Web.Release.config file which runs and replaces your existing Web.config appSetting when it's deployed to Azure:

<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
    <appSettings xdt:Transform="Replace">
        <add key="AppDb" value="{AzureSqlServerConnectionString}"/>
    </appSettings> 
</configuration>
Run Code Online (Sandbox Code Playgroud)