Andrew Bogott has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/343208 )
Change subject: Bootstrapvz: Simplify and update ...................................................................... Bootstrapvz: Simplify and update - Remove cloud-init entirely - Simplify the sudo-ldap commandline - Remove some obsolete settings Change-Id: I06344494b443ce924b70fdfacf1a853e77170e21 --- D modules/labs_bootstrapvz/files/cloud.cfg M modules/labs_bootstrapvz/files/firstboot.sh M modules/labs_bootstrapvz/files/labs-jessie.manifest.yaml 3 files changed, 2 insertions(+), 115 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/08/343208/1 diff --git a/modules/labs_bootstrapvz/files/cloud.cfg b/modules/labs_bootstrapvz/files/cloud.cfg deleted file mode 100644 index 915967b..0000000 --- a/modules/labs_bootstrapvz/files/cloud.cfg +++ /dev/null @@ -1,90 +0,0 @@ -# The top level settings are used as module -# and system configuration. - -# A set of users which may be applied and/or used by various modules -# when a 'default' entry is found it will reference the 'default_user' -# from the distro configuration specified below -users: - -# If this is set, 'root' will not be able to ssh in and they -# will get a message to login instead as the above $user (ubuntu) -disable_root: true - -# This will cause the set+update hostname module to not operate (if true) -preserve_hostname: false - -# Example datasource config -# datasource: -# Ec2: -# metadata_urls: [ 'blah.com' ] -# timeout: 5 # (defaults to 50 seconds) -# max_wait: 10 # (defaults to 120 seconds) - -# The modules that run in the 'init' stage -cloud_init_modules: - - migrator - - bootcmd - - write-files - - resizefs - - set_hostname - - update_hostname - - update_etc_hosts - - ca-certs - - rsyslog - - users-groups - - ssh - -# The modules that run in the 'config' stage -cloud_config_modules: -# Emit the cloud config ready event -# this can be used by upstart jobs for 'start on cloud-config'. - - emit_upstart - - mounts - - locale - - set-passwords - - grub-dpkg - - apt-pipelining - - apt-configure - - package-update-upgrade-install - - landscape - - timezone - - mcollective - - disable-ec2-metadata - - runcmd - - byobu - -# The modules that run in the 'final' stage -cloud_final_modules: - - rightscale_userdata - - scripts-per-once - - scripts-per-boot - - scripts-per-instance - - scripts-user - - ssh-authkey-fingerprints - - keys-to-console - - phone-home - - final-message - - power-state-change - -# System and/or distro specific settings -# (not accessible to handlers/transforms) -system_info: - # This will affect which distro class gets used - distro: debian - # Default user name + that default users groups (if added/used) - default_user: - name: admin - sudo: ALL=(ALL) NOPASSWD:ALL - shell: /bin/bash - lock_passwd: True - gecos: Debian - groups: [adm, audio, cdrom, dialout, floppy, video, plugdev, dip] - # Other config here will be given to the distro class and/or path classes - paths: - cloud_dir: /var/lib/cloud/ - templates_dir: /etc/cloud/templates/ - upstart_dir: /etc/init/ - package_mirrors: - - arches: [default] - failsafe: - primary: http://ftp.debian.org/debian diff --git a/modules/labs_bootstrapvz/files/firstboot.sh b/modules/labs_bootstrapvz/files/firstboot.sh index 3eee822..8349be2 100644 --- a/modules/labs_bootstrapvz/files/firstboot.sh +++ b/modules/labs_bootstrapvz/files/firstboot.sh @@ -2,12 +2,6 @@ set -x -# Don't do anything until cloud-init has finished. -while [ ! -f /var/lib/cloud/instance/boot-finished ] -do - sleep 1 -done - echo 'Enabling console logging for puppet while it does the initial run' echo 'daemon.* |/dev/console' > /etc/rsyslog.d/60-puppet.conf systemctl restart rsyslog.service diff --git a/modules/labs_bootstrapvz/files/labs-jessie.manifest.yaml b/modules/labs_bootstrapvz/files/labs-jessie.manifest.yaml index a48d83e..52e8b59 100644 --- a/modules/labs_bootstrapvz/files/labs-jessie.manifest.yaml +++ b/modules/labs_bootstrapvz/files/labs-jessie.manifest.yaml @@ -4,9 +4,6 @@ name: kvm bootstrapper: workspace: /target -image: - name: debian-{system.release}-{system.architecture}-{%y}{%m}{%d} - description: Debian {system.release} {system.architecture} system: release: jessie architecture: amd64 @@ -134,13 +131,9 @@ # it in a raw image causes it to send spam mails. # - mpt-status plugins: - root_password: - password: test - cloud_init: - username: admin - metadata_sources: ConfigDrive puppet: assets: /etc/bootstrap-vz/puppet + enable_agent: false file_copy: files: - @@ -153,9 +146,6 @@ dst: /etc/rc.local permissions: "755" owner: root - - - src: /etc/bootstrap-vz/cloud.cfg - dst: /etc/cloud/cloud.cfg - src: /etc/ldap.conf dst: /etc/ldap.conf @@ -177,9 +167,6 @@ - src: /etc/sudoers dst: /etc/sudoers - - - src: /etc/sudoers.d/ops - dst: /etc/sudoers.d/ops - src: /etc/ssh/sshd_config dst: /etc/ssh/sshd_config @@ -204,8 +191,7 @@ # file_copy; hence the touches and explicit copies below. commands: - ['chroot', '{root}', 'passwd', '-ld', 'root'] - - ['chroot', '{root}', '/bin/sh', '-c', 'echo "#" >> /etc/sudoers'] - - ['chroot', '{root}', '/bin/sh', '-c', 'touch /etc/sudoers && SUDO_FORCE_REMOVE=yes apt-get --force-yes --assume-yes install sudo-ldap'] + - ['SUDO_FORCE_REMOVE=yes chroot {root} apt-get --force-yes --assume-yes install sudo-ldap'] - ['chroot', '{root}', 'rm', '-f', '/etc/ssh/ssh_host*key*'] - ['chroot', '{root}', 'rm', '-f', '/etc/sudo-ldap.conf'] - ['chroot', '{root}', 'ln', '-s', '/etc/ldap/ldap.conf', '/etc/sudo-ldap.conf'] @@ -218,6 +204,3 @@ update_interval: 1 download_interval: 1 upgrade_interval: 1 - cloud_init: - metadata_sources: Ec2 - username: admin -- To view, visit https://gerrit.wikimedia.org/r/343208 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I06344494b443ce924b70fdfacf1a853e77170e21 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Andrew Bogott <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
