一、后端服务
1、kubectl cli客户端
2、helm3 工具
3、mongodb mongodb-linux-x86_64-rhel70-4.4.12
4、gitlab客户端
5、Linux操作系统
2、前端服务
1、nginx用于部署前端服务
三、安装过程
3.1、helm工具安装,下载地址:https://github.com/helm/helm/releases/tag/v3.6.3
3.2 安装kubectl
curl -LO https://dl.k8s.io/release/v1.24.0/bin/linux/amd64/kubectl
mv kubectl /usr/local/bin
chmod +x /usr/local/bin/kubectl
3.3 安装mongodb及初始化数据
wget https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-rhel70-4.4.12.tgz
mv mongodb-linux-x86_64-rhel70-4.4.12 ../mongodb
cd ../mongodb/
mkdir -p ./data
nohup ./bin/mongod --dbpath ./data &
mondb
use oms ###非常重要,需要先切换,然后再创建用户
db.createUser({
user: "oms",
pwd: 'oms',
roles: [ { role: "userAdminAnyDatabase", db: "admin" } ],
mechanisms : ["SCRAM-SHA-1"]
});
执行三张基础数据表:
access.sql 基础权限数据控制
dept.sql 部门基础数据表
serviceType 服务类型基础表
3.4 安装nginx
rm -rf /etc/yum.repos.d/epel.repo
cat <<EOF> /etc/yum.repos.d/CentOS-Base.repo
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#
[base]
name=CentOS-$releasever - Base - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/$releasever/os/$basearch/
http://mirrors.aliyuncs.com/centos/$releasever/os/$basearch/
http://mirrors.cloud.aliyuncs.com/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
#released updates
[updates]
name=CentOS-$releasever - Updates - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/$releasever/updates/$basearch/
http://mirrors.aliyuncs.com/centos/$releasever/updates/$basearch/
http://mirrors.cloud.aliyuncs.com/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/$releasever/extras/$basearch/
http://mirrors.aliyuncs.com/centos/$releasever/extras/$basearch/
http://mirrors.cloud.aliyuncs.com/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/$releasever/centosplus/$basearch/
http://mirrors.aliyuncs.com/centos/$releasever/centosplus/$basearch/
http://mirrors.cloud.aliyuncs.com/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/$releasever/contrib/$basearch/
http://mirrors.aliyuncs.com/centos/$releasever/contrib/$basearch/
http://mirrors.cloud.aliyuncs.com/centos/$releasever/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
EOF
wget http://nginx.org/download/nginx-1.20.2.tar.gz
tar -zxvf nginx-1.20.2.tar.gz
yum -y install pcre pcre-devel
yum -y install openssl openssl-devel
yum -y install zlib zlib-devel
./configure --prefix=/usr/local/nginx --with-http_ssl_module
make && make install
cd /usr/local/nginx/sbin
./nginx ##启动服务
3.5 安装gitlab客户端
3.6 安装npm and cnpm
npm install -g cnpm --registry=https://registry.npm.taobao.org