Skip to content

Commit 822f0c8

Browse files
committed
admin.md: add admin documentation
1 parent 16ac67c commit 822f0c8

File tree

1 file changed

+72
-0
lines changed

1 file changed

+72
-0
lines changed

docs/admin.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Admin
2+
3+
## Connect to your cluster
4+
5+
Ensure you are connected to your cluster because Warnet will use your current configuration to generate configurations for your users.
6+
7+
```shell
8+
$ warnet status
9+
```
10+
11+
Observe that the output of the command matches your cluster.
12+
13+
**TODO** Add the *current-config* to the *status* report.
14+
15+
## Create an *admin* directory
16+
17+
```shell
18+
$ mkdir admin
19+
$ cd admin
20+
$ warnet admin init
21+
```
22+
23+
Observe that there are now two folders within the *admin* directory: *namespaces* and *networks*
24+
25+
## The *namespaces* directory
26+
This directory contains a Helm chart named *two_namespaces_two_users*.
27+
28+
Modify this chart based on the number of teams and users you have.
29+
30+
Deploy the *two_namespaces_two_users* chart.
31+
32+
```shell
33+
$ cd namespaces
34+
$ warnet deploy two_namespaces_two_users
35+
```
36+
37+
Observe that this creates service accounts and namespaces in the cluster:
38+
39+
```shell
40+
$ kubectl get ns
41+
$ kubectl get sa -A
42+
```
43+
44+
### Creating Warnet invites
45+
A Warnet invite is a Kubernetes config file.
46+
47+
Create invites for each of your users.
48+
49+
```shell
50+
$ warnet admin create-kubeconfigs
51+
```
52+
53+
Observe the *kubeconfigs* directory. It holds invites for each user.
54+
55+
### Using Warnet invites
56+
Users can connect to your wargame using their invite.
57+
58+
```shell
59+
$ warnet auth alice-wargames-red-team-kubeconfig
60+
```
61+
62+
### Set up a network for your users
63+
Before letting the users into your cluster, make sure to create a network of tanks for them to view.
64+
65+
66+
```shell
67+
$ warnet admin deploy networks/mynet --namepace wargames-red-team
68+
```
69+
70+
**TODO**: What's the logging approach here?
71+
72+
Observe that the *wargames-red-team* namespace now has tanks in it.

0 commit comments

Comments
 (0)