GitHub Codespaces support for rabbitmq-docs

199 views
Skip to first unread message

videl...@gmail.com

unread,
Mar 9, 2021, 4:08:50 PM3/9/21
to rabbitmq-users
Hi RabbitMQ team,

I've opened this PR to RMQ docs to start a discussion https://github.com/rabbitmq/rabbitmq-tutorials/pull/284

What the PR adds is a devcontainer that for now supports RabbitMQ & JavaScript, meaning that if a user wants to learn RabbitMQ by following the get started guide, they can just clone the repo in their GitHub, and just start a GitHub Codespace to start running the tutorials without needing to install RabbitMQ nor node.js

You can see the concept in action here: https://www.youtube.com/watch?v=B_gtLXvDQhE

How I think this should work to become part of rabbitmq-docs: we should create a devcontainer that supports as many of the officially supported languages as possible. This support could be added gradually of course.

Thoughts?

Alvaro

M K

unread,
Mar 9, 2021, 4:12:12 PM3/9/21
to rabbitmq-users
Álvaro,

This is pretty cool. I am certainly in favor of our tutorials expanding to more environments, including
Codespaces. Much of our audience is already on GitHub.

As with any user-facing addition, my only concern is how do we not stretch ourselves too thin and who is going
to maintain it going forward.

When you say it should become a part of RabbitMQ docs, do you mean it will eventually have a doc guide
or a new tutorial port for some languages, or that it makes sense to extend rabbitmq-tutorials (the executable examples)
to support Codespaces?

Alvaro Videla

unread,
Mar 9, 2021, 5:00:54 PM3/9/21
to rabbitm...@googlegroups.com
Codespaces works this way:

You add a .devcontainer folder to a project on GitHub, that project works automagically with Codespaces.  That's it. A RabbitMQ user then just clones rabbitmq-docs, and can play with RabbitMQ right away.

What does automagically means, and what's needed to support there: we need a container that includes RabbitMQ, like the one you see in the PR, plus any language we might want to support right away (like JavaScript, ruby, etc).

At the moment Codespaces supports project level .devcontainers, but in their roadmap they want to have support for folder level devcontainers. What does this mean?

Right now having support for many languages means having a Dockerfile that runs RabbitMQ + javascript + any other lang.

In the future we could have one Dockerfile per language.

BTW, for RabbitMQ this is "free" so to speak. There is no cost on having a .devcontainer folder in a repo, besides maintenance of the Dockerfile of course. This also works with Visual Studio Code on the desktop, so this could also help standardizing dev environments for people contributing to RabbitMQ for example. 

Does it make sense?

Regards,

Alvaro

--
You received this message because you are subscribed to a topic in the Google Groups "rabbitmq-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rabbitmq-users/8iIHu5XNLsA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to rabbitmq-user...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rabbitmq-users/66a1fd3a-a3ec-466f-a7ab-30e75a187321n%40googlegroups.com.

M K

unread,
Mar 10, 2021, 7:44:01 PM3/10/21
to rabbitmq-users
Yes, it's clearer now. I think this belongs to the tutorials repo since those who want to, well, run the tutorials clone that
and not the docs.

Per-directory Codespaces will be much closer to how rabbitmq-tutorials is structured. We can start with JavaScript,
Java and Python are the most popular tutorials IIRC according to Google Analytics.

Does this mean that we need to have recent and supported versions of RabbitMQ, Node, Python 3 and JDK in this .devcontainer
and that's about it for the time being? I see [1] has an "entry point" which is a shell.

Alvaro Videla

unread,
Mar 11, 2021, 9:52:26 AM3/11/21
to rabbitm...@googlegroups.com
Yes, users would clone rabbitmq-tutorials, my bad.

>Does this mean that we need to have recent and supported versions of RabbitMQ, Node, Python 3 and JDK in this .devcontainer
and that's about it for the time being? 

Yes, that could be good first step.

What do you mean by "entry point" here:

>I see [1] has an "entry point" which is a shell.

-Alvaro

M K

unread,
Mar 12, 2021, 2:55:11 AM3/12/21
to rabbitmq-users
By "entrypoint" I mean this script [1] which I assume is semantically equivalent to Docker/OCI image entry points.

I'm happy to merge your PR as is. Is there anything missing from it? Where should we document how to use these tutorials with Codespaces?

Alvaro Videla

unread,
Mar 12, 2021, 6:56:27 AM3/12/21
to rabbitm...@googlegroups.com
Let's go ahead and merge the PR and iterate over it as we add more language support.

Re Codespaces availability: at the moment it's in public beta. Our goal is to start having OSS Codespaces ready by the time the feature reaches GA, in that way we'll allow to use this feature as it lands.

About documenting this on rabbitmq-docs, is there a preferred place for this? Maybe the getstarted page? I can add a note there mentioning the public beta factor of Codespaces, and then update it as it reaches GA.

-Alvaro

M K

unread,
Mar 13, 2021, 5:19:40 AM3/13/21
to rabbitmq-users
Done.

Alvaro Videla

unread,
Mar 14, 2021, 2:19:58 PM3/14/21
to rabbitm...@googlegroups.com
Awesome, thanks Michael.

Reply all
Reply to author
Forward
0 new messages