keboola/debug-log-uploader

Keboola Debug Log Uploader

2.2.1 2022-05-25 06:46 UTC

This package is auto-updated.

Last update: 2023-01-02 14:57:08 UTC


README

Build Status Latest Stable Version Total Downloads License

Simple package for uploading logs to AWS S3, Azure Blob Storage or local filesystem.

Development

Create Azure resources

Use the provided azure-services.json to create ARM stack:

export RESOURCE_GROUP=testing-debug-log-uploader
az group create --name $RESOURCE_GROUP --location "East US"
az deployment group create \
    --resource-group $RESOURCE_GROUP \
    --name debug-log-uploader \
    --template-file ./azure-services.json \
    --query "properties.outputs"

Go to the Azure Portal - Storage Account - Access Keys and copy connection string.

Create .env file

Create .env file (from .env.dist) with your environment variables:

UPLOADER_AWS_KEY=your_key
UPLOADER_AWS_SECRET=your_secret
UPLOADER_AWS_REGION=your_region
UPLOADER_S3_BUCKET=your_s3_bucket
UPLOADER_ABS_CONNECTION_STRING=
UPLOADER_ABS_CONTAINER=

Start container, install dependencies:

docker-compose run --rm php sh -c 'composer install && bash'

Tests

Execute tests.sh script which contains phpunit and related commands.

In running container:

./tests.sh

From outside:

docker-compose run --rm php sh -c 'composer install && ./tests.sh'

License

MIT licensed, see LICENSE file.