Skip to content

Commit 106f6a3

Browse files
committed
docs: Format Get Started guide
Signed-off-by: Stefan Prodan <[email protected]>
1 parent 87bd1d4 commit 106f6a3

File tree

1 file changed

+111
-35
lines changed

1 file changed

+111
-35
lines changed

Diff for: docs/quickstart.md

+111-35
Original file line numberDiff line numberDiff line change
@@ -35,40 +35,90 @@ you have to specify the container registry address and the version of a module.
3535
For example, to install the latest stable version of [podinfo](https://github.com/stefanprodan/podinfo)
3636
in a new namespace:
3737

38-
```console
39-
$ timoni -n test apply podinfo oci://ghcr.io/stefanprodan/modules/podinfo --version latest
40-
pulling oci://ghcr.io/stefanprodan/modules/podinfo:latest
41-
using module timoni.sh/podinfo version 6.5.4
42-
installing podinfo in namespace test
43-
Namespace/test created
44-
ServiceAccount/test/podinfo created
45-
Service/test/podinfo created
46-
Deployment/test/podinfo created
47-
waiting for 3 resource(s) to become ready...
48-
all resources are ready
49-
```
38+
=== "command"
39+
40+
```shell
41+
timoni -n test apply podinfo oci://ghcr.io/stefanprodan/modules/podinfo
42+
```
43+
44+
=== "output"
45+
46+
```text
47+
pulling oci://ghcr.io/stefanprodan/modules/podinfo:latest
48+
using module timoni.sh/podinfo version 6.5.4
49+
installing podinfo in namespace test
50+
Namespace/test created
51+
ServiceAccount/test/podinfo created
52+
Service/test/podinfo created
53+
Deployment/test/podinfo created
54+
waiting for 3 resource(s) to become ready...
55+
all resources are ready
56+
```
57+
58+
The apply command pulls the module from the container registry,
59+
creates the Kubernetes resources in the specified namespace,
60+
and waits for all resources to become ready.
61+
62+
To learn more about all the available apply options, use `timoni apply --help`.
5063

5164
## List and inspect instances
5265

53-
You can list all instances in a cluster with `timoni ls -A`.
66+
You can list all instances in a cluster with:
5467

55-
To get more information on an instance, you can use the `timoni inspect` sub-commands:
68+
=== "command"
5669

57-
```console
58-
$ timoni -n test inspect module podinfo
59-
name: timoni.sh/podinfo
60-
version: 6.5.4
61-
repository: oci://ghcr.io/stefanprodan/modules/podinfo
62-
digest: sha256:1dba385f9d56f9a79e5b87344bbec1502bd11f056df51834e18d3e054de39365
63-
```
70+
```shell
71+
timoni list -A
72+
```
6473

65-
To learn more about the available commands, use `timoni inspect --help`.
74+
=== "output"
75+
76+
```text
77+
NAME NAMESPACE MODULE VERSION LAST APPLIED BUNDLE
78+
podinfo test oci://ghcr.io/stefanprodan/modules/podinfo 6.5.4 2024-01-20T19:51:17Z -
79+
```
6680

6781
To see the status of the Kubernetes resources managed by an instance:
6882

69-
```shell
70-
timoni -n test status podinfo
71-
```
83+
=== "command"
84+
85+
```shell
86+
timoni -n test status podinfo
87+
```
88+
89+
=== "output"
90+
91+
```text
92+
last applied 2024-01-20T19:51:17Z
93+
module oci://ghcr.io/stefanprodan/modules/podinfo:6.5.4
94+
digest sha256:1dba385f9d56f9a79e5b87344bbec1502bd11f056df51834e18d3e054de39365
95+
container image ghcr.io/curl/curl-container/curl-multi:master
96+
container image ghcr.io/stefanprodan/podinfo:6.5.4
97+
ServiceAccount/test/podinfo Current - Resource is current
98+
Service/test/podinfo Current - Service is ready
99+
Deployment/test/podinfo Current - Deployment is available. Replicas: 1
100+
```
101+
102+
To get more information on an instance, you can use the `timoni inspect` sub-commands.
103+
104+
For example, to list the module URL, version and OCI digest of the podinfo instance:
105+
106+
=== "command"
107+
108+
```shell
109+
timoni -n test inspect module podinfo
110+
```
111+
112+
=== "output"
113+
114+
```text
115+
digest: sha256:1dba385f9d56f9a79e5b87344bbec1502bd11f056df51834e18d3e054de39365
116+
name: timoni.sh/podinfo
117+
repository: oci://ghcr.io/stefanprodan/modules/podinfo
118+
version: 6.5.4
119+
```
120+
121+
To learn more about the available commands, use `timoni inspect --help`.
72122

73123
## Configure a module instance
74124

@@ -89,24 +139,50 @@ values: {
89139

90140
Apply the config to the podinfo module to perform an upgrade:
91141

92-
```shell
93-
timoni -n test apply podinfo \
94-
oci://ghcr.io/stefanprodan/modules/podinfo \
95-
--values qos-values.cue
96-
```
142+
=== "command"
143+
144+
```shell
145+
timoni -n test apply podinfo oci://ghcr.io/stefanprodan/modules/podinfo \
146+
--values qos-values.cue
147+
```
148+
149+
=== "output"
150+
151+
```text
152+
pulling oci://ghcr.io/stefanprodan/modules/podinfo:latest
153+
using module timoni.sh/podinfo version 6.5.4
154+
upgrading podinfo in namespace test
155+
ServiceAccount/test/podinfo unchanged
156+
Service/test/podinfo unchanged
157+
Deployment/test/podinfo configured
158+
resources are ready
159+
```
97160

98161
Before running an upgrade, you can review the changes that will
99162
be made on the cluster with `timoni apply --dry-run --diff`.
100163

101-
To learn more about all the available apply options, use `timoni apply --help`.
102-
103164
## Uninstall a module instance
104165

105166
To uninstall an instance and delete all the managed Kubernetes resources:
106167

107-
```shell
108-
timoni -n test delete podinfo --wait
109-
```
168+
=== "command"
169+
170+
```shell
171+
timoni -n test delete podinfo
172+
```
173+
174+
=== "output"
175+
176+
```text
177+
deleting 3 resource(s)...
178+
Deployment/test/podinfo deleted
179+
Service/test/podinfo deleted
180+
ServiceAccount/test/podinfo deleted
181+
all resources have been deleted
182+
```
183+
184+
By default, the delete command will wait for all the resources to be removed.
185+
To skip waiting, use the `--wait=false` flag.
110186

111187
## Bundling instances
112188

0 commit comments

Comments
 (0)