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

support bringing up more masters in terraform and quickstart scripts #515

Merged
merged 3 commits into from
May 16, 2017

Conversation

peebs
Copy link

@peebs peebs commented May 15, 2017

This is a requirement for the etcd-scaling test to be run against a terraform-quickstart created cluster.

cc @aaronlevy @yifan-gu

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label May 15, 2017
@yifan-gu
Copy link

yifan-gu commented May 15, 2017

@pbx0 Code looks fine, how can I test this?

@peebs
Copy link
Author

peebs commented May 15, 2017

@yifan-gu Create a file called terraform.tfvars with the following info:

access_key_id = "<YOUR_KEY_HERE>"
access_key = "<YOUR_KEY_HERE>"
instance_tags = "yifan_test_terraform"
ssh_key = "<name of your ssh key on amazon>"
additional_masters = 2

Then run terraform apply
Then run ./start_cluster.sh

Now you should have a cluster running with 3 masters and 1 worker (the default). Check out the variables files to see all the inputs to terraform. You override any of those defaults via the terraform.tfvars file.

Oh and what ever ssh key you specify from AWS should have its private material be available to you on your machine for the ./start_cluster.sh to work

@yifan-gu
Copy link

@pbx0 Thanks, let me try it.

aaronlevy
aaronlevy previously approved these changes May 16, 2017
Copy link
Contributor

@aaronlevy aaronlevy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm (but lets hold off merging until tests are green)

ami = "${data.aws_ami.coreos_ami.image_id}"
instance_type = "m3.medium"
key_name = "${var.ssh_key}"
count = "${var.additional_masters}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually "additional masters" is a bit vague. Can we just use a specific number: "master_count" or some such?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could be more symmetrical and use num_masters and num_workers it'd just take adding a little logic to terraform to figure out that one of the num_masters is actually the bootstrap node and is special. So I think we'd want to validate that this number is 1 or greater or something like that in terraform.

I labeled it as addtional_masters to imply it doesn't include the bootstrap node because it was easier to write that way.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah I see. Can we add a comment / todo to this effect? (assuming you can have comments in tf files)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added this to the variable description in the variables.tf file.

@aaronlevy aaronlevy dismissed their stale review May 16, 2017 18:15

added a minor comment

Copy link
Contributor

@aaronlevy aaronlevy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@peebs
Copy link
Author

peebs commented May 16, 2017

Renamed init-bootstrap.sh -> back to init-master.sh so that tests will pass. Leaving the rename of init-worker.sh to init-node.sh

@peebs peebs merged commit eb07431 into kubernetes-retired:master May 16, 2017
@peebs peebs deleted the tfmaster branch May 16, 2017 22:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants