diff -Nru openstack-debian-images-1.65/build-openstack-debian-image openstack-debian-images-1.66/build-openstack-debian-image --- openstack-debian-images-1.65/build-openstack-debian-image 2021-10-08 09:47:58.000000000 +0000 +++ openstack-debian-images-1.66/build-openstack-debian-image 2021-11-13 10:09:29.000000000 +0000 @@ -72,6 +72,7 @@ --grab-release-number --octavia-agent --manila-agent + --trove-agent --extrepo --newer-qemu --no-qcow2 @@ -427,6 +428,11 @@ AGENT_NAME=manila shift ;; + "--trove-agent") + SETUP_TROVE_AGENT=yes + AGENT_NAME=TROVE + shift + ;; "--extrepo") if [ -z "${2}" ] ; then echo "No parameter for --extrepo." @@ -570,7 +576,7 @@ if [ -z "${OUTPUT}" ] ; then if [ -n "${RELEASE_VERSION}" ] && [ -n "${MINOR_VERSION}" ] ; then if [ "${MINOR_VERSION}" = 0 ] ; then - if [ "${SETUP_OCTAVIA_AGENT}" = "yes" ] || [ "${SETUP_MANILA_AGENT}" = "yes" ]; then + if [ "${SETUP_OCTAVIA_AGENT}" = "yes" ] || [ "${SETUP_MANILA_AGENT}" = "yes" ] || [ "${SETUP_TROVE_AGENT}" = "yes" ] ; then if [ "${SETUP_EXTREPO}" = "yes" ] ; then OUTPUT=debian-${RELEASE}-${EXTREPO_FLAVOR}-${AGENT_NAME}-${RELEASE_VERSION}.${MINOR_VERSION}-${ARCH} else @@ -580,7 +586,7 @@ OUTPUT=debian-${RELEASE}-${RELEASE_VERSION}.${MINOR_VERSION}-${ARCH} fi else - if [ "${SETUP_OCTAVIA_AGENT}" = "yes" ] || [ "${SETUP_MANILA_AGENT}" = "yes" ]; then + if [ "${SETUP_OCTAVIA_AGENT}" = "yes" ] || [ "${SETUP_MANILA_AGENT}" = "yes" ] || [ "${SETUP_TROVE_AGENT}" = "yes" ]; then if [ "${SETUP_EXTREPO}" = "yes" ] ; then OUTPUT=debian-${RELEASE}-${EXTREPO_FLAVOR}-${AGENT_NAME}-${RELEASE_VERSION}.${MINOR_VERSION}-$(TZ=UTC date '+%Y%m%d')-${ARCH} else @@ -592,13 +598,13 @@ fi else if [ "${RELEASE_NUM}" = "sid" ] ; then - if [ "${SETUP_OCTAVIA_AGENT}" = "yes" ] || [ "${SETUP_MANILA_AGENT}" = "yes" ]; then + if [ "${SETUP_OCTAVIA_AGENT}" = "yes" ] || [ "${SETUP_MANILA_AGENT}" = "yes" ] || [ "${SETUP_TROVE_AGENT}" = "yes" ]; then OUTPUT=debian-${RELEASE}-${AGENT_NAME}-$(TZ=UTC date '+%Y.%m.%d-%H.%M')-${ARCH} else OUTPUT=debian-${RELEASE}-$(TZ=UTC date '+%Y.%m.%d-%H.%M')-${ARCH} fi else - if [ "${SETUP_OCTAVIA_AGENT}" = "yes" ] || [ "${SETUP_MANILA_AGENT}" = "yes" ]; then + if [ "${SETUP_OCTAVIA_AGENT}" = "yes" ] || [ "${SETUP_MANILA_AGENT}" = "yes" ] || [ "${SETUP_TROVE_AGENT}" = "yes" ]; then if [ "${SETUP_EXTREPO}" = "yes" ] ; then OUTPUT=debian-${RELEASE}-${RELEASE_NUM}-${EXTREPO_FLAVOR}-${AGENT_NAME}-$(TZ=UTC date '+%Y.%m.%d-%H.%M')-${ARCH} else @@ -2124,7 +2130,7 @@ GRUB_DISABLE_OS_PROBER=true" >>${MOUNT_DIR}/etc/default/grub if [ "${SERIAL_CONSOLE}" = "yes" ] ; then - echo "GRUB_TERMINAL=serial + echo "GRUB_TERMINAL=\"console serial\" GRUB_SERIAL_COMMAND=\"serial --unit=1 --speed=115200 --word=8 --parity=no --stop=1\" " >>${MOUNT_DIR}/etc/default/grub fi @@ -2225,6 +2231,30 @@ # chroot ${MOUNT_DIR} apt-get install -y manila-share fi +if [ "${SETUP_TROVE_AGENT}" = "yes" ] ; then + chroot ${MOUNT_DIR} DEBIAN_FRONTEND=noninteractive apt-get install -y trove-guestagent acl apparmor apt-transport-https build-essential cloud-guest-utils anacron dbus dmeventd ethtool gpg-agent iptables iptables-persistent libxml2-dev libxslt1-dev libffi-dev libssl-dev libyaml-dev less logrotate netbase open-vm-tools openssh-client openssh-server pollinate psmisc python3-dev python3-pip python3-setuptools python3-sqlalchemy python3-venv rsync rsyslog ureadahead uuid-runtime sudo ca-certificates +# Useful only when testing +# # Enable ssh as root in the image +# sed -i "s/disable_root: true/disable_root: false/" ${MOUNT_DIR}/etc/cloud/cloud.cfg +# sed -i 's/[#]PasswordAuthentication .*/PasswordAuthentication yes/' ${MOUNT_DIR}/etc/ssh/sshd_config +# sed -i 's/[#]PermitRootLogin .*/PermitRootLogin yes/' ${MOUNT_DIR}/etc/ssh/sshd_config +# # Allow password auth in the client +# sed -i 's/[# ]*PasswordAuthentication .*/ PasswordAuthentication yes/' ${MOUNT_DIR}/etc/ssh/ssh_config + + # Add docker + chroot ${MOUNT_DIR} DEBIAN_FRONTEND=noninteractive apt-get install -y docker.io + # Add the trove username to docker group + chroot ${MOUNT_DIR} usermod -aG docker trove + + # Add ip forwarding + sed -i -r 's/^\s*#(net\.ipv4\.ip_forward=1.*)/\1/' ${MOUNT_DIR}/etc/sysctl.conf + + # /etc/sudoers.d/60_trove_guest + echo "trove ALL=(ALL) NOPASSWD:ALL" >${MOUNT_DIR}/etc/sudoers.d/60_trove_guest + chmod 0440 ${MOUNT_DIR}/etc/sudoers.d/60_trove_guest + chown root:root ${MOUNT_DIR}/etc/sudoers.d/60_trove_guest +fi + ################### ### HOOK SCRIPT ### ################### diff -Nru openstack-debian-images-1.65/build-openstack-debian-image.1 openstack-debian-images-1.66/build-openstack-debian-image.1 --- openstack-debian-images-1.65/build-openstack-debian-image.1 2021-10-08 09:47:58.000000000 +0000 +++ openstack-debian-images-1.66/build-openstack-debian-image.1 2021-11-13 10:09:29.000000000 +0000 @@ -189,6 +189,18 @@ that will be used for HA proxy based Load Balancer as a Service. .LP +.B \-\-manila\-agent +.IP + +Install the Manila agent in order to build OpenStack Manila share image. + +.LP +.B \-\-trove\-agent +.IP + +Install the Trove agent in order to build the OpenStack Trove image. + +.LP .B \-\-extrepo .I .IP diff -Nru openstack-debian-images-1.65/debian/changelog openstack-debian-images-1.66/debian/changelog --- openstack-debian-images-1.65/debian/changelog 2021-10-08 09:47:58.000000000 +0000 +++ openstack-debian-images-1.66/debian/changelog 2021-11-13 10:09:29.000000000 +0000 @@ -1,3 +1,11 @@ +openstack-debian-images (1.66) unstable; urgency=medium + + * Add rudimentary Trove image support. + * Set GRUB_TERMINAL="console serial" not just serial when given the option to + setup the console on serial. + + -- Thomas Goirand Sat, 13 Nov 2021 11:09:29 +0100 + openstack-debian-images (1.65) unstable; urgency=medium * Always install the -backports repository, and add a new option to install