### Qemu Boot Confirmation Source: https://github.com/openubmc/manifest/blob/main/README.md This output indicates that the Qemu environment has successfully started and the Linux kernel is booting. ```text Uncompressing... done, booting... [ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x412fd050] [ 0.000000] Linux version 5.10.0 (oe-user@oe-host) (aarch64-euler-linux-gcc (BiSheng Embedded CPU 302.1.0.B016) 7.3.0, GNU ld (BiSheng Embedded CPU 302.1.0.B016) 2.41) #1 SMP PREEMPT Tue Nov 26 22:03:48 CST 2024 ``` -------------------------------- ### Launch Qemu Simulation Environment Source: https://github.com/openubmc/manifest/blob/main/README.md Execute this Python script to start the Qemu simulation environment for verifying openUBMC artifact packages. Output logs are redirected to qemu_stdout.log and qemu_stderr.log. ```shell python3 build/works/packet/qemu_shells/vemake_1711.py >qemu_stdout.log 2>qemu_stderr.log ``` -------------------------------- ### Start QEMU Simulation Environment Source: https://context7.com/openubmc/manifest/llms.txt Launch the QEMU simulation environment within the openUBMC container to test BMC firmware without physical hardware. Redirect output to log files for debugging. The script `vemake_1711.py` is used for this purpose. Customization is possible via `config.json`, and default port mappings for SSH, Telnet, HTTPS, and IPMI are provided. ```bash # 启动QEMU仿真环境(在容器内执行) python3 build/works/packet/qemu_shells/vemake_1711.py \ >qemu_stdout.log 2>qemu_stderr.log ``` ```bash # 查看启动日志,确认Linux内核启动成功 tail -f qemu_stdout.log # 预期输出: # Uncompressing... done, booting... # [ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x412fd050] # [ 0.000000] Linux version 5.10.0 ... ``` ```bash # 自定义QEMU配置 # 编辑配置文件定义启动参数 cat build/works/packet/qemu_shells/config.json # 参考schema获取配置选项 cat build/works/packet/qemu_shells/schema.json ``` ```bash # QEMU默认端口映射 # SSH: 10022 # Telnet: 10023 # HTTPS: 10443 # IPMI: 10623 ``` -------------------------------- ### Conan Package Manager Configuration Source: https://context7.com/openubmc/manifest/llms.txt Commands to initialize Conan, configure remote repositories for openUBMC SDK and open-source dependencies, log in, and install the SDK using the bingo tool. Verify the configuration using 'conan remote list'. ```bash conan profile detect --force ``` ```bash conan remote remove '*' conan remote add openubmc_sdk \ 'https://conan.openubmc.cn/bmc_sdk_26.03' \ --insecure --force conan remote add openubmc_opensource \ 'https://conan.openubmc.cn/openubmc_opensource' \ --insecure --force ``` ```bash conan remote login openubmc_sdk your_username -p your_password conan remote login openubmc_opensource your_username -p your_password ``` ```bash bingo build -t install_sdk -b openUBMC -ucc ``` ```bash conan remote list conan search '*' -r openubmc_sdk ``` -------------------------------- ### OpenTelemetry Collector Configuration Example Source: https://context7.com/openubmc/manifest/llms.txt This is an example configuration for the OpenTelemetry Collector, which acts as a central point for collecting telemetry data in OTLP format from the BMC and distributing it to various backend storage systems. ```yaml ``` -------------------------------- ### Initialize openUBMC Development Environment Source: https://context7.com/openubmc/manifest/llms.txt Use `init.py` to automate the installation and configuration of development dependencies on Ubuntu 24.04. This includes toolchains, Python/Node.js, Conan, BMC SDK, BMC Studio, and QEMU. It supports direct password input or interactive password prompts for security. Debug logging can be enabled by setting the LOG environment variable. ```bash # 基本用法:初始化openUBMC开发环境 # 需要先从openUBMC社区下载bmcsdk压缩包 cd manifest python3 init.py \ -path ./bmc_sdk.zip \ -user your_username \ -psw your_password ``` ```bash # 推荐方式:交互式输入密码(更安全) python3 init.py -path /path/to/bmc_sdk.zip -user your_username # 脚本会提示输入密码 ``` ```bash # 指定构建类型(默认为openUBMC) python3 init.py \ -path ./bmc_sdk.zip \ -user your_username \ -b oee # 支持 openUBMC 或 oee ``` ```bash # 启用调试日志 LOG=debug python3 init.py -path ./bmc_sdk.zip -user your_username ``` -------------------------------- ### Deploy openUBMC Observability Backend Source: https://context7.com/openubmc/manifest/llms.txt Deploy the integrated observability stack including OpenTelemetry Collector, Prometheus, Grafana, Zipkin, and Elasticsearch. This requires TLS certificates to be prepared. Use the `observability.sh` script to start, stop, or restart the services. Access the web interfaces via provided URLs. Manual Elasticsearch password reset might be needed using `reset_elastic_password.exp`. ```bash # 步骤1:准备TLS证书(必须) # 证书文件必须命名为: # - observability.otelcol.crt (SSL证书) # - observability.otelcol.key.pem (SSL密钥) # 步骤2:进入容器并切换到root用户 docker exec -it openubmc /bin/bash su root # 步骤3:启动可观测性后端 cd /root/workspace/observability bash observability.sh start # 预期输出: # Starting Elasticsearch... # Elasticsearch started with PID xxx # Starting Prometheus... # Prometheus started with PID xxx # Starting Zipkin... # Zipkin started with PID xxx # Starting Grafana... # Grafana started with PID xxx # Starting OpenTelemetry Collector... # otelcol started with PID xxx # Password for the [elastic] user successfully reset. # All observability services have been started. ``` ```bash # 如果Elasticsearch密码重置失败,手动执行: expect /root/workspace/observability/reset_elastic_password.exp ``` ```bash # 停止可观测性后端 bash observability.sh stop ``` ```bash # 重启可观测性后端 bash observability.sh restart ``` ```bash # 访问可视化界面 # Grafana: http://localhost:3000 (默认账号: admin/admin) # Zipkin: http://localhost:9411 # Prometheus: http://localhost:49092 ``` -------------------------------- ### Run OpenBMC Visualization Backend Container Source: https://github.com/openubmc/manifest/blob/main/README.md Execute this command to run the OpenBMC visualization backend container. Ensure correct port bindings for BMC Studio, QEMU, Zipkin, OTelCol, Prometheus, and Grafana, along with necessary volume mounts for workspace and certificates. The BMC Studio service port, QEMU SSH ports, Zipkin external port, OTelCol external port, Prometheus external port, and Grafana external port should be replaced with your desired values. ```bash docker run \ -p :10000 \ -p : \ -p :9411/tcp \ -p :4318/tcp \ -p :49092/tcp \ -p :3000/tcp \ ... -d --mount type=bind,source=/root/workspace,target=/home/workspace \ --mount type=bind,source=<证书存放路径>,target=/root/workspace/observability/collector-contrib/cert \ --restart=always --name openubmc openubmc/xx.yy ``` -------------------------------- ### Configure openUBMC Development Container Source: https://context7.com/openubmc/manifest/llms.txt Create and configure openUBMC development containers using `docker run`. Ensure correct port mappings and directory mounts for BMC Studio, QEMU, and the observability backend. The `--mount` option is used for binding host directories to container targets. Use `docker exec` to enter the container and `docker ps` to check its status. ```bash # 创建基础开发容器 docker run \ -p 10000:10000 \ -p 10022:10022 \ -d \ --mount type=bind,source=/root/workspace,target=/home/workspace \ --restart=always \ --name openubmc \ openubmc/dev:25.12 ``` ```bash # 创建包含可观测性后端的完整开发容器 docker run \ -p 10000:10000 \ -p 10022:10022 \ -p 10023:10023 \ -p 10443:10443 \ -p 10623:10623 \ -p 9411:9411 \ -p 4318:4318 \ -p 49092:49092 \ -p 3000:3000 \ -d \ --mount type=bind,source=/root/workspace,target=/home/workspace \ --mount type=bind,source=/path/to/certs,target=/root/workspace/observability/collector-contrib/cert \ --restart=always \ --name openubmc \ openubmc/dev:25.12 ``` ```bash # 进入容器 docker exec -it openubmc /bin/bash ``` ```bash # 查看容器状态 docker ps | grep openubmc ``` -------------------------------- ### List Docker Images Source: https://github.com/openubmc/manifest/blob/main/README.md Verify that the Docker image has been successfully built by listing all available Docker images on your system. ```bash docker images ``` -------------------------------- ### Initialize Local Development Environment Source: https://github.com/openubmc/manifest/blob/main/README.md Run this Python script on Ubuntu 24.04 to initialize the openUBMC development environment. It requires the path to the downloaded bmcsdk zip file and optionally your openUBMC community username and password. ```python cd manifest python3 init.py -path -user -psw ``` -------------------------------- ### Run openUBMC Docker Container Source: https://github.com/openubmc/manifest/blob/main/README.md Create and run a container instance from the built openUBMC Docker image. Configure port mappings, volume mounts for workspace synchronization, and set the container to restart automatically. The container is named 'openubmc'. ```bash docker run \ -p :10000 \ -p : \ ... -d --mount type=bind,source=/root/workspace,target=/home/workspace \ --restart=always --name openubmc openubmc/xx.yy ``` -------------------------------- ### Build openUBMC Docker Image Source: https://github.com/openubmc/manifest/blob/main/README.md Use this Python script to build the openUBMC development environment Docker image. Provide the path to the bmcsdk zip file, your community username and password, and a target image name. It utilizes BuildKit secrets for secure credential handling. ```python cd manifest python3 build_image.py \ -s \ -u \ -p \ -t openubmc/xx.yy ``` -------------------------------- ### Configure Git Global Settings Source: https://github.com/openubmc/manifest/blob/main/README.md Set your username and email globally for Git configuration. This is necessary for tracking contributions and associating them with your account. ```bash git config --global user.name <你的用户名> git config --global user.email <你的邮箱> ``` -------------------------------- ### Build openUBMC Docker Development Image Securely Source: https://context7.com/openubmc/manifest/llms.txt The `build_image.py` script uses Docker BuildKit's secret mechanism to securely build the openUBMC development image. It handles temporary credential files to prevent sensitive information from being exposed in image layers. Credentials can be passed via arguments or environment variables, and custom Dockerfiles/contexts are supported. Verify image integrity using `docker images` and `docker history`. ```bash # 基本用法:构建openUBMC Docker开发镜像 cd manifest python3 build_image.py \ -s /path/to/bmc_sdk.zip \ -u your_conan_username \ -p your_conan_password \ -t openubmc/dev:25.12 ``` ```bash # 使用环境变量传入凭据(CI/CD场景推荐) export OPENUBMC_USER="your_username" export OPENUBMC_PASS="your_password" python3 build_image.py \ -s ./bmc_sdk.zip \ -t openubmc/dev:latest ``` ```bash # 自定义Dockerfile和构建上下文 python3 build_image.py \ -s ./bmc_sdk.zip \ -u your_username \ -p your_password \ -t myregistry/openubmc:v1.0 \ --dockerfile ./custom.dockerfile \ --context /path/to/context ``` ```bash # 验证构建的镜像 docker images | grep openubmc docker history openubmc/dev:25.12 # 确认无敏感信息泄露 ``` -------------------------------- ### Git User and SSH Configuration Source: https://context7.com/openubmc/manifest/llms.txt Commands to configure global Git user information, generate an SSH key pair, and test SSH connectivity to GitCode. Ensure the public key is added to your GitCode account settings. ```bash git config --global user.name "your_username" git config --global user.email "your_email@example.com" ``` ```bash ssh-keygen -t rsa -b 2048 -C "your_email@example.com" ``` ```bash cat ~/.ssh/id_rsa.pub ``` ```bash ssh -T git@gitcode.com ``` -------------------------------- ### List Running Docker Containers Source: https://github.com/openubmc/manifest/blob/main/README.md Check the status of running containers to ensure the openUBMC container is active. ```bash docker ps ``` -------------------------------- ### Display RSA Public Key Source: https://github.com/openubmc/manifest/blob/main/README.md View the content of your generated RSA public key. This key needs to be added to your GitCode account settings for SSH access. ```bash cat ~/.ssh/id_rsa.pub ``` -------------------------------- ### Access openUBMC Docker Container Source: https://github.com/openubmc/manifest/blob/main/README.md Enter the running 'openubmc' container to access its shell environment for development and building tasks. ```bash docker exec -it openubmc /bin/bash ``` -------------------------------- ### Clone openUBMC Git Repositories Source: https://context7.com/openubmc/manifest/llms.txt Commands to clone the openUBMC manifest and bmc_app repositories from GitCode using SSH. Ensure your SSH keys are correctly configured and added to your GitCode profile. ```bash git clone git@gitcode.com:openUBMC/manifest.git git clone git@gitcode.com:openUBMC/bmc_app.git ``` -------------------------------- ### Generate RSA SSH Key Source: https://github.com/openubmc/manifest/blob/main/README.md Create an RSA SSH key pair with a 2048-bit key length. The public key will be used to authenticate with GitCode repositories. ```bash ssh-keygen -t rsa -b 2048 -C <你的邮箱> ``` -------------------------------- ### OpenTelemetry Collector Configuration Source: https://context7.com/openubmc/manifest/llms.txt Configuration for the OpenTelemetry Collector, specifying receivers, processors, and exporters for metrics, logs, and traces. Ensure TLS certificates are correctly configured for secure communication. ```yaml receivers: otlp: protocols: http: endpoint: "0.0.0.0:4318" max_request_body_size: 67108864 # 64MB tls: cert_file: /root/workspace/observability/collector-contrib/cert/observability.otelcol.crt key_file: /root/workspace/observability/collector-contrib/cert/observability.otelcol.key.pem processors: batch: send_batch_size: 1024 send_batch_max_size: 2048 timeout: 1s memory_limiter: limit_mib: 512 spike_limit_mib: 128 check_interval: 5s exporters: prometheus: endpoint: "127.0.0.1:49091" namespace: "otelcol" elasticsearch: endpoint: "https://127.0.0.1:9200" user: "elastic" password: "elastic_password" tls: ca_file: /home/elasticsearch/elasticsearch-9.2.0/config/certs/http_ca.crt zipkin: endpoint: "http://127.0.0.1:9411/api/v2/spans" service: pipelines: metrics: receivers: [otlp] exporters: [debug, prometheus] logs: receivers: [otlp] exporters: [debug, elasticsearch] traces: receivers: [otlp] exporters: [debug, zipkin] ``` -------------------------------- ### Reset Elasticsearch Password Source: https://github.com/openubmc/manifest/blob/main/README.md Execute this command within the container if the Elasticsearch password reset fails during the observability script execution. This ensures the correct password is set for Elasticsearch access. ```bash expect /root/workspace/observability/reset_elastic_password.exp ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.