thanos
thanos copied to clipboard
Support Github Codespace
Is your proposal related to a problem?
Right now Thanos repo supports using Gitpod as a remote development environment. Similar to that, Github codespace is also a remote development environment that integrates better on GH.
Although this feature is ready to use on the Thanos repo, a lot of toolings are missing in the cloud env. It would be good to have better support for this.
Describe the solution you'd like
Follow examples like https://github.com/codespaces-examples/go to add a folder for .devcontainer
. Add Dockerfile, setup script, etc so that developers can use GH codespace for development out of the box.
Additional context
(Write your answer here.)
Hey, can I work on this?
Yeah, feel free to take it!
What is exactly missing? I've been using Codespaces for a while and they are working fine for me. I don't remember having to install extra tooling in them. All the PRs I opened in Thanos, except for the very first, came from work through Codespaces.
Also no codespaces setting. I think this is only for private orgs/repos 🤔
To have access to Codespaces in public repos as an individual you have to be enrolled in the beta: https://github.com/features/codespaces/signup
What is exactly missing? I've been using Codespaces for a while and they are working fine for me. I don't remember having to install extra tooling in them. All the PRs I opened in Thanos, except for the very first, came from work through Codespaces.
Well in order to use github codespaces we have to enrolled in the beta but without enrolled in the beta everyone can use github codespace that' s the main goal behind this issue(At the end of this year everyone has the github codespaces access). Correct me if I am wrong
I understand, @Akshit42-hue. Anyone will be automatically able to use Github Codespaces on any public repository when it goes out of beta. There's no action required from the Thanos organization to enable this.
The configuration at organization level is to allow usage in private repositories, as @bwplotka mentioned.
Regarding tooling, the default image Github provides has everything needed for development in this repository and the makefile does a great job at downloading the rest, so a .devcontainer
folder with extra setup is not needed.
I understand, @Akshit42-hue. Anyone will be automatically able to use Github Codespaces on any public repository when it goes out of beta. There's no action required from the Thanos organization to enable this.
The configuration at organization level is to allow usage in private repositories, as @bwplotka mentioned.
Regarding tooling, the default image Github provides has everything needed for development in this repository and the makefile does a great job at downloading the rest, so a
.devcontainer
folder with extra setup is not needed.
Ohh Got it! So this issue need to be close
What I intended to solve for this pr is to bundle the required toolings for Thanos in the GitHub codespace so that codespace users can have an environment with all the tools installed including binaries like Prometheus, Promtool, etc.
@yeya24 the default container image at the moment is based off of Ubuntu 20.04.4 LTS and has quite some batteries included, I didn't have to install anything. The makefile took care of downloading any missing tool.
Given my experience using Codespaces to develop Thanos, I would say we can close this. Even interactive tests work fine.
@douglascamata That's good to know. From what I tried last time, I found a lot of important toolings are missing. Maybe you can help provide a quick start guide about using code space to setup the dev environment?
@douglascamata That's good to know. From what I tried last time, I found a lot of important toolings are missing. Maybe you can help provide a quick start guide about using code space to setup the dev environment?
+1
I can add something. It'll be nothing more than clicking buttons in the Github interface though (it's so intuitive and easy to follow), like you would do in any other project. I didn't have to do any special customization and it worked out of the box.
I wouldn't call it out of box if people still need to run some make commands to install some toolings and Prometheus.
I feel the doc would be super helpful to have and then we can close this issue.
@yeya24 the make commands are well so structured that people don't need to run special commands to download dependencies or set up things. You should give a try to work on a fresh clone of Thanos, it's a breeze. You run the make command for what you need and all dependencies are set-up.
The commands we have in the GitPod configuration in fact aren't needed. That is severely out of date. For example, nowadays Prometheus is installed with Bingo automatically when running any makefile target that will need it, we don't need to download it with wget/curl.
Ah, there is one thing that comes to mind that we could add to the .devcontainer
file though:
- A default set of extensions that will be installed. My suggestions:
-
Go
-
gitignore
-
jsonnet language server
(by Grafana) -
Markdown all in one
-
ShellCheck
-
Docker
-
YAML
-
Kubernetes
-
Thanks @douglascamata for all the shared information. @Akshit42-hue Regarding the extensions to install, would you like to work on them?
Thanks @douglascamata for all the shared information. @Akshit42-hue Regarding the extensions to install, would you like to work on them?
Yes, definitely :)
Close as #5661 has been merged.