macos: 16 items found.

shell tree in macos

Use find to list the current folder:

find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'

Add to ~/.bash_profile or ~/.zshrc
alias tree="find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'"
  

Or install the tree with brew
brew install tree

More ~

First start ansible on macos

I installed the ansible via pip install, and there are several issues here:

where is the config

Here you should create a file ~/.ansible.cfg

[defaults]
inventory =~/.ansible/hosts
sudo_user=root
remote_port=22
host_key_checking=False
remote_user=root
log_path=~/.ansible/log/ansible.log
module_name=command
private_key_file=~/.ssh/id_rsa
More ~

ld: library not found for -lssl - Install mysqlclient for Django 2, macos

Background

mysql server was installed by brew install mysql

Issues like this:

ERROR: Failed building wheel for mysqlclient

ld: library not found for -lssl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'clang' failed with exit status 1

Exception: Wrong MySQL configuration: maybe https://bugs.mysql.com/bug.php?id=86971 ?

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 ~