GitHub Codespaces are awesome! Here are some tips for using them.
gh cs create
- Create a Codespacegh cs code
- Open VS Code to the CodeSpace 3script/attach-runner-codespace
- Run this in a separate tab in theaseriousbiz/abbot
directory to allow the skill runner to call back toAbbot.Web
.gh cs ssh
- to SSH into the Codespacescript/server
- in the SSH session to start the runner.
Here's an end-to-end demo of launching the Python Skill Runner in a Codespace, but you can also find the same information in the docs below:
https://drive.google.com/file/d/1t3NV8OLlR-9ljtIqgZplWoFaSoOPCwRj/view?usp=sharing
The non-.NET skill runners, in abbot-py and abbot-js, are configured to easily run in codespaces.
To run these in a Codespace, install the gh CLI tool and run gh cs create
to create a codespace:
CreateRunnerCodespace.mp4
We recommend the 4 core
machine spec.
It provides a good balance of enough power to develop in quickly, which being fairly cost-effective.
Once you have the runner open in a Codespace, you can launch it and it should set up port-forwards appropriately so that Abbot.Web can talk to the runner.
However, Skill Runners also need to be able to reach Abbot.Web.
Currently, we don't recommend running Abbot.Web in a Codespace, so you need to tunnel the port Abbot.Web runs on in to your Codespace.
We provide a script for exactly that!
Just run the script/attach-runner-codespace
command, select the appropriate Codespace, and it will start a tunnel.
You can test that the tunnel is working by running curl -k https://localhost:4979
in your Codespace (-k
tells curl to ignore certificate trust errors).
AttachRunnerCodespace.mp4
Once your Codespace is up and running, you can use the gh cs
commands to manage it:
gh cs delete
to delete codespacesgh cs ssh
to SSH in to your codespacegh cs code
to launch VS Code for your Codespace.
TBD! Right now, we strongly advise using JetBrains Rider to work on our .NET Projects and it doesn't have native Codespaces support (yet...). If you want to use VSCode, Codespaces should work with Abbot.Web though!
On the Codespaces Settings Page, you can configure GPG verification.
In any Codespace for a repo you've configured for GPG verification, you can sign your commits (using git commit -S
or by setting the commit.gpgsign
config setting to true).
You can use the gh cs cp
command line tool to copy files between your machine and codespaces!
You can also drag and drop in and out of VS Code.
Don't like VS Code? Prefer vim
? You can SSH directly to your Codespace using gh cs ssh
!