From a812b5684a44f1c11ebe8ad98ef6f103636d2138 Mon Sep 17 00:00:00 2001
From: Olaf Bohlen <olbohlen@eenfach.de>
Date: Wed, 02 Oct 2019 12:56:21 +0200
Subject: [PATCH] initial commit

---
 openshift-diagrams.pdf |    0 
 openshift-diagrams.org |  129 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 129 insertions(+), 0 deletions(-)

diff --git a/openshift-diagrams.org b/openshift-diagrams.org
new file mode 100644
index 0000000..0feda9d
--- /dev/null
+++ b/openshift-diagrams.org
@@ -0,0 +1,129 @@
+#+TODO: TODO(t) NEXT(n) WAITING(w) SOMEDAY(s) DELEGATED(g) PROJ(p) PLANNED(l) | DONE(d) FORWARDED(f) CANCELLED(c)
+#+PRIORITIES: A D D
+#+OPTIONS: H:1 author:nil toc:nil date:nil t:nil <:t e:t p:t num:nil
+#+TITLE: OpenShift Diagrams by Olaf Bohlen
+#+LaTeX_CLASS: article
+#+LaTeX_HEADER: \usepackage[ttscale=.875]{libertine}
+#+LaTeX_HEADER: \usepackage{sectsty}
+#+LaTeX_HEADER: \sectionfont{\normalfont\scshape}
+#+LaTeX_HEADER: \subsectionfont{\normalfont\itshape}
+#+LATEX_HEADER: \renewcommand\maketitle{}
+
+* Deployment on OpenShift with images
+
+#+BEGIN_SRC ditaa :file ocp-dep-image1.png :cmdline -r
+oc new-app sample.registry.org/user/image:tag
+   |
+   |                             
+   | (1)  +-------------+   points to    +------------------------------------+
+   +--->  | ImageStream |  ----------->  | external Registry cRED {s}         |
+   |      | (IS)        |                | sample.registry.org/user/image:tag |
+   |      +-------------+                +------------------------------------+
+   |             ^
+   |             | points to
+   | (2)  +------------------+  (5) creates                       +-----------------------+
+   +--->  | DeploymentConfig | -------------------------------->  | ReplicationController |                
+   |      | (DC)             |  (4)         +-----------+         | (RC)                  |
+   |      |                  | --------->   | DeployPod |         +-----------------------+
+   |      +------------------+  creates     +-----------+                 |
+   |                                              | (6) creates           |scales &
+   |                                              v                       |monitors
+   | (3)  +---------+   load balances   +----------------+                |
+   +--->  | Service |  -------------->  | ApplicationPod |  <-------------+
+          | (SVC)   |                   |                |
+          +---------+                   +----------------+
+#+END_SRC
+
+#+results:
+[[file:ocp-dep-image1.png]]
+
+* Deployment on OpenShift with Source-to-Image (S2I)
+
+#+BEGIN_SRC ditaa :file ocp-dep-s2i1.png :cmdline -rE
+oc new-app http://git.repo-server.org/sampleapp
+       |
+       |                             
+       | (1)  +-------------+   points to    +----------------------------+    +------------------------------------+
+       +--->  | ImageStream |  ----------->  | internal Registry cBLU {s} |    | external Registry cRED {s}         |
+       |      | (IS)        |<+              | sampleapp:latest           |    | sample.registry.org/ose/s2ibuilder |
+       |      +-------------+ |              +----------------------------+    +------------------------------------+
+       |                      |                  ^                                      ^
+       |                      |                  | (9) docker commits                   | points to
+       |                      |                  |                                      |
+       | (2)  +-------------+ |(5) creates   +--------------+  (6) docker run      +-----------------+
+       +--->  | BuildConfig | |----------->  | BuilderPod   | ------------------>  | S2I ImageStream |
+       |      | (BC)        | |              | (8) assemble |                      | (IS)            |
+       |      +-------------+ |              +--------------+                      +-----------------+
+       |             |        |                  | (7) git clone                        ^
+       |             +--=-----|----=-------------|---=----------------------------------+
+       |       ImageChange    |                  |                                                                   
+       |       Trigger watches|                  v                                                                    
+       |       S2I IS         |              +--------------------------------------+                                
+       |                      |              | git Repository {s}                   |                                
+build  |                      |              | http://git.repo-server.org/sampleapp |                                
+step   |                      :              +--------------------------------------+                                
+-=-----|-=--------------------|--=-------------------------------------------------------------------------------------
+deploy |                      |ImageChange
+step   |                      |Trigger
+       |                      |watches IS 
+       | (3)  +------------------+  (11) creates                      +-----------------------+
+       +--->  | DeploymentConfig | -------------------------------->  | ReplicationController |                
+       |      | (DC)             |  (10)        +-----------+         | (RC)                  |
+       |      |                  | --------->   | DeployPod |         +-----------------------+
+       |      +------------------+  creates     +-----------+                 |
+       |                                              | (12) creates          |scales &
+       |                                              v                       |monitors
+       | (4)  +---------+   load balances   +----------------+                |
+       +--->  | Service |  -------------->  | ApplicationPod |  <-------------+
+              | (SVC)   |                   |                |
+              +---------+                   +----------------+
+#+END_SRC
+
+#+results:
+[[file:ocp-dep-s2i1.png]]
+
+* Input Detection OpenShift 
+#+begin_src plantuml :file openshift-input-detection.png
+!pragma useVerticalIf on
+:oc new-app <input spec>;
+if (docker pull) then (yes)
+  -> yes
+  --docker-image= forces this;
+  :docker run;
+  note: --docker-image= forces this
+  stop
+else (no)
+  :try for an SCM code repo;
+  note: --code forces this
+if (git clone) then (no)
+  :abort with error;
+  stop
+elseif (Dockerfile found?) then (yes)
+  :docker build;
+  note: --strategy=docker forces this
+  :docker run;
+  stop
+else (no)
+  :continue with S2I;
+  note right: --strategy=source forces this
+if (pom.xml found?) then (yes)
+  :search for JEE S2I builder;
+  note: use -i to suggest an S2I image stream (tag);
+  :continue with S2I process;
+  stop
+elseif (index.php found?) then (yes)
+  :search for PHP S2I builder;
+  note 
+    prefix the git url with builderis~ (tilda!) 
+    to turn off language detection and force this builder
+  end note
+  :continue with S2I process;
+  stop
+else
+  :abort with error;
+  stop
+endif
+#+end_src
+
+#+results:
+[[file:openshift-input-detection.png]]
diff --git a/openshift-diagrams.pdf b/openshift-diagrams.pdf
new file mode 100644
index 0000000..8503beb
--- /dev/null
+++ b/openshift-diagrams.pdf
Binary files differ

--
Gitblit v1.9.3