Petr Ospalý | 144f28a | 2018-12-19 14:27:43 +0100 | [diff] [blame] | 1 | --- |
| 2 | # This group contains hosts with all resources (binaries, packages, etc.) |
| 3 | # in tarball. |
| 4 | all: |
| 5 | vars: |
| 6 | # this key is supposed to be generated during setup.yml playbook execution |
| 7 | # change it just when you have better one working for all nodes |
| 8 | ansible_ssh_private_key_file: /root/.ssh/offline_ssh_key |
| 9 | ansible_ssh_common_args: '-o StrictHostKeyChecking=no' |
| 10 | |
| 11 | children: |
| 12 | resources: |
| 13 | hosts: |
| 14 | resource-host: |
| 15 | ansible_host: 10.8.8.5 |
| 16 | |
| 17 | # This is group of hosts where nexus, nginx, dns and all other required |
| 18 | # services are running. |
| 19 | infrastructure: |
| 20 | hosts: |
| 21 | infrastructure-server: |
| 22 | ansible_host: 10.8.8.13 |
Michal Zegan | b5cd82b | 2019-01-04 14:20:03 +0100 | [diff] [blame] | 23 | #IP used for communication between infra and kubernetes nodes, must be specified. |
| 24 | cluster_ip: 10.8.8.13 |
Petr Ospalý | 144f28a | 2018-12-19 14:27:43 +0100 | [diff] [blame] | 25 | |
| 26 | # This is group of hosts which are/will be part of Kubernetes cluster. |
| 27 | kubernetes: |
Michal Zegan | 81a5673 | 2019-05-28 17:05:01 +0200 | [diff] [blame] | 28 | children: |
| 29 | # This is a group of hosts containing kubernetes worker nodes. |
| 30 | kubernetes-node: |
| 31 | hosts: |
| 32 | kubernetes-node-1: |
| 33 | ansible_host: 10.8.8.19 |
| 34 | #ip of the node that it uses for communication with k8s cluster. |
| 35 | cluster_ip: 10.8.8.19 |
Michal Zegan | 57d0a3d | 2019-09-16 17:23:04 +0200 | [diff] [blame] | 36 | # External ip of the node, used for access from outside of the cluster. |
| 37 | # Can be set to some kind of floating or public ip. |
| 38 | # If not set, cluster_ip is used for this purpose. |
| 39 | # external_ip: x.x.x.x |
Petr Ospalý | 144f28a | 2018-12-19 14:27:43 +0100 | [diff] [blame] | 40 | |
Michal Zegan | bfbb6e1 | 2019-06-03 14:54:02 +0200 | [diff] [blame] | 41 | # Group of hosts containing etcd cluster nodes. |
| 42 | # Defaults to infra. |
| 43 | kubernetes-etcd: |
| 44 | hosts: |
| 45 | infrastructure-server |
| 46 | |
Michal Zegan | 81a5673 | 2019-05-28 17:05:01 +0200 | [diff] [blame] | 47 | # This is a group of hosts that are to be used as kubernetes control plane nodes. |
| 48 | # This means they host kubernetes api server, controller manager and scheduler. |
| 49 | # This example uses infra for this purpose, however note that any |
| 50 | # other host could be used including kubernetes nodes. |
Michal Zegan | 57d0a3d | 2019-09-16 17:23:04 +0200 | [diff] [blame] | 51 | # cluster_ip needs to be set for hosts used as control planes, external_ip can also be used. |
Michal Zegan | 81a5673 | 2019-05-28 17:05:01 +0200 | [diff] [blame] | 52 | kubernetes-control-plane: |
| 53 | hosts: |
| 54 | infrastructure-server |
Petr Ospalý | fe49ee9 | 2019-04-20 00:53:01 +0200 | [diff] [blame] | 55 | |
Petr Ospalý | 144f28a | 2018-12-19 14:27:43 +0100 | [diff] [blame] | 56 | nfs-server: |
| 57 | hosts: |
| 58 | kubernetes-node-1 |