Skip to content

Commit

Permalink
Merge branch 'main' into update-disks-error-messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Eslam-Nawara committed Sep 25, 2024
2 parents 3a81de3 + 9347af9 commit f38c317
Show file tree
Hide file tree
Showing 168 changed files with 2,548 additions and 10,301 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/bin-package-18.04.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
name: ${{ steps.package.outputs.name }}.flist
- name: Tagging
uses: threefoldtech/publish-flist@master
if: success() && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))
if: success() && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/zos-light')
with:
token: ${{ secrets.token }}
action: tag
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/bin-package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
name: ${{ steps.package.outputs.name }}.flist
- name: Tagging
uses: threefoldtech/publish-flist@master
if: success() && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))
if: success() && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/zos-light')
with:
token: ${{ secrets.token }}
action: tag
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/bins.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,12 @@ jobs:
package: nnc
secrets:
token: ${{ secrets.HUB_JWT }}
tpm:
uses: ./.github/workflows/bin-package-18.04.yaml
with:
package: tpm
secrets:
token: ${{ secrets.HUB_JWT }}
# tpm:
# uses: ./.github/workflows/bin-package-18.04.yaml
# with:
# package: tpm
# secrets:
# token: ${{ secrets.HUB_JWT }}
qsfs:
uses: ./.github/workflows/bin-package-no-tag.yaml
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-bootstrap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
user: tf-autobuilder
token: ${{ secrets.HUB_JWT }}
name: ${{ steps.setname.outputs.build }}
target: bootstrap:development.flist
target: bootstrap-v4:development.flist
- name: Symlink flist (release)
if: success() && github.ref == 'refs/heads/main'
uses: threefoldtech/publish-flist@master
Expand All @@ -57,4 +57,4 @@ jobs:
user: tf-autobuilder
token: ${{ secrets.HUB_JWT }}
name: ${{ steps.setname.outputs.build }}
target: bootstrap:latest.flist
target: bootstrap-v4:latest.flist
7 changes: 4 additions & 3 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
# will use the tag value (has to start with v)
- name: Tagging
uses: threefoldtech/publish-flist@master
if: success() && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))
if: success() && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/zos-light')
with:
token: ${{ secrets.HUB_JWT }}
action: tag
Expand All @@ -82,12 +82,13 @@ jobs:

# only for main branch (devnet)
# this basically releases this build to devnet
# TODO remove zos-light
- name: Cross tagging (development)
if: success() && github.ref == 'refs/heads/main'
if: success() && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/zos-light')
uses: threefoldtech/publish-flist@master
with:
token: ${{ secrets.HUB_JWT }}
action: crosstag
user: tf-zos
name: development
name: development-v4
target: tf-autobuilder/${{ steps.tag.outputs.reference }}
27 changes: 0 additions & 27 deletions .github/workflows/test-bootstrap.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
* @muhamadazmy @delandtj @MarioBassem @ashraffouda @rawdaGastan @xmonader
* @muhamadazmy @Omarabdul3ziz @ashraffouda @rawdaGastan @xmonader @Eslam-Nawara

5 changes: 4 additions & 1 deletion bins/bins-extra.sh
Original file line number Diff line number Diff line change
Expand Up @@ -263,13 +263,16 @@ exclude_libs() {
echo "[+] excluding host critical libs"
rm -rf ${ROOTDIR}/usr/lib/ld-linux*
rm -rf ${ROOTDIR}/usr/lib/libc.*
rm -rf ${ROOTDIR}/usr/lib/libm.*
rm -rf ${ROOTDIR}/usr/lib/libdl.*
rm -rf ${ROOTDIR}/usr/lib/librt.*
rm -rf ${ROOTDIR}/usr/lib/libresolv.*
rm -rf ${ROOTDIR}/usr/lib/libpthread.*
}

github_name() {
# force github print
echo "name=${1}" >> $GITHUB_OUTPUT
echo "name=${1}-amd64-z4" >> $GITHUB_OUTPUT
echo "[+] github exported name: ${1}"
}

Expand Down
72 changes: 54 additions & 18 deletions bootstrap/bootstrap/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 23 additions & 1 deletion bootstrap/bootstrap/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,29 @@ will do a multiple stage bootstrap. Currently this is only two stages:
## How to works

- Bootstrap is used by [0-initramfs](https://github.com/threefoldtech/0-initramfs/blob/development-zos-v3/packages/modules.sh) to basically add `internet` and `bootstrap` services to the base image
- After internet service is fully started, bootstrap will start to download flists needed to for zos node to work properly
- After internet service is fully started, bootstrap will start to download flists needed for zos node to work properly
- As described above bootstrap run in two stages:
- The first stage is used to update bootstrap itself, and it is done like that to avoid re-building the image if we only changed the bootstrap code. this update is basically done from `tf-autobuilder` repo in the [hub/tf-autobuilder](https://hub.grid.tf/tf-autobuilder) and download the latest bootstrap flist
- For the second stage bootstrap will download the flists for that env. bootstrap cares about `runmode` argument that we pass during the start of the node. for example if we passed `runmode=dev` it will get the the tag `development` under [hub/tf-zos](https://hub.grid.tf/tf-zos) each tag is linked to a sub-directory where all flists for this env exists to be downloaded and installed on the node

## Testing in Developer setup

To test bootstrap changes on a local dev-setup you need to do the following

- under zos/qemu `cp -r overlay.normal overlay.custom`
- build `bootstrap` bin
- copy the `bootstrap` bin to overlay.custom/sbin/
- remove dir `overlay.custom/bin`
- remove all files under `overlay.custom/etc/zinit/`
- add the file overlay.custom/etc/zinit/bootstrap.yaml with the following content

```
exec: bootstrap -d
oneshot: true
after:
- internet
```

- remove overlay link under `qemu/overlay `
- create a new link pointing to overlay.custom under zos/qemu `ln -s overlay.custom overlay`
- boot your vm as normal
Loading

0 comments on commit f38c317

Please sign in to comment.