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

[PC-1981] Enable spot instances #43

Closed
Closed
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
37 changes: 0 additions & 37 deletions .github/CONTRIBUTING.md

This file was deleted.

52 changes: 0 additions & 52 deletions .github/workflows/pr-title.yml

This file was deleted.

96 changes: 0 additions & 96 deletions .github/workflows/pre-commit.yml

This file was deleted.

45 changes: 0 additions & 45 deletions .github/workflows/release-please.yml

This file was deleted.

59 changes: 0 additions & 59 deletions .github/workflows/terraform-min-max.yml

This file was deleted.

1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ resource "aws_launch_template" "this" {

image_id = data.aws_ami.ami.id


instance_market_options {
market_type = "spot"
}
Expand Down
6 changes: 6 additions & 0 deletions modules/user_data/cloud-init-ephemeral.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,12 @@ runcmd:
- chmod a+r -R /home/ubuntu/actions-runner
- systemctl enable this.service

# install kubectl/aws
- apt remove awscli -y
- snap install kubectl --channel=1.28/stable --classic
- snap install aws-cli --classic


power_state:
mode: reboot

Expand Down
6 changes: 6 additions & 0 deletions modules/user_data/cloud-init.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@ runcmd:
- mv actions-runner /home/ubuntu/actions-runner
- chown -R ubuntu:ubuntu /home/ubuntu

# install kubectl/aws
- apt remove awscli -y
- snap install kubectl --channel=1.28/stable --classic
- snap install aws-cli --classic


# configure actions-runner
- PERSONAL_ACCESS_TOKEN=`aws ssm get-parameter --with-decryption --name ${SSM_PARAMETER_NAME} --region ${REGION} | jq -r '.Parameter.Value'`
- >
Expand Down
Loading