-
Notifications
You must be signed in to change notification settings - Fork 12
feat: Initial GitHub Codespaces support #137
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
Conversation
a6345fc to
172f1e6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request adds initial GitHub Codespaces support for the edX Devstack environment. The changes include updated shell scripts for provisioning and post-start configuration, a welcome message for users, and a complete devcontainer configuration with port forwarding and environment setups.
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| provision-set-edx-theme.sh | Updated repository URL to HTTPS and adjusted theme directory path using DEVSTACK_WORKSPACE. |
| .devcontainer/welcome.txt | Introduced a custom welcome message with setup and usage instructions for Codespaces. |
| .devcontainer/updateContentCommand.sh | Added a content update script to configure git auth, install pyenv, and set up repositories. |
| .devcontainer/postStartCommand.sh | Added a post-start script to persist and restore SSH keys across container restarts. |
| .devcontainer/devcontainer.json | Configured container customizations, port forwarding, and environment variables for Codespaces. |
0d87117 to
c4dfe0a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds initial support for GitHub Codespaces by configuring the devcontainer environment for Devstack, setting up various services and tools needed for development.
- Configures the Codespaces environment with scripts to set up zsh, SSH, pyenv, and more.
- Updates cloning logic for the edX themes repository with SSH and HTTPS fallback.
- Introduces several devcontainer configuration files for Codespaces onboarding and runtime operations.
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| provision-set-edx-theme.sh | Updates cloning logic for the edX themes repo with SSH fallback. |
| .devcontainer/welcome.txt | Provides a welcome message with Codespaces-specific setup info. |
| .devcontainer/updateContentCommand.sh | Automates container setup: clone repos, install pyenv, and configure virtualenvs. |
| .devcontainer/postStartCommand.sh | Implements SSH keys backup and recovery in Codespaces. |
| .devcontainer/postCreateCommand.sh | Sets up GitHub auth for pushing branches and updates the welcome note. |
| .devcontainer/devcontainer.json | Configures Codespaces settings, forwarded ports, and container env vars. |
d62a633 to
c95b02f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces initial GitHub Codespaces support for the devstack environment by configuring various components such as the default shell, port forwarding, and repository setups. Key changes include updating the edX themes clone process, adding several container lifecycle scripts (updateContentCommand, postStartCommand, and postCreateCommand), and defining comprehensive devcontainer settings including forwarded ports and environment variables.
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| provision-set-edx-theme.sh | Revises repository clone strategy using SSH with an HTTPS fallback and organizes source directories. |
| .devcontainer/welcome.txt | Adds a welcome message with initial setup instructions for codespace users. |
| .devcontainer/updateContentCommand.sh | Implements several automated provisioning steps including switching to zsh, cloning repos via HTTPS initially, and setting up pyenv and virtual environments. |
| .devcontainer/postStartCommand.sh | Provides logic to backup or recover SSH keys between sessions. |
| .devcontainer/postCreateCommand.sh | Finalizes container setup with welcome message overriding and GitHub CLI git auth configuration. |
| .devcontainer/devcontainer.json | Configures container customizations, features, environment variables, commands, and port forwarding. |
c95b02f to
d1983c7
Compare
What does this devcontainer do?
When are the startup scripts run?
updateContentCommand.sh- Runs first during container build. Resulting image is cached, so put as many steps in here as possible.postCreateCommand.sh- Runs second during container build. Result is not cached, so every time a developer creates a new container they wait for this to run.postStartCommand.sh- Runs every time the container starts.Steps to create your own codespace
https://2u-internal.atlassian.net/wiki/spaces/SOL/pages/2003370007/UNOFFICIAL+Devstack+on+Codespaces+Guide#Setup
Notes
Since the image is pre-built and cached, developers should instantly have a new devstack environment with fully cloned repos, functioning pyenv, pre-seeded virtual environments, and all services provisioned including enterprise apps.
VS Code is what does the magic of port forwarding from the container into you local machine's localhost, so http://localhost:18000, etc. still work.
Other PRs