Git Product home page Git Product logo

crocodile's Introduction

Tinkerbell

Build Status codecov CII Best Practices

License

Tinkerbell is licensed under the Apache License, Version 2.0. See LICENSE for the full license text. Some of the projects used by the Tinkerbell project may be governed by a different license, please refer to its specific license.

Tinkerbell is part of the CNCF Projects.

CNCF Landscape

Community

The Tinkerbell community meets bi-weekly on Tuesday. The meeting details can be found here.

Community Resources:

What's Powering Tinkerbell?

The Tinkerbell stack consists of several microservices, and a gRPC API:

Tink

Tink is the short-hand name for the tink-server and tink-worker. tink-worker and tink-server communicate over gRPC, and are responsible for processing workflows. The CLI is the user-interactive piece for creating workflows and their building blocks, templates and hardware data.

Smee

Smee is Tinkerbell's DHCP server. It handles DHCP requests, hands out IPs, and serves up iPXE. It uses the Tinkerbell client to pull and push hardware data. It only responds to a predefined set of MAC addresses so it can be deployed in an existing network without interfering with existing DHCP infrastructure.

Hegel

Hegel is the metadata service used by Tinkerbell and OSIE. It collects data from both and transforms it into a JSON format to be consumed as metadata.

OSIE

OSIE is Tinkerbell's default an in-memory installation environment for bare metal. It installs operating systems and handles deprovisioning.

Hook

Hook is the newly introduced alternative to OSIE. It's the next iteration of the in-memory installation environment to handle operating system installation and deprovisioning.

PBnJ

PBnJ is an optional microservice that can communicate with baseboard management controllers (BMCs) to control power and boot settings.

Building

Use make help. The most interesting targets are make all (or just make) and make images. make all builds all the binaries for your host OS and CPU to enable running directly. make images will build all the binaries for Linux/x86_64 and build docker images with them.

Configuring OpenTelemetry

Rather than adding a bunch of command line options or a config file, OpenTelemetry is configured via environment variables. The most relevant ones are below, for others see https://github.com/equinix-labs/otel-init-go

Currently this is just for tracing, metrics needs to be discussed with the community.

Env Variable Required Default
OTEL_EXPORTER_OTLP_ENDPOINT n localhost
OTEL_EXPORTER_OTLP_INSECURE n false
OTEL_LOG_LEVEL n info

To work with a local opentelemetry-collector, try the following. For examples of how to set up the collector to relay to various services take a look at otel-cli

export OTEL_EXPORTER_OTLP_ENDPOINT=localhost:4317
export OTEL_EXPORTER_OTLP_INSECURE=true
./cmd/tink-server/tink-server <stuff>

Website

For complete documentation, please visit the Tinkerbell project hosted at tinkerbell.org.

crocodile's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

crocodile's Issues

Additional OS: Fedora

Expected Behaviour

Add support for Fedora Linux.

Current Behaviour

Possible Solution

Fedora 33 and 34 have ISO (for x86) and raw (for arm64) images
available here: https://getfedora.org/en/workstation/download/

Steps to Reproduce (for bugs)

Context

Fedora is known for its quick product lifecycles (every 6 months,
no LTS) and for its latest-and-greatest kernel support. Having
an easy way to provision Fedora would help the testing process
for the newest in Linux tools.

Your Environment

  • Operating System and version (e.g. Linux, Windows, MacOS):

  • How are you running Tinkerbell? Using Vagrant & VirtualBox, Vagrant & Libvirt, on Packet using Terraform, or give details:

  • Link to your project or a code example to reproduce issue:

[Feature Request] Create Windows 10/11 image with UEFI support

My worker PC is a most recent model and only has UEFI. It would be great if there is an option to select whether to use UEFI or BIOS in building Windows images.

Expected Behaviour

Windows image built by crocodile can be used on PC with UEFI.

Current Behaviour

No bootable device can be found using the Windows example

Possible Solution

  1. In building croc image, bundle a UEFI firmware
  2. Add UEFI builder for Windows with the firmware
  3. Update autounattend files to create correct partitions and update the install partition as well

Steps to Reproduce (for bugs)

  1. Follow Windows example

Context

Your Environment

  • Operating System and version (e.g. Linux, Windows, MacOS):

  • How are you running Tinkerbell? Using Vagrant & VirtualBox, Vagrant & Libvirt, on Packet using Terraform, or give details:

  • Link to your project or a code example to reproduce issue:

ESXi build failure: "==> qemu: Error getting the bridge virbr0 interface: route ip+net: no such network interface"

Expected Behaviour

Run crocodile per the readme, attempt to build ESXi image, and an image is built.

Current Behaviour

packer errors out with

==> qemu: Error getting the bridge virbr0 interface: route ip+net: no such network interface

Solution

This is due to a lack of a virbr0 bridge interface that libvirt-daemon creates. Installing libvirt on the host resolved that issue for me.
However, then it failed with (after adding -e PACKER_LOG=1 to the docker command line):

2021/04/21 14:10:17 packer-builder-qemu plugin: Qemu stderr: failed to open /dev/net/tun: No such file or directory
2021/04/21 14:10:17 packer-builder-qemu plugin: Qemu stderr: qemu-system-x86_64: bridge helper failed

The only solution I came up with for that issue was to add --privileged to the docker command.

Per the comments below, what is needed is to add --device=/dev/net/tun --cap-add=NET_ADMIN

So, with libvirt installed, ifconfig virbr0 returns expected output, and running:

docker run -it --rm -v $PWD/packer_cache:/packer/packer_cache -v $PWD/images:/var/tmp/images --net=host --device=/dev/kvm --device=/dev/net/tun --cap-add=NET_ADMIN croc:latest

finally worked for me for building ESXi images.

Docker build faild: E: Version '7.74.0-1ubuntu2.1' for 'curl' was not found

user@box$ docker build -t croc .
Sending build context to Docker daemon 364kB
Step 1/10 : FROM ubuntu:hirsute-20210723
hirsute-20210723: Pulling from library/ubuntu
4451f5c7eb7a: Pull complete
Digest: sha256:0d6c1371da7b3f53eab63fa060b375339d883eb6e67ab413ebf77f9eadd6700e
Status: Downloaded newer image for ubuntu:hirsute-20210723
---> bf70ebd2c444
Step 2/10 : RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends ansible=2.10.7-1 git=1:2.30.2-1ubuntu1 qemu-kvm unzip=6.0-26ubuntu1 xorriso=1.5.2-1 curl=7.74.0-1ubuntu2.1 jq=1.6-2.1ubuntu1 && apt-get clean && rm -rf /var/lib/apt/lists/*
---> Running in 3aa9f91217bb
Get:1 http://archive.ubuntu.com/ubuntu hirsute InRelease [269 kB]
Get:2 http://security.ubuntu.com/ubuntu hirsute-security InRelease [110 kB]
Get:3 http://archive.ubuntu.com/ubuntu hirsute-updates InRelease [115 kB]
Get:4 http://archive.ubuntu.com/ubuntu hirsute-backports InRelease [101 kB]
Get:5 http://archive.ubuntu.com/ubuntu hirsute/main amd64 Packages [1791 kB]
Get:6 http://security.ubuntu.com/ubuntu hirsute-security/main amd64 Packages [319 kB]
Get:7 http://archive.ubuntu.com/ubuntu hirsute/universe amd64 Packages [16.8 MB]
Get:8 http://security.ubuntu.com/ubuntu hirsute-security/multiverse amd64 Packages [3640 B]
Get:9 http://security.ubuntu.com/ubuntu hirsute-security/universe amd64 Packages [265 kB]
Get:10 http://security.ubuntu.com/ubuntu hirsute-security/restricted amd64 Packages [255 kB]
Get:11 http://archive.ubuntu.com/ubuntu hirsute/multiverse amd64 Packages [252 kB]
Get:12 http://archive.ubuntu.com/ubuntu hirsute/restricted amd64 Packages [111 kB]
Get:13 http://archive.ubuntu.com/ubuntu hirsute-updates/main amd64 Packages [486 kB]
Get:14 http://archive.ubuntu.com/ubuntu hirsute-updates/restricted amd64 Packages [258 kB]
Get:15 http://archive.ubuntu.com/ubuntu hirsute-updates/universe amd64 Packages [401 kB]
Get:16 http://archive.ubuntu.com/ubuntu hirsute-updates/multiverse amd64 Packages [8165 B]
Get:17 http://archive.ubuntu.com/ubuntu hirsute-backports/universe amd64 Packages [3950 B]
Fetched 21.6 MB in 4s (4962 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
E: Version '7.74.0-1ubuntu2.1' for 'curl' was not found
The command '/bin/sh -c apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends ansible=2.10.7-1 git=1:2.30.2-1ubuntu1 qemu-kvm unzip=6.0-26ubuntu1 xorriso=1.5.2-1 curl=7.74.0-1ubuntu2.1 jq=1.6-2.1ubuntu1 && apt-get clean && rm -rf /var/lib/apt/lists/*' returned a non-zero code: 100
user@box$

My Environment

Debian 11
Docker 20.10.9

Add Alma Linux support

Expected Behaviour

Add support for Alma Linux, which is a drop-in replacement for CentOS that's under development.

Current Behaviour

PR #7 has some changes, including building a raw file from the distributed ISO,
and putting together a kickstarter script.

Possible Solution

Test against the patches in #7 .

Context

CentOS (classic) is EOL at end of year, so this effort is designed to support
testing and development of an alternative. There may emerge several alternatives
to CentOS and we want to make testing and validation of each of them as
easy as possible.

Your Environment

  • Operating System and version (e.g. Linux, Windows, MacOS):

Alma Linux

  • How are you running Tinkerbell? Using Vagrant & VirtualBox, Vagrant & Libvirt, on Packet using Terraform, or give details:

  • Link to your project or a code example to reproduce issue:

The main Alma Linux repo is at https://github.com/AlmaLinux/cloud-images and the corresponding issue there is AlmaLinux/cloud-images#7

Build image failed as Ubuntu 21.04 (Hirsute Hippo) reaches End of Life

Ubuntu 21.04 (Hirsute Hippo) reaches End of Life on January 20 2022
https://fridge.ubuntu.com/2022/01/21/ubuntu-21-04-hirsute-hippo-end-of-life-reached-on-january-20-2022/

The base image in the Dockerfile needs to be updated.

Expected Behaviour

croc:latest can be built successfully.

Current Behaviour

❯ docker build -t croc .
Sending build context to Docker daemon  384.5kB
Step 1/10 : FROM ubuntu:hirsute-20210723
 ---> bf70ebd2c444
Step 2/10 : RUN apt-get update  && DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends    ansible=2.10.7-1    git=1:2.30.2-1ubuntu1    qemu-kvm    qemu-utils    unzip=6.0-26ubuntu1    xorriso=1.5.2-1    curl    jq=1.6-2.1ubuntu1  && apt-get clean  && rm -rf /var/lib/apt/lists/*
 ---> Running in 5d8c9e07d2fd
Ign:1 http://archive.ubuntu.com/ubuntu hirsute InRelease
Ign:2 http://security.ubuntu.com/ubuntu hirsute-security InRelease
Ign:3 http://archive.ubuntu.com/ubuntu hirsute-updates InRelease
Err:4 http://security.ubuntu.com/ubuntu hirsute-security Release
  404  Not Found [IP: 185.125.190.36 80]
Ign:5 http://archive.ubuntu.com/ubuntu hirsute-backports InRelease
Err:6 http://archive.ubuntu.com/ubuntu hirsute Release
  404  Not Found [IP: 91.189.91.38 80]
Err:7 http://archive.ubuntu.com/ubuntu hirsute-updates Release
  404  Not Found [IP: 91.189.91.38 80]
Err:8 http://archive.ubuntu.com/ubuntu hirsute-backports Release
  404  Not Found [IP: 91.189.91.38 80]
Reading package lists...
E: The repository 'http://security.ubuntu.com/ubuntu hirsute-security Release' does not have a Release file.
E: The repository 'http://archive.ubuntu.com/ubuntu hirsute Release' does not have a Release file.
E: The repository 'http://archive.ubuntu.com/ubuntu hirsute-updates Release' does not have a Release file.
E: The repository 'http://archive.ubuntu.com/ubuntu hirsute-backports Release' does not have a Release file.
The command '/bin/sh -c apt-get update  && DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends    ansible=2.10.7-1    git=1:2.30.2-1ubuntu1    qemu-kvm    qemu-utils    unzip=6.0-26ubuntu1    xorriso=1.5.2-1    curl    jq=1.6-2.1ubuntu1  && apt-get clean  && rm -rf /var/lib/apt/lists/*' returned a non-zero code: 100

Possible Solution

Steps to Reproduce (for bugs)

  1. docker build -t croc .

Context

Your Environment

  • Operating System and version (e.g. Linux, Windows, MacOS):
    Linux

  • How are you running Tinkerbell? Using Vagrant & VirtualBox, Vagrant & Libvirt, on Packet using Terraform, or give details:

  • Link to your project or a code example to reproduce issue:

Windows 2019 provisioning step errors

Expected Behaviour

Windows 2019 image builds successfully

Current Behaviour

Build fails after 8 minutes with ansible error

==> qemu: Running local shell script: /tmp/packer-shell2452460422
    qemu:
    qemu: PLAY [all] *********************************************************************
    qemu:
    qemu: TASK [Gathering Facts] *********************************************************
    qemu: Monday 11 September 2023  20:33:21 +0000 (0:00:00.008)       0:00:00.008 ******
    qemu: fatal: [127.0.0.1]: FAILED! => {"msg": "winrm or requests is not installed: No module named 'winrm'"}
    qemu:
    qemu: PLAY RECAP *********************************************************************
    qemu: 127.0.0.1                  : ok=0    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0
    qemu:
    qemu: Monday 11 September 2023  20:33:21 +0000 (0:00:00.025)       0:00:00.033 ******
    qemu: ===============================================================================
    qemu: Gathering Facts --------------------------------------------------------- 0.03s
==> qemu: Provisioning step had errors: Running the cleanup provisioner, if present...
==> qemu: Deleting output directory...
Build 'qemu' errored after 8 minutes 43 seconds: Script exited with non-zero exit status: 2. Allowed exit codes are: [0]```

## Possible Solution
<!--- Not obligatory, but suggest a fix/reason for the bug, -->
<!--- or ideas how to implement the addition or change -->

## Steps to Reproduce (for bugs)
Build Windows 2019

## Context
<!--- How has this issue affected you? What are you trying to accomplish? -->
<!--- Providing context helps us come up with a solution that is most useful in the real world -->


## Your Environment
Ubuntu 22.04 bare metal host

Sign images

Expected Behaviour

Images are signed in a registry perhaps with cosign.

Current Behaviour

Images come with no signature

Possible Solution

https://github.com/sigstore/cosign is an option

Steps to Reproduce (for bugs)

Context

Your Environment

  • Operating System and version (e.g. Linux, Windows, MacOS):

  • How are you running Tinkerbell? Using Vagrant & VirtualBox, Vagrant & Libvirt, on Packet using Terraform, or give details:

  • Link to your project or a code example to reproduce issue:

ESXi ISO files?

Are the following ESXI ISO URLs intended to be here? Does the license allow for them be used like this?

crocodile/crocodile.sh

Lines 15 to 17 in 1bce370

ESXI67ISO="http://200.131.248.12/ISO/VMware-VMvisor-Installer-6.7.0.update03-14320388.x86_64.iso"
ESXI70ISO="http://arv.asuhu.com/ESXi/VMware-VMvisor-Installer-7.0b-16324942.x86_64.iso"
ESXI65ISO="http://visionnet.com.hk/vmware/VMware-VMvisor-Installer-6.5.0.update02-8294253.x86_64.iso"

"WinRM timeout" when generating Windows install images.

Install image generation process for Windows gets stuck on WinRM waiting on the host. This goes on until 30 minute timeout limit exceeds.

Current Behaviour

2021/04/06 10:05:16 packer-builder-qemu plugin: Connected to VNC desktop: QEMU (tink-windows-2019) ==> qemu: Typing the boot command over VNC... qemu: Not using a NetBridge -- skipping StepWaitGuestAddress ==> qemu: Using winrm communicator to connect: 127.0.0.1 2021/04/06 10:05:16 packer-builder-qemu plugin: Waiting for WinRM, up to timeout: 30m0s ==> qemu: Waiting for WinRM to become available... 2021/04/06 10:05:16 packer-builder-qemu plugin: [INFO] Attempting WinRM connection... 2021/04/06 10:05:16 packer-builder-qemu plugin: [DEBUG] connecting to remote shell using WinRM 2021/04/06 10:06:31 packer-builder-qemu plugin: [ERROR] connection error: unknown error Post "https://127.0.0.1:3903/wsman": read tcp 127.0.0.1:38990->127.0.0.1:3903: read: connection reset by peer 2021/04/06 10:06:31 packer-builder-qemu plugin: [ERROR] WinRM connection err: unknown error Post "https://127.0.0.1:3903/wsman": read tcp 127.0.0.1:38990->127.0.0.1:3903: read: connection reset by peer
This goes on until 30 minute timeout limit exceeds.

Steps to Reproduce (for bugs)

  1. docker run -it --rm
    -e PACKER_LOG=1
    -v $PWD/packer_cache:/packer/packer_cache
    -v $PWD/images:/var/tmp/images
    --net=host
    --device=/dev/kvm
    croc:latest

Select any Windows version.

Your Environment

  • Operating System and version (e.g. Linux, Windows, MacOS):
    Ubuntu 20.04.2 LTS

  • How are you running Tinkerbell? Using Vagrant & VirtualBox, Vagrant & Libvirt, on Packet using Terraform, or give details:
    Running Tinkerbell on a dedicated bare-metal server with CentOS 7

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.