Quickly distribute linux-sh scripts for front-end projects (including compression, decompression, backup, and deployment)

Before using the quick contract sending script, please confirm whether you have a certain understanding of bastion host operation.
Insert image description here

Fortress machine packet sending skills

1. Introduction

Some projects require a UAT environment to be released (customers use a bastion machine to log in to the intranet) and need to operate a Linux server, which is more complex.
Both deployment and scripts can automatically execute a series of Operations to achieve specific purposes, such as automated deployment and automated testing.
Deployment generally needs to consider more factors, such as system architecture, performance requirements, deployment environment, etc., while scripts usually only need to focus on the automation of manual operations.
The general operation process is as follows:

  1. Download the **compressed package that passed the test fromDevelopment Environment; cd… cd… **
  2. Then uploadcompressed package to the server of UAT environmentMedium; zip boe-h520230615 ./boe-h5
  3. Find againFront-end specified directory(/work/zte-vue/…) Unzip; unzip mv boe-h52023 boe-h5
  4. Verify and finally complete the project deployment.

Although the above operation is described in a paragraph, it actually requires frequent operations through commands. It may be "awkward" if you are not careful.

2. Command subcontracting method

Refer to other articles https://blog.csdn.net/m0_37680500/article/details/131390633

3. Script outsourcing method

There are two main steps for script outsourcing: compression and deployment. Before operation, please confirm the following:

1. Have root permissions

2. There is a /home/zfs-user directory to store backup and decompressed zip files.

3. Have zip/unzip and other command execution permissions

3.1 Upload script

Log in to the server (refer to the command package method to log in to the bastion host)

http://jump.xxxx.com.cn/(My company’s bastion machine)

OpenFile ManagementUpload the deploy.sh file, which is in the compressed package attachment below

Upload it to the **/home/zfs-user** working directory

image.png

3.2 Compression

sh deploy.sh

Then just follow the prompts

image.png

3.3 Deployment & Backup

sh deploy.sh

Execute publish command

image.png

4. Attachments:

Bastion host operation manual:jumpserver user manual v1.docx
Script compressed package: Resource list at the top

Guess you like

Origin blog.csdn.net/m0_37680500/article/details/131390599