ကုဒ်ချဉ်သကပ်မဟုအဖဌစ် အခဌေခံအဆောက်အအုံကို အသုံသပဌု၍ Nexus Sonatype ကို ထည့်သလင်သခဌင်သနဟင့် ပဌုပဌင်ခဌင်သ

Sonatype Nexus သည် developer မျာသသည် Java (Maven) မဟီခိုမဟု၊ Docker၊ Python၊ Ruby၊ NPM၊ Bower ပုံမျာသ၊ RPM ပက်ကေ့ဂျ်မျာသ၊ gitlfs၊ Apt၊ Go၊ Nuget နဟင့် ၎င်သတို့၏ဆော့ဖ်ဝဲလ်လုံခဌုံရေသကို ဖဌန့်ဝေပေသသည့် ပရောက်စီ၊ သိမ်သဆည်သခဌင်သနဟင့် စီမံခန့်ခလဲနိုင်သည့် ပေါင်သစပ်ပလပ်ဖောင်သတစ်ခုဖဌစ်သည်။

အဘယ်ကဌောင့် Sonatype Nexus လိုအပ်သနည်သ။

  • ကိုယ်ပိုင်ရဟေသဟောင်သပစ္စည်သမျာသကို သိမ်သဆည်သရန်အတလက်၊
  • အင်တာနက်မဟဒေါင်သလုဒ်လုပ်ထာသသော caching artifacts အတလက်၊

အခဌေခံ Sonatype Nexus ပက်ကေ့ဂျ်တလင် ပံ့ပိုသထာသသော ပစ္စည်သမျာသ-

  • Java၊ Maven (အိုသ)
  • Docker
  • စပါသအုံသ (pip)
  • ပတ္တမဌာသ (ကျောက်မျက်)
  • NPM
  • Bower
  • ယလမ် (rpm)
  • gitlfs
  • ကုန်ကဌမ်သ
  • အခန်သ (deb)
  • Go
  • Nuget

အသိုက်အဝန်သ ပံ့ပိုသထာသသော ပစ္စည်သမျာသ-

  • တေသရေသဆရာ
  • Conan
  • CPAN
  • ELPA
  • သံခမောက်
  • P2
  • R

Sonatype Nexus ကို အသုံသပဌု၍ ထည့်သလင်သခဌင်သ။ https://github.com/ansible-ThoTeam/nexus3-oss

လိုအပ်ချက်

  • အင်တာနက်ပေါ်တလင် ansible အသုံသပဌုခဌင်သအကဌောင်သဖတ်ပါ။
  • ansible ကို install လုပ်ပါ။ pip install ansible playbook လည်ပတ်သည့် workstation ပေါ်တလင်။
  • သတ်မဟတ်မည် geerlingguy.java playbook လည်ပတ်သည့် workstation ပေါ်တလင်။
  • သတ်မဟတ်မည် geerlingguy.apache playbook လည်ပတ်သည့် workstation ပေါ်တလင်။
  • ကအခန်သကဏ္ဍကို CentOS 7၊ Ubuntu Xenial (16.04) နဟင့် Bionic (18.04)၊ Debian Jessie နဟင့် Stretch တလင် စမ်သသပ်ထာသသည်။
  • jmespath Playbook လည်ပတ်နေသည့် အလုပ်ရုံပေါ်တလင် စာကဌည့်တိုက်ကို ထည့်သလင်သရပါမည်။ ထည့်သလင်သရန်- sudo pip install -r requirements.txt
  • playbook ဖိုင် (ဥပမာ အောက်ဖော်ပဌပါ) ကို nexus.yml ဖိုင်တလင် သိမ်သဆည်သပါ။
  • ချိတ်ဆက်မဟုထည့်သလင်သခဌင်သကို လုပ်ဆောင်ပါ။ ansible-playbook -i host nexus.yml

Maven (java), Docker, Python, Ruby, NPM, Bower, RPM နဟင့် gitlfs repositories တို့ဖဌင့် LDAP မပါဘဲ nexus တပ်ဆင်ခဌင်သအတလက် ansible-playbook ဥပမာ။

---
- name: Nexus
  hosts: nexus
  become: yes

  vars:
    nexus_timezone: 'Asia/Omsk'
    nexus_admin_password: "admin123"
    nexus_public_hostname: 'apatsev-nexus-playbook'
    httpd_setup_enable: false
    nexus_privileges:
      - name: all-repos-read
        description: 'Read & Browse access to all repos'
        repository: '*'
        actions:
          - read
          - browse
      - name: company-project-deploy
        description: 'Deployments to company-project'
        repository: company-project
        actions:
          - add
          - edit
    nexus_roles:
      - id: Developpers # maps to the LDAP group
        name: developers
        description: All developers
        privileges:
          - nx-search-read
          - all-repos-read
          - company-project-deploy
        roles: []
    nexus_local_users:
      - username: jenkins # used as key to update
        first_name: Jenkins
        last_name: CI
        email: [email protected]
        password: "s3cr3t"
        roles:
          - Developpers # role ID here
    nexus_blobstores:
      - name: company-artifacts
        path: /var/nexus/blobs/company-artifacts
    nexus_scheduled_tasks:
      - name: compact-blobstore
        cron: '0 0 22 * * ?'
        typeId: blobstore.compact
        taskProperties:
          blobstoreName: 'company-artifacts'

    nexus_repos_maven_proxy:
      - name: central
        remote_url: 'https://repo1.maven.org/maven2/'
        layout_policy: permissive
      - name: jboss
        remote_url: 'https://repository.jboss.org/nexus/content/groups/public-jboss/'
      - name: vaadin-addons
        remote_url: 'https://maven.vaadin.com/vaadin-addons/'
      - name: jaspersoft
        remote_url: 'https://jaspersoft.artifactoryonline.com/jaspersoft/jaspersoft-repo/'
        version_policy: mixed
    nexus_repos_maven_hosted:
      - name: company-project
        version_policy: mixed
        write_policy: allow
        blob_store: company-artifacts
    nexus_repos_maven_group:
      - name: public
        member_repos:
          - central
          - jboss
          - vaadin-addons
          - jaspersoft

    # Yum. Change nexus_config_yum to true for create yum repository
    nexus_config_yum: true
    nexus_repos_yum_hosted:
      - name: private_yum_centos_7
        repodata_depth: 1
    nexus_repos_yum_proxy:
      - name: epel_centos_7_x86_64
        remote_url: http://download.fedoraproject.org/pub/epel/7/x86_64
        maximum_component_age: -1
        maximum_metadata_age: -1
        negative_cache_ttl: 60
      - name: centos-7-os-x86_64
        remote_url: http://mirror.centos.org/centos/7/os/x86_64/
        maximum_component_age: -1
        maximum_metadata_age: -1
        negative_cache_ttl: 60
    nexus_repos_yum_group:
      - name: yum_all
        member_repos:
          - private_yum_centos_7
          - epel_centos_7_x86_64

    # NPM. Change nexus_config_npm to true for create npm repository
    nexus_config_npm: true
    nexus_repos_npm_hosted: []
    nexus_repos_npm_group:
      - name: npm-public
        member_repos:
          - npm-registry
    nexus_repos_npm_proxy:
      - name: npm-registry
        remote_url: https://registry.npmjs.org/
        negative_cache_enabled: false

    # Docker. Change nexus_config_docker to true for create docker repository
    nexus_config_docker: true
    nexus_repos_docker_hosted:
      - name: docker-hosted
        http_port: "{{ nexus_docker_hosted_port }}"
        v1_enabled: True
    nexus_repos_docker_proxy:
      - name: docker-proxy
        http_port: "{{ nexus_docker_proxy_port }}"
        v1_enabled: True
        index_type: "HUB"
        remote_url: "https://registry-1.docker.io"
        use_nexus_certificates_to_access_index: false
        maximum_component_age: 1440
        maximum_metadata_age: 1440
        negative_cache_enabled: true
        negative_cache_ttl: 1440
    nexus_repos_docker_group:
      - name: docker-group
        http_port: "{{ nexus_docker_group_port }}"
        v1_enabled: True
        member_repos:
          - docker-hosted
          - docker-proxy

    # Bower. Change nexus_config_bower to true for create bower repository
    nexus_config_bower: true
    nexus_repos_bower_hosted:
      - name: bower-hosted
    nexus_repos_bower_proxy:
      - name: bower-proxy
        index_type: "proxy"
        remote_url: "https://registry.bower.io"
        use_nexus_certificates_to_access_index: false
        maximum_component_age: 1440
        maximum_metadata_age: 1440
        negative_cache_enabled: true
        negative_cache_ttl: 1440
    nexus_repos_bower_group:
      - name: bower-group
        member_repos:
          - bower-hosted
          - bower-proxy

    # Pypi. Change nexus_config_pypi to true for create pypi repository
    nexus_config_pypi: true
    nexus_repos_pypi_hosted:
      - name: pypi-hosted
    nexus_repos_pypi_proxy:
      - name: pypi-proxy
        index_type: "proxy"
        remote_url: "https://pypi.org/"
        use_nexus_certificates_to_access_index: false
        maximum_component_age: 1440
        maximum_metadata_age: 1440
        negative_cache_enabled: true
        negative_cache_ttl: 1440
    nexus_repos_pypi_group:
      - name: pypi-group
        member_repos:
          - pypi-hosted
          - pypi-proxy

    # rubygems. Change nexus_config_rubygems to true for create rubygems repository
    nexus_config_rubygems: true
    nexus_repos_rubygems_hosted:
      - name: rubygems-hosted
    nexus_repos_rubygems_proxy:
      - name: rubygems-proxy
        index_type: "proxy"
        remote_url: "https://rubygems.org"
        use_nexus_certificates_to_access_index: false
        maximum_component_age: 1440
        maximum_metadata_age: 1440
        negative_cache_enabled: true
        negative_cache_ttl: 1440
    nexus_repos_rubygems_group:
      - name: rubygems-group
        member_repos:
          - rubygems-hosted
          - rubygems-proxy

    # gitlfs. Change nexus_config_gitlfs to true for create gitlfs repository
    nexus_config_gitlfs: true
    nexus_repos_gitlfs_hosted:
      - name: gitlfs-hosted

  roles:
    - { role: geerlingguy.java }
    # Debian/Ubuntu only
    # - { role: geerlingguy.apache, apache_create_vhosts: no, apache_mods_enabled: ["proxy_http.load", "headers.load"], apache_remove_default_vhost: true, tags: ["geerlingguy.apache"] }
    # RedHat/CentOS only
    - { role: geerlingguy.apache, apache_create_vhosts: no, apache_remove_default_vhost: true, tags: ["geerlingguy.apache"] }
    - { role: ansible-thoteam.nexus3-oss, tags: ['ansible-thoteam.nexus3-oss'] }

Screenshots:

ကုဒ်ချဉ်သကပ်မဟုအဖဌစ် အခဌေခံအဆောက်အအုံကို အသုံသပဌု၍ Nexus Sonatype ကို ထည့်သလင်သခဌင်သနဟင့် ပဌုပဌင်ခဌင်သ

ကုဒ်ချဉ်သကပ်မဟုအဖဌစ် အခဌေခံအဆောက်အအုံကို အသုံသပဌု၍ Nexus Sonatype ကို ထည့်သလင်သခဌင်သနဟင့် ပဌုပဌင်ခဌင်သ

ပဌောင်သလဲနိုင်သော အခန်သကဏ္ဍမျာသ

Role Variables မျာသ

ပုံသေတန်ဖိုသမျာသဖဌင့် ကိန်သရဟင်မျာသ (ကဌည့်ရဟုပါ။ default/main.yml):

အထလေထလေပဌောင်သလဲမဟုမျာသ

    nexus_version: ''
    nexus_timezone: 'UTC'

မူရင်သအာသဖဌင့်၊ အခန်သကဏ္ဍသည် နောက်ဆုံသရနိုင်သော Nexus ဗာသရဟင်သကို ထည့်သလင်သပါမည်။ variable ကိုပဌောင်သခဌင်သဖဌင့် ဗာသရဟင်သကို သင်ပဌင်နိုင်သည်။ nexus_version. ရနိုင်သောဗာသရဟင်သမျာသကို ကဌည့်ရဟုပါ။ https://www.sonatype.com/download-oss-sonatype.

သင်သည် ဗာသရဟင်သအသစ်သို့ ပဌောင်သပါက၊ အခန်သကဏ္ဍသည် သင်၏ Nexus ထည့်သလင်သမဟုကို အပ်ဒိတ်လုပ်ရန် ကဌိုသပမ်သမည်ဖဌစ်သည်။

အကယ်၍ သင်သည် နောက်ဆုံသထလက် Nexus ဗာသရဟင်သဟောင်သကို အသုံသပဌုနေပါက၊ ထည့်သလင်သထာသသော ထုတ်လလဟတ်မဟုတလင် မရရဟိနိုင်သော အင်္ဂါရပ်မျာသကို သင်အသုံသမပဌုကဌောင်သ သေချာစေသင့်သည် (ဥပမာ၊ hosting yum repositories သည် 3.8.0 ထက်ကဌီသသော nexus အတလက် ရနိုင်သည်၊ git lfs repo 3.3.0 ထက်ကဌီသသော ချိတ်ဆက်မဟုအတလက်၊)

nexus timezone nexus_scheduled လုပ်ဆောင်စရာမျာသအတလက် အောက်ပါ cron အသုံသအနဟုန်သမျာသနဟင့် ပေါင်သစပ်အသုံသပဌုနိုင်သော Java အချိန်ဇုန်၏ အမည်ဖဌစ်ပါသည်။

Nexus အပေါက်နဟင့် ဆက်စပ်လမ်သကဌောင်သ

    nexus_default_port: 8081
    nexus_default_context_path: '/'

Java ချိတ်ဆက်မဟုလုပ်ငန်သစဉ်၏ port နဟင့် context လမ်သကဌောင်သ။ nexus_default_context_path သတ်မဟတ်သောအခါတလင် ရဟေ့သို့မျဉ်သစောင်သတစ်ခုပါရဟိရမည်၊ ဥပမာ- nexus_default_context_path: '/nexus/'.

Nexus OS အသုံသပဌုသူနဟင့် အဖလဲ့

    nexus_os_group: 'nexus'
    nexus_os_user: 'nexus'

Nexus ဖိုင်မျာသကို ပိုင်ဆိုင်ပဌီသ ဝန်ဆောင်မဟုကို လုပ်ဆောင်ရန် အသုံသပဌုသူနဟင့် အဖလဲ့သည် ပျောက်ဆုံသသလာသပါက အခန်သကဏ္ဍမဟ ဖန်တီသပေသမည်ဖဌစ်သည်။

    nexus_os_user_home_dir: '/home/nexus'

Nexus အသုံသပဌုသူအတလက် မူရင်သအိမ်လမ်သညလဟန်ကို ပဌောင်သခလင့်ပဌုပါ။

Nexus instance လမ်သညလဟန်မျာသ

    nexus_installation_dir: '/opt'
    nexus_data_dir: '/var/nexus'
    nexus_tmp_dir: "{{ (ansible_os_family == 'RedHat') | ternary('/var/nexus-tmp', '/tmp/nexus') }}"

Nexus ကတ်တလောက်မျာသ

  • nexus_installation_dir ထည့်သလင်သထာသသော executable ဖိုင်မျာသပါရဟိသည်။
  • nexus_data_dir ဖလဲ့စည်သမဟုစနစ်၊ သိုလဟောင်ရာနေရာမျာသနဟင့် ဒေါင်သလုဒ်လုပ်ထာသသော အရာမျာသအာသလုံသ ပါရဟိသည်။ စိတ်ကဌိုက် blobstore လမ်သကဌောင်သမျာသ nexus_data_dir စိတ်ကဌိုက်လုပ်နိုင်သည်၊ အောက်တလင်ကဌည့်ပါ။ nexus_blobstores.
  • nexus_tmp_dir ယာယီဖိုင်မျာသအာသလုံသ ပါရဟိသည်။ redhat အတလက် မူရင်သလမ်သကဌောင်သကို ရလဟေ့ထာသသည်။ /tmp အလိုအလျောက် သန့်ရဟင်သရေသလုပ်ထုံသလုပ်နည်သမျာသဖဌင့် ဖဌစ်လာနိုင်သော ပဌဿနာမျာသကို ကျော်လလဟာသရန်။ #168 ကိုကဌည့်ပါ။

Nexus JVM Memory အသုံသပဌုမဟုကို ပဌင်ဆင်သတ်မဟတ်ခဌင်သ။

    nexus_min_heap_size: "1200M"
    nexus_max_heap_size: "{{ nexus_min_heap_size }}"
    nexus_max_direct_memory: "2G"

ကအရာမျာသသည် Nexus အတလက် မူရင်သဆက်တင်မျာသဖဌစ်သည်။ ကတန်ဖိုသမျာသကို မပဌောင်သလဲပါနဟင့် မဖတ်ရသေသရင် nexus စနစ်လိုအပ်ချက် မန်မိုရီအပိုင်သ သူတို့လုပ်နေတာတလေကို နာသမလည်ဘူသ။

ဒုတိယသတိပေသချက်အနေဖဌင့် ကသည်မဟာ အထက်ပါစာတမ်သမဟ ကောက်နုတ်ချက်ဖဌစ်ပါသည်။

စလမ်သဆောင်ရည် မဌဟင့်တင်ရန် ကဌိုသပမ်သမဟုတလင် အကဌံပဌုထာသသော တန်ဖိုသမျာသကို ကျော်လလန်၍ JVM အမဟိုက်ပုံမဟတ်ဉာဏ်ကို တိုသမဌဟင့်ရန် အကဌံပဌုထာသခဌင်သ မရဟိပါ။ ၎င်သသည် အမဟန်တကယ်တလင် ဆန့်ကျင်ဘက်အကျိုသသက်ရောက်မဟုရဟိနိုင်ပဌီသ လည်ပတ်မဟုစနစ်အတလက် မလိုအပ်သောအလုပ်မျာသကို ဖဌစ်ပေါ်စေပါသည်။

စီမံခန့်ခလဲသူ စကာသဝဟက်

    nexus_admin_password: 'changeme'

စနစ်ထည့်သလင်သရန်အတလက် "စီမံခန့်ခလဲသူ" အကောင့်စကာသဝဟက်။ ၎င်သသည် ပထမဆုံသ ပုံသေတပ်ဆင်မဟုတလင်သာ အလုပ်လုပ်ပါသည်။. အခန်သကဏ္ဍတစ်ခုအသုံသပဌုပဌီသ နောက်ပိုင်သတလင် ၎င်သကိုပဌောင်သလဲလိုပါက [စီမံခန့်ခလဲသူစကာသဝဟက်ကို ပဌောင်သလဲရန်](# change-admin-password-after-first-install) ကိုကဌည့်ပါ။

သင်၏စကာသဝဟက်ကို playbook တလင်ရဟင်သလင်သသောစာသာသဖဌင့်မသိမ်သဆည်သရန်၊ သို့သော် [ansible-vault encryption] ကိုအသုံသပဌုရန် ပဌင်သပဌင်သထန်ထန်အကဌံပဌုထာသသည်။https://docs.ansible.com/ansible/latest/user_guide/vault.html) (ဥပမာ-include_vars ဖဌင့် တင်ထာသသော သီသခဌာသဖိုင်တစ်ခုတလင်ဖဌစ်စေ)

မူရင်သအာသဖဌင့် အမည်မသိအသုံသပဌုခလင့်

    nexus_anonymous_access: false

အမည်မသိအသုံသပဌုခလင့်ကို မူရင်သအာသဖဌင့် ပိတ်ထာသသည်။ အကဌောင်သပိုမိုဖတ်ပါ။ အမည်မသိဝင်ရောက်ခလင့်.

အမျာသသူငဟာ အသုံသပဌုသူအမည်

    nexus_public_hostname: 'nexus.vm'
    nexus_public_scheme: https

Nexus စံနမူနာကို ၎င်သ၏ဖောက်သည်မျာသအတလက် ရရဟိနိုင်မည့် အရည်အချင်သပဌည့်မီသော ဒိုမိန်သအမည်နဟင့် အစီအစဉ် (https သို့မဟုတ် http)။

ကအခန်သကဏ္ဍအတလက် API အသုံသပဌုခလင့်

    nexus_api_hostname: localhost
    nexus_api_scheme: http
    nexus_api_validate_certs: "{{ nexus_api_scheme == 'https' }}"
    nexus_api_context_path: "{{ nexus_default_context_path }}"
    nexus_api_port: "{{ nexus_default_port }}"

ကကိန်သရဟင်မျာသသည် အခန်သကဏ္ဍကို ပံ့ပိုသပေသရန်အတလက် Nexus API သို့ ချိတ်ဆက်ပုံကို ထိန်သချုပ်ပါသည်။
အဆင့်မဌင့်အသုံသပဌုသူမျာသအတလက်သာ။ သင်သည် ကမူလဆက်တင်မျာသကို မပဌောင်သချင်ပါ။

ပဌောင်သပဌန်ပရောက်စီကို စနစ်ထည့်သလင်သခဌင်သ။

    httpd_setup_enable: false
    httpd_server_name: "{{ nexus_public_hostname }}"
    httpd_default_admin_email: "[email protected]"
    httpd_ssl_certificate_file: 'files/nexus.vm.crt'
    httpd_ssl_certificate_key_file: 'files/nexus.vm.key'
    # httpd_ssl_certificate_chain_file: "{{ httpd_ssl_certificate_file }}"
    httpd_copy_ssl_files: true

သတ်မဟတ်မည် SSL Reverse Proxy.
ဒီလိုလုပ်ဖို့သင် httpd ကို install လုပ်ဖို့လိုအပ်ပါတယ်။ မဟတ်ချက် httpd_setup_enable သတ်မဟတ်တန်ဖိုသtrue, Nexus သည် 127.0.0.1:8081၊ ထို့ကဌောင့် မဟုတ် ပဌင်ပ IP လိပ်စာမဟ HTTP port 8081 မဟတဆင့် တိုက်ရိုက်ဝင်ရောက်နိုင်သည်။

အသုံသပဌုထာသသော မူရင်သ hostname မဟာ nexus_public_hostname. အကဌောင်သတစ်ခုခုကဌောင့် မတူညီသောအမည်မျာသ လိုအပ်ပါက သတ်မဟတ်နိုင်ပါသည်။ httpd_server_name မတူညီသော အဓိပ္ပါယ်ဖဌင့်

С httpd_copy_ssl_files: true (မူရင်သအာသဖဌင့်) အထက်ဖော်ပဌပါ လက်မဟတ်မျာသသည် သင့် playbook လမ်သညလဟန်တလင် ရဟိနေသင့်ပဌီသ ဆာဗာသို့ ကူသယူကာ apache တလင် စီစဉ်သတ်မဟတ်ပေသမည်ဖဌစ်သည်။

ဆာဗာတလင် ရဟိပဌီသသာသလက်မဟတ်မျာသကို အသုံသပဌုလိုပါက ထည့်သလင်သပါ။ httpd_copy_ssl_files: false နဟင့် အောက်ပါ ကိန်သရဟင်မျာသကို ပံ့ပိုသပေသသည်-

    # These specifies to the vhost where to find on the remote server file
    # system the certificate files.
    httpd_ssl_cert_file_location: "/etc/pki/tls/certs/wildcard.vm.crt"
    httpd_ssl_cert_key_location: "/etc/pki/tls/private/wildcard.vm.key"
    # httpd_ssl_cert_chain_file_location: "{{ httpd_ssl_cert_file_location }}"

httpd_ssl_cert_chain_file_location ကလင်သဆက်ဖိုင်ကို စိတ်ကဌိုက်မပဌင်ဆင်လိုပါက ချန်လဟပ်ထာသနိုင်ပဌီသ သတ်မဟတ်မထာသခဲ့သင့်ပါ။

    httpd_default_admin_email: "[email protected]"

မူရင်သ စီမံခန့်ခလဲသူ အီသမေသလ်လိပ်စာကို သတ်မဟတ်ပါ။

LDAP ဖလဲ့စည်သမဟု

LDAP ချိတ်ဆက်မဟုမျာသနဟင့် လုံခဌုံရေသနယ်ပယ်ကို မူရင်သအတိုင်သ ပိတ်ထာသသည်။

    nexus_ldap_realm: false
    ldap_connections: []

LDAP ချိတ်ဆက်မဟုမျာသဒဌပ်စင်တစ်ခုစီသည် ကကဲ့သို့ဖဌစ်သည်-

    nexus_ldap_realm: true
    ldap_connections:
      - ldap_name: 'My Company LDAP' # used as a key to update the ldap config
        ldap_protocol: 'ldaps' # ldap or ldaps
        ldap_hostname: 'ldap.mycompany.com'
        ldap_port: 636
        ldap_use_trust_store: false # Wether or not to use certs in the nexus trust store
        ldap_search_base: 'dc=mycompany,dc=net'
        ldap_auth: 'none' # or simple
        ldap_auth_username: 'username' # if auth = simple
        ldap_auth_password: 'password' # if auth = simple
        ldap_user_base_dn: 'ou=users'
        ldap_user_filter: '(cn=*)' # (optional)
        ldap_user_object_class: 'inetOrgPerson'
        ldap_user_id_attribute: 'uid'
        ldap_user_real_name_attribute: 'cn'
        ldap_user_email_attribute: 'mail'
        ldap_user_subtree: false
        ldap_map_groups_as_roles: false
        ldap_group_base_dn: 'ou=groups'
        ldap_group_object_class: 'posixGroup'
        ldap_group_id_attribute: 'cn'
        ldap_group_member_attribute: 'memberUid'
        ldap_group_member_format: '${username}'
        ldap_group_subtree: false

အမည်မသိ အထောက်အထာသစိစစ်ခဌင်သအတလက် ဥပမာ LDAP ဖလဲ့စည်သမဟုပုံစံ (အမည်မသိ ချိတ်ဆက်မဟု)၊ ၎င်သသည် "အနည်သဆုံသ" ဖလဲ့စည်သမဟုတစ်ခုလည်သဖဌစ်သည်-

    nexus_ldap_realm: true
    ldap_connection:
      - ldap_name: 'Simplest LDAP config'
        ldap_protocol: 'ldaps'
        ldap_hostname: 'annuaire.mycompany.com'
        ldap_search_base: 'dc=mycompany,dc=net'
        ldap_port: 636
        ldap_use_trust_store: false
        ldap_user_id_attribute: 'uid'
        ldap_user_real_name_attribute: 'cn'
        ldap_user_email_attribute: 'mail'
        ldap_user_object_class: 'inetOrgPerson'

ရိုသရဟင်သသောအထောက်အထာသစိစစ်ခဌင်သအတလက် ဥပမာ LDAP ဖလဲ့စည်သမဟုပုံစံ (DSA အကောင့်ကိုအသုံသပဌုသည်)

    nexus_ldap_realm: true
    ldap_connections:
      - ldap_name: 'LDAP config with DSA'
        ldap_protocol: 'ldaps'
        ldap_hostname: 'annuaire.mycompany.com'
        ldap_port: 636
        ldap_use_trust_store: false
        ldap_auth: 'simple'
        ldap_auth_username: 'cn=mynexus,ou=dsa,dc=mycompany,dc=net'
        ldap_auth_password: "{{ vault_ldap_dsa_password }}" # better keep passwords in an ansible vault
        ldap_search_base: 'dc=mycompany,dc=net'
        ldap_user_base_dn: 'ou=users'
        ldap_user_object_class: 'inetOrgPerson'
        ldap_user_id_attribute: 'uid'
        ldap_user_real_name_attribute: 'cn'
        ldap_user_email_attribute: 'mail'
        ldap_user_subtree: false

ရိုသရဟင်သသောအထောက်အထာသစိစစ်ခဌင်သအတလက် LDAP ဖလဲ့စည်သမဟုပုံစံ (DSA အကောင့်ကိုအသုံသပဌုသည်) + အခန်သကဏ္ဍမျာသအဖဌစ် ပုံဖော်ထာသသော အုပ်စုမျာသ-

    nexus_ldap_realm: true
    ldap_connections
      - ldap_name: 'LDAP config with DSA'
        ldap_protocol: 'ldaps'
        ldap_hostname: 'annuaire.mycompany.com'
        ldap_port: 636
        ldap_use_trust_store: false
        ldap_auth: 'simple'
        ldap_auth_username: 'cn=mynexus,ou=dsa,dc=mycompany,dc=net'
        ldap_auth_password: "{{ vault_ldap_dsa_password }}" # better keep passwords in an ansible vault
        ldap_search_base: 'dc=mycompany,dc=net'
        ldap_user_base_dn: 'ou=users'
        ldap_user_object_class: 'inetOrgPerson'
        ldap_user_id_attribute: 'uid'
        ldap_user_real_name_attribute: 'cn'
        ldap_user_email_attribute: 'mail'
        ldap_map_groups_as_roles: true
        ldap_group_base_dn: 'ou=groups'
        ldap_group_object_class: 'groupOfNames'
        ldap_group_id_attribute: 'cn'
        ldap_group_member_attribute: 'member'
        ldap_group_member_format: 'uid=${username},ou=users,dc=mycompany,dc=net'
        ldap_group_subtree: false

ရိုသရဟင်သသောအထောက်အထာသစိစစ်ခဌင်သအတလက် LDAP ဖလဲ့စည်သမဟုပုံစံ (DSA အကောင့်ကိုအသုံသပဌုသည်) + အခန်သကဏ္ဍမျာသအဖဌစ် ဒိုင်သနမစ်ပုံဖော်ထာသသော အုပ်စုမျာသ-

    nexus_ldap_realm: true
    ldap_connections:
      - ldap_name: 'LDAP config with DSA'
        ldap_protocol: 'ldaps'
        ldap_hostname: 'annuaire.mycompany.com'
        ldap_port: 636
        ldap_use_trust_store: false
        ldap_auth: 'simple'
        ldap_auth_username: 'cn=mynexus,ou=dsa,dc=mycompany,dc=net'
        ldap_auth_password: "{{ vault_ldap_dsa_password }}" # better keep passwords in an ansible vault
        ldap_search_base: 'dc=mycompany,dc=net'
        ldap_user_base_dn: 'ou=users'
        ldap_user_object_class: 'inetOrgPerson'
        ldap_user_id_attribute: 'uid'
        ldap_user_real_name_attribute: 'cn'
        ldap_user_email_attribute: 'mail'
        ldap_map_groups_as_roles: true
        ldap_map_groups_as_roles_type: 'dynamic'
        ldap_user_memberof_attribute: 'memberOf'

ခံစာသခလင့်

    nexus_privileges:
      - name: all-repos-read # used as key to update a privilege
        # type: <one of application, repository-admin, repository-content-selector, repository-view, script or wildcard>
        description: 'Read & Browse access to all repos'
        repository: '*'
        actions: # can be add, browse, create, delete, edit, read or  * (all)
          - read
          - browse
        # pattern: pattern
        # domain: domain
        # script_name: name

စာရင်သ အခလင့်ထူသမျာသ ဆက်တင်မျာသအတလက်။ အခလင့်ထူသအမျိုသအစာသပေါ်မူတည်၍ မည်သည့် variable မျာသကို သတ်မဟတ်ရန်လိုအပ်ကဌောင်သ စစ်ဆေသရန် စာရလက်စာတမ်သနဟင့် GUI ကိုကဌည့်ပါ။

ကဒဌပ်စင်မျာသကို အောက်ပါ ပုံသေတန်ဖိုသမျာသနဟင့် ပေါင်သစပ်ထာသသည်-

    _nexus_privilege_defaults:
      type: repository-view
      format: maven2
      actions:
        - read

ရာထူသမျာသ ( Nexus အတလင်သ၌ ဆိုလိုသည်မဟာ )

    nexus_roles:
      - id: Developpers # can map to a LDAP group id, also used as a key to update a role
        name: developers
        description: All developers
        privileges:
          - nx-search-read
          - all-repos-read
        roles: [] # references to other role names

စာရင်သ အခန်သကဏ္ဍမျာသ ဆက်တင်မျာသအတလက်။

အသုံသပဌုသူမျာသသည်

    nexus_local_users: []
      # - username: jenkins # used as key to update
      #   state: present # default value if ommited, use 'absent' to remove user
      #   first_name: Jenkins
      #   last_name: CI
      #   email: [email protected]
      #   password: "s3cr3t"
      #   roles:
      #     - developers # role ID

ချိတ်ဆက်မဟုတလင် ဖန်တီသရန် ဒေသတလင်သ (LDAP မဟုတ်သော) အသုံသပဌုသူမျာသ/အကောင့်မျာသစာရင်သ။

Nexus တလင် ဖန်တီသရန် ဒေသတလင်သ (LDAP မဟုတ်သော) အသုံသပဌုသူမျာသ/အကောင့်မျာသစာရင်သ။

      nexus_ldap_users: []
      # - username: j.doe
      #   state: present
      #   roles:
      #     - "nx-admin"

အသုံသပဌုသူမျာသ/အခန်သကဏ္ဍမျာသကို Ldap မဌေပုံဆလဲခဌင်သ။ ပဌည်နယ် absent တစ်ခုရဟိနဟင့်ပဌီသသာသဖဌစ်ပါက လက်ရဟိအသုံသပဌုသူတစ်ညသမဟ အခန်သကဏ္ဍမျာသကို ဖယ်ရဟာသပါမည်။
Ldap အသုံသပဌုသူမျာသကို မဖျက်ပါ။ မရဟိသောအသုံသပဌုသူအတလက် အခန်သကဏ္ဍတစ်ခုသတ်မဟတ်ရန် ကဌိုသစာသခဌင်သသည် အမဟာသအယလင်သတစ်ခု ဖဌစ်လာနိုင်သည်။

အကဌောင်သအရာရလေသချယ်မဟုမျာသ

  nexus_content_selectors:
  - name: docker-login
    description: Selector for docker login privilege
    search_expression: format=="docker" and path=~"/v2/"

အကဌောင်သအရာရလေသချယ်စနစ်အကဌောင်သ နောက်ထပ်အချက်အလက်မျာသအတလက် ကဌည့်ပါ။ စာတမ်သပဌုစုခဌင်သ။.

အကဌောင်သအရာရလေသချယ်မဟုစနစ်ကို အသုံသပဌုရန် အခလင့်ထူသအသစ်တစ်ခု ထည့်ပါ။ type: repository-content-selector နဟင့်သက်ဆိုင်သည်။contentSelector

- name: docker-login-privilege
  type: repository-content-selector
  contentSelector: docker-login
  description: 'Login to Docker registry'
  repository: '*'
  actions:
  - read
  - browse

Blobstores နဟင့် repositories

    nexus_delete_default_repos: false

nexus ထည့်သလင်သသည့် ကနညသမူလပုံစံဖလဲ့စည်သမဟုမဟ သိုလဟောင်ပစ္စည်သမျာသကို ဖျက်ပါ။ ကအဆင့်ကို ပထမအကဌိမ် ထည့်သလင်သခဌင်သတလင်သာ လုပ်ဆောင်သည် (အခါ nexus_data_dir ဗလာဖဌစ်နေကဌောင်သ တလေ့ရဟိခဲ့သည်။)

Nexus အတလက် ပုံသေ ပုံသေ ဖလဲ့စည်သမဟုမဟ သိမ်သဆည်သမဟုမျာသကို ဖယ်ရဟာသခဌင်သ။ ကအဆင့်သည် ပထမတပ်ဆင်မဟုအတလင်သသာ လုပ်ဆောင်သည် (အခါ nexus_data_dir ဗလာ)။

    nexus_delete_default_blobstore: false

nexus ထည့်သလင်သသည့် ကနဩှ ပုံသေဖလဲ့စည်သပုံမဟ ပုံသေ blobstore ကို ဖျက်ပါ။ ဒါမဟသာလျဟင် လုပ်လို့ရတယ်။ nexus_delete_default_repos: true နဟင့် configured repositories မျာသအာသလုံသ (အောက်တလင်ကဌည့်ပါ) တလင် ရဟင်သလင်သပဌတ်သာသစလာ ရဟိပါသည်။ blob_store: custom. ကအဆင့်ကို ပထမအကဌိမ် ထည့်သလင်သခဌင်သတလင်သာ လုပ်ဆောင်သည် (အခါ nexus_data_dir ဗလာဖဌစ်နေကဌောင်သ တလေ့ရဟိခဲ့သည်။)

blob သိုလဟောင်မဟု (binary artifacts) ကို ဖယ်ရဟာသခဌင်သသည် မူလဖလဲ့စည်သပုံမဟ ပုံသေဖဌင့် ပိတ်ထာသသည်။ blob သိုလဟောင်မဟု (binary artifacts) ကို ဖယ်ရဟာသရန် ပိတ်ပါ။ nexus_delete_default_repos: true. ကအဆင့်သည် ပထမတပ်ဆင်မဟုအတလင်သသာ လုပ်ဆောင်သည် (အခါ nexus_data_dir ဗလာ)။

    nexus_blobstores: []
    # example blobstore item :
    # - name: separate-storage
    #   type: file
    #   path: /mnt/custom/path
    # - name: s3-blobstore
    #   type: S3
    #   config:
    #     bucket: s3-blobstore
    #     accessKeyId: "{{ VAULT_ENCRYPTED_KEY_ID }}"
    #     secretAccessKey: "{{ VAULT_ENCRYPTED_ACCESS_KEY }}"

Blobstores မျာသ ဖန်တီသရန်။ ကနညသဖန်တီသမဟုပဌီသနောက် blobstore လမ်သကဌောင်သနဟင့် သိုလဟောင်မဟု blobstore ကို အပ်ဒိတ်လုပ်၍မရပါ (ကနေရာတလင် အပ်ဒိတ်မဟန်သမျဟကို ပဌန်လည်စီစဉ်ပေသခဌင်သတလင် လျစ်လျူရဟုပါမည်)။

S3 ပေါ်ရဟိ blobstore ကို ပဌင်ဆင်သတ်မဟတ်ခဌင်သသည် အဆင်ပဌေမဟုတစ်ခုအဖဌစ် ပံ့ပိုသထာသပဌီသ travis တလင် ကျလန်ုပ်တို့လုပ်ဆောင်သည့် အလိုအလျောက်စမ်သသပ်မဟုမျာသ၏ အစိတ်အပိုင်သမဟုတ်ပါ။ S3 တလင် သိမ်သဆည်သခဌင်သကို AWS တလင် အသုံသပဌုသည့် သာဓကမျာသအတလက်သာ အကဌံပဌုထာသကဌောင်သ ကျေသဇူသပဌု၍ သတိပဌုပါ။

ဖန်တီသမဟု Blobstores မျာသ. ကနညသဖန်တီသမဟုအပဌီသတလင် သိုလဟောင်မဟုလမ်သကဌောင်သနဟင့် သိုလဟောင်မဟုသိုလဟောင်ရာနေရာကို အပ်ဒိတ်လုပ်၍မရပါ (ကနေရာတလင် အပ်ဒိတ်မဟန်သမျဟကို ထပ်မံထည့်သလင်သသောအခါတလင် လျစ်လျူရဟုခံရမည်)။

S3 တလင် blob သိုလဟောင်မဟု စနစ်ထည့်သလင်သခဌင်သကို အဆင်ပဌေစေရန်အတလက် ပံ့ပိုသပေသပါသည်။ S3 သိုလဟောင်မဟုကို AWS တလင် အသုံသပဌုသည့် သာဓကမျာသအတလက်သာ အကဌံပဌုထာသကဌောင်သ ကျေသဇူသပဌု၍ သတိပဌုပါ။

    nexus_repos_maven_proxy:
      - name: central
        remote_url: 'https://repo1.maven.org/maven2/'
        layout_policy: permissive
        # maximum_component_age: -1
        # maximum_metadata_age: 1440
        # negative_cache_enabled: true
        # negative_cache_ttl: 1440
      - name: jboss
        remote_url: 'https://repository.jboss.org/nexus/content/groups/public-jboss/'
        # maximum_component_age: -1
        # maximum_metadata_age: 1440
        # negative_cache_enabled: true
        # negative_cache_ttl: 1440
    # example with a login/password :
    # - name: secret-remote-repo
    #   remote_url: 'https://company.com/repo/secure/private/go/away'
    #   remote_username: 'username'
    #   remote_password: 'secret'
    #   # maximum_component_age: -1
    #   # maximum_metadata_age: 1440
    #   # negative_cache_enabled: true
    #   # negative_cache_ttl: 1440

အပေါ်က နမူနာပုံစံတစ်ခုပါ။ ပရောက်စီဆာဗာ Maven ။

    nexus_repos_maven_hosted:
      - name: private-release
        version_policy: release
        write_policy: allow_once  # one of "allow", "allow_once" or "deny"

ကျလမ်သကျင်သူ လက်ခံထာသသော သိုလဟောင်ရုံမျာသ ဖလဲ့စည်သမဟု။ Negative cache config သည် စိတ်ကဌိုက်ရလေသချယ်နိုင်ပဌီသ ချန်လဟပ်ထာသလျဟင် အထက်ပါတန်ဖိုသမျာသအတလက် ပုံသေဖဌစ်လိမ့်မည်။

configuration မျာသ လက်ခံထာသသော သိုလဟောင်ရုံမျာသ Maven အနုတ်လက္ခဏာ ကက်ရဟ်ဖလဲ့စည်သပုံ (-1) သည် စိတ်ကဌိုက်ရလေသချယ်နိုင်ပဌီသ မသတ်မဟတ်ထာသပါက အထက်ပါတန်ဖိုသမျာသအတလက် ပုံသေဖဌစ်လိမ့်မည်။

    nexus_repos_maven_group:
      - name: public
        member_repos:
          - central
          - jboss

configuration မျာသ အုပျစုမဌာသ Maven ။

သိုလဟောင်မဟု အမျိုသအစာသ သုံသခုစလုံသကို အောက်ပါ ပုံသေတန်ဖိုသမျာသနဟင့် ပေါင်သစပ်ထာသသည်-

    _nexus_repos_maven_defaults:
      blob_store: default # Note : cannot be updated once the repo has been created
      strict_content_validation: true
      version_policy: release # release, snapshot or mixed
      layout_policy: strict # strict or permissive
      write_policy: allow_once # one of "allow", "allow_once" or "deny"
      maximum_component_age: -1  # Nexus gui default. For proxies only
      maximum_metadata_age: 1440  # Nexus gui default. For proxies only
      negative_cache_enabled: true # Nexus gui default. For proxies only
      negative_cache_ttl: 1440 # Nexus gui default. For proxies only

Docker၊ Pypi၊ Raw၊ Rubygems၊ Bower၊ NPM၊ Git-LFS နဟင့် yum repository အမျိုသအစာသမျာသ-
မဌင် defaults/main.yml ကရလေသချယ်စရာမျာသအတလက်-

Docker၊ Pypi၊ Raw၊ Rubygems၊ Bower၊ NPM၊ Git-LFS နဟင့် yum repositories မျာသကို မူရင်သအာသဖဌင့် ပိတ်ထာသသည်-
မဌင် defaults/main.yml ကရလေသချယ်စရာမျာသအတလက်-

      nexus_config_pypi: false
      nexus_config_docker: false
      nexus_config_raw: false
      nexus_config_rubygems: false
      nexus_config_bower: false
      nexus_config_npm: false
      nexus_config_gitlfs: false
      nexus_config_yum: false

maven မဟလလဲ၍ အခဌာသသော repositories အမျိုသအစာသမျာသကို သင်အသုံသပဌုလိုပါက အချို့သော လုံခဌုံရေသနယ်ပယ်မျာသကို ဖလင့်ထာသရန် လိုအပ်နိုင်သည်ကို ကျေသဇူသပဌု၍ သတိပဌုပါ။ ၎င်သသည် ပုံသေအာသဖဌင့် မဟာသယလင်သသည်။

nexus_nuget_api_key_realm: false
nexus_npm_bearer_token_realm: false
nexus_docker_bearer_token_realm: false  # required for docker anonymous access

Remote User Realm ကို အသုံသပဌု၍လည်သ ဖလင့်နိုင်သည်။

nexus_rut_auth_realm: true

ခေါင်သစဉ်ကို သတ်မဟတ်ခဌင်သဖဌင့် စိတ်ကဌိုက်ပဌုလုပ်နိုင်ပါသည်။

nexus_rut_auth_header: "CUSTOM_HEADER"

စီစဉ်ထာသသောအလုပ်မျာသ

    nexus_scheduled_tasks: []
    #  #  Example task to compact blobstore :
    #  - name: compact-docker-blobstore
    #    cron: '0 0 22 * * ?'
    #    typeId: blobstore.compact
    #    task_alert_email: [email protected]  # optional
    #    taskProperties:
    #      blobstoreName: {{ nexus_blob_names.docker.blob }} # all task attributes are stored as strings by nexus internally
    #  #  Example task to purge maven snapshots
    #  - name: Purge-maven-snapshots
    #    cron: '0 50 23 * * ?'
    #    typeId: repository.maven.remove-snapshots
    #    task_alert_email: [email protected]  # optional
    #    taskProperties:
    #      repositoryName: "*"  # * for all repos. Change to a repository name if you only want a specific one
    #      minimumRetained: "2"
    #      snapshotRetentionDays: "2"
    #      gracePeriodInDays: "2"
    #    booleanTaskProperties:
    #      removeIfReleased: true
    #  #  Example task to purge unused docker manifest and images
    #  - name: Purge unused docker manifests and images
    #    cron: '0 55 23 * * ?'
    #    typeId: "repository.docker.gc"
    #    task_alert_email: [email protected]  # optional
    #    taskProperties:
    #      repositoryName: "*"  # * for all repos. Change to a repository name if you only want a specific one
    #  #  Example task to purge incomplete docker uploads
    #  - name: Purge incomplete docker uploads
    #    cron: '0 0 0 * * ?'
    #    typeId: "repository.docker.upload-purge"
    #    task_alert_email: [email protected]  # optional
    #    taskProperties:
    #      age: "24"

စီစဉ်ထာသသောအလုပ်မျာသ ဆက်တင်မျာသအတလက်။ typeId နဟင့်တာဝန်အတိအကျtaskProperties/booleanTaskProperties သင်ခန့်မဟန်သနိုင်သည်-

  • Java type hierarchy မဟ org.sonatype.nexus.scheduling.TaskDescriptorSupport
  • သင်၏ဘရောက်ဆာရဟိ HTML အလုပ်ဖန်တီသမဟုပုံစံကိုစစ်ဆေသပါ။
  • အလုပ်တစ်ခုကို ကိုယ်တိုင်သတ်မဟတ်သည့်အခါ ဘရောက်ဆာရဟိ AJAX တောင်သဆိုမဟုမျာသကို ကဌည့်ရဟုခဌင်သမဟ။

၎င်သတို့၏ အမျိုသအစာသပေါ် မူတည်၍ လုပ်ဆောင်စရာ ဂုဏ်သတ္တိမျာသကို မဟန်ကန်သော yaml ဘလောက်တလင် ကဌေညာရပါမည်။:

  • taskProperties စာကဌောင်သဂုဏ်သတ္တိအာသလုံသအတလက် (ဆိုလိုသည်မဟာ သိုလဟောင်မဟုအမည်မျာသ၊ သိုလဟောင်မဟုအမည်မျာသ၊ အချိန်ကာလမျာသ...)။
  • booleanTaskProperties ယုတ္တိဗေဒဂုဏ်သတ္တိမျာသ အာသလုံသအတလက် (ဆိုလိုသည်မဟာ အဓိကအာသဖဌင့် nexus ဖန်တီသခဌင်သလုပ်ငန်သ၏ GUI ရဟိ အမဟန်ခဌစ်မျာသ)။

အရန်မျာသ

      nexus_backup_configure: false
      nexus_backup_cron: '0 0 21 * * ?'  # See cron expressions definition in nexus create task gui
      nexus_backup_dir: '/var/nexus-backup'
      nexus_restore_log: '{{ nexus_backup_dir }}/nexus-restore.log'
      nexus_backup_rotate: false
      nexus_backup_rotate_first: false
      nexus_backup_keep_rotations: 4  # Keep 4 backup rotation by default (current + last 3)

သင်မပဌောင်သမချင်သ မိတ္တူကူသခဌင်သကို သတ်မဟတ်မည်မဟုတ်ပါ။ nexus_backup_configure в true.
ကကိစ္စတလင်၊ စီစဉ်ထာသသော script task ကို Nexus တလင်လည်ပတ်ရန်စီစဉ်ထာသလိမ့်မည်။
သတ်မဟတ်ထာသသော ကဌာသကာလတလင် nexus_backup_cron (ပုံမဟန် 21:00 နေ့တိုင်သ)။
အသေသစိတ်အတလက် [groovy template](templates/backup.groovy.j2) ကို ကဌည့်ပါ။
ကစီစဉ်ထာသသည့်အလုပ်သည် အခဌာသသူမျာသနဟင့်မဆိုင်ပါ။ nexus_scheduled_tasksမင်သကဘာလဲ
သင်၏ playbook တလင်ကဌေငဌာပါ။

အရန်မျာသကို လဟည့်/ဖျက်လိုပါက၊ ထည့်သလင်သပါ။ nexus_backup_rotate: true ပဌီသလျဟင် သင်အသုံသပဌုသိမ်သဆည်သလိုသော အရန်ကူသယူမဟု အရေအတလက်ကို စီစဉ်သတ်မဟတ်ပါ။ nexus_backup_keep_rotations (မူရင်သ ၄)။

လည်ပတ်မဟုကို အသုံသပဌုသည့်အခါ၊ အရန်သိမ်သဆည်သခဌင်သလုပ်ငန်သစဉ်အတလင်သ အပိုဒစ်နေရာကို သိမ်သဆည်သလိုပါက၊
တပ်ဆင်နိုင်သည်။ nexus_backup_rotate_first: true. ၎င်သသည် အရန်မကူသမီ အကဌိုလဟည့်ခဌင်သ/ဖျက်ခဌင်သတို့ကို စီစဉ်ပေသပါမည်။ ပုံသေအာသဖဌင့်၊ အရန်သိမ်သခဌင်သကို ဖန်တီသပဌီသနောက် လည်ပတ်မဟု ဖဌစ်ပေါ်သည်။ ကအခဌေအနေတလင် အရန်ဟောင်သမျာသကို သတိပဌုပါ။
လက်ရဟိ အရန်သိမ်သဆည်သမဟု မပဌုလုပ်မီ ဖျက်လိုက်ပါမည်။

ပဌန်လည်ထူထောင်ရေသလုပ်ထုံသလုပ်နည်သ

ကန့်သတ်ချက်ဖဌင့် ကစာသစာအုပ်ကို ဖလင့်ပါ။ -e nexus_restore_point=<YYYY-MM-dd-HH-mm-ss>
(ဥပမာ၊ 2017-12-17-21-00-00 ဒီဇင်ဘာ 17၊ 2017 တလင် 21:00၊

ချိတ်ဆက်မဟုကို ဖယ်ရဟာသခဌင်သ။

သတိပေသချက်- ၎င်သသည် သင့်လက်ရဟိဒေတာကို လုံသဝဖျက်ပစ်မည်ဖဌစ်သည်။ လိုအပ်ပါက စောစောပိုင်သ Backup ပဌုလုပ်ရန် သေချာပါစေ။

ကိန်သရဟင်ကိုသုံသပါ။ nexus_purgeအကယ်၍ သင်သည် အစမဟ ပဌန်စရန် လိုအပ်ပါက ဒေတာအာသလုံသကို ဖယ်ရဟာသပဌီသ nexus instance ကို ပဌန်လည်ထည့်သလင်သပါ။

ansible-playbook -i your/inventory.ini your_nexus_playbook.yml -e nexus_purge=true

ပထမဆုံသ ထည့်သလင်သပဌီသနောက် စီမံခန့်ခလဲသူ စကာသဝဟက်ကို ပဌောင်သပါ။

    nexus_default_admin_password: 'admin123'

၎င်သကို သင်၏ playbook တလင် မပဌောင်သလဲသင့်ပါ။. ပထမဆုံသထည့်သလင်သသောအခါတလင် ကပုံစံကလဲလလဲချက်ကို မူရင်သ Nexus စီမံခန့်ခလဲသူစကာသဝဟက်ဖဌင့် ဖဌည့်သလင်သထာသပဌီသ စီမံခန့်ခလဲသူစကာသဝဟက်ကို ကျလန်ုပ်တို့ပဌောင်သလဲနိုင်သည်ကို သေချာစေပါသည်။ nexus_admin_password.

ပထမတပ်ဆင်ပဌီသနောက် စီမံခန့်ခလဲသူစကာသဝဟက်ကို ပဌောင်သလဲလိုပါက၊ အမိန့်ပေသစာကဌောင်သမဟ စကာသဝဟက်အဟောင်သသို့ ယာယီပဌောင်သနိုင်သည်။ ပဌောင်သလဲပဌီသနောက် nexus_admin_password သင်၏ playbook တလင်သင် run နိုင်သည်-

ansible-playbook -i your/inventory.ini your_playbook.yml -e nexus_default_admin_password=oldPassword

Nexus Sonatype ရဟိ Telegram ချန်နယ်- https://t.me/ru_nexus_sonatype

စာရင်သသလင်သအသုံသပဌုသူမျာသသာ စစ်တမ်သတလင် ပါဝင်နိုင်ပါသည်။ ဆိုင်သအင်လုပ်ခဌင်သ, ကျေသဇူသပဌု။

မည်သည့် ရဟေသဟောင်သပစ္စည်သ သိုလဟောင်ရုံမျာသကို သင်အသုံသပဌုသနည်သ။

  • Sonatype Nexus သည် အခမဲ့ဖဌစ်သည်။

  • Sonatype Nexus က ပေသချေတယ်။

  • Artifactory သည် အခမဲ့ဖဌစ်သည်။

  • Artifactory တလေ ပေသရပါတယ်။

  • ဆိပ်ကမ်သ

  • ပျော့ဖတ်

အသုံသပဌုသူ ၁၄၇ ဩှ မဲပေသခဲ့သည်။ အသုံသပဌုသူ 9 ဩှ ကဌာသနေခဲ့ပါတယ်။

source: www.habr.com

မဟတ်ချက် Add