Return-Path: X-Original-To: apmail-cloudstack-commits-archive@www.apache.org Delivered-To: apmail-cloudstack-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C633111D0A for ; Mon, 22 Sep 2014 19:44:25 +0000 (UTC) Received: (qmail 2628 invoked by uid 500); 22 Sep 2014 19:44:03 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 2579 invoked by uid 500); 22 Sep 2014 19:44:03 -0000 Mailing-List: contact commits-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list commits@cloudstack.apache.org Received: (qmail 2197 invoked by uid 99); 22 Sep 2014 19:44:02 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Sep 2014 19:44:02 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id A7AFB9D1A56; Mon, 22 Sep 2014 19:44:02 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: bhaisaab@apache.org To: commits@cloudstack.apache.org Date: Mon, 22 Sep 2014 19:44:49 -0000 Message-Id: In-Reply-To: <4464198455804b619d0ee8027fb5d9b8@git.apache.org> References: <4464198455804b619d0ee8027fb5d9b8@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [50/50] git commit: updated refs/heads/master to 1290e10 Merge branch 'schubergphilis:feature/systemvm-refactor-for-upstream' This closes #16 Pull request summary: E-mail thread: http://mail-archives.apache.org/mod_mbox/cloudstack-dev/201407.mbox/%3C7A6CF878-7A28-4D4A-BCD2-0C264F8C90B7%40schubergphilis.com%3E This started out as wanting the systemvm build to take systemvm/patches/debian/{debian,vpn} from the local machine/branch, rather than downloading from the apache git master [1]. In working out how on earth to get veewee to do that cleanly (hint: you can’t, hence resorting to shar usage) I got quite frustrated with the image rebuild times. It so happens that veewee has a --skip-to-postinstall instruction which is quite useful while debugging these scripts. To get that working requires the post install steps to be retryable/convergent. Of course, our existing scripts weren’t set up for that. So I had to add a bunch of tests whether changes had applied already. Which implied a pretty significant refactor. Summarizing this kind of thing is always hard...it’s many little things...the interesting stuff is at the end/bottom, in particular the two main improvements schubergphilis@142d087 When working on the systemvm in isolation, or using vagrant or similar tools, it can be useful to inject a custom SSH key before merging a management server systemvm.iso into it. This option allows that. It should not have effect on management-server- managed vms which always get their SSH keys injected. schubergphilis@e2240ea The current build downloads its script from master by fetching a cloudstack tarball. Besides being an unneeded load on the apache git server, this is a problem when working on a branch and wanting to inject a different set of scripts. It also makes it pretty likely that the injected copy of the script will not match what a production release wants, so there is very little chance of not needing to overwrite the scripts. Ideally we would just rsync over some files. However, veewee does not provide an option to do that. In order to keep a 'cleanly veewee-only' build possible, and work with any recent veewee version, in this change we restor to using shar (http://en.wikipedia.org/wiki/Shar) to produce an archive which can execute as a script, which we feed to veewee to execute. In order to avoid having to re-do this cleanup twice, I also ended up merging the systemvm and systemvm64 template definitions, factoring out their small differences by inspecting the os architecture. schubergphilis@f570b39 schubergphilis@50e9121 Everything else…well it pretty much falls into two categories: general code cleanup without functional changes general code defensiveness to survive various jenkins build scenarios All in all it should help with ongoing maintenance, I think. Most of these commits are now a while old but I wanted to wait with sending this upstream until we had sufficiently tested the systemvms built with this changed approach locally. Signed-off-by: Rohit Yadav Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/1290e101 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/1290e101 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/1290e101 Branch: refs/heads/master Commit: 1290e1010454f9e1ae554b95984e2b62830d15ce Parents: a6ee411 ba009ed Author: Rohit Yadav Authored: Mon Sep 22 21:41:39 2014 +0200 Committer: Rohit Yadav Committed: Mon Sep 22 21:41:39 2014 +0200 ---------------------------------------------------------------------- tools/appliance/Gemfile | 1 + tools/appliance/README.md | 38 +- tools/appliance/build.sh | 597 ++++++++++++++++--- .../appliance/definitions/debianbase/cleanup.sh | 49 ++ .../definitions/debianbase/configure_login.sh | 78 +++ .../definitions/debianbase/definition.rb | 80 +++ .../definitions/debianbase/preseed.cfg | 129 ++++ .../definitions/debianbase/zerodisk.sh | 43 ++ .../definitions/systemvm64template/base.sh | 29 - .../definitions/systemvm64template/cleanup.sh | 20 - .../systemvm64template/definition.rb | 52 -- .../systemvm64template/postinstall.sh | 291 --------- .../definitions/systemvm64template/preseed.cfg | 362 ----------- .../definitions/systemvm64template/zerodisk.sh | 15 - .../definitions/systemvmtemplate/apt_upgrade.sh | 37 ++ .../systemvmtemplate/authorized_keys.sh | 29 + .../definitions/systemvmtemplate/base.sh | 29 - .../definitions/systemvmtemplate/build_time.sh | 26 + .../definitions/systemvmtemplate/cleanup.sh | 57 +- .../systemvmtemplate/configure_acpid.sh | 37 ++ .../systemvmtemplate/configure_conntrack.sh | 49 ++ .../systemvmtemplate/configure_grub.sh | 40 ++ .../systemvmtemplate/configure_locale.sh | 39 ++ .../systemvmtemplate/configure_login.sh | 78 +++ .../systemvmtemplate/configure_networking.sh | 62 ++ .../configure_systemvm_services.sh | 82 +++ .../definitions/systemvmtemplate/definition.rb | 138 +++-- .../install_systemvm_packages.sh | 99 +++ .../definitions/systemvmtemplate/postinstall.sh | 280 --------- .../definitions/systemvmtemplate/preseed.cfg | 280 +-------- .../definitions/systemvmtemplate/zerodisk.sh | 52 +- tools/appliance/shar_cloud_scripts.sh | 55 ++ tools/appliance/test.sh | 180 ++++++ tools/appliance/vbox_disk_clean.rb | 33 + tools/appliance/vbox_vm_clean.rb | 57 ++ 35 files changed, 2026 insertions(+), 1497 deletions(-) ----------------------------------------------------------------------