Change-Id: I34a4f1a5f338c2a6c01e7b01681d64b356da60cc
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/6622
Reviewed-by: Anish Swaminathan <anishs@vmware.com>
Tested-by: Anish Swaminathan <anishs@vmware.com>
| ... | ... |
@@ -56,14 +56,12 @@ Perform the following tasks: |
| 56 | 56 |
|
| 57 | 57 |
``` |
| 58 | 58 |
mount /dev/cdrom /media/cdrom |
| 59 |
- tdnf install yum |
|
| 60 |
- tdnf install python2-libs |
|
| 61 |
- yum install ntp sudo wget tar which gptfdisk sed findutils grep gzip --nogpgcheck -y |
|
| 59 |
+ tdnf install python2-libs ntp sudo wget tar which gptfdisk sed findutils grep gzip -y |
|
| 62 | 60 |
``` |
| 63 | 61 |
|
| 64 |
- 1. Convert GPT to MBR and update the grub |
|
| 62 |
+1. Convert GPT to MBR and update the grub |
|
| 65 | 63 |
|
| 66 |
- Photon installer installs GPT partition table by default but GCE only accepts an MBR (msdos) type partition table. So, you must convert GPT to MBR and update the grub. USe the following commands to update the grub: |
|
| 64 |
+ Photon installer installs GPT partition table by default but GCE only accepts an MBR (msdos) type partition table. So, you must convert GPT to MBR and update the grub. Use the following commands to update the grub: |
|
| 67 | 65 |
|
| 68 | 66 |
``` |
| 69 | 67 |
# Change partition table to MBR from GPT |
| ... | ... |
@@ -81,17 +79,17 @@ Perform the following tasks: |
| 81 | 81 |
grub2-mkconfig -o /boot/grub2/grub.cfg |
| 82 | 82 |
``` |
| 83 | 83 |
|
| 84 |
-1. Install Google Cloud SDK and GCE Packages |
|
| 84 |
+1. Install Google Cloud SDK and GCE Packages |
|
| 85 | 85 |
|
| 86 | 86 |
``` |
| 87 |
- yum install google-daemon google-startup-scripts |
|
| 87 |
+ tdnf install -y google-compute-engine google-compute-engine-services |
|
| 88 | 88 |
cp /usr/lib/systemd/system/google* /lib/systemd/system/ |
| 89 | 89 |
cd /lib/systemd/system/multi-user.target.wants/ |
| 90 | 90 |
|
| 91 | 91 |
# Create links in multi-user.target to auto-start these scripts and services. |
| 92 | 92 |
for i in ../google*; do ln -s $i `basename $i`; done |
| 93 | 93 |
|
| 94 |
- cd /tmp/; wget https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.tar.gz --no-check-certificate |
|
| 94 |
+ cd /tmp/; wget https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.tar.gz |
|
| 95 | 95 |
tar -xf google-cloud-sdk.tar.gz |
| 96 | 96 |
cd google-cloud-sdk |
| 97 | 97 |
./install.sh |
| ... | ... |
@@ -100,13 +98,13 @@ Perform the following tasks: |
| 100 | 100 |
1. Update /etc/hosts file with GCE values as follows: |
| 101 | 101 |
|
| 102 | 102 |
``` |
| 103 |
- echo "169.254.169.254 metadata.google.internal metadata" >> /etc/hosts |
|
| 103 |
+ echo "169.254.169.254 metadata.google.internal metadata" >> /etc/hosts |
|
| 104 | 104 |
``` |
| 105 | 105 |
|
| 106 | 106 |
1. Remove all servers from ntp.conf and add Google's ntp server. |
| 107 | 107 |
|
| 108 | 108 |
``` |
| 109 |
- sed -i -e "/server/d" /etc/ntp.conf |
|
| 109 |
+ sed -i -e "/server/d" /etc/ntp.conf |
|
| 110 | 110 |
cat /etc/ntp.conf |
| 111 | 111 |
echo "server 169.254.169.254" >> /etc/ntp.conf |
| 112 | 112 |
# Create ntpd.service to auto starting ntp server. |
| ... | ... |
@@ -133,20 +131,19 @@ Perform the following tasks: |
| 133 | 133 |
1. Set UTC timezone |
| 134 | 134 |
|
| 135 | 135 |
``` |
| 136 |
- ln -sf /usr/share/zoneinfo/UTC /etc/localtime |
|
| 136 |
+ ln -sf /usr/share/zoneinfo/UTC /etc/localtime |
|
| 137 | 137 |
``` |
| 138 | 138 |
|
| 139 | 139 |
1. Update /etc/resolv.conf |
| 140 | 140 |
|
| 141 | 141 |
``` |
| 142 |
- echo "nameserver 8.8.8.8" >> /etc/resolv.conf |
|
| 142 |
+ echo "nameserver 8.8.8.8" >> /etc/resolv.conf |
|
| 143 | 143 |
``` |
| 144 | 144 |
|
| 145 |
-1. Remove ssh host |
|
| 146 |
-2. keys and add script to regenerate them at boot time. |
|
| 145 |
+1. Remove ssh host keys and add script to regenerate them at boot time. |
|
| 147 | 146 |
|
| 148 | 147 |
``` |
| 149 |
- rm /etc/ssh/ssh_host_* |
|
| 148 |
+ rm /etc/ssh/ssh_host_* |
|
| 150 | 149 |
# Depending on the installation, you may need to purge the following keys |
| 151 | 150 |
rm /etc/ssh/ssh_host_rsa_key* |
| 152 | 151 |
rm /etc/ssh/ssh_host_dsa_key* |