2 # SPDX-license-identifier: Apache-2.0
3 ##############################################################################
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
9 ##############################################################################
18 csar_id=66fea6f0-b74d-11e8-95a0-525400feed26
21 if [[ ! -f $HOME/.ssh/id_rsa.pub ]]; then
22 echo -e "\n\n\n" | ssh-keygen -t rsa -N ""
24 populate_CSAR_vms_vFW $csar_id
26 pushd ${CSAR_DIR}/${csar_id}
27 for resource in $unprotected_private_net $protected_private_net $onap_private_net; do
28 kubectl apply -f $resource.yaml
30 setup $packetgen_deployment_name $firewall_deployment_name $sink_deployment_name
33 for deployment_name in $packetgen_deployment_name $firewall_deployment_name $sink_deployment_name; do
34 pod_name=$(kubectl get pods | grep $deployment_name | awk '{print $1}')
35 vm=$(kubectl virt virsh list | grep ".*$deployment_name" | awk '{print $2}')
36 echo "Pod name: $pod_name Virsh domain: $vm"
37 echo "ssh -i ~/.ssh/id_rsa.pub admin@$(kubectl get pods $pod_name -o jsonpath="{.status.podIP}")"
38 echo "kubectl attach -it $pod_name"
39 echo "=== Virtlet details ===="
40 echo "$(kubectl virt virsh dumpxml $vm | grep VIRTLET_)\n"
45 teardown $packetgen_deployment_name $firewall_deployment_name $sink_deployment_name