0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

PipeCD/Piped 構築メモ

Last updated at Posted at 2025-07-26

前章

PipeCDを遊びで構築した際のメモを記載する

構築メモ

環境

  • OS: macOS Sequoia
  • CPU: Apple M2

1. Docker Desktop for Mac Install

まずはMacでkindを利用するためにDocker Desktop for Macをインストールする

Docker DesktopのURLにアクセスする
自分の環境ではMacのチップを利用しているのでSiliconバージョンでインストールする
スクリーンショット 2025-07-26 17.06.45.png

ApplicationsフォルダにD&DでDockerをコピーする
スクリーンショット 2025-07-26 17.08.33.png

ApplicationsフォルダのDockerをダブルクリックして起動する
スクリーンショット 2025-07-26 17.41.39.png

初めて起動する際はサービスアグリーメントに同意を求められるのでAcceptする
スクリーンショット 2025-07-26 17.44.36.png

推奨設定を選択してFinishする
スクリーンショット 2025-07-26 17.45.53.png

サインインオプションを求められるので適宜選択する
スクリーンショット 2025-07-26 17.47.36.png

サインイン後、左下のEngine runningになっているのを確認する
スクリーンショット 2025-07-26 17.50.22.png

2. Homebrew Install

Macのパッケージマネージャーであるhomebrewをインストールする
公式サイトにアクセスしてコマンドをコピーする
スクリーンショット 2025-07-26 17.13.39.png

コマンド実行後以下のコマンドを求められるので実行する

==> Next steps:
- Run these commands in your terminal to add Homebrew to your PATH:
    echo >> /Users/XXXX/.zprofile
    echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/XXXX/.zprofile
    eval "$(/opt/homebrew/bin/brew shellenv)"
- Run brew help to get started
- Further documentation:
    https://docs.brew.sh
# インストール確認
📁 ~ ❯ brew help
Example usage:
  brew search TEXT|/REGEX/
  brew info [FORMULA|CASK...]
  brew install FORMULA|CASK...
  brew update
  brew upgrade [FORMULA|CASK...]
  brew uninstall FORMULA|CASK...
  brew list [FORMULA|CASK...]

Troubleshooting:
  brew config
  brew doctor
  brew install --verbose --debug FORMULA|CASK

Contributing:
  brew create URL [--no-fetch]
  brew edit [FORMULA|CASK...]

Further help:
  brew commands
  brew help [COMMAND]
  man brew
  https://docs.brew.sh

3. kubectl Install

前段でHomebrewをインストールしたのでbrewを使ってインストールする
公式インストールガイド

📁 ~ ❯ brew install kubectl
==> Downloading https://formulae.brew.sh/api/formula.jws.json
==> Downloading https://formulae.brew.sh/api/cask.jws.json
==> Fetching downloads for: kubernetes-cli
==> Downloading https://ghcr.io/v2/homebrew/core/kubernetes-cli/manifests/1.33.3
############################################################################################################### 100.0%
==> Fetching kubernetes-cli
==> Downloading https://ghcr.io/v2/homebrew/core/kubernetes-cli/blobs/sha256:f288a307a11c7ffae443ff101f8c1e09ea0433b8e
############################################################################################################### 100.0%
==> Pouring kubernetes-cli--1.33.3.arm64_sequoia.bottle.tar.gz
🍺  /opt/homebrew/Cellar/kubernetes-cli/1.33.3: 255 files, 62.2MB
==> Running `brew cleanup kubernetes-cli`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
==> Caveats
zsh completions have been installed to:
  /opt/homebrew/share/zsh/site-functions
📁 ~ ❯ kubectl version --client
Client Version: v1.33.3
Kustomize Version: v5.6.0

4. Kind Install

こちらも前段でHomebrewをインストールしたのでbrewを使ってインストールする

公式インストールガイド

📁 ~ ❯ brew install kind
==> Fetching downloads for: kind
==> Downloading https://ghcr.io/v2/homebrew/core/kind/manifests/0.29.0
############################################################################################################### 100.0%
==> Fetching kind
==> Downloading https://ghcr.io/v2/homebrew/core/kind/blobs/sha256:9dd60f52284f2aa41b0583a8fecb1374e5783522e85e5798198
############################################################################################################### 100.0%
==> Pouring kind--0.29.0.arm64_sequoia.bottle.tar.gz
🍺  /opt/homebrew/Cellar/kind/0.29.0: 9 files, 9.4MB
==> Running `brew cleanup kind`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
==> Caveats
zsh completions have been installed to:
  /opt/homebrew/share/zsh/site-functions
📁 ~ ❯ kind version
kind v0.29.0 go1.24.3 darwin/arm64

5. Helm Install

k8sのパッケージマネージャーのhelmをインストールする
公式インストールガイド

📁 ~ ❯ brew install helm
==> Downloading https://formulae.brew.sh/api/formula.jws.json
==> Downloading https://formulae.brew.sh/api/cask.jws.json
==> Fetching downloads for: helm
==> Downloading https://ghcr.io/v2/homebrew/core/helm/manifests/3.18.4
############################################################################################################### 100.0%
==> Fetching helm
==> Downloading https://ghcr.io/v2/homebrew/core/helm/blobs/sha256:20c68f43e2df4ab531ed61975cde488340471d6446ef928c303
############################################################################################################### 100.0%
==> Pouring helm--3.18.4.arm64_sequoia.bottle.tar.gz
🍺  /opt/homebrew/Cellar/helm/3.18.4: 66 files, 56.5MB
==> Running `brew cleanup helm`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
==> Caveats
zsh completions have been installed to:
  /opt/homebrew/share/zsh/site-functions
📁 ~ ❯ helm version
version.BuildInfo{Version:"v3.18.4", GitCommit:"d80839cf37d860c8aa9a0503fe463278f26cd5e2", GitTreeState:"clean", GoVersion:"go1.24.5"}

6. Kubernetesククラスター構築

kindでPipeCDをインストールするためのk8sクラスターを構築する

📁 ~ ❯ kind create cluster --name pipecd-cluster
Creating cluster "pipecd-cluster" ...
 ✓ Ensuring node image (kindest/node:v1.33.1) 🖼 
 ✓ Preparing nodes 📦  
 ✓ Writing configuration 📜 
 ✓ Starting control-plane 🕹️ 
 ✓ Installing CNI 🔌 
 ✓ Installing StorageClass 💾 
Set kubectl context to "kind-pipecd-cluster"
You can now use your cluster with:

kubectl cluster-info --context kind-pipecd-cluster

Not sure what to do next? 😅  Check out https://kind.sigs.k8s.io/docs/user/quick-start/
📁 ~ ❯ kubectl cluster-info --context kind-pipecd-cluster
Kubernetes control plane is running at https://127.0.0.1:49843
CoreDNS is running at https://127.0.0.1:49843/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy

To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
📁 ~ ❯ kubectl get nodes
NAME                           STATUS   ROLES           AGE    VERSION
pipecd-cluster-control-plane   Ready    control-plane   2m8s   v1.33.1

7. PipeCD Install

Quickstartに従ってインストールする


📁 ~ ❯ kubectl create namespace pipecd
namespace/pipecd created
📁 ~ ❯ kubectl apply -n pipecd -f https://raw.githubusercontent.com/pipe-cd/pipecd/master/quickstart/manifests/control-plane.yaml
secret/pipecd created
configmap/pipecd created
configmap/pipecd-gateway-envoy-config created
service/pipecd created
service/pipecd-gateway created
service/pipecd-server created
service/pipecd-cache created
service/pipecd-ops created
service/pipecd-mysql created
service/pipecd-minio created
deployment.apps/pipecd-gateway created
deployment.apps/pipecd-server created
deployment.apps/pipecd-cache created
deployment.apps/pipecd-ops created
deployment.apps/pipecd-mysql created
deployment.apps/pipecd-minio created
📁 ~ ❯ kubectl get pods -n pipecd                                   
NAME                              READY   STATUS    RESTARTS   AGE
pipecd-cache-5fb6b9bff7-tw6rj     1/1     Running   0          2m36s
pipecd-gateway-65b69d85c4-7zvhx   1/1     Running   0          2m36s
pipecd-minio-569b46ff6d-6n2p4     1/1     Running   0          2m36s
pipecd-mysql-7755c9f5f9-vd6lz     1/1     Running   0          2m36s
pipecd-ops-69cfb8cb65-xldvq       1/1     Running   0          2m36s
pipecd-server-64954bc84d-vzc4q    1/1     Running   0          2m36s
📁 ~ ❯ kubectl port-forward -n pipecd svc/pipecd 8080               
Forwarding from 127.0.0.1:8080 -> 9090
Forwarding from [::1]:8080 -> 9090

pipecdのpodが起動したらポートフォワードしたローカルホストにアクセスする

以下URL
⚠️上記の例だとローカル8080番ポートにポートフォワードしているので以下のURLとなる
http://localhost:8080/login?project=quickstart

スクリーンショット 2025-07-26 20.44.21.png

公式マニュアルに記載のあるユーザ名/パスワードでログインする

  • ユーザ名:hello-pipecd
  • パスワード:hello-pipecd

サインアウトして再ログインする際はプロジェクト名も求められる
スクリーンショット 2025-07-28 18.40.25.png

8. Piped Install

公式のマニュアルにある通り以下のURLにアクセスします
http://localhost:8080/settings/piped?project=quickstart

左上にある「+ ADD」をクリックしてパイプエージェントを登録する情報を入力し「SAVE」をクリックする
スクリーンショット 2025-07-26 20.51.45.png

Pipedを登録するのに必要な情報が出力される
スクリーンショット 2025-07-26 20.56.35.png

公式のコマンドに則りPipedをデプロイする

curl -s https://raw.githubusercontent.com/pipe-cd/pipecd/master/quickstart/manifests/piped.yaml | \
  sed -e 's/<YOUR_PIPED_ID>/<COPIED_PIPED_ID>/g' \
      -e 's/<YOUR_PIPED_KEY_DATA>/<COPIED_ENCODED_PIPED_KEY>/g' | \
  kubectl apply -n pipecd -f -

今回の場合の例

curl -s https://raw.githubusercontent.com/pipe-cd/pipecd/master/quickstart/manifests/piped.yaml | \
  sed -e 's/YOUR_PIPED_ID/f6eceb2a-852d-44c0-a52a-f7beca1c499d/g' \
      -e 's/YOUR_PIPED_KEY_DATA/M3hhdTRodTdlZWNrNXB4a3Z0M292ZXQwMnhqbDdycHJ3NmdtdHRscGgyaDIyd3A1Y2w=/g' | \
  kubectl apply -n pipecd -f -

全てのpodが起動していることを確認

📁 ~ ❯ kubectl get pods -n pipecd                        
NAME                              READY   STATUS    RESTARTS   AGE
pipecd-cache-5fb6b9bff7-tw6rj     1/1     Running   0          30m
pipecd-gateway-65b69d85c4-7zvhx   1/1     Running   0          30m
pipecd-minio-569b46ff6d-6n2p4     1/1     Running   0          30m
pipecd-mysql-7755c9f5f9-vd6lz     1/1     Running   0          30m
pipecd-ops-69cfb8cb65-xldvq       1/1     Running   0          30m
pipecd-server-64954bc84d-vzc4q    1/1     Running   0          30m
piped-5c68dc7f7c-d6p65            1/1     Running   0          2s

デプロイが完了すると管理画面でも以下のステータスになる
devの右が🟢のマークになる
スクリーンショット 2025-07-26 21.12.36.png

PipeCDを使用してKubernetesアプリケーションをデプロイする

折角なのでチュートリアルにあるサンプルアプリのデプロイをしてみる
スクリーンショット 2025-07-26 21.17.25.png

アプリケーションを追加するか聞かれるので保存する
スクリーンショット 2025-07-26 21.17.50.png

アプリケーションの追加に成功したと出るのでクローズする
スクリーンショット 2025-07-26 21.18.54.png

正常にデプロイされると以下の様になる
スクリーンショット 2025-07-26 21.32.34.png

CUIからもpodがデプロイされていることを確認できる

📁 ~ ❯ kubectl get pods
NAME                     READY   STATUS    RESTARTS   AGE
canary-5d58cff6c-fdzmt   1/1     Running   0          23m
canary-5d58cff6c-lk9zv   1/1     Running   0          23m

pord forwardしてアクセスも確認してみた

📁 ~ ❯ kubectl port-forward pod/canary-5d58cff6c-lk9zv 9085:9085
Forwarding from 127.0.0.1:9085 -> 9085
Forwarding from [::1]:9085 -> 9085

スクリーンショット 2025-07-26 21.47.09.png

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?