Andrew Bogott has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/351890 )

Change subject: bootstrap-vz:  Add a manifest for a Stretch labs image
......................................................................

bootstrap-vz:  Add a manifest for a Stretch labs image

Change-Id: Id9d499863ef77ec5c50823277ab8db179e095170
---
A modules/labs_bootstrapvz/files/labs-stretch.manifest.yaml
M modules/labs_bootstrapvz/manifests/init.pp
2 files changed, 212 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/90/351890/1

diff --git a/modules/labs_bootstrapvz/files/labs-stretch.manifest.yaml 
b/modules/labs_bootstrapvz/files/labs-stretch.manifest.yaml
new file mode 100644
index 0000000..b1d211a
--- /dev/null
+++ b/modules/labs_bootstrapvz/files/labs-stretch.manifest.yaml
@@ -0,0 +1,206 @@
+---
+name: debian-{system.release}-{system.architecture}-{%Y}{%m}{%d}
+provider:
+  name: kvm
+bootstrapper:
+  workspace: /target
+system:
+  release: stretch
+  architecture: amd64
+  bootloader: grub
+  charmap: UTF-8
+  locale: en_US
+  timezone: UTC
+volume:
+  backing: raw
+  partitions:
+    type: gpt
+    root:
+      filesystem: ext4
+      size: 19GiB
+    swap:
+      size: 512MiB
+packages:
+  sources:
+    wikimedia:
+      - deb  http://apt.wikimedia.org/wikimedia jessie-wikimedia main 
backports thirdparty
+      - deb-src http://apt.wikimedia.org/wikimedia jessie-wikimedia main 
backports thirdparty
+  trusted-keys:
+    - /etc/apt/trusted.gpg
+  install_standard: true
+  install:
+    - coreutils
+    - snmp
+    - dnsutils
+    - wipe
+    - tzdata
+    - zsh
+    - jfsutils
+    - xfsprogs
+    - screen
+    - salt-minion
+    - gdb
+    - iperf
+    - htop
+    - vim
+    - sysstat
+    - ngrep
+    - acct
+    - git
+    - lldpd
+    - parted
+    - lvm2
+    - emacs
+    - nslcd
+    - nslcd-utils
+    - libpam-ldapd
+    - ldap-utils
+    - libnss-ldapd
+    - nss-updatedb
+    - libnss-db
+    - nscd
+    - libpam-ldapd
+    - python-ldap
+    - python-pycurl
+    - openssl
+    - ca-certificates
+    - ssl-cert
+    - rsyslog
+    - exim4-config
+    - exim4-daemon-light
+    - cloud-utils
+    - euca2ools
+    - openssh-server
+    - curl
+    - nfs-client
+    - tree
+    - libfile-next-perl
+    - ack-grep
+    - ntp
+    - debian-goodies
+    - python-redis
+    - atop
+    - virt-what
+    - pv
+    - ldapvi
+    - ack-grep
+    - ethtool
+    - debian-goodies
+    - python-redis
+    - python-apt
+    - apt-show-versions
+    - pv
+    - nagios-plugins-standard
+    - httpry
+    - nagios-plugins
+    - tree
+    - nagios-plugins-basic
+    - jq
+    - apt-transport-https
+    - tcpdump
+    - molly-guard
+    - tshark
+    - tmux
+    - strace
+    - python-statsd
+    - nagios-nrpe-server
+    - moreutils
+    - lshw
+    - dstat
+    - lockfile-progs
+    - gdisk
+    - ncdu
+    - prometheus-node-exporter
+    - diamond
+    - ntp
+    - command-not-found
+    - gdisk
+    - os-prober
+    - apt-listchanges
+    - wpasupplicant
+    - debdeploy-minion
+    - megacli
+    - git-fat
+    - puppet=3.8.5-2~bpo8+1
+    - puppet-common=3.8.5-2~bpo8+1
+plugins:
+  puppet:
+    assets: /etc/bootstrap-vz/puppet
+    enable_agent: false
+  file_copy:
+    files:
+      -
+        src: /etc/bootstrap-vz/firstscripts/firstboot.sh
+        dst: /root/firstboot.sh
+        permissions: "755"
+        owner: root
+      -
+        src: /etc/bootstrap-vz/firstscripts/firstbootrc
+        dst: /etc/rc.local
+        permissions: "755"
+        owner: root
+      -
+        src: /etc/ldap.conf
+        dst: /etc/ldap.conf
+      -
+        src: /etc/bootstrap-vz/nss_ldap.conf
+        dst: /etc/ldap/ldap.conf
+      -
+        src: /etc/nscd.conf
+        dst: /etc/nscd.conf
+      -
+        src: /etc/bootstrap-vz/nslcd.conf
+        dst: /etc/nslcd.conf
+      -
+        src: /etc/nsswitch.conf
+        dst: /etc/nsswitch.conf
+      -
+        src: /etc/exim4/exim4.conf
+        dst: /etc/exim4/exim4.conf
+      -
+        src: /etc/sudoers
+        dst: /etc/sudoers
+      -
+        src: /etc/ssh/sshd_config
+        dst: /etc/ssh/sshd_config
+      -
+        src: /etc/ssh/sshd_banner
+        dst: /etc/ssh/sshd_banner
+      -
+        src: /etc/apt/trusted.gpg
+        dst: /etc/apt/trusted.gpg
+        permissions: "644"
+        owner: root
+      -
+        src: /etc/apt/trusted.gpg.d/trusted.gpg
+        dst: /etc/apt/trusted.gpg.d/trusted.gpg
+        permissions: "644"
+        owner: root
+      -
+        src: /etc/apt/sources.list.d/wikimedia.list
+        dst: /etc/apt/sources.list.d/wikimedia.list
+      -
+        src: /etc/apt/preferences.d/wikimedia.pref
+        dst: /etc/apt/preferences.d/wikimedia.pref
+      -
+        src: /etc/ssl/certs/ca-certificates.crt
+        dst: /etc/ssl/certs/ca-certificates.crt
+
+  commands:
+    # Current implementation does not specify an order between commands and
+    #  file_copy.  This section should not depend on anything existing from
+    #  file_copy; hence the touches and explicit copies below.
+    commands:
+      - ['chroot', '{root}', 'passwd', '-ld', 'root']
+      - ['SUDO_FORCE_REMOVE=yes chroot {root} apt-get --allow-remove-essential 
--allow-unauthenticated --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']
+      - ['chroot', '{root}', 'rm', '-f', 
'/etc/resolvconf/resolv.conf.d/original']
+      #- ['cp', '/etc/default/grub', '{root}/etc/default/grub']
+      #- ['chroot', '{root}', 'update-grub']
+      - ['chroot', '{root}', 'puppet', 'agent', '--disable']
+  unattended_upgrades:
+    update_interval: 1
+    download_interval: 1
+    upgrade_interval: 1
diff --git a/modules/labs_bootstrapvz/manifests/init.pp 
b/modules/labs_bootstrapvz/manifests/init.pp
index 667215a..1fe7118 100644
--- a/modules/labs_bootstrapvz/manifests/init.pp
+++ b/modules/labs_bootstrapvz/manifests/init.pp
@@ -39,6 +39,12 @@
         require => File["${bootstrap_filepath}/manifests"],
     }
 
+    file { "${bootstrap_filepath}/manifests/labs-stretch.manifest.yaml":
+        mode    => '0444',
+        source  => 
'puppet:///modules/labs_bootstrapvz/labs-jessie.manifest.yaml',
+        require => File["${bootstrap_filepath}/manifests"],
+    }
+
     file { "${bootstrap_filepath}/firstscripts/firstboot.sh":
         mode    => '0555',
         source  => 'puppet:///modules/labs_bootstrapvz/firstboot.sh',

-- 
To view, visit https://gerrit.wikimedia.org/r/351890
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id9d499863ef77ec5c50823277ab8db179e095170
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

Reply via email to