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

Remove httpRoutes from samples #574

Merged
merged 22 commits into from
Mar 12, 2024
Merged

Remove httpRoutes from samples #574

merged 22 commits into from
Mar 12, 2024

Conversation

nithyatsu
Copy link
Contributor

@nithyatsu nithyatsu commented Sep 18, 2023

rewrite eshop and eshop dapr using the http-route-less model radius can support now. Summary of changes

  1. "containers" with ports will create services with the same name
  2. "connections" will support url based destination (protocol://servicename:port) instead of the earlier routeName.id format

ref: radius-project/radius#6375

The new envoy image is pushed to ghcr. This image had to be edited since the "routes" of gateway is changed to reflect the new names of services. Service names now match the name of the container offering the service. (ref: /radius/samples/reference-apps/eshop/envoy/README.md)

This PR partially fixes: radius-project/radius#6099

@nithyatsu nithyatsu marked this pull request as ready for review September 26, 2023 21:01
@nithyatsu nithyatsu requested a review from a team as a code owner September 26, 2023 21:01
resource gateway 'Applications.Core/gateways@2023-10-01-preview' = {
name: 'gateway'
properties: {
application: app.id
routes: [
{
path: '/'
destination: frontendRoute.id
destination: 'http://frontend:80'
Copy link
Contributor

@rynowak rynowak Sep 27, 2023

Choose a reason for hiding this comment

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

It's conventional to omit the 80 when using HTTP since 80 is considered the default port for HTTP (like 443 for HTTPS). Can you update these to look like http://frontend instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

reference-apps/eshop/envoy/envoy copy.yaml.txt Outdated Show resolved Hide resolved
@@ -119,15 +86,15 @@ resource webshoppingapigw 'Applications.Core/containers@2023-10-01-preview' = {
properties: {
application: application
container: {
image: 'radius.azurecr.io/eshop-envoy:0.1.4'
image: 'nitcr.azurecr.io/eshop-envoy:0.1.100'
Copy link
Contributor

Choose a reason for hiding this comment

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

do we need to push a new image to radius cr?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, was waiting for the changes to look good, so that I can push the new image to radisu cr.

@@ -67,12 +54,11 @@ resource catalogApi 'Applications.Core/containers@2023-10-01-preview' = {
ASPNETCORE_ENVIRONMENT: 'Development'
ASPNETCORE_URLS: 'http://0.0.0.0:80'
RetryMigrations: 'true'
SeqServerUrl: seqRoute.properties.url
SeqServerUrl: 'http://seq:5340'
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a way to remove this hardcoding?

Copy link
Contributor

Choose a reason for hiding this comment

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

Applies to all hardcoded strings

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The hardcoding comes as part of using DNS-SD and conventionally making the name of service = name of container. @rynowak had suggested to look at it as the DNS hostname of service, instead of a typical hardcoded value.

Copy link
Contributor

Choose a reason for hiding this comment

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

This is desirable hardcoding 👍

@AaronCrawfis AaronCrawfis changed the title Update samples to remove httpRoutes since services can now be deployed as part of container rendering Remove httpRoutes from samples Nov 8, 2023
@AaronCrawfis
Copy link
Contributor

AaronCrawfis commented Nov 8, 2023

I'm getting an error when checking out:

image

Copy link
Contributor

@AaronCrawfis AaronCrawfis left a comment

Choose a reason for hiding this comment

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

Unable to run eshop sample on AKS

@nithyatsu
Copy link
Contributor Author

Unable to run eshop sample on AKS

was working when I had made the changes long back :( will take a look.

@nithyatsu
Copy link
Contributor Author

It is because the envoy image in ghcr needed to be updated with the contents in this PR.

Completed            payment         Microsoft.Resources/deployments
Completed            web             Microsoft.Resources/deployments
Completed            webhooks        Microsoft.Resources/deployments
.                    identity        Microsoft.Resources/deployments
.                    catalog         Microsoft.Resources/deployments
.                    catalog-api     Applications.Core/containers
Completed            gateway         Applications.Core/gateways
.                    identity-api    Applications.Core/containers
.                    ordering-backgroundtasks Applications.Core/containers
Completed            ordering-signalrhub Applications.Core/containers
Completed            ordering-api    Applications.Core/containers
.                    basket-api      Applications.Core/containers

Deployment Complete

Resources:
    eshop           Applications.Core/applications
    basket-api      Applications.Core/containers
    catalog-api     Applications.Core/containers
    identity-api    Applications.Core/containers
    ordering-api    Applications.Core/containers
    ordering-backgroundtasks Applications.Core/containers
    ordering-signalrhub Applications.Core/containers
    payment-api     Applications.Core/containers
    seq             Applications.Core/containers
    web-spa         Applications.Core/containers
    webhooks-api    Applications.Core/containers
    webhooks-client Applications.Core/containers
    webmvc          Applications.Core/containers
    webshoppingagg  Applications.Core/containers
    webshoppingapigw Applications.Core/containers
    webstatus       Applications.Core/containers
    servicebus      Applications.Core/extenders
    gateway         Applications.Core/gateways
    basket-data     Applications.Datastores/redisCaches
    keystore-data   Applications.Datastores/redisCaches
    catalogdb       Applications.Datastores/sqlDatabases
    identitydb      Applications.Datastores/sqlDatabases
    orderingdb      Applications.Datastores/sqlDatabases
    webhooksdb      Applications.Datastores/sqlDatabases
    rabbitmq        Applications.Messaging/rabbitMQQueues

Public Endpoints:
    gateway         Applications.Core/gateways unknown

Will test it on an aks in order to get a public IP next.

@nithyatsu
Copy link
Contributor Author

OK, got it to work, please review when you get a chance. @AaronCrawfis @willdavsmith
image

@@ -30,7 +30,7 @@ test("eShop on Containers App Basic UI and Functionality Checks", async ({ page
await page.getByText("LOGIN").click();

// Expect page to have proper title
expect(page).toHaveTitle("eShopOnContainers - Identity");
// expect(page).toHaveTitle("eShopOnContainers - Identity");
Copy link
Contributor

Choose a reason for hiding this comment

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

Why was this commented out?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

for a test, now reverted back.

@@ -10,5 +10,5 @@ To build the docker image, run `docker build . -t ghcr.io/radius-project/samples

Where NUMBER is one greater than the latest version made. To view versions, see https://ms.portal.azure.com/#view/Microsoft_Azure_ContainerRegistries/RepositoryBlade/id/%2Fsubscriptions%2F66d1209e-1382-45d3-99bb-650e6bf63fc0%2FresourceGroups%2Fassets%2Fproviders%2FMicrosoft.ContainerRegistry%2Fregistries%2Fradius/repository/eshop-envoy.

To push the image, run `az acr login -n radius` and then `docker push ghcr.io/radius-project/samples/eshop-envoy:0.1.<NUMBER>`.
To push the image, run `az acr login -n radius` and then `docker push ghcr.io/radius-project/samples/eshop/eshop-envoy:0.1.<NUMBER>`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Was this wrong before?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, the readme was wrong since all assets related to eshop are in the corrected path.

.DS_Store Outdated
Copy link
Contributor

Choose a reason for hiding this comment

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

should be deleted

Copy link

github-actions bot commented Mar 5, 2024

This pull request has been automatically marked as stale because it has been inactive for 90 days. Remove stale label or comment or this PR will be closed in 7 days.

@github-actions github-actions bot added the stale label Mar 5, 2024
@rynowak
Copy link
Contributor

rynowak commented Mar 10, 2024

@nithyatsu @AaronCrawfis @willtsai - what's still needed here? I can dig in and help if we're stuck. It's hurting us in other places to maintain the httpRoute code and eShop is the only place it's used (besides generated docs).

@github-actions github-actions bot removed the stale label Mar 10, 2024
@nithyatsu
Copy link
Contributor Author

@rynowak it just needs some priority so that both PM team and I can work on it/ test it to get it merged.
There aren't any tech difficulties (that I know of)

@rynowak
Copy link
Contributor

rynowak commented Mar 12, 2024

If the tests are passing can we merge it? @AaronCrawfis do you have feedback that we need to address?

@AaronCrawfis AaronCrawfis merged commit 90b7f98 into edge Mar 12, 2024
8 checks passed
@AaronCrawfis AaronCrawfis deleted the remoteroutes branch March 12, 2024 16:48
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.

6 participants