{"id":18780179,"url":"https://github.com/danielealbano/cluster-node-init","last_synced_at":"2026-04-30T16:33:35.996Z","repository":{"id":90707959,"uuid":"328271973","full_name":"danielealbano/cluster-node-init","owner":"danielealbano","description":"A fast, bash only, simplified cloud-init replacement","archived":false,"fork":false,"pushed_at":"2021-01-10T21:52:48.000Z","size":85,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-27T16:49:55.233Z","etag":null,"topics":["cloud-init","linux","raspberrypi","raspberrypi4","raspberrypi4-64","shell"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/danielealbano.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":"2021-01-10T00:18:51.000Z","updated_at":"2025-06-12T16:44:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"7b670c3d-6d4e-423f-ad0c-dbc5621134bf","html_url":"https://github.com/danielealbano/cluster-node-init","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/danielealbano/cluster-node-init","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielealbano%2Fcluster-node-init","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielealbano%2Fcluster-node-init/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielealbano%2Fcluster-node-init/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielealbano%2Fcluster-node-init/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danielealbano","download_url":"https://codeload.github.com/danielealbano/cluster-node-init/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielealbano%2Fcluster-node-init/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32470879,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"ssl_error","status_checked_at":"2026-04-30T13:12:06.837Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["cloud-init","linux","raspberrypi","raspberrypi4","raspberrypi4-64","shell"],"created_at":"2024-11-07T20:25:11.077Z","updated_at":"2026-04-30T16:33:35.981Z","avatar_url":"https://github.com/danielealbano.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cluster-node-init - v0.1\n\nAs part of the work I am doing to setup my 12 nodes Raspberry PI 4 cluster, I built a simple cloud-init replacement in bash.\n\nTens, if not hundreds, of different solutions exist to perform a Virtual Machine initialization but they are, usually, full of features that are very often useless when it comes to a bare-metal cluster, even more true if it's a Raspberry PI 4 cluster.\nThe resource constraint, the slowness and the extreme **instability** of cloud-init have pushed me to build this really simple deployment pipeline in bash.\n\nMy cluster boots entirely via PXE and TFTP and the rootfs is an overlayfs virtual filesystem exported via NFS, because I have built this platform with that in mind the configuration is a file available on the disk of the node. Currently it's not possible to fetch the configuration from an external system but will be added soon.\nAlso, the goal of this platform is to let me to destroy any node any time, simply deleting the rootfs folder on the storage of the master node, and rebuild it automatically with zero effort therefore some operations (like system updates, package installation, etc.) are performed on every boot although the platform aims to be idempotent therefore is a safe operation.\n\nWith this approach, and thanks to this cloud-init simplified replacement, a single node can be fully bootstrapped with already the updates installed in the base image and it takes \u003c90s for the first boot and 40-ish seconds afterwards.\n\nOnly Ubuntu 20.10 64bit has been tested so far but should work safely on Ubuntu 20.04 and also on Raspbian, both 32bit and 64bit.\n\nThis approach comes handy also for embedded / IoT devices, it makes possible to have a cloud-init configuration approach with a minimal enviroment available (ie. a buildroot / yocto based system where you want to retain the flexibility to run a set of steps at boot to perform the auto-configuration).\n\nA number of modules are already available\n- [remove-cloud-init](#remove-cloud-init)\n- [hostname-configure](#hostname-configure)\n- [disks-configure](#disks-configure)\n- [keep-vt-logs-console](#keep-vt-logs-console)\n- [network-configure](#network-configure)\n- [apt-configure](#apt-configure)\n- [apt-update](#apt-update)\n- [apt-upgrade](#apt-upgrade)\n- [apt-install-packages](#apt-install-packages)\n- [apparmor-disable](#apparmor-disable)\n- [sshd-configure](#sshd-configure)\n- [users-configure](#users-configure)\n- [microk8s-join-configure](#microk8s-join-configure)\n- [print-info](#print-info)\n\nA few modules still need to be implemented\n- apt-configure\n- network-configure\n- timezone-configure\n- ntp-configure\n- run-custom\n\nBecause the network-configure module is a WIP, the deploy mechanism relies on a network configurable via DHCP on eth0, as per default on the raspberry pi. The wifi auto configuration hasn't been tested and most likely it will not work.\n\nAn [example configuration](#example-configuration) is available in the documentation and also in the repository, keep in mind that this file is sourced by the main bash script and therefore can contain actual commands. On a longer term the goal is to support something more convenient like YAML.\n\n## Installation\n\n### Current machine\n\nAlthough this the platform has been built with a rootfs over nfs, it can be easily installed directly on a machine:\n```\ncd /opt\nsudo git clone https://github.com/danielealbano/cluster-node-init.git\nsudo cp /opt/cluster-node-init/config.env.skel /opt/cluster-node-init/config.env\nsudo nano /opt/cluster-node-init/config.env # update the config as needed\nsudo mkdir /etc/systemd/system/multi-user.target.wants\nsudo ln -s /opt/cluster-node-init/cluster-node-init.service /etc/systemd/system/multi-user.target.wants/cluster-node-init.service\nsudo systemctl daemon-reload\n```\n\n### rootfs via a sdcard\n\nIf you have flashed an sdcard you can mount the rootfs and run the following commands\n```\ncd path/to/sdcard/rootfs\ncd opt\nsudo git clone https://github.com/danielealbano/cluster-node-init.git\nsudo cp cluster-node-init/config.env.skel cluster-node-init/config.env\nsudo nano cluster-node-init/config.env # update the config as needed\nsudo mkdir ../etc/systemd/system/multi-user.target.wants\ncd ../etc/systemd/system/multi-user.target.wants\nsudo ln -s ../../opt/cluster-node-init/cluster-node-init.service cluster-node-init.service\n```\n\n### rootfs exported over NFS\n\nThe instructions are really similar to the ones used for the sdcard\n```\ncd path/to/rootfs/over/nfs\ncd opt\nsudo git clone https://github.com/danielealbano/cluster-node-init.git\nsudo cp opt/cluster-node-init/config.env.skel opt/cluster-node-init/config.env\nsudo nano opt/cluster-node-init/config.env # update the config as needed\nsudo mkdir ../etc/systemd/system/multi-user.target.wants\ncd ../etc/systemd/system/multi-user.target.wants\nsudo ln -s ../../opt/cluster-node-init/cluster-node-init.service cluster-node-init.service\n```\n\n## Modules documentation\n\nThe platform takes care of verifying that all the modules requested in the config file actually exist and are executable before starting and retries any failure during the deployment process to handle transient errors.\n\n### remove-cloud-init\n\nTakes care of removing cloud-init, first thing to do ;)\n\nThere are no config parameters available for this module.\n\n### hostname-configure\n\nConfigures the hostname and optionally re-run dhclient to send to the dhcp server the updated hostname.\n\nAvailable parameters:\n\n| Parameter | Details |\n| - | - |\n| HOSTNAME | Set the hostname of the machine to the value specified in the variable |\n| HOSTNAME_CMD | Execute the command defined in the variable and use the output as hostname, if this parameter is set takes precedence |\n| HOSTNAME_DOMAIN  | If set, set the domain name to the specified value |\n| HOSTNAME_DHCLIENT_RERUN  | TODO |\n| HOSTNAME_DHCLIENT_DEV  | TODO |\n\n### disks-configure\n\nTakes care of configuring the attached disks as per configuration if there is no partition table created, otherwise skips all the write operations and only updates the /etc/fstab.\nThe expectation is that the attached disks are configured via this module, if not it's necessary to:\n- update the configuration to match the partitions type and size on the disks;\n- ensure that all the swaps / filesystems have been created;\n- ensure that all the swaps / filesystems have an UUID.\n\nAvailable parameters:\n\n| Parameter | Details |\n| - | - |\n| DISKS_{X}\\_DEV | Disk device |\n| DISKS_{X}\\_PARTITION_{Y}\\_FS | Filesystem (ie. swap, ext4, etc.), must be a filesystem support by default in the system without additional software |\n| DISKS_{X}\\_PARTITION_{Y}\\_SIZE | Size (ie. 4G), it's possible to pass \"all\" for the last partition to use all the remaining available space |\n| DISKS_{X}\\_PARTITION_{Y}\\_MOUNT_POINT | Path of the mount point |\n| DISKS_{X}\\_PARTITION_{Y}\\_MKFS_EXTRA_PARAM | Extra parameters to pass to mkfs or mkswap, by default -U is already passed and can't be specified again |\n\nLegend:\n- {X} is an index starting from 0 and indicates the disk index in the configuration\n- {Y} is an index starting from 0 and indicates the partition index for the related disk in the configuration\n\n### keep-vt-logs-console\n\nAvoids clearing the tty1 after the boot is completed, handy to see any error if a screen is attached or to read the system info printed by the **print-info** module.\n\nThere are no config parameters available for this module.\n\n### apt-update\n\nRuns apt update, relies on the pkgcache.bin modification timestamp to avoid re-running the update on every boot.\n\nAvailable parameters:\n\n| Parameter | Details |\n| - | - |\n| APT_UPDATE_PKGCACHE_BIN_LAST_REFRESH_DIFF_IN_S | Seconds to wait between apt update runs |\n\n### apt-upgrade\n\nRuns a system update, ensure that the software install in the system is up-to-date before finishing the boot.\n\nThe kernel related packages are **specifically** excluded as my cluster is running off PXE and TFTP and the kernel is provided via the master node.\n\nThere are no config parameters available for this module.\n\n### apt-install-packages\n\nInstalls the specified packages via apt install. Because it runs on every boot, it's possible to add additional software and get it installed at boot time.\n\nAvailable parameters:\n\n| Parameter | Details |\n| - | - |\n| APT_INSTALL_PACKAGES | List of packages to install space-separated |\n\n### apparmor-disable\n\nDisables apparmor if requested.\n\n| Parameter | Details |\n| - | - |\n| APPARMOR_DISABLE | Seconds to wait between apt update runs |\n\n### sshd-configure\n\nEnsures that the ssh host keys exist.\n\nThere are no config parameters available for this module.\n\n### users-configure\n\nCreates or updates the user(s) defined in the configuration. As currently it's not possible to define the home directory path in, if an user already exists and the option USER_{X}\\_CREATE_HOME is set to 1 after its creation, it will be ignored.\n\nThis module also takes care of adding any requested ssh auth key and setting the NOPASSWD flag for the user in /etc/sudoers if requested.\n\nAvailable parameters:\n\n| Parameter | Details |\n| - | - |\n| USER_{X}_NAME                     | User name of the user to create |\n| USER_{X}_CREATE_HOME              | If set to 1, creates the home directory |\n| USER_{X}_SUDO_NOPASSWD            | If set to 1, set the NOPASSWD flag in sudo for the user |\n| USER_{X}_GROUP                    | If not specified the default will be used |\n| USER_{X}_GROUPS                   | Additional user groups (comma separated, no whitespaces!) |\n| USER_{X}_ADD_CREATE_OPTS_OVERRIDE | Override ALL the create options (to specificy different home, comments, etc.) |\n| USER_{X}_SSH_AUTH_KEYS_{Y}        | Pre-authorised ssh keys |\n\nLegend:\n- {X} is an index starting from 0 and indicates the user index in the configuration\n- {Y} is an index starting from 0 and indicates the ssh auth key index for the related user in the configuration\n\n### microk8s-join-configure\n\nInstall microk8s, disable ha-cluster and join the node to a cluster.\n\nIt requires an use to login from the worker node onto the master node via ssh, below the instructions.\n\nPreconfiguration, to run on the master, it will:\n- create an user called microk8s-remote-add-node-user\n- create an ssh key storing it in microk8s-remote-add-node-user-key and microk8s-remote-add-node-user-key.pub\n- updating the authorized_keys of the newly created user\n- print out the config parameter MICROK8S_JOIN_REMOTE_USER_SSH_KEY_BASE64\n```\nuseradd -m -c \"microk8s - remote add node user\" -G microk8s microk8s-remote-add-node-user\nssh-keygen -fmicrok8s-remote-add-node-user-key -t ed25519 -b 2096 -C \"microk8s-remote-add-node-user-key@$(hostname)\" -q -N ''\nmkdir ~microk8s-remote-add-node-user/.ssh\nchown microk8s-remote-add-node-user.microk8s-remote-add-node-user ~microk8s-remote-add-node-user/.ssh\nchmod 700 ~microk8s-remote-add-node-user/.ssh\ncp microk8s-remote-add-node-user-key.pub ~microk8s-remote-add-node-user/.ssh/authorized_keys\nchown microk8s-remote-add-node-user.microk8s-remote-add-node-user ~microk8s-remote-add-node-user/.ssh/authorized_keys\nchmod 600 ~microk8s-remote-add-node-user/.ssh/authorized_keys\necho \"MICROK8S_JOIN_REMOTE_USER_SSH_KEY_BASE64=\\\"$(cat microk8s-remote-add-node-user-key | base64 -w0)\\\"\"\n```\n\nAvailable parameters:\n\n| Parameter | Details |\n| - | - |\n| MICROK8S_JOIN_REMOTE_USER | User to use to access the master node via ssh (ie. microk8s-remote-add-node-user) |\n| MICROK8S_JOIN_MASTER_HOSTNAME | Microk8s master node hostname (or ip address) |\n| MICROK8S_JOIN_REMOTE_USER_SSH_KEY_BASE64 | Base64-encode private key used for remote access from the worker node to the master node |\n\n### print-info\n\nPrints out the node ip address(es), hostname and ssh host keys for reference.\n\n## Example configuration\n\nA skeleton config file named [config.env.skel](config.env.skel) is available in the repository.\n\n```\n# Should really be converted in YAML or JSON :)\n\n# general settings\n# ---\n# MODULE_LIST                       List of modules to execute in order\n# MODULE_EXECUTION_MAX_RETRIES      Max number of retries in case of a module failure\n# MODULE_EXECUTION_RETRY_WAIT       How much time to wait after a module failure\n#\nMODULE_LIST=\"\"\nMODULE_LIST=\"${MODULE_LIST} remove-cloud-init hostname-configure disks-configure timezone-configure keep-vt-logs-console\"\nMODULE_LIST=\"${MODULE_LIST} network-configure apt-configure apt-update apt-upgrade apt-install-packages\"\nMODULE_LIST=\"${MODULE_LIST} ntp-configure apparmor-disable sshd-configure users-configure print-info\"\nMODULE_EXECUTION_MAX_RETRIES=3\nMODULE_EXECUTION_MAX_RETRY_WAIT_IN_SECONDS=5\n\n\n# hostname-configure\n# ---\n# HOSTNAME                          Set the hostname of the machine to the value specified in the variable\n# HOSTNAME_CMD                      Execute the command defined in the variable and use the output as hostname, if\n#                                   this parameter is set takes precedence\n# HOSTNAME_DOMAIN                   If set, set the domain name to the specified value\n# HOSTNAME_DHCLIENT_RERUN\n# HOSTNAME_DHCLIENT_DEV\n#\nHOSTNAME=\"\"\nHOSTNAME_CMD=\"echo 'rpi4-$(cat /proc/cpuinfo | grep Serial | awk \"{ printf \\$3 }\" | cut -b 9-)'\"\nHOSTNAME_DOMAIN=\"worker.k8s-cluster.home\"\nHOSTNAME_DHCLIENT_RERUN=1\nHOSTNAME_DHCLIENT_DEV=\"eth0\"\n\n\n# disks-configure\n# ---\n# Simple disk configuration, currently supports only msdos partitions (no gpt) and doesn't support raid or lvm.\n# If a partition table is present on the disk, the configuration will be ALWAYS skipped, we don't want to lose data.\n#\nDISKS_0_DEV=\"/dev/sda\"\nDISKS_0_PARTITION_0_FS=\"swap\"\nDISKS_0_PARTITION_0_SIZE=\"4G\"\nDISKS_0_PARTITION_0_MOUNT_POINT=\"swap\"\nDISKS_0_PARTITION_0_MKFS_EXTRA_PARAM=\"-L NVME_SWAP\"\nDISKS_0_PARTITION_1_FS=\"ext4\"\nDISKS_0_PARTITION_1_SIZE=\"all\"\nDISKS_0_PARTITION_1_MOUNT_POINT=\"/mnt/data\"\nDISKS_0_PARTITION_1_MKFS_EXTRA_PARAM=\"-L NVME_DATA\"\n\n\n# apt-update-system\n# ---\n# APT_UPDATE_PKGCACHE_BIN_LAST_REFRESH_DIFF_IN_S\n#\nAPT_UPDATE_PKGCACHE_BIN_LAST_REFRESH_DIFF_IN_S=86400\n\n\n# apt-install-packages\n# ---\n# APT_INSTALL_PACKAGES\n#\nAPT_INSTALL_PACKAGES=\"\"\nAPT_INSTALL_PACKAGES=\"${APT_INSTALL_PACKAGES} mc nano redis-tools iperf3 iftop htop rng-tools python3-pip python3-pil\"\nAPT_INSTALL_PACKAGES=\"${APT_INSTALL_PACKAGES} python3-smbus python3-rpi.gpio python3-psutil i2c-tools fonts-freefont-ttf\"\nAPT_INSTALL_PACKAGES=\"${APT_INSTALL_PACKAGES} ifenslave build-essential cmake flex bison gdb autoconf automake gcc-9\"\nAPT_INSTALL_PACKAGES=\"${APT_INSTALL_PACKAGES} g++-9 gdb gdbserver lcov ca-certificates libraspberrypi-bin\"\n\n\n# apparmor-disable\n# ---\n# APPARMOR_DISABLE                  Set to 1 to disable apparmor\n#\nAPPARMOR_DISABLE=1\n\n\n# sshd-configure\n# ---\n# NO CONFIG PARAMETER SUPPORTED\n#\n\n\n# users-configure\n# ---\n# Supported params ({X} and {Y} are indexes from 0 onwards, must be sequential)\n# USER_{X}_NAME                     User name of the user to create\n# USER_{X}_CREATE_HOME              If set to 1, creates the home directory\n# USER_{X}_SUDO_NOPASSWD            If set to 1, set the NOPASSWD flag in sudo for the user\n# USER_{X}_GROUP                    If not specified the default will be used\n# USER_{X}_GROUPS                   Additional user groups (comma separated, no whitespaces!)\n# USER_{X}_ADD_CREATE_OPTS_OVERRIDE Override ALL the create options (to specificy different home, comments, etc.)\n# USER_{X}_SSH_AUTH_KEYS_{Y}        Pre-authorised ssh keys\n#\nUSER_0_NAME=\"ubuntu\"\nUSER_0_CREATE_HOME=1\nUSER_0_SUDO_NOPASSWD=1\nUSER_0_SHELL=\"/bin/bash\"\nUSER_0_GROUP=\"\"\nUSER_0_GROUPS=\"adm,audio,cdrom,dialout,dip,floppy,lxd,netdev,plugdev,sudo,video\"\nUSER_0_ADD_CREATE_OPTS_OVERRIDE=\"\"\nUSER_0_SSH_AUTH_KEYS_0=\"__YOUR_SSH_PUB_KEY__\"\n\n\n# microk8s-join-configure\n# ---\n# MICROK8S_JOIN_REMOTE_USER\n# MICROK8S_JOIN_MASTER_HOSTNAME\n# MICROK8S_JOIN_REMOTE_USER_SSH_KEY_BASE64\n# ---\n# PRECONFIGURATION (on master node)\n# ---\n# useradd -m -c \"microk8s - remote add node user\" -G microk8s microk8s-remote-add-node-user\n# ssh-keygen -fmicrok8s-remote-add-node-user-key -t ed25519 -b 2096 -C \"microk8s-remote-add-node-user-key@$(hostname)\" -q -N ''\n# mkdir ~microk8s-remote-add-node-user/.ssh\n# chown microk8s-remote-add-node-user.microk8s-remote-add-node-user ~microk8s-remote-add-node-user/.ssh\n# chmod 700 ~microk8s-remote-add-node-user/.ssh\n# cp microk8s-remote-add-node-user-key.pub ~microk8s-remote-add-node-user/.ssh/authorized_keys\n# chown microk8s-remote-add-node-user.microk8s-remote-add-node-user ~microk8s-remote-add-node-user/.ssh/authorized_keys\n# chmod 600 ~microk8s-remote-add-node-user/.ssh/authorized_keys\n#\n# Update the configuration as follow\n# MICROK8S_JOIN_REMOTE_USER to microk8s-remote-add-node-user\n# MICROK8S_JOIN_MASTER_HOSTNAME to __MASTER_NODE_HOSTNAME__\n# MICROK8S_JOIN_REMOTE_USER_SSH_KEY_BASE64 to $(cat microk8s-remote-add-node-user-key | base64 -w0)\n\n# \nMICROK8S_JOIN_REMOTE_USER=\"\"\nMICROK8S_JOIN_MASTER_HOSTNAME=\"\"\nMICROK8S_JOIN_REMOTE_USER_SSH_KEY_BASE64=\"\"\n```\n\n## Example logs\n\nBelow it's possible to find an example log produced by cluster-node-init running in systemd, it's from a node that has already performed the first boot.\n\n```\nJan 10 00:05:58 localhost cluster-node-init.sh[1626]: [Sun Jan 10 00:05:58 2021][INFO] cluster-node-init.sh v0.1\nJan 10 00:05:58 localhost cluster-node-init.sh[1626]: [Sun Jan 10 00:05:58 2021][INFO] Daniele Albano \u003cd.albano@gmail.com\u003e\nJan 10 00:05:58 localhost cluster-node-init.sh[1626]: [Sun Jan 10 00:05:58 2021][INFO] ---\nJan 10 00:05:58 localhost cluster-node-init.sh[1626]: [Sun Jan 10 00:05:58 2021][INFO] The modules directory path is \u003c/opt/cluster-node-init/modules.d\u003e\nJan 10 00:05:58 localhost cluster-node-init.sh[1626]: [Sun Jan 10 00:05:58 2021][INFO] The config file path is \u003c/opt/cluster-node-init/config.env\u003e\nJan 10 00:05:58 localhost cluster-node-init.sh[1626]: [Sun Jan 10 00:05:58 2021][INFO] Loading configuration\nJan 10 00:05:58 localhost cluster-node-init.sh[1626]: [Sun Jan 10 00:05:58 2021][INFO] Configuration loaded\nJan 10 00:05:58 localhost cluster-node-init.sh[1626]: [Sun Jan 10 00:05:58 2021][INFO] Searching modules \u003c remove-cloud-init hostname-configure disks-configure timezone-configure keep-vt-logs-console network-configure apt-configure apt-update apt-upgrade apt-install-packages snap-install-packages ntp-configure apparmor-disable sshd-configure users-configure print-info\u003e\nJan 10 00:05:58 localhost cluster-node-init.sh[1626]: /opt/cluster-node-init/cluster-node-init.sh: line 93: `$MODULE_NAME': not a valid identifier\nJan 10 00:05:58 localhost cluster-node-init.sh[1626]: [Sun Jan 10 00:05:58 2021][INFO] All requested modules are available\nJan 10 00:05:58 localhost cluster-node-init.sh[1626]: [Sun Jan 10 00:05:58 2021][INFO] Starting \u003cremove-cloud-init\u003e, retry \u003c1\u003e of \u003c3\u003e\nJan 10 00:05:58 localhost cluster-node-init.sh[1696]: [Sun Jan 10 00:05:58 2021][INFO][remove-cloud-init] Removing the \u003ccloud-init\u003e package\nJan 10 00:05:59 localhost cluster-node-init.sh[1711]: dpkg: warning: ignoring request to remove cloud-init which isn't installed\nJan 10 00:05:59 localhost cluster-node-init.sh[1626]: [Sun Jan 10 00:05:59 2021][INFO] Module executed successfully\nJan 10 00:05:59 localhost cluster-node-init.sh[1626]: [Sun Jan 10 00:05:59 2021][INFO] Starting \u003chostname-configure\u003e, retry \u003c1\u003e of \u003c3\u003e\nJan 10 00:05:59 localhost cluster-node-init.sh[1721]: [Sun Jan 10 00:05:59 2021][INFO][hostname-configure] Running cmd \u003cecho 'rpi4-3f4f044e'\u003e to determine hostname\nJan 10 00:05:59 localhost cluster-node-init.sh[1721]: [Sun Jan 10 00:05:59 2021][INFO][hostname-configure] Current hostname matches \u003crpi4-3f4f044e\u003e, don't update the current configuration\nJan 10 00:05:59 localhost cluster-node-init.sh[1770]: RTNETLINK answers: File exists\nJan 10 00:06:00 localhost cluster-node-init.sh[1626]: [Sun Jan 10 00:06:00 2021][INFO] Module executed successfully\nJan 10 00:06:00 localhost cluster-node-init.sh[1626]: [Sun Jan 10 00:06:00 2021][INFO] Starting \u003cdisks-configure\u003e, retry \u003c1\u003e of \u003c3\u003e\nJan 10 00:06:00 localhost cluster-node-init.sh[1802]: [Sun Jan 10 00:06:00 2021][INFO][disks-configure] Creating new partition of size \u003c4G\u003e and type \u003cswap\u003e on \u003c/dev/sda\u003e\nJan 10 00:06:00 localhost cluster-node-init.sh[1843]: Partition #1 contains a swap signature.\nJan 10 00:06:01 localhost cluster-node-init.sh[1802]: [Sun Jan 10 00:06:01 2021][INFO][disks-configure] Partition created\nJan 10 00:06:01 localhost cluster-node-init.sh[1802]: [Sun Jan 10 00:06:01 2021][INFO][disks-configure] Creating filesystem \u003cswap\u003e with UUID \u003c3bbc3ae1-18b4-4f89-9b73-c55c70b9c1d0\u003e on \u003c/dev/sda1\u003e\nJan 10 00:06:01 localhost cluster-node-init.sh[1872]: mkswap: /dev/sda1: warning: wiping old swap signature.\nJan 10 00:06:01 localhost cluster-node-init.sh[1802]: [Sun Jan 10 00:06:01 2021][INFO][disks-configure] Filesystem created\nJan 10 00:06:01 localhost cluster-node-init.sh[1802]: [Sun Jan 10 00:06:01 2021][INFO][disks-configure] Adding \u003c/dev/sda1\u003e with UUID \u003c3bbc3ae1-18b4-4f89-9b73-c55c70b9c1d0\u003e to /etc/fstab\nJan 10 00:06:01 localhost cluster-node-init.sh[1802]: [Sun Jan 10 00:06:01 2021][INFO][disks-configure] Activating swap for \u003c/dev/sda1\u003e with UUID \u003c3bbc3ae1-18b4-4f89-9b73-c55c70b9c1d0\u003e\nJan 10 00:06:01 localhost cluster-node-init.sh[1802]: [Sun Jan 10 00:06:01 2021][INFO][disks-configure] Swap activated\nJan 10 00:06:01 localhost cluster-node-init.sh[1802]: [Sun Jan 10 00:06:01 2021][INFO][disks-configure] Creating new partition of size \u003call\u003e and type \u003cext4\u003e on \u003c/dev/sda\u003e\nJan 10 00:06:01 localhost cluster-node-init.sh[1917]: Partition #2 contains a ext4 signature.\nJan 10 00:06:01 localhost cluster-node-init.sh[1802]: [Sun Jan 10 00:06:01 2021][INFO][disks-configure] Partition created\nJan 10 00:06:01 localhost cluster-node-init.sh[1802]: [Sun Jan 10 00:06:01 2021][INFO][disks-configure] Creating filesystem \u003cext4\u003e with UUID \u003cb25161e9-a64e-4779-8452-a132bd26b800\u003e on \u003c/dev/sda2\u003e\nJan 10 00:06:01 localhost cluster-node-init.sh[1927]: mke2fs 1.45.6 (20-Mar-2020)\nJan 10 00:06:03 localhost cluster-node-init.sh[1802]: [Sun Jan 10 00:06:03 2021][INFO][disks-configure] Filesystem created\nJan 10 00:06:03 localhost cluster-node-init.sh[1802]: [Sun Jan 10 00:06:03 2021][INFO][disks-configure] Adding \u003c/dev/sda2\u003e with UUID \u003cb25161e9-a64e-4779-8452-a132bd26b800\u003e to /etc/fstab\nJan 10 00:06:03 localhost cluster-node-init.sh[1802]: [Sun Jan 10 00:06:03 2021][INFO][disks-configure] Mounting \u003c/mnt/data\u003e with UUID \u003cb25161e9-a64e-4779-8452-a132bd26b800\u003e\nJan 10 00:06:03 localhost cluster-node-init.sh[1802]: [Sun Jan 10 00:06:03 2021][INFO][disks-configure] Mounted\nJan 10 00:06:03 localhost cluster-node-init.sh[1626]: [Sun Jan 10 00:06:03 2021][INFO] Module executed successfully\nJan 10 00:06:03 localhost cluster-node-init.sh[1626]: [Sun Jan 10 00:06:03 2021][INFO] Starting \u003ctimezone-configure\u003e, retry \u003c1\u003e of \u003c3\u003e\nJan 10 00:06:03 localhost cluster-node-init.sh[1972]: [Sun Jan 10 00:06:03 2021][INFO][timezone-configure] TODO\nJan 10 00:06:03 localhost cluster-node-init.sh[1626]: [Sun Jan 10 00:06:03 2021][INFO] Module executed successfully\nJan 10 00:06:03 localhost cluster-node-init.sh[1626]: [Sun Jan 10 00:06:03 2021][INFO] Starting \u003ckeep-vt-logs-console\u003e, retry \u003c1\u003e of \u003c3\u003e\nJan 10 00:06:03 localhost cluster-node-init.sh[1983]: [Sun Jan 10 00:06:03 2021][INFO][keep-vt-logs-console] The parameter \u003cTTYVTDisallocate\u003e for \u003cgetty@tty1\u003e is already set to \u003cno\u003e\nJan 10 00:06:03 localhost cluster-node-init.sh[1626]: [Sun Jan 10 00:06:03 2021][INFO] Module executed successfully\nJan 10 00:06:03 localhost cluster-node-init.sh[1626]: [Sun Jan 10 00:06:03 2021][INFO] Starting \u003cnetwork-configure\u003e, retry \u003c1\u003e of \u003c3\u003e\nJan 10 00:06:03 localhost cluster-node-init.sh[1996]: [Sun Jan 10 00:06:03 2021][INFO][network-configure] TODO\nJan 10 00:06:03 localhost cluster-node-init.sh[1626]: [Sun Jan 10 00:06:03 2021][INFO] Module executed successfully\nJan 10 00:06:03 localhost cluster-node-init.sh[1626]: [Sun Jan 10 00:06:03 2021][INFO] Starting \u003capt-configure\u003e, retry \u003c1\u003e of \u003c3\u003e\nJan 10 00:06:03 localhost cluster-node-init.sh[2007]: [Sun Jan 10 00:06:03 2021][INFO][apt-configure] TODO\nJan 10 00:06:04 localhost cluster-node-init.sh[1626]: [Sun Jan 10 00:06:04 2021][INFO] Module executed successfully\nJan 10 00:06:04 localhost cluster-node-init.sh[1626]: [Sun Jan 10 00:06:04 2021][INFO] Starting \u003capt-update\u003e, retry \u003c1\u003e of \u003c3\u003e\nJan 10 00:06:04 localhost cluster-node-init.sh[2018]: [Sun Jan 10 00:06:04 2021][INFO][apt-update] Apt cache updated \u003c9013\u003e seconds ago\nJan 10 00:06:04 localhost cluster-node-init.sh[2018]: [Sun Jan 10 00:06:04 2021][INFO][apt-update] Skipping package cache update, last update less than \u003c86400\u003e seconds ago\nJan 10 00:06:04 localhost cluster-node-init.sh[1626]: [Sun Jan 10 00:06:04 2021][INFO] Module executed successfully\nJan 10 00:06:04 localhost cluster-node-init.sh[1626]: [Sun Jan 10 00:06:04 2021][INFO] Starting \u003capt-upgrade\u003e, retry \u003c1\u003e of \u003c3\u003e\nJan 10 00:06:07 localhost cluster-node-init.sh[2040]: linux-image-raspi set on hold.\nJan 10 00:06:07 localhost cluster-node-init.sh[2040]: linux-headers-raspi set on hold.\nJan 10 00:06:07 localhost cluster-node-init.sh[2040]: linux-firmware set on hold.\nJan 10 00:06:07 localhost cluster-node-init.sh[2032]: [Sun Jan 10 00:06:07 2021][INFO][apt-upgrade] Installing updates (if any)\nJan 10 00:06:07 localhost cluster-node-init.sh[2049]: WARNING: apt does not have a stable CLI interface. Use with caution in scripts.\nJan 10 00:06:09 localhost cluster-node-init.sh[2049]: Reading package lists...\nJan 10 00:06:10 localhost cluster-node-init.sh[2049]: Building dependency tree...\nJan 10 00:06:10 localhost cluster-node-init.sh[2049]: Reading state information...\nJan 10 00:06:10 localhost cluster-node-init.sh[2049]: Calculating upgrade...\nJan 10 00:06:11 localhost cluster-node-init.sh[2049]: 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.\nJan 10 00:06:11 localhost cluster-node-init.sh[2032]: [Sun Jan 10 00:06:11 2021][INFO][apt-upgrade] Autoremoving old packages (if any)\nJan 10 00:06:11 localhost cluster-node-init.sh[2056]: WARNING: apt does not have a stable CLI interface. Use with caution in scripts.\nJan 10 00:06:12 localhost cluster-node-init.sh[2056]: Reading package lists...\nJan 10 00:06:13 localhost cluster-node-init.sh[2056]: Building dependency tree...\nJan 10 00:06:13 localhost cluster-node-init.sh[2056]: Reading state information...\nJan 10 00:06:14 localhost cluster-node-init.sh[2056]: 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.\nJan 10 00:06:15 localhost cluster-node-init.sh[2191]: Canceled hold on linux-image-raspi.\nJan 10 00:06:15 localhost cluster-node-init.sh[2191]: Canceled hold on linux-headers-raspi.\nJan 10 00:06:15 localhost cluster-node-init.sh[2191]: Canceled hold on linux-firmware.\nJan 10 00:06:15 localhost cluster-node-init.sh[1626]: [Sun Jan 10 00:06:15 2021][INFO] Module executed successfully\nJan 10 00:06:15 localhost cluster-node-init.sh[1626]: [Sun Jan 10 00:06:15 2021][INFO] Starting \u003capt-install-packages\u003e, retry \u003c1\u003e of \u003c3\u003e\nJan 10 00:06:15 localhost cluster-node-init.sh[2199]: [Sun Jan 10 00:06:15 2021][INFO][apt-install-packages] Installing packages \u003c mc nano redis-tools iperf3 iftop htop rng-tools python3-pip python3-pil python3-smbus python3-rpi.gpio python3-psutil i2c-tools fonts-freefont-ttf ifenslave build-essential cmake flex bison gdb autoconf automake gcc-9 g++-9 gdb gdbserver lcov ca-certificates libraspberrypi-bin\u003e\nJan 10 00:06:15 localhost cluster-node-init.sh[2207]: WARNING: apt does not have a stable CLI interface. Use with caution in scripts.\nJan 10 00:06:17 localhost cluster-node-init.sh[2207]: Reading package lists...\nJan 10 00:06:17 localhost cluster-node-init.sh[2207]: Building dependency tree...\nJan 10 00:06:17 localhost cluster-node-init.sh[2207]: Reading state information...\nJan 10 00:06:18 localhost cluster-node-init.sh[2207]: autoconf is already the newest version (2.69-11.1).\nJan 10 00:06:18 localhost cluster-node-init.sh[2207]: automake is already the newest version (1:1.16.2-4ubuntu1).\nJan 10 00:06:18 localhost cluster-node-init.sh[2207]: bison is already the newest version (2:3.7+dfsg-1).\nJan 10 00:06:18 localhost cluster-node-init.sh[2207]: build-essential is already the newest version (12.8ubuntu3).\nJan 10 00:06:18 localhost cluster-node-init.sh[2207]: cmake is already the newest version (3.16.3-3ubuntu2).\nJan 10 00:06:18 localhost cluster-node-init.sh[2207]: flex is already the newest version (2.6.4-8).\nJan 10 00:06:19 localhost cluster-node-init.sh[2207]: fonts-freefont-ttf is already the newest version (20120503-10).\nJan 10 00:06:19 localhost cluster-node-init.sh[2207]: gdb is already the newest version (9.2-0ubuntu2).\nJan 10 00:06:19 localhost cluster-node-init.sh[2207]: gdbserver is already the newest version (9.2-0ubuntu2).\nJan 10 00:06:19 localhost cluster-node-init.sh[2207]: htop is already the newest version (3.0.2-1).\nJan 10 00:06:19 localhost cluster-node-init.sh[2207]: nano is already the newest version (5.2-1).\nJan 10 00:06:19 localhost cluster-node-init.sh[2207]: python3-pil is already the newest version (7.2.0-1).\nJan 10 00:06:19 localhost cluster-node-init.sh[2207]: python3-psutil is already the newest version (5.7.2-1).\nJan 10 00:06:19 localhost cluster-node-init.sh[2207]: g++-9 is already the newest version (9.3.0-18ubuntu1).\nJan 10 00:06:19 localhost cluster-node-init.sh[2207]: gcc-9 is already the newest version (9.3.0-18ubuntu1).\nJan 10 00:06:19 localhost cluster-node-init.sh[2207]: i2c-tools is already the newest version (4.1-2build2).\nJan 10 00:06:19 localhost cluster-node-init.sh[2207]: ifenslave is already the newest version (2.10ubuntu3).\nJan 10 00:06:19 localhost cluster-node-init.sh[2207]: iftop is already the newest version (1.0~pre4-7).\nJan 10 00:06:19 localhost cluster-node-init.sh[2207]: iperf3 is already the newest version (3.7-3).\nJan 10 00:06:19 localhost cluster-node-init.sh[2207]: lcov is already the newest version (1.14-2).\nJan 10 00:06:19 localhost cluster-node-init.sh[2207]: libraspberrypi-bin is already the newest version (0~20200520+git2fe4ca3-0ubuntu2).\nJan 10 00:06:19 localhost cluster-node-init.sh[2207]: mc is already the newest version (3:4.8.25-1).\nJan 10 00:06:19 localhost cluster-node-init.sh[2207]: python3-pip is already the newest version (20.1.1-2).\nJan 10 00:06:19 localhost cluster-node-init.sh[2207]: python3-rpi.gpio is already the newest version (0.7.0-0.2).\nJan 10 00:06:19 localhost cluster-node-init.sh[2207]: python3-smbus is already the newest version (4.1-2build2).\nJan 10 00:06:19 localhost cluster-node-init.sh[2207]: redis-tools is already the newest version (5:6.0.6-1).\nJan 10 00:06:19 localhost cluster-node-init.sh[2207]: rng-tools is already the newest version (5-1ubuntu2).\nJan 10 00:06:19 localhost cluster-node-init.sh[2207]: ca-certificates is already the newest version (20201027ubuntu0.20.10.1).\nJan 10 00:06:19 localhost cluster-node-init.sh[2207]: 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.\nJan 10 00:06:19 localhost cluster-node-init.sh[1626]: [Sun Jan 10 00:06:18 2021][INFO] Module executed successfully\nJan 10 00:06:19 localhost cluster-node-init.sh[1626]: [Sun Jan 10 00:06:18 2021][INFO] Starting \u003csnap-install-packages\u003e, retry \u003c1\u003e of \u003c3\u003e\nJan 10 00:06:19 localhost cluster-node-init.sh[1626]: [Sun Jan 10 00:06:19 2021][INFO] Module executed successfully\nJan 10 00:06:19 localhost cluster-node-init.sh[1626]: [Sun Jan 10 00:06:19 2021][INFO] Starting \u003cntp-configure\u003e, retry \u003c1\u003e of \u003c3\u003e\nJan 10 00:06:19 localhost cluster-node-init.sh[2260]: [Sun Jan 10 00:06:19 2021][INFO][ntp-configure] TODO\nJan 10 00:06:19 localhost cluster-node-init.sh[1626]: [Sun Jan 10 00:06:19 2021][INFO] Module executed successfully\nJan 10 00:06:19 localhost cluster-node-init.sh[1626]: [Sun Jan 10 00:06:19 2021][INFO] Starting \u003capparmor-disable\u003e, retry \u003c1\u003e of \u003c3\u003e\nJan 10 00:06:19 localhost cluster-node-init.sh[2278]: [Sun Jan 10 00:06:19 2021][VERBOSE][apparmor-disable] The service \u003capparmor\u003e is not running\nJan 10 00:06:19 localhost cluster-node-init.sh[1626]: [Sun Jan 10 00:06:19 2021][INFO] Module executed successfully\nJan 10 00:06:19 localhost cluster-node-init.sh[1626]: [Sun Jan 10 00:06:19 2021][INFO] Starting \u003csshd-configure\u003e, retry \u003c1\u003e of \u003c3\u003e\nJan 10 00:06:19 localhost cluster-node-init.sh[2285]: [Sun Jan 10 00:06:19 2021][INFO][sshd-configure] SSH daemon host keys already existing, nothing to do\nJan 10 00:06:19 localhost cluster-node-init.sh[1626]: [Sun Jan 10 00:06:19 2021][INFO] Module executed successfully\nJan 10 00:06:19 localhost cluster-node-init.sh[1626]: [Sun Jan 10 00:06:19 2021][INFO] Starting \u003cusers-configure\u003e, retry \u003c1\u003e of \u003c3\u003e\nJan 10 00:06:19 localhost cluster-node-init.sh[2299]: [Sun Jan 10 00:06:19 2021][INFO][users-configure] User \u003cdaalbano\u003e already existing, skipping creation but syncing settings\nJan 10 00:06:19 localhost cluster-node-init.sh[2299]: [Sun Jan 10 00:06:19 2021][INFO][users-configure] Shell \u003c/bin/bash\u003e requested\nJan 10 00:06:19 localhost cluster-node-init.sh[2299]: [Sun Jan 10 00:06:19 2021][INFO][users-configure] User additional groups set to \u003cadm,audio,cdrom,dialout,dip,floppy,lxd,netdev,plugdev,sudo,video\u003e\nJan 10 00:06:19 localhost cluster-node-init.sh[2299]: [Sun Jan 10 00:06:19 2021][INFO][users-configure] Syncing user settings\nJan 10 00:06:19 localhost cluster-node-init.sh[2299]: [Sun Jan 10 00:06:19 2021][INFO][users-configure] User settings synced\nJan 10 00:06:19 localhost cluster-node-init.sh[2299]: [Sun Jan 10 00:06:19 2021][INFO][users-configure] Sudo NOPASSWD flag for the user already set, skipping\nJan 10 00:06:20 localhost cluster-node-init.sh[2299]: [Sun Jan 10 00:06:20 2021][INFO][users-configure] User \u003cdaalbano\u003e has already auth key \u003c0\u003e, skipping creation\nJan 10 00:06:20 localhost cluster-node-init.sh[1626]: [Sun Jan 10 00:06:20 2021][INFO] Module executed successfully\nJan 10 00:06:20 localhost cluster-node-init.sh[1626]: [Sun Jan 10 00:06:20 2021][INFO] Starting \u003cprint-info\u003e, retry \u003c1\u003e of \u003c3\u003e\nJan 10 00:06:20 localhost cluster-node-init.sh[2335]: [Sun Jan 10 00:06:20 2021][INFO][print-info] Hostname\nJan 10 00:06:20 localhost cluster-node-init.sh[2335]: [Sun Jan 10 00:06:20 2021][INFO][print-info] \u003e rpi4-3f4f044e\nJan 10 00:06:20 localhost cluster-node-init.sh[2335]: [Sun Jan 10 00:06:20 2021][INFO][print-info]\nJan 10 00:06:20 localhost cluster-node-init.sh[2335]: [Sun Jan 10 00:06:20 2021][INFO][print-info] IP Address(es)\nJan 10 00:06:20 localhost cluster-node-init.sh[2335]: [Sun Jan 10 00:06:20 2021][INFO][print-info] \u003e eth0\nJan 10 00:06:20 localhost cluster-node-init.sh[2335]: [Sun Jan 10 00:06:20 2021][INFO][print-info] * 192.168.255.115/24\nJan 10 00:06:20 localhost cluster-node-init.sh[2335]: [Sun Jan 10 00:06:20 2021][INFO][print-info] * fe80::dea6:32ff:fec3:c14/64\nJan 10 00:06:20 localhost cluster-node-init.sh[2335]: [Sun Jan 10 00:06:20 2021][INFO][print-info]\nJan 10 00:06:20 localhost cluster-node-init.sh[2335]: [Sun Jan 10 00:06:20 2021][INFO][print-info] SSH host keys\nJan 10 00:06:20 localhost cluster-node-init.sh[2335]: [Sun Jan 10 00:06:20 2021][INFO][print-info] \u003e ssh_host_ecdsa_key.pub\nJan 10 00:06:20 localhost cluster-node-init.sh[2335]: [Sun Jan 10 00:06:20 2021][INFO][print-info] \u003e __HIDDEN__\nJan 10 00:06:20 localhost cluster-node-init.sh[2335]: [Sun Jan 10 00:06:20 2021][INFO][print-info]\nJan 10 00:06:20 localhost cluster-node-init.sh[2335]: [Sun Jan 10 00:06:20 2021][INFO][print-info] \u003e ssh_host_ed25519_key.pub\nJan 10 00:06:20 localhost cluster-node-init.sh[2335]: [Sun Jan 10 00:06:20 2021][INFO][print-info] \u003e __HIDDEN__\nJan 10 00:06:20 localhost cluster-node-init.sh[2335]: [Sun Jan 10 00:06:20 2021][INFO][print-info]\nJan 10 00:06:20 localhost cluster-node-init.sh[2335]: [Sun Jan 10 00:06:20 2021][INFO][print-info] \u003e ssh_host_rsa_key.pub\nJan 10 00:06:20 localhost cluster-node-init.sh[2335]: [Sun Jan 10 00:06:20 2021][INFO][print-info] \u003e __HIDDEN__\nJan 10 00:06:20 localhost cluster-node-init.sh[2335]: [Sun Jan 10 00:06:20 2021][INFO][print-info]\nJan 10 00:06:20 localhost cluster-node-init.sh[1626]: [Sun Jan 10 00:06:20 2021][INFO] Module executed successfully\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielealbano%2Fcluster-node-init","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanielealbano%2Fcluster-node-init","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielealbano%2Fcluster-node-init/lists"}