Make tflint and terraform fmt changes

This commit is contained in:
Garrison Davis 2022-11-14 08:55:08 -07:00 committed by seebs
parent 3bfb65eb58
commit d028b6bc4b
4 changed files with 33 additions and 29 deletions

View file

@ -129,18 +129,14 @@ cp config.sh ./qa/testcases/bug-repros/config.sh
#wait until we can connect to one of the hosts
for i in {0..24}
do
ssh -A -i ~/.ssh/gitlab-featurebase-ci.pem -o StrictHostKeyChecking=no -o ConnectTimeout=10 ec2-user@${DATANODE0} "pwd"
if [ $? -eq 0 ]
then
if ssh -A -i ~/.ssh/gitlab-featurebase-ci.pem -o StrictHostKeyChecking=no -o ConnectTimeout=10 ec2-user@${DATANODE0} "pwd"; then
echo "Cluster is up after ${i} tries."
break
fi
sleep 10
done
ssh -A -i ~/.ssh/gitlab-featurebase-ci.pem -o StrictHostKeyChecking=no -o ConnectTimeout=10 ec2-user@${DATANODE0} "pwd"
if [ $? -ne 0 ]
then
if ! ssh -A -i ~/.ssh/gitlab-featurebase-ci.pem -o StrictHostKeyChecking=no -o ConnectTimeout=10 ec2-user@${DATANODE0} "pwd"; then
echo "Unable to connect to cluster - giving up"
exit 1
fi
@ -150,8 +146,7 @@ setupClusterNodes $BRANCH_NAME
# verify featurebase running
for i in {0..24}; do
sleep 1
curl -k -v https://${DATANODE0}:10101/status -H "Authorization: Bearer ${ADMIN_TOKEN}"
if [ $? -eq 0 ]; then
if curl -k -v https://${DATANODE0}:10101/status -H "Authorization: Bearer ${ADMIN_TOKEN}"; then
echo "Cluster is up after ${i} tries"
exit 0
fi

View file

@ -34,32 +34,40 @@ variable "fb_cluster_replica_count" {
}
variable "subnet" {
type = string
default = ""
}
variable "zone" {
type = string
default = ""
}
variable "fb_data_disk_type" {
type = string
default = "gp3"
}
variable "fb_data_disk_iops" {
type = number
default = 1000
}
variable "fb_data_disk_size_gb" {
type = number
default = 100
}
variable "fb_ingest_disk_type" {
type = string
default = "gp3"
}
variable "fb_ingest_disk_iops" {
type = number
default = 1000
}
variable "fb_ingest_disk_size_gb" {
type = number
default = 100
}
@ -79,6 +87,7 @@ variable "public_subnets" {
}
variable "vpc_cidr" {
type = string
default = "10.0.0.0/16"
}
@ -115,15 +124,15 @@ variable "vpc_private_subnets" {
variable "user_data" {
description = "Cloud init script"
type = string
type = string
}
variable "ebs_volumes" {
type = list(string)
type = list(string)
default = ["/dev/sdb"]
}
variable "use_spot_instances" {
type = bool
type = bool
default = false
}

View file

@ -1,16 +1,16 @@
module "ci-cluster" {
source = "../../.modules/featurebase-cluster"
cluster_prefix = var.cluster_prefix
region = var.region
profile = var.profile
fb_data_node_type = "m6g.large"
fb_data_node_count = 1
fb_ingest_type = "m6g.large"
vpc_id = "vpc-05a26a122f961dc2b"
vpc_cidr_block = "10.0.0.0/16"
vpc_public_subnets = ["subnet-066b4b922b54e51a2","subnet-037b8884269a69025","subnet-08482631514426210",]
vpc_private_subnets = ["subnet-0319dde319380326f","subnet-0517ca9a646d80f88","subnet-05a7b685ed27eb1cf",]
user_data = "../../.modules/featurebase-cluster/cloud-init.sh"
use_spot_instances = true
source = "../../.modules/featurebase-cluster"
cluster_prefix = var.cluster_prefix
region = var.region
profile = var.profile
fb_data_node_type = "m6g.large"
fb_data_node_count = 1
fb_ingest_type = "m6g.large"
vpc_id = "vpc-05a26a122f961dc2b"
vpc_cidr_block = "10.0.0.0/16"
vpc_public_subnets = ["subnet-066b4b922b54e51a2", "subnet-037b8884269a69025", "subnet-08482631514426210", ]
vpc_private_subnets = ["subnet-0319dde319380326f", "subnet-0517ca9a646d80f88", "subnet-05a7b685ed27eb1cf", ]
user_data = "../../.modules/featurebase-cluster/cloud-init.sh"
use_spot_instances = true
}

View file

@ -1,19 +1,19 @@
output "ingest_ips" {
description = "List of ingest IPs"
value = module.ci-cluster.ingest_ips
description = "List of ingest IPs"
value = module.ci-cluster.ingest_ips
}
output "data_node_ips" {
description = "List of data node IPs"
value = module.ci-cluster.data_node_ips
value = module.ci-cluster.data_node_ips
}
output "cluster_prefix" {
description = "The cluster prefix used"
value = module.ci-cluster.cluster_prefix
value = module.ci-cluster.cluster_prefix
}
output "fb_cluster_replica_count" {
description = "The cluster replica count used"
value = module.ci-cluster.fb_cluster_replica_count
value = module.ci-cluster.fb_cluster_replica_count
}