All New

user:thomas gists created by user

title:mygist gists with given title

filename:myfile.txt gists having files with given name

extension:yml gists having files with given extension

language:go gists having files with given language

topic:homelab gists with given topic

Register

Login


All New Register Login
's Avatar

anduin

Joined 1752214767

Recently created
Least recently created
Recently updated
Least recently updated
All gists 53
anduin's Avatar

anduin / Docker install tzdata

0 likes
0 forks
1 files
Last active 1719250124
1 RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
2 apt-get install -y tzdata && \
3 echo "Etc/UTC" > /etc/timezone && \
4 ln -fs /usr/share/zoneinfo/UTC /etc/localtime && \
5 dpkg-reconfigure -f noninteractive tzdata
anduin's Avatar

anduin / Azure Service Bus to Kusto

0 likes
0 forks
2 files
Last active 1725699790
1 using System.ComponentModel;
2 using System.Data;
3 using System.Text;
4 using Aiursoft.Canon;
5 using Azure.Identity;
6 using Azure.Messaging.ServiceBus;
7 using Kusto.Data;
8 using Kusto.Ingest;
9 using Microsoft.Extensions.DependencyInjection;
10 using Microsoft.Extensions.Logging;
anduin's Avatar

anduin / CUDA monte carlo estimate pi

0 likes
0 forks
1 files
Last active 1717217849
monte carlo estimate pi
1 #include <iostream>
2 #include <curand.h>
3 #include <curand_kernel.h>
4
5 __global__ void calculate_pi(int *count, unsigned long seed) {
6 int idx = threadIdx.x + blockIdx.x * blockDim.x;
7 curandState state;
8 curand_init(seed, idx, 0, &state);
9
10 float x = curand_uniform(&state);
anduin's Avatar

anduin / fake service.yml

0 likes
0 forks
1 files
Last active 1715092025
Make any docker service fake
1 # Fake entrypoint for the service. Always sleep.
2 entrypoint: ["sleep", "infinity"]
3 # Fake healthcheck for the service. Always return true.
4 healthcheck:
5 test: ["CMD", "true"]
anduin's Avatar

anduin / Low Saturation Fix

0 likes
0 forks
3 files
Last active 1742359572

这部分内容是通用的用于诊断 Substrate 数据中心机器部署失败的方法。可以从宏观上找到核心问题。

  1. 准备工作区:立刻打开两个DMS,两个OSP和一个Kusto Explorer。

  2. 识别:识别有故障的范围,是版本还是Ring。在OSP检查此Ring趋势图。检查Substrate版本历史,确认其版本类型(Dogfood、Daily)。

我正在检查 ________ 版本,范围是 Deploy Ring _________,其部署状况是 ______,版本类型是 ______。
anduin's Avatar

anduin / Ceph deploy notes

0 likes
0 forks
1 files
Last active 1712420160
Ceph deploy notes

这里将在 3 台 node 上安装 ceph。

三台 node 的 hostname 分别是:

  • node1
  • node2
  • node3

三个 node 全部都插一块 新的 大硬盘。假如是 /dev/sdb 。

anduin's Avatar

anduin / Ubuntu ISCSI

0 likes
0 forks
1 files
Last active 1710779939
Ubuntu mount ISCSI server
1 # Ubuntu install ISCSI Server
2 # Assuming the IP of the server is 10.0.0.1
3
4 # Mount a disk as /dev/sdb first
5 apt install tgt -y
6
7 # Edit /etc/tgt/conf.d/iscsi.conf
8 echo "
9 <target iqn.2024-03.iscsi.server:lun1>
10 backing-store /dev/sdb
anduin's Avatar

anduin / Mount gluster fs

0 likes
0 forks
1 files
Last active 1710702440
1 # Assuming using /dev/sdb is your new empty disk
2 # Assuming 10.0.0.* is your private network
3
4 # Install and configure GlusterFS. (Run on all nodes)
5 apt-get install glusterfs-server -y
6 systemctl start glusterd
7 systemctl enable glusterd
8
9 # Format the disk and mount it (Run on all nodes)
10 mkfs.xfs /dev/sdb
anduin's Avatar

anduin / 从 Vsphere 切换到 Docker Swarm 的收益

0 likes
0 forks
1 files
Last active 1712559086

省去虚拟机的烦恼

  • 攻击面显著减小。不需要维护那么多虚拟机的密码。
  • 不再需要配置复杂的 Linux 权限,反正在容器里就是 Root。
  • 不再需要配置复杂的路由器和 Linux 的路由表、networkmanager,反正容器开了都是建好的。
  • 不再需要重复运行大量无意义的 Linux 内核,巨大的节省资源
    • 过去,运行三个独立的业务,需要三个 VM。包括缓存,可能至少需要占用 20GB 的主机内存。
    • 迁移到容器后,唯一的内存开销就是容器的进程,每个业务只需要 200MB 内存。
  • 不再需要担心内存泄漏而对服务器定时重启,而是只重启容器即可
anduin's Avatar

anduin / Koel deployment

0 likes
0 forks
1 files
Last active 1710087208
Koel deployment
1 echo "Downloading koel..."
2 sudo apt install tar wget jq
3 latestUrl=$(curl https://api.github.com/repos/koel/koel/releases/latest | jq -r '(.assets[] | select(.browser_download_url | contains(".zip"))).browser_download_url')
4 rm /tmp/koel.zip
5 rm /tmp/koel_ext -rf
6 wget -O /tmp/koel.zip $latestUrl
7
8 echo "Unziping koel..."
9 unzip /tmp/koel.zip -d /tmp/koel_ext
Newer Older

Powered by Opengist ⋅ Load: 63ms⋅

English
Čeština Deutsch English Español Français Magyar Italiano 日本語 Polski Português Русский Türkçe Українська 中文 繁體中文