Skip to main content

A simple tools to log the server ip address

Project description

Build

pip install -r requirements.txt
rm -fr dist
python -m build 
python -m twine upload dist/* -u __token__ -p $(PYPI_TOKEN)

configuration

device-name: server992
kafka-config:
  type: 1  # 1 is for default sasl_ssl
  value:
    bootstrap_servers:
      - { host }
    sasl_mechanism: SCRAM-SHA-256
    security_protocol: SASL_SSL
    sasl_plain_username: { username }
    sasl_plain_password: { password }
kafka-config:
   type: 1
   value:
      bootstrap_servers:
         - { host }
      sasl_mechanism: SCRAM-SHA-256
      security_protocol: SASL_SSL
      sasl_plain_username: { username }
      sasl_plain_password: { password }
      consumer:
         group_id: {group-id}
         topic: {topic-name}

Docker

Build

  1. Download the Dockerfile for build
    mkdir sipc
    pushd sipc
    curl https://gist.githubusercontent.com/xh-dev/3359450fd15f843016cc6f0babd8bfc0/raw/Dockerfile -O
    
  2. Create config.yaml base on template in Configuration section.
  3. build the docker image
docker build --no-cache -t sipc:latest .

Execute

push to kafka

docker run --rm -it -v $(pwd)/config.yaml:/app/config.yaml sipc:latest
# or 
# docker run --rm -it -v $(pwd)/config.yaml:/app/config.yaml sipc:latest python -m sipc-xethhung12 --publish

pull from kafka

docker run --rm -it -v $(pwd)/config.yaml:/app/config.yaml sipc:latest python -m sipc-xethhung12 --subscribe

gen env meta file

docker run --rm -it -v $(pwd)/config.yaml:/app/config.yaml sipc:latest python -m sipc-xethhung12 --cast

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

sipc_xethhung12-0.0.8.tar.gz (3.0 MB view hashes)

Uploaded Source

Built Distribution

sipc_xethhung12-0.0.8-py3-none-any.whl (6.9 kB view hashes)

Uploaded Python 3

Supported by

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