Compare commits

..

1 Commits

Author SHA1 Message Date
0d120588dc add: implement basic server 2025-03-30 00:22:10 -07:00

View File

@@ -12,30 +12,8 @@ tier N1 VM. That extra hop doesn't matter.
## Config ## Config
Configure nginx to do what you want, test it. Use any Node IP for your testing. Configure nginx to do what you want, test it. Use any Node IP for your testing.
This will become the 'template_dir' in the argument to the LB. This tool accepts an argument (rewrite_string) which will be replaced using these rules:
Move that directory to somewhere new, i.e. `/etc/nginx-template/`. Make 1. For each line that contains rewrite string:
a symlink from that new directory to the old one (i.e., 2. Copy the line once per node IP, replacing the string with host IPs
`ln -s /etc/nginx-template /etc/nginx/`).
Make a workspace directory for this tool; it will write configs to this folder
before updating the symlink you created above. It needs to be persistent so on
server reboot the service starts ok (i.e., `mkdir /var/skubelb/`).
Make sure the user running the tool has read access to the template folder, read-write
access to the workspace folder and config symlink.
Run the server with a command like:
```sh
skubelb --needle some_node_ip \
--workspace_dir /var/skubelb \
--config_symlink /etc/nginx \
--template_dir /etc/nginx-template
--listen 0.0.0.0:8080
```
Replacing `some_node_ip` with the node IP you used during the initial setup.
Next, configure the Kubernetes nodes to POST `http://loadbalancer:8080/register` when
they started, and DELETE `http://loadbalancer:8080/register` when they shutdown.