Skip to content
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.

Use apache webserver in tests #493

Merged
merged 1 commit into from Nov 25, 2020

Conversation

pavelpicka
Copy link
Collaborator

@pavelpicka pavelpicka commented Nov 12, 2020

Change 2 dynamic and 1 static test to use apache instead of nginx.

Add install mods for apache and removing default vhost for Debian host.

closes: #4968
https://pulp.plan.io/issues/4968
closes: #7524
https://pulp.plan.io/issues/7524

@pulpbot
Copy link
Member

pulpbot commented Nov 12, 2020

Attached issue: https://pulp.plan.io/issues/4968

@mdellweg
Copy link
Member

Looks reasonable to me.
Maybe you can move one of the apache deployments to a "static" scenario?
Also a changelog is needed.

@pavelpicka
Copy link
Collaborator Author

I would leave static with default 'nginx'. As with this PR we will test both options of web servers we can use.

@mdellweg
Copy link
Member

I would leave static with default 'nginx'. As with this PR we will test both options of web servers we can use.

I meant to use apache in 1 static and 2 dynamic scenarios, while nginx would take the remaining 2 static and 1 dynamic scenarios to max out the number of combinations we test without adding more entries to the already big test matrix.

@pavelpicka pavelpicka force-pushed the 4968-test-with-apache branch 2 times, most recently from f4fd60e to 7819631 Compare November 12, 2020 14:03
@bmbouter
Copy link
Member

Does this also continue to test nginx?

@pavelpicka
Copy link
Collaborator Author

pavelpicka commented Nov 12, 2020

@bmbouter It does not. As that would double the testing time.
@mdellweg @mikedep333 just noticed and adding here (able to reproduce locally) https://github.com/pulp/pulp_installer/pull/493/files#diff-765ce557fd8095c0d686a26fabb2ff96752947324bf41261c5bd52965da08724R25-R28

@bmbouter
Copy link
Member

If we can't test both, then I think nginx should be the one since it's the default used by the webserver.

@pavelpicka
Copy link
Collaborator Author

I still believe this is helpful to test both web servers, already found one small issue with apache (my comment above with link to missing mods) because this pr.

@bmbouter
Copy link
Member

I still believe this is helpful to test both web servers, already found one small issue with apache (my comment above with link to missing mods) because this pr.

I agree the ideal is to test both. Can we test both?

@pavelpicka
Copy link
Collaborator Author

I believe only with extending scenarios (by 6 in this case) which prolong test time pretty much.

@bmbouter
Copy link
Member

I believe only with extending scenarios (by 6 in this case) which prolong test time pretty much.

I'm confused, does this mean we can test both?

@mdellweg
Copy link
Member

I believe only with extending scenarios (by 6 in this case) which prolong test time pretty much.

I'm confused, does this mean we can test both?

with this PR we are testing 3 scenarios with apache and 6 with nginx instead of all 9 with nginx.

@bmbouter
Copy link
Member

I believe only with extending scenarios (by 6 in this case) which prolong test time pretty much.

I'm confused, does this mean we can test both?

with this PR we are testing 3 scenarios with apache and 6 with nginx instead of all 9 with nginx.

That sounds good to me then.

@pavelpicka
Copy link
Collaborator Author

I believe only with extending scenarios (by 6 in this case) which prolong test time pretty much.

I'm confused, does this mean we can test both?

with this PR we are testing 3 scenarios with apache and 6 with nginx instead of all 9 with nginx.

That sounds good to me then.

Like this we test both, but to test both for all scenario it is not possible now.

@pavelpicka pavelpicka force-pushed the 4968-test-with-apache branch 2 times, most recently from 434a6be to c87930e Compare November 13, 2020 15:17
docs/contributing.md Outdated Show resolved Hide resolved
roles/pulp_webserver/README.md Outdated Show resolved Hide resolved
roles/pulp_webserver/tasks/apache.yml Outdated Show resolved Hide resolved
roles/pulp_webserver/tasks/apache.yml Outdated Show resolved Hide resolved
roles/pulp_webserver/tasks/generate_tls_certificates.yml Outdated Show resolved Hide resolved
roles/pulp_webserver/tasks/generate_tls_certificates.yml Outdated Show resolved Hide resolved
roles/pulp_webserver/templates/nginx.conf.j2 Outdated Show resolved Hide resolved
@pavelpicka pavelpicka force-pushed the 4968-test-with-apache branch 5 times, most recently from 0d5ecc9 to 63313ea Compare November 17, 2020 13:03
@pavelpicka pavelpicka changed the title Use apache webserver in tests [WIP] Use apache webserver in tests Nov 17, 2020
@pavelpicka pavelpicka force-pushed the 4968-test-with-apache branch 3 times, most recently from 8deefc3 to be55db9 Compare November 17, 2020 20:06
@pavelpicka pavelpicka changed the title [WIP] Use apache webserver in tests Use apache webserver in tests Nov 18, 2020
Copy link
Member

@mdellweg mdellweg left a comment

Choose a reason for hiding this comment

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

I have the impression, you need to do the same manipulation for pulp_content_bind.
Don't we test that with molecule?

- proxy_http
- ssl
when: ansible_facts.os_family == "Debian"
notify: reload apache
Copy link
Member

Choose a reason for hiding this comment

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

💯

Copy link
Member

Choose a reason for hiding this comment

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

Fixing debian support for httpd should be a separate changelog entry (and commit, and bug), but the same PR. We want to let users know that we fixed it.

I do not see a need for separate bugs for all the issues you fixed, but still.

roles/pulp_webserver/tasks/apache.yml Show resolved Hide resolved
roles/pulp_webserver/tasks/apache.yml Outdated Show resolved Hide resolved
@pavelpicka pavelpicka force-pushed the 4968-test-with-apache branch 3 times, most recently from 8accad0 to 0cfbca2 Compare November 18, 2020 10:49
Copy link
Member

@mdellweg mdellweg left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Member

@mikedep333 mikedep333 left a comment

Choose a reason for hiding this comment

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

Great job fixing these issues, but see comments.

Comment on lines 5 to 8
pulp_apache_url: 'localhost'
pulp_configure_firewall: auto
pulp_webserver_apache_api_bind: "{{ pulp_api_bind.startswith('unix') | ternary(pulp_api_bind + '|http://' + pulp_apache_url, 'http://' + pulp_api_bind ) }}"
pulp_webserver_apache_content_bind: "{{ pulp_content_bind.startswith('unix') | ternary(pulp_content_bind + '|http://' + pulp_apache_url, 'http://' + pulp_content_bind ) }}"
Copy link
Member

Choose a reason for hiding this comment

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

Well done! This avoids the need to use separate tasks that set facts, which slows down the run.

However, since we do not document them, they are internal variables. So the variables names should begin with __ .

https://github.com/oasis-roles/meta_standards#naming-things

Copy link
Member

Choose a reason for hiding this comment

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

And they should be variables, not defaults.

- proxy_http
- ssl
when: ansible_facts.os_family == "Debian"
notify: reload apache
Copy link
Member

Choose a reason for hiding this comment

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

Fixing debian support for httpd should be a separate changelog entry (and commit, and bug), but the same PR. We want to let users know that we fixed it.

I do not see a need for separate bugs for all the issues you fixed, but still.

roles/pulp_webserver/tasks/apache.yml Outdated Show resolved Hide resolved
Copy link
Member

@mdellweg mdellweg left a comment

Choose a reason for hiding this comment

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

I believe all comments were addressed.

Would be nice, if your editor added a single linebreak at the end of files.
Also, i dont' know why the fips tests are broken.

@pavelpicka
Copy link
Collaborator Author

I believe all comments were addressed.

Would be nice, if your editor added a single linebreak at the end of files.

I believe you mean variables main. I'll update that one. I think not the case in the CHANGES files.

Also, i dont' know why the fips tests are broken.
So do I, unfortunately.

Change 2 dynamic and 1 static test to use apache instead of nginx.

Add install mods for apache and removing default vhost for Debian host.

closes: #4968
https://pulp.plan.io/issues/4968
closes: #7524
https://pulp.plan.io/issues/7524
@mikedep333 mikedep333 merged commit 5b05276 into pulp:master Nov 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants