-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig.yaml
138 lines (115 loc) · 4.52 KB
/
config.yaml
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
# Backend can be multipass or libvirt
backend: "libvirt"
bridge:
name: "mediumkube-br0"
inet: 10.114.114.1/24
overlay:
id: "node01" # Id of current node. Must be unique across a cluster
enabled: true # If overlay is disabled, there would be no etcd or flannel service
master: 127.0.0.1 # master node ip. Must be accessable from all other nodes
etcd-port: 6872 # simplified config. Avoid loops
grpc-port: 6874 # port of mediumkube grpc service
cidr: 10.114.114.0/24
dns-etcd-prefix: "/xmbsmdsj.co.uk/dns"
lease-etcd-prefix: "/xmbsmdsj.co.uk/lease"
domain-etcd-prefix: "/xmbsmdsj.co.uk/domain"
dlock-etcd-prefix: "/xmbsmdsj.co.uk/lock"
flannel:
network: 10.114.114.0/16
etcd-prefix: "/xmbsmdsj.co.uk/network"
iface: "mediumkube-flannel0" #
backend: "vxlan"
http-proxy: "http://10.114.114.1:1091"
https-proxy: "http://10.114.114.1:1091"
# It is suggested that you use multipass bridge network
# in case of ip change
pub-key-dir: "/home/temp/.ssh/id_rsa.pub"
priv-key-dir: "/home/temp/.ssh/id_rsa"
host-pub-key-dir: "/home/temp/.ssh/id_rsa.pub"
host-priv-key-dir: "/home/temp/.ssh/id_rsa"
image: "/home/temp/bionic.img"
cloud-init: "/etc/mediumkube/cloud-init.yaml"
# see https://kubernetes.io/docs/reference/setup-tools/kubeadm/kubeadm-init/
# see https://coreos.com/flannel/docs/latest/kubernetes.html for Flannel guides
kube-init:
args:
- key: "ignore-preflight-errors"
value: "control-plane-prepare"
- key: "pod-network-cidr"
value: "10.244.0.0/16"
# MediumKube configs
tmp_dir: /home/temp/mediumkube
# Kubeconfig inside the virtual machine
# For kubernetes client
vm_kube_config_dir: /home/ubuntu/.kube/config
vm_log_dir: /var/log/bootstrap
flavors:
- name: standard
template: |
<domain type='{{.Type}}'>
<name>{{.Name}}</name>
<title>{{.Name}} - Generated by MediumKube</title>
<os>
<type arch='x86_64'>hvm</type>
<boot dev='hd'/>
</os>
<!--Resource Allocation-->
<vcpu placement='static'>{{.CPU}}</vcpu>
<memory unit='{{.MemoryUnit}}'>{{.MemoryMagnitude}}</memory>
<features>
<acpi/>
<apic/>
</features>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<!-- System disk -->
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2'/>
<source file='{{.OSImage}}' />
<target dev='hda' bus='ide' />
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<!-- Cloud init disk -->
<disk type='file' device='cdrom'>
<driver name='qemu' type='raw'/>
<source file='{{.CloudInitImage}}' />
<target dev='hdb' bus='ide'/>
<address type='drive' controller='0' bus='0' target='0' unit='1'/>
</disk>
<controller type='usb' index='0' model='ich9-ehci1'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x7'/>
</controller>
<controller type='usb' index='0' model='ich9-uhci1'>
<master startport='0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0' multifunction='on'/>
</controller>
<controller type='usb' index='0' model='ich9-uhci2'>
<master startport='2'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x1'/>
</controller>
<controller type='usb' index='0' model='ich9-uhci3'>
<master startport='4'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x2'/>
</controller>
<controller type='pci' index='0' model='pci-root'/>
<controller type='ide' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
</controller>
<controller type='virtio-serial' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
</controller>
<interface type='bridge'>
<source bridge='{{.Bridge}}'/>
</interface>
<serial type='pty'>
<target type='isa-serial' port='0'>
<model name='isa-serial'/>
</target>
</serial>
<console type='pty'>
<target type='serial' port='0'/>
</console>
</devices>
</domain>