1 # Notes on running the composite vFW test case
4 As written, the vfw-test.sh script assumes 3 clusters
5 1 - the cluster in which the EMCO microservices are running
6 2 - two edge clusters in which the vFW will be instantiated
8 The edge cluster in which vFW will be instantiated should be KUD clusters.
10 # Edge cluster preparation
12 For status monitoring support, the 'monitor' docker image must be built and
15 In multicloud-k8s repo:
16 cd multicloud-k8s/src/monitor
17 docker build -f build/Dockerfile . -t monitor
18 <tag and push docker image to dockerhub ...>
20 Deploy monitor program in each cluster (assumes multicloud-k8s repo is present in cloud)
21 # one time setup per cluster - install the CRD
22 cd multicloud-k8s/src/monitor/deploy
23 kubectl apply -f crds/k8splugin_v1alpha1_resourcebundlestate_crd.yaml
25 # one time setup per cluster
26 # update yaml files with correct image
27 # (cleanup first, if monitor was already installed - see monitor-cleanup.sh)
28 cd multicloud-k8s/src/monitor/deploy
32 # Preparation of the vFW Composit Application
34 ## Prepare the Composite vFW Application Charts and Profiles
36 1. In the multicloud-k8s/kud/demo/composite-firewall directory, prepare the 3 helm
39 tar cvf packetgen.tar packetgen
40 tar cvf firewall.tar firewall
44 2. Prepare the profile file (same one will be used for all profiles in this demo)
46 tar cvf profile.tar manifest.yaml override_values.yaml
49 ## Set up environment variables for the vfw-test.sh script
51 The vfw-test.sh script expects a number of files to be provided via environment
54 Change directory to multicloud-k8s/kud/tests
56 1. Edge cluster kubeconfig files - the script expects 2 of these
58 export kubeconfigfile=<path to first cluster kube config file>
59 export kubeconfigfile2=<path to second cluster kube config file>
61 for example: export kubeconfigfile=/home/vagrant/multicloud-k8s/cluster-configs/config-edge01
64 2. Composite app helm chart files (as prepared above)
66 export packetgen_helm_path=../demo/composite-firewall/packetgen.tar.gz
67 export firewall_helm_path=../demo/composite-firewall/firewall.tar.gz
68 export sink_helm_path=../demo/composite-firewall/sink.tar.gz
70 3. Composite profile application profiles (as prepared above)
72 export packetgen_profile_targz=../demo/composite-firewall/profile.tar.gz
73 export firewall_profile_targz=../demo/composite-firewall/profile.tar.gz
74 export sink_profile_targz=../demo/composite-firewall/profile.tar.gz
76 4. Modify the script to address the EMCO cluster
78 Modifiy the urls at the top part of the script to point to the
79 cluster IP address of the EMCO cluster.
81 That is, modify the IP address 10.10.10.6 to the correct value for
84 Note also that the node ports used in the following are based on the values
85 defined in multicloud-k8s/deployments/kubernetes/onap4k8s.yaml
87 base_url_clm=${base_url_clm:-"http://10.10.10.6:31856/v2"}
88 base_url_ncm=${base_url_ncm:-"http://10.10.10.6:32737/v2"}
89 base_url_orchestrator=${base_url_orchestrator:-"http://10.10.10.6:31298/v2"}
90 base_url_ovnaction=${base_url_ovnaction:-"http://10.10.10.6:31181/v2"}
95 The rest of the data needed for the test is present in the script.
97 1. Invoke API calls to create the data
101 This does all of the data setup
103 - registers controllers
104 - sets up the composite app and profile
105 - sets up all of the intents
107 2. Query results (optional)
111 3. Apply the network intents
113 For the vFW test, the 3 networks used by the vFW are created by using network intents.
114 Both virtual and provider networks are used.
118 On the edge clusters, check to see the networks were created:
121 kubectl get providernetwork
123 4. Instantiate the vFW
125 vfw-test.sh instantiate
127 This will instantiate the vFW on the two edge clusters (as defined by the generic
135 Terminate will remove the resources from the clusters and delete the internal
136 composite application information in the etcd base AppContext.
137 The script will do it for both the deployment intent group (i.e. the vfW composite
138 app) and the network intents.
140 In principle, after runnin terminate, the 'apply' and 'instantiate' commands could
141 be invoked again to re-insantiate the networks and the vFW composite app.
143 vfw-test.sh terminate
146 After running 'terminate', the 'delete' command can be invoked to remove all
147 the data created. This should leave the system back in the starting state -
148 begin with point #1 above to start again.