Richard Jankowski | 461cb97 | 2018-04-11 15:36:27 -0400 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | kubectl apply -f k8s/genie-cni-1.8.yml |
| 4 | |
| 5 | kubectl apply -f k8s/namespace.yml |
| 6 | kubectl apply -f k8s/single-node/consul.yml |
| 7 | kubectl apply -f k8s/single-node/zookeeper.yml |
| 8 | kubectl apply -f k8s/single-node/kafka.yml |
| 9 | kubectl apply -f k8s/single-node/fluentd.yml |
| 10 | |
| 11 | kubectl apply -f k8s/single-node/vcore_for_consul.yml |
| 12 | kubectl apply -f k8s/envoy_for_consul.yml |
| 13 | kubectl apply -f k8s/single-node/vcli.yml |
| 14 | kubectl apply -f k8s/single-node/ofagent.yml |
| 15 | kubectl apply -f k8s/single-node/netconf.yml |
| 16 | |
| 17 | sudo cat <<EOF > tests/itests/env/tmp-pon0.conf |
| 18 | { |
| 19 | "name": "pon0", |
| 20 | "type": "bridge", |
| 21 | "bridge": "pon0", |
| 22 | "isGateway": true, |
| 23 | "ipMask": true, |
| 24 | "ipam": { |
| 25 | "type": "host-local", |
| 26 | "subnet": "10.22.0.0/16", |
| 27 | "routes": [ |
| 28 | { "dst": "0.0.0.0/0" } |
| 29 | ] |
| 30 | } |
| 31 | } |
| 32 | EOF |
| 33 | |
| 34 | sudo cp tests/itests/env/tmp-pon0.conf /etc/cni/net.d/20-pon0.conf |
| 35 | rm tests/itests/env/tmp-pon0.conf |
| 36 | |
| 37 | kubectl apply -f k8s/freeradius-config.yml |
| 38 | kubectl apply -f k8s/freeradius.yml |
| 39 | kubectl apply -f k8s/olt.yml |
| 40 | |
| 41 | # An ONU container creates the pon0 bridge |
| 42 | kubectl apply -f k8s/onu.yml |
Richard Jankowski | 43f6763 | 2018-04-23 17:04:48 -0400 | [diff] [blame] | 43 | |
Richard Jankowski | 461cb97 | 2018-04-11 15:36:27 -0400 | [diff] [blame] | 44 | echo 8 > tests/itests/env/tmp_pon0_group_fwd_mask |
Richard Jankowski | 43f6763 | 2018-04-23 17:04:48 -0400 | [diff] [blame] | 45 | RETRY=30 |
| 46 | while [ $RETRY -gt 0 ]; |
| 47 | do |
| 48 | if [ -f /sys/class/net/pon0/bridge/group_fwd_mask ]; then |
| 49 | echo "pon0 found" |
| 50 | sudo cp tests/itests/env/tmp_pon0_group_fwd_mask /sys/class/net/pon0/bridge/group_fwd_mask |
| 51 | break |
| 52 | else |
| 53 | echo "waiting for pon0..." |
| 54 | RETRY=$(expr $RETRY - 1) |
| 55 | sleep 1 |
| 56 | fi |
| 57 | done |
| 58 | if [ $RETRY -eq 0 ]; then |
| 59 | echo "Timed out waiting for creation of bridge pon0" |
| 60 | fi |
Richard Jankowski | 461cb97 | 2018-04-11 15:36:27 -0400 | [diff] [blame] | 61 | rm tests/itests/env/tmp_pon0_group_fwd_mask |
| 62 | |
| 63 | kubectl apply -f k8s/rg.yml |
| 64 | sleep 20 |