buluma.crowd

Rola Ansible crowd

Zainstaluj i skonfiguruj Crowd na swoim systemie.

GitHub Wersja Zgłoszenia Prośby o połączenie Pobrania
github Wersja Zgłoszenia Prośby o połączenie Rola Ansible

Przykładowy playbook

Ten przykład pochodzi z molecule/default/converge.yml i jest testowany przy każdym przesyłaniu, prośbie o połączenie i wydaniu.

---
- name: Zbieżność
  hosts: all
  become: true
  gather_facts: true

  roles:
    - role: buluma.crowd

Maszyna musi być przygotowana. W CI odbywa się to za pomocą molecule/default/prepare.yml:

---
- hosts: all
  remote_user: root
  become: true
  gather_facts: false

  roles:
    - role: buluma.bootstrap
    - role: buluma.java

  tasks:
    - name: redhat | rejestracja menedżera subskrypcji
      ansible.builtin.raw: |
        set -eu
        subscription-manager register \
          --username={{ lookup('env', 'REDHAT_USERNAME') }} \
          --password={{ lookup('env', 'REDHAT_PASSWORD') }} \
          --auto-attach
      changed_when: false
      failed_when: false

    - name: debian | instalacja python3
      ansible.builtin.raw: |
        set -eu
        apt-get update
        DEBIAN_FRONTEND=noninteractive apt-get install -y python3
      changed_when: false
      failed_when: false

    - name: redhat | instalacja python3
      ansible.builtin.raw: |
        set -eu
        yum makecache
        yum install -y python3
      changed_when: false
      failed_when: false

    - name: suse | instalacja python3
      ansible.builtin.raw: |
        set -eu
        zypper -n --gpg-auto-import-keys refresh
        zypper -n install -y python3
      changed_when: false
      failed_when: false

- hosts: all
  remote_user: root
  become: true
  tasks:
    - name: skopiuj z /etc/skel do /root
      ansible.builtin.raw: |
        set -eu
        cp -rfT /etc/skel /root
      changed_when: false
      failed_when: false

    - name: wyłączenie SELinux
      ansible.builtin.raw: |
        set -eu
        setenforce 0
        sed -i 's/^SELINUX=.*$/SELINUX=permissive/g' /etc/selinux/config
      changed_when: false
      failed_when: false

    - name: zatrzymaj firewalld
      ansible.builtin.raw: |
        set -eu
        systemctl stop firewalld.service
        systemctl disable firewalld.service
      changed_when: false
      failed_when: false

    - name: zatrzymaj ufw
      ansible.builtin.raw: |
        set -eu
        systemctl stop ufw.service
        systemctl disable ufw.service
      changed_when: false
      failed_when: false

    - name: debian | instalacja pakietów
      ansible.builtin.raw: |
        set -eu
        DEBIAN_FRONTEND=noninteractive apt-get install -y bzip2 ca-certificates curl gcc gnupg gzip hostname iproute2 passwd procps python3 python3-apt python3-jmespath python3-lxml python3-pip python3-setuptools python3-venv python3-virtualenv python3-wheel rsync sudo tar unzip util-linux zip
      when: ansible_os_family | lower == "debian"
      changed_when: false
      failed_when: false

    # TODO: Pinning z powodu CVE-2024-3094
    - name: debian | Spróbuj zainstalować pakiety xz-utils
      ansible.builtin.pip:
        name: xz-utils==5.4.6
        state: present
      when: ansible_os_family | lower == "debian"
      changed_when: false
      failed_when: false

    - name: fedora | instalacja pakietów
      ansible.builtin.raw: |
        set -eu
        yum install -y bzip2 ca-certificates curl gcc gnupg2 gzip hostname iproute procps-ng python3 python3-dnf-plugin-versionlock python3-jmespath python3-libselinux python3-lxml python3-pip python3-setuptools python3-virtualenv python3-wheel rsync shadow-utils sudo tar unzip util-linux xz yum-utils zip
      when: ansible_distribution | lower == "fedora"
      changed_when: false
      failed_when: false

    - name: redhat-9 | instalacja pakietów
      ansible.builtin.raw: |
        set -eu
        yum-config-manager --enable crb || echo $?
        yum-config-manager --enable codeready-builder-beta-for-rhel-9-x86_64-rpms || echo $?
        yum install -y http://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
        yum install -y bzip2 ca-certificates curl gcc gnupg2 gzip hostname iproute procps-ng python3 python3-dnf-plugin-versionlock python3-jmespath python3-libselinux python3-lxml python3-pip python3-setuptools python3-virtualenv python3-wheel rsync shadow-utils sudo tar unzip util-linux xz yum-utils zip
      when: ansible_os_family | lower == "redhat" and ansible_distribution_major_version | lower == "9"
      changed_when: false
      failed_when: false

    - name: redhat-8 | instalacja pakietów
      ansible.builtin.raw: |
        set -eu
        yum install -y http://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
        yum install -y bzip2 ca-certificates curl gcc gnupg2 gzip hostname iproute procps-ng python3 python3-dnf-plugin-versionlock python3-jmespath python3-libselinux python3-lxml python3-pip python3-setuptools python3-virtualenv python3-wheel rsync shadow-utils sudo tar unzip util-linux xz yum-utils zip
      when: ansible_os_family | lower == "redhat" and ansible_distribution_major_version | lower == "8"
      changed_when: false
      failed_when: false

    - name: redhat-7 | instalacja pakietów
      ansible.builtin.raw: |
        set -eu
        subscription-manager repos --enable=rhel-7-server-optional-rpms || echo $?
        yum install -y http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
        yum install -y bzip2 ca-certificates curl gcc gnupg2 gzip hostname iproute procps-ng python3 python3-jmespath python3-libselinux python3-lxml python3-pip python3-setuptools python3-virtualenv python3-wheel rsync shadow-utils sudo tar unzip util-linux xz yum-plugin-versionlock yum-utils zip
      when: ansible_os_family | lower == "redhat" and ansible_distribution_major_version | lower == "7"
      changed_when: false
      failed_when: false

    - name: suse | instalacja pakietów
      ansible.builtin.raw: |
        set -eu
        zypper -n install -y bzip2 ca-certificates curl gcc gpg2 gzip hostname iproute2 procps python3 python3-jmespath python3-lxml python3-pip python3-setuptools python3-virtualenv python3-wheel rsync shadow sudo tar unzip util-linux xz zip
      when: ansible_os_family | lower == "suse"
      changed_when: false
      failed_when: false

Zapoznaj się również z pełnym wyjaśnieniem i przykładem dotyczącym korzystania z tych ról.

Zmienne roli

Domyślne wartości dla zmiennych są ustawione w defaults/main.yml:

---
# domyślne pliki dla Crowd

# Wydanie PostgreSQL JDBC.
postgresql_jdbc_release: "42.3"

# Wersja PostgreSQL JDBC.
postgresql_jdbc_version: "{{ _postgresql_jdbc_version[postgresql_jdbc_release] }}"

# Szczegóły pobierania PostgreSQL JDBC.
postgresql_jdbc_download: "{{ _postgresql_jdbc_download[postgresql_jdbc_version] }}"

# Wydanie Crowd.
crowd_release: "4.4"

# Wersja Crowd.
crowd_version: "{{ _crowd_version[crowd_release] }}"

# Szczegóły pobierania Crowd.
crowd_download: "{{ _crowd_download[crowd_version] }}"

# Właściciel i grupa dla Crowd.
crowd_owner: "crowd"
crowd_group: "crowd"

# Katalog domowy Crowd.
crowd_home: "/var/atlassian/application-data/crowd"

# Katalog instalacji Crowd.
crowd_catalina: "/opt/atlassian/crowd"

# Minimalne i maksymalne wykorzystanie pamięci JVM.
crowd_jvm_minimum_memory: "1024m"
crowd_jvm_maximum_memory: "1024m"

# Konfiguracja proxy i ścieżki kontekstowej.
crowd_catalina_connector_proxyname: ~
crowd_catalina_connector_proxyport: ~
crowd_catalina_connector_scheme: "http"
crowd_catalina_connector_secure: "false"
crowd_catalina_connector_context_path: ~

# Zalecane argumenty JVM przez Atlassian.
crowd_jvm_support_recommended_args: >-
  -Datlassian.plugins.enable.wait=300
  -XX:+UnlockExperimentalVMOptions
  -XX:+UseCGroupMemoryLimitForHeap
  -XX:MaxRAMFraction=1

# Czas sesji (w minutach).
crowd_session_timeout: "120"

Wymagania

Stan używanych ról

Następujące role są używane do przygotowania systemu. Możesz przygotować swój system w inny sposób.

Wymaganie GitHub Wersja
buluma.bootstrap Ansible Molecule Wersja
buluma.java Ansible Molecule Wersja
alvistack.openjdk Ansible Molecule Wersja

Kontekst

Ta rola jest częścią wielu kompatybilnych ról. Zobacz dokumentację tych ról po więcej informacji.

Oto przegląd powiązanych ról:

dependencies

Kompatybilność

Ta rola była testowana na tych obrazach kontenerów:

kontener tagi
Amazon Kandydat
EL 8
Debian wszystkie
Fedora wszystkie
opensuse wszystkie
Ubuntu wszystkie

Minimalna wersja Ansible wymagana to 2.12, testy wykonano na:

  • poprzedniej wersji.
  • aktualnej wersji.
  • wersji deweloperskiej.

Jeśli znajdziesz problemy, zgłoś je na GitHubie

Dziennik zmian

Historia roli

Licencja

Apache-2.0

Informacje o autorze

Shadow Walker

O projekcie

Install and configure crowd on your system.

Zainstaluj
ansible-galaxy install buluma.crowd
Licencja
apache-2.0
Pobrania
140
Właściciel
DevOps Engineer