1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
#+TITLE: Org SSH Export
#+DATE: 2020-10-19T21:22:28-04:00
#+DRAFT: true
#+DESCRIPTION:
#+TAGS[]: emacs org ssh
#+KEYWORDS[]: emacs org ssh
#+SLUG:
#+SUMMARY:
I manage a lot of servers. Some are serving static content like this
blog, with others running services like Nextcloud, ZNC, Shadowsocks,
or Mumble. I have one or two game servers to play with my family and
friends. These are spread across two providers because for cost and
geographic reasons.
I also have several machines running in my house, one running FreeNAS
with some jails, another running Proxmox with several VMs and
containers. I also have a couple smaller single board PCs like
Raspberry Pis scattered around.
Needless to say, I've got a lot to keep track of. I tried using a
couple methods of keeping track of what I had running where, the user
names, IP addresses, and links. I also had to worry about making sure
my =~/.ssh/config= file was always up to date with VMs and containers
I create.
I'd already been playing with the idea of using an org-mode file to
keep track of servers with VMs and containers, as it seemed like that
would fit well with the hierarchical structure of org files.
What I came up was a system where each server location/provider gets a
heading, with the machines in that location as headings under it. If
the machine runs VMs or containers, I just put those as headings under
the host machine.
#+BEGIN_SRC org
,* Scaleway
,** example.com
,** example.org
,* Vultr
,** lambda.cx
,* Home
,** proxmox
,*** pi-hole
,*** openbsd-1
,** freenas
,*** web-jail
#+END_SRC
Each machine gets a billet point list of what's running on it, with
the text as a link if they're something I can open in-browser. That
would be things like static content and web interfaces. I also write
details about services underneath their bullet points if I have more
details I want to remember.
#+BEGIN_SRC org
,* Vultr
,** example.com
- Minecraft
=/home/minecraft/survival=
Port 4587
- [[https://example.com][nginx]]
- [[https://example.com:8080/][znc]]
,** example.org
- Shadowsocks
- Mumble
- [[https://example.net][nginx]]
#+END_SRC
|