aws-samples / aws-serverless-nextcloud

moved - https://github.com/f7o/aws-serverless-nextcloud
MIT No Attribution
86 stars 25 forks source link
aurora aws ecs nextcloud serverless

Nextcloud Container Deployment on AWS - Serverless

Welcome

This repository provides AWS CloudFormation templates to deploy NextCloud on AWS completely. No need to manage servers or manually react to monitoring events with adding capacity manually.

AWS Services & How they match the NextCloud design

Quickstart

You can use the following link to deploy this solution directly into your AWS account. Ensure you are logged into the AWS Console before following it.

Quickstart CloudFormation Link

Deployment

This project assumes a familiarity with AWS CLI and AWS CloudFormation. Additional reference can be found at the following links: https://aws.amazon.com/cli/ https://aws.amazon.com/cloudformation/

Architecture

Architecture Diagram

Sizing

The recommendation is to use the at least the default values to get decent performance (cpu: 1024, mem: 2048). A desired container capacity of 2 allows scaling and re-deployment without downtime. For initialization go with a single container to avoid clashes when copying files during the setup phase.

The baseline cost drivers are the AWS RDS database, ElastiCache Redis and Fargate task costs. Find the hourly charged costs for your AWS region within the AWS pricing pages:

How to upgrade Nextcloud to newer version

  1. Create backups of RDS and EFS
  2. Suspend AutoScaling using the CloudFormation parameter
  3. Scale in to 1 task (set desired ECS capacity to 1)
  4. Update CFN stack with new version number
  5. Wait for Nextcloud to become available
  6. Verify the upgrade was successful
  7. Scale out service to desired size and disable AutoScaling suspension

Future Work

Monitoring

Sample CloudWatch Dashboard pre-configured with basic metrics will be deployed within CloudFormation

CW-Dashboard

Note:

Security

See CONTRIBUTING for more information.

License

This library is licensed under the MIT-0 License. See the LICENSE file.

This deployment references the official Nextcloud Docker image which is published under AGPL-3.0 License.