From: Dmitry Monakhov <dmonakhov@openvz.org>
To: "Theodore Ts'o" <tytso@mit.edu>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 6/6] Add dockerfile
Date: Sun, 21 Aug 2016 15:02:38 +0300 [thread overview]
Message-ID: <87y43ql481.fsf@openvz.org> (raw)
In-Reply-To: <20160820194530.GA9693@thunk.org>
[-- Attachment #1: Type: text/plain, Size: 4760 bytes --]
Theodore Ts'o <tytso@mit.edu> writes:
> On Sat, Aug 20, 2016 at 02:31:26PM +0300, Dmitry Monakhov wrote:
>> > I'm not sure I see the advantage of doing this in a container, I
>> > guess. I just do in my standard laptop environment today.
>> I can not because I laptop from famous thinkpad t430 series with
>> flaky SSD which starts to return EIO after intensive load.
>> https://forums.lenovo.com/t5/ThinkPad-T400-T500-and-newer-T/T430s-Intel-SSD-520-180GB-issue/td-p/888083
>
> Hmm, I never buy a Lenovo SSD; they're overpriced. So I always get my
> Thinkpads with a 500mb HDD, and then replace it with a Samsumg 840/850
> EVO/PRO SSD.
>
>> Also. What about RH/SUSE/Fedora or even Gentoo people? They are exit :)
>> And if we give them just chance to try debian w/o complexities
>> maybe they will become debian adepts.
>
> You only need Debain to build the image. If you are just using the
> pre-built root_fs.img, you can just download it and go.
>
> Speaking of which, that's one thing which I don't understand about
> your Dockerfile. In the build step you just download the prebuilt
> root_fs.img from kernel.org. There are comments in your Dockerfile which say:
>
> # Fetch and build xfstests-bld
> # In order to build root_image from scratch privileged operation are required,
> # so it is impossible during build stage.
> # One can make it like this:
> # docker run -i -t --privileged --rm dmonakhov/xfstests-bld "cd kvm-xfstests/test-appliance && ./gen-image"
> # During build stage we simply fetch image precreated by tytso@
>
> ... but while this will create a new root_fs.img file, as soon as
> you're you're done the container will exit, and then the root_fs.img
> file will be blown away, right?
Yes. This is my typo. Generated image should be saved somewhere
before container stopped. So command should be
docker run -i -t --privileged -v ~/my-data:/shared --rm dmonakhov/xfstests-bld \
"cd kvm-xfstests/test-appliance \
&& ./gen-image \
&& cp root_fs.img /shared/"
Probably it should be moved to dedicated script, see later.
>
> The other thing I'll note here is that the Dockerfile is serving two
> use cases. One is to user Docker to do automated build testing. The
> other is for people who want to run multiple instances of kvm-xfstests
> using the container services.
>
> For the second, we don't really want to include all of the build
> artifacts and build and source trees in Docker image that the users
> will have to pull down over the network. And using kvm-xfstests
> --update-xfstests means a lot of extra wasted I/O, since we're
> packaging up the tar file, then copying it into file, and then
> unpacking it inside the guest VM, etc.
>
> So for the second case, you'd really want to create a Docker image
> which had the minimum packages needed to actually *run* the tests,
> with the pre-installed root_fs image.
Yes. That is reasonable idea. Actually I already have it in my queue.
Probably it it reasonable to create dedicated directory ./docker
and place all docker related crap there:
# build scripts
docker/Dockerfile.build-env
docker/Dockerfile.run-env
# And some run scripts
# Build all environment from scratch
docker/docker-build.sh
# Move config, kernel, root_fs.img inside container and run {gce,kvm}-xfstests.sh
docker/docker-kvm-xfstests.sh
docker/docker-gce-xfstests.sh
> For the first case, all you need to do is to have the Dockerfile
> create the xfstests.tar.gz file. I suppose this could be used as a
> poor man's build engine if you don't want to run the build on your
> local machine. What I do is my top-level config.custom has:
>
> BUILD_ENV="schroot -c jessie64 --"
> SUDO_ENV="schroot -c jessie64 -u root --"
>
> That's my pristine build chroot, and so when I run ./do-all, what gets
> executed is:
>
> schroot -c jessie64 -- make clean
> schroot -c jessie64 -- make
> schroot -c jessie64 -- make tarball
> cd kvm-xfstests/test-appliance
> schroot -c jessie64 -u root -- ./gen-image
>
> I'm pretty sure this is going to be faster than waiting for Docker to
> build the image, and then for me to download the image and extract the
> xfststs.tar.gz file. (But then again, I have a fully working laptop
> with functional SSD's not sourced by Lenovo :-).
Definitely. But in your case we still need jessie64's chroot.
It should be prepared somehow. My point is that if we give an automated build
script this may help people to start with xfstests with less pain.
In my experience time spend on investigation of installation process
always longer than time to download precreated VM/container :)
Let's call this approach "Lazy developers are welcome"
> - Ted
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 472 bytes --]
next prev parent reply other threads:[~2016-08-21 12:02 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-18 20:54 [PATCH 0/6] xfstests-bld: Fixes and improvements v1 Dmitry Monakhov
[not found] ` <1471553651-9547-7-git-send-email-dmonakhov@openvz.org>
2016-08-19 5:21 ` [PATCH 6/6] Add dockerfile Theodore Ts'o
2016-08-19 9:27 ` Dmitry Monakhov
2016-08-19 23:29 ` Theodore Ts'o
2016-08-20 11:31 ` Dmitry Monakhov
2016-08-20 19:45 ` Theodore Ts'o
2016-08-21 2:55 ` Theodore Ts'o
2016-08-21 12:02 ` Dmitry Monakhov [this message]
2016-08-21 14:26 ` Theodore Ts'o
2016-08-21 15:35 ` Theodore Ts'o
2016-08-22 8:07 ` Dmitry Monakhov
[not found] ` <1471553651-9547-5-git-send-email-dmonakhov@openvz.org>
2016-08-19 13:32 ` [PATCH 4/6] xfstest-bld: use parallel gzip if possible Theodore Ts'o
2016-08-20 22:52 ` Theodore Ts'o
[not found] ` <1471553651-9547-2-git-send-email-dmonakhov@openvz.org>
2016-08-19 13:35 ` [PATCH 1/6] xfstests-bld: build update xfstests repo Theodore Ts'o
[not found] ` <1471553651-9547-3-git-send-email-dmonakhov@openvz.org>
2016-08-19 13:35 ` [PATCH 2/6] fix build typos Theodore Ts'o
[not found] ` <1471553651-9547-4-git-send-email-dmonakhov@openvz.org>
2016-08-19 13:42 ` [PATCH 3/6] kvm-xfstests: update command line help Theodore Ts'o
2016-08-19 13:51 ` Dmitry Monakhov
2016-08-20 22:19 ` Theodore Ts'o
[not found] ` <1471553651-9547-6-git-send-email-dmonakhov@openvz.org>
2016-08-19 13:44 ` [PATCH 5/6] kvm-xfstests: add initrd support Theodore Ts'o
2016-08-19 13:59 ` Dmitry Monakhov
2016-08-19 23:40 ` Theodore Ts'o
2016-08-20 22:35 ` Theodore Ts'o
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=87y43ql481.fsf@openvz.org \
--to=dmonakhov@openvz.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tytso@mit.edu \
/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.