GithubHelp home page GithubHelp logo

geolocation-automation's Introduction


Logo

Geolocation Database Automation for F5

Geolocation DB automation example for F5 Big-IPs

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. License
  5. Acknowledgments

About The Project

Product Name Screen Shot

Management of the geolcation database files can sometimes be diffficult as they are not by default included in UCS files (althoguht they can). At times there is a need for automating the installation of said files and this is an examnple of how to do so.

Here's why:

  • The Geolocation db files are very large, and while they can be put into a UCS it may be prohibitive to do so
  • If you have an RMA or other activity that requires a quick turn around, you don't have time for update processes
  • You have an automation or CI/CD system established but you need to include the geolocation dbs

(back to top)

Built With

Code will be in python3, perhaps other languages in the future.

(back to top)

Getting Started

This is very simple example code, not a lot to be prepared for.

Prerequisites

To use this example, you will need:

  • Licensed big-ip system (14.1 or greater, but some earlier versions may work)
  • Admin access to the big-ip system. This will use REST interfaces and you will need to get authenticated
  • Host system with a python 3.8 enviroment requests & json libraries. Note, you could use an earlier version of Python3 but you will need to remove the := operator

Installation

No installation necessary

(back to top)

Usage

Arguments:

  • hostname/ip
  • credentials in the form of username:password
  • location of geolocation zip file
  • location of geolocation md5 file Note: You CAN omit the password and then place the password in the env variable BIGIP_PASS

The script will:

  • Gets auth token
  • Verifies the token
  • Backs up the existing database
  • Uploads the md5 and zip file
  • Checks the md5 sum
  • Unzips the md5
  • Walks through each rpm and installs it
  • Verifies each .dat link directly
  • Cleans up the rpm files
  • Cleans up the .zip and .md5 file
  • Deletes the backup directory

Example:

geolocation-update.py 10.1.1.151 admin:admin ip-geolocation-v2-2.0.0-20220228.573.0.zip ip-geolocation-v2-2.0.0-20220228.573.0.zip.md5
Getting access token
Backing up existing db
Uploading geolocation updates
Installing geolocation updates
Starting GeoIP Version: 20210412
Ending GeoIP Version: 20220228
GeoIP DB updated!

(back to top)

License

Distributed AS-IS with no guarantee implied or otherwise

(back to top)

Acknowledgments

Reference:

Acknowledgements

  • Mark Hermsdorfer for his help and suggestions and how he approached this effort.
  • Mark Menger for his continued council, guidance, and expertise

geolocation-automation's People

Contributors

caliraftdude avatar

Stargazers

Petr Čech avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.