Using Toaster in a Production Environment



Similar documents
Installing an open source version of MateCat

Yocto Project Eclipse plug-in and Developer Tools Hands-on Lab

Introduction to FreeNAS development

How to Install Multicraft on a VPS or Dedicated Server (Ubuntu bit)

Rapid Website Deployment With Django, Heroku & New Relic

The Yocto Project Eclipse plug-in: An Effective IDE Environment for Embedded Application and System Developers

Integrated version control with Fossil SCM

Developing applications on Yocto. Lianhao Lu Intel Corporation Feb. 29th, 2012

DjNRO Release 0.9 July 14, 2015

How to Scale out SharePoint Server 2007 from a single server farm to a 3 server farm with Microsoft Network Load Balancing on the Web servers.

Best Practices for Python in the Cloud: Lessons

Setup Guide for AD FS 3.0 on the Apprenda Platform

WEBAPP PATTERN FOR APACHE TOMCAT - USER GUIDE

Git - Working with Remote Repositories

Developing Embedded Linux Devices Using the Yocto Project

depl Documentation Release depl contributors

Ruby on Rails (Ruby 1.9.2, Rails 3.1.1) Installation

ABRAHAM ARCHITECTURE OF A CLOUD SERVICE USING PYTHON TECHNOLOGIES

See the installation page

This section is intended to provide sample configurations and script examples common to long-term operation of a Jive SBS installation.

IOTIVITY AND EMBEDDED LINUX SUPPORT. Kishen Maloor Intel Open Source Technology Center

Migrating helpdesk to a new server

APP DEVELOPMENT ON THE CLOUD MADE EASY WITH PAAS

Memopol Documentation

DevShop. Drupal Infrastructure in a Box. Jon Pugh CEO, Founder ThinkDrop Consulting Brooklyn NY

IERG 4080 Building Scalable Internet-based Services

Nupic Web Application development

CDH installation & Application Test Report

Phoronix Test Suite v5.8.0 (Belev)

How To Install Linux, Apache, MySQL, PHP (LAMP) stack on Ubuntu

Developing Embedded Linux Devices Using the Yocto Project

Working with Structured Data in Microsoft Office SharePoint Server 2007 (Part1): Configuring Single Sign On Service and Database

CPE111 COMPUTER EXPLORATION

IIS, FTP Server and Windows

WSO2 Business Process Server Clustering Guide for 3.2.0

Secure Messaging Server Console... 2

Ulteo Open Virtual Desktop Installation

INUVIKA OVD INSTALLING INUVIKA OVD ON UBUNTU (TRUSTY TAHR)

Using Cacti To Graph MySQL s Metrics

Microsoft Enterprise Search for IT Professionals Course 10802A; 3 Days, Instructor-led

Installing Booked scheduler on CentOS 6.5

Network Management & Monitoring Request Tracker (RT) Installation and Configuration

linux20 (R12 Server) R Single Node SID - TEST linux1 (10gAS Server) Oracle 10gAS ( ) with OID SID - asinf server name

Yocto Project ADT, Eclipse plug-in and Developer Tools

Python and Google App Engine

Insight Video Net. LLC. CMS 2.0. Quick Installation Guide

MyMoney Documentation

Host your websites. The process to host a single website is different from having multiple sites.

Project management integrated into Outlook

Bubble Code Review for Magento

Source Code Management for Continuous Integration and Deployment. Version 1.0 DO NOT DISTRIBUTE

Configuring IBM HTTP Server as a Reverse Proxy Server for SAS 9.3 Web Applications Deployed on IBM WebSphere Application Server

MIGRATING TO AVALANCHE 5.0 WITH MS SQL SERVER

Putting It All Together. Vagrant Drush Version Control

System i Access for Web Configuring an Integrated Web Application Server Instance

The full setup includes the server itself, the server control panel, Firebird Database Server, and three sample applications with source code.

SSM6437 DESIGNING A WINDOWS SERVER 2008 APPLICATIONS INFRASTRUCTURE

CCM 4350 Week 11. Security Architecture and Engineering. Guest Lecturer: Mr Louis Slabbert School of Science and Technology.

MAMP 3 User Guide! March 2014 (c) appsolute GmbH!

Security Workshop. Apache + SSL exercises in Ubuntu. 1 Install apache2 and enable SSL 2. 2 Generate a Local Certificate 2

Using MySQL for Big Data Advantage Integrate for Insight Sastry Vedantam

Red Hat Network Satellite (On System z) 18-JUNE CAVMEN Meeting

Setup Guide: Server-side synchronization for CRM Online and Exchange Server

Continuous Integration. CSC 440: Software Engineering Slide #1

ALERT installation setup

inforouter V8.0 Server Migration Guide.

StoreGrid Backup Server With MySQL As Backend Database:

Installation documentation for Ulteo Open Virtual Desktop

SIG-NOC Meeting - Stuttgart 04/08/2015 Icinga - Open Source Monitoring

HOSTING PYTHON WEB APPLICATIONS. Graham Dumpleton PyCon Australia Sydney 2011

Websense Support Webinar: Questions and Answers

WEBTITAN CLOUD. User Identification Guide BLOCK WEB THREATS BOOST PRODUCTIVITY REDUCE LIABILITIES

Avatier Identity Management Suite

Architecting ColdFusion For Scalability And High Availability. Ryan Stewart Platform Evangelist

Tuskar UI Documentation

IP Application Security Manager and. VMware vcloud Air

E-Commerce for IT Advanced. Louis Aguila & Matt Burt

Solution for private cloud computing

Enterprise-level EE: Uptime, Speed, and Scale

10231B: Designing a Microsoft SharePoint 2010 Infrastructure

This presentation is an introduction to the SQL Server Profiler tool.

Build it with Drupal 8

PZVM1 Administration Guide. V1.1 February 2014 Alain Ganuchaud. Page 1/27

How To Install Storegrid Server On Linux On A Microsoft Ubuntu 7.5 (Amd64) Or Ubuntu (Amd86) (Amd77) (Orchestra) (For Ubuntu) (Permanent) (Powerpoint

AWS Schema Conversion Tool. User Guide Version 1.0

Adafruit's Raspberry Pi Lesson 7. Remote Control with VNC

Modelling with R and MySQL. - Manual - Gesine Bökenkamp, Frauke Wiese, Clemens Wingenbach

Extending Remote Desktop for Large Installations. Distributed Package Installs

Getting Started with SandStorm NoSQL Benchmark

SchoolBooking LDAP Integration Guide

SQL Server Setup for Assistant/Pro applications Compliance Information Systems

SAP Business Objects Data Services Setup Guide

Compiere ERP & CRM Installation Instructions Windows System - EnterpriseDB

Microsoft Windows Storage Server 2003 R2

Transcription:

Using Toaster in a Production Environment Alexandru Damian, David Reyna, Belén Barros Pena Yocto Project Developer Day ELCE 17 Oct 2014

Introduction Agenda: What is Toaster Toaster out of the box Toaster in a production environment Comparison of database servers Comparison of web servers Toaster: interaction with auto build and auto test tools How-to guide of a best practice configuration Toaster in the real world

What is Toaster The new UI interface for the Yocto Project Project and management isolation and scalability System scalability, remote management

Toaster out of the box Toaster provides a simple out-of-box configuration, where a few commands will automatically set up an sqlite database and start a Django web server. This default setup is sufficient to immediately support a small number of users and projects, before you move on to the more robust and scalable solutions. Host Project sqlite Bitbake Toaster Django Server Browser

How-to: Starting Toaster out of the box Set up the project Start Toaster data collection and web server Build the project Open Toaster in browser and see results $ source poky/oe-init-build-env $ source toaster start $ bitbake core-image-minimal $ xdg-open http://localhost:8000/ $

Toaster in a production environment

Advantages of Production Environment for Toaster Multiple clients Multiple build machines Scalability and reliability Ability for long-term data trending analysis Build Blade(s) Build Host Projects Bitbake Toaster DB Host sql Web Host Web Server Client s Browser

Review of Database Servers Sqlite3 default server Advantages: No configuration needed, easy installation Emphasizes economy, efficiency, independence, and simplicity for data storage local applications and devices Disadvantages: No remote host access, slow, no transactional support MySQL or PostgreSQL server Advantages: Advanced SQL features, fast, reliable Emphasizes scalability, concurrency, centralization, and control Disadvantages: Some more complex setup, Need a good database administrator to tune it out

Review of Web Servers Django development server Advantages: Available with out-of-box Django installations No configuration needed Disadvantages: Very poor performance, no customization, security issues Apache or nginx server Advantages: Very fast, very configurable Disadvantages: Needs complex configurations, and a system administrator to look after it

Toaster and autobuilders/auto-testers Toaster is not a replacement for your continuous integration software Toaster interacts with your continuous integration software Toaster provides an interface that is customized and fine-tuned to the capabilities (and quirks) of the Yocto Project build system Which means an easier way to configure and debug your Yocto Project builds

How-to Guide Setting up a Toaster production environment with MySQL and Apache

Checkout toaster for server use Select location for production toaster, and checkout bitbake Install all dependencies Make it reachable by the Apache user $ mkdir /opt/ && cd /opt/ $ git clone git://git.openembedded.org/bitbake #production...or for the test-to-merge branch $ git clone -b toaster/install_test --single-branch \ http://git.yoctoproject.org/git/poky-contrib bitbake $ pip install -r /opt/bitbake/toaster-requirements.txt $ chgrp -R www-data: /opt/bitbake/lib/toaster/

Configuring MySQL Install mysql-server Create a sql user account, and database with minimal rights (not like in the example) Update bitbake/lib/toaster/toastermain/settings.py root$ apt-get install mysql-server root$ mysql -u root mysql> CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password'; mysql> GRANT ALL PRIVILEGES ON *. * TO 'newuser'@'localhost'; mysql> GRANT ALL PRIVILEGES ON *. * TO 'newuser'@'localhost'; mysql> CREATE DATABASE 'toaster'; root$ cat /opt/bitbake/lib/toaster/toastermain/settings.py DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'toaster', 'USER': 'newuser', 'PASSWORD': 'password', 'HOST': '127.0.0.1', 'PORT': '3306', }

Configuring Apache Install Apache and mod_wsgi Configure Apache to load Toaster root$ apt-get install apache2 libapache2-mod-wsgi root$ a2enmod wsgi root$ cat /etc/apache2/sites-available/000-default.conf # the WSGIPythonPath is global WSGIPythonPath /opt/bitbake/lib/toaster/ #snip in VirtualHost WSGIScriptAlias / /opt/bitbake/lib/toaster/toastermain/wsgi.py <Directory //opt/bitbake/lib/toaster/toastermain/> <Files wsgi.py> Require all granted </Files> </Directory>

Configuring Apache (continued) Collect static media from Toaster Configure Apache to serve static media $ mkdir /var/www/html/static && cd /var/www/html/static $ /opt/bitbake/lib/toaster/manage.py collectstatic $ cat /etc/apache2/sites-available/000-default.conf # in VirtualHost, AHEAD of the WSGIScriptAlias definition Alias /static/ /var/www/html/static/ <Directory /var/www/html/static/> Require all granted </Directory> WSGIScriptAlias / /opt/bitbake/lib/toaster/toastermain/wsgi.py

Starting up Toaster Sync databases for toaster Start apache root$ /opt/bitbake/lib/toaster/manage.py syncdb root$ /opt/bitbake/lib/toaster/manage.py migrate orm root$ service apache2 restart # when happy with the toaster settings.py, # save it in your local git: root$ cd /opt/bitbake root$ git commit -p -m Local custom settings.py

Use Toaster to log your builds Configure Database settings in your source tree settings.py, build and see results # set database in the poky source tree to point to the same database instance user$ cat ~/poky/bitbake/lib/toaster/toastermain/settings.py DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'toaster', 'USER': 'newuser', 'PASSWORD': 'password', 'HOST': '127.0.0.1', 'PORT': '3306', } # build as normal with toaster user$ source oe-init-build-env user$ source toaster start user$ bitbake core-image-minimal # open up the web interface to see your builds user$ xdg-open http://[server-address]/toastergui/

Some Big Gotchas Under wsgi, all Python environment (like libs, interpreters, etc) are shared on the same instance of Apache. This may lead to some very un-intuitive results if you want to run two different django apps on the same apache server. The recommended way to multiplex django apps under a single server is run each Django app in its own apache instance, and provide a single routing point using a reverse-proxy nginx server. Apache/wsgi aggressively caches the.py files in the application, in other words if you make changes to your application they won't be picked up on the fly like with the Django development server, so you need to restart apache. Neither the database nor the queries have been tuned for the high workloads such as on a build farm. It may work out of the box, it may not, so further testing is needed.

Toaster in the Real World

Real world uses of Toaster Wind River has been using Toaster for the last 6 months in production environments. Lessons learned include: The toaster captured build event data was being clobbered if an eventhandler was defined in any bitbake class that didn't have an eventmask We found that the 'best practice' to provide an event mask for each event handler (which filtered the 'right' events being sent to an event handler) was not always implemented in Wind River bbclasses A race condition was discovered when starting bitbake server, observer, and a build of a specific target when the launches were split out of the original upstream script Wind River is moving Toaster into its build farm: Leverage Toaster s HTTP-based remote interface Leverage Toaster s error capture and presentation Leverage new insights from the big data of 10,000+ build logs

Toaster : The plan

An IDE for distribution engineers? Understand the build process (analysis) Configure and start builds (the basics) DONE IN PROGRESS Modify create image recipes (customization) Share metadata, configuration and artifacts (collaboration) Edit and patch source (development) Layer sources, error collection and analysis, presentation of performance benchmarks and test results, whatever else you want (additional goodies)

The goal An easy way to deal with the Yocto Project build system, and a controlled and safe configuration environment for your customers and developers (i.e. a build system fit for humans)

Questions and Answers

Thank you for your participation!