Skip to main content

A tool to set an IP to a network interface for as long as the program runs

Project description

Set IP for network interface
============================

Introduction
------------

This is a simple utility to set an IP for a network interface for as long as the utility or a sub-command is running. When it is
terminated, the IP will be removed from the network interface. This makes a network IP controllable as a service. Tools like
Nomad can then dynamically enable and disabled IPs where certain services run. If a command is specified, ip-service runs it and
waits for the program to terminate. The command would ideally provide a network-based service which would be available on the
specified IP.

Usage
-----

The program is intended to be run by the simple command like::

ip-service -a 192.168.0.130

or::

ip-service -a 192.168.0.130 docker start -ai myservice

positional arguments::
command command to run (optional)

optional arguments::
-h, --help show help and exit
--version, -V display version and license information
--log-level / -L LOG_LEVEL one of {DEBUG,INFO,WARNING,ERROR,CRITICAL}
set log level (default INFO)
--log-file / -l LOG_FILE
set log file (default: /var/log/ip-service)
--interface / -i INTERFACE set network interface (default: the one attached to the default route)
--ip IP / -a IP IP to set (more than one possible)

Installation
------------

The software can be installed easily from the Python software repository, either on the command line or by downloading the
package and installing it explicitly.

.. note::

Python packages should not be installed using *pip* or *easy_install* globally in the system environment under Gentoo Linux.
There is a carefully crafted system to make system-provided Python scripts available under Python 2 as well as Python 3 which
is disturbed by packagages deliberately installed by *pip* or *easy_install*.

Installation using *pip*
~~~~~~~~~~~~~~~~~~~~~~~~

On the command line, type::

pip install --user jw.ip-service

Explicit Installation from a downloaded package
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Download the package from https://pypi.python.org/pypi/jw.ip-service. Unpack it, ``cd`` into the unpacked directory and type the
command::

python setup.py install --user

Bug reports
-----------

Please report bugs and enhancement requests to https://bitbucket.org/JohnnyWezel/jw.ip-service/issues.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jw.ip-service-0.1a2.tar.gz (5.2 kB view details)

Uploaded Source

File details

Details for the file jw.ip-service-0.1a2.tar.gz.

File metadata

  • Download URL: jw.ip-service-0.1a2.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for jw.ip-service-0.1a2.tar.gz
Algorithm Hash digest
SHA256 6f71cdff32a62e41d82782be0fe620b750ab90cdd33bed767b5e23b58968bdea
MD5 8737ccc7ced12a0bc3bcf54234ad8f40
BLAKE2b-256 56137f60c8059582e9e24e5bcbb16fcc5641c6c9f8b2b35b11b2acb03f3c964b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page