Merge branch 'master' into idempotency_resolvconf
commit
672d50393c
34
.travis.yml
34
.travis.yml
|
@ -11,80 +11,92 @@ env:
|
||||||
CONTAINER_ENGINE=docker
|
CONTAINER_ENGINE=docker
|
||||||
PRIVATE_KEY=$GCE_PRIVATE_KEY
|
PRIVATE_KEY=$GCE_PRIVATE_KEY
|
||||||
ANSIBLE_KEEP_REMOTE_FILES=1
|
ANSIBLE_KEEP_REMOTE_FILES=1
|
||||||
|
CLUSTER_MODE=default
|
||||||
matrix:
|
matrix:
|
||||||
# Debian Jessie
|
# Debian Jessie
|
||||||
- >-
|
- >-
|
||||||
KUBE_NETWORK_PLUGIN=flannel
|
KUBE_NETWORK_PLUGIN=flannel
|
||||||
CLOUD_IMAGE=debian-8-kubespray
|
CLOUD_IMAGE=debian-8-kubespray
|
||||||
CLOUD_REGION=europe-west1-b
|
CLOUD_REGION=europe-west1-b
|
||||||
|
CLUSTER_MODE=default
|
||||||
- >-
|
- >-
|
||||||
KUBE_NETWORK_PLUGIN=calico
|
KUBE_NETWORK_PLUGIN=calico
|
||||||
CLOUD_IMAGE=debian-8-kubespray
|
CLOUD_IMAGE=debian-8-kubespray
|
||||||
CLOUD_REGION=us-central1-c
|
CLOUD_REGION=us-central1-c
|
||||||
|
CLUSTER_MODE=default
|
||||||
- >-
|
- >-
|
||||||
KUBE_NETWORK_PLUGIN=weave
|
KUBE_NETWORK_PLUGIN=weave
|
||||||
CLOUD_IMAGE=debian-8-kubespray
|
CLOUD_IMAGE=debian-8-kubespray
|
||||||
CLOUD_REGION=us-east1-d
|
CLOUD_REGION=us-east1-d
|
||||||
|
CLUSTER_MODE=default
|
||||||
|
|
||||||
# Centos 7
|
# Centos 7
|
||||||
- >-
|
- >-
|
||||||
KUBE_NETWORK_PLUGIN=flannel
|
KUBE_NETWORK_PLUGIN=flannel
|
||||||
CLOUD_IMAGE=centos-7-sudo
|
CLOUD_IMAGE=centos-7-sudo
|
||||||
CLOUD_REGION=asia-east1-c
|
CLOUD_REGION=asia-east1-c
|
||||||
|
CLUSTER_MODE=default
|
||||||
- >-
|
- >-
|
||||||
KUBE_NETWORK_PLUGIN=calico
|
KUBE_NETWORK_PLUGIN=calico
|
||||||
CLOUD_IMAGE=centos-7-sudo
|
CLOUD_IMAGE=centos-7-sudo
|
||||||
CLOUD_REGION=europe-west1-b
|
CLOUD_REGION=europe-west1-b
|
||||||
|
CLUSTER_MODE=default
|
||||||
- >-
|
- >-
|
||||||
KUBE_NETWORK_PLUGIN=weave
|
KUBE_NETWORK_PLUGIN=weave
|
||||||
CLOUD_IMAGE=centos-7-sudo
|
CLOUD_IMAGE=centos-7-sudo
|
||||||
CLOUD_REGION=us-central1-c
|
CLOUD_REGION=us-central1-c
|
||||||
|
CLUSTER_MODE=default
|
||||||
|
|
||||||
# Redhat 7
|
# Redhat 7
|
||||||
- >-
|
- >-
|
||||||
KUBE_NETWORK_PLUGIN=flannel
|
KUBE_NETWORK_PLUGIN=flannel
|
||||||
CLOUD_IMAGE=rhel-7-sudo
|
CLOUD_IMAGE=rhel-7-sudo
|
||||||
CLOUD_REGION=us-east1-d
|
CLOUD_REGION=us-east1-d
|
||||||
|
CLUSTER_MODE=default
|
||||||
- >-
|
- >-
|
||||||
KUBE_NETWORK_PLUGIN=calico
|
KUBE_NETWORK_PLUGIN=calico
|
||||||
CLOUD_IMAGE=rhel-7-sudo
|
CLOUD_IMAGE=rhel-7-sudo
|
||||||
CLOUD_REGION=asia-east1-c
|
CLOUD_REGION=asia-east1-c
|
||||||
|
CLUSTER_MODE=default
|
||||||
- >-
|
- >-
|
||||||
KUBE_NETWORK_PLUGIN=weave
|
KUBE_NETWORK_PLUGIN=weave
|
||||||
CLOUD_IMAGE=rhel-7-sudo
|
CLOUD_IMAGE=rhel-7-sudo
|
||||||
CLOUD_REGION=europe-west1-b
|
CLOUD_REGION=europe-west1-b
|
||||||
|
CLUSTER_MODE=default
|
||||||
|
|
||||||
# Ubuntu 16.04
|
# Ubuntu 16.04
|
||||||
- >-
|
- >-
|
||||||
KUBE_NETWORK_PLUGIN=flannel
|
KUBE_NETWORK_PLUGIN=flannel
|
||||||
CLOUD_IMAGE=ubuntu-1604-xenial
|
CLOUD_IMAGE=ubuntu-1604-xenial
|
||||||
CLOUD_REGION=us-central1-c
|
CLOUD_REGION=us-central1-c
|
||||||
|
CLUSTER_MODE=default
|
||||||
- >-
|
- >-
|
||||||
KUBE_NETWORK_PLUGIN=calico
|
KUBE_NETWORK_PLUGIN=calico
|
||||||
CLOUD_IMAGE=ubuntu-1604-xenial
|
CLOUD_IMAGE=ubuntu-1604-xenial
|
||||||
CLOUD_REGION=us-east1-d
|
CLOUD_REGION=us-east1-d
|
||||||
|
CLUSTER_MODE=default
|
||||||
- >-
|
- >-
|
||||||
KUBE_NETWORK_PLUGIN=weave
|
KUBE_NETWORK_PLUGIN=weave
|
||||||
CLOUD_IMAGE=ubuntu-1604-xenial
|
CLOUD_IMAGE=ubuntu-1604-xenial
|
||||||
CLOUD_REGION=asia-east1-c
|
CLOUD_REGION=asia-east1-c
|
||||||
|
CLUSTER_MODE=default
|
||||||
|
|
||||||
# Ubuntu 15.10
|
# Extra cases for separated roles
|
||||||
- >-
|
- >-
|
||||||
KUBE_NETWORK_PLUGIN=flannel
|
KUBE_NETWORK_PLUGIN=flannel
|
||||||
CLOUD_IMAGE=ubuntu-1510-wily
|
CLOUD_IMAGE=rhel-7-sudo
|
||||||
CLOUD_REGION=europe-west1-b
|
CLOUD_REGION=europe-west1-b
|
||||||
|
CLUSTER_MODE=separate
|
||||||
- >-
|
- >-
|
||||||
KUBE_NETWORK_PLUGIN=calico
|
KUBE_NETWORK_PLUGIN=calico
|
||||||
CLOUD_IMAGE=ubuntu-1510-wily
|
CLOUD_IMAGE=ubuntu-1604-xenial
|
||||||
CLOUD_REGION=us-central1-a
|
CLOUD_REGION=us-central1-a
|
||||||
|
CLUSTER_MODE=separate
|
||||||
- >-
|
- >-
|
||||||
KUBE_NETWORK_PLUGIN=weave
|
KUBE_NETWORK_PLUGIN=weave
|
||||||
CLOUD_IMAGE=ubuntu-1510-wily
|
CLOUD_IMAGE=debian-8-kubespray
|
||||||
CLOUD_REGION=us-east1-d
|
CLOUD_REGION=us-east1-d
|
||||||
|
CLUSTER_MODE=separate
|
||||||
|
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
|
@ -92,7 +104,8 @@ before_install:
|
||||||
- pip install --user boto -U
|
- pip install --user boto -U
|
||||||
- pip install --user ansible
|
- pip install --user ansible
|
||||||
- pip install --user netaddr
|
- pip install --user netaddr
|
||||||
- pip install --user apache-libcloud
|
# W/A https://github.com/ansible/ansible-modules-core/issues/5196#issuecomment-253766186
|
||||||
|
- pip install --user apache-libcloud==0.20.1
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
- directories:
|
- directories:
|
||||||
|
@ -114,7 +127,8 @@ before_script:
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- >
|
- >
|
||||||
$HOME/.local/bin/ansible-playbook tests/cloud_playbooks/create-gce.yml -i tests/local_inventory/hosts -c local $LOG_LEVEL
|
$HOME/.local/bin/ansible-playbook tests/cloud_playbooks/create-gce.yml -i tests/local_inventory/hosts.cfg -c local $LOG_LEVEL
|
||||||
|
-e mode=${CLUSTER_MODE}
|
||||||
-e test_id=${TEST_ID}
|
-e test_id=${TEST_ID}
|
||||||
-e kube_network_plugin=${KUBE_NETWORK_PLUGIN}
|
-e kube_network_plugin=${KUBE_NETWORK_PLUGIN}
|
||||||
-e gce_project_id=${GCE_PROJECT_ID}
|
-e gce_project_id=${GCE_PROJECT_ID}
|
||||||
|
|
3
OWNERS
3
OWNERS
|
@ -4,3 +4,6 @@
|
||||||
owners:
|
owners:
|
||||||
- Smana
|
- Smana
|
||||||
- ant31
|
- ant31
|
||||||
|
- bogdando
|
||||||
|
- mattymo
|
||||||
|
- rsmitty
|
||||||
|
|
|
@ -16,7 +16,7 @@ $vm_cpus = 1
|
||||||
$shared_folders = {}
|
$shared_folders = {}
|
||||||
$forwarded_ports = {}
|
$forwarded_ports = {}
|
||||||
$subnet = "172.17.8"
|
$subnet = "172.17.8"
|
||||||
$box = "bento/ubuntu-14.04"
|
$box = "bento/ubuntu-16.04"
|
||||||
|
|
||||||
host_vars = {}
|
host_vars = {}
|
||||||
|
|
||||||
|
@ -38,6 +38,13 @@ if ! File.exist?(File.join(File.dirname($inventory), "hosts"))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if Vagrant.has_plugin?("vagrant-proxyconf")
|
||||||
|
$no_proxy = ENV['NO_PROXY'] || ENV['no_proxy'] || "127.0.0.1,localhost"
|
||||||
|
(1..$num_instances).each do |i|
|
||||||
|
$no_proxy += ",#{$subnet}.#{i+100}"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
Vagrant.configure("2") do |config|
|
Vagrant.configure("2") do |config|
|
||||||
# always use Vagrants insecure key
|
# always use Vagrants insecure key
|
||||||
config.ssh.insert_key = false
|
config.ssh.insert_key = false
|
||||||
|
@ -52,6 +59,12 @@ Vagrant.configure("2") do |config|
|
||||||
config.vm.define vm_name = "%s-%02d" % [$instance_name_prefix, i] do |config|
|
config.vm.define vm_name = "%s-%02d" % [$instance_name_prefix, i] do |config|
|
||||||
config.vm.hostname = vm_name
|
config.vm.hostname = vm_name
|
||||||
|
|
||||||
|
if Vagrant.has_plugin?("vagrant-proxyconf")
|
||||||
|
config.proxy.http = ENV['HTTP_PROXY'] || ENV['http_proxy'] || ""
|
||||||
|
config.proxy.https = ENV['HTTPS_PROXY'] || ENV['https_proxy'] || ""
|
||||||
|
config.proxy.no_proxy = $no_proxy
|
||||||
|
end
|
||||||
|
|
||||||
if $expose_docker_tcp
|
if $expose_docker_tcp
|
||||||
config.vm.network "forwarded_port", guest: 2375, host: ($expose_docker_tcp + i - 1), auto_correct: true
|
config.vm.network "forwarded_port", guest: 2375, host: ($expose_docker_tcp + i - 1), auto_correct: true
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
command: /bin/true
|
command: /bin/true
|
||||||
notify:
|
notify:
|
||||||
- Docker | reload systemd
|
- Docker | reload systemd
|
||||||
|
- Docker | reload docker.socket
|
||||||
- Docker | reload docker
|
- Docker | reload docker
|
||||||
- Docker | pause while Docker restarts
|
- Docker | pause while Docker restarts
|
||||||
- Docker | wait for docker
|
- Docker | wait for docker
|
||||||
|
@ -16,6 +17,12 @@
|
||||||
name: docker
|
name: docker
|
||||||
state: restarted
|
state: restarted
|
||||||
|
|
||||||
|
- name: Docker | reload docker.socket
|
||||||
|
service:
|
||||||
|
name: docker.socket
|
||||||
|
state: restarted
|
||||||
|
when: ansible_os_family == 'CoreOS'
|
||||||
|
|
||||||
- name: Docker | pause while Docker restarts
|
- name: Docker | pause while Docker restarts
|
||||||
pause: seconds=10 prompt="Waiting for docker restart"
|
pause: seconds=10 prompt="Waiting for docker restart"
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
- hosts: localhost
|
- hosts: localhost
|
||||||
sudo: False
|
become: false
|
||||||
gather_facts: no
|
gather_facts: no
|
||||||
vars:
|
vars:
|
||||||
cloud_machine_type: g1-small
|
cloud_machine_type: g1-small
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
- hosts: localhost
|
- hosts: localhost
|
||||||
sudo: False
|
become: false
|
||||||
gather_facts: no
|
gather_facts: no
|
||||||
vars:
|
vars:
|
||||||
cloud_machine_type: f1-micro
|
cloud_machine_type: f1-micro
|
||||||
|
|
|
@ -2,6 +2,16 @@ node1 ansible_ssh_host={{gce.instance_data[0].public_ip}}
|
||||||
node2 ansible_ssh_host={{gce.instance_data[1].public_ip}}
|
node2 ansible_ssh_host={{gce.instance_data[1].public_ip}}
|
||||||
node3 ansible_ssh_host={{gce.instance_data[2].public_ip}}
|
node3 ansible_ssh_host={{gce.instance_data[2].public_ip}}
|
||||||
|
|
||||||
|
{% if mode is defined and mode == "separate" %}
|
||||||
|
[kube-master]
|
||||||
|
node1
|
||||||
|
|
||||||
|
[kube-node]
|
||||||
|
node2
|
||||||
|
|
||||||
|
[etcd]
|
||||||
|
node3
|
||||||
|
{% else %}
|
||||||
[kube-master]
|
[kube-master]
|
||||||
node1
|
node1
|
||||||
node2
|
node2
|
||||||
|
@ -14,6 +24,7 @@ node3
|
||||||
[etcd]
|
[etcd]
|
||||||
node1
|
node1
|
||||||
node2
|
node2
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
[k8s-cluster:children]
|
[k8s-cluster:children]
|
||||||
kube-node
|
kube-node
|
||||||
|
|
Loading…
Reference in New Issue