summaryrefslogtreecommitdiff
path: root/architecture.mdwn
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2018-04-05 11:18:39 +0300
committerLars Wirzenius <liw@liw.fi>2018-04-05 11:18:39 +0300
commit506d1cd84c74ecee08d067f71de2ef78ff436295 (patch)
tree0d60f6b49ac60d27e5c18f5b35333570c7fc1d1a /architecture.mdwn
parent4af24ef1a1ef5d49ecf4cf7f3d34e9d5e17feed4 (diff)
downloadick.liw.fi-506d1cd84c74ecee08d067f71de2ef78ff436295.tar.gz
Change: update full build description for ALPHA-6
This drops many things that will probably be added later, but it's important to describe the reality. Or the achievable reality, in this case.
Diffstat (limited to 'architecture.mdwn')
-rw-r--r--architecture.mdwn85
1 files changed, 34 insertions, 51 deletions
diff --git a/architecture.mdwn b/architecture.mdwn
index 02e2c6a..4a44487 100644
--- a/architecture.mdwn
+++ b/architecture.mdwn
@@ -73,6 +73,7 @@ This might be expressed as an Ick configuration like this:
pipelines:
- get_source
- build_ikiwiki_site
+ - publish_html
pipelines:
@@ -89,14 +90,22 @@ This might be expressed as an Ick configuration like this:
params['git_url'], 'src'])
- pipeline: build_ikiwiki_site
+ actions:
+ - python: |
+ import subprocess
+ def R(*args):
+ subprocess.check_call(*args, stdout=None, stderr=None)
+ R(['ikiwiki', 'src/ikiwiki.setup'])
+
+ - pipeline: publish_html
parameters:
- rsync_target
actions:
- - python: |
+ - shell: |
import subprocess
def R(*args):
subprocess.check_call(*args, stdout=None, stderr=None)
- R(['ql-ikiwiki-publish', 'src', params['rsync_target']])
+ R(['rsync', '-a', '--delete', 'html/.', params['rsync_target']])
Note that pipelines are defined in the configuration by the user.
Eventually, Ick will come with libraries of pre-defined pipelines that
@@ -330,16 +339,17 @@ Pipeline descriptions happen in the same way, except using different
resources.
-A full build (FIXME: badly out of date)
+A full build
=============================================================================
Next we look at how the various components interact during a complete
-build, using a single worker, which is trusted with credentials. We
-assume the worker has been registered and projects added.
+build, using a single worker, which is trusted with credentials to
+external systems. We assume the worker has been registered and
+projects added.
The sequence diagrams in this chapter have been split into stages, to
-make them easier to view and read. Each diagram after the first one
-continues where the previous one left off.
+make them easier to view and read. Each diagram continues where the
+previous one left off.
Although not shown in the diagrams, the same sequence is meant to work
if having multiple projects running concurrently on multiple workers.
@@ -356,8 +366,9 @@ Trigger build by pushing changes to git server
gitano -> controller : GET /projects/foo/+trigger (no auth)
note right
Git server notifies
- controller that a git
- repo has changed
+ controller that a
+ project needs to be
+ built
end note
@enduml
@@ -381,31 +392,14 @@ to the powerful worker.
|||
- trusty -> controller : GET /worker/trusty (token E)
+ trusty -> controller : GET /work/trusty (token E)
controller --> trusty : "clone website source into workspace"
trusty -> gitano : git clone
gitano --> trusty : website source code
- trusty -> controller : POST /worker/trusty, exit=0 (token E)
-
- |||
-
- trusty -> controller : GET /worker/trusty (token E)
- controller -> trusty : "notify trigger service pipeline is finished **successfully**"
- trusty -> trigger : GET /pipelines/website/getsource, exit=0 (token E)
- note right
- No need to have the trigger service query the controller since
- it has been told the status of pipeline by the worker.
- end note
- trusty -> controller : POST /worker/trusty, exit=0 (token E)
- note right
- If the notification to the trigger service failed,
- this can be reported to the controller for logging.
- end note
- trigger -> controller : POST /projects/website/pipelines/ikiwiki/+start (token D)
+ trusty -> controller : POST /work, exit=0 (token E)
@enduml
The first pipeline finished, and the website building can start.
-That's the second pipeline, which has just been started.
Pipeline 2: Build static web site
@@ -418,19 +412,16 @@ there and it just needs to perform the build.
hide footbox
title Build static website
- trusty -> controller : GET /worker/trusty (token E)
+ trusty -> controller : GET /work/trusty (token E)
controller -> trusty : "build static website"
trusty -> trusty : run ikiwiki to build site
- trusty -> controller : POST /worker/trusty, exit=0 (token E)
-
- |||
-
- trusty -> controller : GET /worker/trusty (token E)
- controller -> trusty : "notify trigger service pipeline is finished"
- trusty -> controller : POST /worker/trusty, exit=0 (token E)
- trusty -> trigger : GET /pipelines/website/ikiwiki (token E)
- trigger -> controller : GET /projects/website/pipelines/ikiwiki (token D)
- trigger -> controller : POST /projects/website/pipelines/publish/+start (token D)
+ note right
+ Running happens
+ directly on the
+ host in the
+ example.
+ end note
+ trusty -> controller : POST /work, exit=0 (token E)
@enduml
@@ -449,22 +440,14 @@ worker to the actual web server.
trusty -> controller : GET /worker/trusty (token E)
controller -> trusty : "rsync static website to web server"
trusty -> webserver : rsync
- trusty -> controller : POST /worker/trusty, exit=0 (token E)
+ trusty -> controller : POST /work, exit=0 (token E)
- |||
+ @enduml
- trusty -> controller : GET /worker/trusty (token E)
- controller --> trusty : "notify trigger service pipeline is finished"
- trusty -> controller : POST /worker/trusty, exit=0 (token E)
- trusty -> trigger : GET /pipelines/website/publish (token E)
- trigger -> controller : GET /projects/website/pipelines/ikiwiki (token D)
- note right
- There are no further pipelines.
- end note
+The website is now built and published. The controller won't give
+anything else to do to the worker until a new build is started.
- @enduml
-The website is now built and published.
Ick APIs
=============================================================================