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.

You might also like...
Repo Home WPDrawBot - (Repo, Home, WP) A powerful programmatic 2D drawing application for MacOS X which generates graphics from Python scripts. (graphics, dev, mac)

DrawBot DrawBot is a powerful, free application for macOS that invites you to write Python scripts to generate two-dimensional graphics. The built-in

Web UI for your scripts with execution management

Script-server is a Web UI for scripts. As an administrator, you add your existing scripts into Script server and other users would be ab

Shell scripts made simple 🐚

zxpy Shell scripts made simple 🐚 Inspired by Google's zx, but made much simpler and more accessible using Python. Rationale Bash is cool, and it's ex

Some scripts for the Reverse engineered (old) api of CafeBazaar

bazz Note: This project is done and published only for educational purposes. Some scripts for the Reverse engineered (old) API of CafeBazaar. Be aware

A Curated Collection of Awesome Python Scripts
A Curated Collection of Awesome Python Scripts

A Curated Collection of Awesome Python Scripts that will make you go wow. This repository will help you in getting those green squares. Hop in and enjoy the journey of open source. 🚀

Automation of VASP DFT workflows with ASE - application scripts

This repo contains a library that aims at automatizing some Density Functional Theory (DFT) workflows in VASP by using the ASE toolkit.

A plugin for poetry that allows you to execute scripts defined in your pyproject.toml, just like you can in npm or pipenv

poetry-exec-plugin A plugin for poetry that allows you to execute scripts defined in your pyproject.toml, just like you can in npm or pipenv Installat

IG Trading Algos and Scripts in Python
IG Trading Algos and Scripts in Python

IG_Trading_Algo_Scripts_Python IG Trading Algos and Scripts in Python This project is a collection of my work over 2 years building IG Trading Algorit

Some usefull scripts for the Nastran's 145 solution (Flutter Analysis) using the pyNastran package.
Some usefull scripts for the Nastran's 145 solution (Flutter Analysis) using the pyNastran package.

nastran-aero-flutter This project is intended to analyse the Supersonic Panel Flutter using the NASTRAN software. The project uses the pyNastran and t

Comments
  • Updated Binaries

    Updated Binaries

    Here is the process for updating the Urbit binaries:

    • docker pull tloncorp/urbit
    • docker ps // note the http ports and ames ports of the ship
    • docker stop <ship-name> // stop the container you'd like to update
    • sudo make-urbit-docker <ship-name> <http-port-not-in-use> <ames-port-not-in-use>
    opened by kennyrowe 0
Owner
Jōshin
成真
Jōshin
It was created to conveniently respond to events such as donation, follow, and hosting using the Alert Box provided by twip to streamers

This library is not an official library of twip. It was created to conveniently respond to events such as donation, follow, and hosting using the Alert Box provided by twip to streamers.

junah201 8 Nov 19, 2022
API wrapper for VCS hosting system.

PythonVCS API wrapper for VCS hosting system. Supported platforms Gitea Github, Gitlab, Bitbucket support will not, until that packages is not updated

MisileLaboratory 1 Apr 2, 2022
python scripts - mostly automation scripts

python python scripts - mostly automation scripts You can set your environment in various ways bash #!/bin/bash python - locally on remote host #!/bi

Enyi 1 Jan 5, 2022
A minimalist production ready plugin system

pluggy - A minimalist production ready plugin system This is the core framework used by the pytest, tox, and devpi projects. Please read the docs to l

pytest-dev 876 Jan 5, 2023
The earliest beta version of pytgcalls on Linux x86_64 and ARM64! Use in production at your own risk!

Public beta test. Use in production at your own risk! tgcalls - a python binding for tgcalls (c++ lib by Telegram); pytgcalls - library connecting pyt

Il'ya 21 Jan 13, 2022
Connect Playground - easy way to fill in your account with production-like objects

Just set of scripts to initialise accpunt with production-like data: A - Basic Distributor Account Initialization INPUT Distributor Account Token ACTI

CloudBlue 5 Jun 25, 2021
A class to draw curves expressed as L-System production rules

A class to draw curves expressed as L-System production rules

Juna Salviati 6 Sep 9, 2022
Estimating the potential photovoltaic production of buildings (in Berlin)

The following people contributed equally to this repository (in alphabetical order): Daniel Bumke JJX Corstiaen Versteegh This repository is forked on

Daniel Bumke 6 Feb 18, 2022
Identify unused production dependencies and avoid a bloated virtual environment.

creosote Identify unused production dependencies and avoid a bloated virtual environment. Quickstart # Install creosote in separate virtual environmen

Fredrik Averpil 7 Dec 29, 2022
Python based scripts for obtaining system information from Linux.

sysinfo Python based scripts for obtaining system information from Linux. Python2 and Python3 compatible Output in JSON format Simple scripts and exte

Petr Vavrin 70 Dec 20, 2022