GithubHelp home page GithubHelp logo

Comments (5)

bobtthp avatar bobtthp commented on May 25, 2024

let me have a try

from dubbo-go-pixiu.

bobtthp avatar bobtthp commented on May 25, 2024

1、默认镜像仓库修改 -done
2、默认镜像修改 -done
3、编译脚本 -done
4、部署文档
5、开发调试文档

from dubbo-go-pixiu.

thehackercat avatar thehackercat commented on May 25, 2024

I am also following this issue, anything I can do to help?

from dubbo-go-pixiu.

bobtthp avatar bobtthp commented on May 25, 2024

dubbo-pilot Control Plane 部署

1 总体目标

  • 控制面编译和镜像构建
  • 使用 istioctl 在 kubernetes 环境部署
  • 如何对控制面程序 debug

2 基本流程

这个例子将演示如何在编译 dubbo-pilot 控制平面并在 kubernetes 环境下如何使用 istioctl 进行部署
  1. 本地启动控制平面,对 dubbo-pilot 进行启动和 debug
  2. 使用 istioctl 在 k8s 环境启动和 debug

3 详细步骤

3.1 环境要求

  • Golang
  • Docker
  • Minikube/Kind
  • Kubectl

3.2 本地部署

3.2.1 编译

编译 docker-builder

cd dubbo-go-pixiu/tools/docker-builder && go install

docker-builder -h:

Builds Istio docker images

Usage:
   [flags]

Flags:
      --architecures strings   architectures to build (default [linux/amd64])
      --base-version string    base version to use (default "latest")
      --builder string         type of builder to use. options are crane or docker (default "docker")
  -h, --help                   help for this command
      --hub strings            docker hub(s) (default [localhost:5000])
      --istio-version string   istio version to use (default "1.14-dev")
      --kind-load              kind cluster to load into
      --no-cache               disable caching
      --no-clobber             do not allow pushing images that already exist
      --proxy-version string   proxy version to use (default "7ae8e27f274b33dc2f4d83100aea5971ed6698d3")
      --push                   push targets to registry
      --save                   save targets to tar.gz
      --tag strings            docker tag(s) (default [latest])
      --targets strings        targets to build (default [app,app_sidecar_centos_7,app_sidecar_debian_11,app_sidecar_ubuntu_jammy,app_sidecar_ubuntu_xenial,ext-authz,install-cni,istioctl,operator,pilot,proxyv2])
      --variants strings       variants to build (default [default])
      --version                show build version

使用 docker-builder 编译 && 构建镜像

编译 istioctl

docker-builder --targets istioctl

编译完成:

ls ls out/linux_amd64/
istioctl  logs  pilot-agent  pilot-discovery

编译 dubbo-pilot 并推送到私有镜像仓库

tools/docker-builder/docker-builder --targets pilot --hub docker.io/{repo_name} --push

16647226514805

3.2.2 部署

本地启动方式:
./out/linux_amd64/pilot-discovery

启动日志:
2022-09-24T15:31:56.751245Z	info	FLAG: --caCertFile=""
2022-09-24T15:31:56.751277Z	info	FLAG: --clusterAliases="[]"
2022-09-24T15:31:56.751280Z	info	FLAG: --clusterID="Kubernetes"
2022-09-24T15:31:56.751282Z	info	FLAG: --clusterRegistriesNamespace="istio-system"
2022-09-24T15:31:56.751284Z	info	FLAG: --configDir=""
2022-09-24T15:31:56.751286Z	info	FLAG: --ctrlz_address="localhost"
2022-09-24T15:31:56.751289Z	info	FLAG: --ctrlz_port="9876"
2022-09-24T15:31:56.751291Z	info	FLAG: --domain="cluster.local"
...
2022-09-24T15:31:56.753814Z	info	initializing mesh configuration ./etc/istio/config/mesh

3.3 容器部署

3.3.1 镜像构建

构建远程 debug 镜像

下载 dlv

git clone https://github.com/go-delve/delve.git
make install

which dlv
/root/go/bin/dlv

Dockerfile 增加dlv dubbo-go-pixiu/pilot/docker/Dockerfile.pilot:

COPY ${TARGETARCH:-amd64}/dlv /usr/local/bin/dlv

拷贝 dlv 至镜像挂载目录中:

cp /root/go/bin/dlv out/linux_amd64/dockerx_build/build.docker.pilot/amd64/dlv

镜像构建:

docker-builder --targets pilot --hub docker.io/bobtthp --push --tag debug

16647249484357

3.3.1 部署

使用刚构建的镜像部署:

out/linux_amd64/istioctl --set .values.pilot.image=bobtthp/pilot:latest install

远程 debug:

dlv --listen=:8015 --headless=true --api-version=2 --log attach `ps -ef |grep pilot-discovery| awk '{print $2}'`

4.0 错误 tips

如果遇到这个错误:

 => ERROR [internal] booting buildkit                                                                                                      15.0s
 => => pulling image gcr.io/istio-testing/buildkit:v0.10.3                                                                                 15.0s
------
 > [internal] booting buildkit:
------
ERROR: Error response from daemon: Get "https://gcr.io/v2/": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

修改: ~/.docker/buildx/instances/container-builder
pulling image gcr.io/istio-testing/buildkit:v0.10.3 ==> "image":"moby/buildkit:buildx-stable-1"

from dubbo-go-pixiu.

bobtthp avatar bobtthp commented on May 25, 2024

PR: #504

from dubbo-go-pixiu.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.