ClusterManager: Implements support of remote clusters.
After this change users will be able to:
* Create cluster and add/remove servers to it
* Install apps on remote cluster
* Move already installed apps between clusters
* Apps running on server being removed will auto-migrate
to another server from that same cluster
This is achieved by:
* Installing and running minimal version of dodo on remote cluster
* Ingress-nginx is installed automatically on new clusters
* Next to nginx we run VPN client in the same pod, so that
default cluster can establish secure communication with it
* Multiple reverse proxies are configured to get to the
remote cluster service from ingress installed on default cluster.
Next steps:
* Support remote clusters in dodo apps (prototype ready)
* Clean up old cluster when moving app to the new one. Currently
old cluster keeps running app pods even though no ingress can
reach it anymore.
Change-Id: Iffc908c93416d4126a8e1c2832eae7b659cb8044
diff --git a/core/installer/welcome/appmanager-tmpl/cluster.html b/core/installer/welcome/appmanager-tmpl/cluster.html
new file mode 100644
index 0000000..2ef2fbe
--- /dev/null
+++ b/core/installer/welcome/appmanager-tmpl/cluster.html
@@ -0,0 +1,70 @@
+{{ define "header" }}
+<h1>Cluster - {{ .Cluster.Name }}</h1>
+{{ end }}
+
+{{ define "content" }}
+<form action="/clusters/{{ .Cluster.Name }}/remove" method="POST">
+ <button type="submit" name="remove-cluster">remove cluster</button>
+</form>
+<form action="/clusters/{{ .Cluster.Name }}/servers" method="POST" autocomplete="off">
+ <details class="dropdown">
+ <summary id="type">worker</summary>
+ <ul>
+ <li>
+ <label>
+ <input type="radio" name="type" value="worker" checked />
+ worker
+ </label>
+ </li>
+ <li>
+ <label>
+ <input type="radio" name="type" value="controller" />
+ controller
+ </label>
+ </li>
+ </ul>
+ </details>
+ <input type="text" name="ip" placeholder="ip" />
+ <input type="text" name="port" placeholder="22 (optional)" />
+ <input type="text" name="user" placeholder="user" />
+ <input type="password" name="password" placeholder="password" />
+ <button type="submit" name="add-server">add server</button>
+</form>
+{{ $c := .Cluster }}
+<table class="striped">
+ <thead>
+ <tr>
+ <th scope="col">type</th>
+ <th scope="col">hostname</th>
+ <th scope="col">ip</th>
+ <th scope="col">remove</th>
+ </tr>
+ </thead>
+ <tbody>
+ {{ range $s := .Cluster.Controllers }}
+ <tr>
+ <th>controller</th>
+ <th scope="row">{{ $s.Name }}</th>
+ <td>{{ $s.IP }} </td>
+ <td>
+ <form action="/clusters/{{ $c.Name }}/servers/{{ $s.Name }}/remove" method="POST">
+ <button type="submit">remove</button>
+ </form>
+ </td>
+ </tr>
+ {{ end }}
+ {{ range $s := .Cluster.Workers }}
+ <tr>
+ <th>worker</th>
+ <th scope="row">{{ $s.Name }}</th>
+ <td>{{ $s.IP }} </td>
+ <td>
+ <form action="/clusters/{{ $c.Name }}/servers/{{ $s.Name }}/remove" method="POST">
+ <button type="submit">remove</button>
+ </form>
+ </td>
+ </tr>
+ {{ end }}
+ </tbody>
+</table>
+{{ end }}