spurin / diveintoansible-lab

Dive Into Ansible Lab
850 stars 531 forks source link

Portal has long load times #43

Closed chtsalid closed 3 years ago

chtsalid commented 3 years ago

Hi,

I am getting long load times. Once I load the portal, it takes 1.5 min to complete. Is that normal? What is the reason behind? As a parent OS I am using Ubuntu 20.04.

Thanks!

spurin commented 3 years ago

Hi @chtsalid,

This isn't as expected. When you say load the portal, do you mean accessing http://localhost:1000 ?

Thanks

James

chtsalid commented 3 years ago

Yes, see the screenshot. portal_load

spurin commented 3 years ago

Thanks @chtsalid

In your developer mode view, are you able to see the timings for the requests. I'm wondering if there's an external resource that is lagging. If so, I'll update the image and make it local.

chtsalid commented 3 years ago

Do you mean this? See the screenshot portal_load

spurin commented 3 years ago

Thanks. This helps. It looks like your system is having issues with internet connectivity to fonts.googleapis.com, this is where the bulk of the wait seems to be. Is this a locked down system without internet connectivity?

chtsalid commented 3 years ago

Yes my system is behind a proxy. Can I turn this off from trying to reach fonts.googleapis.com? Thanks!

spurin commented 3 years ago

Unfortunately not, it's part of the page. I think there is only one single request to it. Give me a short while and I'll see if I can bake the request into the image so that there's no internet dependencies. I'll update on this issue when ready for testing.

spurin commented 3 years ago

@chtsalid please edit your docker-compose.yaml file and change the portal section so it's using the diveintoansible-rc:portal image, this is my release-candidate branch -

  portal:
    hostname: portal
    container_name: portal
    image: spurin/diveintoansible-rc:portal

In this image, the fonts should all be local. You'll need to ctrl-c your running lab, then do -

docker-compose pull
docker-compose up

Hopefully this should resolve your issue. Please let me know.

Just to note, there are aspects of the course that depend on Internet connectivity for packages etc, for the centos/ubuntu hosts. You may need to edit your containers to use a proxy if that is applicable.

chtsalid commented 3 years ago

Thanks a lot for your prompt response! It worked!

spurin commented 3 years ago

Awesome,

Thanks @chtsalid - closing this issue for now and this update, will go out with the next update :-) For now, please continue to use this image in your docker-compose.yaml

Hope you enjoy the rest of the course