Upgrade to Pro — share decks privately, control downloads, hide ads and more …

GitHub Codespacesで改善する チームの開発環境

GitHub Codespacesで改善する チームの開発環境

Yuta Matsumura

December 06, 2022

Transcript

26 slides
  1. 松村 優大 (Yuta Matsumura) Chief Technical Architect (C#, PHP, Azure)

    Microsoft MVP (Developer Technologies) #fukuten #devblogradio の中の人 @tsubakimoto_s Currently working for Copyright © Alterbooth Inc. All Rights Reserved.
  2. こんな経験ありませんか? 開発環境 • Windows • Node.js 14 • VS Code

    • 手動インストール • … 開発環境 • macOS • Node.js 18 • IDE • homebrew • … 開発環境の作り方が バラバラ Copyright © Alterbooth Inc. All Rights Reserved.
  3. 開発環境の揃え方 • 同じ PC の支給 • 環境構築のマニュアル化 • セットアップスクリプトの配布 •

    共通の仮想イメージの配布 • 共通のコンテナーイメージの配布 Copyright © Alterbooth Inc. All Rights Reserved.
  4. Visual Studio Code + Extensions • 開発環境を「リモート」にもつ仕組み WSL or Containers

    ▼ • 開発環境としてコンテナーを準備する (devcontainer) • https://code.visualstudio.com/docs/remote/containers • Visual Studio Code + 拡張機能パック • Docker (Windows / macOS / Engine) Copyright © Alterbooth Inc. All Rights Reserved.
  5. devcontainer の始め方① 1. アプリケーションを VS Code で開く 2. Dockerfile を準備する

    3. コマンドパレットを開く Dev Containers: Open Folder in Container… 4. Dockerfile のあるフォルダを指定する 5. devcontainer.json のできあがり Copyright © Alterbooth Inc. All Rights Reserved.
  6. devcontainer の始め方② 1. アプリケーションを VS Code で開く 2. コマンドパレットを開く 3.

    devcontainer 構成の設定 Dev Containers: Add Development Container Configuration Files... 4. プリセットから選択 Show All Definitions... > Definitions 5. コンテナーで開き直す Reopen in Container Copyright © Alterbooth Inc. All Rights Reserved.
  7. .devcontainer/ .devcontainer ├ base.Dockerfile │ ベースイメージ構成 (参考用) ├ devcontainer.json │

    コンテナー構成 └ Dockerfile Copyright © Alterbooth Inc. All Rights Reserved.
  8. GitHub Codespaces Copyright © Alterbooth Inc. All Rights Reserved. GitHub

    上にホストされる仮想マシンを使用して、 オンライン上に開発環境を構築することができる。 devcontainer.json をリポジトリに保管している場合、 devcontainer.json の構成がセットアップされる。
  9. その他のクラウド上の開発環境 • Azure Virtual Desktop • 開発環境の構築は別途必要 • Windows OSのみ

    • Azure Virtual Machine • 開発環境の構築は別途必要 • Windows OS, Linux OS • Microsoft Dev Box (Preview) • Azureサービスだが、Azure AD P1のユーザーライセンスが必要 • https://learn.microsoft.com/ja-jp/azure/dev-box/quickstart-configure-dev- box-service#prerequisites Copyright © Alterbooth Inc. All Rights Reserved.
  10. GitHub Codespaces のマシン種別と価格 Copyright © Alterbooth Inc. All Rights Reserved.

    https://docs.github.com/ja/billing/managing-billing-for-github-codespaces/about-billing-for-github-codespaces
  11. GitHub Enterprise Cloud / Server 個人所有のGitHub アカウントは、組織の管理下から外れちゃう? ▶自社 ID 基盤と

    SAML 連携を行うことで、組織アカウントとの シングルサインオンを構成可能。 Copyright © Alterbooth Inc. All Rights Reserved. 組織アカウント ログイン Enterprise Repository, Issue, Pull requests Actions, Projects, Wiki Codespaces, Advanced Security
  12. GitHub Codespaces のセキュリティ • 分離された仮想マシンや仮想ネットワーク • Codespace にアクセスできるのは作成者のみ • 外部からのアクセス不可

    • ポートフォワーディング機能 • シークレット管理 Copyright © Alterbooth Inc. All Rights Reserved. https://docs.github.com/en/codespaces/codespaces-reference/security-in-github-codespaces
  13. Codespace のパーソナライズ VSCode 設定の同期 dotfiles リポジトリの反映 Copyright © Alterbooth Inc.

    All Rights Reserved. https://docs.github.com/en/codespaces/customizing-your-codespace/personalizing-github-codespaces-for-your-account
  14. Appendix • GitHub Universe 2022 • https://github.blog/jp/2022-11-10-everything-new-from-github-universe-2022/ • Azure AD

    + GitHub Enterprise • https://learn.microsoft.com/ja-jp/azure/active-directory/saas-apps/github-ae-tutorial • https://learn.microsoft.com/ja-jp/azure/active-directory/saas-apps/github-enterprise-cloud- enterprise-account-tutorial • GitHub Codespaces • https://docs.github.com/ja/billing/managing-billing-for-github-codespaces/about-billing- for-github-codespaces • https://docs.github.com/en/codespaces/codespaces-reference/security-in-github- codespaces • https://docs.github.com/en/codespaces/customizing-your-codespace/personalizing-github- codespaces-for-your-account • https://aadojo.alterbooth.com/entry/2022/08/24/095308 Copyright © Alterbooth Inc. All Rights Reserved.

More Decks by Yuta Matsumura

Other Decks in Technology