Browse Source

Added sample cloud-init and cloudbase-init configs

cybergavin 4 years ago
parent
commit
a3967560c9

+ 3 - 1
self-service/README.md

@@ -34,4 +34,6 @@ modify the python script.
 
 
 
 
 All the above files must be burned into a VM template and configured to be executed
 All the above files must be burned into a VM template and configured to be executed
-by cloud-init (Linux) or cloudbase-init(Windows).
+by cloud-init (Linux) or cloudbase-init(Windows). Refer to the workflow in
+ntx-ssvm-vmtemplate-customization.png and "cloud-init" and "cloudbase-init" directories
+for sample configuration files.

+ 70 - 0
self-service/cloud-init/sample-etc-cloud-cloud.config

@@ -0,0 +1,70 @@
+#
+# Sample cloud-init config file.
+# For the ntx-ssvm application, the only additions to the default version of this
+# file are lines 67 and 68 (runcmd directive). All files (.py/.cfg/.cred) are located in /etc.
+#
+users:
+ - default
+
+disable_root: 1
+ssh_pwauth:   1
+
+mount_default_fields: [~, ~, 'auto', 'defaults,nofail,x-systemd.requires=cloud-init.service', '0', '2']
+resize_rootfs_tmp: /dev
+ssh_deletekeys:   1
+ssh_genkeytypes:  ~
+syslog_fix_perms: ~
+disable_vmware_customization: true
+
+cloud_init_modules:
+ - disk_setup
+ - migrator
+ - bootcmd
+ - write-files
+ - growpart
+ - resizefs
+ - set_hostname
+ - update_etc_hosts
+ - rsyslog
+ - users-groups
+ - ssh
+
+cloud_config_modules:
+ - mounts
+ - locale
+ - set-passwords
+ - rh_subscription
+ - yum-add-repo
+ - package-update-upgrade-install
+ - timezone
+ - puppet
+ - chef
+ - salt-minion
+ - mcollective
+ - disable-ec2-metadata
+ - runcmd
+
+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_info:
+  default_user:
+  distro: rhel
+  paths:
+    cloud_dir: /var/lib/cloud
+    templates_dir: /etc/cloud/templates
+  ssh_svcname: sshd
+
+runcmd:
+  - /usr/bin/python3 /etc/ntx_ssvm_customize.py
+
+# vim:syntax=yaml

+ 30 - 0
self-service/cloudbase-init/sample-cloudbase-init.conf

@@ -0,0 +1,30 @@
+# Sample cloudbase-init config file.
+# All files (.py/.cfg/.cred) are located in the LocalScripts folder.
+#
+[DEFAULT]
+username=Admin
+groups=Administrators
+inject_user_password=false
+config_drive_raw_hhd=true
+config_drive_cdrom=true
+config_drive_vfat=true
+bsdtar_path=C:\Program Files\Cloudbase Solutions\Cloudbase-Init\bin\bsdtar.exe
+mtools_path=C:\Program Files\Cloudbase Solutions\Cloudbase-Init\bin\
+verbose=true
+debug=true
+logdir=C:\Program Files\Cloudbase Solutions\Cloudbase-Init\log\
+logfile=cloudbase-init.log
+default_log_levels=comtypes=INFO,suds=INFO,iso8601=WARN,requests=WARN
+logging_serial_port_settings=COM1,115200,N,8
+mtu_use_dhcp_config=true
+ntp_use_dhcp_config=true
+local_scripts_path=C:\Program Files\Cloudbase Solutions\Cloudbase-Init\LocalScripts\
+# Services that will be tested for loading until one of them succeeds.
+metadata_services=cloudbaseinit.metadata.services.configdrive.ConfigDriveService
+# What plugins to execute.
+plugins=cloudbaseinit.plugins.common.mtu.MTUPlugin,
+        cloudbaseinit.plugins.common.sethostname.SetHostNamePlugin,
+        cloudbaseinit.plugins.common.networkconfig.NetworkConfigPlugin,
+        cloudbaseinit.plugins.common.userdata.UserDataPlugin,
+        cloudbaseinit.plugins.common.localscripts.LocalScriptsPlugin
+first_logon_behaviour=no