Scripts for hosting urbit in production-ish

Overview

Urbit Sysops

Contains some helpful scripts for hosting Urbit.

There are two variants included in this repo: one using docker, and one using plain systemd.

The docker approach requires a working docker install, but has the advantage of making it possible to assign predictable HTTP ports per urbit instance; as such it is preferred unless you’re hosting ships that do not require HTTP access, or hosting one ship per VPS.

urbit-exporter

urbit-exporter is a prometheus exporter for urbit. It exports the variables urbit_up and urbit_us (indicating that the login page returned HTTP 200, and that it seems to be for the expected ship, respectively.) Run it by passing the TCP port on which to start its own server (a handy convention may be to use the TCP port corresponding to that urbit’s assigned UDP port, but any scheme is fine), the urbit ship name, and that urbit’s http port. A systemd script is included to automate this.

For example, suppose you have ~sampel-palnet listening on http port 8080/tcp, and you wish to run the exporter on port 42069/tcp. Then you might have:

$ cat /etc/urbit/sampel-palnet.exporter
PORT=42069
SHIP=sampel-palnet
ARGS=--http=8080
$ cat /etc/prometheus/prometheus.yml
[…]
scrape_configs:
  - job_name: urbit
    static_configs:
      - targets: ['localhost:42069']
[…]
rule_files:
  - "/etc/prometheus/rules/*.yml"
$ cat /etc/prometheus/rules/alert-rules.yml
[…]
groups:
  - name: alert-rules
    rules:
    - alert: UrbitDown
      expr: urbit_up == 0
      for: 5m
      labels:
        severity: critical
      annotations:
        summary: 'Urbit down {{ $labels.instance }}'
[…]
$ readlink /etc/systemd/system/multi-user.target.wants/urbit-exporter\@sampel-palnet.service
/etc/systemd/system/[email protected]

urbit-meld

This is intended to be run as a cron job. It stops an urbit instance, runs urbit-worker meld on it, and restarts the instance after either success or failure.

urbit-meld is designed for a systemd-based setup; urbit-meld-docker is designed for a docker-based setup.

urbit-meld includes systemd timer files, so it's sufficient to systemctl enable --now urbit-meld@$ship.timer to get it to run weekly on that ship.

For urbit-meld-docker, you should somehow or another have a list of the ships that you’re running, and just have it do all of them one after another in sequence in a cron.weekly file or something.

Owner
Jōshin
成真
Jōshin
A python tool for synchronizing the messages from different threads, processes, or hosts.

Sync-stream This project is designed for providing the synchoronization of the stdout / stderr among different threads, processes, devices or hosts.

Yuchen Jin 0 Aug 11, 2021
Ferramenta de monitoramento do risco de colapso no sistema de saúde em municípios brasileiros com a Covid-19.

FarolCovid 🚦 Ferramenta de monitoramento do risco de colapso no sistema de saúde em municípios brasileiros com a Covid-19. Monitoring tool & simulati

Impulso 49 Jul 10, 2022
Christmas tree on the desktop.

new-year-tree Christmas tree on the desktop. [Ссылка на статью habr]

Daniil Gorbenko 10 Dec 29, 2022
A simple code for processing images to local binary pattern.

This figure is gotten from this link https://link.springer.com/chapter/10.1007/978-3-030-01449-0_24 LBP-Local-Binary-Pattern A simple code for process

Happy N. Monday 3 Feb 15, 2022
A carrot-based color palette you didn't know you needed.

A package to produce a carrot-inspired color palette for python/matplotlib. Install: pip install carrotColors Update: pip install --upgrade carrotColo

10 Sep 28, 2021
A PG3D API Made with Python

PG3D Python API A Pixel Gun 3D Python API (Public Ver) Features Count: 29 How To Use? import api as pbn Examples pbn.isBanned(192819483) - True pbn.f

Karim 2 Mar 24, 2022
Repo created for the purpose of adding any kind of programs and projects

Programs and Project Repository A repository for adding programs and projects of any kind starting from beginners level to expert ones Contributing to

Unicorn Dev Community 3 Nov 02, 2022
Irrigation Component V4 providing support for a custom card

Irrigation Component V4 This release sees the delivery of a custom card https://github.com/petergridge/irrigation_card to render the program options s

12 Oct 28, 2022
The Python Fuzzer that the world deserves 🐍

pip3 install frelatage Current release : 0.0.2 The Python Fuzzer that the world deserves Installation | How it works | Features | Use Frelatage | Conf

Rog3r 219 Dec 21, 2022
WorldsCollide - Final Fantasy VI Randomizer

FFVI Worlds Collide Worlds Collide is an open worlds randomizer for Final Fantas

8 Jun 13, 2022
Modeval (or Modular Eval) is a modular and secure string evaluation library that can be used to create custom parsers or interpreters.

modeval Modeval (or Modular Eval) is a modular and secure string evaluation library that can be used to create custom parsers or interpreters. Basic U

2 Jan 01, 2022
To check my COVID-19 vaccine appointment, I wrote an infinite loop that sends me a Whatsapp message hourly using Twilio and Selenium. It works on my Raspberry Pi computer.

COVID-19_vaccine_appointment To check my COVID-19 vaccine appointment, I wrote an infinite loop that sends me a Whatsapp message hourly using Twilio a

Ayyuce Demirbas 24 Dec 17, 2022
Let’s Play with Python3

Python3-FirstEdition a bunch of python programs and stuff Super Important Notice THIS IS LICENSED UNDER GNU PUBLIC LICENSE V3 also, refer to Contribut

Jym Patel 2 Nov 24, 2022
Grouping nucleotide coordinate ranges.

NuclRanger Grouping nucleotide coordinate ranges. A quick pre-processing step for "bedtools getfasta":- https://bedtools.readthedocs.io/en/latest/cont

Sujanavan Tiruvayipati 1 Oct 04, 2022
A numbers check python package

A numbers check python package

Fayas Noushad 3 Nov 28, 2021
Today I Commit (1일 1커밋) 챌린지 알림 봇

Today I Commit Challenge 1일1커밋 챌린지를 위한 알림 봇 config.py github_token = "github private access key" slack_token = "slack authorization token" channel = "

sunho 4 Nov 08, 2021
A tutorial presents several practical examples of how to build DAGs in Apache Airflow

Apache Airflow - Python Brasil 2021 Este tutorial apresenta vários exemplos práticos de como construir DAGs no Apache Airflow. Background Apache Airfl

Jusbrasil 14 Jun 03, 2022
ToDoListAndroid - To-do list application created using Kivymd

ToDoListAndroid To-do list application created using Kivymd. Version 1.0.0 (1/Jan/2022). Planned to do next: -Add setting (theme selector, etc) -Add f

AghnatHs 1 Jan 01, 2022
Team Curie is a group of people working together to achieve a common aim

Team Curie is a group of people working together to achieve a common aim. We are enthusiasts!.... We are setting the pace!.... We offer encouragement and motivation....And we believe TeamWork makes t

4 Aug 07, 2021
Inviare messaggi tramite app IO a partire da dati contenuti in file .csv

parlaConIO Inviare messaggi tramite app IO a partire da dati contenuti in file .csv -- Nessun obbligo, ma in caso di clonazione o uso del programma c

Francesco Del Castillo 6 Aug 22, 2022