Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Test the application through the publicly available endpoint

Now that you have deployed each of the microservices, you will test them out to see if they were deployed correctly. In case they are not working as expected, inspect the logs to figure out what might be missing. You can follow the below guidance to do so.

You will need to look for the properties.configuration.ingress.fqdn property.

Step by step guidance

  1. You configured both the api-gateway and the admin-server with an external ingress. You can go to the portal and check application url for api_gateway and admin_server container app.

    api_gateway_FQDN=$(az containerapp show \
      --resource-group $RESOURCE_GROUP \
      --name api-gateway \
      --query properties.configuration.ingress.fqdn \
       -o tsv)
    
    admin_server_FQDN=$(az containerapp show \
      --resource-group $RESOURCE_GROUP \
      --name admin-server \
      --query properties.configuration.ingress.fqdn \
       -o tsv)
    
    echo $api_gateway_FQDN
    echo $admin_server_FQDN
    
  2. Use a browser window to connect to admin_server_FQDN. This will show you info about each of your applications.

    adminserver_applications

  3. Select Wallboard and next one of your microservices. The Admin server will show you internal info of your services.

    adminserver_wallboard

  4. Use a browser window to connect to api-gateway. It should show you information on the pets and visits coming from your database.

    petclinic_app

    You now have the Spring Petclinic application running properly on Azure Container Apps.

  5. In case you are not seeing any data in your application, you can troubleshoot this issue by interactively connecting to your MySQL Flexible Server and querying your databases and tables.

    az mysql flexible-server connect -n $MYSQL_SERVER_NAME -u myadmin -p $MYSQL_ADMIN_PASSWORD --interactive
    show databases;
    use petclinic;
    show tables;
    select * from owners;
    

    For the MySQL Flexible Server connection to work, you will need to have your local IP address added to the MySQL Flexible Server firewall.