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

Containerized portal as it runs in prod, locally #3745

Merged
merged 1 commit into from
Aug 21, 2024

Conversation

SudoBrendan
Copy link
Collaborator

@SudoBrendan SudoBrendan commented Jul 31, 2024

Which issue this PR addresses:

Fixes ARO-9500

What this PR does / why we need it:

You can now test portal changes locally the same way it's run in prod - via a container run process on localhost:8444

Test plan for issue:

I need confirmation from MacOS users that this works for them - I updated some Portal server configs like we did for Shubhada's PR for RP (e.g. directly use :8444 instead of localhost:8444 so it works with podman machine setups).

I have validated on Linux that I can run:

  1. make runlocal-portal
  2. navigate to https://localhost:8444 to see the portal in action.

Is there any documentation that needs to be updated for this PR?

Yes, it's in the PR.

How do you know this will function as expected in production?

This is still an unused container image - it is useful now in local development only and is only bringing conformity between prod and local dev.

Makefile Outdated Show resolved Hide resolved
@SudoBrendan
Copy link
Collaborator Author

/azp run ci

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Makefile Outdated
Comment on lines 72 to 83
.PHONY: docker-secrets
docker-secrets: aks.kubeconfig
docker secret rm --ignore aks.kubeconfig
docker secret create aks.kubeconfig ./aks.kubeconfig

docker secret rm --ignore proxy-client.key
docker secret create proxy-client.key ./secrets/proxy-client.key

docker secret rm --ignore proxy-client.crt
docker secret create proxy-client.crt ./secrets/proxy-client.crt

docker secret rm --ignore proxy.crt
docker secret create proxy.crt ./secrets/proxy.crt
Copy link
Collaborator

Choose a reason for hiding this comment

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

IIRC we aren't supposed to use docker command any more.

https://www.redhat.com/sysadmin/podman-kubernetes-secrets
podman also has secret command. Doesn't it work?

Copy link
Collaborator Author

@SudoBrendan SudoBrendan Aug 1, 2024

Choose a reason for hiding this comment

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

We could move this to strictly say podman - it's been assumed for a while that all ARO devs are using podman-docker library to effectively alias docker=podman and not use the docker binary - podman is what I was testing with locally under the hood here.

I can update if we've decided to move away from the docker alias - but docker is ubiquitous throughout the Makefile today. If we want to do that, I think it should be done all at once and in a different PR maybe? I'd be +1 to do that because it's more clear that we're actually using podman locally - but it may have downstream impacts on pipelines.

Copy link
Collaborator

Choose a reason for hiding this comment

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

FWIW +1 for being explicit with podman and +1 for a separate PR to convert the lot

Copy link
Collaborator

@bitoku bitoku Aug 1, 2024

Choose a reason for hiding this comment

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

If we concern downstream impacts, we can do one by one starting with this PR.
IMHO I don't like the way to do all at once because we can't identify what breaks what.

And also runlocal-portal uses podman, so we're good to use podman here as well, I guess.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I created a follow-up PR for this (and some other things I've noticed we need) #3775

@SudoBrendan SudoBrendan force-pushed the sudobrendan/ARO-9500-runlocal-portal branch from 01f167f to a26453e Compare August 12, 2024 21:10
tsatam
tsatam previously approved these changes Aug 13, 2024
Copy link
Collaborator

@tsatam tsatam left a comment

Choose a reason for hiding this comment

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

LGTM. I tested this out (manually by running the make targets' implementation directly against other portal PRs) and the portal worked fine for all our use cases.

@SudoBrendan SudoBrendan added the hold Hold label Aug 13, 2024
@SudoBrendan
Copy link
Collaborator Author

Adding hold because I'm getting reports this doesn't work with podman machine / MacOs

@SudoBrendan SudoBrendan removed the hold Hold label Aug 16, 2024
@SudoBrendan
Copy link
Collaborator Author

/azp run ci

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link

Please rebase pull request.

@github-actions github-actions bot added the needs-rebase branch needs a rebase label Aug 16, 2024
- creates a new make target to run the Portal app containerized
- updates portal addresses to work with podman machine
- adds docs
@SudoBrendan
Copy link
Collaborator Author

/azp run ci

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@SudoBrendan SudoBrendan merged commit 92a8bfc into master Aug 21, 2024
20 checks passed
edisonLcardenas pushed a commit that referenced this pull request Sep 16, 2024
- creates a new make target to run the Portal app containerized
- updates portal addresses to work with podman machine
- adds docs
edisonLcardenas pushed a commit that referenced this pull request Sep 17, 2024
- creates a new make target to run the Portal app containerized
- updates portal addresses to work with podman machine
- adds docs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants