Forum Discussion
How to automate LB VIP Creation
Hi Team,
Greetings for the day!
How can i automate LB VIP creation (Full setup - like to deploy new application behind LB.). Is this can be done via any script ot by F5 itself ? Or, do i need to get a third party tool
Regards,
ShashankS
- Andy_McGrath
Cumulonimbus
You can script it using iControlREST or you could use something like Ansible or Terraform as 3rd party tools.
All depends on your trigger, what will happen to require a new VS to be configured on the F5 in question?
- RAQS
Cirrus
Hi Andy,
Thanks for reply,
Can you please guide me , on how i can achieve this with iControlREST
Requirement is to automate the full steps of deploying application behind LB. (Like creating node , creating pool members , creating pool , creation of vip and apply required features like LB method , persistence ,binding certificate.
Regards,
ShashankS
- Andy_McGrath
Cumulonimbus
Best resource to get started is here: https://clouddocs.f5.com/api/icontrol-rest/
Also look at the code shares and articles here on DevCentral for a load of resource and help with iControl.
Warning: The older 'iControl' uses SOUP where iControl-Rest uses REST, iControl-Rest is recommended but if you find an article on iControl it may be using SOUP instead of REST.
- RAQS
Cirrus
Thanks Andy for sharing an article and sorry for delay response .
Can you please let me know where should i run below code :- (like normally we run on CLI of F5)
curl -sku admin:admin https://<host>/mgmt/tm/ltm/virtual -H "Content-Type: application/json" -X POST
-d '{"name": "vs", \
"destination": "10.10.10.10:10", \
"mask": "255.255.255.255", \
"pool": "CentOS-all80", \
"persist": [ {"name": "cookie"} ], \
"profilesReference": {"items": [ {"context": "all", "name": "http"}, {"context": "all", "name": "tcp"}, {"context": "clientside", "name": "clientssl"}] }, \
"rules": [ "ShowVersion" ], \
"sourceAddressTranslation": {"type": "automap"} }'
Regards,
ShashankS
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com