From owner-svn-src-all@freebsd.org Wed Dec 14 03:01:17 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1347EC76197; Wed, 14 Dec 2016 03:01:17 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BEFBC10F3; Wed, 14 Dec 2016 03:01:16 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBE31FKE072874; Wed, 14 Dec 2016 03:01:15 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBE31Fc7072873; Wed, 14 Dec 2016 03:01:15 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201612140301.uBE31Fc7072873@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 14 Dec 2016 03:01:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r310047 - head/release/tools X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Dec 2016 03:01:17 -0000 Author: gjb Date: Wed Dec 14 03:01:15 2016 New Revision: 310047 URL: https://svnweb.freebsd.org/changeset/base/310047 Log: - Resize FreeBSD to the size of the OpenStack flavor (growfs). - Speeds up the boot process by disabling sendmail. - Allows an user to ssh as root with a public key. - Make ssh(1) respond faster by disabling DNS lookups. - Enable DHCP on the vtnet(4) interface. Note: The CLOUDWARE list has not yet been changed to include the OpenStack target by default yet. Submitted by: Diego Casati PR: 215258 MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/release/tools/openstack.conf Modified: head/release/tools/openstack.conf ============================================================================== --- head/release/tools/openstack.conf Wed Dec 14 00:21:06 2016 (r310046) +++ head/release/tools/openstack.conf Wed Dec 14 03:01:15 2016 (r310047) @@ -11,8 +11,25 @@ export VM_EXTRA_PACKAGES="net/cloud-init # Set to a list of third-party software to enable in rc.conf(5). export VM_RC_LIST="cloudinit" +export NOSWAP=YES + vm_extra_pre_umount() { + #Enable sshd by default echo 'sshd_enable="YES"' >> ${DESTDIR}/etc/rc.conf + + # Disable DNS lookups by default to make SSH connect quickly + echo 'UseDNS no' >> ${DESTDIR}/etc/ssh/sshd_config + + # Allow root to ssh using keys + echo 'PermitRootLogin without-password' >> ${DESTDIR}/etc/ssh/sshd_config + + # Disable sendmail + echo 'sendmail_enable="NO"' >> ${DESTDIR}/etc/rc.conf + echo 'sendmail_submit_enable="NO"' >> ${DESTDIR}/etc/rc.conf + echo 'sendmail_outbound_enable="NO"' >> ${DESTDIR}/etc/rc.conf + echo 'sendmail_msp_queue_enable="NO"' >> ${DESTDIR}/etc/rc.conf + + # Enable DHCP for the OpenStack instance echo 'ifconfig_DEFAULT="SYNCDHCP"' >> ${DESTDIR}/etc/rc.conf # Openstack wants sudo(8) usable by default without a password. @@ -21,5 +38,15 @@ vm_extra_pre_umount() { rm -f ${DESTDIR}/etc/resolv.conf + # The console is not interactive, so we might as well boot quickly. + echo 'autoboot_delay="-1"' >> ${DESTDIR}/boot/loader.conf + echo 'beastie_disable="YES"' >> ${DESTDIR}/boot/loader.conf + + # Reboot quickly, Don't wait at the panic screen + echo 'debug.trace_on_panic=1' >> ${DESTDIR}/etc/sysctl.conf + echo 'debug.debugger_on_panic=0' >> ${DESTDIR}/etc/sysctl.conf + echo 'kern.panic_reboot_wait_time=0' >> ${DESTDIR}/etc/sysctl.conf + + touch ${DESTDIR}/firstboot return 0 }