Skip to content
This repository has been archived by the owner on Jan 31, 2024. It is now read-only.

Latest commit

 

History

History
86 lines (51 loc) · 3.55 KB

README.md

File metadata and controls

86 lines (51 loc) · 3.55 KB

Pipeline Logstash for procurement data in OCDS format (Open Contracting)

Versión en Español

Data can be downloaded in: Datos Gob MX

It is necessary to download data packages

The documentation of OCDS scheme can be found here: Open Contracting

Dependency

  • ElasticSearch Server
  • Docker

ElasticSearch

  • Index: sfp-compranet-ocds-compiled-releases

Instructions to use this script

  1. Download data packages, which should entail one or several .json files.
  2. Unzip .json files into the input folder.

Execute the following commands in this folder:

  1. docker build . -t logstash-sfp-compranet-ocds:latest This will generate our container, which will allow us to run the process with all the dependencies we need. This command should only be executed one time

  2. docker run --rm -it --net="host" -v $PWD/logs:/logs:rw -v $PWD/input:/input logstash-sfp-compranet-ocds

    This command can receive the following parameters

    • -e "ES_HOST=servidor.com:9200" It specifies the hostname of the ElasticSearch server (default:localhost:9200)
    • -e "ES_INDEX=nombre-indice" It specifies the index name to use in ES (defaul:sfp-compranet-ocds-compiled-releases)

    Example:

    docker run --rm -it --net="host" -v $PWD/logs:/logs:rw -v $PWD/input:/input -e "ES_HOST=example.org:9200" logstash-sfp-compranet-ocds
    
  3. When this procedure is over, we will be able to review the data in ElasticSearch and Kibana.

Pipeline Logstash para datos de Contratos en formato OCDS (Open Contracting)

Datos descargables en: Datos Gob MX

Se requiere descargar los datos por paquetes

La documentacion del esquema OCDS se puede encontrar en: Open Contracting

Dependencias

  • Servidor ElasticSearch
  • Docker

ElasticSearch

  • Indice: sfp-compranet-ocds-compiled-releases

Instrucciones para usar este script

  1. Descargar los paquetes de datos, deben consistir de uno o varios archivos .json
  2. Extraer los archivos .json en la carpeta input

Ejecutar en esta carpeta los siguientes comandos:

  1. docker build . -t logstash-sfp-compranet-ocds:latest Esto generará nuestro contenedor para correr el proceso con todas las dependencias necesarias. Este comando solo tendremos que ejecutarlo una vez

  2. docker run --rm -it --net="host" -v $PWD/logs:/logs:rw -v $PWD/input:/input logstash-sfp-compranet-ocds

    Este comando puede recibir los siguientes parametros

    • -e "ES_HOST=servidor.com:9200" Especifica el hostname del servidor ElasticSearch (default:localhost:9200)
    • -e "ES_INDEX=nombre-indice" Especifica el nombre del indice a usar en ES (defaul:sfp-compranet-ocds-compiled-releases)

    Ejemplo:

    docker run --rm -it --net="host" -v $PWD/logs:/logs:rw -v $PWD/input:/input -e "ES_HOST=example.org:9200" logstash-sfp-compranet-ocds
    
  3. Al finalizar este procedimiento ya podremos consultar los datos en ElasticSearch y Kibana.