siamaksade.openshift_sonatype_nexus
Ansible 角色:在 OpenShift 上部署 Sonatype Nexus
=========
这是一个用于在 OpenShift 上部署 Sonatype Nexus 3 的 Ansible 角色,Nexus 上预配置了 Red Hat 企业 Maven 仓库。
注意:此角色已更新,仅支持 Sonatype Nexus 3
角色变量
变量 | 默认值 | 描述 |
---|---|---|
nexus_service_name |
nexus | OpenShift 上的 Nexus 服务名称 |
nexus_image_version |
3.12.1 | Docker Hub 上可用的 Nexus 3 镜像版本 Nexus 3 |
nexus_volume_capacity |
10Gi | Nexus 的持久卷容量 |
nexus_max_memory |
2Gi | 分配给 Nexus 容器的最大内存 |
nexus_min_memory |
512Mi | 分配给 Nexus 容器的最小内存 |
nexus_max_cpu |
1 | 分配给 Nexus 容器的最大 CPU |
nexus_min_cpu |
200m | 分配给 Nexus 容器的最小 CPU |
nexus_admin_user |
adminuser | Nexus 管理员用户 |
nexus_admin_password |
admin123 | Nexus 管理员密码 |
current_nexus_admin_password |
admin123 | 当前实例的管理员密码(如果需要重新配置现有实例) |
project_name |
nexus | Nexus 容器的 OpenShift 项目名称 |
project_display_name |
Nexus | Nexus 容器的 OpenShift 项目显示名称 |
project_desc |
Nexus Repository Manager | Nexus 容器的 OpenShift 项目描述 |
project_annotations |
- | Nexus 容器的 OpenShift 项目注释 |
openshift_cli |
oc | OpenShift CLI 命令和参数(例如,auth) |
OpenShift 版本兼容性
在 requirements.yml
中列出此角色时,请确保通过以下标签固定角色版本:
- src: siamaksade.openshift_nexus
version: 1.1.0
以下表格显示已测试和验证的版本组合:
角色版本 | OpenShift 版本 |
---|---|
1.0.x | 3.7.x |
1.1.x | 3.9.x, 3.10.x, 3.11.x |
请注意,如果未在上述列表中列出某个版本组合,并不意味着最新的角色版本不能在新版本的 OpenShift 上运行。上述表格仅为我们已测试和验证的组合。
示例剧本
name: 示例剧本
hosts: localhost
tasks:
- import_role:
name: siamaksade.openshift_nexus
vars:
project_name: "cicd-project"
openshift_cli: "oc --server http://master:8443"