Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
How GitHub uses Codespaces
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Yuichi Tanaka
August 31, 2022
Programming
1.3k
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
How GitHub uses Codespaces
Tech Stand #9 GitHubにてお話しした際の資料です。
https://standfm.connpass.com/event/256786/
Yuichi Tanaka
August 31, 2022
More Decks by Yuichi Tanaka
See All by Yuichi Tanaka
GitHub Copilot Tips and Tricks (en)
yuichielectric
1
340
GitHub Copilot Tips and Tricks
yuichielectric
43
20k
30分でわかるシステム運用アンチパターン / Operations Anti Patterns in 30 minutes
yuichielectric
14
21k
オープンソースのベストプラクティスを企業内で実践/How to implement InnerSource
yuichielectric
12
19k
GitHubにおける継続的デリバリー/How GitHub builds and deploy software
yuichielectric
12
4.5k
GitHubにおける GitHub Actions利用法/How GitHub uses GitHub Actions
yuichielectric
7
820
InnerSourceのすすめ / InnerSource
yuichielectric
8
2k
GitHub Pro Tips
yuichielectric
0
260
Other Decks in Programming
See All in Programming
Developing with AI Agents — Codex, Claude Code & Cowork Practical Guide
x5gtrn
PRO
0
1.3k
Oxlintのカスタムルールの現況
syumai
6
1.1k
気づいたらRubyで100作品 ー クリエイティブコーディングが生活の一部になるまで / 100 Ruby Sketches Later: How Creative Coding Became Part of My Life
chobishiba
3
570
TypeScript+Orvalで実現する型安全かつ堅牢でスケーラブルなマルチチャネル通知基盤 / TSKaigi Night talks ~after conference~
d0riven
0
330
依存関係から依存物へ―Dependencyという言葉の歴史をひも解く
j_lee
0
120
そのテスト、説明できますか?~LWテスト戦略FW~のご紹介
nakahara
0
110
Mujeres en SEO Summit 2026 - Greatest Disaster Hits en Web Performance
guaca
0
170
キャリア迷子上等 ─ "ない道"は自分で作ればいい
16bitidol
3
2.1k
dRuby over BLE
makicamel
2
340
Composerを使ったサプライチェーン攻撃の様子を眺めてみる #phpstudy
o0h
PRO
2
250
生成AI時代にこそ効くGo | Why Go Works in the Age of Generative AI
mom0tomo
8
3.2k
Semantic Version 単位で戦略を柔軟に変えて、パッケージアップデートを自動化する
daitasu
1
230
Featured
See All Featured
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
190
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Accessibility Awareness
sabderemane
1
140
Writing Fast Ruby
sferik
630
63k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.7k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
62
44k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
200
Everyday Curiosity
cassininazir
0
230
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
420
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.9k
Transcript
2022/08/31 How GitHub uses Codespaces Tech Stand #9 @yuichielectric 田中
裕一 (@yuichielectric) How GitHub uses Codespaces
2022/08/31 How GitHub uses Codespaces Tech Stand #9 @yuichielectric 田中
裕一 GitHub、シニアソリューションズエンジニア 個人で「システム運用アンチパターン」 (オライリー・ジャパン)の翻訳を担当 @yuichielectric
Codespaces クラウド上の開発環境 妥協のないコーディング体験 ブラウザから、コーディング、ビルド、テスト、 デバッグ、デプロイが可能な完全な開発環境に アクセス。 ワークフローをシンプルに 依存関係やSSHキーを自動でセットアップ。 あらゆるプロジェクトでコーディングを開始できる までの時間を短縮。
カスタマイズ可能 dotfileによるエディタの設定やすべてのCodespace 環境にあらかじめインストールしておくVS Code拡 張の指定など
{ "name": "Go", "build": { "dockerfile": "Dockerfile", "args": { "VARIANT":
"1-bullseye", } }, "runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ], "settings": { "go.toolsManagement.checkForUpdates": "local", "go.useLanguageServer": true, "go.gopath": "/go", "go.goroot": "/usr/local/go" }, "extensions": [ "golang.Go" ], "forwardPorts": [8080], "postCreateCommand": "go version", "remoteUser": "vscode" } https://github.com/microsoft/vscode-dev-containers/blob/main/containers/go/.devcontainer/devcontainer.json 名前 コンテナの指定 Visual Studio Codeの設定 Visual Studio Code拡張 フォワードするポート 環境作成後コマンド 実行ユーザー コンテナ実行時パラメータ .devcontainer/devcontainer.json
2022/08/31 How GitHub uses Codespaces Tech Stand #9 @yuichielectric GitHub社内での標準の開発環境
github/github: コミット数100万以上、サイズは 13GB以上 Codespaces以前 各エンジニアのmac上に開発環境を 構築。すべてスクリプト化されては いたものの、環境構築には半日 かかっていた。 Codespaces以後 github/githubの環境を10秒で用意 ブランチ切り替えの必要なし VS Codeユーザー以外からもSSH https://github.blog/jp/2021-08-30-githubs-engineering-team-moved-codespaces/
2022/08/31 How GitHub uses Codespaces Tech Stand #9 @yuichielectric コンテナイメージ
ベースイメージ用のリポジトリを作 り、Actionsで、イメージをビルド しPackagesにpush プリビルド github/githubのmainへのマージ のたびにCodespaces環境をビルド 環境 32コア、64GBメモリのマシン サイズのみを使うように設定 https://docs.github.com/ja/codespaces/prebuilding-your-codespaces/about-github-codespaces-prebuilds Codespace環境のビルド
2022/08/31 How GitHub uses Codespaces Tech Stand #9 @yuichielectric Codespaceのビルド(プリビルドも
含む)は複数リポジトリにも対応 関連するリポジトリに対しての 権限を要求した上で、プリビルド 環境を構築後に必要なリポジトリ を取得してセットアップ https://github.blog/changelog/2022-07-28-prebuilding-codespaces-is-now-supported-for-multi-repository-and-monorepo-projects/ 複数リポジトリ
2022/08/31 How GitHub uses Codespaces Tech Stand #9 @yuichielectric VPNのセットアップをfeaturesを使って共通化。
プロジェクトごとに必要に応じて利用。 その他の手段として、ローカルマシンを、Codespaceと プライベートリソースへのゲートウェイとして使うことも可能。 GitHub CLI拡張としてプレビュー公開。 https://github.com/github/gh-net プライベートリソースへのアクセス
2022/08/31 How GitHub uses Codespaces Tech Stand #9 @yuichielectric Codespaces環境に単機能を追加するプロセスを定義するための仕組み
例 • GitHub CLI • Ruby • SSHサーバ 独自のfeatureを定義することも可能。 devcontainers/feature-template features
2022/08/31 How GitHub uses Codespaces Tech Stand #9 @yuichielectric Codespacesの別の側面
2022/08/31 How GitHub uses Codespaces Tech Stand #9 @yuichielectric ドキュメント担当以外のメンバーが
GitHubのドキュメントに間違いを 見つけた場合であっても、 devcontainer.jsonがあれば、 Codespace上でドキュメントを修正 して、プレビューを確認後にPull Requestを送るというプロセスが 容易になる。 チームの垣根を超えた コントリビュート
2022/08/31 How GitHub uses Codespaces Tech Stand #9 @yuichielectric 社内の多くのリポジトリで
Codespacesの設定をしておくこと でチームの壁を超えたコントリ ビュートの敷居を低減 プリビルドを積極的に使うことで迅 速に開発環境を構築 CodespacesはGitHub社内での 標準開発環境 その過程で生み出された機能を Codespacesに組み込み まとめ
2022/08/31 How GitHub uses Codespaces Tech Stand #9 @yuichielectric Thank
you