Skip to contentSkip to conversation

Dockerfile vs install-debian.sh

Fuego Georg Piewald 3 participants 9 messages Jul 27, 2020 – Sep 30, 2020

lore
Share & tools
lore
#0 lore raw

Hi guys,

I was just looking into how to install Fuego without a Docker container (since the CHANGELOG says it's possible). Apparently, that's what install-debian.sh is good for (or is there something else, that I missed?).

But honestly, this script seems like a halfhearted attempt to me and strongly violates the DRY principle. It is clearly descendant from Dockerfile, but did not evolve with it. Several later modifications in Dockerfile did not make it to install-debian.sh. How do you plan to keep these files in sync?

I propose to only let install-debian.sh have all the code that sets up the OS and installs all requirements. The Dockerfile instead should do (almost) nothing but execute install-debian.sh.

An additional benefit of that method is that it will be much easier to also keep Dockerfile.nojenkins in sync with the standard Dockerfile. Because here we have the same problem of lots of copied code, that is slowly drifting apart. We might even not need Dockerfile.nojenkins anymore at all.

I can offer to implement this, unless there are strong objections by anyone.

Regards, Georg

#1 lore raw

Hi Georg
Tim: I have a question of your at the end.

Quoted 10 lines

-----Original Message-----
From: Fuego <[email protected]> On Behalf Of Georg Piewald
Sent: Monday, July 27, 2020 8:14 PM
To: [email protected]
Subject: [Fuego] Dockerfile vs install-debian.sh

Hi guys,

I was just looking into how to install Fuego without a Docker container (since the CHANGELOG says it's possible). Apparently, that's what install-debian.sh is good for (or is there something else, that I missed?).

Yes, I created it in 2019 and it worked at that time. I run it together with LAVA.
Unfortunately, I haven't been able to maintain it since then for private reasons. Now I am back but I can't spend as much time as I'd like.
https://bkk19.sched.com/event/Li6u/bkk19-tr08-how-to-integrate-fuego-automated-testing-tool-in-your-ci-loop
You have the slides there (and the presentation is on youtube)

Quoted 3 lines

But honestly, this script seems like a halfhearted attempt to me and strongly violates the DRY principle. It is clearly descendant from Dockerfile, but did not evolve with it. Several later modifications in Dockerfile did not make it to install-debian.sh. How do you plan to keep these files in sync?

You are right. This was just a fast prototype to prove a point (that Fuego can work with LAVA, Ktest, Linaro test definitions, and other test frameworks) on that conference. It is waiting for proper integration and maintenance.

Quoted 2 lines

I propose to only let install-debian.sh have all the code that sets up the OS and installs all requirements. The Dockerfile instead should do (almost) nothing but execute install-debian.sh.

Yes, that was my plan as well.

Quoted 3 lines

An additional benefit of that method is that it will be much easier to also keep Dockerfile.nojenkins in sync with the standard Dockerfile. Because here we have the same problem of lots of copied code, that is slowly drifting apart. We might even not need Dockerfile.nojenkins anymore at all.

Exactly.

Quoted 1 line

I can offer to implement this, unless there are strong objections by anyone.

That would super awesome. It would be good if you see my video on Youtube or at least read the slides to get a bit of background of what I wanted to do with it. Also if you have any question about why i did that, or if there is a missing piece of code please let me know.

Tim: do you agree?

Best regards,
Daniel

#2 lore raw

-----Original Message-----

Quoted 3 lines

From: sangorrin daniel(サンゴリン ダニエル □SWC◯ACT)
Hi Georg
Tim: I have a question of your at the end.

of your -> for you

^^U

Quoted 50 lines
Quoted 8 lines

-----Original Message-----
From: Fuego <[email protected]> On Behalf Of Georg Piewald
Sent: Monday, July 27, 2020 8:14 PM
To: [email protected]
Subject: [Fuego] Dockerfile vs install-debian.sh

Quoted 4 lines

Hi guys,

I was just looking into how to install Fuego without a Docker
container (since the CHANGELOG says it's possible). Apparently, that's what install-debian.sh is good for (or is there something else, that I

missed?).

Yes, I created it in 2019 and it worked at that time. I run it together with LAVA.
Unfortunately, I haven't been able to maintain it since then for private reasons. Now I am back but I can't spend as much time as I'd like.
https://bkk19.sched.com/event/Li6u/bkk19-tr08-how-to-integrate-fuego-automated-testing-tool-in-your-ci-loop
You have the slides there (and the presentation is on youtube)

Quoted 3 lines

But honestly, this script seems like a halfhearted attempt to me and
strongly violates the DRY principle. It is clearly descendant from
Dockerfile, but did not evolve with it. Several later modifications in Dockerfile did not make it to install-debian.sh. How do you plan to

keep these files in sync?

You are right. This was just a fast prototype to prove a point (that Fuego can work with LAVA, Ktest, Linaro test definitions, and other test frameworks) on that conference.
It is waiting for proper integration and maintenance.

Quoted 3 lines

I propose to only let install-debian.sh have all the code that sets up the OS and installs all requirements. The Dockerfile instead should do (almost) nothing but execute install-debian.sh.

Yes, that was my plan as well.

Quoted 3 lines

An additional benefit of that method is that it will be much easier to also keep Dockerfile.nojenkins in sync with the standard Dockerfile. Because here we have the same problem of lots of copied code, that is
slowly drifting apart. We might even not need Dockerfile.nojenkins anymore at all.

Exactly.

Quoted 1 line

I can offer to implement this, unless there are strong objections by anyone.

That would super awesome. It would be good if you see my video on Youtube or at least read the slides to get a bit of background of what I wanted to do with it.
Also if you have any question about why i did that, or if there is a missing piece of code please let me know.

Tim: do you agree?

Best regards,
Daniel

#3 lore raw
In reply to [email protected]
Quoted 10 lines

-----Original Message-----
From: [email protected]

Hi Georg
Tim: I have a question of your at the end.

Quoted 2 lines

-----Original Message-----
From: Fuego <[email protected]> On Behalf Of Georg Piewald

....

Quoted 5 lines

That would super awesome. It would be good if you see my video on Youtube or at least read the slides to get a bit of background of what I wanted to do with it.
Also if you have any question about why i did that, or if there is a missing piece of code please let me know.

Tim: do you agree?

Yes. See my other mail.

Another item came up recently - which was the bit rot of the Fuego release test (Functional.fuego_release_test). That test uses (or is supposed to use) Dockerfile.test.

We don't have a documented way to build an "extra-beefy" container with the extra stuff needed for selftesting (e.g. with chromium, selenium, and other bits). I'm not sure whether to integrate this into install.sh (with a new --test option), and whether the code should go into install.sh or be a separate script like install-debian.sh.

Anyway - let's see what Georg comes up with and we'll take it from there.
-- Tim

#4 lore raw
In reply to [email protected]

Hi Daniel,

Quoted 3 lines · On 27.07.2020 13:52, [email protected] wrote:

That would super awesome. It would be good if you see my video on Youtube or at least read the slides to get a bit of background of what I wanted to do with it.

Thanks for the video! I learned quite some things from it!

Quoted 2 lines

Also if you have any question about why i did that, or if there is a missing piece of code please let me know.

I am currently working my way through it, trying to keep the modifications as small as possible (still, I'm afraid it won't be too easy for you to review). I understand most of what's happening there, but this line confuses me:

https://bitbucket.org/fuegotest/fuego/src/master/install-debian.sh#lines-148

What's the "jenkins cp" command?

Greets, Georg

#5 lore raw

Hi Georg,

Quoted 19 lines

-----Original Message-----
From: Georg Piewald <[email protected]>
Sent: Tuesday, July 28, 2020 5:25 PM
To: sangorrin daniel(サンゴリン ダニエル □SWC◯ACT) <[email protected]>; [email protected]; [email protected]
Subject: Re: [Fuego] Dockerfile vs install-debian.sh

Hi Daniel,

Quoted 3 lines · On 27.07.2020 13:52, [email protected] wrote:

That would super awesome. It would be good if you see my video on Youtube or at least read the slides to get a bit of background of what I wanted to do with it.

Thanks for the video! I learned quite some things from it!

Quoted 2 lines

Also if you have any question about why i did that, or if there is a missing piece of code please let me know.

Quoted 6 lines

I am currently working my way through it, trying to keep the modifications as small as possible (still, I'm afraid it won't be too easy for you to review). I understand most of what's happening there, but this line confuses me:

https://bitbucket.org/fuegotest/fuego/src/master/install-debian.sh#lines-148

What's the "jenkins cp" command?

It looks like a typo, good catch. It should be "cp" only. I am not sure how the word jenkins ended up there to be honest.

Kind regards,
Daniel

Quoted 2 lines

Greets, Georg

#6 lore raw
In reply to Georg Piewald
Quoted 10 lines

-----Original Message-----
From: Georg Piewald

Hi guys,

I was just looking into how to install Fuego without a Docker container (since the CHANGELOG says it's possible). Apparently, that's what install-debian.sh is good for (or is there something else, that I missed?).

I believe that's it. But Daniel would know.

Quoted 6 lines

But honestly, this script seems like a halfhearted attempt to me and strongly violates the DRY principle. It is clearly descendant from Dockerfile, but did not evolve with it. Several later modifications in Dockerfile did not make it to install-debian.sh. How do you plan to keep these files in sync?

To be brutally honest, I don't think we have a plan. So making it so that the information is in one place sounds like a great improvement.

Quoted 5 lines

I propose to only let install-debian.sh have all the code that sets up the OS and installs all requirements. The Dockerfile instead should do (almost) nothing but execute install-debian.sh.

Quoted 7 lines

An additional benefit of that method is that it will be much easier to also keep Dockerfile.nojenkins in sync with the standard Dockerfile. Because here we have the same problem of lots of copied code, that is slowly drifting apart. We might even not need Dockerfile.nojenkins anymore at all.

I can offer to implement this, unless there are strong objections by anyone.

No objections - and strong support.

Thanks very much for the offer. Any help is appreciated! :-)
-- Tim

#7 lore raw

Hi Tim and Daniel,

I pushed a first commit on a feature branch to Bitbucket. It's work in progress and far from done. But I must admit that I feel slightly uncomfortable, doing such a massive refactoring in your codebase, and I'm not sure if you'll approve that.

So maybe just follow along, and if you feel that it's going in a wrong direction, give me a stop sign, please.

Regards, Georg

#8 lore raw

Hello Georg,

Sorry for the long delay answering your e-mail.

I wasn't sure where your bitbucket feature branch was.
Actually, could you send the commit(s) you have to the this mailing list for review?

Also please let me know if you want to continue the work. Otherwise, I can do it instead.

Thanks,
Daniel

Quoted 21 lines

-----Original Message-----
From: Fuego <[email protected]> On Behalf Of Georg Piewald via Fuego
Sent: Friday, July 31, 2020 6:39 AM
To: [email protected]
Subject: Re: [Fuego] Dockerfile vs install-debian.sh

Hi Tim and Daniel,

I pushed a first commit on a feature branch to Bitbucket. It's work in progress and far from done. But I must admit that I feel slightly uncomfortable, doing such a massive refactoring in your codebase, and I'm not sure if you'll approve that.

So maybe just follow along, and if you feel that it's going in a wrong direction, give me a stop sign, please.

Regards, Georg
_______________________________________________
Fuego mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/fuego