Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
vnf-onboarding
OSM Packages
Commits
53b61109
Commit
53b61109
authored
Oct 18, 2022
by
aticig
Browse files
Fixing Powerdns scaling scripts
Signed-off-by:
Gulsum Atici
<
gulsum.atici@canonical.com
>
parent
60634832
Pipeline
#7682
failed with stage
in 1 minute and 31 seconds
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
4 deletions
+17
-4
Hackfest_Demos/OSM-MR13/2.1-KNF/powerdns-scripts/11-scale-out.sh
...t_Demos/OSM-MR13/2.1-KNF/powerdns-scripts/11-scale-out.sh
+10
-4
Hackfest_Demos/OSM-MR13/2.1-KNF/powerdns-scripts/12-scale-in.sh
...st_Demos/OSM-MR13/2.1-KNF/powerdns-scripts/12-scale-in.sh
+7
-0
No files found.
Hackfest_Demos/OSM-MR13/2.1-KNF/powerdns-scripts/11-scale-out.sh
View file @
53b61109
#!/bin/bash
read
-p
"Enter replicaCount number to scale as number greater than 1:"
NUM
export
PDNS_NS_NAME
=
powerdns_ns
export
VNF_NAME
=
powerdns
export
KDU_NAME
=
powerdns
export
VNF_ID
=
`
osm vnf-list
--ns
$PDNS_NS_NAME
|
grep
powerdns |
awk
'{print $2}'
`
read
-p
"Enter replicaCount number to scale as number:"
NUM
if
[[
-z
"
$NUM
"
]]
;
then
printf
'%s\n'
"No input entered"
exit
1
else
printf
"You entered ZONE %s "
"
$NUM
"
ls
-l
printf
"You entered NUM %s "
"
$NUM
"
fi
echo
"========================================================================"
...
...
@@ -17,11 +21,13 @@ 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
"Check the action status using osm ns-op-show
$SCALE_OUT_OP_ID
--literal | yq .operationState"
echo
"Showing action status"
echo
"========================================================================"
osm ns-op-show
$
PDNS_NS_NAME
--literal
| yq .operationState
osm ns-op-show
$
SCALE_OUT_OP_ID
--literal
| yq .operationState
echo
"========================================================================"
echo
"Check the replicaCount using osm vnf-show
$VNF_ID
--kdu
$KDU_NAME
| yq .config.replicaCount"
echo
"Showing replicaCount number"
echo
"========================================================================"
osm vnf-show
$VNF_ID
--kdu
$KDU_NAME
| yq .config.replicaCount
Hackfest_Demos/OSM-MR13/2.1-KNF/powerdns-scripts/12-scale-in.sh
View file @
53b61109
#!/bin/bash
export
PDNS_NS_NAME
=
powerdns_ns
export
VNF_NAME
=
powerdns
export
KDU_NAME
=
powerdns
export
VNF_ID
=
`
osm vnf-list
--ns
$PDNS_NS_NAME
|
grep
powerdns |
awk
'{print $2}'
`
echo
"========================================================================"
echo
"Rolling back"
echo
"========================================================================"
...
...
@@ -7,12 +12,14 @@ echo "========================================================================"
SCALE_IN_OP_ID
=
`
osm ns-action
--action_name
rollback
--vnf_name
$VNF_NAME
--kdu_name
$KDU_NAME
$PDNS_NS_NAME
`
echo
"========================================================================"
echo
"Check the action status using osm ns-op-show
$SCALE_IN_OP_ID
"
echo
"Showing action status"
echo
"========================================================================"
osm ns-op-show
$SCALE_IN_OP_ID
--literal
| yq .operationState
echo
"========================================================================"
echo
"Check the replicatCount number using osm vnf-show
$VNF_ID
--kdu
$KDU_NAME
| yq .config.replicaCount"
echo
"Showing replicaCount number"
echo
"========================================================================"
osm vnf-show
$VNF_ID
--kdu
$KDU_NAME
| yq .config.replicaCount
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment