From 461eaa299ad7ec8969d00d26b5b8fe29953fb24e Mon Sep 17 00:00:00 2001 From: Marcello Stanisci Date: Mon, 7 Nov 2016 16:28:34 +0100 Subject: Adapting to #4758 --- buildbot/master-lonelyslave.cfg | 180 ++++++++++++++++++++++++++++++++++++ buildbot/master.cfg | 4 + etc/nginx/sites-enabled/test.site | 4 +- taler-arm/taler-demobank-admin.conf | 4 + 4 files changed, 190 insertions(+), 2 deletions(-) create mode 100644 buildbot/master-lonelyslave.cfg create mode 100644 taler-arm/taler-demobank-admin.conf diff --git a/buildbot/master-lonelyslave.cfg b/buildbot/master-lonelyslave.cfg new file mode 100644 index 0000000..dd7db46 --- /dev/null +++ b/buildbot/master-lonelyslave.cfg @@ -0,0 +1,180 @@ +# -*- python -*- +# ex: set syntax=python: + +c = BuildmasterConfig = {} +local = "${HOME}/local" + +####### LOGS SIZE + +c['changeHorizon'] = 20 +c['buildHorizon'] = 10 +c['eventHorizon'] = 5 +c['logHorizon'] = 4 +c['buildCacheSize'] = 2 + +####### BUILDSLAVES + +from buildbot.buildslave import BuildSlave +c['slaves'] = [BuildSlave("lonelySlave", "taler")] + +c['protocols'] = {'pb': {'port': 9989}} + +####### CHANGESOURCES +# They are just "pointers" to monitored codebases. + + +from buildbot.changes.gitpoller import GitPoller +c['change_source'] = [] +c['change_source'].append(GitPoller( + 'git://git.taler.net/exchange.git', + workdir='gitpoller-workdir', branches=True, + pollinterval=300)) +c['change_source'].append(GitPoller( + 'git://git.taler.net/merchant.git', + workdir='gitpoller-workdir', branches=True, + pollinterval=300)) +c['change_source'].append(GitPoller( + 'git://git.taler.net/bank.git', + workdir='gitpoller-workdir', branches=True, + pollinterval=300)) +c['change_source'].append(GitPoller( + 'git://git.taler.net/merchant-frontends.git', + workdir='gitpoller-workdir', branches=True, + pollinterval=300)) + +####### SCHEDULERS +# They take action: actually trigger the build. + +from buildbot.schedulers.basic import SingleBranchScheduler +from buildbot.schedulers.forcesched import * +from buildbot.schedulers.timed import * +from buildbot.changes import filter + +c['schedulers'] = [] +git_master = SingleBranchScheduler( + name="global-master", + reason="Commit pushed for one of the sub-projects", + change_filter=filter.ChangeFilter(branch='master'), + treeStableTimer=300, + builderNames=["lonelyness", "lcov-build"]) + +force = ForceScheduler( + name="force-build", + revision=FixedParameter(name="revision", default=""), + repository=FixedParameter(name="repository", default=""), + project=FixedParameter(name="project", default=""), + builderNames=["lonelyness"]) + +# For now, the whole withdraw/pay cliking is started manually +# (as the blue-green infrastructure needs some upgrading) +force-click = ForceScheduler( + name="force-clicking", + revision=FixedParameter(name="revision", default=""), + repository=FixedParameter(name="repository", default=""), + project=FixedParameter(name="project", default=""), + builderNames=["auto-click"]) + + +c['schedulers'] = [force, git_master, force-clicking] + +####### BUILDERS +# They know *how* to build: which scripts need to be invoked, +# where in the filesystem.. + +from buildbot.process.factory import BuildFactory +from buildbot.steps.source.git import Git +from buildbot.steps.shell import ShellCommand +from buildbot.steps.shell import Configure +from buildbot.steps.shell import Compile +from buildbot.steps.shell import Test +import os + +lonelyness = BuildFactory() +lonelyness.addStep(Git(repourl='git://git.taler.net/deployment.git', + mode='full', + method='fresh', + alwaysUseLatest=True, + haltOnFailure=True, + branch='master')) +lonelyness.addStep(ShellCommand(name="switcher", + description="Lone compilation..", + descriptionDone="Compilation passed", + command=["make"], + workdir="build/taler-build", + env={'PATH': "${HOME}/local/bin:${PATH}", + 'TALER_CHECKDB': "postgres:///talercheck-${USER}"})) +lcov = BuildFactory() +lcov.addStep(Git(repourl='git://git.taler.net/deployment.git', + mode='full', + method='fresh', + alwaysUseLatest=True, + haltOnFailure=True, + branch='master')) +lcov.addStep(ShellCommand( + name="invalidation", + description="Invalidating timestamps", + descriptionDone="timestamps invalidated", + command=["./invalidate.sh"], + workdir="build/taler-build")) +lcov.addStep(ShellCommand( + name="builder", + description="Compiling..", + descriptionDone="lcov files generated", + command=["make", "lcov"], + workdir="build/taler-build")) + +autoClick = BuildFactory() +autoClick.addStep(ShellCommand( + name="auto-click", + description="Performing demo", + descriptionDone="Demo finished", + command=["launch_selenium_test.sh"], + env={'PATH': "${HOME}/deployment/docker/selenium:${PATH}"})) + +from buildbot.config import BuilderConfig + +c['builders'] = [] +c['builders'].append( + BuilderConfig(name="lone-builder", + slavenames=["lonelySlave"], + factory=lonelyness)) +c['builders'].append( + BuilderConfig(name="lcov-build", + slavenames=["lcovSlave"], + factory=lcov)) +c['builders'].append( + BuilderConfig(name="auto-click", + slavenames=["containersSlave"], + factory=autoClick)) + + +####### STATUS TARGETS + +c['status'] = [] +from buildbot.status import html +from buildbot.status.web import authz, auth + +authz_cfg=authz.Authz( + # change any of these to True to enable; see the manual for more + # options + auth=auth.BasicAuth([("marcello","taler")]), + gracefulShutdown = False, + forceBuild = 'auth', # use this to test your slave once it is set up + forceAllBuilds = False, + pingBuilder = False, + stopBuild = False, + stopAllBuilds = False, + cancelPendingBuild = False, +) +c['status'].append(html.WebStatus(http_port=8010, authz=authz_cfg)) + +####### PROJECT IDENTITY +c['title'] = "Taler" +c['titleURL'] = "http://taler.net" + +c['buildbotURL'] = "http://buildbot.taler.net" + +####### DB URL +c['db'] = { + 'db_url' : "sqlite:///state.sqlite", +} diff --git a/buildbot/master.cfg b/buildbot/master.cfg index 1103e9f..5d795f6 100644 --- a/buildbot/master.cfg +++ b/buildbot/master.cfg @@ -23,6 +23,7 @@ c['slaves'] = [BuildSlave("testGreenSlave", "taler"), c['protocols'] = {'pb': {'port': 9989}} ####### CHANGESOURCES +# They are just "pointers" to monitored codebases. from buildbot.changes.gitpoller import GitPoller @@ -45,6 +46,7 @@ c['change_source'].append(GitPoller( pollinterval=300)) ####### SCHEDULERS +# They take action: actually trigger the build. from buildbot.schedulers.basic import SingleBranchScheduler from buildbot.schedulers.forcesched import * @@ -74,6 +76,8 @@ selenium = Periodic( c['schedulers'] = [force, git_master, selenium] ####### BUILDERS +# They know *how* to build: which scripts need to be invoked, +# where in the filesystem.. from buildbot.process.factory import BuildFactory from buildbot.steps.source.git import Git diff --git a/etc/nginx/sites-enabled/test.site b/etc/nginx/sites-enabled/test.site index 3d363ab..9ede3b8 100644 --- a/etc/nginx/sites-enabled/test.site +++ b/etc/nginx/sites-enabled/test.site @@ -101,12 +101,12 @@ server { include conf.d/talerssl; location /admin/add/incoming { - uwsgi_pass unix:/tmp/bank-admin.uwsgi; + uwsgi_pass unix:/home/test/sockets/bank-admin.uwsgi; include /etc/nginx/uwsgi_params; } location / { - uwsgi_pass unix:/tmp/bank.uwsgi; + uwsgi_pass unix:/home/sockets/bank.uwsgi; include /etc/nginx/uwsgi_params; } diff --git a/taler-arm/taler-demobank-admin.conf b/taler-arm/taler-demobank-admin.conf new file mode 100644 index 0000000..c9fa207 --- /dev/null +++ b/taler-arm/taler-demobank-admin.conf @@ -0,0 +1,4 @@ +[taler-demobank-admin] +TYPE = simple +BINARY = taler-bank-manage +OPTIONS = --admin serve-uwsgi -- cgit v1.2.3