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 |
Hyunsun Moon | 6c6db95 | 2020-03-04 20:50:51 -0800 | [diff] [blame^] | 43 | # 4) Install and configure VPN server |
Hyunsun Moon | e484834 | 2020-02-16 04:28:55 -0800 | [diff] [blame] | 44 | - hosts: router |
| 45 | any_errors_fatal: "{{ any_errors_fatal | default(true) }}" |
| 46 | roles: |
Hyunsun Moon | 6c6db95 | 2020-03-04 20:50:51 -0800 | [diff] [blame^] | 47 | - { role: router, when: router_enabled or vpn_enabled } |
Hyunsun Moon | e484834 | 2020-02-16 04:28:55 -0800 | [diff] [blame] | 48 | |
| 49 | # K8S node setup |
| 50 | # 1) Time synch |
| 51 | # 2) Add internal domains for Rancher and Docker registry to /etc/hosts |
| 52 | # 3) Install Docker |
| 53 | # 4) Install K8s |
| 54 | - hosts: kube-master:kube-worker |
| 55 | any_errors_fatal: "{{ any_errors_fatal | default(true) }}" |
| 56 | roles: |
| 57 | - { role: k8s } |
| 58 | |
| 59 | #- hosts: accelleran |