Upload iFiles to Bigip from Samba share
I've got a usecase that I don't know how to implement it.
We would like to upload each day some CRL Files from a windows samba share to our bigip and make them available with an Ifiles. Like that we have got a virtual server which is able to send the CRL files to client with a HTTP::respond 200 content [ifile get ]
I first think doing a ssh script to the bigip, to mount a samba share on the bigip, copy the files locally into /tmp and then execute the various command ( modify /sys file ifile .... ) to update the ifile files from the /tmp
But has someone has a better solution for doing this ?
Call RestAPI to upload files and update the ifiles ?
Thanks in advance,
I wouldn't recommend having the BIG-IP be the controlling agent here, but if you want to do that, the smbclient executable is on the host and can be used with a bash script like:
#!/bin/bash SMBSRV="smbserver" SMBSHARE="share_name" SMBUSER="username" SMBPASS="password" FNAME="CRLupdates" smbclient //$SMBSRV/$SMBSHARE -U $SMBUSER%$SMBPASS -c "get $FNAME" if [ $? -eq 0 ]; then echo "$FNAME retrieved" else echo "$FNAME not retrieved" fi
You could then have an iCall script with a periodic handler at whatever interval you wish execute the bash script, then create an iFile from its contents.
Personally, I'd move all the control off the BIG-IP and have an externally managed process (could also be a simple script, but documented in an operational procedure) check the share for updates to that file and upload them to BIG-IP and then modify the iFile as needed.