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

Prepare fixtures container for Openshift #208

Merged
merged 2 commits into from Jan 29, 2021

Conversation

mscherer
Copy link
Contributor

So this commit prepare for a migration of fixtures to openshift.

I just need to take a look at the https deployment, there is a operator for that. And do the job.

@mscherer mscherer changed the title Fix fixtures Prepare fixtures container for Openshift Jan 19, 2021
@daviddavis
Copy link

These code changes look good to me. We link commits to our issue tracker but you can get around this by adding [noissue] to your commits. Also, it looks like the tests are failing.

@mscherer
Copy link
Contributor Author

 Step 13/26 : FROM registry.redhat.io/ubi8/ubi AS server
Get https://registry.redhat.io/v2/ubi8/ubi/manifests/latest: unauthorized: Please login to the Red Hat Registry using your Customer Portal credentials. Further instructions can be found here: https://access.redhat.com/RegistryAuthentication

Curious, it work on openshift. That's a bit annoying, I will need to find a way.

@mscherer mscherer marked this pull request as draft January 20, 2021 08:56
@mscherer
Copy link
Contributor Author

I am doing some test by using a Fedora base image, and chasing down the UBI issue (because UBI usage is on the plate of my boss). I have read the doc, it doesn't say you need a subscription: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/building_running_and_managing_containers/index#using_standard_red_hat_base_images

And running:

podman run registry.access.redhat.com/ubi8/ubi cat /etc/os-release

seems to work fine on my Fedora 33 Silverblue laptop, and I never entered any credentials.

I guess the difference is maybe podman vs docker (and how the registry is accessed), and the credentials message is misleading.

@mscherer mscherer force-pushed the fix_fixtures branch 3 times, most recently from ef52593 to 176d696 Compare January 20, 2021 10:24
@mscherer
Copy link
Contributor Author

Ok so the problem with the container was registry.redhat.io vs registry.access.redhat.com. I guess I used a old doc somewhere.

This permit to build the new container in openshift,
and then run it in 2 steps.

When building the image in Openshift, the BASE_URL variable
can be defined at build time (in the BuildConfig object), and
so will run sed, but not nginx.

Then at deployment time, the URL having been set already, we do not
change anything.

[noissue]
@daviddavis
Copy link

This looks good to me. Just out of curiosity: why change the port from 80 to 8080?

@daviddavis
Copy link

Ah, I see the answer in one of your commits. Thanks!

This is still a draft. Feel free to unset that when you think it's ready and I can merge.

The nginx upstream image have issues, either by not running in Openshift,
or being too restricted to change the directory.

We also have to listen on port 8080, since Openshift will not let
nginx start on port 80.

[noissue]
@mscherer mscherer marked this pull request as ready for review January 28, 2021 17:54
@mscherer
Copy link
Contributor Author

So, i was waiting on more info from openshift PM, but got no answer, so I will proceed with my plan for https. I guess I shouldn't have blocked the merge on that :/

Copy link

@daviddavis daviddavis left a comment

Choose a reason for hiding this comment

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

Looks great. Thanks!

@daviddavis daviddavis merged commit 2c9068d into pulp:master Jan 29, 2021
@mscherer mscherer mentioned this pull request Feb 15, 2021
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.

None yet

2 participants