Skip to content

Commit

Permalink
update e2e terraform
Browse files Browse the repository at this point in the history
  • Loading branch information
0xch4z committed Jan 20, 2021
1 parent ed2bfb8 commit 629aa44
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 23 deletions.
2 changes: 1 addition & 1 deletion e2e/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ install-terraform:
sudo mv terraform /usr/local/bin/

control-plane-ssh: $(REUSED_KUBECONFIG)
ssh core@$(CONTROL_PLANE_IP)
ssh root@$(CONTROL_PLANE_IP)
30 changes: 8 additions & 22 deletions e2e/test/scripts/create_cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,32 +10,18 @@ export IMAGE="$3"


cat > cluster.tf <<EOF
variable "server_type_node" {
default = "g6-standard-2"
}
variable "nodes" {
default = 2
}
variable "server_type_master" {
default = "g6-standard-2"
}
variable "region" {
default = "eu-west"
}
variable "ssh_public_key" {
default = "${HOME}/.ssh/id_rsa.pub"
}
module "k8s" {
source = "git::https://github.com/linode/terraform-linode-k8s.git?ref=for-cli"
k8s_version = "v1.13.5"
source = "git::https://github.com/linode/terraform-linode-k8s.git"
k8s_version = "v1.18.13"
linode_token = "${LINODE_API_TOKEN}"
linode_group = "${CLUSTER_NAME}"
ccm_image = "${IMAGE}"
server_type_node = "\${var.server_type_node}"
nodes = "\${var.nodes}"
server_type_master = "\${var.server_type_master}"
region = "\${var.region}"
ssh_public_key = "\${var.ssh_public_key}"
ccm_image = "${IMAGE}"
region = "eu-west"
cluster_name = "${CLUSTER_NAME}"
nodes = var.nodes
}
EOF

Expand All @@ -45,4 +31,4 @@ terraform init

terraform apply -auto-approve

export KUBECONFIG="$(pwd)/${CLUSTER_NAME}.conf"
export KUBECONFIG="$(pwd)/${CLUSTER_NAME}.conf"

0 comments on commit 629aa44

Please sign in to comment.