Difference between revisions of "SocialStack Cloud"

From SocialStack
(Created page with "SocialStack Cloud is a service for simplifying the process of deploying and managing a cluster of servers running a dotnet project. It can create servers on a variety of cloud...")
 
Line 46: Line 46:
}
}
</syntaxhighlight>
</syntaxhighlight>
= Cloud Build =
Optionally during project creation, specify where your source is. Currently it must be a git repository and one which is accessible via classic git authentication (A personal access token over https rather than an SSH key).
Cloud build works by using the stage server of the project. This way the code of a given project is always isolated into a dedicated cluster of servers and it can do a pull rather than a full checkout for often large gains in build speed. Because of this, there are a few important notes:
* The stage server needs enough RAM to run your site and the build. The "medium" server option is usually appropriate. This is usually a battle between Babel (the javascript transpiler) which uses some 600MB on its own and MySQL which will take as much RAM as it can get. If a build is running very slowly or the stage site appears to have gone offline whilst a build is happening, it's because the server has ran out of RAM. Connecting to the server and stopping MySQL is usually the easiest way to allow a build through on a small stage server.
* The checkout goes in to /var/www/repo on the first stage server created.
* If the checkout failed because the git credentials are wrong, the git credentials go in a git store located at ~/.git-credential of the root user.


= SocialStack Cloud Source =
= SocialStack Cloud Source =


The SocialStack project is currently a private repository [https://source.socialstack.dev/infrastructure/socialstack-cloud located here].
The SocialStack project is currently a private repository [https://source.socialstack.dev/infrastructure/socialstack-cloud located here].

Revision as of 11:21, 15 November 2022

SocialStack Cloud is a service for simplifying the process of deploying and managing a cluster of servers running a dotnet project. It can create servers on a variety of cloud platforms (AWS, DigitalOcean, Azure) and then setup routing including DNS and loadbalancers. This is always in the form of "bring your own cloud platform account" to ensure that you have maximum access to your own sites and services.

Currently SocialStack Cloud is a non-public service and requires an administrator account to use. As SocialStack Cloud is itself a SocialStack site, anyone who is already an administrator can grant access to a new user account by changing its role once they have registered here.

Creating a project

To create a new project, first go to the project list and click the new project button. You'll need to give your project a name and specify the cloud platform account to use. Here's sample platform configuration for the 3 main cloud platforms:

AWS

Create an access key following the guide here.

{
    "AWS": {
        "AccessKeyId": "abcabc..",
        "SecretAccessKey": "abcabc.."
    }
}

DigitalOcean

Create an access token for the account you would like to use. It's recommended to create a team, optionally per project, so you can better monitor individual project resources and their costs.

{
    "DigitalOcean": {
        "ApiKey": "abcabcabcabc.."
    }
}

Azure

Create an Azure active directory service principal following the guide here.

{
    "Azure": {
        "TenantId": "...",
        "ClientId": "...",
        "ClientSecret": "...",
        "SubscriptionId": "..."
    }
}

Cloud Build

Optionally during project creation, specify where your source is. Currently it must be a git repository and one which is accessible via classic git authentication (A personal access token over https rather than an SSH key).

Cloud build works by using the stage server of the project. This way the code of a given project is always isolated into a dedicated cluster of servers and it can do a pull rather than a full checkout for often large gains in build speed. Because of this, there are a few important notes:

  • The stage server needs enough RAM to run your site and the build. The "medium" server option is usually appropriate. This is usually a battle between Babel (the javascript transpiler) which uses some 600MB on its own and MySQL which will take as much RAM as it can get. If a build is running very slowly or the stage site appears to have gone offline whilst a build is happening, it's because the server has ran out of RAM. Connecting to the server and stopping MySQL is usually the easiest way to allow a build through on a small stage server.
  • The checkout goes in to /var/www/repo on the first stage server created.
  • If the checkout failed because the git credentials are wrong, the git credentials go in a git store located at ~/.git-credential of the root user.

SocialStack Cloud Source

The SocialStack project is currently a private repository located here.