Commit 173f2340 authored by aticig's avatar aticig
Browse files

Adding powerdns k8s proxy charm and descriptors

parent fe7be6cd
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
#!/bin/bash

sudo snap install yq
echo "========================================================================"
echo "Adding Helm Repository"
echo "========================================================================"
osm repo-add --type helm-chart --description "Repository for Powerdns helm Chart" osm-helm https://gatici.github.io/helm-repo/
echo "========================================================================"
echo "Listing Helm Repository"
echo "========================================================================"
osm repo-list
+29 −0
Original line number Diff line number Diff line
#!/bin/bash

export PDNS_NS_NAME=powerdns_ns
export VNF_NAME=powerdns
export KDU_NAME=powerdns

read -p "Enter ZONE:" ZONE

if [[ -z "$ZONE" ]]; then
   printf '%s\n' "No input entered"
   exit 1
else
   printf "You entered ZONE %s " "$ZONE"
fi
echo "========================================================================"
echo "Deleting Zone"
echo "========================================================================"

DEL_ZONE_OP_ID=`osm ns-action --action_name delete-zone --vnf_name $KDU_NAME --kdu_name $KDU_NAME  --params "{'zone_name': $ZONE}" $PDNS_NS_NAME`
echo "========================================================================"
echo "Showing action status"
echo "========================================================================"

osm ns-op-show $DEL_ZONE_OP_ID


echo "========================================================================"
echo "Check the action status using osm ns-op-show $DEL_ZONE_OP_ID"
echo "========================================================================"
+27 −0
Original line number Diff line number Diff line
#!/bin/bash

read -p "Enter replicaCount number to scale as number greater than 1:" NUM

if [[ -z "$NUM" ]]; then
   printf '%s\n' "No input entered"
   exit 1
else
   printf "You entered ZONE %s " "$NUM"
   ls -l
fi

echo "========================================================================"
echo "Scaling out"
echo "========================================================================"

SCALE_OUT_OP_ID=`osm ns-action --action_name upgrade --vnf_name $VNF_NAME  --kdu_name $KDU_NAME --params "{'replicaCount':$NUM,}" $PDNS_NS_NAME`

echo "========================================================================"
echo "Showing action status"
echo "========================================================================"
osm ns-op-show $PDNS_NS_NAME --literal | yq .operationState

echo "========================================================================"
echo "Showing replicaCount number"
echo "========================================================================"
osm vnf-show $VNF_ID --kdu $KDU_NAME | yq .config.replicaCount
+18 −0
Original line number Diff line number Diff line
#!/bin/bash

echo "========================================================================"
echo "Rolling back"
echo "========================================================================"

SCALE_IN_OP_ID=`osm ns-action --action_name rollback --vnf_name $VNF_NAME --kdu_name $KDU_NAME $PDNS_NS_NAME`

echo "========================================================================"
echo "Showing action status"
echo "========================================================================"

osm ns-op-show $SCALE_IN_OP_ID --literal | yq .operationState

echo "========================================================================"
echo "Showing replicaCount number"
echo "========================================================================"
osm vnf-show $VNF_ID --kdu $KDU_NAME | yq .config.replicaCount
 No newline at end of file
+14 −0
Original line number Diff line number Diff line
#!/bin/bash

echo "========================================================================"
echo "Upload VNFD"
echo "========================================================================"
pushd  ../../powerdns/
osm nfpkg-create powerdns_knf

echo "========================================================================"
echo "Upload NSD"
echo "========================================================================"
osm nspkg-create powerdns_ns
popd
Loading