[bitbake-devel] RFC: Web Hob development
Lv, XiaotongX
xiaotongx.lv at intel.com
Wed May 23 08:14:42 UTC 2012
Hi,
We are developing Web based Hob for Yocto v1.3, and so far the initial demonstration is ready. The code repo is @ (http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=xtlv/webhob-v0.1 ).
With Web Hob, users can customize the image in a browser, but before that, administrators should follow the steps to set up the server for users.
In the repo. it makes up of 2 parts. the 2 parts needs to run separately. one is for bitbake. another is the code based on django framework. django codes only for testing. so the codes is messy.
1. required software and python library.
a. django python library(1.3.1 version, download link, http://www.djangoproject.com/download/1.3.1/tarball/)
b. webpy python library( git clone git://github.com/webpy/webpy.git )
c. Browse r(it must support html 5, we had better use firefox and chrome for the this demo)
d. mysql (version >=5.0)
2. setup
2.1 mysql configurations
a. If u have installed mysql. Pls find 'my.cnf' file to edit. fedora system in /etc/my.cnf, add this statement 'max_allowed_packet=50M' in this file.
[root at lxt ~]$ vim /etc/my.cnf
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
max_allowed_packet=50M
.............
b. create a database named 'bitbake'. import database file in repo @/poky-contrib/bitbake/lib/bb/ui/django_webhob/bitbake.sql.
c. modify 'settings.py' file in repo @/poky-contrib/bitbake/lib/bb/ui/django_webhob/settings.py.
find 'STATIC_ROOT = /home/xiaotong/workspace/python/poky-contrib/bitbake/lib/bb/ui/django_webhob/static/'
'TEMPLATE_DIRS = ('/home/xiaotong/workspace/python/poky-contrib/bitbake/lib/bb/ui/django_webhob/template'
Modify your real path, for example: '/home/xxxxxxxx/ poky-contrib/bitbake/lib/bb/ui/django_webhob/static/'
3. run bitbake with restful helper and django
a. to start bitbake with webhob helper, the command is: bitbake 127.0.0.1:8080 -u webhob
b. to run django web server. switch the directory to '@/poky-contrib/bitbake/lib/bb/ui/django_webhob/', then using the command:
[xiaotong at lxt django_webhob] python manage.py runserver 127.0.0.1:8000
If anything is OK. Open ur browser to visit http://localhost:8000<http://localhost:8000/>.
[cid:12c69363-485a-4866-9922-5e7bdf25a8cc]
4. bitbake restful helper apis:
start bitbake with bitbake 127.0.0.1:8080 -u webhob. then u can open the folllowing restful links.
1.GET Varaibes:
METHOD: GET
API: http://localhost:8080/get/xxxxxxx
get these values:
-----------------------------------------------------------------------
BBLAYERS,DL_DIR,MACHINE,DISTRO,PACKAGE_CLASSES,SSTATE_DIR,SSTATE_MIRROR
BB_NUMBER_THREADS,getCpuCount,PARALLEL_MAKE,DEPLOY_DIR_IMAGE
IMAGE_ROOTFS_EXTRA_SPACE,INCOMPATIBLE_LICENSE,SDKMACHINE,SDK_ARCH ,ETC.
-----------------------------------------------------------------------
2.Find ASyncConfigs:
METHOD: GET
API: http://localhost:8080/action/asyncconfs
3.Get Events:
METHOD: GET
API: http://localhost:8080/action/getevents
4.initcooker:
METHOD: GET
API: http://localhost:8080/action/initcooker
5.resetcooker:
METHOD: GET
API: http://localhost:8080/action/resetcooker
6.forcecancelbuild:
METHOD: GET
API: http://localhost:8080/action/forcecancelbuild
7.unforcecancelbuild:
METHOD: GET
API: http://localhost:8080/action/unforcecancelbuild
8.parserecipe:
METHOD: POST
API: http://localhost:8080/action/parserecipe
PARAMS:
'layers': (list format string: [xxx, xxx] )
'sstatedir': string
'sstatemirror': string
'bbthread': string
'extra_setting': string
'image_extra_size': string
'curr_package_format': (list format string: [xxx, xxx] )
'incompat_license': string
'curr_mach': string
'curr_sdk_machine': string
'packageinfo': string
'dldir': string
'pmake': string
'curr_distro': string
9.buildpkg:
METHOD: POST
API: http://localhost:8080/action/buildpkg
PARAMS:
'layers': (list format string: [xxx, xxx] )
'sstatedir': string
'sstatemirror': string
'bbthread': string
'extra_setting': string
'image_extra_size': string
'curr_package_format': (list format string: [xxx, xxx] )
'incompat_license': string
'curr_mach': string
'curr_sdk_machine': string
'packageinfo': string
'dldir': string
'pmake': string
'curr_distro': string
‘rcp_list’: (list format string: [xxx, xxx] )
10.buildimage:
METHOD: POST
API: http://localhost:8080/action/buildimage
PARAMS:
'layers': (list format string: [xxx, xxx] )
'sstatedir': string
'sstatemirror': string
'bbthread': string
'extra_setting': string
'image_extra_size': string
'curr_package_format': (list format string: [xxx, xxx] )
'incompat_license': string
'curr_mach': string
'curr_sdk_machine': string
'packageinfo': string
'dldir': string
'pmake': string
'curr_distro': string
‘rcp_list’: (list format string: [xxx, xxx] )
‘pkg_list’:(list format string: [xxx, xxx] )
Since we are still in the planning stage of Yocto v1.3, any comments are welcome.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1.png
Type: image/png
Size: 47257 bytes
Desc: 1.png
URL: <http://lists.openembedded.org/pipermail/bitbake-devel/attachments/20120523/704f586c/attachment-0001.png>
More information about the bitbake-devel
mailing list