tfsaggregator / aggregator-cli

A new version of Aggregator aiming at Azure DevOps (ex Visual Studio Team Services)
https://tfsaggregator.github.io/
Apache License 2.0
73 stars 32 forks source link

Docker image is not working #239

Closed Dushki closed 3 years ago

Dushki commented 3 years ago

while running a container docker fails with below error : System.UnauthorizedAccessException: Access to the path '/secrets/apikeys.json' is denied. Any help is appreciated :)

giuliov commented 3 years ago

Probably the steps in https://tfsaggregator.github.io/docs/v3/setup/docker/ are not that clear.

  1. You need to create an apikeys.json file, say C:\aggregator\secrets\apikeys.json with keys you generate yourself
  2. start the container mounting that folder e.g.
    docker run --rm -it -p 5320:5320 -e Aggregator_VstsToken=********  -e ASPNETCORE_Kestrel__Certificates__Default__Password="********"  --mount type=bind,source=c:/aggregator/secrets/,target=c:/secrets --mount type=bind,source=c:/aggregator/rules/,target=c:/rules   tfsaggregator/aggregator3:latest
Dushki commented 3 years ago

Thanks giuliov However I have already tried with creating the keys in /secrets on Linux VM and mounted the volume but still same error.

giuliov commented 3 years ago

Have you checked with a simple container (e.g. busybox) if you can read the file in the mounted directory? If fails, then chmod / chown the dir on the host until you succeed

Dushki commented 3 years ago

Thanks Giuliov I am able to run the docker container. However I am not able to find the next steps ? Can you please guide me on this? I have gone through the documentation but it is not helping :(

giuliov commented 3 years ago

You are the first asking about the Docker scenario, so you are beta-testing the docs. This page can give you the overall picture, maybe.

Can you explain what you want to do next, what info you expect to find/read?

Dushki commented 3 years ago

Now we want to test the rules, how can we do it ? Also we want to login to Azure and AzDo, do we need to install Aggregator CLI?

giuliov commented 3 years ago

Here is a checklist that should help you through the process

Now the Aggregator instance running in the container is ready to serve.

Dushki commented 3 years ago

Thank you @giuliov for the explanation. I have performed all the step and am stuck at last point of executing map.local.rule command. The command requires a parameter "target url" which Base Url of an existing Aggregator instance running in Docker. Can you please tell me how can i set up this or where i can find this. I am using linux vm and generated the self signed certificate using openssl command.

giuliov commented 3 years ago

Have you tried the hostname of the machine where the container is running?