Skip to content

Commit d9ff833

Browse files
committed
admin.md: add admin documentation
1 parent 481a5bd commit d9ff833

File tree

1 file changed

+70
-0
lines changed

1 file changed

+70
-0
lines changed

docs/admin.md

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

0 commit comments

Comments
 (0)