From: Ian Campbell <ian.campbell@citrix.com>
To: Roger Pau Monne <roger.pau@citrix.com>
Cc: xen-devel@lists.xenproject.org, Ian Jackson <Ian.Jackson@eu.citrix.com>
Subject: Re: [PATCH v4 04/11] osstest: add support for installing bare metal FreeBSD
Date: Thu, 19 Mar 2015 15:13:38 +0000 [thread overview]
Message-ID: <1426778018.21742.29.camel@citrix.com> (raw)
In-Reply-To: <1424276291-6872-5-git-send-email-roger.pau@citrix.com>
On Wed, 2015-02-18 at 17:18 +0100, Roger Pau Monne wrote:
> - Add a list of FreeBSD ftp mirrors and iterate over them in order to
> find a working one.
I didn't actually see this, and in general we try and avoid dependencies
on random 3rd party webservices. Can we mirror FreeBSD locally like we
do with Debian?
> diff --git a/production-config b/production-config
> index 515bd98..fefc467 100644
> --- a/production-config
> +++ b/production-config
> @@ -86,6 +86,8 @@ HostProp_GenEtherPrefixBase 5a:36:0e:00
> # :00:01 guest number in job appended
> # ^^ xor'd with low 8 bits of flight
>
> +FreeBSDVersion current
I think for the final deployment we would want a specific version here.
IIRC the "current" stuff used with DiVersion is vestigial and no longer
used (or perhaps a standalone-mode-ism).
(or perhaps there is something which that graphic from 00/11 should be
telling me which I can't decipher)
> +exit 0 if $ho->{SharedReady};
I suppose this is some clever way to avoid unnecessary reinstalls?
> +sub get_mfsbsd() {
> +
> + # Figure out the path to the mfsBSD image we have to use.
> + # This can either come from a previous buildjob or from
> + # a pre-seeded image.
> +
> + if ($r{freebsd_buildjob}) {
> + # We are going to use the build output from a previous job.
> + return get_stashed('path_mfsbsd.img', $r{freebsd_buildjob});
> + } else {
> + # We are going to use a pre-seeded version.
> + return "$c{Images}/freebsd/$c{FreeBSDVersion}/$r{arch}/mfsbsd.img";
> + }
> +}
> +
> +sub get_set($) {
> + my ($set) = @_;
> +
> + if ($r{freebsd_buildjob}) {
> + # We are going to use the build output from a previous job.
> + return get_stashed("path_$set", $r{freebsd_buildjob});
> + } else {
> + # We are going to use a pre-seeded version.
> + return "$c{Images}/freebsd/$c{FreeBSDVersion}/$r{arch}/$set";
> + }
> +}
Isn't get_mfsbsd the same as get_set("mfsbsd.img") ?
> +
> +sub setup_sets() {
> + my $webfolder = "$c{WebspaceFile}/$c{WebspaceCommon}/freebsd/$ho->{Name}";
> +
> + # Link the sets to the public http folder
> + rmtree($webfolder);
> + mkpath($webfolder);
> + foreach my $set (@sets) {
> + my $set_src = abs_path(get_set($set));
> + logm("Using install set: $set_src");
> + symlink $set_src,"$webfolder/$set" or die "Unable to create symlink: $!";
This relies on the webserver and the controller having a shared NFS view
of the world, which I'm not sure is always true?
> + logm('Setting root shell to /bin/sh');
> + target_cmd_root($ho, 'chsh -s /bin/sh', 100);
Did you not already do this and/or can't you do it while tailoring
rather than after first boot?
> + logm('Adding osstest user');
> + target_cmd_root($ho, 'pw useradd osstest -m', 100);
> + target_cmd_root($ho, <<END, 100);
> + set -e
> + chsh -s /bin/sh osstest
> + mkdir -p /home/osstest/.ssh
> + cat <<ENDKEYS >/home/osstest/.ssh/authorized_keys
> +$authkeys
> +ENDKEYS
> +END
Likewise.
> + logm('OK: install completed');
That was remarkably painless, I thought it would be much worse!
next prev parent reply other threads:[~2015-03-19 15:15 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-18 16:18 [PATCH v4 00/11] osstest: add a FreeBSD host Roger Pau Monne
2015-02-18 16:18 ` [PATCH v4 01/11] osstest: allow to disable the usage of a know_host file Roger Pau Monne
2015-03-19 14:52 ` Ian Campbell
2015-02-18 16:18 ` [PATCH v4 02/11] osstest: add routine to execute ssh with password Roger Pau Monne
2015-03-19 14:58 ` Ian Campbell
2015-02-18 16:18 ` [PATCH v4 03/11] osstest: store a path runvar for built_stash_file Roger Pau Monne
2015-03-19 15:01 ` Ian Campbell
2015-02-18 16:18 ` [PATCH v4 04/11] osstest: add support for installing bare metal FreeBSD Roger Pau Monne
2015-03-19 15:13 ` Ian Campbell [this message]
2015-02-18 16:18 ` [PATCH v4 05/11] osstest: add script for building custom mfsBSD images Roger Pau Monne
2015-03-19 15:16 ` Ian Campbell
2015-02-18 16:18 ` [PATCH v4 06/11] osstest: fix ts-build-check to work with freebsd_buildjob Roger Pau Monne
2015-02-18 16:18 ` [PATCH v4 07/11] osstest: add freebsd installer update script Roger Pau Monne
2015-02-18 16:18 ` [PATCH v4 08/11] osstest: prepare FreeBSD host for Xen build Roger Pau Monne
2015-03-19 15:18 ` Ian Campbell
2015-02-18 16:18 ` [PATCH v4 09/11] osstest: make ts-xen-build work on FreeBSD Roger Pau Monne
2015-03-19 15:20 ` Ian Campbell
2015-02-18 16:18 ` [PATCH v4 10/11] osstest: add a script to install Xen on FreeBSD hosts Roger Pau Monne
2015-03-19 15:24 ` Ian Campbell
2015-02-18 16:18 ` [PATCH v4 11/11] osstest: add FreeBSD build recipe Roger Pau Monne
2015-03-19 15:31 ` Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1426778018.21742.29.camel@citrix.com \
--to=ian.campbell@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=roger.pau@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.