Accurev workspace 有一个include/exclude 功能,可以在workspace 中增加规则,使workspace 只看到,只更新想关注的列表。
对于被排除在外的元素,不可见,不更新,不会提交,不影响
切换到workspace exploer
在workspace 左侧导栏 下方,勾选 include/exclude view 右击文件视图上方会出现 include.exclude 功能的按扭
Include : 包含在视图
Include Directry Only : 只包含目录,不包含目录下的文件
Exclude : 排除在外
一个元素上只能有一种规则
顶部元素没有设置rule的,按默认显示
设置之后右侧视图上方展示workspace 的元素,下方展示元素上被设置的规则
/gua/gua2/test1.txt
/hua/hua2/test2.txt
/hua/hua2/test1.txt
/dua/dua2/test/test3.txt
设置一个workspace ,使之更新时将/dua目录及目录下的文件排除在外,即workspace视图 对stream 的dua 目录不可见
/dua :exclude
设置一个workspace ,使之更新时只会更新到/hua/hua2/test2.txt,对此文件外的其他文件及目录不可见。
/dua :exclude
/gua :exclude
/hua :include directory only
/hua/hua2 :include directory only
/hua/hua2/test2.txt :include
Accurev 其他相关笔记
安装时报错:
http://blog.leanote.com/post/gua_l
Stream Name: 自定义名称
Basis: 爸爸stream
Stream Type : stream 类型
Base Time : 基准时间
新建 :Base stream 上右击菜单,new stream
修改 :在建成的stream 上右击菜单是,change stream
一般情况下我们新建的都是 Dynamic Stream ,图标是波浪线或时钟。
这种类型的stream 的图标有两种,一种是三条波浪线,一种是时钟
两种情况可以互相转换,通过把basetime 从None 和 其他三种时间的切换实现
波浪线表示可以本流是实时同步父流同步的提交的,实时接收父流的修改,即两流从上而下的关系是畅通的意思, New stream 的页面,Based time里选 None , 即上下游之间无关时间闸门阻隔。
时钟表示这个动态流上打上了一个时间闸门,即以basetime 里设置的时间作为一个时间节点,这个时间节点以后,在父流提交的东西,不会往下流到本流。
New stream 的页面,Based time 的 Now , Transaction # , specail time 三个选项都可以设置时间闸门。
会以创建时间为准,保存时,将当前时间转换成一个具体的时间戳。创建成功后再查看时间,是当时的now. 不同时间点now 都有不同含义。常用于需要最新修改,但是不要以后的修改流下来的情况
在base stream 的history 里,每一条promote 都有一个对应的transaction ID , 这背后也是对应着的一个时间戳,可以在该base time 的histroy 里选一条提交的transaction ID ,或者选全局的一个trans
apt-get install -y dnsmasq
root@node248:/etc/resolvconf/resolv.conf.d# cat /etc/dnsmasq.conf | grep -v "^#|^$"
port=53
resolv-file=/etc/resolv.conf
strict-order
listen-address=172.0.11.248
addn-hosts=/etc/hosts
root@node248:/etc/resolvconf/resolv.conf.d# cat /etc/hosts
#.....
172.0.11.2 vm2
172.0.11.3 vm3
172.0.11.4 vm4.com
使用服务器本身的dns 列表,则resolv-file=/etc/resolv.conf
使用服务器上另外的dns 列表文件,即上游dns,则resolv-file=/etc/dnsmasq.d/ 此目录下放置 *conf
#14
service dnsmasq restart
#18
systemctl restart dnsmasq
客户端将此服务器ip 设置为dns 之后,查找域名时,会通过服务器的/etc/hosts 去解析域名,然后再通过resolv-file 中列的dns 去解析。
UBUNTU 14
root@vm1:/etc/dnsmasq.d# cat /etc/resolvconf/resolv.conf.d/base
nameserver 172.0.11.248
root@vm1:/etc/dnsmasq.d# cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#
fluxCD
https://fluxcd.io/
The GitOps operator for Kubernetes
填补了构建和监控之间的空白 ,持续监控git库中的yaml和 registry的镜像
It fills the automation void that exists between building and monitoring.
Automated git->cluster synchronisation
Flux的主要特性是版本控制存储库和集群之间的自动同步。如果对存储库进行任何更改,这些更改将自动部署到集群中。
所有配置都存储在版本控制中,并且本质上是最新的。在任何时候,任何人都可以完全以完全相同的配置状态重新创建集群。
对集群的更改对所有相关方都是立即可见的。
在事后分析期间,git日志为审计提供了完美的历史记录。
端到端,代码到生产管道不仅变得可能,而且容易。
另一个特性是容器的自动部署。它将持续监控一系列容器注册中心,并在适用的地方部署新版本。
这对于使存储库和集群保持最新非常有用。它允许单独的团队拥有自己的部署管道,因为Flux能够看到新映像并相应地更新集群。
可以禁用此功能,并将图像锁定到特定的版本。
对于跨环境和集群的配置自定义,Flux提供了对Kustomize和Helm的内置支持。
对于高级部署模式,如Canary版本、A/B测试和蓝/绿部署,Flux可以和Flagger一起使用。
Requirements and limitations
ConfigMaps allow you to decouple configuration artifacts from image content to keep containerized applications portable. This page provides a series of usage examples demonstrating how to create ConfigMaps and configure Pods using data stored in ConfigMaps.
ConfigMaps允许您将配置构件与映像内容解耦,以保持容器化应用程序的可移植性。这个页面提供了一系列使用示例,演示如何使用ConfigMaps中存储的数据创建ConfigMaps和配置Pods。
用kubectl create configmap创建
kubectl create configmap <map-name> <data-source>
--from-file
--from-file 可以跟路径,可以跟单个文件,可以多次使用跟多个文件
mkdir -p configure-pod-container/configmap/ # Download the sample files into `configure-pod-container/configmap/` directory wget https://kubernetes.io/examples/configmap/game.properties -O configure-pod-container/configmap/game.properties wget https://kubernetes.io/examples/configmap/ui.properties -O configure-pod-container/configmap/ui.properties # Create the configmap kubectl create configmap game-config --from-file=configure-pod-container/configmap/ kubectl create configmap game-config-2 --from-file=config
flagger
https://github.com/weaveworks/flagger
主要是推进
Flagger是Kubernetes公司的运营商,该公司使用Istio、Linkerd、App Mesh、NGINX、等高线或Gloo路由来自动提升canary部署,并使用Prometheus指标进行canary分析。canary分析可以通过webhook进行扩展,以运行验收测试、负载测试或任何其他自定义验证。
https://docs.flagger.app/usage/how-it-works
flagger 可以通过配置一个名为canary的自定义资源,将Kubernetes工作负载的发布过程自动化。
A canary resource can target a Kubernetes Deployment or DaemonSet.
Kubernetes Deployment example:
Based on the above configuration, Flagger generates the following Kubernetes objects:
deployment/<targetRef.name>-primary
hpa/<autoscalerRef.name>-primary
Flagger will detect changes to the target deployment (including secrets and configmaps) and will perform a canary analysis before promoting the new version as primary.
If the target deployment uses secrets and/or configmaps, Flagger will create a copy of each object using the -primary
prefix and will reference these objects in the primary deployment、
Note that the target deployment must have a single label selector in th
设置密码复杂度
http://www.linux-pam.org/Linux-PAM-html/sag-pam_cracklib.html
安装libpam-cracklib
apt-get install libpam-cracklib
修改文件 /etc/pam/common-password
中的配置,修改完保存即生效。
如果有加enforce_for_root ,则对root 有效。
默认对root无效。 当root 为操作修改的用户时,虽然会提示,但是仍能修改成功。
vi common-password
password requisite pam_cracklib.so retry=3 minlen=8 difok=3 dcredit=-1 ocredit=-1 enforce_for_root
以上例子为:可重试三次,密码最少8个字符,与旧密码至少3个字符不同,至少一个数字,至少一个符号,对root操作也有效。
http://www.linux-pam.org/Linux-PAM-html/sag-pam_cracklib.html
-----------------
difok=N
This argument will change the default of 5 for the number of character changes in the new password that differentiate it from the old password.
minlen=N
The minimum acceptable size for the new password (plus one if credits are not disabled which is the default). In addition to the number of characters in the new password, credit (of +1 in length) is given for each different kind of character (other, upper, lower and digit). The default for this parameter is 9 whic
https://github.com/tektoncd/pipeline
The Tekton Pipelines project provides k8s-style resources for declaring CI/CD-style pipelines.
Tekton管道项目为声明CI/ cd风格的管道提供了k8风格的资源。
kubectl apply --filename https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml
curl -LO https://github.com/tektoncd/cli/releases/download/v0.7.1/tkn_0.7.1_Linux_x86_64.tar.gz
# Change destination directory as needed
tar xvzf tkn_0.7.1_Linux_x86_64.tar.gz -C ~/bin
kubectl apply --filename https://github.com/tektoncd/dashboard/releases/download/v0.5.1/tekton-dashboard-release.yaml
默认镜像源安装时的问题解决:
其中:https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml
https://github.com/tektoncd/dashboard/releases/download/v0.5.1/tekton-dashboard-release.yaml
两个yaml 中创建资源时,pull 镜像用的镜像库是国外的,gcr.io 需要替换成国内的镜像源:gcr.azk8s.cn
如果使用原来的gcr.io , 资源创建成功后在启动的过程中,pod状态一直是 imagepullbackoff , 查看pod 内部,是无法pull 镜像所致。
get pods --na
新装系统 ubuntu 时,安装界面会让我们新建一个非root帐号,这个帐号有sudo 权限,记住装机时设置的用户密码。
在安装界面 安装预装软件时,最好将ssh勾上, 这样在初始设置时会比较方便一点。
1. 从普通用户登入root
Login: username
password:username-password
进入系统之后,执行
sudo passwd
输入三次密码,第一次为用户自己的密码,第二次第三次为root的新密码和密码确认。
看到提示密码修改成功之后,执行su , 输入刚刚设置的root 密码,切换到root 用户。
su
2.设置静态ip
ubuntu 18 和 14 的网络配置方式不同,ubuntu 18 需要设置netplan下的XXXX.yaml
其中注意使用yaml 的格式。
注意gateway4 表示ip4的gw ,以及gw 这一行不需要方括号 [ ]
dns 的ip应该再缩进一层再书写。
修改完毕之后,netplan apply 使用配置生效。
root@vm3:~# cd /etc/netplan root@vm3:~# cat /etc/netplan/01-netcfg.yaml # This file describes the network interfaces available on your system # For more information, see netplan(5). network: version: 2 renderer: networkd ethernets: ens3: addresses: [172.0.11.155/24] gateway4: 172.0.11.1 nameservers: addresses: [8.8.8.8, 114.114.114.114] dhcp4: no dhcp6: no root@vm3:~# netplan apply
3. 允许root 使用ssh 远程登录
修改PermitRootLogin项的值为yes , 然后重启ssh 服务
root@vm3:~# cat /etc/ssh/sshd_config | grep Root # the setting of "PermitR
在Centos 7.6 中,进行kvm 安装,virt-install 之后,在图形图面中,鼠标可以使用,键盘不可以使用,按键之后图形界面无反应,但是每按一次键盘CLI终端有一行warning 输出。
(virt-viewer:32227): GSpice-CRITICAL **: 02:22:38.179: send_key: assertion 'scancode != 0' failed
virt-install --name vm1 -r 8192 --disk path=/var/lib/libvirt/images/vm1.img,size=20 --vcpu=2 --network bridge=br0,model=e1000 --cdrom=/public/ubuntu-18.04.2-server-amd64.iso Starting install... Allocating 'vm1.img' | 20 GB 00:00:01 (virt-viewer:32227): GSpice-WARNING **: 02:22:36.541: PulseAudio context failed Connection refused (virt-viewer:32227): GSpice-WARNING **: 02:22:36.541: pa_context_connect() failed: Connection refused (virt-viewer:32227): GSpice-WARNING **: 02:22:36.605: Warning no automount-inhibiting implementation available (virt-viewer:32227): vnc-keymap-WARNING **: 02:22:36.642: Unknown keycode mapping '(null)'. Please report to gtk-vnc-list@gnome.org including