From b174d0ccd2c5abdcda875468d1127caa5826036a Mon Sep 17 00:00:00 2001 From: Praveen Kumar Date: Fri, 18 Oct 2024 16:21:58 +0530 Subject: [PATCH] Doc: Add instruction to access service from host to crc instance fixes: #4398 --- .../getting_started/pages/networking.adoc | 2 ++ .../partials/proc_connecting-to-host.adoc | 35 +++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 docs/modules/getting_started/partials/proc_connecting-to-host.adoc diff --git a/docs/modules/getting_started/pages/networking.adoc b/docs/modules/getting_started/pages/networking.adoc index cd9aebbdb0..d92f1ea09a 100644 --- a/docs/modules/getting_started/pages/networking.adoc +++ b/docs/modules/getting_started/pages/networking.adoc @@ -9,6 +9,8 @@ include::partial$ref_reserved-ip-subnets.adoc[leveloffset=+1] include::partial$proc_starting-behind-proxy.adoc[leveloffset=+1] +include::partial$proc_connecting-to-host.adoc[leveloffset=+1] + include::partial$proc_setting-up-remote-server.adoc[leveloffset=+1] include::partial$proc_connecting-to-remote-instance.adoc[leveloffset=+1] diff --git a/docs/modules/getting_started/partials/proc_connecting-to-host.adoc b/docs/modules/getting_started/partials/proc_connecting-to-host.adoc new file mode 100644 index 0000000000..feed0d759d --- /dev/null +++ b/docs/modules/getting_started/partials/proc_connecting-to-host.adoc @@ -0,0 +1,35 @@ += Accessing services running on your host from {prod} + +When you run services on your host, you can configure {prod} to access these services. + +.Prerequisites +* You have a service which is running on your host and want to consume it with {prod}. +* You are using the user mode network. On {mac} and {msw} this is the default behavior. + + +.Procedure +. Enable accessing services from host to {prod}: ++ +---- +$ crc config set host-network-access true +---- + +. Verify that the {prod} configuration uses user network mode and enables host network access: ++ +---- +$ crc config view +[...] +- network-mode : user +- host-network-access : true +[...] +---- + +. If {prod} instance is already running then restart it (stop => start), otherwise just start it. ++ +---- +$ crc stop && crc start +---- + +.Verification +Assuming your service is running on the host on port `8080`, to access +it from the {prod} instance, use `host.crc.testing:8080`.