All of lore.kernel.org
 help / color / mirror / Atom feed
* [Fuego] [PATCH 0/3] Install fuego_release_test dependencies on fuego
@ 2018-05-02 21:27 Guilherme Campos Camargo
  2018-05-02 21:27 ` [Fuego] [PATCH 1/3] Install Fuego Release Test dependencies and add fuego-test board Guilherme Campos Camargo
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Guilherme Campos Camargo @ 2018-05-02 21:27 UTC (permalink / raw)
  To: fuego

Hello, everyone.

These three patches are adding the necessary dockerfile cmds to install
the dependencies for the fuego_release_test on the fuego image.

By adding these patches on top of fuego master we will be able to run
fuego_release_test from within Tim's master branch and not only from
Profusion's branches.

The "Return error" patch is being added to allow fuego_release_test to
detect if the install script fails, reporting the failure on test logs.

Thanks

--
Guilherme


Guilherme Campos Camargo (3):
  Install Fuego Release Test dependencies and add fuego-test board
  Return error if docker install script fails
  Add CheckScreenshot fuego_release_test dependencies

 Dockerfile                                    | 51 +++++++++++++++++++
 fuego-host-scripts/docker-create-container.sh |  1 +
 .../docker-create-usb-privileged-container.sh |  1 +
 fuego-ro/boards/fuego-test.board              | 13 +++++
 install.sh                                    |  4 ++
 5 files changed, 70 insertions(+)
 create mode 100644 fuego-ro/boards/fuego-test.board

-- 
2.17.0


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Fuego] [PATCH 1/3] Install Fuego Release Test dependencies and add fuego-test board
  2018-05-02 21:27 [Fuego] [PATCH 0/3] Install fuego_release_test dependencies on fuego Guilherme Campos Camargo
@ 2018-05-02 21:27 ` Guilherme Campos Camargo
  2018-05-04 20:20   ` Tim.Bird
  2018-05-02 21:27 ` [Fuego] [PATCH 2/3] Return error if docker install script fails Guilherme Campos Camargo
  2018-05-02 21:27 ` [Fuego] [PATCH 3/3] Add CheckScreenshot fuego_release_test dependencies Guilherme Campos Camargo
  2 siblings, 1 reply; 11+ messages in thread
From: Guilherme Campos Camargo @ 2018-05-02 21:27 UTC (permalink / raw)
  To: fuego

A new session has been added to the Dockerfile, mainly responsible for
installing the Docker binary, pexpect and seleniumHQ (that are needed
for Fuego to test a new Fuego release).

Also, a fuego-test board (a simple loopback that points to localhost)
has been added.

The create scripts have also been modified to allow mapping the hosts'
dockerd socket into the container. By doing this we allow Fuego and the
host to share the same docker daemon.
---
 Dockerfile                                    | 48 +++++++++++++++++++
 fuego-host-scripts/docker-create-container.sh |  1 +
 .../docker-create-usb-privileged-container.sh |  1 +
 fuego-ro/boards/fuego-test.board              | 13 +++++
 4 files changed, 63 insertions(+)
 create mode 100644 fuego-ro/boards/fuego-test.board

diff --git a/Dockerfile b/Dockerfile
index cc995d6..f148cf7 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -61,6 +61,54 @@ RUN echo "${JENKINS_SHA} jenkins_${JENKINS_VERSION}_all.deb" | sha1sum -c -
 RUN dpkg -i jenkins_${JENKINS_VERSION}_all.deb
 RUN rm jenkins_${JENKINS_VERSION}_all.deb
 
+
+# ==============================================================================
+# Install Fuego Release Test Dependencies
+# ==============================================================================
+
+# TODO: This session should be moved to a separate Dockerfile in the future,
+# that simply extends a fuego-base image and compiles a Fuego that's capable of
+# testing itself.
+
+# Install Dependencies
+RUN apt-get update && \
+    apt-get -yV install \
+        apt-transport-https \
+        ca-certificates \
+        chromium \
+        curl \
+        gnupg2 \
+        python3 \
+        python3-pip \
+        software-properties-common && \
+    pip3 install \
+        docker \
+        pexpect \
+        selenium
+
+# Install Docker
+RUN curl -fsSL https://download.docker.com/linux/$(source /etc/os-release; \
+        echo "$ID")/gpg | sudo apt-key add - && \
+    add-apt-repository \
+        "deb [arch=amd64] https://download.docker.com/linux/$(\
+            source /etc/os-release; echo "$ID") $(lsb_release -cs) stable" && \
+    apt-get update && \
+    apt-get -yV install \
+        docker-ce
+
+# Install Chrome Driver for SeleniumHQ
+RUN CHROME_DRIVER_VERSION=$(curl --silent --fail \
+        https://chromedriver.storage.googleapis.com/LATEST_RELEASE) && \
+    curl https://chromedriver.storage.googleapis.com/$(\
+        echo ${CHROME_DRIVER_VERSION})/chromedriver_linux64.zip \
+            -o chrome-driver.zip && \
+    unzip chrome-driver.zip -d /usr/local/bin && rm chrome-driver.zip && \
+    chmod +x /usr/local/bin/chromedriver
+
+# Setting jenkins as a sudoer. Needed for accessing the dockerd socket.
+RUN echo "jenkins ALL = (root) NOPASSWD:ALL" >> /etc/sudoers
+
+
 # ==============================================================================
 # get ttc script and helpers
 # ==============================================================================
diff --git a/fuego-host-scripts/docker-create-container.sh b/fuego-host-scripts/docker-create-container.sh
index 20f4b59..59cce3d 100755
--- a/fuego-host-scripts/docker-create-container.sh
+++ b/fuego-host-scripts/docker-create-container.sh
@@ -18,6 +18,7 @@ if [ ! -d $DIR/../../fuego-core ]; then
 fi
 
 sudo docker create -it --name ${DOCKERCONTAINER} \
+    -v /var/run/docker.sock:/var/run/docker.sock \
     -v /boot:/boot:ro \
     -v $DIR/../fuego-rw:/fuego-rw \
     -v $DIR/../fuego-ro:/fuego-ro:ro \
diff --git a/fuego-host-scripts/docker-create-usb-privileged-container.sh b/fuego-host-scripts/docker-create-usb-privileged-container.sh
index b3a55c4..b4c7f5b 100755
--- a/fuego-host-scripts/docker-create-usb-privileged-container.sh
+++ b/fuego-host-scripts/docker-create-usb-privileged-container.sh
@@ -19,6 +19,7 @@ fi
 
 sudo docker create -it --name ${DOCKERCONTAINER} \
     --privileged \
+    -v /var/run/docker.sock:/var/run/docker.sock \
     -v /boot:/boot:ro \
     -v /dev/bus/usb:/dev/bus/usb \
     -v /dev/ttyACM0:/dev/ttyACM0 \
diff --git a/fuego-ro/boards/fuego-test.board b/fuego-ro/boards/fuego-test.board
new file mode 100644
index 0000000..185e0b4
--- /dev/null
+++ b/fuego-ro/boards/fuego-test.board
@@ -0,0 +1,13 @@
+inherit "base-board"
+include "base-params"
+
+IPADDR=127.0.0.1
+SRV_IP=127.0.0.1
+#LOGIN="root"
+#PASSWORD="root"
+#SSH_KEY="path/to/id_rsa"
+BOARD_TESTDIR="$FUEGO_RW/tests"
+PLATFORM="x86_64"
+TRANSPORT="local"
+ARCHITECTURE="x86_64"
+DISTRIB="nosyslogd.dist"
-- 
2.17.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [Fuego] [PATCH 2/3] Return error if docker install script fails
  2018-05-02 21:27 [Fuego] [PATCH 0/3] Install fuego_release_test dependencies on fuego Guilherme Campos Camargo
  2018-05-02 21:27 ` [Fuego] [PATCH 1/3] Install Fuego Release Test dependencies and add fuego-test board Guilherme Campos Camargo
@ 2018-05-02 21:27 ` Guilherme Campos Camargo
  2018-05-04 20:21   ` Tim.Bird
  2018-05-02 21:27 ` [Fuego] [PATCH 3/3] Add CheckScreenshot fuego_release_test dependencies Guilherme Campos Camargo
  2 siblings, 1 reply; 11+ messages in thread
From: Guilherme Campos Camargo @ 2018-05-02 21:27 UTC (permalink / raw)
  To: fuego

Before this patch, install.sh would return 0 even if
fuego-host-scripts/docker-build-image.sh (that's sourced in it) failed,
what could possibly mislead a script or program that depends on its
return.

By using 'set -e' we make sure that any failure inside its sourced
scripts is propagated, aborting the execution and returning the proper
error code.

Signed-off-by: Guilherme Campos Camargo <guicc@profusion.mobi>
---
 install.sh | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/install.sh b/install.sh
index 2193559..6441ff0 100755
--- a/install.sh
+++ b/install.sh
@@ -1,2 +1,6 @@
+#!/bin/bash
+
+set -e
+
 source fuego-host-scripts/docker-build-image.sh $1
 sudo /bin/sh -c "if [ -f /etc/ttc.conf -a ! -f fuego-ro/conf/ttc.conf ] ; then cp /etc/ttc.conf fuego-ro/conf/ttc.conf ; fi"
-- 
2.17.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [Fuego] [PATCH 3/3] Add CheckScreenshot fuego_release_test dependencies
  2018-05-02 21:27 [Fuego] [PATCH 0/3] Install fuego_release_test dependencies on fuego Guilherme Campos Camargo
  2018-05-02 21:27 ` [Fuego] [PATCH 1/3] Install Fuego Release Test dependencies and add fuego-test board Guilherme Campos Camargo
  2018-05-02 21:27 ` [Fuego] [PATCH 2/3] Return error if docker install script fails Guilherme Campos Camargo
@ 2018-05-02 21:27 ` Guilherme Campos Camargo
  2018-05-04 20:22   ` Tim.Bird
  2 siblings, 1 reply; 11+ messages in thread
From: Guilherme Campos Camargo @ 2018-05-02 21:27 UTC (permalink / raw)
  To: fuego

A new class of tests has been included in fuego_release_test. The
purpose of this new class is to compare screenshots.

This patch adds the newly required dependencies: imagemagick and
python-pillow, that are used by CheckScreenshot.

Signed-off-by: Guilherme Campos Camargo <guicc@profusion.mobi>
---
 Dockerfile | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Dockerfile b/Dockerfile
index f148cf7..09e3c00 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -78,10 +78,13 @@ RUN apt-get update && \
         chromium \
         curl \
         gnupg2 \
+        imagemagick \
         python3 \
         python3-pip \
+        python3-pillow \
         software-properties-common && \
-    pip3 install \
+    rm -rf /var/lib/apt/lists/* && \
+    python3 -m pip install \
         docker \
         pexpect \
         selenium
-- 
2.17.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [Fuego] [PATCH 1/3] Install Fuego Release Test dependencies and add fuego-test board
  2018-05-02 21:27 ` [Fuego] [PATCH 1/3] Install Fuego Release Test dependencies and add fuego-test board Guilherme Campos Camargo
@ 2018-05-04 20:20   ` Tim.Bird
  2018-05-07 14:47     ` Guilherme Camargo
  0 siblings, 1 reply; 11+ messages in thread
From: Tim.Bird @ 2018-05-04 20:20 UTC (permalink / raw)
  To: guicc, fuego

I've applied and pushed these patches to my master branch.

But please see the feedback below.

> -----Original Message-----
> From: Guilherme Campos Camargo
> 
> A new session has been added to the Dockerfile, mainly responsible for
> installing the Docker binary, pexpect and seleniumHQ (that are needed
> for Fuego to test a new Fuego release).
> 
> Also, a fuego-test board (a simple loopback that points to localhost)
> has been added.
> 
> The create scripts have also been modified to allow mapping the hosts'
> dockerd socket into the container. By doing this we allow Fuego and the
> host to share the same docker daemon.
> ---
>  Dockerfile                                    | 48 +++++++++++++++++++
>  fuego-host-scripts/docker-create-container.sh |  1 +
>  .../docker-create-usb-privileged-container.sh |  1 +
>  fuego-ro/boards/fuego-test.board              | 13 +++++
>  4 files changed, 63 insertions(+)
>  create mode 100644 fuego-ro/boards/fuego-test.board
> 
> diff --git a/Dockerfile b/Dockerfile
> index cc995d6..f148cf7 100644
> --- a/Dockerfile
> +++ b/Dockerfile
> @@ -61,6 +61,54 @@ RUN echo "${JENKINS_SHA}
> jenkins_${JENKINS_VERSION}_all.deb" | sha1sum -c -
>  RUN dpkg -i jenkins_${JENKINS_VERSION}_all.deb
>  RUN rm jenkins_${JENKINS_VERSION}_all.deb
> 
> +
> +#
> ==========================================================
> ====================
> +# Install Fuego Release Test Dependencies
> +#
> ==========================================================
> ====================
> +
> +# TODO: This session should be moved to a separate Dockerfile in the
> future,
> +# that simply extends a fuego-base image and compiles a Fuego that's
> capable of
> +# testing itself.
> +
> +# Install Dependencies
> +RUN apt-get update && \
> +    apt-get -yV install \
> +        apt-transport-https \
> +        ca-certificates \
> +        chromium \
> +        curl \
> +        gnupg2 \
> +        python3 \
> +        python3-pip \
> +        software-properties-common && \
> +    pip3 install \
> +        docker \
> +        pexpect \
> +        selenium
> +

I'm getting the following error messages when running that line:
 [91mdebconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
 [0m [91mdebconf: unable to initialize frontend: Readline
debconf: (This frontend requires a controlling tty.)
debconf: falling back to frontend: Teletype
 [0m [91mdpkg-preconfigure: unable to re-open stdin: 

I believe this is due to a missing DEBIAN_FRONTEND=noninteractive.
But I tried to fiddle with this and figure out where to put it,
and didn't have any luck getting rid of the message.  The apt-get install
appears to work non-interactively, but it would be nice to get rid
of the message.

> +# Install Docker
> +RUN curl -fsSL https://download.docker.com/linux/$(source /etc/os-
> release; \
> +        echo "$ID")/gpg | sudo apt-key add - && \
> +    add-apt-repository \
> +        "deb [arch=amd64] https://download.docker.com/linux/$(\
> +            source /etc/os-release; echo "$ID") $(lsb_release -cs) stable" && \
> +    apt-get update && \
> +    apt-get -yV install \
> +        docker-ce
> +

Same problem here.  somewhere during this line I get the messages
about Debian frontend issues.

Can you try to fix this?

 Thanks,
 -- Tim

> +# Install Chrome Driver for SeleniumHQ
> +RUN CHROME_DRIVER_VERSION=$(curl --silent --fail \
> +        https://chromedriver.storage.googleapis.com/LATEST_RELEASE) && \
> +    curl https://chromedriver.storage.googleapis.com/$(\
> +        echo ${CHROME_DRIVER_VERSION})/chromedriver_linux64.zip \
> +            -o chrome-driver.zip && \
> +    unzip chrome-driver.zip -d /usr/local/bin && rm chrome-driver.zip && \
> +    chmod +x /usr/local/bin/chromedriver
> +
> +# Setting jenkins as a sudoer. Needed for accessing the dockerd socket.
> +RUN echo "jenkins ALL = (root) NOPASSWD:ALL" >> /etc/sudoers
> +
> +
>  #
> ==========================================================
> ====================
>  # get ttc script and helpers
>  #
> ==========================================================
> ====================
> diff --git a/fuego-host-scripts/docker-create-container.sh b/fuego-host-
> scripts/docker-create-container.sh
> index 20f4b59..59cce3d 100755
> --- a/fuego-host-scripts/docker-create-container.sh
> +++ b/fuego-host-scripts/docker-create-container.sh
> @@ -18,6 +18,7 @@ if [ ! -d $DIR/../../fuego-core ]; then
>  fi
> 
>  sudo docker create -it --name ${DOCKERCONTAINER} \
> +    -v /var/run/docker.sock:/var/run/docker.sock \
>      -v /boot:/boot:ro \
>      -v $DIR/../fuego-rw:/fuego-rw \
>      -v $DIR/../fuego-ro:/fuego-ro:ro \
> diff --git a/fuego-host-scripts/docker-create-usb-privileged-container.sh
> b/fuego-host-scripts/docker-create-usb-privileged-container.sh
> index b3a55c4..b4c7f5b 100755
> --- a/fuego-host-scripts/docker-create-usb-privileged-container.sh
> +++ b/fuego-host-scripts/docker-create-usb-privileged-container.sh
> @@ -19,6 +19,7 @@ fi
> 
>  sudo docker create -it --name ${DOCKERCONTAINER} \
>      --privileged \
> +    -v /var/run/docker.sock:/var/run/docker.sock \
>      -v /boot:/boot:ro \
>      -v /dev/bus/usb:/dev/bus/usb \
>      -v /dev/ttyACM0:/dev/ttyACM0 \
> diff --git a/fuego-ro/boards/fuego-test.board b/fuego-ro/boards/fuego-
> test.board
> new file mode 100644
> index 0000000..185e0b4
> --- /dev/null
> +++ b/fuego-ro/boards/fuego-test.board
> @@ -0,0 +1,13 @@
> +inherit "base-board"
> +include "base-params"
> +
> +IPADDR=127.0.0.1
> +SRV_IP=127.0.0.1
> +#LOGIN="root"
> +#PASSWORD="root"
> +#SSH_KEY="path/to/id_rsa"
> +BOARD_TESTDIR="$FUEGO_RW/tests"
> +PLATFORM="x86_64"
> +TRANSPORT="local"
> +ARCHITECTURE="x86_64"
> +DISTRIB="nosyslogd.dist"
> --
> 2.17.0
> 
> _______________________________________________
> Fuego mailing list
> Fuego@lists.linuxfoundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/fuego

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Fuego] [PATCH 2/3] Return error if docker install script fails
  2018-05-02 21:27 ` [Fuego] [PATCH 2/3] Return error if docker install script fails Guilherme Campos Camargo
@ 2018-05-04 20:21   ` Tim.Bird
  0 siblings, 0 replies; 11+ messages in thread
From: Tim.Bird @ 2018-05-04 20:21 UTC (permalink / raw)
  To: guicc, fuego

Applied and pushed.

thanks.
 -- Tim


> -----Original Message-----
> From: fuego-bounces@lists.linuxfoundation.org [mailto:fuego-
> bounces@lists.linuxfoundation.org] On Behalf Of Guilherme Campos
> Camargo
> Sent: Wednesday, May 02, 2018 2:27 PM
> To: fuego@lists.linuxfoundation.org
> Subject: [Fuego] [PATCH 2/3] Return error if docker install script fails
> 
> Before this patch, install.sh would return 0 even if
> fuego-host-scripts/docker-build-image.sh (that's sourced in it) failed,
> what could possibly mislead a script or program that depends on its
> return.
> 
> By using 'set -e' we make sure that any failure inside its sourced
> scripts is propagated, aborting the execution and returning the proper
> error code.
> 
> Signed-off-by: Guilherme Campos Camargo <guicc@profusion.mobi>
> ---
>  install.sh | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/install.sh b/install.sh
> index 2193559..6441ff0 100755
> --- a/install.sh
> +++ b/install.sh
> @@ -1,2 +1,6 @@
> +#!/bin/bash
> +
> +set -e
> +
>  source fuego-host-scripts/docker-build-image.sh $1
>  sudo /bin/sh -c "if [ -f /etc/ttc.conf -a ! -f fuego-ro/conf/ttc.conf ] ; then cp
> /etc/ttc.conf fuego-ro/conf/ttc.conf ; fi"
> --
> 2.17.0
> 
> _______________________________________________
> Fuego mailing list
> Fuego@lists.linuxfoundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/fuego

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Fuego] [PATCH 3/3] Add CheckScreenshot fuego_release_test dependencies
  2018-05-02 21:27 ` [Fuego] [PATCH 3/3] Add CheckScreenshot fuego_release_test dependencies Guilherme Campos Camargo
@ 2018-05-04 20:22   ` Tim.Bird
  2018-05-05 19:54     ` Gustavo Sverzut Barbieri
  0 siblings, 1 reply; 11+ messages in thread
From: Tim.Bird @ 2018-05-04 20:22 UTC (permalink / raw)
  To: guicc, fuego



> -----Original Message-----
> From: Guilherme Campos Camargo
> A new class of tests has been included in fuego_release_test. The
> purpose of this new class is to compare screenshots.
> 
> This patch adds the newly required dependencies: imagemagick and
> python-pillow, that are used by CheckScreenshot.
> 
> Signed-off-by: Guilherme Campos Camargo <guicc@profusion.mobi>
> ---
>  Dockerfile | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/Dockerfile b/Dockerfile
> index f148cf7..09e3c00 100644
> --- a/Dockerfile
> +++ b/Dockerfile
> @@ -78,10 +78,13 @@ RUN apt-get update && \
>          chromium \
>          curl \
>          gnupg2 \
> +        imagemagick \
>          python3 \
>          python3-pip \
> +        python3-pillow \
>          software-properties-common && \
> -    pip3 install \
> +    rm -rf /var/lib/apt/lists/* && \

This line kind of scares me.  What is this doing, and why?

> +    python3 -m pip install \
>          docker \
>          pexpect \
>          selenium
> --
> 2.17.0

Applied and pushed.

I'm testing it at the moment, and may have further feedback
depending on results.

Thanks.
 -- Tim


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Fuego] [PATCH 3/3] Add CheckScreenshot fuego_release_test dependencies
  2018-05-04 20:22   ` Tim.Bird
@ 2018-05-05 19:54     ` Gustavo Sverzut Barbieri
  2018-05-07 22:24       ` Tim.Bird
  0 siblings, 1 reply; 11+ messages in thread
From: Gustavo Sverzut Barbieri @ 2018-05-05 19:54 UTC (permalink / raw)
  To: Bird, Timothy; +Cc: fuego

On Fri, May 4, 2018 at 5:22 PM, <Tim.Bird@sony.com> wrote:
>
>
>
> > -----Original Message-----
> > From: Guilherme Campos Camargo
> > A new class of tests has been included in fuego_release_test. The
> > purpose of this new class is to compare screenshots.
> >
> > This patch adds the newly required dependencies: imagemagick and
> > python-pillow, that are used by CheckScreenshot.
> >
> > Signed-off-by: Guilherme Campos Camargo <guicc@profusion.mobi>
> > ---
> >  Dockerfile | 5 ++++-
> >  1 file changed, 4 insertions(+), 1 deletion(-)
> >
> > diff --git a/Dockerfile b/Dockerfile
> > index f148cf7..09e3c00 100644
> > --- a/Dockerfile
> > +++ b/Dockerfile
> > @@ -78,10 +78,13 @@ RUN apt-get update && \
> >          chromium \
> >          curl \
> >          gnupg2 \
> > +        imagemagick \
> >          python3 \
> >          python3-pip \
> > +        python3-pillow \
> >          software-properties-common && \
> > -    pip3 install \
> > +    rm -rf /var/lib/apt/lists/* && \
>
> This line kind of scares me.  What is this doing, and why?

basically this is the standard approach for debian + docker: install
then cleanup local caches as they just take space in the final image,
without much benefit (since "apt-get update" will regenerate those
files anyway).


-- 
Gustavo Sverzut Barbieri
http://profusion.mobi embedded systems
--------------------------------------
MSN, GTalk, FaceTime: barbieri@gmail.com
Skype: gsbarbieri
Mobile: +55 (16) 99354-9890

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Fuego] [PATCH 1/3] Install Fuego Release Test dependencies and add fuego-test board
  2018-05-04 20:20   ` Tim.Bird
@ 2018-05-07 14:47     ` Guilherme Camargo
  2018-05-07 17:16       ` Tim.Bird
  0 siblings, 1 reply; 11+ messages in thread
From: Guilherme Camargo @ 2018-05-07 14:47 UTC (permalink / raw)
  To: Bird, Timothy; +Cc: fuego

[-- Attachment #1: Type: text/plain, Size: 6851 bytes --]

​Hello, Tim. Sure. We could set DEBIAN_FRONTEND=noninteractive to avoid
those warnings.

I'll submit a patch fixing that by setting a global ARG
DEBIAN_FRONTEND=noninteractive -
cleaning up all DEBIAN_FRONTEND= that already exist.

This seems to be the cleanest approach.


On Fri, May 4, 2018 at 5:20 PM, <Tim.Bird@sony.com> wrote:

> I've applied and pushed these patches to my master branch.
>
> But please see the feedback below.
>
> > -----Original Message-----
> > From: Guilherme Campos Camargo
> >
> > A new session has been added to the Dockerfile, mainly responsible for
> > installing the Docker binary, pexpect and seleniumHQ (that are needed
> > for Fuego to test a new Fuego release).
> >
> > Also, a fuego-test board (a simple loopback that points to localhost)
> > has been added.
> >
> > The create scripts have also been modified to allow mapping the hosts'
> > dockerd socket into the container. By doing this we allow Fuego and the
> > host to share the same docker daemon.
> > ---
> >  Dockerfile                                    | 48 +++++++++++++++++++
> >  fuego-host-scripts/docker-create-container.sh |  1 +
> >  .../docker-create-usb-privileged-container.sh |  1 +
> >  fuego-ro/boards/fuego-test.board              | 13 +++++
> >  4 files changed, 63 insertions(+)
> >  create mode 100644 fuego-ro/boards/fuego-test.board
> >
> > diff --git a/Dockerfile b/Dockerfile
> > index cc995d6..f148cf7 100644
> > --- a/Dockerfile
> > +++ b/Dockerfile
> > @@ -61,6 +61,54 @@ RUN echo "${JENKINS_SHA}
> > jenkins_${JENKINS_VERSION}_all.deb" | sha1sum -c -
> >  RUN dpkg -i jenkins_${JENKINS_VERSION}_all.deb
> >  RUN rm jenkins_${JENKINS_VERSION}_all.deb
> >
> > +
> > +#
> > ==========================================================
> > ====================
> > +# Install Fuego Release Test Dependencies
> > +#
> > ==========================================================
> > ====================
> > +
> > +# TODO: This session should be moved to a separate Dockerfile in the
> > future,
> > +# that simply extends a fuego-base image and compiles a Fuego that's
> > capable of
> > +# testing itself.
> > +
> > +# Install Dependencies
> > +RUN apt-get update && \
> > +    apt-get -yV install \
> > +        apt-transport-https \
> > +        ca-certificates \
> > +        chromium \
> > +        curl \
> > +        gnupg2 \
> > +        python3 \
> > +        python3-pip \
> > +        software-properties-common && \
> > +    pip3 install \
> > +        docker \
> > +        pexpect \
> > +        selenium
> > +
>
> I'm getting the following error messages when running that line:
>  [91mdebconf: unable to initialize frontend: Dialog
> debconf: (TERM is not set, so the dialog frontend is not usable.)
> debconf: falling back to frontend: Readline
>  [0m [91mdebconf: unable to initialize frontend: Readline
> debconf: (This frontend requires a controlling tty.)
> debconf: falling back to frontend: Teletype
>  [0m [91mdpkg-preconfigure: unable to re-open stdin:
>
> I believe this is due to a missing DEBIAN_FRONTEND=noninteractive.
> But I tried to fiddle with this and figure out where to put it,
> and didn't have any luck getting rid of the message.  The apt-get install
> appears to work non-interactively, but it would be nice to get rid
> of the message.
>
> > +# Install Docker
> > +RUN curl -fsSL https://download.docker.com/linux/$(source /etc/os-
> > release; \
> > +        echo "$ID")/gpg | sudo apt-key add - && \
> > +    add-apt-repository \
> > +        "deb [arch=amd64] https://download.docker.com/linux/$(\
> > +            source /etc/os-release; echo "$ID") $(lsb_release -cs)
> stable" && \
> > +    apt-get update && \
> > +    apt-get -yV install \
> > +        docker-ce
> > +
>
> Same problem here.  somewhere during this line I get the messages
> about Debian frontend issues.
>
> Can you try to fix this?
>
>  Thanks,
>  -- Tim
>
> > +# Install Chrome Driver for SeleniumHQ
> > +RUN CHROME_DRIVER_VERSION=$(curl --silent --fail \
> > +        https://chromedriver.storage.googleapis.com/LATEST_RELEASE) &&
> \
> > +    curl https://chromedriver.storage.googleapis.com/$(\
> > +        echo ${CHROME_DRIVER_VERSION})/chromedriver_linux64.zip \
> > +            -o chrome-driver.zip && \
> > +    unzip chrome-driver.zip -d /usr/local/bin && rm chrome-driver.zip
> && \
> > +    chmod +x /usr/local/bin/chromedriver
> > +
> > +# Setting jenkins as a sudoer. Needed for accessing the dockerd socket.
> > +RUN echo "jenkins ALL = (root) NOPASSWD:ALL" >> /etc/sudoers
> > +
> > +
> >  #
> > ==========================================================
> > ====================
> >  # get ttc script and helpers
> >  #
> > ==========================================================
> > ====================
> > diff --git a/fuego-host-scripts/docker-create-container.sh b/fuego-host-
> > scripts/docker-create-container.sh
> > index 20f4b59..59cce3d 100755
> > --- a/fuego-host-scripts/docker-create-container.sh
> > +++ b/fuego-host-scripts/docker-create-container.sh
> > @@ -18,6 +18,7 @@ if [ ! -d $DIR/../../fuego-core ]; then
> >  fi
> >
> >  sudo docker create -it --name ${DOCKERCONTAINER} \
> > +    -v /var/run/docker.sock:/var/run/docker.sock \
> >      -v /boot:/boot:ro \
> >      -v $DIR/../fuego-rw:/fuego-rw \
> >      -v $DIR/../fuego-ro:/fuego-ro:ro \
> > diff --git a/fuego-host-scripts/docker-create-usb-privileged-container.
> sh
> > b/fuego-host-scripts/docker-create-usb-privileged-container.sh
> > index b3a55c4..b4c7f5b 100755
> > --- a/fuego-host-scripts/docker-create-usb-privileged-container.sh
> > +++ b/fuego-host-scripts/docker-create-usb-privileged-container.sh
> > @@ -19,6 +19,7 @@ fi
> >
> >  sudo docker create -it --name ${DOCKERCONTAINER} \
> >      --privileged \
> > +    -v /var/run/docker.sock:/var/run/docker.sock \
> >      -v /boot:/boot:ro \
> >      -v /dev/bus/usb:/dev/bus/usb \
> >      -v /dev/ttyACM0:/dev/ttyACM0 \
> > diff --git a/fuego-ro/boards/fuego-test.board b/fuego-ro/boards/fuego-
> > test.board
> > new file mode 100644
> > index 0000000..185e0b4
> > --- /dev/null
> > +++ b/fuego-ro/boards/fuego-test.board
> > @@ -0,0 +1,13 @@
> > +inherit "base-board"
> > +include "base-params"
> > +
> > +IPADDR=127.0.0.1
> > +SRV_IP=127.0.0.1
> > +#LOGIN="root"
> > +#PASSWORD="root"
> > +#SSH_KEY="path/to/id_rsa"
> > +BOARD_TESTDIR="$FUEGO_RW/tests"
> > +PLATFORM="x86_64"
> > +TRANSPORT="local"
> > +ARCHITECTURE="x86_64"
> > +DISTRIB="nosyslogd.dist"
> > --
> > 2.17.0
> >
> > _______________________________________________
> > Fuego mailing list
> > Fuego@lists.linuxfoundation.org
> > https://lists.linuxfoundation.org/mailman/listinfo/fuego
>

[-- Attachment #2: Type: text/html, Size: 10205 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Fuego] [PATCH 1/3] Install Fuego Release Test dependencies and add fuego-test board
  2018-05-07 14:47     ` Guilherme Camargo
@ 2018-05-07 17:16       ` Tim.Bird
  0 siblings, 0 replies; 11+ messages in thread
From: Tim.Bird @ 2018-05-07 17:16 UTC (permalink / raw)
  To: guicc; +Cc: fuego



> -----Original Message-----
> From: Guilherme Camargo
> ​Hello, Tim. Sure. We could set DEBIAN_FRONTEND=noninteractive to avoid
> those warnings.
> 
> I'll submit a patch fixing that by setting a global ARG
> DEBIAN_FRONTEND=noninteractive -
> cleaning up all DEBIAN_FRONTEND= that already exist.
> 
> This seems to be the cleanest approach.


Sounds good.  Thanks!
 -- Tim

> 
> On Fri, May 4, 2018 at 5:20 PM, <Tim.Bird@sony.com
> <mailto:Tim.Bird@sony.com> > wrote:
> 
> 
> 	I've applied and pushed these patches to my master branch.
> 
> 	But please see the feedback below.
> 
> 
> 	> -----Original Message-----
> 	> From: Guilherme Campos Camargo
> 	>
> 	> A new session has been added to the Dockerfile, mainly
> responsible for
> 	> installing the Docker binary, pexpect and seleniumHQ (that are
> needed
> 	> for Fuego to test a new Fuego release).
> 	>
> 	> Also, a fuego-test board (a simple loopback that points to localhost)
> 	> has been added.
> 	>
> 	> The create scripts have also been modified to allow mapping the
> hosts'
> 	> dockerd socket into the container. By doing this we allow Fuego
> and the
> 	> host to share the same docker daemon.
> 	> ---
> 	>  Dockerfile                                    | 48 +++++++++++++++++++
> 	>  fuego-host-scripts/docker-create-container.sh |  1 +
> 	>  .../docker-create-usb-privileged-container.sh |  1 +
> 	>  fuego-ro/boards/fuego-test.board              | 13 +++++
> 	>  4 files changed, 63 insertions(+)
> 	>  create mode 100644 fuego-ro/boards/fuego-test.board
> 	>
> 	> diff --git a/Dockerfile b/Dockerfile
> 	> index cc995d6..f148cf7 100644
> 	> --- a/Dockerfile
> 	> +++ b/Dockerfile
> 	> @@ -61,6 +61,54 @@ RUN echo "${JENKINS_SHA}
> 	> jenkins_${JENKINS_VERSION}_all.deb" | sha1sum -c -
> 	>  RUN dpkg -i jenkins_${JENKINS_VERSION}_all.deb
> 	>  RUN rm jenkins_${JENKINS_VERSION}_all.deb
> 	>
> 	> +
> 	> +#
> 	>
> ==========================================================
> 	> ====================
> 	> +# Install Fuego Release Test Dependencies
> 	> +#
> 	>
> ==========================================================
> 	> ====================
> 	> +
> 	> +# TODO: This session should be moved to a separate Dockerfile in
> the
> 	> future,
> 	> +# that simply extends a fuego-base image and compiles a Fuego
> that's
> 	> capable of
> 	> +# testing itself.
> 	> +
> 	> +# Install Dependencies
> 	> +RUN apt-get update && \
> 	> +    apt-get -yV install \
> 	> +        apt-transport-https \
> 	> +        ca-certificates \
> 	> +        chromium \
> 	> +        curl \
> 	> +        gnupg2 \
> 	> +        python3 \
> 	> +        python3-pip \
> 	> +        software-properties-common && \
> 	> +    pip3 install \
> 	> +        docker \
> 	> +        pexpect \
> 	> +        selenium
> 	> +
> 
> 
> 	I'm getting the following error messages when running that line:
> 	 [91mdebconf: unable to initialize frontend: Dialog
> 	debconf: (TERM is not set, so the dialog frontend is not usable.)
> 	debconf: falling back to frontend: Readline
> 	 [0m [91mdebconf: unable to initialize frontend: Readline
> 	debconf: (This frontend requires a controlling tty.)
> 	debconf: falling back to frontend: Teletype
> 	 [0m [91mdpkg-preconfigure: unable to re-open stdin:
> 
> 	I believe this is due to a missing DEBIAN_FRONTEND=noninteractive.
> 	But I tried to fiddle with this and figure out where to put it,
> 	and didn't have any luck getting rid of the message.  The apt-get
> install
> 	appears to work non-interactively, but it would be nice to get rid
> 	of the message.
> 
> 	> +# Install Docker
> 	> +RUN curl -fsSL https://download.docker.com/linux/$(source
> <https://download.docker.com/linux/$(source>  /etc/os-
> 	> release; \
> 	> +        echo "$ID")/gpg | sudo apt-key add - && \
> 	> +    add-apt-repository \
> 	> +        "deb [arch=amd64] https://download.docker.com/linux/$(\
> <https://download.docker.com/linux/$(%5C>
> 	> +            source /etc/os-release; echo "$ID") $(lsb_release -cs)
> stable" && \
> 	> +    apt-get update && \
> 	> +    apt-get -yV install \
> 	> +        docker-ce
> 	> +
> 
> 	Same problem here.  somewhere during this line I get the messages
> 	about Debian frontend issues.
> 
> 	Can you try to fix this?
> 
> 	 Thanks,
> 	 -- Tim
> 
> 
> 	> +# Install Chrome Driver for SeleniumHQ
> 	> +RUN CHROME_DRIVER_VERSION=$(curl --silent --fail \
> 	> +
> https://chromedriver.storage.googleapis.com/LATEST_RELEASE
> <https://chromedriver.storage.googleapis.com/LATEST_RELEASE> ) && \
> 	> +    curl https://chromedriver.storage.googleapis.com/$(\
> <https://chromedriver.storage.googleapis.com/$(%5C>
> 	> +        echo
> ${CHROME_DRIVER_VERSION})/chromedriver_linux64.zip \
> 	> +            -o chrome-driver.zip && \
> 	> +    unzip chrome-driver.zip -d /usr/local/bin && rm chrome-
> driver.zip && \
> 	> +    chmod +x /usr/local/bin/chromedriver
> 	> +
> 	> +# Setting jenkins as a sudoer. Needed for accessing the dockerd
> socket.
> 	> +RUN echo "jenkins ALL = (root) NOPASSWD:ALL" >> /etc/sudoers
> 	> +
> 	> +
> 	>  #
> 	>
> ==========================================================
> 	> ====================
> 	>  # get ttc script and helpers
> 	>  #
> 	>
> ==========================================================
> 	> ====================
> 	> diff --git a/fuego-host-scripts/docker-create-container.sh b/fuego-
> host-
> 	> scripts/docker-create-container.sh
> 	> index 20f4b59..59cce3d 100755
> 	> --- a/fuego-host-scripts/docker-create-container.sh
> 	> +++ b/fuego-host-scripts/docker-create-container.sh
> 	> @@ -18,6 +18,7 @@ if [ ! -d $DIR/../../fuego-core ]; then
> 	>  fi
> 	>
> 	>  sudo docker create -it --name ${DOCKERCONTAINER} \
> 	> +    -v /var/run/docker.sock:/var/run/docker.sock \
> 	>      -v /boot:/boot:ro \
> 	>      -v $DIR/../fuego-rw:/fuego-rw \
> 	>      -v $DIR/../fuego-ro:/fuego-ro:ro \
> 	> diff --git a/fuego-host-scripts/docker-create-usb-privileged-
> container.sh
> 	> b/fuego-host-scripts/docker-create-usb-privileged-container.sh
> 	> index b3a55c4..b4c7f5b 100755
> 	> --- a/fuego-host-scripts/docker-create-usb-privileged-container.sh
> 	> +++ b/fuego-host-scripts/docker-create-usb-privileged-
> container.sh
> 	> @@ -19,6 +19,7 @@ fi
> 	>
> 	>  sudo docker create -it --name ${DOCKERCONTAINER} \
> 	>      --privileged \
> 	> +    -v /var/run/docker.sock:/var/run/docker.sock \
> 	>      -v /boot:/boot:ro \
> 	>      -v /dev/bus/usb:/dev/bus/usb \
> 	>      -v /dev/ttyACM0:/dev/ttyACM0 \
> 	> diff --git a/fuego-ro/boards/fuego-test.board b/fuego-
> ro/boards/fuego-
> 	> test.board
> 	> new file mode 100644
> 	> index 0000000..185e0b4
> 	> --- /dev/null
> 	> +++ b/fuego-ro/boards/fuego-test.board
> 	> @@ -0,0 +1,13 @@
> 	> +inherit "base-board"
> 	> +include "base-params"
> 	> +
> 	> +IPADDR=127.0.0.1
> 	> +SRV_IP=127.0.0.1
> 	> +#LOGIN="root"
> 	> +#PASSWORD="root"
> 	> +#SSH_KEY="path/to/id_rsa"
> 	> +BOARD_TESTDIR="$FUEGO_RW/tests"
> 	> +PLATFORM="x86_64"
> 	> +TRANSPORT="local"
> 	> +ARCHITECTURE="x86_64"
> 	> +DISTRIB="nosyslogd.dist"
> 	> --
> 	> 2.17.0
> 	>
> 
> 	> _______________________________________________
> 	> Fuego mailing list
> 	> Fuego@lists.linuxfoundation.org
> <mailto:Fuego@lists.linuxfoundation.org>
> 	> https://lists.linuxfoundation.org/mailman/listinfo/fuego
> <https://lists.linuxfoundation.org/mailman/listinfo/fuego>
> 
> 


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Fuego] [PATCH 3/3] Add CheckScreenshot fuego_release_test dependencies
  2018-05-05 19:54     ` Gustavo Sverzut Barbieri
@ 2018-05-07 22:24       ` Tim.Bird
  0 siblings, 0 replies; 11+ messages in thread
From: Tim.Bird @ 2018-05-07 22:24 UTC (permalink / raw)
  To: barbieri; +Cc: fuego



> -----Original Message-----
> From: Gustavo Sverzut Barbieri
> 
> On Fri, May 4, 2018 at 5:22 PM, <Tim.Bird@sony.com> wrote:
> >
> >
> >
> > > -----Original Message-----
> > > From: Guilherme Campos Camargo
> > > A new class of tests has been included in fuego_release_test. The
> > > purpose of this new class is to compare screenshots.
> > >
> > > This patch adds the newly required dependencies: imagemagick and
> > > python-pillow, that are used by CheckScreenshot.
> > >
> > > Signed-off-by: Guilherme Campos Camargo <guicc@profusion.mobi>
> > > ---
> > >  Dockerfile | 5 ++++-
> > >  1 file changed, 4 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/Dockerfile b/Dockerfile
> > > index f148cf7..09e3c00 100644
> > > --- a/Dockerfile
> > > +++ b/Dockerfile
> > > @@ -78,10 +78,13 @@ RUN apt-get update && \
> > >          chromium \
> > >          curl \
> > >          gnupg2 \
> > > +        imagemagick \
> > >          python3 \
> > >          python3-pip \
> > > +        python3-pillow \
> > >          software-properties-common && \
> > > -    pip3 install \
> > > +    rm -rf /var/lib/apt/lists/* && \
> >
> > This line kind of scares me.  What is this doing, and why?
> 
> basically this is the standard approach for debian + docker: install
> then cleanup local caches as they just take space in the final image,
> without much benefit (since "apt-get update" will regenerate those
> files anyway).

OK - sounds good.
 -- Tim


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2018-05-07 22:24 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-02 21:27 [Fuego] [PATCH 0/3] Install fuego_release_test dependencies on fuego Guilherme Campos Camargo
2018-05-02 21:27 ` [Fuego] [PATCH 1/3] Install Fuego Release Test dependencies and add fuego-test board Guilherme Campos Camargo
2018-05-04 20:20   ` Tim.Bird
2018-05-07 14:47     ` Guilherme Camargo
2018-05-07 17:16       ` Tim.Bird
2018-05-02 21:27 ` [Fuego] [PATCH 2/3] Return error if docker install script fails Guilherme Campos Camargo
2018-05-04 20:21   ` Tim.Bird
2018-05-02 21:27 ` [Fuego] [PATCH 3/3] Add CheckScreenshot fuego_release_test dependencies Guilherme Campos Camargo
2018-05-04 20:22   ` Tim.Bird
2018-05-05 19:54     ` Gustavo Sverzut Barbieri
2018-05-07 22:24       ` Tim.Bird

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.