Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

provision: make playbooks work on virtual machines in idm-ci #21

Merged
merged 1 commit into from
Jul 25, 2023

Conversation

jakub-vavra-cz
Copy link
Contributor

@jakub-vavra-cz jakub-vavra-cz commented Feb 2, 2023

Create playbook_vm.yml to include image_base and image_service to work on VM with become.
Modify packages role so it recognizes rhel and applies pieces on appropriate host groups.
Replace freeipa with ipa for RHEL.
Improve ldap and ipa task idempotency.

@jakub-vavra-cz jakub-vavra-cz changed the title Modify the automation so it is apllicable also on VMs. Modify the automation so it is aplicable also on VMs. Feb 9, 2023
Copy link
Member

@pbrezina pbrezina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't read it all yet, but here are first comments.

src/ansible/roles/ad/tasks/main.yml Outdated Show resolved Hide resolved
src/ansible/roles/common/tasks/main.yml Outdated Show resolved Hide resolved
src/ansible/roles/ipa/tasks/main.yml Outdated Show resolved Hide resolved
Copy link
Contributor

@ikerexxe ikerexxe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor comments

src/ansible/roles/packages/tasks/RedHat8.yml Show resolved Hide resolved
src/ansible/roles/client/tasks/main.yml Outdated Show resolved Hide resolved
Copy link
Contributor

@ikerexxe ikerexxe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Take into account that Github is asking you to rebase on top of master before being able to merge.

@pbrezina
Copy link
Member

I will review this on Monday, can you please rebase it in the mean time?

Copy link
Member

@pbrezina pbrezina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, looks good to me, there are few minor comments.

Now, it would be good, if you can approve #51 before we merge this one and incorporate it into this pull request so passkey testing functionality is always built. It moves the bits into stand alone rpm package so build dependencies are no longer required to be installed.

I'm running the provisioning also locally so I can check that all existing tests pass. I'll get back with results.

src/ansible/roles/ad/defaults/main.yml Outdated Show resolved Hide resolved
src/ansible/roles/ad/tasks/main.yml Show resolved Hide resolved
src/ansible/roles/client/tasks/main.yml Outdated Show resolved Hide resolved
src/ansible/roles/ldap/tasks/main.yml Outdated Show resolved Hide resolved
@@ -0,0 +1,6 @@
- name: Enable idm module
command: yum module enable idm:DL1 -y
when: ansible_distribution_major_version == '8'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when is not needed here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed.

Copy link
Contributor Author

@jakub-vavra-cz jakub-vavra-cz Jul 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is needed after all on rhel 9, returned it back:

fatal: [master.ipa.test]: FAILED! => changed=true 
  cmd:
  - yum
  - module
  - enable
  - idm:DL1
  - -y
  delta: '0:00:02.163913'
  end: '2023-07-25 06:13:18.094871'
  msg: non-zero return code
  rc: 1
  start: '2023-07-25 06:13:15.930958'
  stderr: |-
    Error: Problems in request:
    missing groups or modules: idm:DL1
  stderr_lines: <omitted>
  stdout: |-
    rhel-9.3 buildroot                               57 MB/s | 3.6 MB     00:00
    rhel-9.3 buildroot debuginfo                     56 MB/s | 2.5 MB     00:00
  stdout_lines: <omitted>

src/ansible/roles/packages/tasks/RedHat8.yml Show resolved Hide resolved
src/ansible/roles/ssh_server/tasks/main.yml Show resolved Hide resolved
Copy link
Member

@pbrezina pbrezina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, tests pass, AD can be now provisioned again: But it would really be good to solve the "password never expires" step. There's something wrong going on, the retry should not be needed.

src/ansible/roles/ad/tasks/main.yml Show resolved Hide resolved
@jakub-vavra-cz jakub-vavra-cz changed the title Modify the automation so it is aplicable also on VMs. provision: make playbooks work on virtual machines in idm-ci Jul 25, 2023
Create playbook_vm.yml to include image_base and image_service to work on VM with become.
Change the ci user UID locally so it does not collide with cloud-user and fedora user.
Modify packages role so it recognizes rhel and applies pieces on appropriate host groups.
Replace freeipa with ipa for RHEL.
Improve ldap and ipa task idempotency.
Add a dns role to configure dns VM.
Allow appending to authorized keys instead of rewriting.
Add a ssh host key for dns.
Add retries to restarting ssh service as it seems to be flaky.
Skip passkey on VMs (As it adds unwanted build dependencies).
Modify AD role to reuse on VMs without vagrant.
Make the backends ipa, ldap, samba optional.
Make realm join verbose.
@pbrezina pbrezina merged commit 268d013 into SSSD:master Jul 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants