This post contains some stuffs that hard to and not worth to categorize, so put them all here, chronologically.
02/25/2019
-
hostPath
inPersistentVolume
is the mount path in host machine.mountPath
incontainers
field is the mount path inside the container.
02/27/2019
-
Docker uses
/var/lib/docker
to store your images, containers, and local named volumes. Deleting this can result in data loss and possibly stop the engine from running. Theoverlay2
subdirectory specifically contains the various filesystem layers for images and containers. -
Vim readonly mode, can open the same file in multiple windows:
vim -R file
02/28/2019
-
tee
command reads the standard input and writes it to both the standard output and one or more files,-a
flag used to append, for example:LogMsg() { logMsg="$@" echo "["`date +"%Y/%m/%d %r"`"]" ${logMsg} | tee -a logs/ds_${stage}_${timeStamp}.log }
+-------------+ +-------+ +--------------+ | command | | tee | | stdout | | output +---->+ +--->+ | +-------------+ +---+---+ +--------------+ | +---v---+ | file | | | +-------+
-
reboot machine rightnow,
-r
means reboot, for example:shutdown -r now
If you execute remotely, use
ssh example.com
to test if it bring up. -
Jenkins: the exit code of last command of the Jenkin's Execute Shell build step is what determines the success/failure, now it's better to wrap the code snippet as a script and execute it. Need to do more search on it.
03/02/2019
-
For
ls
command: If no operands are given, the contents of the current directory are displayed. If more than one operand is given, non-directory operands are displayed first; directory and non-directory operands are sorted separately and in lexicographical order.I use this feature with
tail
command to pick latest package, for example:ls | grep ansible-* | tail -1
-
ansible
haslog_path
setting in~/.ansible.cfg
file, for example:[defaults] log_path = /ibm-test/DS-Kube-Installer/logs/ds_installer_20190301_1645.log
03/04/2019
-
Gluster file system with RedHat?
-
when run
systemctl start docker
, these directories are created:/var/lib/docker
,/run/docker
,etc/docker
.
03/05/2019
- Find Red Hat or CentOS version:
cat /etc/redhat-release Red Hat Enterprise Linux Server release 7.6 (Maipo)
网友评论