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
- ElasticSearch Server
- Docker
- Index:
sfp-compranet-ocds-compiled-releases
- Download data packages, which should entail one or several .json files.
- Unzip .json files into the
input
folder.
Execute the following commands in this folder:
-
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 -
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
-
When this procedure is over, we will be able to review the data in ElasticSearch and Kibana.
Datos descargables en: Datos Gob MX
Se requiere descargar los datos por paquetes
La documentacion del esquema OCDS se puede encontrar en: Open Contracting
- Servidor ElasticSearch
- Docker
- Indice:
sfp-compranet-ocds-compiled-releases
- Descargar los paquetes de datos, deben consistir de uno o varios archivos .json
- Extraer los archivos .json en la carpeta
input
Ejecutar en esta carpeta los siguientes comandos:
-
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 -
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
-
Al finalizar este procedimiento ya podremos consultar los datos en ElasticSearch y Kibana.