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
Yuichi Tanaka
August 31, 2022
Programming
1.4k
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
360
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.6k
GitHubにおける GitHub Actions利用法/How GitHub uses GitHub Actions
yuichielectric
7
820
InnerSourceのすすめ / InnerSource
yuichielectric
8
2.1k
GitHub Pro Tips
yuichielectric
0
260
Other Decks in Programming
See All in Programming
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
310
AIキャラアプリkaiwaの低遅延音声通話基盤をどう作ったか - AWS Gravitonで支える低遅延・低コストAI Agent基盤
mogamit
0
170
act2-costs.pdf
sumedhbala
0
120
ソフトウェア設計に溶けるインフラ ― AWS CDK のインフラ認識論
konokenj
2
580
これからAgentCoreを触る方へトレンドはGatewayです
har1101
6
500
分散システム、なんですぐ死んでしまうん?耐障害性を高めたいあなたのためのレジリエンスパターン入門
mshibuya
7
6.5k
Embedded SREと共に達成した会員管理システムのAWS移行 - SRE NEXT 2026 ランチスポンサーセッション
niftycorp
PRO
1
2.7k
トークンをケチるな、設計しろ:GitHub Copilotを賢く使うコンテキスト戦略
ochtum
0
320
PHPだって関数型したい 〜できること、できないこと〜 / fp-in-php
jsoizo
0
230
【やさしく解説 設計編 #1】「ドメイン駆動」と「実装駆動」ってなに? 〜設計の考え方を、たとえ話で学ぼう〜
panda728
PRO
1
120
えっ!!コードを読まずに開発を!?
hananouchi
0
220
yield再入門 #phpcon
o0h
PRO
0
630
Featured
See All Featured
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.5k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
230
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Statistics for Hackers
jakevdp
799
230k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
390
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
360
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
380
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.6k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
2.1k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
460
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
1.1k
The agentic SEO stack - context over prompts
schlessera
0
850
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