跳到主要内容

亚马逊网络服务

该篇文档描述了在 AWS 云服务上部署 Verdaccio 的几种方式

EC2

用于部署此堆栈的 CloudFormation 模板

架构:

Clients
|
| (HTTPS)
v
Application Load Balancer
|
| (HTTP)
v
EC2 Auto Scaling Group (Amazon Linux 2)
Docker image (Verdaccio)
|
| (NFS)
v
Elastic File System

Architecture notes: * Deploy this stack into the region closest to your users for maximum performance. * We use an auto scaling group primarily for self-healing. The system requirements of Verdaccio are pretty low, so it's unlikely you'll need multiple instances to handle traffic load. * Because Amazon Linux 2 doesn't include Node, we run Verdaccio as a Docker image rather than natively on the instance. This is faster and more secure than relying on third party package sources for Node. * Elastic File System is cheap and stateful, and works across AZs. An alternative would be the third-party S3 storage plugin. * For backup, use AWS Backup

  • Deploy this stack into the region closest to your users for maximum performance.
  • We use an auto scaling group primarily for self-healing. The system requirements of Verdaccio are pretty low, so it's unlikely you'll need multiple instances to handle traffic load.
  • Because Amazon Linux 2 doesn't include Node, we run Verdaccio as a Docker image rather than natively on the instance. This is faster and more secure than relying on third party package sources for Node.
  • Elastic File System is cheap and stateful, and works across AZs. An alternative would be the third-party S3 storage plugin.
    • For backup, use AWS Backup

Estimated monthly cost for a small installation (in us-east-1): * ALB (1 LCU average): $22.265/mo * EC2 (t3.nano): $3.796/mo * EBS (8gb): $0.80/mo * EFS (5gb): $1.5/mo * Data transfer: (10gb): $0.9/mo * TOTAL: Under $30/mo

  • ALB (1 LCU average): $22.265/mo
  • EC2 (t3.nano): $3.796/mo
  • EBS (8gb): $0.80/mo
  • EFS (5gb): $1.5/mo
  • Data transfer: (10gb): $0.9/mo
  • TOTAL: Under $30/mo

ECS

You can deploy Verdaccio as a task with an ECS Volume for persistent storage.

注意:Fargate 不支持持久性卷,所以你必须使用 S3 存储插件。

EKS

See the documentation pages on Kubernetes and Docker.