Skip to content

kangelos/devops_tools

Repository files navigation

devops_tools and various little tools

You got the code , read it, but if you are too lazy , here are some notes

  • ansible_tasks: Batch ansible tasks remotely using rabbitmq as a queueing system.
  • taskify: Conditional decorator for kuyruk to allow imports INTO other modules.
  • sendfile: Use Rabbitmq to send small files to remote hosts behind firewalls.
  • holdSundays: Place a hold to ZFS snapshots on Sundays.
  • PowerDNS SOA autoupdate: Increase a zone's serial number on update for powerDNS.
  • swiss_dormant: Scrape the Swiss federal database for dormant accounts.
  • runME: A Generic python popen with proper ordering of stdout and stderr.
  • revvy: A universal reverse ssh tunnel in 46 lines of scripts/configs.
  • impinjfirm.py: retrieve the firmware version of an impinj rfid reader.
  • joiner: convert multiline logs into digestible RS docs, ingest 500 at a time.
  • λ-alerts: Post aws SNS alerts and events to SLACK.
  • QR, a QR scanner for the Greek govnmt vaccination cert. Not a proper place for it , but I had to put it some place.
  • kafkalag: Drill down and Identify kafka lag issues.
  • λ-cloudtrail2elastic: poh sre's serverless cloudtrail ingestion to elasticsearch .
  • waf2elastic: Read AWS WAF logs from an S3 bucket and feed them in batches to an ELK cluster.
  • mqtt-panel: A fork of Fabian Affolter' mqtt-panel, severely abused to make it work for Dingtian devices.
  • bridger: Po'boys kuberbnetes VPN. Access pod IPs, service IPs and kube-dns entries from your laptop.
  • chaosmonkey: A 1 1/2 bash script kubernetes chaosmonkey helm chart. No dependencies, not even for an image!
  • onlyaws: Is your openvpn GW forcing all of your traffic through it but you only need it for AWS work ?
  • s3replicate: AWS S3 CRR complete python code
  • traefik_es_logs Python Script to export traefik logs from elasticsearch to an apache format file (the message field)
  • otterize to svg Bash script to convert otterize network mapper output to SVG maps via mermaid
  • ingestor Elastic search ingest pipeline for converting traefik logs to Common Log format. Includes GeoLocation points.
  • reindexer Bash script to drive the traefik ingestion pipeline

Importing user group membership into terraform

Importing user group membership into terraform

It is an incredible pain to import manually crufted groups, users and memberships into terraform The basic idea is that you create the terraform manifest and then you import every entry as per the documentation

basic assumptions

  • You have existing manisfests for users
  • You have existing manisfests for groups

now the way to do the import is bash list_aws_user_groups.bash > groups.txt python3 tf_user_group_membership.py > user_group_membership.tf

terraform plan should now attempt to re-create all the group memberships for you. But fear not, the marvelous script creates your import command for you. grep import user_group_membership.tf > toexecute edit and remove the hashes bash toexecute

Wait and see

Note: If you have any errors like usernames with periods, please hand edit the manifest

Look for more complicated tools @ https://managenot.wordpress.com/