---备用文档 SREWorks开源构建
1. SREWorks源码构建及上传
1.1 构建环境准备
- 一台安装有
git / docker
命令的机器
1.2 拉取 SREWorks 项目源码
git clone http://gitlab.alibaba-inc.com/sreworks/sreworks.git --recursive --single-branch
cd sreworks
SW_ROOT=$(pwd)
1.3 构建 sw-appmanager 镜像及上传
在sreworks目录下,直接执行构建脚本并推送:
#准备一个能够上传镜像的仓库
SW_REPO="registry.cn-hangzhou.aliyuncs.com/alisre"
./build.sh -t all -p $SW_REPO -b
也可以手动分步执行相关服务的构建,包含sw-appmanager依赖及自身镜像的构建三大步骤:
#准备一个能够上传镜像的仓库
SW_REPO="registry.cn-hangzhou.aliyuncs.com/alisre"
# sw-appmanager 依赖构建
./build.sh -t base -p $SW_REPO -b
# sw-appmanager 构建
./build.sh -t appmanager -p $SW_REPO -b
2. SREWorks部署
2.1. 部署环境准备
2.2 安装 SREworks helm包
helm install appmanager $SW_ROOT/chart/sreworks-chart \
--create-namespace --namespace sreworks \
--set appmanager.home.url="https://sreworks.c38cca9c474484bdc9873f44f733d8bcd.cn-beijing.alicontainer.com"
附: swcli安装本地方法
# MACOS https://abm-storage.oss-cn-zhangjiakou.aliyuncs.com/swcli-darwin-amd64
# Linux https://abm-storage.oss-cn-zhangjiakou.aliyuncs.com/swcli-linux-amd64
# Windows https://abm-storage.oss-cn-zhangjiakou.aliyuncs.com/swcli-windows-amd64
wget https://abm-storage.oss-cn-zhangjiakou.aliyuncs.com/swcli-darwin-amd64 -O $SW_ROOT/swcli
chmod 755 $SW_ROOT/swcli
# 配置swcli