Hyunsun Moon | e484834 | 2020-02-16 04:28:55 -0800 | [diff] [blame] | 1 | # Copyright 2020-present Open Networking Foundation |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | |
| 15 | --- |
| 16 | # Check ansible version |
| 17 | - hosts: localhost |
| 18 | become: no |
| 19 | gather_facts: False |
| 20 | tasks: |
| 21 | - name: "Check ansible version ==2.9.5" |
| 22 | assert: |
| 23 | msg: "Ansible must be v2.9.5" |
| 24 | that: |
| 25 | - ansible_version.string is version("2.9.5", "==") |
| 26 | vars: |
| 27 | ansible_connection: local |
| 28 | |
| 29 | # Prepare UPF nodes |
| 30 | # 1) Check VT-d is enabled in BIOS |
| 31 | # 2) Enable IOMMU and Hugepages |
| 32 | # 3) Create VFs on SRIOV PF and bind to vfio |
| 33 | # 4) Reboot to apply |
| 34 | - hosts: upf |
| 35 | any_errors_fatal: "{{ any_errors_fatal | default(true) }}" |
| 36 | roles: |
| 37 | - { role: sriov-dpdk, when: upf_sriov_enabled } |
| 38 | |
| 39 | # Router setup |
| 40 | # 1) Assign SGI and S1U gateway address |
| 41 | # 2) Add routing to UE pool |
| 42 | # 3) Add SNAT rule for UE pool |
| 43 | - hosts: router |
| 44 | any_errors_fatal: "{{ any_errors_fatal | default(true) }}" |
| 45 | roles: |
| 46 | - { role: router, when: router_setup_enabled } |
| 47 | |
| 48 | # K8S node setup |
| 49 | # 1) Time synch |
| 50 | # 2) Add internal domains for Rancher and Docker registry to /etc/hosts |
| 51 | # 3) Install Docker |
| 52 | # 4) Install K8s |
| 53 | - hosts: kube-master:kube-worker |
| 54 | any_errors_fatal: "{{ any_errors_fatal | default(true) }}" |
| 55 | roles: |
| 56 | - { role: k8s } |
| 57 | |
| 58 | #- hosts: accelleran |