2 # \hbrief cloud-init main template for MSP config
5 # \brief cloud-init template for MSP config
8 # Configuration created for MSP SLES_12 VMT
21 - [ sh, -xc, "echo \"#################################################################\" > /etc/issue.ci" ]
22 - [ sh, -xc, "echo \"# #\" >> /etc/issue.ci" ]
23 - [ sh, -xc, "echo \"# * * * Cloud-init configuration is in progress * * * #\" >> /etc/issue.ci" ]
24 - [ sh, -xc, "echo \"# #\" >> /etc/issue.ci" ]
25 - [ sh, -xc, "echo \"# The system will reboot shortly and then be accessible #\" >> /etc/issue.ci" ]
26 - [ sh, -xc, "echo \"# #\" >> /etc/issue.ci" ]
27 - [ sh, -xc, "echo \"#################################################################\" >> /etc/issue.ci" ]
28 - [ sh, -xc, "if [ -f /etc/issue.orig ]; then cp /etc/issue.orig /etc/issue; fi" ]
29 - [ sh, -xc, "if [ ! -f /etc/issue.orig ]; then cp /etc/issue /etc/issue.orig; cp /etc/issue.ci /etc/issue; fi" ]
30 - [ sh, -xc, "/bin/sed -i 's/^DHCLIENT_SET_DEFAULT_ROUTE=\"yes\".*/DHCLIENT_SET_DEFAULT_ROUTE=\"no\"/' /etc/sysconfig/network/dhcp" ]
31 - [ sh, -xc, "/bin/sed -i 's/^NETCONFIG_DNS_POLICY=.*/NETCONFIG_DNS_POLICY=\"STATIC\"/' /etc/sysconfig/network/config" ]
34 - [ sh, -xc, "chage -M 99999 root;rm -f /etc/shadow-" ]
35 - [ sh, -xc, "chage -M 99999 miepadm;rm -f /etc/shadow-" ]
36 - [ sh, -xc, "sed -i 's/^ListenAddress.*/ListenAddress 107.112.138.71/' /etc/ssh/sshd_config" ]
37 - [ sh, -xc, "sed -i 's/^ClientAliveCountMax.*/ClientAliveCountMax 300/g' /etc/ssh/sshd_config" ]
38 - [ sh, -xc, "sed -i 's/^ClientAliveInterval.*/ClientAliveInterval 10/g' /etc/ssh/sshd_config" ]
39 - [ sh, -xc, "sed -i '/PermitRootLogin/d' /etc/ssh/sshd_config" ]
40 - [ sh, -xc, "echo 'PermitRootLogin yes' >> /etc/ssh/sshd_config" ]
41 - [ sh, -xc, "sed -i '/KexAlgorithms/s/^/# /' /etc/ssh/sshd_config" ]
42 - [ sh, -xc, "mkdir /opt/miep/tools/miit/www/sles" ]
43 - [ sh, -xc, "rm -f /etc/sysconfig/network/ifcfg-eth1" ]
44 - [ sh, -xc, "mkdir /shared_nfs_datastore" ]
45 - [ sh, -xc, "mount -t ext4 /dev/vdb /shared_nfs_datastore" ]
46 - [ sh, -xc, "mkdir -p /shared_nfs_datastore/miit" ]
47 - [ sh, -xc, "cp -pr /opt/miep/tools/miit/* /shared_nfs_datastore/miit" ]
48 - [ sh, -xc, "rm -rf /opt/miep/tools/miit" ]
49 - [ sh, -xc, "rm -f /etc/udev/rules.d/70-persistent-net.rules" ]
50 - [ sh, -xc, "ln -s /shared_nfs_datastore/miit /opt/miep/tools/miit" ]
51 - [ sh, -xc, "chown -R miepadm:miepgrp /shared_nfs_datastore/miit" ]
52 - [ sh, -xc, "chown -R miepadm:miepgrp /opt/miep/tools/miit" ]
53 - [ sh, -xc, "mkdir -p /opt/miep/tools/miit/www/sles" ]
54 - [ sh, -xc, "mount -o loop /shared_nfs_datastore/SLE-12-SP1-Server-DVD-x86_64-GM-DVD1.iso /opt/miep/tools/miit/www/sles" ]
55 - [ sh, -xc, "/usr/bin/zypper ar /opt/miep/tools/miit/www/sles nfsrpms" ]
56 - [ sh, -xc, "/usr/bin/zypper lr" ]
57 - [ sh, -xc, "/usr/bin/zypper --non-interactive install -y nfs-kernel-server" ]
58 - [ sh, -xc, "/usr/bin/zypper --non-interactive install -y expect" ]
59 - [ sh, -xc, "/usr/bin/zypper --non-interactive install -y dos2unix" ]
60 - [ sh, -xc, "echo '//shared_nfs_datastore 107.112.136.0/21(rw,no_root_squash,sync,subtree_check)' >> /etc/exports" ]
61 - [ sh, -xc, "echo '/dev/vdb /shared_nfs_datastore ext4 acl 1 1' >> /etc/fstab" ]
62 - [ sh, -xc, "echo '@reboot /var/tmp/hostnamefix.sh > /var/tmp/hostnamefix.log' | /usr/bin/crontab -u root -" ]
63 - [ sh, -xc, "systemctl enable nfsserver.service" ]
64 - [ sh, -xc, "systemctl enable rpcbind.service" ]
65 - [ sh, -xc, "systemctl enable apache2.service" ]
66 - [ sh, -xc, "chkconfig mount_sles on" ]
67 - [ sh, -xc, "resize2fs /dev/vdb 200G" ]
68 - [ sh, -xc, "sed -i 's/PASS_MAX_DAYS 60/PASS_MAX_DAYS 99999/' /etc/login.defs" ]
69 - [ sh, -xc, "sleep 61s" ]
70 - [ sh, -xc, "su - miepadm -c \"ssh-keygen -t rsa -q -N '' -f ~/.ssh/id_rsa\"" ]
76 H4sIANk1vFkAA41Sy27bMBC88ysW8TViKaWNC92MAkV9KOIi+QFKWllE+RBIyo9+fZeW7DqxDHR10c4OZ3aXXEDnQgxwjrdOBWiVRmgw1F5VGECCHUyFHlx7YltpMIsuk03jMQS2gPdhZN8ruyUd5yF2CG/fNp/WGwhDFY4houEA6whkZEhNH28EhoANyAiVcxGiMvgI+w4tWAfJGwL6HXpqzCP4wVoy4zciLxaCkVrD6BkeqZXzbLW0UOHooyyVZZOGkzciD8mvebi2TU6vRxvloWQL+l9vstW4CIDvg9bZr0Fq1Spssh/TsgBeO+fjJadzLC+WXNCXT07a1VKn7V7ybcoYOYQeayU1Oe2eYVo6BlaW+exJ1e+esytwyl1fyfo3Yy0KUZbiimaRbNr2Cja1DLH32KpDKhTJ6lSgfVpHL2NCiwvq3RDpSib86YKfXhdLU2QzAS+rn2msz7A6jzXLo3WJJc/zgudPX/lSAPzxjflS9QdTi8IYK0TO97Lf7rlxFd1w3zmLnAabY85hmZPmHn5PeWS8b+2D+M7E/2xtZM5ht639w+8pjwzG/gJrL8X/3wMAAA==
80 encoding: 'gzip+base64'
82 ################################################################################
85 ## Sample NTP configuration file.
86 ## See package 'ntp-doc' for documentation, Mini-HOWTO and FAQ.
87 ## Copyright (c) 1998 S.u.S.E. GmbH Fuerth, Germany.
89 ## Author: Michael Andres, <ma@suse.de>
90 ## Michael Skibbe, <mskibbe@suse.de>
92 ################################################################################
95 ## Radio and modem clocks by convention have addresses in the
96 ## form 127.127.t.u, where t is the clock type and u is a unit
97 ## number in the range 0-3.
99 ## Most of these clocks require support in the form of a
100 ## serial port or special bus peripheral. The particular
101 ## device is normally specified by adding a soft link
102 ## /dev/device-u to the particular hardware device involved,
103 ## where u correspond to the unit number above.
105 ## Generic DCF77 clock on serial port (Conrad DCF77)
106 ## Address: 127.127.8.u
107 ## Serial Port: /dev/refclock-u
109 ## (create soft link /dev/refclock-0 to the particular ttyS?)
111 # server 127.127.8.0 mode 5 prefer
112 server 135.144.38.211 prefer
113 server 155.165.201.253 prefer
116 ## Undisciplined Local Clock. This is a fake driver intended for backup
117 ## and when no outside source of synchronized time is available.
119 server 127.127.1.0 # local clock (LCL)
120 fudge 127.127.1.0 stratum 10 # LCL is unsynchronized
123 ## Add external Servers using
124 ## # rcntp addserver <yourserver>
128 ## Miscellaneous stuff
131 driftfile /var/lib/ntp/drift/ntp.drift # path for drift file
133 logfile /var/log/ntp # alternate log file
134 # logconfig =syncstatus + sysevents
137 # statsdir /tmp/ # directory for statistics files
138 # filegen peerstats file peerstats type day enable
139 # filegen loopstats file loopstats type day enable
140 # filegen clockstats file clockstats type day enable
143 # Authentication stuff
145 keys /etc/ntp.keys # path for keys file
146 trustedkey 1 # define trusted keys
147 requestkey 1 # key (7) for accessing server variables
150 # by default act only as a basic NTP client
151 restrict default kod nomodify notrap nopeer noquery
152 restrict -6 default kod nomodify notrap nopeer noquery
154 # allow NTP messages only from the loopback
161 default 107.112.136.1 - -
162 path: /etc/sysconfig/network/routes
166 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
167 <trapDestCfg xmlns="http://www.ericsson.com/esa">
168 <managerDefinition snmpVersion="v2c" active="yes">
169 <ip>107.239.72.10</ip>
171 <securityName>v1v2ReadWriteSecName</securityName>
172 <securityLevel>noAuthNoPriv</securityLevel>
174 <managerDefinition snmpVersion="v2c" active="yes">
175 <ip>135.207.171.152</ip>
177 <securityName>v1v2ReadWriteSecName</securityName>
178 <securityLevel>noAuthNoPriv</securityLevel>
181 path: /opt/miep/tools/AttMspCust/CloudInit/trapDestCfg.xml
186 IPADDR='107.112.138.71'
187 BROADCAST='107.112.143.255'
188 NETMASK='255.255.248.0'
189 NETWORK='107.112.136.0'
195 CHECK_DUPLICATE_IP='yes'
196 SEND_GRATUITOUS_ARP='yes'
197 path: /etc/sysconfig/network/ifcfg-eth0
201 path: /etc/udev/rules.d/10-local.rules
208 # Provides: mount_sles
209 # Required-Start: network
210 # Required-Stop: network
214 # Default-Stop: 0 1 2 6
215 # Short-Description: Mount SLES iso file
217 echo Mount SLES ISO image
218 mount -o loop /shared_nfs_datastore/SLE-12-SP1-Server-DVD-x86_64-GM-DVD1.iso /opt/miep/tools/miit/www/sles
219 path: /etc/init.d/mount_sles
223 grep -qs preserve_hostname /etc/cloud/cloud.cfg
224 if [ $? -eq 0 ] ; then
225 sed -i 's/preserve_hostname: .*/preserve_hostname: true/' /etc/cloud/cloud.cfg
228 /bin/hostname | grep -qs novalocal
229 if [ $? -eq 0 ] ; then
230 newHostname=$(/bin/hostname | sed -e 's/.novalocal//')
231 hostnamectl set-hostname $newHostname
233 /usr/bin/crontab -u root -l | grep -v hostnamefix.sh | /usr/bin/crontab -u root -
234 path: /var/tmp/hostnamefix.sh
238 ### /etc/resolv.conf file autogenerated by netconfig!
240 # Before you change this file manually, consider to define the
241 # static DNS configuration using the following variables in the
242 # /etc/sysconfig/network/config file:
243 # NETCONFIG_DNS_STATIC_SEARCHLIST
244 # NETCONFIG_DNS_STATIC_SERVERS
245 # NETCONFIG_DNS_FORWARDER
246 # or disable DNS configuration updates via netconfig by setting:
247 # NETCONFIG_DNS_POLICY=''
249 # See also the netconfig(8) manual page and other documentation.
251 # Note: Manual change of this file disables netconfig too, but
252 # may get lost when this file contains comments or empty lines
253 # only, the netconfig settings are same with settings in this
254 # file and in case of a "netconfig update -f" call.
256 ### Please remove (at least) this line when you modify the file!
257 nameserver 155.165.194.100
258 nameserver 155.165.201.100
259 search wapgw.mobilephone.net
262 path: /etc/resolv.conf
266 *.* @135.207.171.57:1538
267 *.* @155.165.162.48:1532
268 path: /etc/rsyslog.d/remote.conf
272 H4sIANjbQlkAA5WUUW/aMBSF3/0rjqKgtEyUlodNYmonSulaCQqCqnsYE0kTByyCHcWGjAH/fU5CWqJB1PEC5J6c+/n42qTb/37/2O1cG1I5aindGXXnE9tzFIX1qbKoeJV1rfJQ6VVGln0RiKlBCHVnwmMyDJz12TnZpP9R0/qxsswr0xpzC8ieGqmT3YR5ZeDmBuZm329HdoRkLdtJyzejvTGMavJJa4xP4YsIK+8VujxPK5ojZX25u722PR+12XYa0TARbZ14DmsTRowrmJ93VlaRMyei3oT7cqKhHKlERG1CmI+fML+hxiku8QtfoWaUEwAFnLw54AkquaVAfzOppEFoIGki14qJZH9oOU5jZ9mnzTNPONxLKOAEgXB1gB4SYwj/LQMwCTPvaID4jByJr+oe5vd0P4LPAirXUtFFdR9jKtGlAnYgRHh5IkfjWJDj+oIxNa7HcTyuS93DsHE62gJpEetUvGWv5NITIVTDSLhUSozSeSsu3JeSRivm6m3b/wDPntEI2YDul91yFVvRJpz0G2e6q96Z848vtDMc9ofNA3u9h56I+fE1FmTLMFtdyjwctG8fn+7egaPQfWV6ZEpxoyXnehI0b8nMH+PN3UtpD0QF1tag1X7oNN5ZndDRhcbHWf8PNrcvhT0Q5bBlZ+el9wy9D5IJns9OQQ8jUYx+5KLE19bHFnURKn0uaFjvjQZfLq4mz/1+d1TFFtmFFO9f2OKfK8IgO5DCDUnIX5FnXVGsBQAA
273 path: /opt/miep/tools/miit/vmtTools/statusCheck.sh
274 owner: miepadm:miepgrp
276 encoding: 'gzip+base64'
278 H4sIAKm9hFkAA9VWbW/aMBD+3PyKUxSUrVPiUama1CmdEOsLEqxodPvSVmAlBqwmcRQfUKj632c7EKCMDrVVtX6AxM69PM/d2XfNi7N27fI8sInIkCScZQSFiKV65UjGCV7qlW31eczaFIdKcExzgklGHMmRpTRhtpUzOYoxsFNxkuciV/JMUp5KpHFMkYs0sPs0lkrSAt6HK/BmYDtVG27gK+CQpRYAsHAowNZGOwxHGfySdMCOfFLu+HIIVwunN3BVQ2x12uFIYkbDWyV8Y4MxdMcRqhYw5VGvFyqBU11ddodCogxKGm6x4RobzYuz00bzJLDLz57UGLxeRJGB+6mSVKLK1KucV1qVjtvzYzEovJ90aqXy79alp9ZPKlnQ52thOXijsFAjV1/KBc4BFGgsS3uNuMxiOv3w0bo3a/AUh2t0narjXqcuQLFrG3a9I9AJPT4G575ZFNUDMa86FA/Ww6pJVR3brO5gcxlhbdaaibQIhDEJyW3Ec/Ay+GtFTyaTZeESHSSReLq45XL7+ZokkTRkOUpLBTJUEDbOCnE2wv4CdzrVMtO2fBzM5kXkfAMvZfB5pYpWQq8KbBNBJJhMXdQlok5AUZIQRi9ApvgjzeFu3J+9Gj/wSVud0EbK8flUuYRUIFAY05hHBqT2qjgvLjGmr7B5DKxtadz3dZ5fpVJ2YQJ2q1MD49IY2szYOnqYp3ALdp4iy0Na/W/xPw0/FwJD+i7B37KpQpSz/XeJ3lnvnc/nsCv0xw53KnuFfigmKXg/QWOjUXKkn4N8l56glRMRaeUvh4c7KRgqtlNAsSGABZott1JHaULRzEORZDFDFsGE4xDYfHoyPXpPPR5PUZiP9FX1b3NyFIZMyv4ojqdFWED3SmWwsWLQdEyrZPDInaFiPK4NJOr3otawuMOJMqQcl/1aDUvd+sWP08YZHByTiI1JqtAXfmFvOQrNCfB0oGctEKnWBMWbSgYTytH3i4En3Mz3sqGQeixGkcGBOc2+M4n1/sC/S+LXoLbkolkWrVB1QjVPd8OyW4NqaPN4d/UXFX49yz0x7kAZhR5SHoNX3Sra07I668XfW54I1TXX5rLHVWf9AdB7+rd1DAAA
279 path: /opt/miep/tools/miit/vmtTools/siteSetup.sh
280 owner: miepadm:miepgrp
282 encoding: 'gzip+base64'
288 message: Server will reboot now