Skip to content

Instantly share code, notes, and snippets.

@aldy505
Created July 10, 2022 01:31
Show Gist options
  • Save aldy505/79f397c2d025a9af08a672dac6ace62c to your computer and use it in GitHub Desktop.
Save aldy505/79f397c2d025a9af08a672dac6ace62c to your computer and use it in GitHub Desktop.
Spin up clustered rqlite on 1 host
rqlited \
-auth rqlite.json \
-fk \
-node-id 1 \
-http-addr localhost:4001 \
-raft-addr localhost:4002 \
./node.1
rqlited \
-auth rqlite.json \
-fk \
-node-id 2 \
-http-addr localhost:4003 \
-raft-addr localhost:4004 \
-join http://localhost:4001 \
-join-as internode \
./node.2
rqlited \
-auth rqlite.json \
-fk \
-node-id 3 \
-http-addr localhost:4005 \
-raft-addr localhost:4006 \
-join http://localhost:4001 \
-join-as internode \
./node.3
rqlited \
-auth rqlite.json \
-fk \
-node-id 4 \
-http-addr localhost:4007 \
-raft-addr localhost:4008 \
-join http://localhost:4001 \
-join-as internode \
./node.4
rqlited \
-auth rqlite.json \
-fk \
-node-id 5 \
-http-addr localhost:4009 \
-raft-addr localhost:4010 \
-join http://localhost:4001 \
-join-as internode \
./node.5
[
{
"username": "internode",
"password": "/X`[jfe/vDz@W#ZnM}8g);K>N>bxfPD%AEM%{47BPvy)w3VE'py``d<)wZX*r77>",
"perms": [
"all"
]
},
{
"username": "client",
"password": "7b33d6b3bd428db5c82d556ba2624cf23bdc74015fa925c450f8228b1a5aeeae",
"perms": [
"all"
]
},
{
"username": "*",
"perms": [
"status",
"ready"
]
}
]
[Unit]
Description=Rqlite
After=network-online.target
Wants=network-online.target
[Service]
ExecStart=rqlited -auth rqlite.json -fk -node-id 1 -http-addr localhost:4001 -raft-addr localhost:4002 ./node.1
WorkingDirectory=/var/lib/rqlite
User=rqlite
Group=rqlite
Environment="PATH=/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin"
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment