版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、Continuous Integrationin the Cloudwith HudsonKohsuke KawaguchiJesse GlickSun Microsystems, Inc.Hudson committersRise of Continuous IntegrationOffload from people, push to computers2$timecomputersusSpend more CPU power to help you even if it only helps a littleFirst on your laptops and workstationslI
2、DEs are at the forefrontAnd then to the serversla.k.a. “Continuous Integration”lMore frequent build/test executionslStatic code analysis toolslAnd more to come3HudsonOpen-source CI server at Emphasis on ease of installation and usel“java -jar hudson.war” executionlConfigure everything from browsersE
3、xtensibilityl140+ community-developed public pluginslBy 150+ contributorsEstimated 13,000 installations4https:/ basically does builds and testsCheck out the source codelSubversion, Perforce, Git, Mercurial, CVS, Do builds and/or testslAnt, Maven, MSBuild, shell script, Record resultslBinary, test re
4、sults, code coverage, static analysisNotify peoplelE-mail, IM, RSS, tray apps, IDEs5Localized to 8 languages6And hopefully more to come78Adoption in all kinds of businesses9Why Distributed Builds?You need to use multiple computers becauselYou need different environmentslYou need isolationTheres only
5、 so much you can do with 1 computer10Before we talk about cloudsGoing virtual doesnt solvelSoftware installation problemlNode failure problemlRemote maintenance problemlWhat does Hudson do to help you with these?11Installing new slavesFor first 20 or so slaves, we did it manuallylInsert CD, click, t
6、ype, click, type, click, lBut that doesnt scaleThen we automatedlAvailable as “Hudson PXE Plugin”12Automated System Installations13SlaveslPower on, hit F12lPC boots from network (PXE)Hudson + PXE pluginlISO images of OSAutomated System Installations14SlaveslPower on, hit F12lPC boots from network (P
7、XE)lChoose OS from menulInstalls non-interactivelyHudson + PXE pluginlISO images of OSYour corporate IT guy & his DHCP serverAutomated System InstallationsSupports OpenSolaris, Ubuntu, CentOS, FedoralTrivial with most LinuxCooperate with Windows, tooQuite useful outside Hudson, toolNo more broke
8、n CD driveslNo more CD-Rs15Distributed builds with HudsonMasterlServes HTTP requestslStores all important infoSlavesl170KB single JARlAssumed to be unreliablelScale to at least 100LinklSingle bi-di byte streamlNo other requirements16Masterslave1slave2slave3slave4slave5slave6slave7slave8How master an
9、d slaves start talkingFor Unix slaves, via SSHlOnly need SSH and JRE on slaveslWe just need a host name17How master and slaves start talkingFor Windows, DCOMlWe just need admin user name and passwordlNo manual interventionlWorks even from Unix masters18How master and slaves start talkingVia Java Web
10、 StartlWhen master cannot see slaveslA separate socket connection is made19Automating JNLP launchOnce started, can be installed as Windows service20Automating JNLP launchEmulate the JNLP client headless21$ java -jar slave.jar -jnlpUrl URLAutomated Tool Installation - JDKJDK from http:/ automatically
11、 chooses the right bundlelAlways up to date with new releases22Automated Tool Installation - ApacheAnt and Maven from Apache23Automated Tool Installation - CustomDownload arbitrary archive and unpack24Automated Tool Installation - CustomRun arbitrary shell commandslCan have variants by OS25Automated
12、 Tool Installation - ExtensibleWrite your ownlSimple Hudson extensionlJust write Java code to create tool on slaveIn progress:lSCMs Mercurial, lInstall from Subversion26Heterogeneous Cluster ChallengeYour builds/tests need to run in specific environmentDependency on individual nodes hurts utilizatio
13、n27WombatWindows testHudson Windows testWindows #1jobsslavesGlassFishWindows testWindows #2Solaris#1Hudson Solaris testLabels to rescueLabel is a group of slavesTie jobs to labels28WombatWindows testHudson Windows testWindows #1jobsslavesGlassFishWindows testWindows #2Solaris#1Hudson Solaris testWin
14、dowsSolarisWindows #3Making builds stickyWe want jobs to be mostly on the same slavelFaster check outlConsistent resultslMinimizes disk consumptionBut does it softlyHudson uses consistent hash* to achieve thisMore schedule controls become possible:lUse faster machines more frequentlylSlowly ramp up
15、newly installed slaves29Coming to your Hudson soon* /wiki/Consistent_hashingForecasting failuresHudson monitors key health metrics of slaveslLow disk space, insufficient swaplClock out of synchlExtensibleSlaves go offline automaticallyCatch problems before they break builds30Cl
16、ean up mess after buildsKill runaway processeslDaemons, background processes left by your buildlWorks on Windows, Linux, Mac, and Solaris31Load Statistics Monitoring32When its time to add more slaves33Hudson made this extensibleHudson detects excessive workloadHudson notifies pluginsPlugins can prov
17、ision more slavesl assuming that you have that infrastructure3435Amazon EC2: The GoodPay as you go (10/h or so)lLoads on Hudson tend to be spikyProgrammable APIInstances launch at machine-speedEC2 instances are forgetful36Amazon EC2: The BadYour data is still inside your firewalllTakes time to check
18、 out codel or to archive build artifactslSome data just cant be movedEC2 instances are forgetfulCan your tests run in parallel?37Hudson EC2 pluginBuilt on top of typica*What does it do?lAutomatically provisions slaves on EC2 on demandlPicks the right AMI depending on demandlStarts slave agentlShuts
19、down unused instances38* http:/ it all together39time# of executorscapacityusagequeue lengthHudson “Appliance” on EC2Run the master in the cloud too, if you likelHudson on stock OpenSolaris AMIlData stored persistently in Elastic Block StoragelDynamically expandable thanks to ZFSlOnline, tooPackaged
20、 as a wizard404142Hudson Hadoop pluginlJust a few mouse clicks to installlTurn every Hudson slave into a Hadoop nodeDistributed file systemlAutomatic data replication (fault tolerant)lNice for storing old artifacts, logs, test records, Map/reduce frameworklLarge scale test results analysis / datamin
21、inglMore interesting work to be done in the future43Hudson Selenium PluginSeleniumlTests webapps by scripting browsersSelenium GridlRuns Selenium over a grid of computersAllow Hudson labels to specify where to start browsersHudson & Selenium both need heterogeneous cluster44Selenium Grid45Hudson master(selenium hub)Hudson slavesConclusionCI is here to staylWell continue to push more workload to serversHudson makes this easy for youReap the benefit of a cluster in multiple ways46Resourceshttp:/ “Hudson Community Meet u
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 初中-布局B-精简-随机版
- 企业主要负责人安全生产工作述职报告(3篇)
- 大堂经理个人工作述职报告范文(3篇)
- 校园网络账号注册使用安全细则
- 语文备课组述职报告(6篇)
- 2026年临床执业医师综合考试二试真题及答案
- 年产15万吨固体有机肥和5万吨液体水溶肥项目可行性研究报告模板立项申批备案
- 传染病及突发公共卫生事件培训试题及答案
- 2026医院医疗卫生法律法规题库和参考答案
- 思想品德述职报告2026(3篇)
- 2026年企业财务管理与审计方案
- 2026上海市就业援藏事业单位专项招聘9人笔试题库及参考答案详解(满分必刷)
- 2026年云南省昆明市重点学校初一入学数学分班考试试题及答案
- 医院门诊检验标本采集工作手册
- 西师大版小学二年级上册数学全册教学设计
- 《养老机构智慧消防管理数字化平台建设技术规范》
- 蜘蛛咬伤诊疗规范
- 内蒙古荣达可再生能源发展有限公司建设25kt-a脱硫副产物硫膏、硫渣提纯工业硫磺综合利用项目水土保持报告表
- 辅助生殖控制性卵巢刺激临床应用专家共识(2026版)
- 2025版《首钢集团有限公司职工违规行为处理办法》
- 2026年深度学习及其应用-复旦大学中国大学mooc课后章节答案期末题库试题含答案详解(考试直接用)
评论
0/150
提交评论