Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aws: Increase the default master instance size to reduce etcd timeouts #1069

Merged
merged 1 commit into from
Jan 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion data/data/aws/variables-aws.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ variable "aws_master_ec2_type" {
description = "Instance size for the master node(s). Example: `m4.large`."

# FIXME: get this wired up to the machine default
default = "m4.large"
default = "m4.xlarge"
}

variable "aws_ec2_ami_override" {
Expand Down
10 changes: 8 additions & 2 deletions docs/user/aws/limits.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,14 @@ to be created.

## Instance Limits

By default, a cluster will create 6 nodes (3 masters and 3 workers). Currently, these are m4.large and within a new
account's default limit. If you intend to start with a higher number of workers, enable autoscaling and large workloads
By default, a cluster will create:

* One m4.large bootstrap machine (removed after install)
* Three m4.xlarge master nodes.
* Three m4.large worker nodes.

Currently, these instance type counts are within a new account's default limit.
If you intend to start with a higher number of workers, enable autoscaling and large workloads
or a different instance type, please ensure you have the necessary remaining instance count within the instance type's
limit to satisfy the need. If not, please ask AWS to increase the limit via a support case.

Expand Down
1 change: 1 addition & 0 deletions pkg/asset/machines/master.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ func (m *Master) Generate(dependencies asset.Parents) error {
switch ic.Platform.Name() {
case awstypes.Name:
mpool := defaultAWSMachinePoolPlatform()
mpool.InstanceType = "m4.xlarge"
mpool.Set(ic.Platform.AWS.DefaultMachinePlatform)
mpool.Set(pool.Platform.AWS)
if len(mpool.Zones) == 0 {
Expand Down
5 changes: 2 additions & 3 deletions pkg/asset/machines/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ import (
)

func defaultAWSMachinePoolPlatform() awstypes.MachinePool {
return awstypes.MachinePool{
InstanceType: "m4.large",
}
return awstypes.MachinePool{}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this emptied ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wking ^

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this emptied ?

Because we no longer have any default AWS configuration shared by both masters and workers. They each have their own defaults for instance types (and, with #1079) for volumes, that get applied directly after defaultAWSMachinePoolPlatform() calls. In fact, my preference would be to drop defaultAWSMachinePoolPlatform entirely in favor of an explicit awstypes.MachinePool{} for initializing AWS machine pools.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, maybe this was working around #1076.

}

func defaultLibvirtMachinePoolPlatform() libvirttypes.MachinePool {
Expand Down Expand Up @@ -94,6 +92,7 @@ func (w *Worker) Generate(dependencies asset.Parents) error {
switch ic.Platform.Name() {
case awstypes.Name:
mpool := defaultAWSMachinePoolPlatform()
mpool.InstanceType = "m4.large"
mpool.Set(ic.Platform.AWS.DefaultMachinePlatform)
mpool.Set(pool.Platform.AWS)
if len(mpool.Zones) == 0 {
Expand Down