一、k8s
文档:
https://jimmysong.io/kubernetes-handbook/concepts/deployment.html
命令行大全
https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands
http://docs.kubernetes.org.cn/626.html
二、rancher学习视频
http://www.cnblogs.com/rancher-maomao/p/9073919.html
三、jenkins 如何在rancher里面实现持续集成
https://rancher.com/blog/2018/2018-11-27-scaling-jenkins/ jenkins调用kubectl的插件
四、linux 命令行大全
http://www.runoob.com/linux/linux-command-manual.html
五、Docker 命令行大全
http://www.runoob.com/docker/docker-command-manual.html
六、Docker,Docker Compose,Docker Swarm,Kubernetes之间的区别
https://blog.csdn.net/notsaltedfish/article/details/80959913
七、如果在Rancher里面通过容器部署Jenkins的话,会因为官方的jenkins镜像里面没有安装docker,kubectl等工具导致jenkins无法执行docker之类的命令。需要使用下面的Dockerfile来安装jenkins。
https://github.com/daviddang91/jenkins-docker-kubectl/blob/master/Dockerfile
https://github.com/jenkinsci/docker/issues/263
FROM jenkins/jenkins:lts
MAINTAINER robert.li@shareworks.cn
USER root ENV JAVA_VERSION 8
ENV MAVEN_VERSION 3.6.0 # Install the latest Docker CE binaries
RUN \
apt-get update && \
apt-get -y install apt-transport-https \
ca-certificates \
curl \
gnupg2 \
software-properties-common && \
curl -fsSL https://download.docker.com/linux/$(. /etc/os-release; echo "$ID")/gpg > /tmp/dkey; apt-key add /tmp/dkey && \
add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/$(. /etc/os-release; echo "$ID") \
$(lsb_release -cs) \
stable" && \
apt-get update && \
apt-get -y install docker-ce # Override jenkins's preinstalled java version
ENV JAVA_HOME /usr/lib/jvm/java-8-oracle
ENV JRE_HOME ${JAVA_HOME}/jre
ENV CLASSPATH .:${JAVA_HOME}/lib/dt.jar
RUN \
apt-get install -y software-properties-common && \
# add-apt-repository ppa:webupd8team/java -y && \
add-apt-repository -y 'deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main' && \
apt-get update && \
echo oracle-java${JAVA_VERSION}-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections && \
apt-get install --allow-unauthenticated -y oracle-java${JAVA_VERSION}-installer && \
apt-get clean # Install maven
ENV M2_HOME /opt/apache-maven
ENV PATH $PATH:${M2_HOME}/bin
RUN \
wget -q -c -O "apache-maven-${MAVEN_VERSION}.tar.gz" http://mirrors.tuna.tsinghua.edu.cn/apache/maven/maven-3/3.6.0/binaries/apache-maven-${MAVEN_VERSION}-bin.tar.gz && \
tar -xf apache-maven-${MAVEN_VERSION}.tar.gz && \
mv apache-maven-${MAVEN_VERSION} ${M2_HOME} \
&& ${M2_HOME}/bin/mvn -version