===== Witt Reports ===== This project was initiated by a customer request: https://trello.com/c/o1Rs0TcH/259-witt-api-for-sold-out-products-in-visualytics The reports need to be updated daily (except style_cover, which changes weekly) ===== High level Description ===== This solution is split into two components:
    * A FastAPI service that provides two endpoints to generate the required CSV files * A bash script that calls the service and stores the result in a location that can be accessed by the customer
===== Links ===== * GIT: https://git.picalike.corpex-kunden.de/incubator/witt-reports-api * Generated Reports * http://support.picalike.com/witt_reports/look_coverage.csv * http://support.picalike.com/witt_reports/look_availability.csv ===== Operations ===== The service to generate the report lives on pci01.picalike.corpex-kunden.de, while the cronjob to store the report on a webserver lives on frontend01.picalike.corpex-kunden.de === Deploy this service === It is installed via docker. In the git are bash skripts for deployment to pci01. It follows the typical * bash ice_tea_build.sh * bash ice_tea_push.sh * bash ice_tea_deploy.sh cycle. === Start this service === * on pci01: cd ~/docker_bin/witt_reports/ ; bash ice_tea_run.sh * on frontend01: bash ~/bin/witt_reports.sh === Use this service === * curl http://pci01.picalike.corpex-kunden.de:8320/style_coverage > /tmp/style_cover.csv # should be fast * curl http://pci01.picalike.corpex-kunden.de:8320/availability > /tmp/avail.csv # could take a while === Repair this service === * your guess is as good as mine * restarting the docker container on pci01 might help ===== Known Issues ===== * not connected to any serivce discovery service (intentionally not connected to zookeeper) * logging does not have timestamps * logging needs general improvement ===== Super Special Knowledge ===== * The webservice performs a lot of calls to pci-server:/get_product_metaData in an asynchronous fashion. * The list of witt shops is currently hard coded in main.py (problem for future self) * pci-server is hard coded to http://pci01.picalike.corpex-kunden.de:8090 * the docker container is restarted every morning at 7 AM to avoid memory issues * the report generation is triggered via cronjob on picalike@frontend01.picalike.corpex-kunden.de (not HPC) ===== Experiments / Results / Knowledge Base ===== You performed a test? share it. ===== Dependencies ===== * PCI: http://dokuwiki.picalike.corpex-kunden.de/pci_doku ===== Incident Log ===== ===== Authors =====
    * Johannes Otto * Bjoern Zessack