Skip to content

Commit 1b2dfa3

Browse files
Add Ubuntu ISO (#626)
* First approach * Created bootable Ubuntu ISO * Add grub config for Ubuntu * Add autoinstall files * Improve Ubuntu ISO generation * Update Ubuntu ISO * Fix grub theme * Copy grub theme files to ISO * Fix pkg installation * Fix splash image path * Remove unnecessary lines in grub conf * Updated unattended autoinstall * Fix prerequisites for Ubuntu * Update docker install based on docs * Remove unnecessary packages * Update autoinstall attended * Install buildx * Handle dappnode install for Ubuntu * Fix motd generator script * Keep debian grub theme * Set default values * Remove motd script creation * Use common functions for Debian ISO generation * Fix common generation * Add netplan copy to autoinstall * Remove unneeded late commands * Fix common vars * Fix artifact generation * Add ubuntu artifacts to workflows * Add Ubuntu to release action * Update test workflow * Run pre requisites in target for attended * Upload all Ubuntu ISOs * Upload all ubuntu ISOs in artifcats * Use all storage * Add autoinstall validation file * Run autoinstall validation on any PR or push * Fix permission error on yaml validation * Install yq using pip * Update autoinstall format to * Fix yq command * Make ssh interactive in attended * Fix path for common ISO generation script * Removed ISOBUILD from prerequisites * update profile versions * update ubuntu iso * update debian image to 12.11.0 * add release body * add ubuntu test --------- Co-authored-by: pablomendezroyo <[email protected]> Co-authored-by: pablomendezroyo <[email protected]>
1 parent dd0c259 commit 1b2dfa3

19 files changed

+789
-178
lines changed

.dappnode_profile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
export BIND_VERSION="${BIND_VERSION:-0.2.11}"
1111
export IPFS_VERSION="${IPFS_VERSION:-0.2.23}"
1212
export VPN_VERSION="${VPN_VERSION:-0.2.10}"
13-
export DAPPMANAGER_VERSION="${DAPPMANAGER_VERSION:-0.2.88}"
13+
export DAPPMANAGER_VERSION="${DAPPMANAGER_VERSION:-0.2.99}"
1414
export WIFI_VERSION="${WIFI_VERSION:-0.2.9}"
1515
export WIREGUARD_VERSION="${WIREGUARD_VERSION:-0.1.3}"
16-
export HTTPS_VERSION="${HTTPS:-0.2.1}"
16+
export HTTPS_VERSION="${HTTPS:-0.2.2}"
1717

1818
export DAPPNODE_DIR="/usr/src/dappnode"
1919
export DAPPNODE_CORE_DIR="${DAPPNODE_DIR}/DNCORE"

.github/workflows/artifacts.yml

Lines changed: 58 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -68,39 +68,80 @@ jobs:
6868
sed -i -e "/HTTPS_VERSION/s/[0-9]*\.[0-9]*\.[0-9]*/"${HTTPS_VERSION}"/" .dappnode_profile
6969
cat .dappnode_profile
7070
71-
# ISO ATTENDED
72-
- name: Build attended
71+
# Debian ISO ATTENDED
72+
- name: Build Debian attended
7373
run: |
74+
sed -i -e "/BASE_OS/s/ubuntu/debian/" docker-compose.yml
7475
sed -i -e "/UNATTENDED/s/true/false/" docker-compose.yml
7576
docker compose build
7677
docker compose up
7778
78-
# Verify ISO attended created
79-
- name: Check iso attended
79+
- name: Check Debian ISO attended
8080
run: |
81-
ls -lrt images/DAppNode-debian-bookworm-amd64.iso
81+
ls -lrt images/Dappnode-debian-*.iso
8282
83-
# Set new name for the release asset
84-
- name: Set DAppNode attended ISO name
83+
- name: Set Debian Dappnode attended ISO name
8584
run: |
86-
cp ./images/DAppNode-debian-bookworm-amd64.iso DAppNode-${CORE_VERSION}-debian-bookworm-amd64.iso
85+
file=$(ls images/Dappnode-debian-*.iso)
86+
attended_filename="${file/images\/Dappnode-/Dappnode-${CORE_VERSION}-}"
87+
mv "$file" "$attended_filename"
8788
88-
# ISO UNATTENDED
89-
- name: Build unattended
89+
# Debian ISO UNATTENDED
90+
- name: Build Debian unattended
9091
run: |
92+
sed -i -e "/BASE_OS/s/ubuntu/debian/" docker-compose.yml
9193
sed -i -e "/UNATTENDED/s/false/true/" docker-compose.yml
9294
docker compose build
9395
docker compose up
9496
95-
# Verify ISO unattended was created
96-
- name: Check iso unattended
97+
- name: Check Debian ISO unattended
9798
run: |
98-
ls -lrt images/DAppNode-debian-bookworm-amd64.iso
99+
ls -lrt images/Dappnode-debian-*.iso
99100
100101
# Set new name for the release asset
101-
- name: Set DAppNode unttended ISO name
102+
- name: Set Dappnode unttended ISO name
103+
run: |
104+
file=$(ls images/Dappnode-debian-*.iso)
105+
106+
core_filename="${file/images\/Dappnode-/Dappnode-${CORE_VERSION}-}"
107+
unattended_filename="${core_filename/%.iso/-unattended.iso}"
108+
109+
mv "$file" "$unattended_filename"
110+
111+
# Ubuntu ISO ATTENDED
112+
- name: Build Ubuntu attended
113+
run: |
114+
sed -i -e "/BASE_OS/s/debian/ubuntu/" docker-compose.yml
115+
sed -i -e "/UNATTENDED/s/true/false/" docker-compose.yml
116+
docker-compose up --build
117+
118+
- name: Check Ubuntu ISO attended
119+
run: |
120+
ls -lrt images/Dappnode-ubuntu-*.iso
121+
122+
- name: Set Ubuntu Dappnode attended ISO name
123+
run: |
124+
file=$(ls images/Dappnode-ubuntu-*.iso)
125+
attended_filename="${file/images\/Dappnode-/Dappnode-${CORE_VERSION}-}"
126+
mv "$file" "$attended_filename"
127+
128+
# Ubuntu ISO UNATTENDED
129+
- name: Build Ubuntu unattended
130+
run: |
131+
sed -i -e "/BASE_OS/s/ubuntu/debian/" docker-compose.yml
132+
sed -i -e "/UNATTENDED/s/false/true/" docker-compose.yml
133+
docker-compose up --build
134+
135+
- name: Check Ubuntu ISO unattended
136+
run: |
137+
ls -lrt images/Dappnode-ubuntu-*.iso
138+
139+
- name: Set Ubuntu Dappnode unattended ISO name
102140
run: |
103-
cp ./images/DAppNode-debian-bookworm-amd64.iso DAppNode-${CORE_VERSION}-debian-bookworm-amd64-unattended.iso
141+
file=$(ls images/Dappnode-ubuntu-*.iso)
142+
core_filename="${file/images\/Dappnode-/Dappnode-${CORE_VERSION}-}"
143+
unattended_filename="${core_filename/%.iso/-unattended.iso}"
144+
mv "$file" "$unattended_filename"
104145
105146
- name: Create dappnode_profile.sh
106147
run: |
@@ -112,8 +153,8 @@ jobs:
112153
with:
113154
name: test-artifact
114155
path: |
115-
./DAppNode-*-amd64.iso
116-
./DAppNode-*-amd64-unattended.iso
156+
./Dappnode-debian-*.iso
157+
./Dappnode-ubuntu-*.iso
117158
./scripts/dappnode_install.sh
118159
./scripts/dappnode_install_pre.sh
119160
./scripts/dappnode_uninstall.sh

.github/workflows/release.yml

Lines changed: 158 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,13 @@ env:
3939

4040
jobs:
4141
pre-release:
42-
name: create pre release
42+
name: Create pre-release artifacts
4343
runs-on: ubuntu-latest
4444
defaults:
4545
run:
4646
shell: bash
4747

4848
steps:
49-
# Regex for versions introduced
5049
- name: Check versions regex
5150
run: |
5251
[[ $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:
5655
- name: Checkout
5756
uses: actions/checkout@v4
5857

59-
# Edit the profile with the new versions introduced
6058
- name: Set new versions
6159
run: |
6260
sed -i -e "/BIND_VERSION/s/[0-9]*\.[0-9]*\.[0-9]*/"${BIND_VERSION}"/" .dappnode_profile
@@ -68,82 +66,119 @@ jobs:
6866
sed -i -e "/HTTPS_VERSION/s/[0-9]*\.[0-9]*\.[0-9]*/"${HTTPS_VERSION}"/" .dappnode_profile
6967
cat .dappnode_profile
7068
71-
# ISO ATTENDED
72-
- name: Build attended
69+
- name: Build Debian attended
7370
run: |
71+
sed -i -e "/BASE_OS/s/ubuntu/debian/" docker-compose.yml
7472
sed -i -e "/UNATTENDED/s/true/false/" docker-compose.yml
7573
docker compose build
7674
docker compose up
7775
78-
# Verify ISO attended created
79-
- name: Check iso attended
76+
- name: Check Debian ISO attended
8077
run: |
81-
ls -lrt images/DAppNode-debian-bookworm-amd64.iso
78+
ls -lrt images/Dappnode-debian-*.iso
8279
83-
# Set new name for the release asset
84-
- name: Set DAppNode attended ISO name
80+
- name: Set Debian Dappnode attended ISO name
8581
run: |
86-
cp ./images/DAppNode-debian-bookworm-amd64.iso DAppNode-${CORE_VERSION}-debian-bookworm-amd64.iso
82+
file=$(ls images/Dappnode-debian-*.iso)
83+
attended_filename="${file/images\/Dappnode-/Dappnode-${CORE_VERSION}-}"
84+
mv "$file" "$attended_filename"
8785
88-
# ISO UNATTENDED
89-
- name: Build unattended
86+
- name: Build Debian unattended
9087
run: |
9188
sed -i -e "/UNATTENDED/s/false/true/" docker-compose.yml
9289
docker compose build
9390
docker compose up
9491
95-
# Verify ISO unattended was created
96-
- name: Check iso unattended
92+
- name: Check Debian ISO unattended
9793
run: |
98-
ls -lrt images/DAppNode-debian-bookworm-amd64.iso
94+
ls -lrt images/Dappnode-debian-*.iso
9995
100-
# Set new name for the release asset
101-
- name: Set DAppNode unttended ISO name
96+
- name: Set Dappnode unattended ISO name
10297
run: |
103-
cp ./images/DAppNode-debian-bookworm-amd64.iso DAppNode-${CORE_VERSION}-debian-bookworm-amd64-unattended.iso
98+
file=$(ls images/Dappnode-debian-*.iso)
99+
core_filename="${file/images\/Dappnode-/Dappnode-${CORE_VERSION}-}"
100+
unattended_filename="${core_filename/%.iso/-unattended.iso}"
101+
mv "$file" "$unattended_filename"
102+
103+
- name: Build Ubuntu attended
104+
run: |
105+
sed -i -e "/BASE_OS/s/debian/ubuntu/" docker-compose.yml
106+
sed -i -e "/UNATTENDED/s/true/false/" docker-compose.yml
107+
docker-compose up --build
108+
109+
- name: Check Ubuntu ISO attended
110+
run: |
111+
ls -lrt images/Dappnode-ubuntu-*.iso
112+
113+
- name: Set Ubuntu Dappnode attended ISO name
114+
run: |
115+
file=$(ls images/Dappnode-ubuntu-*.iso)
116+
attended_filename="${file/images\/Dappnode-/Dappnode-${CORE_VERSION}-}"
117+
mv "$file" "$attended_filename"
118+
119+
- name: Build Ubuntu unattended
120+
run: |
121+
sed -i -e "/BASE_OS/s/ubuntu/debian/" docker-compose.yml
122+
sed -i -e "/UNATTENDED/s/false/true/" docker-compose.yml
123+
docker-compose up --build
124+
125+
- name: Check Ubuntu ISO unattended
126+
run: |
127+
ls -lrt images/Dappnode-ubuntu-*.iso
128+
129+
- name: Set Ubuntu Dappnode unattended ISO name
130+
run: |
131+
file=$(ls images/Dappnode-ubuntu-*.iso)
132+
core_filename="${file/images\/Dappnode-/Dappnode-${CORE_VERSION}-}"
133+
unattended_filename="${core_filename/%.iso/-unattended.iso}"
134+
mv "$file" "$unattended_filename"
104135
105-
# Create profile.sh script (not able to set dot (.) before the name in the gh release asset)
106136
- name: Create dappnode_profile.sh
107137
run: |
108138
cp .dappnode_profile dappnode_profile.sh
109139
110140
# SHASUMs
111-
- name: Get SHA-256 attended
112-
id: shasum-attended
141+
- name: Get SHA-256 Debian attended
142+
id: shasum-debian-attended
113143
run: |
114-
SHASUM_ATTENDED=$(shasum -a 256 DAppNode-${CORE_VERSION}-debian-bookworm-amd64.iso)
115-
echo "::set-output name=SHASUM_ATTENDED::$SHASUM_ATTENDED"
144+
file=$(find . -type f -name 'Dappnode-debian-*.iso' ! -name '*unattended*')
145+
SHASUM_DEBIAN_ATTENDED=$(shasum -a 256 $file)
146+
echo "::set-output name=SHASUM_DEBIAN_ATTENDED::$SHASUM_DEBIAN_ATTENDED"
116147
117-
- name: Get SHA-256 unattended
118-
id: shasum-unattended
148+
- name: Get SHA-256 Debian unattended
149+
id: shasum-debian-unattended
119150
run: |
120-
SHASUM_UNATTENDED=$(shasum -a 256 DAppNode-${CORE_VERSION}-debian-bookworm-amd64-unattended.iso)
121-
echo "::set-output name=SHASUM_UNATTENDED::$SHASUM_UNATTENDED"
151+
file=$(find . -type f -name 'Dappnode-debian-*unattended.iso')
152+
SHASUM_DEBIAN_UNATTENDED=$(shasum -a 256 $file)
153+
echo "::set-output name=SHASUM_DEBIAN_UNATTENDED::$SHASUM_DEBIAN_UNATTENDED"
122154
123-
# Release body
124-
- name: Write release content
155+
- name: Get SHA-256 Debian attended
156+
id: shasum-ubuntu-attended
125157
run: |
126-
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
127-
cat CHANGELOG.md
128-
env:
129-
SHASUM_ATTENDED: ${{ steps.shasum-attended.outputs.SHASUM_ATTENDED }}
130-
SHASUM_UNATTENDED: ${{ steps.shasum-unattended.outputs.SHASUM_UNATTENDED }}
158+
file=$(find . -type f -name 'Dappnode-ubuntu-*.iso' ! -name '*unattended*')
159+
SHASUM_UBUNTU_ATTENDED=$(shasum -a 256 $file)s
160+
echo "::set-output name=SHASUM_UBUNTU_ATTENDED::$SHASUM_UBUNTU_ATTENDED"
161+
162+
- name: Get SHA-256 Debian unattended
163+
id: shasum-ubuntu-unattended
164+
run: |
165+
file=$(find . -type f -name 'Dappnode-ubuntu-*unattended.iso')
166+
SHASUM_UBUNTU_UNATTENDED=$(shasum -a 256 $file)
167+
echo "::set-output name=SHASUM_UBUNTU_UNATTENDED::$SHASUM_UBUNTU_UNATTENDED"
131168
132-
# PRE-RELEASE ASSETS
133-
- name: Pre release
134-
uses: softprops/action-gh-release@v1
169+
# ARTIFACTS ASSETS
170+
- name: Artifact
171+
uses: actions/upload-artifact@v3
135172
with:
136-
tag_name: ${{ github.event.inputs.core }}
137-
prerelease: true
138-
files: |
139-
./DAppNode-*-amd64.iso
140-
./DAppNode-*-amd64-unattended.iso
173+
name: test-artifact
174+
path: |
175+
./Dappnode-debian-*.iso
176+
./Dappnode-ubuntu-*.iso
141177
./scripts/dappnode_install.sh
142178
./scripts/dappnode_install_pre.sh
143179
./scripts/dappnode_uninstall.sh
144180
./scripts/dappnode_access_credentials.sh
145181
dappnode_profile.sh
146-
body_path: CHANGELOG.md
147182
148183
env:
149184
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -153,6 +188,85 @@ jobs:
153188
run: |
154189
git diff --no-index --word-diff-regex=[^[:space:]] --no-patch .dappnode_profile && echo '::set-output name=HAS_CHANGED::true' || echo '::set-output name=HAS_CHANGED::false'
155190
191+
# … your existing "Artifact" upload-artifact@v3 step here …
192+
193+
# Generate CHANGELOG.md just like before,
194+
- name: Write release content
195+
run: |
196+
cat > CHANGELOG.md <<EOF
197+
# Versions
198+
| Package | Version |
199+
|---------------------------------|-----------------------|
200+
| bind.dnp.dappnode.eth | ${BIND_VERSION} |
201+
| ipfs.dnp.dappnode.eth | ${IPFS_VERSION} |
202+
| vpn.dnp.dappnode.eth | ${VPN_VERSION} |
203+
| dappmanager.dnp.dappnode.eth | ${DAPPMANAGER_VERSION}|
204+
| wifi.dnp.dappnode.eth | ${WIFI_VERSION} |
205+
| https.dnp.dappnode.eth | ${HTTPS_VERSION} |
206+
| wireguard.dnp.dappnode.eth | ${WIREGUARD_VERSION} |
207+
208+
# Changes
209+
Changes implemented in release ${CORE_VERSION}
210+
211+
# Debian Attended
212+
Install and customize Dappnode using the Debian attended ISO: **Dappnode-${CORE_VERSION}-debian-bookworm-amd64.iso**
213+
214+
## ISO SHA-256 Checksum
215+
\`\`\`
216+
${{ steps.shasum-debian-attended.outputs.SHASUM_DEBIAN_ATTENDED }}
217+
\`\`\`
218+
219+
# Debian Unattended
220+
Install Debian unattended ISO: **Dappnode-${CORE_VERSION}-debian-bookworm-amd64-unattended.iso**
221+
Reboot right after installation.
222+
:warning: **Warning**: This will install Dappnode automatically, wiping all partitions.
223+
224+
## ISO SHA-256 Checksum
225+
\`\`\`
226+
${{ steps.shasum-debian-unattended.outputs.SHASUM_DEBIAN_UNATTENDED }}
227+
\`\`\`
228+
229+
# Ubuntu Attended
230+
Install using the Ubuntu attended ISO: **Dappnode-${CORE_VERSION}-ubuntu-bookworm-amd64.iso**
231+
232+
## ISO SHA-256 Checksum
233+
\`\`\`
234+
${{ steps.shasum-ubuntu-attended.outputs.SHASUM_UBUNTU_ATTENDED }}
235+
\`\`\`
236+
237+
# Ubuntu Unattended
238+
Install using the Ubuntu unattended ISO: **Dappnode-${CORE_VERSION}-ubuntu-bookworm-amd64-unattended.iso**
239+
240+
## ISO SHA-256 Checksum
241+
\`\`\`
242+
${{ steps.shasum-ubuntu-unattended.outputs.SHASUM_UBUNTU_UNATTENDED }}
243+
\`\`\`
244+
245+
# Dappnode for Raspberry Pi 4 (64-bit)
246+
[Installation guide →](https://github.com/dappnode/DAppNode/wiki/DAppNodeARM-Installation-Guide)
247+
248+
**Default login:**
249+
- __user__: dappnode
250+
- __password__: dappnodepi
251+
EOF
252+
cat CHANGELOG.md
253+
254+
- name: Create pre-release
255+
uses: softprops/action-gh-release@v2
256+
with:
257+
tag_name: ${{ github.event.inputs.core }}
258+
prerelease: true
259+
files: |
260+
./Dappnode-${CORE_VERSION}-debian-*.iso
261+
./Dappnode-${CORE_VERSION}-debian-*-unattended.iso
262+
./Dappnode-${CORE_VERSION}-ubuntu-*.iso
263+
./Dappnode-${CORE_VERSION}-ubuntu-*-unattended.iso
264+
./scripts/dappnode_install*.sh
265+
dappnode_profile.sh
266+
body_path: CHANGELOG.md
267+
env:
268+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
269+
156270
- name: Create Pull Request
157271
if: steps.git_diff.outputs.HAS_CHANGED == 'true'
158272
uses: peter-evans/create-pull-request@v5

0 commit comments

Comments
 (0)