You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ro...@apache.org on 2017/12/13 10:43:27 UTC
[cloudstack] 13/30: more systemvmtemplate optimizations
This is an automated email from the ASF dual-hosted git repository.
rohit pushed a commit to branch debian9-systemvmtemplate
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
commit 23d59e4bc5641ee48e8b947f529c7c6e00151ffa
Author: Rohit Yadav <ro...@shapeblue.com>
AuthorDate: Sat Dec 9 16:37:31 2017 +0530
more systemvmtemplate optimizations
Signed-off-by: Rohit Yadav <ro...@shapeblue.com>
---
systemvm/debian/opt/cloud/bin/setup/postinit.sh | 15 ++++++++++-----
tools/appliance/build.sh | 2 +-
tools/appliance/definitions/systemvmtemplate/cleanup.sh | 1 +
tools/appliance/definitions/systemvmtemplate/finalize.sh | 1 +
.../systemvmtemplate/install_systemvm_packages.sh | 2 +-
tools/appliance/definitions/systemvmtemplate/preseed.cfg | 6 +++---
6 files changed, 17 insertions(+), 10 deletions(-)
diff --git a/systemvm/debian/opt/cloud/bin/setup/postinit.sh b/systemvm/debian/opt/cloud/bin/setup/postinit.sh
index efd1b4b..9a16966 100755
--- a/systemvm/debian/opt/cloud/bin/setup/postinit.sh
+++ b/systemvm/debian/opt/cloud/bin/setup/postinit.sh
@@ -15,9 +15,17 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-
+#
# This scripts before ssh.service but after cloud-early-config
+# Eject cdrom if any
+eject || true
+
+# Refresh and setup systemd
+chmod -x /etc/systemd/system/cloud*.service
+systemctl daemon-reload
+
+# Setup router
CMDLINE=/var/cache/cloud/cmdline
for str in $(cat $CMDLINE)
do
@@ -32,15 +40,12 @@ for str in $(cat $CMDLINE)
esac
done
-chmod -x /etc/systemd/system/cloud*.service
-systemctl daemon-reload
-
if [ "$TYPE" == "router" ] || [ "$TYPE" == "vpcrouter" ] || [ "$TYPE" == "dhcpsrvr" ]
then
if [ -x /opt/cloud/bin/update_config.py ]
then
/opt/cloud/bin/update_config.py cmd_line.json
- logger -t cloud "Updated config: cmd_line.json"
+ logger -t cloud "postinit: Updated config cmd_line.json"
fi
fi
diff --git a/tools/appliance/build.sh b/tools/appliance/build.sh
index 45f4728..6f2ab6b 100755
--- a/tools/appliance/build.sh
+++ b/tools/appliance/build.sh
@@ -397,7 +397,7 @@ function stage_vmx (){
displayname = "${1}"
annotation = "${1}"
guestos = "otherlinux-64"
-virtualhw.version = "7"
+virtualHW.version = "8"
config.version = "8"
numvcpus = "1"
cpuid.coresPerSocket = "1"
diff --git a/tools/appliance/definitions/systemvmtemplate/cleanup.sh b/tools/appliance/definitions/systemvmtemplate/cleanup.sh
index 00f068d..f1591ac 100644
--- a/tools/appliance/definitions/systemvmtemplate/cleanup.sh
+++ b/tools/appliance/definitions/systemvmtemplate/cleanup.sh
@@ -64,6 +64,7 @@ function cleanup_misc() {
rm -fr /usr/share/man
rm -fr /usr/share/info
rm -fr /usr/share/lintian
+ rm -fr /usr/share/vim
find /usr/share/locale -type f | grep -v en | xargs rm -fr
}
diff --git a/tools/appliance/definitions/systemvmtemplate/finalize.sh b/tools/appliance/definitions/systemvmtemplate/finalize.sh
index 1a25e39..912887c 100644
--- a/tools/appliance/definitions/systemvmtemplate/finalize.sh
+++ b/tools/appliance/definitions/systemvmtemplate/finalize.sh
@@ -57,6 +57,7 @@ function zero_disk() {
sync
rm -f ${path}/zero
done
+ fstrim -av
df -h
}
diff --git a/tools/appliance/definitions/systemvmtemplate/install_systemvm_packages.sh b/tools/appliance/definitions/systemvmtemplate/install_systemvm_packages.sh
index 40ff6df..b60f908 100644
--- a/tools/appliance/definitions/systemvmtemplate/install_systemvm_packages.sh
+++ b/tools/appliance/definitions/systemvmtemplate/install_systemvm_packages.sh
@@ -53,7 +53,7 @@ function install_packages() {
fi
${apt_get} install grub-legacy \
- rsyslog logrotate cron net-tools ifupdown vim netbase iptables \
+ rsyslog logrotate cron net-tools ifupdown tmux vim netbase iptables \
openssh-server e2fsprogs tcpdump socat wget \
python bzip2 sed gawk diffutils grep gzip less tar telnet ftp rsync traceroute psmisc lsof procps \
inetutils-ping iputils-arping httping curl \
diff --git a/tools/appliance/definitions/systemvmtemplate/preseed.cfg b/tools/appliance/definitions/systemvmtemplate/preseed.cfg
index 5a8e2d9..7fbe2a1 100644
--- a/tools/appliance/definitions/systemvmtemplate/preseed.cfg
+++ b/tools/appliance/definitions/systemvmtemplate/preseed.cfg
@@ -57,7 +57,7 @@ d-i partman-auto/method string regular
d-i partman-auto/choose_recipe select atomic
d-i partman-auto/expert_recipe string \
boot-root :: \
- 50 50 50 ext2 \
+ 100 50 100 ext2 \
$primary{ } $bootable{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext2 } \
@@ -68,12 +68,12 @@ d-i partman-auto/expert_recipe string \
use_filesystem{ } filesystem{ ext4 } \
mountpoint{ / } \
. \
- 350 50 400 ext4 \
+ 350 60 400 ext4 \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
mountpoint{ /var/log } \
. \
- 100 100 100 linux-swap \
+ 50 100 200 linux-swap \
method{ swap } format{ } \
.
--
To stop receiving notification emails like this one, please contact
"commits@cloudstack.apache.org" <co...@cloudstack.apache.org>.