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: README.md
+121-8
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,7 @@ Monkeying around with virtual machines and pxe configs.
16
16
-[HTTP PXE](#http-pxe)
17
17
-[HTTP VM](#http-vm)
18
18
-[HTTP installimage](#http-installimage)
19
+
-[HTTP DHCP](#http-dhcp)
19
20
+[Issues](#issues)
20
21
+[Copyright](#copyright)
21
22
+[Name origin](#name-origin)
@@ -24,10 +25,26 @@ Monkeying around with virtual machines and pxe configs.
24
25
25
26
## Setup
26
27
27
-
Create `marmoset.conf` before using marmoset! See `Configuration` for details.
28
+
Clone the repo into /opt, then copy the service file into the systemd directory and reload systemd to recognize the file:
29
+
```bash
30
+
cd /opt
31
+
git clone https://github.com/virtapi/marmoset.git
32
+
cd marmoset
33
+
cp ext/marmoset.service /etc/systemd/system/
34
+
systemctl daemon-reload
35
+
```
28
36
Copy the `marmoset.conf.example` to `marmoset.conf` and adjust the settings to your needs.
29
37
Checkout the Comments in the file our our [Configuration](#configuration) section.
30
38
39
+
Now we need to setup a virtualenv and install the required python packages (remove libvirt from the requirements.txt and `pkg-config libvirt gcc` from the list of packages to install if you don't want to manage VMs with marmoset):
@@ -49,6 +66,7 @@ Please checkout our [requirements.txt](requirements.txt) for a complete and auth
49
66
* wheel
50
67
51
68
In addition to these python packages, you also need Python 3. This project originally started with Python 3.3, we are currently developing and testing on 3.5 but we plan to support Python 3.3 and 3.4 as well.
69
+
We also need pkg-config and libvirt, which you need to install via your system-wide package manager (these aren't python packages).
52
70
53
71
---
54
72
@@ -128,9 +146,11 @@ Start it like this:
128
146
129
147
$ ./marmoset.py server
130
148
131
-
Or with gunicorn:
149
+
Or use our systemd service:
150
+
151
+
$ systemctl start marmoset
132
152
133
-
$ gunicorn marmoset.app:app
153
+
A third solution is to use nginx + uwsgi to power the app. This is the recommended way if you expect a high amount of requests.
134
154
135
155
### HTTP PXE
136
156
@@ -381,7 +401,7 @@ Remove a VM:
381
401
This endpoint is meant to work together with our [installimage](https://github.com/virtapi/installimage). We identify each dataset by its MAC address and store the key:value config pairs for the installimage.
Errormessage if you want to delete or list a nonexistent entry:
476
496
```json
@@ -479,6 +499,99 @@ Errormessage if you want to delete or list a nonexistent entry:
479
499
}
480
500
```
481
501
502
+
### HTTP DHCP
503
+
This endpoint allows us the throw static IP/MAC combinations into a ldap database. Currently tested is only the [openldap](http://www.openldap.org/) backend. This database is connected to an isc-dhcpd. We can identify an object by its IP or MAC address.
"message": "The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again. You have requested this URI [/v1/dhcp/ipv4/10.3.7.41] but did you mean /v1/dhcp/ipv4/<ipv4> ?"
0 commit comments