

GitHub Codespaces Add Support for Microservices and Monorepo Projects
source link: https://www.infoq.com/news/2022/05/GitHub-codespaces-microservices/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

GitHub Codespaces Add Support for Microservices and Monorepo Projects
May 03, 2022 2 min read
GitHub continues to extend its cloud-based development environment Codespaces, aiming to make it more flexible and increase developer productivity. Specifically, the latest release of Codespaces targets teams developing microservices or using a large monorepo.
After introducing prebuilt Codespaces to speed the time required to spin up a development environment, GitHub has been working to make Codespaces better suited to working with multi-repository and monorepo projects and make it easier for larger organization to adopt them.
The multi-repository scenario is typical of microservices, where each service is managed through its own repo:
When developing a feature that spans many of these services, you might want to clone and interact with each repository within your codespace.
Usually a codespace is created from a specific repository, to which it has access through a scoped token. In the past, if the developer needed to access additional repositories from within that codespace, for example to clone them or create pull requests, they were required to manually create additional personal access tokens.
Now, developers can simply specify which repositories a codespace is allowed to access and using which privilege level by editing the codespace devcontainer.json configuration file.
This is how you can add the my_org/my_repo
repository to a codespace and grant it the privilege to create new issues:
{
"customizations": {
"codespaces": {
"repositories": {
"my_org/my_repo": {
"permissions": {
"issues": "write"
}
}
}
}
}
}
You can also set permissions for all repos belonging to an organization by using a wildcard, e.g., "myorg/*"
instead of "myorg/repo"
in the example above. Similarly, you can grant all write permissions by using "permissions": { "write-all" }
.
If you have configured additional repos in your codespace configuration, you will be prompted for authorization of the first launch of the codespace.
In the future, we plan to make it even simpler to work with microservices in Codespaces by automatically cloning across multiple services and allowing you to configure how your environment is initialized to run each repository.
Support for monorepos targets teams at the other end of the spectrum: instead of having one or more teams working with multiple intertwined repositories, you have multiple teams working with one large repo. In this case, each team may want to configure the codespace in a specific way.
To support this use case, GitHub Codespaces introduced the possibility to define multiple devcontainer.json
files, each belonging to its own directory, e.g. .devcontainer/${DIR}/devcontainer.json
.
If multiple configurations exist, users will be able to select their specific configuration at the time of codespace creation, allowing you to better customize your codespaces to fit the specific needs of your teams.
Another new feature aimed at bringing more flexibility to Codespaces is a new UI for advanced codespace creation, which allows developers to define a number of options when creating a codespace, including branch, region, machine type, and dev container configuration.
About the Author
Sergio De Simone
Sergio De Simone is a software engineer. Sergio has been working as a software engineer for over fifteen years across a range of different projects and companies, including such different work environments as Siemens, HP, and small startups. For the last few years, his focus has been on development for mobile platforms and related technologies. He is currently working for BigML, Inc., where he leads iOS and OS X development.
Show moreRecommend
-
9
Brought to you by In this episode, Gerhard talks to his Skyhook Adventure friends: Alan Cooney, Saul Cullen & Wycliffe Maina. They are the ones that introduced Gerhard to the world of serverless in the context...
-
8
EdgeX Foundry Services EdgeX Foundry is a vendor-neutral open source project hosted by The Linux Foundation building a common open framework for IoT edge computing. At the heart of the project is an interoperability framework hosted...
-
14
Creating A Public/Private Multi-Monorepo For PHP Projects ...
-
9
GitHub Introduces Projects, Updates Codespaces, Copilot, Code Scanning, and More Oct 29, 2021...
-
41
NX monorepo: Deploy and Run Node microservices locally with Docker and KubernetesBy Ruslan Elishaev,January 6, 2022
-
4
Monorepo Javascript Projects with Yarn Workspaces and Lerna Monorepo is a software development strategy in which a single repository contains code for multiple projects with shared dependencies. It has a...
-
6
Make a monorepo for your Android projects By blundell Last updated: 2022-01-262022-01-27 This...
-
9
Codespaces for multi-repository and monorepo scenariosWe’re releasing exciting improvements that will streamline your Codespaces experience when working with multi-repository projects and monorepo...
-
4
codespaces.el This package provides support for connecting to GitHub Codespaces in Emacs via TRAMP. It...
-
11
How to add Storybook and Chromatic to your Angular monorepoDecember 19, 2022Storybook is an amazing tool, and you should use it if you’re thinking about starting a reusable component libra...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK