Skip to content
This repository has been archived by the owner on Oct 30, 2024. It is now read-only.

Commit

Permalink
Fix etcd volume attachment
Browse files Browse the repository at this point in the history
- Set proper dependencies (vm depends on volume and not opposite)
- Set docker disk size to 50GB for master (prevent unnecessary rezizing)
  • Loading branch information
Roman Sokolkov committed Jun 7, 2018
1 parent a789f08 commit 8c1a896
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ const Instance = `{{define "instance"}}
{{ .Instance.Master.Instance.ResourceName }}:
Type: "AWS::EC2::Instance"
Description: Master instance
DependsOn:
- DockerVolume
- EtcdVolume
Properties:
AvailabilityZone: {{ .Instance.Master.AZ }}
IamInstanceProfile: !Ref MasterInstanceProfile
Expand All @@ -19,25 +22,21 @@ const Instance = `{{define "instance"}}
Value: {{ .Instance.Cluster.ID }}-master
DockerVolume:
Type: AWS::EC2::Volume
DependsOn:
- {{ .Instance.Master.Instance.ResourceName }}
Properties:
Encrypted: true
Size: 100
Size: 50
VolumeType: gp2
AvailabilityZone: !GetAtt {{ .Instance.Master.Instance.ResourceName }}.AvailabilityZone
AvailabilityZone: {{ .Instance.Master.AZ }}
Tags:
- Key: Name
Value: {{ .Instance.Master.DockerVolume.Name }}
EtcdVolume:
Type: AWS::EC2::Volume
DependsOn:
- {{ .Instance.Master.Instance.ResourceName }}
Properties:
Encrypted: true
Size: 100
VolumeType: gp2
AvailabilityZone: !GetAtt {{ .Instance.Master.Instance.ResourceName }}.AvailabilityZone
AvailabilityZone: {{ .Instance.Master.AZ }}
Tags:
- Key: Name
Value: {{ .Instance.Master.EtcdVolume.Name }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ const Instance = `{{define "instance"}}
{{ .Instance.Master.Instance.ResourceName }}:
Type: "AWS::EC2::Instance"
Description: Master instance
DependsOn:
- DockerVolume
- EtcdVolume
Properties:
AvailabilityZone: {{ .Instance.Master.AZ }}
IamInstanceProfile: !Ref MasterInstanceProfile
Expand All @@ -19,25 +22,21 @@ const Instance = `{{define "instance"}}
Value: {{ .Instance.Cluster.ID }}-master
DockerVolume:
Type: AWS::EC2::Volume
DependsOn:
- {{ .Instance.Master.Instance.ResourceName }}
Properties:
Encrypted: true
Size: 100
Size: 50
VolumeType: gp2
AvailabilityZone: !GetAtt {{ .Instance.Master.Instance.ResourceName }}.AvailabilityZone
AvailabilityZone: {{ .Instance.Master.AZ }}
Tags:
- Key: Name
Value: {{ .Instance.Master.DockerVolume.Name }}
EtcdVolume:
Type: AWS::EC2::Volume
DependsOn:
- {{ .Instance.Master.Instance.ResourceName }}
Properties:
Encrypted: true
Size: 100
VolumeType: gp2
AvailabilityZone: !GetAtt {{ .Instance.Master.Instance.ResourceName }}.AvailabilityZone
AvailabilityZone: {{ .Instance.Master.AZ }}
Tags:
- Key: Name
Value: {{ .Instance.Master.EtcdVolume.Name }}
Expand Down

0 comments on commit 8c1a896

Please sign in to comment.