Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is binary compilation and local running in Istio1.6

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces the binary compilation and local operation of Istio1.6, the content is very detailed, interested friends can refer to, hope to be helpful to you.

Binary plate compilation and operation

The image generated by default compilation is not very convenient to debug and is not good for studying the internal mechanism of Istio. So try local binary compilation and run debugging.

Compilation: you can compile in the same directory as the respective main () function (see below), or you can use the contents of the unified directory generated by makefile (/ ${GOPATH} / src/istio.io/istio/out/linux_amd64/)

Pilotpilot-discoverycd / ${GOPATH} / src/istio.io/istio/pilot/cmd/pilot-discovery/go build-o pilot-discovery./pilot-discovery-h./pilot-discovery discoverypilot-agentcd / ${GOPATH} / src/istio.io/istio/pilot/cmd/pilot-agent/go build-o pilot-agent./pilot-agent-h./pilot-agent request GET stats / / (get statistics from the envoy managed by this pilot-agent)

Follow the error prompt of. / pilot-agent proxy to gradually acquire local execution dependencies

/ / 1. Certificate file mkdir-p / ${GOPATH} / src/istio.io/istio/out/linux_amd64/var/run/secrets/istiocp / ${GOPATH} / src/istio.io/istio/out/linux_amd64/docker_temp/certs/pilot/root-cert.pem / ${GOPATH} / src/istio.io/istio/out/linux_amd64/var/run/secrets/istio/root-cert.pem// 2.envoy configuration template file mkdir-p / ${GOPATH} / Src/istio.io/istio/out/linux_amd64/var/lib/istio/envoycp / ${GOPATH} / src/istio.io/istio/out/linux_amd64/docker_build/docker.proxyv2/gcp_envoy_bootstrap.json / ${GOPATH} / src/istio.io/istio/out/linux_amd64/var/lib/istio/envoy/envoy_bootstrap_tmpl.json// 3.envoycp / ${GOPATH} / src/istio.io/istio/out/linux_amd64/envoy / usr/ Local/bin/// 4.touch / etc/ssl/certs/ca-certificates.crt mkdir / ${GOPATH} / src/istio.io/istio/out/linux_amd64/etc/istio/pod/touch / ${GOPATH} / src/istio.io/istio/out/linux_amd64/etc/istio/pod/labels

At this point, pilot-agent and envoy are running on host, such as partial output

... 2020-07-23T12:50:49.581035Z info Received new config Creating new Envoy epoch 02020-07-23T12:50:49.581070Z info Epoch 0 starting2020-07-23T12:50:49.583358Z info Envoy command: [- c etc/istio/proxy/envoy-rev0.json-- restart-epoch 0-- drain-time-s 45-- parent-shutdown-time-s 60-- service-cluster istio-proxy-- service-node sidecar~172.26.33.33~.~.svc.cluster.local-- max-obj-name-len 189-- local- Address-ip-version v4-- log-format-prefix-with-location 0-- log-format% Y-%m-%dT%T.%fZ% l envoy% n% v-l warning-- component-log-level misc:error] 2020-07-23T20:50:49.623931Z warning envoy config StreamAggregatedResources gRPC config stream closed: 13 2020-07-23T20:50:49.643268Z warning envoy config StreamAggregatedResources gRPC config stream closed: 13,... envoy

Lifecycle managed by pilot-agent

Comparison: in the container, the startup command of envoy

Envoy command: [- c etc/istio/proxy/envoy-rev0.json-- restart-epoch 0-- drain-time-s 45-- parent-shutdown-time-s 60-- service-cluster istio-ingressgateway--service-node router~172.17.0.22~istio-ingressgateway-64f48849b8-pp9lf.istio-system~istio-system.svc.cluster.local-- max-obj-name-len 189-- local-address-ip-version v4-- log-format% Y-%m-%dT%T.%fZ% l Envoy% n% v-l warning-- component-log-level misc:error]

Envoy needs many configuration items to support.

Original configuration file / ${GOPATH} / src/istio.io/istio/install/gcp/bootstrap/gcp_envoy_bootstrap.json

At compile time, the replica is / ${GOPATH} / src/istio.io/istio/out/linux_amd64/docker_build/docker.proxyv2/gcp_envoy_bootstrap.json

When you generate a mirror, Dockerfile.proxyv2 replicas as COPY gcp_envoy_bootstrap.json / var/lib/istio/envoy/gcp_envoy_bootstrap_tmpl.json

When running in the container, pilot-agent will generate the actual configuration file based on the above configuration template and use it at envoy startup / etc/istio/proxy/envoy-rev0.json

Galleycd / ${GOPATH} / src/istio.io/istio/galley/tools/mcpc/go build-o galley./galley-h on Istio1.6 binary compilation and local running is shared here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report