servicestack in paas environments

222 views Asked by At

We got a direction that the company should move towards a PaaS (Platform as a service) type of architectures. We have services developed in ServiceStack.net what PaaS containers are available for hosting .net based webservices developed in servicestack.net. will ServiceStack any of the following hosting services such as Amazon BeanStalk, Azure Cloud Service?

Thanks

1

There are 1 answers

1
mythz On BEST ANSWER

ServiceStack is effectively just a standard ASP.NET Web Application so can be easily deployed anywhere ASP.NET Web Apps can.

ServiceStack also hosts guides for different ways of deploying to AWS:

Using AWSSDK

Using MS WebDeploy to AWS

Using Octopus Deploy

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>