-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker.json
35 lines (35 loc) · 1.1 KB
/
docker.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{
"builders": [{
"type": "openstack",
"image_name": "ubuntu_k8s_K8SVERSION_docker",
"source_image": "SOURCE_ID",
"flavor": "FLAVOR",
"floating_ip_pool": "FLOATING-NET",
"networks": "NETWORK",
"security_groups": ["default","SECGROUP"],
"ssh_username": "SSHUSER"
}
],
"provisioners": [{
"type": "shell",
"inline": [
"sleep 30",
"sudo apt-get update",
"sudo apt-get upgrade -y",
"sudo apt-get install -y apt-transport-https curl",
"echo 'deb https://apt.kubernetes.io/ kubernetes-xenial main' | sudo tee /etc/apt/sources.list.d/kubernetes.list",
"curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -",
"sudo apt-get update",
"sudo apt-get install -y kubelet=K8SVERSION-00 kubeadm=K8SVERSION-00 kubectl=K8SVERSION-00",
"sudo apt-mark hold kubelet kubeadm kubectl"
]
},{
"type": "shell",
"inline": [
"sudo apt-get install -y docker.io",
"sudo apt-mark hold docker.io",
"sudo systemctl enable docker",
"sudo systemctl restart docker"
]
}]
}