Skip to content

Instantly share code, notes, and snippets.

@tbaums
tbaums / node.yaml
Created December 14, 2023 21:57
node yaml example
apiVersion: v1
kind: Node
metadata:
name: node-example
labels:
disktype: ssd
spec:
podCIDR: 192.168.0.0/24
providerID: "provider-id"
status:
@tbaums
tbaums / config.toml
Created November 18, 2023 23:12
agent toml
[node]
display_name = "device-HOSTNAME"
storage_path = "client.sqlite"
unique_id = "HOSTNAME"
# MYCELIAL SERVER
# Replace with the endpoint and token for your Sqlite Physical Replication Server
[server]
endpoint = "http://SERVERIP:7777" # Default Sqlite Physical Replication Server endpoint
token = "token" # Default token for Sqlite Physical Replication Server and Clients
@tbaums
tbaums / gist:0c20ddcf71485e15f0f06c6e0bf3329d
Last active November 18, 2023 19:40
demo-config.toml
[node]
display_name = "device1"
storage_path = "client.sqlite"
unique_id = "device1"
# MYCELIAL SERVER
# Replace with the endpoint and token for your Sqlite Physical Replication Server
[server]
endpoint = "http://0.0.0.0:7777" # Default Sqlite Physical Replication Server endpoint
token = "token" # Default token for Sqlite Physical Replication Server and Clients
@tbaums
tbaums / sample_server_api_docs.md
Last active August 17, 2023 17:49
chatgpt for rust docs?

Endpoint: /api/client

Overview

The /api/client endpoint offers an interface for provisioning new clients within the system.

Request Type:

Endpoints:

  1. Issue Token:
    • Endpoint: /api/tokens
    • Method: POST
    • Payload:
      {
        "client_id": "example-client-id"
      }

The following assumes you are using Minikube and Trow for container registry, installed using the quick install method documented here

Pull the following containers locally (docker pull):

For Kudo:

  1. kudobuilder/controller:v0.9.0

From params.yaml:

  1. mesosphere/cassandra-prometheus-exporter:2.2.1-0.1.1
  2. mesosphere/cassandra:3.11.5-0.1.1
export DOMAIN=arrikto.com
export SUBDOMAIN=aws-dev.arrikto.com
cd ~/ops/deployments
ZONES=$(aws route53 list-hosted-zones-by-name --output json --dns-name "${DOMAIN}." | jq -r '.HostedZones[].Id' | wc -l)
export AWS_ZONE_ID=$(aws route53 list-hosted-zones-by-name --output json --dns-name "${DOMAIN}." | jq -r '.HostedZones[].Id' | xargs)
export IAM_ROLE_NAME=eks-external-dns-$CLUSTERNAME
aws eks update-kubeconfig --name $CLUSTERNAME
export INSTANCE_TYPE=m5d.4xlarge
aws eks create-nodegroup \
--cluster-name ${CLUSTERNAME?} \
--nodegroup-name general-workers \
--disk-size 200 \
--scaling-config minSize=1,maxSize=3,desiredSize=2 \
--subnets ${SUBNETIDS?} \
--instance-types ${INSTANCE_TYPE?} \
--ami-type AL2_x86_64 \
alias l="ls -alh"
alias k="kubectl"
mkdir /root/.ssh
aws s3 cp s3://mtanenbaum-rok-tools/ ./ --recursive
ssh-keyscan github.com >> github_key
ssh-keygen -lf github_key
mkdir rok-tools-data
docker run -ti \
--name rok-tools \
--hostname rok-tools \
-p 8080:8080 \
--entrypoint /bin/bash \
-v $(pwd)/rok-tools-data:/root \
-v /var/run/docker.sock:/var/run/docker.sock \
-w /root \
gcr.io/arrikto/rok-tools:release-1.1-l0-release-1.1-rc5