Skip to content

Instantly share code, notes, and snippets.

View arno01's full-sized avatar
🎯
Focusing

Andrey Arapov arno01

🎯
Focusing
View GitHub Profile

Simple VPN over SSH with shuttle in Akash

ssh server

  • deploy.yaml:
---
version: "2.0"

Still errors. I believe python3.5 is way too old for the Ansible. I suggest latest stable Ubuntu version.

sudo apt update
sudo apt -y install git python3-venv locales gcc libffi-dev libssl-dev python3-dev
sudo locale-gen en_US.UTF-8

export LC_ALL=en_US.UTF-8
curl -k -X GET \
-H "Authorization: Bearer $(cat /var/run/secrets/kubernetes.io/serviceaccount/token)" \
https://$KUBERNETES_PORT_443_TCP_ADDR:$KUBERNETES_SERVICE_PORT_HTTPS
---
version: "2.0"

services:
  sshd:
    image: ubuntu:21.10
    env:
      - 'SSH_PUBKEY=ssh-rsa AAAAB3...YOUR_PUBLIC_SSH_KEY ogp8='
    command:
$ akash query bank total | jq -r '.supply[] | [.denom, .amount] | @tsv' | while read denom amount; do [ ${denom:0:3} = "ibc" ] && { buf=$(akash query ibc-transfer denom-trace ${denom:4}); r_denom=$(echo "$buf" | jq -r '.denom_trace.base_denom'); path=$(echo "$buf" | jq -r '.denom_trace.path'); } || r_denom=$denom; echo $r_denom $amount $path; done | column -t
uakt                                                                  1000000              transfer/channel-17/transfer/channel-192/transfer/channel-2
uakt                                                                  360234656            transfer/channel-17/transfer/channel-141/transfer/channel-1
ujuno                                                                 100000               transfer/channel-24/transfer/channel-14
uakt                                                                  10000000             transfer/channel-26/transfer/channel-1
ujuno                                                                 1128                 tran
@arno01
arno01 / rancher-url-change.md
Created February 19, 2022 12:23 — forked from janeczku/rancher-url-change.md
Change the hostname/URL and certificate of an existing Rancher installation

Steps to change the URL of Rancher installation and switch from a self-signed certificate to a certificate signed by recognized CA.

  1. Change the Rancher server-url setting to the new URL:
    • Navigate to https://<old_rancher_hostname>/g/settings/advanced
    • Edit server-url to https://<new_rancher_hostname>
  2. Clear the private CA certificate for the old certificate
    • Navigate to https://<old_rancher_hostname>/g/settings/advanced
    • Next to cacerts click context menu -> View in API
    • Click Edit
    • Clear the content of the value field
$ cat deploy.yaml
---
version: "2.0"

# Issues:
# - needs 1:1 port mapping
# - needs vm.max_map_count = 1000000
#
# Links:
#!/usr/bin/env bash
export AKASH_NODE="http://akash-node-1.akash-services.svc.cluster.local:26657"
export KUBECONFIG=/etc/kubernetes/admin.conf
## Clean dangling deployments
# The ones which have lease closed on the blockchain but remain
# active in the K8s cluster for some reason.
md_lid="akash.network/lease.id"