-
Notifications
You must be signed in to change notification settings - Fork 11
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
ksynth on ec2 instance #61
base: master
Are you sure you want to change the base?
Conversation
synthetics_AWS/terraform/README.md
Outdated
|
||
| Name | Version | | ||
|--------------|----------| | ||
| terraform | >= 1.0.0 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better peg the major versions to avoid incompatible changes when new major version is released
|
||
filter { | ||
name = "name" | ||
values = ["ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-*"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that AMIs get deprecated and unavailable with time, this may deserve at least a comment
curl -s https://packagecloud.io/install/repositories/kentik/ksynth/script.deb.sh | sudo bash | ||
apt-get install ksynth | ||
echo "KENTIK_COMPANY=${var.plan_id}" >> /etc/default/ksynth | ||
systemctl start ksynth |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ksynth start-stop-start sequence may deserve a comment
synthetics_AWS/terraform/main.tf
Outdated
@@ -0,0 +1,12 @@ | |||
terraform { | |||
required_version = ">= 1.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please peg major versions
synthetics_AWS/terraform/main.tf
Outdated
} | ||
|
||
provider "aws" { | ||
region = "us-east-2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably should be a variable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This won't work as-is. Has anybody tested the TF config?
#!/bin/bash | ||
curl -s https://packagecloud.io/install/repositories/kentik/ksynth/script.deb.sh | sudo bash | ||
apt-get install ksynth | ||
echo "KENTIK_COMPANY=${var.plan_id}" >> /etc/default/ksynth |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The plan_id
variable is misnamed. The KENTIK_COMPANY
variable needs to contain company id, which is a different identifier than plan_id
. It is also crucial to have an option to provide "kentik environment" parameter (indicating which Kentik instance the agent should join).
|
||
user_data = <<EOF | ||
#!/bin/bash | ||
curl -s https://packagecloud.io/install/repositories/kentik/ksynth/script.deb.sh | sudo bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Error handling?
curl -s https://packagecloud.io/install/repositories/kentik/ksynth/script.deb.sh | sudo bash | ||
apt-get install ksynth | ||
echo "KENTIK_COMPANY=${var.plan_id}" >> /etc/default/ksynth | ||
systemctl start ksynth |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is line is definitely not needed.
| Name | Description | Type | Default | Required | | ||
|------------------------|--------------------------------------------------|--------------|---------|----------| | ||
| vpc_security_group_ids | List of security groups IDs | list(string) | | true | | ||
| plan_id | Kentik plan ID | string | | true | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
plan_id
is never needed to run ksynth
. This should be company_id
.
| vpc_security_group_ids | List of security groups IDs | list(string) | | true | | ||
| plan_id | Kentik plan ID | string | | true | | ||
| region | Specifies AWS provider region | string | | false | | ||
| key_name | Key name of the Key Pair to use for the instance | string | | false | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What "key pair" are referring to?
KNTK-376
Terraform configuration for ksynth agent deployment on AWS ec2 instance.