Automate your Kamailio Test Calls - Kamailio World 2024
Ztech Connect '19, IBM PureApplication
1. Infrastructure
as the Review and
Modification of
Data Structures;
ReST, jq, Python and 1,120 cores
Chris Clark, 414.312.4253
cclark@ztech.io
2. Presentation’s, my,
point of view
Not what I know,
what I endeavor to learn.
Welcome your comments and
conversation, today and after we
leave Ft. Collins.
3. Why the wonky title?
What I was thinking about on 1 February when
the abstract was submitted.
At a client engagement with Julian Foster.
Client’s governance and architecture is
very dynamic.
4. The system’s interface
influences how I think about a
system.
Framing,
the context in which choices are presented.
Using a graphical UI,
I think of PureApplication System
in terms of the
GUI’s data layout,
and workflow as the traversal of screens.
https://en.wikipedia.org/wiki/Thinking,_Fast_and_Slow
8. Where is it being used?
Intel Intel Intel PowerPower
Primary Data Center Alternate Data Center
9. Fallacies_of_distributed_computing
(first articulated for networks)
● The network is reliable
● Latency is zero
● Bandwidth is infinite
● The network is secure
● Topology doesn't change
● There is one administrator
● Transport cost is zero
● The network is homogeneous
10. “ IBM PureApplication Platform
W3500 V2.2.5 documentation”
“Administering the system” >
"Administering the multisystem environment" >
“Configure the multisystem environment" >
“Requirements”
11. “Configure the multisystem environment" >
“Requirements”
▰ “Only a system with the same platform type,
Intel or Power,
can be added to the same management domain.”
▰ “You must ensure IP connectivity between the system
management IP addresses on all systems in the management
domain.”
12. Scott Moonen and Hendrick van Run
26Apr16
“Implement multisystem management and deployment with IBM
PureApplication System”, .
https://www.ibm.com/developerworks/websphere/techjournal/1
506_vanrun/1506_vanrun-trs.html
Point out the requirement for management addresses on the same
subnet.
“... new addresses must be defined in the same subnet as the
existing system management IP addresses.”
13. Reframe the problem as
integration of from five systems:
PureSystems Manager
15. PureApplication REST API:
“server” and “job manager”
▰ GET,
short-lived database transaction to retrieve information
(this presentation is about GETs)
▰ POST, DELETE, PUT
operates as a daemon and executes long-lived jobs
16. What APIs are available?
● API reference in the PureApplication Platform
Knowledge Center
● A bit context Chapter 13,
“IBM PureApplication System
command-line interface and REST API”,
Vincent Tran
"Integrating IBM PureApplication System into an Existing
Data Center"
● IBM Redbook SG24-8285, November 2015
● http://www.redbooks.ibm.com/redbooks/pdfs/sg248285.pdf
● http://books.google.com/books?vid=ISBN:9780738441122
18. Leverage the skeleton:
bash script for each PSM
$ cat curl_33.bash
./curl.bash
$(sqlite3 -separator '.' ~/psm.db "SELECT host, domain FROM psm WHERE rack_sn IS ‘0000033';")
$(sqlite3 -separator ' ' ~/psm.db "SELECT uid, pw FROM crdntl WHERE rack_sn IS ‘0000033';")
${1}
19. The result, too small to see
:(
{
"product": "IPAS",
"version": "5.2.5.2-20180523140225",
"buildLabel": "20180523-1359-384",
"capabilities": {
"supported_languages": [
"de",
"es",
"fr",
"it",
"ja",
"ko",
"pt_BR",
"zh_CN",
"zh_TW"
],
"virtual_application_deployment_with_environment_profile": true,
"virtual_application_deployment_with_cloud_group": false
},
"branch": null,
"fsm_version": "2.2.5.2-201806041453753"
}
20. jq, JSON query utility
(the best take away
in this presentation)
▰ Colorize
▰ Sort keys for
consistent results
and improved
understanding of
structure
25. Why Python?
▰ It is used to implement PureApplication’s CLI
▰ It is used everywhere I look
▰ There is a vibrant community
▰ There are is very good documentation;
PyDocs, David Beasley, …
▰ There are good tools
▰ Microsoft’s hired the person who did the best
vscode Python extension
▰ My opinion, Python nudges towards thinking in data structures.
▰ My opinion, Python at the balance point of consistency and utility.
26. Python vscode demo:
What we will see:
▰ “shoebox” of PureApplication REST JSON results
▰ GET /resources/version
▰ GET /resources/virtualSystemPatterns
▰ Model: the “shoebox” as a Python dict
▰ View: formated text
▰ Controller: the Python code
▰ def vsp_clone_model()
From the JSON file reconstruct the dict used for reporting on Citrix.
▰ def vsp_clones_view(vsp_mdl:list, ) -> None:
▰ """Report of VSP instances that have the same sha-2 hash.""
27. Call to Action Collaboration
▰ Let me know if care to discuss these topics further
▰ Next step in my developer proficency is incorporation of
Bitbbucket in my vscode workflow.
▰ Next step in my architect proficiency is generalized approach
for
▰ Observing a system
▰ Discerning reusable patterns for manipulating a system
▰ Communicating to with others for coordinated collective
action.