This repository was archived by the owner on Jul 30, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +53
-6
lines changed
Expand file tree Collapse file tree 5 files changed +53
-6
lines changed Original file line number Diff line number Diff line change @@ -6,37 +6,52 @@ provider "aws" {
66
77resource "aws_instance" "bootstrap_node" {
88 ami = " ${ data . aws_ami . coreos_ami . image_id } "
9- instance_type = " m3.medium "
9+ instance_type = " ${ var . instance_type } "
1010 key_name = " ${ var . ssh_key } "
1111 iam_instance_profile = " ${ aws_iam_instance_profile . bk_profile . id } "
1212
1313 tags {
1414 Name = " ${ var . instance_tags } "
1515 }
16+
17+ root_block_device {
18+ volume_type = " gp2"
19+ volume_size = " 30"
20+ }
1621}
1722
1823resource "aws_instance" "worker_node" {
1924 ami = " ${ data . aws_ami . coreos_ami . image_id } "
20- instance_type = " m3.medium "
25+ instance_type = " ${ var . instance_type } "
2126 key_name = " ${ var . ssh_key } "
2227 count = " ${ var . num_workers } "
2328 iam_instance_profile = " ${ aws_iam_instance_profile . bk_profile . id } "
2429
2530 tags {
2631 Name = " ${ var . instance_tags } "
2732 }
33+
34+ root_block_device {
35+ volume_type = " gp2"
36+ volume_size = " 30"
37+ }
2838}
2939
3040resource "aws_instance" "master_node" {
3141 ami = " ${ data . aws_ami . coreos_ami . image_id } "
32- instance_type = " m3.medium "
42+ instance_type = " ${ var . instance_type } "
3343 key_name = " ${ var . ssh_key } "
3444 count = " ${ var . additional_masters } "
3545 iam_instance_profile = " ${ aws_iam_instance_profile . bk_profile . id } "
3646
3747 tags {
3848 Name = " ${ var . instance_tags } "
3949 }
50+
51+ root_block_device {
52+ volume_type = " gp2"
53+ volume_size = " 30"
54+ }
4055}
4156
4257data "aws_ami" "coreos_ami" {
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ set -euo pipefail
3+
4+ # This is a small shim to run the conformance runner script in
5+ # /hack/tests/conformance-test.sh. More option defaults such as
6+ # CONFORMANCE_VERSION are set in that script. If the SSH key you use to
7+ # access the nodes setup by terraform is not available via the ssh agent then
8+ # you must specify which keyfile to use.
9+
10+ export BOOTSTRAP_IP=` terraform output bootstrap_node_ip`
11+ export KUBECONFIG=/etc/kubernetes/kubeconfig
12+ export SSH_KEY_FILE=${SSH_KEY_FILE:-/ fake/ keyfile/ have/ agent}
13+
14+ cd ../tests
15+ ./conformance-test.sh $BOOTSTRAP_IP 22 ${SSH_KEY_FILE}
16+
Original file line number Diff line number Diff line change @@ -6,7 +6,17 @@ export WORKER_IPS=`terraform output -json worker_ips | jq -r '.value[]'`
66export MASTER_IPS=` terraform output -json master_ips | jq -r ' .value[]' `
77export SELF_HOST_ETCD=` terraform output self_host_etcd`
88export SSH_OPTS=${SSH_OPTS:- } " -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
9- export CLOUD_PROVIDER=aws
9+ export CLOUD_PROVIDER=${CLOUD_PROVIDER:- aws}
10+
11+ # Normally we want to default to aws here since that is all terraform
12+ # supports and it is required for the e2e tests. However because of an
13+ # upstream bug, conformance tests won't pass with cloud provider integration
14+ # set to aws. So we need a knob to set the CLOUD_PROVIDER to nothing while
15+ # keeping aws as the default as to not mess up people using the e2e tests.
16+ if [ " $CLOUD_PROVIDER " == " none" ] ; then
17+ echo " cloud provider integration disabled"
18+ CLOUD_PROVIDER=
19+ fi
1020
1121cd ../quickstart
1222./init-master.sh $BOOTSTRAP_IP
Original file line number Diff line number Diff line change @@ -16,6 +16,12 @@ variable "instance_tags" {
1616 type = " string"
1717}
1818
19+ variable "instance_type" {
20+ description = " Name all instances behind a single tag based on who/what is running terraform"
21+ type = " string"
22+ default = " m3.medium"
23+ }
24+
1925variable "self_host_etcd" {
2026 type = " string"
2127 default = " true"
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ ssh_key=$3
2222
2323KUBECONFIG=${KUBECONFIG:-/ home/ core/ cluster/ auth/ kubeconfig}
2424K8S_SRC=/home/core/go/src/k8s.io/kubernetes
25- ssh -q -o stricthostkeychecking=no -i ${ssh_key} -p ${ssh_port} core@${ssh_host} \
25+ ssh -q -o UserKnownHostsFile=/dev/null -o stricthostkeychecking=no -i ${ssh_key} -p ${ssh_port} core@${ssh_host} \
2626 " mkdir -p ${K8S_SRC} && [[ -d ${K8S_SRC} /.git ]] || git clone https://${CONFORMANCE_REPO} ${K8S_SRC} "
2727
2828RKT_OPTS=" \
@@ -45,4 +45,4 @@ CONFORMANCE="\
4545 -v --test -check_version_skew=false --test_args='--ginkgo.focus=\[Conformance\]'"
4646
4747CMD=" sudo rkt run --insecure-options=image ${RKT_OPTS} docker://golang:1.7.5 --exec /bin/bash -- -c \" ${INIT} && ${BUILD} && ${CONFORMANCE} \" "
48- ssh -q -o stricthostkeychecking=no -i ${ssh_key} -p ${ssh_port} core@${ssh_host} " ${CMD} "
48+ ssh -q -o UserKnownHostsFile=/dev/null -o stricthostkeychecking=no -i ${ssh_key} -p ${ssh_port} core@${ssh_host} " ${CMD} "
You can’t perform that action at this time.
0 commit comments