Hi Matthieu,

Thank you for your email!

I will look at your notes about the "production server" issue and see if I can 
recommend something.

Your work with setting up a toaster service is new to me, and I will study it 
with interest. Hopefully other members will have comments.

- David


From: [email protected] 
[mailto:[email protected]] On Behalf Of ROGEZ Matthieu
Sent: Tuesday, January 16, 2018 8:19 AM
To: [email protected]
Subject: [Toaster] Some issues with current doc

Hi all,

First time Toaster user here. I've been playing around with the latest version 
of toaster (rocko) lately and encountered some issue with the current 
documentation.
Here are some notes and work-arounds I've used to make it work :


-          For the "production" server, I've had to add a "dummy" 
orm/fixtures/custom.xml and use TEMPLATECONF=poky instead of TOASTER_CONF 
variable so that TOASTER_DIR=`pwd` TEMPLATECONF=poky manage.py checksettings 
works

-          But then other issues (don't remember exactly) made me switch back 
to use the "normal" configuration (not production).

-          The systemd toaster service file doesn't allow stopping the service 
and didn't work with my company proxy. Also I didn't wanted to run toaster 
inside screen

Here is what I used:



/etc/system/system/toaster.service



[Unit]

Description=Toaster Service



[Service]

# toaster is not a proper daemon, so we cannot use the forking type

# use the oneshot + RemainAfterExit to model this toaster controller process.

# Proper systemd integration would completely bypass the toaster script and 
directly

# control runbuilds and runserver as system services.

Type=oneshot

RemainAfterExit=yes



# I use a simple user named "user"

User=user

WorkingDirectory=/home/user/poky/



# UGLY: Patch away the killing loop to let systemd terminate runbuilds and 
runserver processes

# Otherwise, the original script wasn't able to TERM the other processes

# when executed as a systemd service. Instead it was looping until reaching the 
systemd timeout

# and therefore was killed without being able to properly terminate child 
processes

ExecStartPre=/bin/sh -c 'sed -e "s/kill -0 \$pid 2>\/dev\/null/false/" 
bitbake/bin/toaster > bitbake/bin/toaster2'



# I'm using a system v215 on a Debian 8.5

# I've tried many ways to get my service to honor the {http,https,no}_proxy env 
variables

# such as PassEnvironment=http_proxy, or 
[Manage]DefaultEnvironment=http_proxy=my_proxy.address:port/ in system.conf, ...

# but none worked (bugs that may be fixed with recent versions ?)

# So I resort to sourcing a simple proxy.sh script which export the relevant 
proxy env variables

ExecStart=/bin/bash -c 'source /etc/profile.d/proxy.sh && source 
oe-init-build-env build && source ../bitbake/bin/toaster2 start 
webport=0.0.0.0:8000'

ExecStop=/bin/bash -c 'source /etc/profile.d/proxy.sh && source 
oe-init-build-env build && source ../bitbake/bin/toaster2 stop'



[Install]

WantedBy=multi-user.target



I'm sure there might be better ways of dealing with these issues, but I 
couldn't find any quickly.
Hope it will help other users here. Maybe some of this could be used to update 
the current documentation ?

Thanks for this awesome project !
Matthieu


[https://portal.fivesgroup.com/FIRSTspiritWeb/fivesportal/media/images_for_content/fives_1/signatures/logo_tagline_small.jpg]



Matthieu  ROGEZ

Software Development Engineer | Ingénieur Développement Info.

- Intralogistics

Fives Intralogistics S.A.S

Rue Fleury Jay

Grigny,  69520 - France

Tel: +33 4 78 73 00 07

Fax: +33 4 78 73 00 89


[email protected]<mailto:[email protected]>

www.fivesgroup.com<http://www.fivesgroup.com>

[https://portal.fivesgroup.com/FIRSTspiritWeb/fivesportal/media/images_for_content/fives_1/signatures/signature_facebook.png]<https://www.facebook.com/pages/Fives/278132595611080>[https://portal.fivesgroup.com/FIRSTspiritWeb/fivesportal/media/images_for_content/fives_1/signatures/signature_linkedin.png]<http://www.linkedin.com/company/fives?trk=top_nav_home>




-- 
_______________________________________________
toaster mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/toaster

Reply via email to