Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

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.

Release files for jw.ip-service 0.1a2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jw.ip-service 0.1a2
File Size Uploaded
jw.ip-service-0.1a2.tar.gz 5.2 kB Details

Release files / jw.ip-service-0.1a2.tar.gz

Download URL jw.ip-service-0.1a2.tar.gz
Size 5.2 kB
Tags Source
SHA-256 checksum
How to use checksums
6f71cdff32a62e41d82782be0fe620b750ab90cdd33bed767b5e23b58968bdea
BLAKE2b-256 checksum
How to use checksums
56137f60c8059582e9e24e5bcbb16fcc5641c6c9f8b2b35b11b2acb03f3c964b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1a2 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page