forked from phoenix/litellm-mirror
(feat) auto-scale
This commit is contained in:
parent
702e46b53d
commit
2f960a9651
1 changed files with 38 additions and 11 deletions
|
@ -1,17 +1,44 @@
|
||||||
---
|
|
||||||
Resources:
|
Resources:
|
||||||
LiteLLMServer:
|
LiteLLMServer:
|
||||||
Type: "AWS::EC2::Instance"
|
Type: AWS::EC2::Instance
|
||||||
Properties:
|
Properties:
|
||||||
AvailabilityZone: "us-east-1a"
|
AvailabilityZone: us-east-1a
|
||||||
ImageId: "ami-0f403e3180720dd7e" # Replace with your desired AMI ID
|
ImageId: ami-0f403e3180720dd7e
|
||||||
InstanceType: "t2.micro"
|
InstanceType: t2.micro
|
||||||
|
|
||||||
|
LiteLLMServerAutoScalingGroup:
|
||||||
|
Type: AWS::AutoScaling::AutoScalingGroup
|
||||||
|
Properties:
|
||||||
|
AvailabilityZones:
|
||||||
|
- us-east-1a
|
||||||
|
LaunchConfigurationName: !Ref LiteLLMServerLaunchConfig
|
||||||
|
MinSize: 1
|
||||||
|
MaxSize: 3
|
||||||
|
DesiredCapacity: 1
|
||||||
|
HealthCheckGracePeriod: 300
|
||||||
|
|
||||||
|
LiteLLMServerLaunchConfig:
|
||||||
|
Type: AWS::AutoScaling::LaunchConfiguration
|
||||||
|
Properties:
|
||||||
|
ImageId: ami-0f403e3180720dd7e # Replace with your desired AMI ID
|
||||||
|
InstanceType: t2.micro
|
||||||
|
|
||||||
|
LiteLLMServerScalingPolicy:
|
||||||
|
Type: AWS::AutoScaling::ScalingPolicy
|
||||||
|
Properties:
|
||||||
|
AutoScalingGroupName: !Ref LiteLLMServerAutoScalingGroup
|
||||||
|
PolicyType: TargetTrackingScaling
|
||||||
|
TargetTrackingConfiguration:
|
||||||
|
PredefinedMetricSpecification:
|
||||||
|
PredefinedMetricType: ASGCPUUtilization
|
||||||
|
TargetValue: 60.0
|
||||||
|
|
||||||
LiteLLMDB:
|
LiteLLMDB:
|
||||||
Type: "AWS::RDS::DBInstance"
|
Type: AWS::RDS::DBInstance
|
||||||
Properties:
|
Properties:
|
||||||
AllocatedStorage: 5
|
AllocatedStorage: 5
|
||||||
Engine: "postgres"
|
Engine: postgres
|
||||||
MasterUsername: "litellmAdmin" # Replace with your desired master username
|
MasterUsername: litellmAdmin
|
||||||
MasterUserPassword: "litellmPassword" # Replace with your desired secure password
|
MasterUserPassword: litellmPassword
|
||||||
DBInstanceClass: "db.t3.micro"
|
DBInstanceClass: db.t3.micro
|
||||||
AvailabilityZone: "us-east-1a"
|
AvailabilityZone: us-east-1a
|
Loading…
Add table
Add a link
Reference in a new issue