Update README

This commit is contained in:
notplants 2021-12-18 18:35:17 -05:00
parent eba140be0b
commit eee688245e
1 changed files with 6 additions and 20 deletions

View File

@ -1,18 +1,13 @@
# peach-dyndns-host
# peach-dyndns-server
a dynamic DNS server to host the names of guests with changing IP addresses
by providing an http API for updating bind9 configurations.
## Setup
## Deployment
The code in this repo assumes the existence of an installed and running bind9 server on the same
server as is running peach-dyndns-server. Documentation for setting up bind9 can be found [here](docs/setup-bind-for-peach-dyndns.md).
The bind9 server and peach-dyndns-server can be deployed with ansible vis setup_server.sh
The peach-dyndns-server code can be compiled with
```
cargo deb; sudo dpkg -i target/debian/peach-dyndns-server_0.1.0_amd64.deb
```
## Development
@ -20,28 +15,19 @@ cargo deb; sudo dpkg -i target/debian/peach-dyndns-server_0.1.0_amd64.deb
sudo su peach-dyndns; ./target/release/main -vv
```
## Prod Deployment
prod is deployed to /srv/peachcloud/peach-dyndns-server/prod-peach-dyndns
## Staging Deployment
staging is deployed to /srv/peachcloud/peach-dyndns-server/dev-peach-dyndns
## Test
# ping
### ping
```
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc": "2.0", "method": "ping", "id":1 }' 127.0.0.1:3002
```
# register_domain
### register_domain
```
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc": "2.0", "method": "register_domain", "params" : {"domain": "mirage.dyn.peachcloud.org" }, "id":1 }' 127.0.0.1:3002
```
# is_domain_available
### is_domain_available
```
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc": "2.0", "method": "is_domain_available", "params" : {"domain": "mirage.dyn.peachcloud.org" }, "id":1 }' 127.0.0.1:3002
```