Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide docs on how to build & test the codebase #484

Closed
tomkerkhove opened this issue Apr 2, 2019 · 3 comments · Fixed by #744
Closed

Provide docs on how to build & test the codebase #484

tomkerkhove opened this issue Apr 2, 2019 · 3 comments · Fixed by #744
Labels
documentation All issues related to documentation on how to use it, deploy it, etc ease-of-contribution All issues related to making it easy to contribute, etc. help-wanted All issues where people can contribute to the project

Comments

@tomkerkhove
Copy link
Owner

Provide docs on how to build the codebase so that people can get started.

Should include how to :

  • Build our solution
  • Run unit tests
  • Build Docker image

Location is still TBD - Either README or CONTRIBUTING

@tomkerkhove tomkerkhove added help-wanted All issues where people can contribute to the project documentation All issues related to documentation on how to use it, deploy it, etc ease-of-contribution All issues related to making it easy to contribute, etc. labels Apr 2, 2019
@tomkerkhove tomkerkhove changed the title Provide docs on how to build the codebase Provide docs on how to build & test the codebase Apr 27, 2019
@tomkerkhove tomkerkhove added the Hacktoberfest All issues available for contribution during Hacktoberfest label Sep 25, 2019
@adamconnelly
Copy link
Contributor

I don't mind picking this up, but any chance you can quickly explain to me how you go about running Promitor locally for testing?

The reason I ask is that I couldn't get Promitor to work locally without editing some of the code because it was looking in a hard-coded location for the config files, so I'm guessing I wasn't running it in the way you intended.

Also, at the moment I've only got VS 2017 installed, which means the Docker project doesn't work for me. I'm assuming you must be using VS 2019. Is that correct?

@tomkerkhove
Copy link
Owner Author

In theory all you have to change is the the Azure AD app to authenticate with (https://github.com/tomkerkhove/promitor/blob/master/src/docker-compose.override.yml#L7) and update the local metric config (https://github.com/tomkerkhove/promitor/blob/master/src/metric-config.yaml) to work with your subscription or scrape the resources you want - That should be it for the rest.

In terms of testing, it's still manual for now where I verify that the metrics are outputted and make sense, but at some point we'll have integration tests (#33) but it's all about prios and time.

I am using 2019 indeed but used 2017 for Promitor before that which worked fine, did you read the docs on this?

https://docs.microsoft.com/en-us/dotnet/architecture/containerized-lifecycle/design-develop-containerized-apps/visual-studio-tools-for-docker

I would certainly get it if you couldn't send a PR for this and that's ok. If you would get it working and are up for it, I would be more than happy - But don't feel obliged to do it!

adamconnelly added a commit to adamconnelly/promitor that referenced this issue Oct 15, 2019
I've added a new document with information about how to build and test Promitor, along with an overview of the repository layout.

Fixes tomkerkhove#484
@adamconnelly
Copy link
Contributor

Ok - I've sent a PR. It needs to at least be tweaked a bit, but I figured it gave us a starting point to talk about.

Also, I've tried running the Docker project again, but I just seem to get the following error:

6>docker ps --filter "status=running" --filter "name=promitordocker8059240556648310614_promitor.scraper_" --format {{.ID}} -n 1
6>db560a1fd95b
6>docker exec -i db560a1fd95b /bin/bash -c "if PID=$(pidof -x dotnet); then kill $PID; fi"
6>OCI runtime exec failed: exec failed: container_linux.go:345: starting container process caused "exec: \"/bin/bash\": stat /bin/bash: no such file or directory": unknown
6>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Sdks\Microsoft.Docker.Sdk\build\Microsoft.VisualStudio.Docker.Compose.targets(310,5): error : .
6>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Sdks\Microsoft.Docker.Sdk\build\Microsoft.VisualStudio.Docker.Compose.targets(310,5): error : 
6>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Sdks\Microsoft.Docker.Sdk\build\Microsoft.VisualStudio.Docker.Compose.targets(310,5): error : For more troubleshooting information, go to http://aka.ms/DockerToolsTroubleshooting
6>Done building project "Promitor.Docker.dcproj" -- FAILED.

It might be something to do with the way I've configured my machine. I can also try VS 2019 at some point to check whether that works.

tomkerkhove pushed a commit that referenced this issue Oct 16, 2019
* Add development guide

I've added a new document with information about how to build and test Promitor, along with an overview of the repository layout.

Fixes #484

* fixup! Add development guide
@tomkerkhove tomkerkhove removed the Hacktoberfest All issues available for contribution during Hacktoberfest label Nov 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation All issues related to documentation on how to use it, deploy it, etc ease-of-contribution All issues related to making it easy to contribute, etc. help-wanted All issues where people can contribute to the project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants