280篇 Default中的文章

Ironic自定义组数据盘RAID

这个特性是在以前公司负责详细设计开发的,面试了这么久工作还没着落,靠着回忆将部分细节记录分享下。

RAID详细定义见https://zh.wikipedia.org/wiki/RAID

整个流程如图:
Screen Shot 2019-06-30 at 02.35.33.png

运维人员在裸金属服务器入云后将部分硬盘所在槽位作为系统盘标记更新到ironic node的extra字段中,另一些有硬盘的槽位作为数据盘提供给用户自定义组建RAID盘。其实像不同的flavor规格定义里已经添加了描述,console数据盘选择时就是根据flavor的定义展示的。形如:2 * 600GB SAS System Disk RAID 1 + 12 * 10TB SATA 加号前面指的系统盘,后面是数据盘。

More ~

adb shell input swipe/tap/keyevent

b 首次需要有线连接设备,后续可以无线,但要有线连接后如下操作
adb tcpip 5555
后面无线连接可以 adb connect 192.168.0.100:5555

adb shell 常用的的模拟方法:

keyevent 模拟按键控制,值含义参考文尾

adb shell input keyevent 3

More ~

中国设立域名根服务器有什么影响

最近一条新闻刷屏:

根据工信部的公告,工信部同意中国互联网络信息中心设立域名根服务器(F、I、K、L根镜像服务器)及域名根服务器运行机构,负责运行、维护和管理编号分别为JX0001F、JX0002F、JX0003I、JX0004K、JX0005L、JX0006L的域名根服务器。

此时各种主流媒体发声,标题直指不再受制于人!中国布局4台域名根服务器 。也有一些大V认为网页搭梯子翻墙的日子一去不复返了。实际上对普通民众有何影响,且看本文。

More ~

Raspberry Pi 4 brings what

Screen Shot 2019-06-28 at 10.57.13.png

Raspberry Pi 4 Model B is the latest product in the popular Raspberry Pi range of computers. It offers ground-breaking increases in processor speed, multimedia performance, memory, and connectivity compared to the prior-generation Raspberry Pi 3 Model B+, while retaining backwards compatibility and similar power consumption. For the end user, Raspberry Pi 4 Model B provides desktop performance comparable to entry-level x86 PC systems.

This product's key features include a high-performance 64-bit quad-core processor, dual-display support at resolutions up to 4K via a pair of micro-HDMI ports, hardware video decode at up to 4Kp60, up to 4GB of RAM, dual-band 2.4/5.0 GHz wireless LAN, Bluetooth 5.0, Gigabit Ethernet, USB 3.0, and PoE capability (via a separate PoE HAT add-on).

简言之就是4代树莓派硬件性能提升可以媲美入门级x86 PC性能。双口的4K60帧输出、2.4/5G多频无线、蓝牙5.0、3.0USB、可选1G/2G/4G内存规格。

More ~

容器化之路 - 面对一堆yml配置我很茫然

对于容器的配置文件, docker-compose的还好理解,但是一到k8s,就有很多对象, pods, nodes, services, deployment... 每个基本上都有个yml的定义,其中的参数一看一脸茫然。

还好找到这个:kubectl explain xxx 可以看它的定义

kubectl explain service --recursive 可以查看service定义的所有定段。
kubectl explain svc.metadata.uid 可以查看某个字段的定义

当然,k8s官方也有一些examples: https://github.com/kubernetes/examples

More ~

macos 搭建 Kubernetes (k8s)

先安装macos桌面版的docker

  1. brew install kubernetes-cli --verbose

  2. 安装virtualbox

  3. brew cask install minikube
    如果有墙内,可以安装阿里云的版本
    curl -Lo minikube http://kubernetes.oss-cn-hangzhou.aliyuncs.com/minikube/releases/v1.1.1/minikube-darwin-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/

  4. 启动minikube
    minikube start --registry-mirror=https://registry.docker-cn.com

  5. (可选)dashboard
    minikube dashboard

More ~

journalctl 日志清理

journalctl 有两个参数:

--vacuum-size=BYTES Reduce disk usage below specified size
减少日志到指定大小以下

--vacuum-time=TIME Remove journal files older than specified date
删除指定日期前的日志文件

用起来比如:
journalctl --vacuum-size=500M

More ~