Browse code

Removed default cloud-init config from OVA And Enabled ssh module in cloud-init

Change-Id: Icda4e7327e1382d5c88fcd96a315b1d1539fcb56
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/1559
Reviewed-by: Divya Thaluru <dthaluru@vmware.com>
Tested-by: Divya Thaluru <dthaluru@vmware.com>
Tested-by: gerrit-photon <photon-checkins@vmware.com>

dthaluru authored on 2016/10/22 09:04:49
Showing 3 changed files
... ...
@@ -1,6 +1,6 @@
1 1
 Name:           cloud-init
2 2
 Version:        0.7.6
3
-Release:        10%{?dist}
3
+Release:        11%{?dist}
4 4
 Summary:        Cloud instance init scripts
5 5
 Group:          System Environment/Base
6 6
 License:        GPLv3
... ...
@@ -90,6 +90,8 @@ rm -rf $RPM_BUILD_ROOT
90 90
 
91 91
 
92 92
 %changelog
93
+*   Mon Oct 24 2016 Divya Thaluru <dthaluru@vmware.com>  0.7.6-11
94
+-   Enabled ssh module in cloud-init
93 95
 *   Thu May 26 2016 Divya Thaluru <dthaluru@vmware.com>  0.7.6-10
94 96
 -   Fixed logic to restart the active services after upgrade 
95 97
 *	Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 0.7.6-9
... ...
@@ -53,7 +53,7 @@ cloud_init_modules:
53 53
 # - ca-certs
54 54
 # - rsyslog
55 55
  - users-groups
56
-# - ssh
56
+ - ssh
57 57
 
58 58
 # The modules that run in the 'config' stage
59 59
 cloud_config_modules:
... ...
@@ -88,20 +88,6 @@ touch $PHOTON_IMG_OUTPUT_PATH/photon-${IMG_NAME}/etc/machine-id
88 88
 rm -f $PHOTON_IMG_OUTPUT_PATH/photon-${IMG_NAME}/etc/fstab
89 89
 echo "UUID=$UUID_VALUE    /    ext4    defaults,barrier,noatime,noacl,data=ordered 1 1" >> $PHOTON_IMG_OUTPUT_PATH/photon-${IMG_NAME}/etc/fstab
90 90
 
91
-mkdir -p $PHOTON_IMG_OUTPUT_PATH/photon-${IMG_NAME}/var/lib/cloud/seed/nocloud
92
-cat << EOF >> $PHOTON_IMG_OUTPUT_PATH/photon-${IMG_NAME}/var/lib/cloud/seed/nocloud/meta-data
93
-instance-id: iid-local01
94
-local-hostname: photon-machine
95
-EOF
96
-cat << EOF >> $PHOTON_IMG_OUTPUT_PATH/photon-${IMG_NAME}/var/lib/cloud/seed/nocloud/user-data
97
-#cloud-config
98
-
99
-runcmd:
100
-  - (echo -ne 'photon-';cat /dev/urandom | tr -dc 'a-zA-Z0-9' | head -c 9)|xargs hostnamectl set-hostname
101
-  - hostname | xargs -I '{}' sed -i 's/photon-.*$/{}/g' /etc/hosts
102
-  - systemctl status systemd-resolved >/dev/null || systemctl restart systemd-resolved
103
-EOF
104
-
105 91
 mount -o bind /proc $PHOTON_IMG_OUTPUT_PATH/photon-${IMG_NAME}/proc
106 92
 mount -o bind /dev $PHOTON_IMG_OUTPUT_PATH/photon-${IMG_NAME}/dev
107 93
 mount -o bind /dev/pts $PHOTON_IMG_OUTPUT_PATH/photon-${IMG_NAME}/dev/pts