All of lore.kernel.org
 help / color / mirror / Atom feed
* [Fuego] [PATCH] install-debian: fix jenkins installation
@ 2019-03-14  8:07 Daniel Sangorrin
  2019-03-14  8:38 ` daniel.sangorrin
  2019-03-26 20:30 ` Tim.Bird
  0 siblings, 2 replies; 5+ messages in thread
From: Daniel Sangorrin @ 2019-03-14  8:07 UTC (permalink / raw)
  To: fuego

There is a problem with authentication because we copy
config.xml too late. Probably the same problem occurs
with the Dockerfile.

Signed-off-by: Daniel Sangorrin <daniel.sangorrin@toshiba.co.jp>
---
 install-debian.sh | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/install-debian.sh b/install-debian.sh
index 62bf799..f3df91b 100755
--- a/install-debian.sh
+++ b/install-debian.sh
@@ -118,6 +118,7 @@ if [ $nojenkins -eq 0 ]; then
 	chown -R jenkins:jenkins /fuego
 	chown -R jenkins:jenkins /fuego-ro
 	chown -R jenkins:jenkins /fuego-rw
+	chown -R jenkins:jenkins /fuego-core
 
 	source /etc/default/jenkins && \
 		JENKINS_ARGS="$JENKINS_ARGS --prefix=/fuego" && \
@@ -134,12 +135,19 @@ if [ $nojenkins -eq 0 ]; then
 
 	sed -i -e "s#8080#$JENKINS_PORT#g" /etc/default/jenkins
 
-
 	cp /fuego/frontend-install/install-plugins.sh \
 		/fuego/frontend-install/jenkins-support \
 		/fuego/frontend-install/clitest \
 		/usr/local/bin/
 
+	cp /fuego/frontend-install/config.xml $JENKINS_HOME/config.xml
+	ln -s /fuego-rw/logs $JENKINS_HOME/userContent/fuego.logs
+	mkdir $JENKINS_HOME/userContent/docs
+	cp /fuego/docs/fuego-docs.pdf $JENKINS_HOME/userContent/docs/fuego-docs.pdf
+	jenkins cp /fuego/frontend-install/jenkins.model.JenkinsLocationConfiguration.xml $JENKINS_HOME/jenkins.model.JenkinsLocationConfiguration.xml
+	sed -i -e "s#8080#$JENKINS_PORT#g" $JENKINS_HOME/jenkins.model.JenkinsLocationConfiguration.xml
+	chown -R jenkins:jenkins $JENKINS_HOME/
+
 	# install flot.hpi manually from local file
 	service jenkins start && \
 		sleep 30 && \
@@ -149,9 +157,6 @@ if [ $nojenkins -eq 0 ]; then
 		sleep 10 && \
 		service jenkins stop
 
-	echo -e "done"
-	exit 0
-
 	# install other plugins from Jenkins update center
 	# NOTE: not sure all of these are needed, but keep list
 	# compatible with 1.2.1 release for now
@@ -180,11 +185,6 @@ if [ $nojenkins -eq 0 ]; then
 		rm $JENKINS_HOME/plugins/flot/flot/mod.js && \
 		ln -s /fuego-core/scripts/mod.js $JENKINS_HOME/plugins/flot/flot/mod.js
 
-	ln -s /fuego-rw/logs $JENKINS_HOME/userContent/fuego.logs
-	cp /fuego/docs/fuego-docs.pdf $JENKINS_HOME/userContent/docs/fuego-docs.pdf
-	cp /fuego/frontend-install/config.xml $JENKINS_HOME/config.xml
-	cp /fuego/frontend-install/jenkins.model.JenkinsLocationConfiguration.xml $JENKINS_HOME/jenkins.model.JenkinsLocationConfiguration.xml
-	sed -i -e "s#8080#$JENKINS_PORT#g" $JENKINS_HOME/jenkins.model.JenkinsLocationConfiguration.xml
 	chown -R jenkins:jenkins $JENKINS_HOME/
 else
 	sed -i -e 's/jenkins_enabled=1/jenkins_enabled=0/g' /fuego-ro/conf/fuego.conf
-- 
2.7.4


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

* Re: [Fuego] [PATCH] install-debian: fix jenkins installation
  2019-03-14  8:07 [Fuego] [PATCH] install-debian: fix jenkins installation Daniel Sangorrin
@ 2019-03-14  8:38 ` daniel.sangorrin
  2019-03-26 20:36   ` Tim.Bird
  2019-03-26 20:30 ` Tim.Bird
  1 sibling, 1 reply; 5+ messages in thread
From: daniel.sangorrin @ 2019-03-14  8:38 UTC (permalink / raw)
  To: daniel.sangorrin, fuego

Hi Tim,

I hadn't done enought tests when i submitted this script and as you see there was even and "exit 0" for debugging purposes. Sorry about that.
This seems to be working now.

I was thinking about reworking the Dockerfile to just call this script. What do you think?

Thanks,
Daniel


> -----Original Message-----
> From: fuego-bounces@lists.linuxfoundation.org <fuego-bounces@lists.linuxfoundation.org> On Behalf Of
> Daniel Sangorrin
> Sent: Thursday, March 14, 2019 5:07 PM
> To: fuego@lists.linuxfoundation.org
> Subject: [Fuego] [PATCH] install-debian: fix jenkins installation
> 
> There is a problem with authentication because we copy
> config.xml too late. Probably the same problem occurs
> with the Dockerfile.
> 
> Signed-off-by: Daniel Sangorrin <daniel.sangorrin@toshiba.co.jp>
> ---
>  install-debian.sh | 18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/install-debian.sh b/install-debian.sh
> index 62bf799..f3df91b 100755
> --- a/install-debian.sh
> +++ b/install-debian.sh
> @@ -118,6 +118,7 @@ if [ $nojenkins -eq 0 ]; then
>  	chown -R jenkins:jenkins /fuego
>  	chown -R jenkins:jenkins /fuego-ro
>  	chown -R jenkins:jenkins /fuego-rw
> +	chown -R jenkins:jenkins /fuego-core
> 
>  	source /etc/default/jenkins && \
>  		JENKINS_ARGS="$JENKINS_ARGS --prefix=/fuego" && \
> @@ -134,12 +135,19 @@ if [ $nojenkins -eq 0 ]; then
> 
>  	sed -i -e "s#8080#$JENKINS_PORT#g" /etc/default/jenkins
> 
> -
>  	cp /fuego/frontend-install/install-plugins.sh \
>  		/fuego/frontend-install/jenkins-support \
>  		/fuego/frontend-install/clitest \
>  		/usr/local/bin/
> 
> +	cp /fuego/frontend-install/config.xml $JENKINS_HOME/config.xml
> +	ln -s /fuego-rw/logs $JENKINS_HOME/userContent/fuego.logs
> +	mkdir $JENKINS_HOME/userContent/docs
> +	cp /fuego/docs/fuego-docs.pdf $JENKINS_HOME/userContent/docs/fuego-docs.pdf
> +	jenkins cp /fuego/frontend-install/jenkins.model.JenkinsLocationConfiguration.xml
> $JENKINS_HOME/jenkins.model.JenkinsLocationConfiguration.xml
> +	sed -i -e "s#8080#$JENKINS_PORT#g"
> $JENKINS_HOME/jenkins.model.JenkinsLocationConfiguration.xml
> +	chown -R jenkins:jenkins $JENKINS_HOME/
> +
>  	# install flot.hpi manually from local file
>  	service jenkins start && \
>  		sleep 30 && \
> @@ -149,9 +157,6 @@ if [ $nojenkins -eq 0 ]; then
>  		sleep 10 && \
>  		service jenkins stop
> 
> -	echo -e "done"
> -	exit 0
> -
>  	# install other plugins from Jenkins update center
>  	# NOTE: not sure all of these are needed, but keep list
>  	# compatible with 1.2.1 release for now
> @@ -180,11 +185,6 @@ if [ $nojenkins -eq 0 ]; then
>  		rm $JENKINS_HOME/plugins/flot/flot/mod.js && \
>  		ln -s /fuego-core/scripts/mod.js $JENKINS_HOME/plugins/flot/flot/mod.js
> 
> -	ln -s /fuego-rw/logs $JENKINS_HOME/userContent/fuego.logs
> -	cp /fuego/docs/fuego-docs.pdf $JENKINS_HOME/userContent/docs/fuego-docs.pdf
> -	cp /fuego/frontend-install/config.xml $JENKINS_HOME/config.xml
> -	cp /fuego/frontend-install/jenkins.model.JenkinsLocationConfiguration.xml
> $JENKINS_HOME/jenkins.model.JenkinsLocationConfiguration.xml
> -	sed -i -e "s#8080#$JENKINS_PORT#g"
> $JENKINS_HOME/jenkins.model.JenkinsLocationConfiguration.xml
>  	chown -R jenkins:jenkins $JENKINS_HOME/
>  else
>  	sed -i -e 's/jenkins_enabled=1/jenkins_enabled=0/g' /fuego-ro/conf/fuego.conf
> --
> 2.7.4
> 
> _______________________________________________
> Fuego mailing list
> Fuego@lists.linuxfoundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/fuego

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

* Re: [Fuego] [PATCH] install-debian: fix jenkins installation
  2019-03-14  8:07 [Fuego] [PATCH] install-debian: fix jenkins installation Daniel Sangorrin
  2019-03-14  8:38 ` daniel.sangorrin
@ 2019-03-26 20:30 ` Tim.Bird
  1 sibling, 0 replies; 5+ messages in thread
From: Tim.Bird @ 2019-03-26 20:30 UTC (permalink / raw)
  To: daniel.sangorrin, fuego

Look OK.  Applied to fuegotest 'next' branch.
 -- Tim


> -----Original Message-----
> From: Daniel Sangorrin
> There is a problem with authentication because we copy
> config.xml too late. Probably the same problem occurs
> with the Dockerfile.
> 
> Signed-off-by: Daniel Sangorrin <daniel.sangorrin@toshiba.co.jp>
> ---
>  install-debian.sh | 18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/install-debian.sh b/install-debian.sh
> index 62bf799..f3df91b 100755
> --- a/install-debian.sh
> +++ b/install-debian.sh
> @@ -118,6 +118,7 @@ if [ $nojenkins -eq 0 ]; then
>  	chown -R jenkins:jenkins /fuego
>  	chown -R jenkins:jenkins /fuego-ro
>  	chown -R jenkins:jenkins /fuego-rw
> +	chown -R jenkins:jenkins /fuego-core
> 
>  	source /etc/default/jenkins && \
>  		JENKINS_ARGS="$JENKINS_ARGS --prefix=/fuego" && \
> @@ -134,12 +135,19 @@ if [ $nojenkins -eq 0 ]; then
> 
>  	sed -i -e "s#8080#$JENKINS_PORT#g" /etc/default/jenkins
> 
> -
>  	cp /fuego/frontend-install/install-plugins.sh \
>  		/fuego/frontend-install/jenkins-support \
>  		/fuego/frontend-install/clitest \
>  		/usr/local/bin/
> 
> +	cp /fuego/frontend-install/config.xml $JENKINS_HOME/config.xml
> +	ln -s /fuego-rw/logs $JENKINS_HOME/userContent/fuego.logs
> +	mkdir $JENKINS_HOME/userContent/docs
> +	cp /fuego/docs/fuego-docs.pdf
> $JENKINS_HOME/userContent/docs/fuego-docs.pdf
> +	jenkins cp /fuego/frontend-
> install/jenkins.model.JenkinsLocationConfiguration.xml
> $JENKINS_HOME/jenkins.model.JenkinsLocationConfiguration.xml
> +	sed -i -e "s#8080#$JENKINS_PORT#g"
> $JENKINS_HOME/jenkins.model.JenkinsLocationConfiguration.xml
> +	chown -R jenkins:jenkins $JENKINS_HOME/
> +
>  	# install flot.hpi manually from local file
>  	service jenkins start && \
>  		sleep 30 && \
> @@ -149,9 +157,6 @@ if [ $nojenkins -eq 0 ]; then
>  		sleep 10 && \
>  		service jenkins stop
> 
> -	echo -e "done"
> -	exit 0
> -
>  	# install other plugins from Jenkins update center
>  	# NOTE: not sure all of these are needed, but keep list
>  	# compatible with 1.2.1 release for now
> @@ -180,11 +185,6 @@ if [ $nojenkins -eq 0 ]; then
>  		rm $JENKINS_HOME/plugins/flot/flot/mod.js && \
>  		ln -s /fuego-core/scripts/mod.js
> $JENKINS_HOME/plugins/flot/flot/mod.js
> 
> -	ln -s /fuego-rw/logs $JENKINS_HOME/userContent/fuego.logs
> -	cp /fuego/docs/fuego-docs.pdf
> $JENKINS_HOME/userContent/docs/fuego-docs.pdf
> -	cp /fuego/frontend-install/config.xml $JENKINS_HOME/config.xml
> -	cp /fuego/frontend-
> install/jenkins.model.JenkinsLocationConfiguration.xml
> $JENKINS_HOME/jenkins.model.JenkinsLocationConfiguration.xml
> -	sed -i -e "s#8080#$JENKINS_PORT#g"
> $JENKINS_HOME/jenkins.model.JenkinsLocationConfiguration.xml
>  	chown -R jenkins:jenkins $JENKINS_HOME/
>  else
>  	sed -i -e 's/jenkins_enabled=1/jenkins_enabled=0/g' /fuego-
> ro/conf/fuego.conf
> --
> 2.7.4
> 
> _______________________________________________
> Fuego mailing list
> Fuego@lists.linuxfoundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/fuego

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

* Re: [Fuego] [PATCH] install-debian: fix jenkins installation
  2019-03-14  8:38 ` daniel.sangorrin
@ 2019-03-26 20:36   ` Tim.Bird
  2019-03-28  7:56     ` daniel.sangorrin
  0 siblings, 1 reply; 5+ messages in thread
From: Tim.Bird @ 2019-03-26 20:36 UTC (permalink / raw)
  To: daniel.sangorrin, fuego



> -----Original Message-----
> From: daniel.sangorrin@toshiba.co.jp
> 
> Hi Tim,
> 
> I hadn't done enought tests when i submitted this script and as you see there
> was even and "exit 0" for debugging purposes. Sorry about that.
> This seems to be working now.
> 
> I was thinking about reworking the Dockerfile to just call this script. What do
> you think?

I don't have an strong opinion.  If it means not having to maintain the same
commands in two places (in the install-debian.sh script and in Docker file)
then that's a plus.  I think also it would result in fewer docker intermediate
images in the cache, if I understand correctly, which would cut down on disk
space for a build.

Would we get step-by-step error handling in the script, like we do with the
Docker container, so we could easily  debug a broken step in the script?
 -- Tim


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

* Re: [Fuego] [PATCH] install-debian: fix jenkins installation
  2019-03-26 20:36   ` Tim.Bird
@ 2019-03-28  7:56     ` daniel.sangorrin
  0 siblings, 0 replies; 5+ messages in thread
From: daniel.sangorrin @ 2019-03-28  7:56 UTC (permalink / raw)
  To: Tim.Bird, fuego

> -----Original Message-----
> From: Tim.Bird@sony.com <Tim.Bird@sony.com>
> > -----Original Message-----
> > From: daniel.sangorrin@toshiba.co.jp
> >
> > Hi Tim,
> >
> > I hadn't done enought tests when i submitted this script and as you see there
> > was even and "exit 0" for debugging purposes. Sorry about that.
> > This seems to be working now.
> >
> > I was thinking about reworking the Dockerfile to just call this script. What do
> > you think?
> 
> I don't have an strong opinion.  If it means not having to maintain the same
> commands in two places (in the install-debian.sh script and in Docker file)
> then that's a plus.  I think also it would result in fewer docker intermediate
> images in the cache, if I understand correctly, which would cut down on disk
> space for a build.
> 
> Would we get step-by-step error handling in the script, like we do with the
> Docker container, so we could easily  debug a broken step in the script?

OK.
Yes, we can have step-by-step error handling. 
The only downside is that we will lose the "cache" that Docker provides however.
An alternative, would be to divide the script into multiple scripts and call them from the Dockerfile.

By the way, today I was having problems installing Fuego because jessie repositories were not available. It could be a proxy issue though.

Thanks,
Daniel




>  -- Tim


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

end of thread, other threads:[~2019-03-28  7:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-14  8:07 [Fuego] [PATCH] install-debian: fix jenkins installation Daniel Sangorrin
2019-03-14  8:38 ` daniel.sangorrin
2019-03-26 20:36   ` Tim.Bird
2019-03-28  7:56     ` daniel.sangorrin
2019-03-26 20:30 ` 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.