Docker Compose Installation to AWS
Quick installation Start SpaceCode On-Premises installation to AWS in one click: During the installation, you will be asked to specify the stack settings. If you cannot find a suitable region in the list above, click any link and choose the region you need in the top right corner of the AWS CloudFormation console. |
The AWS Docker Compose installation provides the easiest way to get your own SpaceCode On-Premises instance, especially for those who don't have access to dedicated infrastructure. This is practically the same Docker Compose installation as on a local machine, but with the following differences:
All SpaceCode components are deployed to a single AWS EC2 instance. You choose the instance size during the installation.
It is not possible to split the SpaceCode components into separate instances as with the local Docker Compose installation.
AWS RDS is used for the SpaceCode database.
AWS S3 is used for the SpaceCode file storage.
Supported AWS regions
|
|
|
Install SpaceCode On-Premises to Amazon EC2
Installation to Amazon EC2 implies using an AWS CloudFormation template to deploy a stack with your own SpaceCode On-Premises instance. You can do this in the AWS Management Console.
Make sure you have an AWS account.
Open the AWS CloudFormation service in the AWS Management Console.
Click Create stack.
In Prepare template, select Template is ready.
In Template source, select Amazon S3 URL and specify the URL:
https://on-premises-assets-eu-west-1.s3.eu-west-1.amazonaws.com/2024.2.2/aws-cfn-template.jsonClick Next and specify the stack name and other parameters:
Stack name
(Required) The name of the stack for your SpaceCode instance.
AdminEmail
(Required) The email address of the SpaceCode administrator.
AdminUsername
(Required) Administrator username.
AdminPassword
(Required) Administrator password.
HostedZoneName
The DNS name of an existing Amazon Route 53 hosted zone where you want to host your SpaceCode instance, for example,
mycompany.comIf you don't have a hosted zone, you can:
Leave this parameter empty. In this case, the template will generate a URL for your SpaceCode instance automatically using the nip.io service. Note that HTTPS is not available for the auto-generated URLs.
Register a new domain name in the Amazon Route 53 service. By default, when creating a domain, AWS will create a corresponding hosted zone for it. The hosted zone name is equal to the domain name.
Size
(Optional) The size of the provided resources. Possible values are:
Small: (Default) A
t4g.xlargeinstance for the main application and adb.t4g.mediuminstance for the database. 50GB of allocated storage for the database.Medium: A
t4g.xlargeinstance for the main application and adb.t4g.largeinstance for the database. 100GB of allocated storage for the database.Large: A
t4g.2xlargeinstance for the main application and adb.t4g.largeinstance for the database. 200GB of allocated storage for the database.
See details about the T4g instances in the official AWS documentation.
Click Next.
Do not change any other options on all following pages and just skip them by clicking Next.
Before clicking Submit, make sure to select I acknowledge that AWS CloudFormation might create IAM resources. This is required as the template creates IAM roles for the SpaceCode instance.
AWS CloudFormation will start creating a stack with SpaceCode On-Premises. This may take a while. After your stack is created, you can see the SpaceCode URL on the stack's Outputs tab.
Perform post-installation administration activities:
If you want to use SpaceCode on mobile clients, configure push notifications.
If you want to enable mail notifications in SpaceCode, configure the mail server. Note that your SpaceCode instance comes without a mail server. If you don't have an existing mail server, you can create one using the Amazon Simple Email Service.
Customize the SpaceCode On-Premises in Amazon EC2 installation
Generally, the installation of SpaceCode On-Premises to AWS is not supposed to be customized. You can only change some of the parameters you provided when creating a stack: the size of the provided resources and the hosted zone name.
To change these parameters:
Open the AWS CloudFormation service in the AWS Management Console.
Open the stack with SpaceCode On-Premises.
Click Update and change the required parameters.
Note that you cannot change the AdminEmail, AdminUsername, and AdminPassword parameters once the stack is created. Even if you update the corresponding values, they will not be applied.
Do not change any other options and click Next.
Click Submit.
Backup and restore of the SpaceCode On-Premises in Amazon EC2 installation
We strongly recommended that you back up your data regularly. This way, you can restore your SpaceCode installation in case of unexpected issues.
Technically, a backup of SpaceCode On-Premises in AWS Cloudformation is a composite backup that consists of several parts: backups of SpaceCode data and a backup of the AWS CloudFormation stack.
To back up your SpaceCode On-Premises instance
Create a backup of your SpaceCode data:
Open your SpaceCode On-Premises instance in a browser.
On the main menu, click
Administration and choose Database Backups.Click Create backup.
Create a backup of your AWS CloudFormation stack.
AWS lets you create on-demand backups or schedule them. Follow the official Amazon recommendations.
As a result, you will get a composite backup that consists of:
A backup of your stack configuration.
A backup of S3 buckets that store the SpaceCode data backup you created in step 1.
To restore your SpaceCode On-Premises instance
Open your AWS account.
Open the AWS Backup console, then Protected resources.
In Recovery points, find your composite backup and unfold it.
Select the backup with the CloudFormation configuration. You can find this backup by the CloudFormation value in the Resource type column.
Click Restore. During the restore, you will be asked to provide the same settings you provided during the installation. After the restore is complete, you will get a new stack with a clean SpaceCode On-Premises instance.
Return to the Protected resources page and select the backup with the SpaceCode database. You can find this backup by the
spacebucketword in its ID, for example,my-onprem-instance-spacebucket-1bdai-29239793114334-a04ca4e3.Click Restore. During the restore, provide the following settings:
In Restore type, choose Restore entire bucket.
In Restore destination, choose Use existing bucket.
In Bucket name, choose the bucket created for your restored SpaceCode On-Premises instance. The bucket contains the
spacebucketword in its ID, for example,my-restored-instance-spacebucket-n0ulpds2xcks.
Wait until the restore is complete.
Return to the Protected resources page and in the same way as before, restore all other backups:
SpaceCode Packages backup: contains the
packagesbucketword in its ID.VCS backup: contains the
vcssbucketword in its ID.Automation backups: contain the
automationword in their IDs.
In a browser, open the Database Backups page of your restored SpaceCode On-Premises instance, for example,
https://my-instance.url/manage/db-backupsImportant: If you open the index page of your instance, you will be asked to provide your SpaceCode license key. Do not do this! Your license key is already stored in the database backup.
On the Database Backups page, click Restore next to the available backup.