-
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
Conversation
} | ||
|
||
# DOCKER INSTALLATION | ||
install_docker() { | ||
apt-get update -y | ||
apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin | tee -a $LOG_FILE | ||
apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin | tee -a $LOG_FILE |
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.
why add buildx-plugin? does ubuntu need it and debian doesnt?
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.
The script dappnode_install_pre
is executed both in Debian and Ubuntu. I added it because it is recommended here: https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository and we also use it to build packages for several architectures
|
||
# Not working in Ubuntu ISO because the user is not created before executing late-commands |
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.
if it is not working in ubuntu and has to be done in dappnode_install.sh
, shouldnt we only add user in docker group only if NOT in ubuntu? to avoid unnecessary warning or errors
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.
In Ubuntu it will just not be executed because the user with ID 1000
does not exist yet.
fi | ||
|
||
echo -e "\e[32mAdding user to docker group...\e[0m" 2>&1 | tee -a $LOGFILE | ||
addUserToDockerGroup |
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.
if all distros (debian, ubuntu..) call addUserToDockerGroup()
here, we can remove it from dappnode_install_pre.sh
right?
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 comment
The reason will be displayed to describe this comment to others. Learn more.
I think I mistakenly removed this
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 comment
The reason will be displayed to describe this comment to others. Learn more.
why this change?
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 comment
The 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" |
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.
why this change?
# 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 comment
The 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 docker compose run --env
see https://docs.docker.com/compose/environment-variables/set-environment-variables/#set-environment-variables-with-docker-compose-run---env
.github/workflows/artifacts.yml
Outdated
sed -i -e "/UNATTENDED/s/true/false/" docker-compose.yml | ||
docker-compose build | ||
docker-compose up | ||
docker-compose up --build |
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 legacy docker-compose
@@ -22,4 +22,8 @@ fi | |||
mkdir -p /usr/src/app/dappnode | |||
touch /usr/src/app/dappnode/iso_install.log | |||
|
|||
/usr/src/app/iso/scripts/generate_dappnode_iso_debian.sh | |||
if [ "$BASE_OS" = "ubuntu" ]; then |
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.
I would say its cleaner to do something like
/usr/src/app/iso/scripts/${BASE_OS}.sh
@@ -290,6 +323,30 @@ installExtraDpkg() { | |||
fi | |||
} | |||
|
|||
# The main user needs to be added to the docker group to be able to run docker commands without sudo | |||
# Explained in: https://docs.docker.com/engine/install/linux-postinstall/ | |||
addUserToDockerGroup() { |
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.
should this be done in the installer or pre-requisites script and why?
@@ -290,6 +323,30 @@ installExtraDpkg() { | |||
fi | |||
} | |||
|
|||
# The main user needs to be added to the docker group to be able to run docker commands without sudo | |||
# Explained in: https://docs.docker.com/engine/install/linux-postinstall/ |
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 stop relying on upstream documentation that may change at any time and start using something dynamic like https://github.com/docker/docker-install/tree/master
@@ -20,25 +19,33 @@ detect_installation_type() { | |||
fi | |||
} | |||
|
|||
|
|||
add_docker_repo() { |
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.
same as above, we should be using something like https://github.com/docker/docker-install/tree/master
This PR aims to provide a new dappnode ISO image based on Ubuntu, instead of Debian