-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Ubuntu ISO #626
base: master
Are you sure you want to change the base?
Add Ubuntu ISO #626
Changes from 35 commits
b8832b7
d01fa42
a346978
ea45064
b18efda
65338d7
c932c1d
3fccd34
cd1771b
61bef35
a32852f
0260762
c1df29d
c01145e
e22c0b2
55b72a7
df4605b
c3aa01c
0cc43a3
c4a0203
ff6c650
ca0d9fd
45014a7
7a6a07b
9a85a5c
e86dfea
cf4ab17
7a3f584
9a1a28c
9f40201
03567f7
06c3aeb
dcbe076
329e0dc
e05ee00
d79378e
f91bfe8
d463bcd
abe10d0
ee4c9fe
d6d453f
0da661c
33c9702
5e3de9a
1aa41f7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,39 +68,78 @@ jobs: | |
sed -i -e "/HTTPS_VERSION/s/[0-9]*\.[0-9]*\.[0-9]*/"${HTTPS_VERSION}"/" .dappnode_profile | ||
cat .dappnode_profile | ||
|
||
# ISO ATTENDED | ||
- name: Build attended | ||
# Debian ISO ATTENDED | ||
- name: Build Debian attended | ||
run: | | ||
sed -i -e "/BASE_OS/s/ubuntu/debian/" docker-compose.yml | ||
sed -i -e "/UNATTENDED/s/true/false/" docker-compose.yml | ||
docker-compose build | ||
docker-compose up | ||
docker-compose up --build | ||
|
||
# Verify ISO attended created | ||
- name: Check iso attended | ||
- name: Check Debian ISO attended | ||
run: | | ||
ls -lrt images/DAppNode-debian-bookworm-amd64.iso | ||
ls -lrt images/Dappnode-debian-*.iso | ||
|
||
# Set new name for the release asset | ||
- name: Set DAppNode attended ISO name | ||
- name: Set Debian Dappnode attended ISO name | ||
run: | | ||
cp ./images/DAppNode-debian-bookworm-amd64.iso DAppNode-${CORE_VERSION}-debian-bookworm-amd64.iso | ||
file=$(ls images/Dappnode-debian-*.iso) | ||
attended_filename="${file/images\/Dappnode-/Dappnode-${CORE_VERSION}-}" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why this change? |
||
mv "$file" "$attended_filename" | ||
|
||
# ISO UNATTENDED | ||
- name: Build unattended | ||
# Debian ISO UNATTENDED | ||
- name: Build Debian unattended | ||
run: | | ||
sed -i -e "/BASE_OS/s/ubuntu/debian/" docker-compose.yml | ||
sed -i -e "/UNATTENDED/s/false/true/" docker-compose.yml | ||
docker-compose build | ||
docker-compose up | ||
docker-compose up --build | ||
|
||
# Verify ISO unattended was created | ||
- name: Check iso unattended | ||
- name: Check Debian ISO unattended | ||
run: | | ||
ls -lrt images/DAppNode-debian-bookworm-amd64.iso | ||
ls -lrt images/Dappnode-debian-*.iso | ||
|
||
# Set new name for the release asset | ||
- name: Set DAppNode unttended ISO name | ||
- name: Set Dappnode unttended ISO name | ||
run: | | ||
file=$(ls images/Dappnode-debian-*.iso) | ||
|
||
core_filename="${file/images\/Dappnode-/Dappnode-${CORE_VERSION}-}" | ||
unattended_filename="${core_filename/%.iso/-unattended.iso}" | ||
|
||
mv "$file" "$unattended_filename" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why this change? |
||
|
||
# Ubuntu ISO ATTENDED | ||
- name: Build Ubuntu attended | ||
run: | | ||
sed -i -e "/BASE_OS/s/debian/ubuntu/" docker-compose.yml | ||
sed -i -e "/UNATTENDED/s/true/false/" docker-compose.yml | ||
docker-compose up --build | ||
|
||
- name: Check Ubuntu ISO attended | ||
run: | | ||
ls -lrt images/Dappnode-ubuntu-*.iso | ||
|
||
- name: Set Ubuntu Dappnode attended ISO name | ||
run: | | ||
file=$(ls images/Dappnode-ubuntu-*.iso) | ||
attended_filename="${file/images\/Dappnode-/Dappnode-${CORE_VERSION}-}" | ||
mv "$file" "$attended_filename" | ||
|
||
# Ubuntu ISO UNATTENDED | ||
- name: Build Ubuntu unattended | ||
run: | | ||
sed -i -e "/BASE_OS/s/ubuntu/debian/" docker-compose.yml | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should be done in a different PR, looks weird to edit compose env instead of running something like |
||
sed -i -e "/UNATTENDED/s/false/true/" docker-compose.yml | ||
docker-compose up --build | ||
|
||
- name: Check Ubuntu ISO unattended | ||
run: | | ||
ls -lrt images/Dappnode-ubuntu-*.iso | ||
|
||
- name: Set Ubuntu Dappnode unattended ISO name | ||
run: | | ||
cp ./images/DAppNode-debian-bookworm-amd64.iso DAppNode-${CORE_VERSION}-debian-bookworm-amd64-unattended.iso | ||
file=$(ls images/Dappnode-ubuntu-*.iso) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. samer, why this change? |
||
core_filename="${file/images\/Dappnode-/Dappnode-${CORE_VERSION}-}" | ||
unattended_filename="${core_filename/%.iso/-unattended.iso}" | ||
mv "$file" "$unattended_filename" | ||
|
||
- name: Create dappnode_profile.sh | ||
run: | | ||
|
@@ -112,8 +151,8 @@ jobs: | |
with: | ||
name: test-artifact | ||
path: | | ||
./DAppNode-*-amd64.iso | ||
./DAppNode-*-amd64-unattended.iso | ||
./Dappnode-debian-*.iso | ||
./Dappnode-ubuntu-*.iso | ||
./scripts/dappnode_install.sh | ||
./scripts/dappnode_install_pre.sh | ||
./scripts/dappnode_uninstall.sh | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,14 +39,13 @@ env: | |
|
||
jobs: | ||
pre-release: | ||
name: create pre release | ||
name: Create pre-release artifacts | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
shell: bash | ||
|
||
steps: | ||
# Regex for versions introduced | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why removing comment? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's already said in the step name "Check versions regex" |
||
- name: Check versions regex | ||
run: | | ||
[[ $BIND_VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] && [[ $IPFS_VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] && [[ $DAPPMANAGER_VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] && \ | ||
|
@@ -56,7 +55,6 @@ jobs: | |
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why removing comment? |
||
# Edit the profile with the new versions introduced | ||
- name: Set new versions | ||
run: | | ||
sed -i -e "/BIND_VERSION/s/[0-9]*\.[0-9]*\.[0-9]*/"${BIND_VERSION}"/" .dappnode_profile | ||
|
@@ -68,82 +66,117 @@ jobs: | |
sed -i -e "/HTTPS_VERSION/s/[0-9]*\.[0-9]*\.[0-9]*/"${HTTPS_VERSION}"/" .dappnode_profile | ||
cat .dappnode_profile | ||
|
||
# ISO ATTENDED | ||
- name: Build attended | ||
- name: Build Debian attended | ||
run: | | ||
sed -i -e "/BASE_OS/s/ubuntu/debian/" docker-compose.yml | ||
sed -i -e "/UNATTENDED/s/true/false/" docker-compose.yml | ||
docker-compose build | ||
docker-compose up | ||
docker-compose up --build | ||
|
||
# Verify ISO attended created | ||
- name: Check iso attended | ||
- name: Check Debian ISO attended | ||
run: | | ||
ls -lrt images/DAppNode-debian-bookworm-amd64.iso | ||
ls -lrt images/Dappnode-debian-*.iso | ||
|
||
# Set new name for the release asset | ||
- name: Set DAppNode attended ISO name | ||
- name: Set Debian Dappnode attended ISO name | ||
run: | | ||
cp ./images/DAppNode-debian-bookworm-amd64.iso DAppNode-${CORE_VERSION}-debian-bookworm-amd64.iso | ||
file=$(ls images/Dappnode-debian-*.iso) | ||
attended_filename="${file/images\/Dappnode-/Dappnode-${CORE_VERSION}-}" | ||
mv "$file" "$attended_filename" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why this change everywhere? assuming cause its less resource expensive doing There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. or is there any other reason? |
||
|
||
# ISO UNATTENDED | ||
- name: Build unattended | ||
- name: Build Debian unattended | ||
run: | | ||
sed -i -e "/UNATTENDED/s/false/true/" docker-compose.yml | ||
docker-compose build | ||
docker-compose up | ||
docker-compose up --build | ||
|
||
# Verify ISO unattended was created | ||
- name: Check iso unattended | ||
- name: Check Debian ISO unattended | ||
run: | | ||
ls -lrt images/DAppNode-debian-bookworm-amd64.iso | ||
ls -lrt images/Dappnode-debian-*.iso | ||
|
||
# Set new name for the release asset | ||
- name: Set DAppNode unttended ISO name | ||
- name: Set Dappnode unattended ISO name | ||
run: | | ||
cp ./images/DAppNode-debian-bookworm-amd64.iso DAppNode-${CORE_VERSION}-debian-bookworm-amd64-unattended.iso | ||
file=$(ls images/Dappnode-debian-*.iso) | ||
core_filename="${file/images\/Dappnode-/Dappnode-${CORE_VERSION}-}" | ||
unattended_filename="${core_filename/%.iso/-unattended.iso}" | ||
mv "$file" "$unattended_filename" | ||
|
||
- name: Build Ubuntu attended | ||
run: | | ||
sed -i -e "/BASE_OS/s/debian/ubuntu/" docker-compose.yml | ||
sed -i -e "/UNATTENDED/s/true/false/" docker-compose.yml | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same as above, it would be cleaner to use something like |
||
docker-compose up --build | ||
|
||
- name: Check Ubuntu ISO attended | ||
run: | | ||
ls -lrt images/Dappnode-ubuntu-*.iso | ||
|
||
- name: Set Ubuntu Dappnode attended ISO name | ||
run: | | ||
file=$(ls images/Dappnode-ubuntu-*.iso) | ||
attended_filename="${file/images\/Dappnode-/Dappnode-${CORE_VERSION}-}" | ||
mv "$file" "$attended_filename" | ||
|
||
- name: Build Ubuntu unattended | ||
run: | | ||
sed -i -e "/BASE_OS/s/ubuntu/debian/" docker-compose.yml | ||
sed -i -e "/UNATTENDED/s/false/true/" docker-compose.yml | ||
docker-compose up --build | ||
|
||
- name: Check Ubuntu ISO unattended | ||
run: | | ||
ls -lrt images/Dappnode-ubuntu-*.iso | ||
|
||
- name: Set Ubuntu Dappnode unattended ISO name | ||
run: | | ||
file=$(ls images/Dappnode-ubuntu-*.iso) | ||
core_filename="${file/images\/Dappnode-/Dappnode-${CORE_VERSION}-}" | ||
unattended_filename="${core_filename/%.iso/-unattended.iso}" | ||
mv "$file" "$unattended_filename" | ||
|
||
# Create profile.sh script (not able to set dot (.) before the name in the gh release asset) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why removing this comment? its critical if someone attempts to add an artifact that starts with dot |
||
- name: Create dappnode_profile.sh | ||
run: | | ||
cp .dappnode_profile dappnode_profile.sh | ||
|
||
# SHASUMs | ||
- name: Get SHA-256 attended | ||
id: shasum-attended | ||
- name: Get SHA-256 Debian attended | ||
id: shasum-debian-attended | ||
run: | | ||
SHASUM_ATTENDED=$(shasum -a 256 DAppNode-${CORE_VERSION}-debian-bookworm-amd64.iso) | ||
echo "::set-output name=SHASUM_ATTENDED::$SHASUM_ATTENDED" | ||
file=$(find . -type f -name 'Dappnode-debian-*.iso' ! -name '*unattended*') | ||
SHASUM_DEBIAN_ATTENDED=$(shasum -a 256 $file) | ||
echo "::set-output name=SHASUM_DEBIAN_ATTENDED::$SHASUM_DEBIAN_ATTENDED" | ||
|
||
- name: Get SHA-256 unattended | ||
id: shasum-unattended | ||
- name: Get SHA-256 Debian unattended | ||
id: shasum-debian-unattended | ||
run: | | ||
SHASUM_UNATTENDED=$(shasum -a 256 DAppNode-${CORE_VERSION}-debian-bookworm-amd64-unattended.iso) | ||
echo "::set-output name=SHASUM_UNATTENDED::$SHASUM_UNATTENDED" | ||
file=$(find . -type f -name 'Dappnode-debian-*unattended.iso') | ||
SHASUM_DEBIAN_UNATTENDED=$(shasum -a 256 $file) | ||
echo "::set-output name=SHASUM_DEBIAN_UNATTENDED::$SHASUM_DEBIAN_UNATTENDED" | ||
|
||
# Release body | ||
- name: Write release content | ||
- name: Get SHA-256 Debian attended | ||
id: shasum-ubuntu-attended | ||
run: | | ||
echo -en "# Versions\n| Package | Version |\n|---|---|\nbind.dnp.dappnode.eth|${BIND_VERSION}|\n|ipfs.dnp.dappnode.eth|${IPFS_VERSION}|\n|vpn.dnp.dappnode.eth |${VPN_VERSION}|\n|dappmanager.dnp.dappnode.eth|${DAPPMANAGER_VERSION}|\n|wifi.dnp.dappnode.eth|${WIFI_VERSION}|\n|https.dnp.dappnode.eth|${HTTPS_VERSION}|\n|wireguard.dnp.dappnode.eth|${WIREGUARD_VERSION}|\n# Changes\nChanges implemented in release ${CORE_VERSION}\n# Attended version\nInstall and customize DAppNode using the attended ISO: **DAppNode-${CORE_VERSION}-debian-bookworm-amd64.iso**\n\n## ISO SHA-256 Checksum\n\`\`\`\nshasum -a 256 DAppNode-${CORE_VERSION}-debian-bookworm-amd64.iso\n${SHASUM_ATTENDED}\n\`\`\`\n# Unattended version\nInstall DAppNode easily using the unattended ISO: **DAppNode-${CORE_VERSION}-debian-bookworm-amd64-unattended.iso**\nDo a reboot right after the installation\n:warning: **Warning**: This ISO will install Dappnode automatically, deleting all existing partitions on the disk\n\ndefault login data:\n - **__user__**: dappnode\n - **__password__**: dappnode.s0\n## ISO SHA-256 Checksum\n\`\`\`\nshasum -a 256 DAppNode-${CORE_VERSION}-debian-bookworm-amd64-unattended.iso\n${SHASUM_UNATTENDED}\n\`\`\`\n# DAppNode for Raspberry Pi 4 64bit\n[Instructions](https://github.com/dappnode/DAppNode/wiki/DAppNodeARM-Installation-Guide)\n\ndefault login data:\n - **__user__**: dappnode\n - **__password__**: dappnodepi" > CHANGELOG.md | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think I mistakenly removed this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do not remove release body |
||
cat CHANGELOG.md | ||
env: | ||
SHASUM_ATTENDED: ${{ steps.shasum-attended.outputs.SHASUM_ATTENDED }} | ||
SHASUM_UNATTENDED: ${{ steps.shasum-unattended.outputs.SHASUM_UNATTENDED }} | ||
file=$(find . -type f -name 'Dappnode-ubuntu-*.iso' ! -name '*unattended*') | ||
SHASUM_UBUNTU_ATTENDED=$(shasum -a 256 $file)s | ||
echo "::set-output name=SHASUM_UBUNTU_ATTENDED::$SHASUM_UBUNTU_ATTENDED" | ||
|
||
- name: Get SHA-256 Debian unattended | ||
id: shasum-ubuntu-unattended | ||
run: | | ||
file=$(find . -type f -name 'Dappnode-ubuntu-*unattended.iso') | ||
SHASUM_UBUNTU_UNATTENDED=$(shasum -a 256 $file) | ||
echo "::set-output name=SHASUM_UBUNTU_UNATTENDED::$SHASUM_UBUNTU_UNATTENDED" | ||
|
||
# PRE-RELEASE ASSETS | ||
- name: Pre release | ||
uses: softprops/action-gh-release@v1 | ||
# ARTIFACTS ASSETS | ||
- name: Artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
tag_name: ${{ github.event.inputs.core }} | ||
prerelease: true | ||
files: | | ||
./DAppNode-*-amd64.iso | ||
./DAppNode-*-amd64-unattended.iso | ||
name: test-artifact | ||
path: | | ||
./Dappnode-debian-*.iso | ||
./Dappnode-ubuntu-*.iso | ||
./scripts/dappnode_install.sh | ||
./scripts/dappnode_install_pre.sh | ||
./scripts/dappnode_uninstall.sh | ||
./scripts/dappnode_access_credentials.sh | ||
dappnode_profile.sh | ||
body_path: CHANGELOG.md | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. keep changelog |
||
|
||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
if loadfont unicode ; then | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what is the purpose of this file? can you add a comment explaining it and official documentation if any? otherwise it would be very difficult to get context for someone else who want to work on this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also is this only ubuntu specific? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The purpose is configuring the boot. It's actually pretty similar to the Debian one we already have here: https://github.com/dappnode/DAppNode/blob/master/iso/boot/grub.cfg There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It just inserts some needed modules, sets the theme (with the Dappnode logo and so on) and allows only 1 option in the menu, which is installing Dappnode |
||
set gfxmode=800x600 | ||
insmod efi_gop | ||
insmod efi_uga | ||
insmod video_bochs | ||
insmod video_cirrus | ||
insmod gfxterm | ||
insmod png | ||
terminal_output gfxterm | ||
fi | ||
|
||
set timeout=6 | ||
|
||
set theme=/boot/grub/themes/dappnode/theme.txt | ||
|
||
menuentry "Install Dappnode (over Ubuntu Server)" { | ||
set background_color=black | ||
set gfxpayload=keep # Maintain the graphical resolution through the booting | ||
linux /casper/vmlinuz autoinstall vga=788 FRONTEND_BACKGROUND=dark --- # Added autoinstall to make it unattended | ||
initrd /casper/initrd | ||
} |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same as above, can this be applied to debian too? |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same as above |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
title-color: "white" | ||
title-text: "Dappnode Installer" | ||
title-font: "Sans Regular 16" | ||
desktop-color: "black" | ||
desktop-image: "/boot/grub/themes/dappnode/splash.png" | ||
message-color: "white" | ||
message-bg-color: "black" | ||
terminal-font: "Sans Regular 12" | ||
|
||
+ boot_menu { | ||
left = 18% | ||
width = 50% | ||
top = 200 | ||
height = 200 | ||
item_font = "Sans Regular 12" | ||
item_color = #d3d3d3 | ||
selected_item_color = "white" | ||
item_height = 20 | ||
item_padding = 15 | ||
item_spacing = 5 | ||
} | ||
|
||
+ vbox { | ||
top = 100%-60 | ||
left = 10% | ||
+ hbox { | ||
top = 0 | ||
left = 20% | ||
+ label {text = "Enter: " font = "Sans 10" color = "white" align = "left"} | ||
+ label {text = "Select " font = "Sans 10" color = "#d3d3d3" align = "left"} | ||
} | ||
+ hbox { | ||
top = 0 | ||
left = 20% | ||
+ label {text = "E: " font = "Sans 10" color = "white" align = "left"} | ||
+ label {text = "Edit Selection " font = "Sans 10" color = "#d3d3d3" align = "left"} | ||
+ label {text = " " font = "Sans 10" color = "white" align = "left"} | ||
+ label {text = "C: " font = "Sans 10" color = "white" align = "left"} | ||
+ label {text = "GRUB Command line" font = "Sans 10" color = "#d3d3d3" align = "left"} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should consider using new
docker compose
instead of legacydocker-compose