https://github.com/slavaganzin/rconf
rconf is configuration server with web UI that will sync service configuration to remote machines instantly.
https://github.com/slavaganzin/rconf
ansible automation ci configuration configuration-management devops-tools docker puppet salt
Last synced: about 1 month ago
JSON representation
rconf is configuration server with web UI that will sync service configuration to remote machines instantly.
- Host: GitHub
- URL: https://github.com/slavaganzin/rconf
- Owner: slavaGanzin
- Created: 2023-07-29T11:51:18.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-26T09:20:31.000Z (about 1 year ago)
- Last Synced: 2025-03-22T07:16:19.436Z (about 1 month ago)
- Topics: ansible, automation, ci, configuration, configuration-management, devops-tools, docker, puppet, salt
- Language: JavaScript
- Homepage:
- Size: 2.01 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# rconf
rconf is configuration server with web UI that will sync service configuration to remote machines instantly.
- [Why?](#why)
- [Quick start](#quick-start)
- [Code execution](#code-execution)
- [Cookbook](#cookbook)
* [join all devices in single vpn network using zerotier](#join-all-devices-in-single-vpn-network-using-zerotier)
### Why?
Puppet, salt, ansible all invent their own languages for configuration. You need to google how to do simpliest things. Why should you, if you can use same commands you are used to?
### Quick start
**install rconf on server machine**
```bash
curl https://i.jpillora.com/slavaGanzin/rconf! | bash
```**run rconf and configure your server by answering a list of questions**
```bash
$ rconf? Select networks will share your config:
wlp0s20f3 [192.168.1.85/24]
? Web GUI username: admin
? Web GUI password: admin
? Remote sync token: ea9b50e5de7e17e0ff38f0b7808917acbbe87ca6ce46ee831d5c009bf87a2049
? Daemonize with systemd? No
To install on remote machine:
curl https://i.jpillora.com/slavaGanzin/rconf! | bashwlp0s20f3:
Web UI:
http://192.168.1.85:14141
sync config command:
rconf http://192.168.1.85:14141/ea9b50e5de7e17e0ff38f0b7808917acbbe87ca6ce46ee831d5c009bf87a2049
```**open web UI**
```bash
# this is my internal ip, look for your url in your own cli
chromium http://192.168.1.85:14141
```**uncomment services key in rconf.yaml using web UI**
```yaml
services:
#service name
hello:
#will work only on machines that selected tag "test" for syncronization
tag: test
#will work only on linux machines
platform: linux
files:
#local file hello.sh will be copied to /usr/local/bin/hello.sh on remote machine
hello.sh: /usr/local/bin/hello.sh
install:
#if running \`which hello.sh\` will fail on remote machine - apply \`chmod\`
hello.sh: chmod +x /usr/local/bin/hello.sh
#command that will rerun on every update of configuration files
command: hello.sh world
```
*Select commented lines and press CTRL+/*
*Press CTLR+S to save!***edit hello.sh in Web ui**
```bash
#!/usr/bin/env bashecho "Hello $1!"
```
*Press CTLR+S to save!***copy sync config command from server console and run it**
```bash
$ rconf "http://192.168.1.85:14141/ea9b50e5de7e17e0ff38f0b7808917acbbe87ca6ce46ee831d5c009bf87a2049"? Node id: node1
? Select tags to sync:
test
? Daemonize with systemd? No
✔ run: hello.sh world
Hello world!
```### Code execution
If you need dynamic configuration, i.e. tailored for each host use `{{{return javascript code}}}` in any configuration file (except rconf.yaml). For example:```
#nginx.conf
http {
events {
worker_connections {{{return parseInt(Math.random()*100)}}};
}
server {
listen {{{return rconf.interfaces.eth0.address}}}:3001;
server_name {{{
if (rconf.env.HOSTNAME) return rconf.env.HOSTNAME
return 'default.hostname'
}};
}
}
```
Is this secure? No. Use with caution### Cookbook
#### join all devices in single vpn network using zerotier
```yaml
services:
zerotier-linux:
tag: zerotier-network1
platform: linux
install:
zerotier-cli: curl -s https://install.zerotier.com | sudo bash
command: zerotier-cli join network1
```