{"id":27184999,"url":"https://github.com/threefoldtech/0-bootstrap","last_synced_at":"2025-10-27T02:02:18.172Z","repository":{"id":84223068,"uuid":"142880311","full_name":"threefoldtech/0-bootstrap","owner":"threefoldtech","description":"Zero-OS Bootstrap Webservice","archived":false,"fork":false,"pushed_at":"2025-03-24T04:06:18.000Z","size":315,"stargazers_count":1,"open_issues_count":7,"forks_count":2,"subscribers_count":17,"default_branch":"development-v3","last_synced_at":"2025-04-09T17:09:54.083Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/threefoldtech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-07-30T13:36:13.000Z","updated_at":"2024-08-27T16:57:03.000Z","dependencies_parsed_at":"2024-04-27T00:24:17.027Z","dependency_job_id":"bb72d0a1-1347-4cec-8d41-9531e2431e06","html_url":"https://github.com/threefoldtech/0-bootstrap","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/threefoldtech%2F0-bootstrap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/threefoldtech%2F0-bootstrap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/threefoldtech%2F0-bootstrap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/threefoldtech%2F0-bootstrap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/threefoldtech","download_url":"https://codeload.github.com/threefoldtech/0-bootstrap/tar.gz/refs/heads/development-v3","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248074976,"owners_count":21043490,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-04-09T17:09:59.985Z","updated_at":"2025-10-27T02:02:18.097Z","avatar_url":"https://github.com/threefoldtech.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Zero-OS Bootstrap Webservice\n\nThis web service will provides dynamic construction of iPXE scripts for booting and bootstrapping Zero-OS kernel images.\n\n## Endpoints\n\nThe most simple endpoint is the plain text version:\n- `/ipxe/`: generate an iPXE plain text script to boot\n\nYou can generate a bootable image with a bundle boot-script via:\n- `/iso/`: generate a bootable ISO file\n- `/usb/`: generate a bootable USB image file\n- `/uefi/`: generate an UEFI bootloader file\n- `/uefimg/`: same as above, but an image to be dd'd to an usb stick for UEFI boxes\n- `/krn/`: generate directly-bootable kernel\n\nStatic target:\n- `/krn-generic`: build a generic ipxe kernel, with our SSL certificates authorized\n- `/uefi-generic`: build a generic ipxe uefi bootable image, with our SSL certificates authorized\n- `/krn-provision`: build a generic ipxe kernel, calling our provisioning endpoint with nic mac address\n- `/uefi-provision`: build a generic ipxe uefi bootable, calling our provisioning endpoint with nic mac address\n- `/kernel/[name]`: provide the kernel (static file)\n\n## Arguments\nAll endpoints (except `/krn-generic/` and `/kernel/` which are static) accepts more optional arguments:\n```\n...endpoint/target/[farmer-id]/[extra-arguments]\n```\n\nTarget can be one of the following, to specify in which environment kernel boots:\n- `prod`: production environment\n- `test`: testnet environment\n- `dev`: devnet environment\n- `qa`: quality-assurance special dedicated network\n\nThese networks are configurable via the `config.py` file. The dictionary pointed by `runmode` should contain\na short keyword and define a long pretty name.\n\nBy default, theses default network have new links inside `kernel-net-path` config location. This directory should contains files\ncalled `prod.efi`, `test.efi`, `dev.efi` and `qa.efi`. Theses files will be used as default kernel per network.\n\n\u003e This introduce flexibility about kernel update and allow different kernel to serve differents network, so 'testnet' can use a test\nkernel while 'prod' stay stable. In order to update kernel, it's easy when using symlinks (`prod.efi` can -and should- be a symlink to the\ncurrent kernel version).\n\nAny [argument] are optional, but are ordered and dependants (eg: you cannot provide extra argument without providing farmer-id network)\n\nTheses are valid endpoint example:\n- `/ipxe/prod`\n- `/ipxe/test/1234`\n- `/ipxe/dev/5550/console=ttyS0`\n\n### Branches\n\n### Extra Argument\n\nEverything set on the last argument will be forwarded as-it to the kernel argument. You can set spaces, etc.\n\n\n## Installation\n\nTo speedup ISO and USB images creation, the script will use a iPXE-template directory which contains a pre-compiled version of the sources.\n\nTo pre-compile code, you can run the `setup/template.sh` script.\nThis will prepare the template and put it on `/opt/ipxe-template`.\n\nIn order to compile correctly the sources, you'll need (ubuntu): `build-essential syslinux liblzma-dev libz-dev genisoimage isolinux wget dosfstools udev`\n\n### Database\n\nClients can be provisioned on the runtime using a database, you need to create the database, even if it's empty.\nJust run: `cat db/schema.sql | sqlite3 db/bootstrap.sqlite3`\n\n## Run\n\nThis is a `Flask` web service, just run the `bootstrap.py` server file. On ubuntu, you'll need `python3-flask`.\n\nKernel images will be served from `kernel` directory. Images are in form: `zero-os-BRANCH-ARCH.efi`\n\n## Configuration\n\nYou can customize the service by editing `config.py`:\n- `base-host`: http web address (eg: https://bootstrap.grid.tf)\n- `ipxe-template`: iPXE template path (by default, setup script install it to `/opt/ipxe-template`)\n- `ipxe-template-uefi`: iPXE UEFI template path (by default, setup script install it to `/opt/ipxe-template-uefi`)\n- `kernel-path`: path where to find kernels\n- `http-port`: http listen port,\n- `debug`: enable (True) or disable (False) debug Flask\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthreefoldtech%2F0-bootstrap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthreefoldtech%2F0-bootstrap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthreefoldtech%2F0-bootstrap/lists"}