王海庆的云笔记

部署license-manager


关闭防火墙

systemctl stop firewalld
systemctl disable firewalld
sed -i -e  's/^SELINUX=.*/SELINUX=disabled/g' /etc/selinux/config
setenforce 0


换成阿里云的源

换成阿里云的源

rm -rf /etc/yum.repos.d/*
curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
curl -o /etc/yum.repos.d/epel.repo https://mirrors.aliyun.com/repo/epel-7.repo
curl -o /etc/yum.repos.d/docker-ce.repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

yum clean all
yum makecache fast -y


安装docker 

curl -fsSL "https://get.docker.com/" | bash -s -- --mirror Aliyun
或者
yum install docker-ce -y


修改配置

mkdir -p /etc/docker
cat >  /etc/docker/daemon.json << EOF
{
  "exec-opts": ["native.cgroupdriver=systemd"],
  "registry-mirrors": ["https://s9c0jp37.mirror.aliyuncs.com","https://docker.mirrors.ustc.edu.cn"]
}
EOF


启动docker服务

systemctl restart docker
systemctl enable docker
systemctl status docker


下载docker-compose

# 下载地址
https://github.com/docker/compose/releases
https://hub.fastgit.org/docker/compose/releases

# 下载
curl -fLO https://hub.fastgit.org/docker/compose/releases/download/1.29.2/docker-compose-Linux-x86_64
chmod +x docker-compose-Linux-x86_64
/bin/cp docker-compose-Linux-x86_64 /usr/bin/docker-compose


安装git

yum install git -y


下载代码

git clone https://github.com/edx/license-manager
或者
git clone https://hub.fastgit.org/edx/license-manager


下载devstack

# 国外,下载速度慢
git clone https://github.com/edx/devstack  /devstack

# 国内,可加速下载
git clone https://hub.fastgit.org/edx/devstack  /devstack


允许访问

sed -i 's/ALLOWED_HOSTS =.*/ALLOWED_HOSTS = ["*"]/g' /root/license-manager/license_manager/settings/base.py


编译

cd license-manager

make docker_build
make dev.up            # 会需要devstack
make dev.provision
make app-shell
make requirements


访问(没有真正的管理界面,不知道怎么用)

http://localhost:18170/admin

http://172.18.0.117:18170/admin/
http://172.18.0.117:18170/api-docs/

edx/edx


文章最后更新时间: 2021-11-26 11:13:30