当前位置:网站首页>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
边栏推荐
- Enterprise custom form engine solution (XI) -- form rule engine 1
- PS screen printing brush 131, many illustrators have followed suit
- AcWing 3438. 数制转换
- Squid service startup script
- vs code 插件 koroFileHeader
- 数学公式(测试)
- Write a program to process a list container of string type. Find a special value in the container 9.27: and delete it if found. Rewrite the above procedure with deque container.
- [combinatorics] recursive equation (solution of linear non-homogeneous recursive equation with constant coefficients | standard form and general solution of recursive equation | proof of general solut
- Hongmeng fourth training
- Open vsftpd port under iptables firewall
猜你喜欢

Introduction to SolidWorks gear design software tool geartrax

How to purchase Google colab members in China

Redis: operation commands for list type data
![[RT thread] NXP rt10xx device driver framework -- RTC construction and use](/img/19/91a9d84ba84f81ef125c33eb4007bc.png)
[RT thread] NXP rt10xx device driver framework -- RTC construction and use

The third day of writing C language by Yabo people
![[RT thread] NXP rt10xx device driver framework -- Audio construction and use](/img/85/32a83eaa4b7f5b30d4d7c4f4c32791.png)
[RT thread] NXP rt10xx device driver framework -- Audio construction and use

Swm32 series Tutorial 4 port mapping and serial port application

Select 3 fcpx plug-ins. Come and see if you like them
![[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](/img/df/a034032e203e7935dafaf8a71cb6c8.jpg)
[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

1164 Good in C
随机推荐
The difference between i++ and ++i: tell their differences easily
问题随记 —— 在 edge 上看视频会绿屏
[RT thread] NXP rt10xx device driver framework -- RTC construction and use
QT adjust win screen brightness and sound size
A day's work list of an ordinary programmer
Great changes! National housing prices fell below the 10000 yuan mark
Luogu: p1155 [noip2008 improvement group] double stack sorting (bipartite graph, simulation)
[combinatorics] recursive equation (case where the non-homogeneous part is exponential | example where the non-homogeneous part is exponential)
[combinatorics] recursive equation (the problem of solving recursive equation with multiple roots | the problem is raised)
[RT thread] NXP rt10xx device driver framework -- pin construction and use
Kubernetes resource object introduction and common commands (III)
Apache service suspended asynchronous acceptex failed
基于主机的入侵系统IDS
List of financial products in 2022
Cloud primordial weekly | CNCF released the 2021 cloud primordial development status report, which was released on istio 1.13
[combinatorics] recursive equation (solution of linear non-homogeneous recursive equation with constant coefficients | standard form and general solution of recursive equation | proof of general solut
Free data | new library online | cnopendata complete data of China's insurance intermediary outlets
TCP拥塞控制详解 | 3. 设计空间
PHP processing - watermark images (text, etc.)
AcWing 3438. 数制转换