当前位置:网站首页>Getting started with deops
Getting started with deops
2022-07-03 17:34:00 【yolo2016】
Deops introduction
DevOps What is it? ?
DevOps, Literally means Development &Operations Abbreviation , That's development & Operation and maintenance .
Software development process
The overall software development process includes :
- PLAN: The development team makes the development plan according to the customer's goals
- CODE: according to PLAN Start the coding process , You need to store different versions of code in a library .
- BUILD: After coding , You need to build and run the code .
- TEST: After successfully building the project , You need to test whether the code exists BUG Or error .
- DEPLOY: After manual and automated testing of the code , Confirm that the code is ready to be deployed and handed over to the operation and maintenance team .
- OPERATE: The operation and maintenance team deploys the code into the production environment .
- MONITOR: After the project is deployed online , Need continuous monitoring of products .
- INTEGRATE: Then send the feedback received in the monitoring phase back to PLAN Stage , The whole iterative process is DevOps At the heart of , That is to say, to continue to integrate into 、 Continuous deployment .

CI/CD

CI/CD It can be understood as :
- CI The process is through Jenkins Pull the code 、 structure 、 Make an image and give it to the tester to test .
- Continuous integration : So that the software code can be continuously integrated into the backbone , And automatically build and test .
- CD The process is through Jenkins Pull the labeled release code 、 structure 、 Make the image and hand it to the operation and maintenance personnel for deployment .
- Continuous delivery : Allow continuously integrated code to be deployed manually .
- Continuous deployment : Automated deployment of continuously deliverable code anytime, anywhere .

1) coder Put the code push To gitlab Warehouse
2)jenkins take gitlab Pull the warehouse code , plug-in unit maven Used to build , The code is packaged into an application
3)jenkis Put the program push To the server environment , With docker How to run .
Tool introduction and environment deployment
docker Environmental preparation
yum -y install yum-utils device-mapper-persistent-data lvm2
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
yum -y install docker-ce
systemctl start docker
systemctl enable docker
docker version
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF' { "exec-opts": ["native.cgroupdriver=systemd"], "registry-mirrors": ["https://du3ia00u.mirror.aliyuncs.com"], "live-restore": true, "log-driver":"json-file", "log-opts": {"max-size":"500m", "max-file":"3"}, "max-concurrent-downloads": 10, "max-concurrent-uploads": 5, "storage-driver": "overlay2" } EOF
sudo systemctl daemon-reload
sudo systemctl restart docker
curl -L https://get.daocloud.io/docker/compose/releases/download/1.29.2/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod 777 /usr/local/bin/docker-compose
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
docker-compose -version
chmod a+x docker-compos
Code Stage
gitlab install
docker search gitlab
docker pull gitlab/gitlab-ce
[[email protected] gitlab]# cat docker-compose.yml
version: '3.7'
services:
gitlab:
image: gitlab/gitlab-ce
container_name: gitlab
restart: always
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'http://192.168.3.80:8929'
gitlab_rails['gitlab_shell_ssh_port'] = 2224
ports:
- '8929:8929'
- '2224:2224'
volumes:
- './config:/etc/gitlab'
- './logs:/var/log/gitlab'
- './data:/var/opt/gitlab'
docker-compose up -d
docker exec -it gitlab cat /etc/gitlab/initial_root_password
git Use
git add .
git commit -m 'update'
git push -u origin --all

Integrate Tools
jenkins install
[[email protected]_host81 docker-jenkis]# cat docker-compose.yml
version: "3"
services:
jenkins:
image: jenkins/jenkins:lts-jdk11
container_name: jenkins
ports:
- 8080:8080
- 50000:50000
volumes:
- ./data/:/var/jenkins_home/
docker exec -it jenkins cat /var/jenkins_home/secrets/initialAdminPassword
Maven Environmental preparation
https://maven.apache.org/download.cgi
jdk Download address http://www.codebaoku.com/jdk/jdk-oracle-jdk11.html
take jdk as well as maven Put it in jekins Under the directory of , In order to jenkins Can access .

Maven Set private address and jdk edition
[[email protected]_host81 conf]# ll -d settings.xml
-rw-r–r–. 1 root root 11088 7 month 2 17:27 settings.xml
<!-- Alibaba cloud image address -->
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
<!-- JDK1.8 Compile the plug-in -->
<profile>
<id>jdk-1.8</id>
<activation>
<activeByDefault>true</activeByDefault>
<jdk>1.8</jdk>
</activation>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
</properties>
</profile>
Case study
边栏推荐
- September, 19, "cam principle and application" online assignment [Full Score answer]
- kubernetes资源对象介绍及常用命令(三)
- 1164 Good in C
- 国内如何购买Google Colab会员
- Examination questions for the assignment of selected readings of British and American Literature in the course examination of Fujian Normal University in February 2022
- 1146_ SiCp learning notes_ exponentiation
- 鸿蒙第四次培训
- AcWing 3438. Number system conversion
- [set theory] order relation: summary (partial order relation | partial order set | comparable | strictly less than | covering | hasto | total order relation | quasi order relation | partial order rela
- Kubernetes resource object introduction and common commands (III)
猜你喜欢

Kubernetes resource object introduction and common commands (V) - (NFS & PV & PVC)

1147_ Makefile learning_ Target files and dependent files in makefile

鸿蒙第四次培训

Hongmeng third training
![[RT thread] construction and use of --hwtimer of NXP rt10xx device driver framework](/img/df/a7719bcb00ff66e21f3a391ab94573.png)
[RT thread] construction and use of --hwtimer of NXP rt10xx device driver framework

鸿蒙第三次培训

How do large consumer enterprises make digital transformation?

Embedded-c language-7

Select 3 fcpx plug-ins. Come and see if you like them

Design e-commerce spike
随机推荐
【RT-Thread】nxp rt10xx 设备驱动框架之--Pin搭建和使用
Vs2013 has blocked the installer, and ie10 needs to be installed
Free data | new library online | cnopendata complete data of China's insurance intermediary outlets
kubernetes资源对象介绍及常用命令(五)-(NFS&PV&PVC)
毕业总结
QT学习日记9——对话框
UE4 official charging resources, with a total price of several thousand
Apache service suspended asynchronous acceptex failed
Internet hospital his management platform source code, online consultation, appointment registration smart hospital applet source code
ArrayList分析3 : 删除元素
How to train mask r-cnn model with your own data
ArrayList分析3 : 删除元素
Wechat applet for the first time
鸿蒙第三次培训
数仓任务里面 跑SQL任务的时候用的数据库账号是在哪里配置的
一位普通程序员一天工作清单
Internet Hospital his Management Platform source, online Inquiry, appointment Registration Smart Hospital Small program source
Cross border e-commerce: advantages of foreign trade enterprises in overseas social media marketing
i++与++i的区别:通俗易懂的讲述他们的区别
How to purchase Google colab members in China