Skip to content

Commit

Permalink
BB-5 (#846)
Browse files Browse the repository at this point in the history
Fix many small issues, related to keepalived, pxe_stack, rsyslog, etc.
This is the last pass to clean collections. Remains only hardware related roles.
  • Loading branch information
oxedions committed Nov 8, 2023
1 parent 606683e commit 2a8bdac
Show file tree
Hide file tree
Showing 41 changed files with 718 additions and 2,335 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/deb11.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ jobs:
- name: Prepare run input files
run: docker exec mgt1 bash -c "sudo -u bluebanquise /bin/bash -c 'cp -a /bluebanquise/resources/workflow/inventory_standard /var/lib/bluebanquise/inventory && cp -a /bluebanquise/resources/workflow/playbooks /var/lib/bluebanquise'"

- name: High availability roles execution
run: |
docker exec mgt1 bash -c "sudo -u bluebanquise /bin/bash -c 'source /var/lib/bluebanquise/ansible_venv/bin/activate && ANSIBLE_VARS_ENABLED=ansible.builtin.host_group_vars,bluebanquise.commons.core ansible-playbook /var/lib/bluebanquise/playbooks/high_availability.yml -i /var/lib/bluebanquise/inventory --become --connection=local --limit mgt1 --diff -t haproxy,keepalived --skip-tags service'"
# - name: High availability roles execution
# run: |
# docker exec mgt1 bash -c "sudo -u bluebanquise /bin/bash -c 'source /var/lib/bluebanquise/ansible_venv/bin/activate && ANSIBLE_VARS_ENABLED=ansible.builtin.host_group_vars,bluebanquise.commons.core ansible-playbook /var/lib/bluebanquise/playbooks/high_availability.yml -i /var/lib/bluebanquise/inventory --become --connection=local --limit mgt1 --diff --skip-tags pcs,drbd'"
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/deb12.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ jobs:
run: |
docker exec mgt1 bash -c "sudo -u bluebanquise /bin/bash -c 'source /var/lib/bluebanquise/ansible_venv/bin/activate && ANSIBLE_VARS_ENABLED=ansible.builtin.host_group_vars,bluebanquise.commons.core ansible-playbook /var/lib/bluebanquise/playbooks/infrastructure.yml -i /var/lib/bluebanquise/inventory --become --connection=local --limit mgt1 --diff --tags repositories'"
- name: High availability roles execution
run: |
docker exec mgt1 bash -c "sudo -u bluebanquise /bin/bash -c 'source /var/lib/bluebanquise/ansible_venv/bin/activate && ANSIBLE_VARS_ENABLED=ansible.builtin.host_group_vars,bluebanquise.commons.core ansible-playbook /var/lib/bluebanquise/playbooks/high_availability.yml -i /var/lib/bluebanquise/inventory --become --connection=local --limit mgt1 --diff -t haproxy,keepalived --skip-tags service'"
# - name: High availability roles execution
# run: |
# docker exec mgt1 bash -c "sudo -u bluebanquise /bin/bash -c 'source /var/lib/bluebanquise/ansible_venv/bin/activate && ANSIBLE_VARS_ENABLED=ansible.builtin.host_group_vars,bluebanquise.commons.core ansible-playbook /var/lib/bluebanquise/playbooks/high_availability.yml -i /var/lib/bluebanquise/inventory --become --connection=local --limit mgt1 --diff --skip-tags pcs,drbd'"
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/el8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ jobs:
run: |
docker exec mgt1 bash -c "sudo -u bluebanquise /bin/bash -c 'source /var/lib/bluebanquise/ansible_venv/bin/activate && ANSIBLE_VARS_ENABLED=ansible.builtin.host_group_vars,bluebanquise.commons.core ansible-playbook /var/lib/bluebanquise/playbooks/infrastructure.yml -i /var/lib/bluebanquise/inventory --become --connection=local --limit mgt1 --diff --tags repositories'"
- name: High availability roles execution
run: |
docker exec mgt1 bash -c "sudo -u bluebanquise /bin/bash -c 'source /var/lib/bluebanquise/ansible_venv/bin/activate && ANSIBLE_VARS_ENABLED=ansible.builtin.host_group_vars,bluebanquise.commons.core ansible-playbook /var/lib/bluebanquise/playbooks/high_availability.yml -i /var/lib/bluebanquise/inventory --become --connection=local --limit mgt1 --diff -t haproxy,keepalived --skip-tags service'"
# - name: High availability roles execution
# run: |
# docker exec mgt1 bash -c "dnf config-manager --set-enabled ha"
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/el9.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,11 @@ jobs:
- name: Prepare run input files
run: docker exec mgt1 bash -c "sudo -u bluebanquise /bin/bash -c 'cp -a /bluebanquise/resources/workflow/inventory_standard /var/lib/bluebanquise/inventory && cp -a /bluebanquise/resources/workflow/playbooks /var/lib/bluebanquise'"

# - name: High availability roles execution
# run: |
# docker exec mgt1 bash -c "dnf config-manager --set-enabled highavailability"
# docker exec mgt1 bash -c "sudo -u bluebanquise /bin/bash -c 'source /var/lib/bluebanquise/ansible_venv/bin/activate && ANSIBLE_VARS_ENABLED=ansible.builtin.host_group_vars,bluebanquise.commons.core ansible-playbook /var/lib/bluebanquise/playbooks/high_availability.yml -i /var/lib/bluebanquise/inventory --become --connection=local --limit mgt1 --diff -t package'"
# docker exec mgt1 bash -c "sudo -u bluebanquise /bin/bash -c 'source /var/lib/bluebanquise/ansible_venv/bin/activate && ANSIBLE_VARS_ENABLED=ansible.builtin.host_group_vars,bluebanquise.commons.core ansible-playbook /var/lib/bluebanquise/playbooks/high_availability.yml -i /var/lib/bluebanquise/inventory --become --connection=local --limit mgt1 --diff -t pcs,drbd --check'"
# docker exec mgt1 bash -c "sudo -u bluebanquise /bin/bash -c 'source /var/lib/bluebanquise/ansible_venv/bin/activate && ANSIBLE_VARS_ENABLED=ansible.builtin.host_group_vars,bluebanquise.commons.core ansible-playbook /var/lib/bluebanquise/playbooks/high_availability.yml -i /var/lib/bluebanquise/inventory --become --connection=local --limit mgt1 --diff --skip-tags pcs'"
- name: High availability roles execution
run: |
docker exec mgt1 bash -c "sudo -u bluebanquise /bin/bash -c 'source /var/lib/bluebanquise/ansible_venv/bin/activate && ANSIBLE_VARS_ENABLED=ansible.builtin.host_group_vars,bluebanquise.commons.core ansible-playbook /var/lib/bluebanquise/playbooks/high_availability.yml -i /var/lib/bluebanquise/inventory --become --connection=local --limit mgt1 --diff -t haproxy,keepalived --skip-tags service'"
# docker exec mgt1 bash -c "dnf config-manager --set-enabled highavailability"
# docker exec mgt1 bash -c "sudo -u bluebanquise /bin/bash -c 'source /var/lib/bluebanquise/ansible_venv/bin/activate && ANSIBLE_VARS_ENABLED=ansible.builtin.host_group_vars,bluebanquise.commons.core ansible-playbook /var/lib/bluebanquise/playbooks/high_availability.yml -i /var/lib/bluebanquise/inventory --become --connection=local --limit mgt1 --diff --skip-tags pcs'"

- name: Repositories role execution
run: |
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/lp15.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ jobs:
run: |
docker exec mgt1 bash -c "sudo -u bluebanquise /bin/bash -c 'source /var/lib/bluebanquise/ansible_venv/bin/activate && ANSIBLE_VARS_ENABLED=ansible.builtin.host_group_vars,bluebanquise.commons.core ansible-playbook /var/lib/bluebanquise/playbooks/infrastructure.yml -i /var/lib/bluebanquise/inventory --become --connection=local --limit mgt1 --diff --tags repositories'"
- name: High availability roles execution
run: |
docker exec mgt1 bash -c "sudo -u bluebanquise /bin/bash -c 'source /var/lib/bluebanquise/ansible_venv/bin/activate && ANSIBLE_VARS_ENABLED=ansible.builtin.host_group_vars,bluebanquise.commons.core ansible-playbook /var/lib/bluebanquise/playbooks/high_availability.yml -i /var/lib/bluebanquise/inventory --become --connection=local --limit mgt1 --diff -t haproxy,keepalived --skip-tags service'"
# - name: High availability roles execution
# run: |
# docker exec mgt1 bash -c "sudo -u bluebanquise /bin/bash -c 'source /var/lib/bluebanquise/ansible_venv/bin/activate && ANSIBLE_VARS_ENABLED=ansible.builtin.host_group_vars,bluebanquise.commons.core ansible-playbook /var/lib/bluebanquise/playbooks/high_availability.yml -i /var/lib/bluebanquise/inventory --become --connection=local --limit mgt1 --diff --skip-tags pcs,drbd'"
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/u20.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ jobs:
run: |
docker exec mgt1 bash -c "sudo -u bluebanquise /bin/bash -c 'source /var/lib/bluebanquise/ansible_venv/bin/activate && ANSIBLE_VARS_ENABLED=ansible.builtin.host_group_vars,bluebanquise.commons.core ansible-playbook /var/lib/bluebanquise/playbooks/infrastructure.yml -i /var/lib/bluebanquise/inventory --become --connection=local --limit mgt1 --diff --tags repositories'"
- name: High availability roles execution
run: |
docker exec mgt1 bash -c "sudo -u bluebanquise /bin/bash -c 'source /var/lib/bluebanquise/ansible_venv/bin/activate && ANSIBLE_VARS_ENABLED=ansible.builtin.host_group_vars,bluebanquise.commons.core ansible-playbook /var/lib/bluebanquise/playbooks/high_availability.yml -i /var/lib/bluebanquise/inventory --become --connection=local --limit mgt1 --diff -t haproxy,keepalived --skip-tags service'"
# - name: High availability roles execution
# run: |
# docker exec mgt1 bash -c "sudo -u bluebanquise /bin/bash -c 'source /var/lib/bluebanquise/ansible_venv/bin/activate && ANSIBLE_VARS_ENABLED=ansible.builtin.host_group_vars,bluebanquise.commons.core ansible-playbook /var/lib/bluebanquise/playbooks/high_availability.yml -i /var/lib/bluebanquise/inventory --become --connection=local --limit mgt1 --diff -t pcs --check'"
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/u22.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ jobs:
run: |
docker exec mgt1 bash -c "sudo -u bluebanquise /bin/bash -c 'source /var/lib/bluebanquise/ansible_venv/bin/activate && ANSIBLE_VARS_ENABLED=ansible.builtin.host_group_vars,bluebanquise.commons.core ansible-playbook /var/lib/bluebanquise/playbooks/infrastructure.yml -i /var/lib/bluebanquise/inventory --become --connection=local --limit mgt1 --diff --tags repositories'"
- name: High availability roles execution
run: |
docker exec mgt1 bash -c "sudo -u bluebanquise /bin/bash -c 'source /var/lib/bluebanquise/ansible_venv/bin/activate && ANSIBLE_VARS_ENABLED=ansible.builtin.host_group_vars,bluebanquise.commons.core ansible-playbook /var/lib/bluebanquise/playbooks/high_availability.yml -i /var/lib/bluebanquise/inventory --become --connection=local --limit mgt1 --diff -t haproxy,keepalived --skip-tags service'"
#- name: TEST
# run: |
# docker exec mgt1 bash -c "sudo -u bluebanquise /bin/bash -c 'source /var/lib/bluebanquise/ansible_venv/bin/activate && ansible-doc -t vars -l'"
Expand Down
2 changes: 1 addition & 1 deletion collections/file_systems/galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace: bluebanquise
name: file_systems

# The version of the collection. Must be compatible with semantic versioning
version: 2.0.1
version: 2.0.2

# The path to the Markdown (.md) readme file. This path is relative to the root of the collection
readme: README.md
Expand Down
18 changes: 16 additions & 2 deletions collections/file_systems/roles/nfs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,20 @@ nfs_profile:
- client
```

For example, in the playbook:

```yaml
---
- name: managements playbook
hosts: "mg_managements"
roles:
- role: bluebanquise.file_systems.nfs
tags: nfs
vars:
nfs_profile:
- server
```

### Define shared resources

To use the role, create a file in main inventory, that contains a description
Expand Down Expand Up @@ -75,7 +89,7 @@ nfs_shares:
mount_options: rw,nfsvers=4.2,bg,nosuid,nodev
```

A description of each parameter can be found in tables bellow.
A description of each parameter can be found in table bellow.

Mandatory values are:

Expand Down Expand Up @@ -131,7 +145,7 @@ easily go to 64, 128 or even 256 threads if cluster is large.

It is possible to manipulate mount state using *nfs_client_directories_state*
variable. Default is **mounted**. Refer to `mount module documentation <https://docs.ansible.com/ansible/latest/collections/ansible/posix/mount_module.html#parameter-state>`_
to get other possible values.
to get other possible values. This value can be important if using role in chroot environment.

#### SELinux

Expand Down
7 changes: 0 additions & 7 deletions collections/file_systems/roles/xfs_quota/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,6 @@

Used to set default user and group disk quotas on xfs disk used by server.

**There are 3 types of quotas:**

- user
- group
- *project Not implemented*


This role provides simply an interface to **xfs_quota** Ansible module https://docs.ansible.com/ansible/latest/collections/community/general/xfs_quota_module.html

## Observation
Expand Down
2 changes: 1 addition & 1 deletion collections/hardware/galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace: bluebanquise
name: hardware

# The version of the collection. Must be compatible with semantic versioning
version: 2.0.0
version: 2.0.1

# The path to the Markdown (.md) readme file. This path is relative to the root of the collection
readme: README.md
Expand Down
9 changes: 7 additions & 2 deletions collections/hardware/roles/gpu/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@

This role install GPU related drivers and tools.

Role currently only supports RHEL distributions. If you need other distributions, please notify me via a feature request.

## Instructions

To specify gpu vendor to setup, simply set `gpu_vendor` variable. Currently,
To specify gpu vendor to setup, simply set `gpu_vendor` variable to target vendor. Currently,
variable supports the following vendors:

* nvidia
Expand Down Expand Up @@ -34,6 +36,9 @@ When downloading driver, on main Nvidia website, linked Cuda version should be m
We will assume here RHEL version is 8, but procedure is the same for RHEL 7 or RHEL 9.
Please adapt commands to your needs, this is a main and non strict guideline.

Note that you need EPEL repositories to be enabled on your system.
If your system is air-gapped, then you need at least `dkms` package from EPEL to be available in a repository.

Download the driver for related RHEL distribution on main website.
You should get a huge rpm (around 500Mb).
This rpm should not be installed directly, but extracted.
Expand All @@ -49,7 +54,7 @@ mv $HOME/nvidia-driver-local-repo-rhel8-515.65.01-1.0-1.x86_64.rpm .
rpm2cpio nvidia-driver-local-repo-rhel8-515.65.01-1.0-1.x86_64.rpm | cpio -idmv
```

Now, grab the repository, and push it into your repositories http server folder:
Now, grab the repository, and push it into your repositories http server folder. For example:

```
cp -a var/nvidia-driver-local-repo-rhel8-515.65.01/ /var/www/html/repositories/redhat/8/x86_64/nvidia
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
name:
- kernel-devel-{{ ansible_kernel }}
- kernel-headers-{{ ansible_kernel }}
- dkms
state: present

- name: package <|> Install nvidia-driver
Expand Down
2 changes: 2 additions & 0 deletions collections/hardware/roles/interconnect/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ This role install and start all needed drivers for interconnects networks (Mella

The role covers client (driver, libs) and subnet manager installation when needed.

Role currently only supports RHEL distributions. If you need other distributions, please notify me via a feature request.

## Instructions

To trigger an interconnect setup, simply set `interconnect_stack` variable to the
Expand Down
4 changes: 0 additions & 4 deletions collections/hardware/roles/rasdaemon/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
# Rasdaemon

## Owner

@oxedions

## Description

The role install and start Rasdaemon tool to track hardware issues.
Expand Down
2 changes: 1 addition & 1 deletion collections/high_availability/galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace: bluebanquise
name: high_availability

# The version of the collection. Must be compatible with semantic versioning
version: 2.0.0
version: 2.1.0

# The path to the Markdown (.md) readme file. This path is relative to the root of the collection
readme: README.md
Expand Down
7 changes: 3 additions & 4 deletions collections/high_availability/roles/drbd/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# DRBD

Important: this role is for now limited to RHEL systems. If you wish it to be available on other distributions (Debian, Ubuntu, OpenSuse Leap) please do not hesitate to open a request.
Role currently only supports RHEL distributions. If you need other distributions, please notify me via a feature request.

## Description

Expand All @@ -22,6 +22,8 @@ jinja version = 3.0.3

## Instructions

### RHEL 8

To allow role to find needed packages, you need to add elrepo repositories on
all the nodes:

Expand Down Expand Up @@ -147,9 +149,6 @@ resource1 role:Primary
peer-disk:UpToDate
```




To delete the configuration (**will delete all data on the DRBD devices**)
run the following commands :

Expand Down

0 comments on commit 2a8bdac

Please sign in to comment.