2017-09-19 22:50:37 +00:00
|
|
|
---
|
2017-09-26 11:27:18 +00:00
|
|
|
|
2017-09-19 22:50:37 +00:00
|
|
|
- name: clone kubernetes source repo
|
|
|
|
git:
|
|
|
|
repo: "https://github.com/runcom/kubernetes.git"
|
|
|
|
dest: "{{ ansible_env.GOPATH }}/src/k8s.io/kubernetes"
|
2017-11-03 19:42:40 +00:00
|
|
|
version: "cri-o-node-e2e-patched-logs"
|
2017-09-19 22:50:37 +00:00
|
|
|
|
|
|
|
- name: install etcd
|
|
|
|
command: "hack/install-etcd.sh"
|
|
|
|
args:
|
|
|
|
chdir: "{{ ansible_env.GOPATH }}/src/k8s.io/kubernetes"
|
|
|
|
|
|
|
|
- name: build kubernetes
|
|
|
|
make:
|
|
|
|
chdir: "{{ ansible_env.GOPATH }}/src/k8s.io/kubernetes"
|
|
|
|
|
|
|
|
- name: Add custom cluster service file for the e2e testing
|
|
|
|
copy:
|
|
|
|
dest: /etc/systemd/system/customcluster.service
|
|
|
|
content: |
|
|
|
|
[Unit]
|
|
|
|
After=network-online.target
|
|
|
|
Wants=network-online.target
|
|
|
|
[Service]
|
2017-09-26 22:53:43 +00:00
|
|
|
WorkingDirectory={{ ansible_env.GOPATH }}/src/k8s.io/kubernetes
|
2017-09-19 22:50:37 +00:00
|
|
|
ExecStart=/usr/local/bin/createcluster.sh
|
|
|
|
User=root
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|
|
|
|
|
|
|
|
- name: Add create cluster background script for e2e testing
|
|
|
|
copy:
|
|
|
|
dest: /usr/local/bin/createcluster.sh
|
|
|
|
content: |
|
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
export PATH=/usr/local/go/bin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/root/bin:{{ ansible_env.GOPATH }}/bin:{{ ansible_env.GOPATH }}/src/k8s.io/kubernetes/third_party/etcd:{{ ansible_env.GOPATH }}/src/k8s.io/kubernetes/_output/local/bin/linux/amd64/
|
|
|
|
export CONTAINER_RUNTIME=remote
|
|
|
|
export CGROUP_DRIVER=systemd
|
|
|
|
export CONTAINER_RUNTIME_ENDPOINT='/var/run/crio.sock --runtime-request-timeout=5m'
|
|
|
|
export ALLOW_SECURITY_CONTEXT=","
|
|
|
|
export ALLOW_PRIVILEGED=1
|
|
|
|
export DNS_SERVER_IP={{ ansible_eth0.ipv4.address }}
|
|
|
|
export API_HOST={{ ansible_eth0.ipv4.address }}
|
|
|
|
export API_HOST_IP={{ ansible_eth0.ipv4.address }}
|
|
|
|
export KUBE_ENABLE_CLUSTER_DNS=true
|
2017-09-26 22:53:43 +00:00
|
|
|
./hack/local-up-cluster.sh
|
2017-09-19 22:50:37 +00:00
|
|
|
mode: "u=rwx,g=rwx,o=x"
|
|
|
|
|
|
|
|
- name: Set kubernetes_provider to be local
|
|
|
|
lineinfile:
|
|
|
|
dest: /etc/environment
|
|
|
|
line: 'KUBERNETES_PROVIDER=local'
|
|
|
|
regexp: 'KUBERNETES_PROVIDER='
|
|
|
|
state: present
|
|
|
|
|
|
|
|
- name: Set KUBECONFIG
|
|
|
|
lineinfile:
|
|
|
|
dest: /etc/environment
|
|
|
|
line: 'KUBECONFIG=/var/run/kubernetes/admin.kubeconfig'
|
|
|
|
regexp: 'KUBECONFIG='
|
2017-09-26 11:27:18 +00:00
|
|
|
state: present
|