Split up the main page into different parts.

This commit is contained in:
Erik Brakkee 2024-07-29 19:16:48 +02:00
parent fcfe8a6637
commit 8fd17ed75d
4 changed files with 42 additions and 37 deletions

View File

@ -4,6 +4,7 @@ import (
"context" "context"
"converge/pkg/templates" "converge/pkg/templates"
"github.com/a-h/templ" "github.com/a-h/templ"
"log"
"os" "os"
"path/filepath" "path/filepath"
) )
@ -23,17 +24,21 @@ type Rendering struct {
func render(dir string, name string, params Params, render RenderFunc) { func render(dir string, name string, params Params, render RenderFunc) {
fname := filepath.Join(dir, name) fname := filepath.Join(dir, name)
log.Printf("Writing to %s", fname)
f, err := os.Create(fname) f, err := os.Create(fname)
if err != nil { if err != nil {
panic(err) panic(err)
} }
defer f.Close() defer f.Close()
render(params.secure, params.host, params.username).Render(context.Background(), f) err = render(params.secure, params.host, params.username).Render(context.Background(), f)
if err != nil {
panic(err)
}
} }
func main() { func main() {
dir := "html" dir := "html/docs"
params := Params{ params := Params{
secure: "s", secure: "s",

View File

@ -3,42 +3,42 @@ package templates
templ About() { templ About() {
<div> <div>
<h1>About</h1> <h1>About</h1>
<p> <p>
Converge is a utility for troubleshooting builds on continuous integration servers. Converge is a utility for troubleshooting builds on continuous integration servers.
It solves a common problem where the cause of job failure is difficult to determine. It solves a common problem where the cause of job failure is difficult to determine.
This is complicated further by the fact that build jobs are usually run on a build This is complicated further by the fact that build jobs are usually run on a build
farm where there is no access to the build agents or in more modern envrionments when farm where there is no access to the build agents or in more modern envrionments when
jobs are run in ephemeral containers. jobs are run in ephemeral containers.
</p> </p>
<p> <p>
With Converge it is possible to get remote shell access to such jobs. This works With Converge it is possible to get remote shell access to such jobs. This works
by configuring the build job to connect to a Converge server using an agent program. by configuring the build job to connect to a Converge server using an agent program.
The agent program can be downloaded from within the CI job using curl or wget. The agent program can be downloaded from within the CI job using curl or wget.
Next, an end-user can connect to the Converge server, a rendez-vous server, that connects Next, an end-user can connect to the Converge server, a rendez-vous server, that connects
the client and server together. the client and server together.
</p> </p>
<p> <p>
The setup is such that the connection from client (end-user) to server (agent on CI job) The setup is such that the connection from client (end-user) to server (agent on CI job)
is end-to-end encrypted. The Converge server itself is no more than a bitpipe which pumps is end-to-end encrypted. The Converge server itself is no more than a bitpipe which pumps
data between client and agent. data between client and agent.
</p> </p>
<p> <p>
Both ssh and sftp are supported. Multiple shells are also allowed. Both ssh and sftp are supported. Multiple shells are also allowed.
</p> </p>
<p> <p>
There is a timeout mechanism in the agent such that jobs do not hang indefinitely There is a timeout mechanism in the agent such that jobs do not hang indefinitely
waiting for a connection. This mechanism is useful to make sure build agents do not keep waiting for a connection. This mechanism is useful to make sure build agents do not keep
build agents occupied for a long time. By default, the agent exits with status 0 when build agents occupied for a long time. By default, the agent exits with status 0 when
the first client exits after logging in. This behavior as well as general expiry can be the first client exits after logging in. This behavior as well as general expiry can be
controlled from within a shell session by touching a .hold file. After logging in, the controlled from within a shell session by touching a .hold file. After logging in, the
user can control expiry of the session as instructed by messages in the ssh session. user can control expiry of the session as instructed by messages in the ssh session.
When the timeout of a session is near the user is informed about this with messages When the timeout of a session is near the user is informed about this with messages
in the shell. in the shell.
</p> </p>
</div> </div>
} }

View File

@ -18,7 +18,7 @@ templ Downloads() {
<tr> <tr>
<td>agent</td> <td>agent</td>
<td>The agent to run inside aa CI job</td> <td>The agent to run inside aa CI job</td>
<td><a href="docs/agent">agent</a></td> <td><a href="downloads/agent">agent</a></td>
<td><a href="docs/agent.exe">agent.exe</a></td> <td><a href="docs/agent.exe">agent.exe</a></td>
</tr> </tr>
<tr> <tr>

View File

@ -5,14 +5,14 @@ templ Index(secure string, host string, username string) {
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<link rel="stylesheet" href="css/bootstrap.min.css" <link rel="stylesheet" href="../css/bootstrap.min.css"
crossorigin="anonymous"> crossorigin="anonymous">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Converge</title> <title>Converge</title>
</head> </head>
<body> <body>
<script src="js/bootstrap.bundle.min.js" <script src="../js/bootstrap.bundle.min.js"
crossorigin="anonymous"></script> crossorigin="anonymous"></script>
<div class="container-fluid"> <div class="container-fluid">