好物优选点击查看详情 京东购买

暂无内容

Docker部署Nexus3,并使用Nginx进行反向代理 集成LDAP

1、使用docker-compose部署

mkdir -p /srv/nexus/nexus-compose/ mkdir -p /srv/nexus/data chown 200 -R /srv/nexus/data/  version: '3' services: nexus3: restart: always image: sonatype/nexus3:3.33.1 ports: - 10.11.1.13:8081:8081 - 10.11.1.13:18081:8081 - 10.11.1.13:18082:8082 volumes: - /srv/nexus/data:/nexus-data cd /srv/nexus/nexus-compose/ docker-compose up -d 

2、配置Nginx代理

cp /etc/nginx/conf.d/default.conf /etc/nginx/conf.d/nexus.conf  upstream nexus_website { server 10.11.1.13:8081; } upstream nexus_docker_hosted { server 10.11.1.13:18081; } upstream nexus_docker_group { server 10.11.1.13:18082; } server { listen 443 ssl http2; listen 80; server_name nexus.opsbugs.com; ssl_certificate /etc/nginx/cert/6172143_nexus.opsbugs.com.pem; ssl_certificate_key /etc/nginx/cert/6172143_nexus.opsbugs.com.key; client_max_body_size 10G; location / { proxy_pass http://nexus_website; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto "https"; } } server { listen 443 ssl http2; listen 80; server_name repo.opsbugs.com; ssl_certificate /etc/nginx/cert/6174303_repo.opsbugs.com.pem; ssl_certificate_key /etc/nginx/cert/6174303_repo.opsbugs.com.key; client_max_body_size 10G; chunked_transfer_encoding on; set $upstream "nexus_docker_hosted"; if ( $request_method ~* 'GET') { set $upstream "nexus_docker_group"; } if ($request_uri ~ '/search') { set $upstream "nexus_docker_hosted"; } location / { proxy_pass http://$upstream; proxy_set_header Host $host; proxy_connect_timeout 3600; proxy_send_timeout 3600; proxy_read_timeout 3600; proxy_set_header X-Real-IP $remote_addr; proxy_buffering off; proxy_request_buffering off; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto http; } } 

3、集成LDAP

字段 内容
Name AD
LDAP server address ldap://10.11.10.1:389
Search Base DN ou=opsbugs,dc=opsbugs,dc=com
Authentication method Simple Authenticaition
Username or DN Administrator@opsbugs.com
Password
Conflguration template Active Directory
User relative DN
User filter (&(|(objectclass=person))(|(|(memberof=CN=运维,OU=运维,OU=opsbugs,DC=opsbugs,DC=com))))

部署helm仓库

 helm repo add opsbugshttps://nexus.opsbugs.com/repository/charts/ helm repo add bitnami https://charts.bitnami.com/bitnami  helm pull bitnami/postgresql-ha  helm plugin install --version master https://github.com/sonatype-nexus-community/helm-nexus-push.git  helm nexus-push opsbugs postgresql-ha-8.6.11.tgz -u xxx -p xxx  helm package ray/ helm nexus-push opsbugs ray-0.1.0.tgz -u xxx -p xxxx 

原文链接:https://blog.csdn.net/weixin_45027467/article/details/124978916

© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享