You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cmd/cli_cicd.go
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,8 @@ import (
10
10
varcicdCmd=&cobra.Command{
11
11
Use: "cicd",
12
12
Short: "Generate CICD for gh repo",
13
+
Long: `
14
+
This command allows you to setup cicd for your git repo, it creates a custom deployments and adds a workflow for building and pushing to the kthcloud registry on push / merge to main ".github/workflows/".`,
Copy file name to clipboardExpand all lines: cmd/cli_compose.go
+34Lines changed: 34 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -19,11 +19,22 @@ import (
19
19
varcomposeCmd=&cobra.Command{
20
20
Use: "compose",
21
21
Short: "Deploy and manage Docker Compose projects on the cloud",
22
+
Long: `
23
+
Compose lets you describe multiple deployments in yaml files similary to how you would do it with docker compose.
24
+
25
+
The services described in the yaml files can be brought up on the cloud, you can bring them down, stop them or see logs from them.`,
22
26
}
23
27
24
28
varcomposeParseCmd=&cobra.Command{
25
29
Use: "parse",
26
30
Short: "Parse a docker-compose.yaml or docker-compose.yml file",
31
+
Long: `
32
+
A simple command that parses a compose file into kthclouds create deployment json format.
33
+
34
+
The compose file can be specified with the --file flag.
35
+
36
+
Adding the --json flag will return pure json as response.`,
37
+
Example: "kthcloud compose parse",
27
38
Run: func(cmd*cobra.Command, args []string) {
28
39
json, err:=cmd.Flags().GetBool("json")
29
40
iferr!=nil {
@@ -48,6 +59,20 @@ var composeParseCmd = &cobra.Command{
48
59
varcomposeUpCmd=&cobra.Command{
49
60
Use: "up",
50
61
Short: "Deploy compose configuration to cloud",
62
+
Long: `
63
+
This command allows you to bring up a local compose definition to kthcloud.
64
+
65
+
It will automatically detect if you have custom deployments in your config that needs to be built.
66
+
[!NOTE]: To keep track of custom deployments a file in "./.kthcloud/DEPLOYMENT" is made (relative to the build context of the service). This file contains the UUID of the deployment that the service maps to.
67
+
68
+
To rebuild services you can apply the --build flag to rebuild all services, or specify the ones you want to rebuild.
69
+
70
+
Volumes can be defined and managed, but it is done in a hacky way. Since the storage (filebrowser) instance that gets deployed for your user is behind a oauth2 proxy that only uses cookies for authentication. The current solution is as mention very hacky as it will try to scrape your browser for these cookies to authenticate. This only works on Linux and MacOS, but it can be unreliable since browser companies dont want you to be able too scrape stuff like this.
71
+
72
+
Default behaviour of this command will after creating all the deployments setup SSE log streams from all created deployments to your terminal. This can be skipped by adding the -d flag.`,
@@ -82,6 +107,9 @@ var composeUpCmd = &cobra.Command{
82
107
varcomposeDownCmd=&cobra.Command{
83
108
Use: "down",
84
109
Short: "Bring down compose configuration to cloud",
110
+
Long: `
111
+
This command will bring down all services specified in the compose file. By default custom deployments wont be brought down, this can be changed with the -a flag.`,
112
+
Example: "kthcloud compose --file ./compose.yaml down -a",
85
113
Run: func(cmd*cobra.Command, args []string) {
86
114
all, err:=cmd.Flags().GetBool("all")
87
115
iferr!=nil {
@@ -105,6 +133,10 @@ var composeDownCmd = &cobra.Command{
105
133
varcomposeStopCmd=&cobra.Command{
106
134
Use: "stop",
107
135
Short: "Stop compose configuration to cloud",
136
+
Long: `
137
+
This command will disable all services specified in the compose file. This is done my setting their replicas to zero.
138
+
139
+
[!NOTE]: At the time of writing this there is currently a but that when trying to re-enable these services later requires you to change more than just setting replicas back to 1 or whatever value it was before.`,
108
140
Run: func(cmd*cobra.Command, args []string) {
109
141
compose, err:=parser.GetCompose()
110
142
iferr!=nil {
@@ -123,6 +155,8 @@ var composeStopCmd = &cobra.Command{
123
155
varcomposeLogsCmd=&cobra.Command{
124
156
Use: "logs",
125
157
Short: "Get logs from deployments in the compose file",
158
+
Long: `
159
+
This command allows you to get all logs from the services specified in the compose file.`,
Copy file name to clipboardExpand all lines: cmd/cli_login.go
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,11 @@ import (
9
9
varloginCmd=&cobra.Command{
10
10
Use: "login",
11
11
Short: "Log in to kthcloud using Keycloak and retrieve the authentication token",
12
+
Long: `
13
+
Lets you log in to kthcloud by opening a local server on ":3000" and opening your browser to kthclouds keycloak server with the redirect uri set to the local http server so the accesstoken can be retrieved.
14
+
15
+
On Linux make sure you have "xdg-open" (should be included by default in most distros) and a browser for this to work.`,
Copy file name to clipboardExpand all lines: cmd/cli_ps.go
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,11 @@ import (
12
12
varpsCmd=&cobra.Command{
13
13
Use: "ps",
14
14
Short: "List deployments",
15
+
Long: `
16
+
This command lets you list your deploymentss that are running, adding the -a or --all flag will list all deploymentss and wont filter to only the ones with resourceRunning status.
17
+
18
+
For VMs you can use the "kthcloud vm ps" command instead.`,
Copy file name to clipboardExpand all lines: cmd/cli_root.go
+9-2Lines changed: 9 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -37,8 +37,12 @@ var rootCmd = &cobra.Command{
37
37
}
38
38
39
39
varversionCmd=&cobra.Command{
40
-
Use: "version",
41
-
Short: "See the version of the binary",
40
+
Use: "version",
41
+
Aliases: []string{"v"},
42
+
Short: "See the version of the binary",
43
+
Long: `
44
+
Prints out the version of the binary that you are running. The version uses the build timestamp but in the future this might change to semantic versioning since it is more supported with gos versioning of packages.`,
Copy file name to clipboardExpand all lines: cmd/cli_run.go
+6-1Lines changed: 6 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,12 @@ import (
12
12
varrunCmd=&cobra.Command{
13
13
Use: "run",
14
14
Short: "Run a container",
15
-
Args: cobra.MinimumNArgs(1),
15
+
Long: `
16
+
This command allows you to start up containers similarly to dockers run command. It has options to remove it when you exit (with ctrl + c), get logs and more.
17
+
18
+
Ports can be added with the -p or --p flag, you can just like docker add multiple ports, but in this case only the first port is used for the ingress (the one you can reach from outside the cluster) the rest of the ports are added as "internal" ports and are only exposed internally to the cluster.`,
19
+
Example: "kthcloud run --rm -it -p 80 nginx:latest",
0 commit comments