IBM Suite Licensing Service (SLS) 是一个基于RLKS(Rational License Key Server)后端技术的许可系统API服务。它提供四类API接口,用于许可系统的配置、授权管理、令牌使用统计及许可管理等功能。
注意:此为预发布的开发中软件,存在潜在缺陷,请勿用于生产环境。
适用于RedHat OpenShift Container Platform 4环境中,需要通过API接口管理基于RLKS的许可系统的场景,支持许可配置、授权文件管理及令牌使用监控等需求。
基础环境要求
资源要求
最小调度容量:
| 软件 | 内存(GB) | CPU(核) | 磁盘(GB) | 节点数 |
|---|---|---|---|---|
| 总计 | 0.6 | 900m | 1 | 1 |
1. 安装cert-manager
OperatorHub提供的cert-manager版本已过时,需安装1.1.0或更高版本:
bashoc create namespace cert-manager oc apply -f https://github.com/jetstack/cert-manager/releases/download/v1.1.0/cert-manager.yaml
更多信息请参考安装说明。
2. 配置授权
创建命名空间(如ibm-sls)并创建包含IBM Entitled Registry授权密钥的Docker密钥:
bashoc new-project ibm-sls oc create secret docker-registry ibm-entitlement \ --docker-server=<你的 registry 服务器> \ --docker-username=<你的用户名> \ --docker-password=<你的密码> \
3. 配置MongoDB凭据
在部署SLS的命名空间中创建MongoDB凭据密钥:
yamlapiVersion: v1 kind: Secret type: Opaque metadata: name: sls-mongo-credentials namespace: ibm-sls data: username: "<base64编码的用户名>" password: "<base64编码的密码>"
4. 安装LicenseService实例
在创建的命名空间中安装操作员,然后创建LicenseService实例,指定适当的存储类和大小。可通过以下命令查看集群中可用的存储类:
bashoc get storageclasses
创建LicenseService实例的YAML配置示例:
yamlapiVersion: sls.ibm.com/v1 kind: LicenseService metadata: name: sls namespace: ibm-sls spec: mongo: configDb: admin nodes: - host: host1.domain.com port: 30257 - host: host2.domain.com port: 30257 secretName: sls-mongo-credentials rlks: storage: class: ibmc-block-bronze size: 5G
设置端口转发
将内部API暴露到集群外部:
shoc port-forward service/sls 7000:443
验证API运行状态
shcurl -ik https://localhost:7000/api/entitlement/config HTTP/1.1 200 OK X-Powered-By: Servlet/4.0 Content-Type: application/json Date: Mon, 12 Oct 2020 08:58:44 GMT Content-Language: en-GB Transfer-Encoding: chunked {"rlks":{"configuration":"single","hosts":[{"id":"0242ac110002","hostname":"rlks-0.rlks","port":27000}]}}
上传授权文件
shcurl -i -k -X PUT -F "file=@entitlement.lic" https://localhost:7000/api/entitlement/file HTTP/1.1 100 Continue Content-Length: 0 Date: Mon, 12 Oct 2020 08:56:59 GMT HTTP/1.1 200 OK Date: Mon, 12 Oct 2020 08:57:18 GMT X-Powered-By: Servlet/4.0 Content-Length: 0 Content-Language: en-GB
验证产品类型查询
shcurl -ik https://localhost:7000/api/products/MAS-Limited HTTP/1.1 200 OK X-Powered-By: Servlet/4.0 Content-Type: application/json Date: Mon, 12 Oct 2020 09:01:17 GMT Content-Language: en-GB Transfer-Encoding: chunked {"productId":"MAS-Limited","productVersion":"1.0","tokenId":"AppPoints","tokenCost":5,"issuedDate":"2020-04-22T00:00:00Z","expirationDate":"2023-08-30T00:00:00Z"}
验证令牌池查询
shcurl -ik https://localhost:7000/api/tokens HTTP/1.1 200 OK X-Powered-By: Servlet/4.0 Content-Type: application/json Date: Mon, 12 Oct 2020 09:02:02 GMT Content-Language: en-GB Transfer-Encoding: chunked [{"tokenId":"AppPoints","entitled":100,"used":0,"concurrent":0,"reserved":0,"expirationDate":"2023-08-30T00:00:00Z","available":100,"issuedDate":"2020-04-22T00:00:00Z"}]
安装LicenseService实例时,需指定RLKS使用的PVC存储类和容量。存储要求:
系统将自动创建名为rlks-pvc的PVC,使用ReadWriteOnce访问模式。
IBM Cloud存储
已测试支持以下IBM Cloud存储类:
加密建议
建议使用启用被动加密的存储来保护数据,许可系统本身不对持久卷执行主动加密。
备份流程
恢复流程
licenceId属性以覆盖新ID生成(需重用现有许可文件)参考Red Hat官方文档:使用Operator Lifecycle Manager升级操作员
安装前需将SecurityContextConstraints绑定到目标命名空间。已验证以下安全上下文约束可用:
restricted SCCyamlapiVersion: security.openshift.io/v1 metadata: annotations: kubernetes.io/description: "This policy is the most restrictive for SLS, requiring pods to run with a non-root UID, and preventing pods from accessing the host. The UID and GID will be bound by ranges specified at the Namespace level." name: ibm-sls-custom-scc allowHostDirVolumePlugin: false allowHostIPC: false allowHostNetwork: false allowHostPID: false allowHostPorts: false allowPrivilegeEscalation: true allowPrivilegedContainer: false allowedCapabilities: null defaultAddCapabilities: null fsGroup: type: MustRunAs kind: SecurityContextConstraint priority: 0 readOnlyRootFilesystem: false requiredDropCapabilities: - KILL - MKNOD - SETUID - SETGID runAsUser: type: MustRunAsRange seLinuxContext: type: MustRunAs supplementalGroups: type: RunAsAny users: [] volumes: - configMap - downwardAPI - emptyDir - persistentVolumeClaim - projected - secret
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录认证访问私有仓库
无需登录使用专属域名
Kubernetes 集群配置 Containerd
K3s 轻量级 Kubernetes 镜像加速
VS Code Dev Containers 配置
Podman 容器引擎配置
HPC 科学计算容器配置
ghcr、Quay、nvcr 等镜像仓库
Harbor Proxy Repository 对接专属域名
Portainer Registries 加速拉取
Nexus3 Docker Proxy 内网缓存
需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单
docker search 限制
站内搜不到镜像
离线 save/load
插件要用 plugin install
WSL 拉取慢
安全与 digest
新手拉取配置
镜像合规机制
manifest unknown
no matching manifest(架构)
invalid tar header(解压)
TLS 证书失败
DNS 超时
域名连通性排查
410 Gone 排查
402 与流量用尽
401 认证失败
429 限流
D-Bus 凭证提示
413 与超大单层
来自真实用户的反馈,见证轩辕镜像的优质服务