From 9259b57a403f42ce14d80ff0fad7230f7fb47f54 Mon Sep 17 00:00:00 2001 From: Jonathan Algar <93204286+jonathanalgar@users.noreply.github.com> Date: Fri, 6 Oct 2023 00:24:04 +0100 Subject: [PATCH 01/30] Update Dockerfile & draft doc update --- Dockerfile | 4 ++-- README.md | 17 ++++++++++++++--- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0d2ed48..c7b62f8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ # Dockerfile FROM alpine -COPY outsystemscc /app/ -ENTRYPOINT ["/app/outsystemscc"] +COPY outsystemscc /outsystemscc +ENTRYPOINT ["/outsystemscc"] \ No newline at end of file diff --git a/README.md b/README.md index 0ac0437..53b2fc6 100644 --- a/README.md +++ b/README.md @@ -77,12 +77,12 @@ You can restrict outbound internet connectivity (via a NAT Gateway, for example) If the network requires outbound traffic to route through a proxy, you specify that using the `--proxy` option. -> :information_source: There may be a dedicated person or team at your organization responsible for administering network firewalls. If so, you may want to contact them for help with the process. +> :bulb: There may be a dedicated person or team at your organization responsible for administering network firewalls. If so, you may want to contact them for help with the process. ## 3. Usage [Top ▲](#table-of-contents) -The examples below use the binary command, `outsystemscc`. If you are using Docker, replace the command with `docker run --rm -it ghcr.io/outsystems/outsystemscc:latest`. +The examples below use the binary command, `outsystemscc`. If you are using Docker, replace the command with `docker run --rm -it ghcr.io/outsystems/outsystemscc:latest`. After using `outsystemscc` to connect one or more endpoints, you have a list of connected endpoint(s) of the form `secure-gateway:`. You or a member of your team can use these addresses directly in app development in ODC Studio or in developing external libraries using custom code. @@ -103,6 +103,17 @@ Use the **Token** and **Address** to form the `outsystemscc` command to run. For In this example, you create a tunnel to the endpoint `192.168.0.3:8393`, a REST API service running on IP address `192.168.0.3`. The endpoint is available to consume by apps running in the connected stage at `secure-gateway:8081`. +> :bulb: If you want to run `outsystemscc` on Azure Container Instances, the command to create a new container with the [Azure CLI](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli) for this example would be: +> +> ```bash +> az container create \ +> -g [ResourceGroupName] \ +> --name [ContainerName] \ +> --image ghcr.io/outsystems/outsystemscc \ +> --command-line 'outsystemscc --header "token: N2YwMDIxZTEtNGUzNS1jNzgzLTRkYjAtYjE2YzRkZGVmNjcy" https://customername.outsystems.app/sq_f5696918-3a8c-4da8-8079-ef768d5479fd R:8081:192.168.0.3:8393' +> ``` +> Make sure the Resource Group has outbound access to the internet and network access to the endpoint(s). This may involve configuring your Virtual Network (VNet), Subnets, and Network Security Groups (NSGs) to allow the necessary traffic. You can use tools like Azure Network Watcher to verify connectivity. + You can create a tunnel to connect multiple endpoints to the same Private Gateway. To do this, run multiple instances of `outsystemscc` or pass in multiple remotes (`R:::`) to the same instance. In the latter case, for example: outsystemscc \ @@ -141,7 +152,7 @@ If your organization uses a centralized log management product, see its document Keep remaining options with the default unless your network topology requires you to modify them. -``` +```bash Usage: outsystemscc [options] [remote] [remote] ... is the URL to the server. Use the Address displayed on ODC Portal. From 2319f9620bc7a9e7ccbb936fe21070e6d359d846 Mon Sep 17 00:00:00 2001 From: Jonathan Algar <93204286+jonathanalgar@users.noreply.github.com> Date: Fri, 6 Oct 2023 00:52:58 +0100 Subject: [PATCH 02/30] Make FAQ --- README.md | 116 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 64 insertions(+), 52 deletions(-) diff --git a/README.md b/README.md index 53b2fc6..b0402d1 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,7 @@ OutSystems Cloud Connector 1. [Usage](#usage) * [Logging](#logging) 1. [Detailed options](#detailed-options) +1. [FAQs](#faqs) 1. [License](#license) ## 1. Overview [Top ▲](#table-of-contents) @@ -103,16 +104,7 @@ Use the **Token** and **Address** to form the `outsystemscc` command to run. For In this example, you create a tunnel to the endpoint `192.168.0.3:8393`, a REST API service running on IP address `192.168.0.3`. The endpoint is available to consume by apps running in the connected stage at `secure-gateway:8081`. -> :bulb: If you want to run `outsystemscc` on Azure Container Instances, the command to create a new container with the [Azure CLI](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli) for this example would be: -> -> ```bash -> az container create \ -> -g [ResourceGroupName] \ -> --name [ContainerName] \ -> --image ghcr.io/outsystems/outsystemscc \ -> --command-line 'outsystemscc --header "token: N2YwMDIxZTEtNGUzNS1jNzgzLTRkYjAtYjE2YzRkZGVmNjcy" https://customername.outsystems.app/sq_f5696918-3a8c-4da8-8079-ef768d5479fd R:8081:192.168.0.3:8393' -> ``` -> Make sure the Resource Group has outbound access to the internet and network access to the endpoint(s). This may involve configuring your Virtual Network (VNet), Subnets, and Network Security Groups (NSGs) to allow the necessary traffic. You can use tools like Azure Network Watcher to verify connectivity. +> :bulb: If you want to run `outsystemscc` on Azure Container Instances, [see the FAQs](#how-do-i-run-outsystemscc-on-azure-container-instances). You can create a tunnel to connect multiple endpoints to the same Private Gateway. To do this, run multiple instances of `outsystemscc` or pass in multiple remotes (`R:::`) to the same instance. In the latter case, for example: @@ -152,64 +144,84 @@ If your organization uses a centralized log management product, see its document Keep remaining options with the default unless your network topology requires you to modify them. -```bash - Usage: outsystemscc [options] [remote] [remote] ... + Usage: outsystemscc [options] [remote] [remote] ... - is the URL to the server. Use the Address displayed on ODC Portal. + is the URL to the server. Use the Address displayed on ODC Portal. - s are remote connections tunneled through the server, each of - which come in the form: + s are remote connections tunneled through the server, each of + which come in the form: - R::: + R::: - which does reverse port forwarding, sharing : - from the client to the server's . + which does reverse port forwarding, sharing : + from the client to the server's . - example remotes + example remotes - R:8081:192.168.0.3:8393 - R:8082:192.168.0.4:587 + R:8081:192.168.0.3:8393 + R:8082:192.168.0.4:587 - See https://github.com/OutSystems/cloud-connector for examples in context. - - Options: + See https://github.com/OutSystems/cloud-connector for examples in context. + + Options: - --keepalive, An optional keepalive interval. Since the underlying - transport is HTTP, in many instances we'll be traversing through - proxies, often these proxies will close idle connections. You must - specify a time with a unit, for example '5s' or '2m'. Defaults - to '25s' (set to 0s to disable). + --keepalive, An optional keepalive interval. Since the underlying + transport is HTTP, in many instances we'll be traversing through + proxies, often these proxies will close idle connections. You must + specify a time with a unit, for example '5s' or '2m'. Defaults + to '25s' (set to 0s to disable). - --max-retry-count, Maximum number of times to retry before exiting. - Defaults to unlimited. + --max-retry-count, Maximum number of times to retry before exiting. + Defaults to unlimited. - --max-retry-interval, Maximum wait time before retrying after a - disconnection. Defaults to 5 minutes. + --max-retry-interval, Maximum wait time before retrying after a + disconnection. Defaults to 5 minutes. - --proxy, An optional HTTP CONNECT or SOCKS5 proxy which will be - used to reach the server. Authentication can be specified - inside the URL. - For example, http://admin:password@my-server.com:8081 - or: socks://admin:password@my-server.com:1080 + --proxy, An optional HTTP CONNECT or SOCKS5 proxy which will be + used to reach the server. Authentication can be specified + inside the URL. + For example, http://admin:password@my-server.com:8081 + or: socks://admin:password@my-server.com:1080 - --header, Set a custom header in the form "HeaderName: HeaderContent". - Use the Token displayed on ODC Portal in using token as HeaderName. - - --hostname, Optionally set the 'Host' header (defaults to the host - found in the server url). + --header, Set a custom header in the form "HeaderName: HeaderContent". + Use the Token displayed on ODC Portal in using token as HeaderName. + + --hostname, Optionally set the 'Host' header (defaults to the host + found in the server url). - --pid Generate pid file in current working directory + --pid Generate pid file in current working directory - -v, Enable verbose logging + -v, Enable verbose logging - --help, This help text + --help, This help text - Signals: - The outsystemscc process is listening for: - a SIGUSR2 to print process stats, and - a SIGHUP to short-circuit the client reconnect timer -``` + Signals: + The outsystemscc process is listening for: + a SIGUSR2 to print process stats, and + a SIGHUP to short-circuit the client reconnect timer -## 5. License [Top ▲](#table-of-contents) +## 5. FAQs [Top ▲](#table-of-contents) + +### How do I run `outsystemscc` on Azure Container Instances? + +The command to create a new container with the [Azure CLI](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli) for the [Usage section example](#usage) is: + + az container create \ + -g [ResourceGroupName] \ + --name [ContainerName] \ + --image ghcr.io/outsystems/outsystemscc \ + --command-line 'outsystemscc --header "token: N2YwMDIxZTEtNGUzNS1jNzgzLTRkYjAtYjE2YzRkZGVmNjcy" https://customername.outsystems.app/sq_f5696918-3a8c-4da8-8079-ef768d5479fd R:8081:192.168.0.3:8393' + +#### Network configuration + +* **Outbound Access to Internet:** Ensure that the Azure Resource Group in which you are deploying outsystemscc has outbound access to the Internet. This is crucial for `outsystemscc` to communicate with your ODC organization. You may need to configure your Network Security Groups (NSGs), Azure Firewall, or whichever network security solution you have in place to allow outbound connections. It's advisable to work with your network administrator to verify the outbound connectivity. + +* **Access to Endpoints:** Additionally, ensure that the network configuration allows traffic from the Azure Container Instance to the internal endpoints you wish to connect to. This may involve configuring your Virtual Network (VNet), Subnets, and Network Security Groups (NSGs) to allow the necessary traffic. If there are firewalls or other network devices blocking traffic, you'll need to configure them accordingly. + +* **Testing Connectivity:** It's a good practice to test the network connectivity before deploying `outsystemscc``. You can use tools like [Azure Network Watcher](https://docs.microsoft.com/en-us/azure/network-watcher/network-watcher-monitoring-overview) or even basic network troubleshooting tools like ping and traceroute to verify connectivity. + +* **Monitoring and Logging:** Implement monitoring and logging to get insights into the network traffic and to troubleshoot any connectivity issues. Azure provides various monitoring and logging tools like [Azure Monitor](https://docs.microsoft.com/en-us/azure/azure-monitor/overview) and [Azure Log Analytics](https://docs.microsoft.com/en-us/azure/azure-monitor/log-query/log-analytics-tutorial) which can be invaluable for diagnosing network-related issues. + +## 6. License [Top ▲](#table-of-contents) [MIT](https://github.com/outsystems/cloud-connector/blob/master/LICENSE) © OutSystems From 83f8d1346f00af7ee5bcd3ec5e7e7369e3ee4cc3 Mon Sep 17 00:00:00 2001 From: Jonathan Algar <93204286+jonathanalgar@users.noreply.github.com> Date: Fri, 6 Oct 2023 01:06:39 +0100 Subject: [PATCH 03/30] tweaks --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b0402d1..80b2f46 100644 --- a/README.md +++ b/README.md @@ -104,7 +104,7 @@ Use the **Token** and **Address** to form the `outsystemscc` command to run. For In this example, you create a tunnel to the endpoint `192.168.0.3:8393`, a REST API service running on IP address `192.168.0.3`. The endpoint is available to consume by apps running in the connected stage at `secure-gateway:8081`. -> :bulb: If you want to run `outsystemscc` on Azure Container Instances, [see the FAQs](#how-do-i-run-outsystemscc-on-azure-container-instances). +> :bulb: If you want to run `outsystemscc` on Azure Container Instances, [see the FAQs](#how-do-i-run-outsystemscc-on-azure-container-instances) for guidance. You can create a tunnel to connect multiple endpoints to the same Private Gateway. To do this, run multiple instances of `outsystemscc` or pass in multiple remotes (`R:::`) to the same instance. In the latter case, for example: @@ -214,11 +214,11 @@ The command to create a new container with the [Azure CLI](https://learn.microso #### Network configuration -* **Outbound Access to Internet:** Ensure that the Azure Resource Group in which you are deploying outsystemscc has outbound access to the Internet. This is crucial for `outsystemscc` to communicate with your ODC organization. You may need to configure your Network Security Groups (NSGs), Azure Firewall, or whichever network security solution you have in place to allow outbound connections. It's advisable to work with your network administrator to verify the outbound connectivity. +* **Outbound Access to Internet:** Ensure that the Azure Resource Group in which you are deploying `outsystemscc` has outbound access to the Internet. This is crucial for `outsystemscc` to communicate with your ODC organization. You may need to configure your Network Security Groups (NSGs), Azure Firewall, or whichever network security solution you have in place to allow outbound connections. It's advisable to work with your network administrator to verify the outbound connectivity. * **Access to Endpoints:** Additionally, ensure that the network configuration allows traffic from the Azure Container Instance to the internal endpoints you wish to connect to. This may involve configuring your Virtual Network (VNet), Subnets, and Network Security Groups (NSGs) to allow the necessary traffic. If there are firewalls or other network devices blocking traffic, you'll need to configure them accordingly. -* **Testing Connectivity:** It's a good practice to test the network connectivity before deploying `outsystemscc``. You can use tools like [Azure Network Watcher](https://docs.microsoft.com/en-us/azure/network-watcher/network-watcher-monitoring-overview) or even basic network troubleshooting tools like ping and traceroute to verify connectivity. +* **Testing Connectivity:** It's a good practice to test the network connectivity before deploying `outsystemscc`. You can use tools like [Azure Network Watcher](https://docs.microsoft.com/en-us/azure/network-watcher/network-watcher-monitoring-overview) or even basic network troubleshooting tools like ping and traceroute to verify connectivity. * **Monitoring and Logging:** Implement monitoring and logging to get insights into the network traffic and to troubleshoot any connectivity issues. Azure provides various monitoring and logging tools like [Azure Monitor](https://docs.microsoft.com/en-us/azure/azure-monitor/overview) and [Azure Log Analytics](https://docs.microsoft.com/en-us/azure/azure-monitor/log-query/log-analytics-tutorial) which can be invaluable for diagnosing network-related issues. From 9ff57e9f89372f7af51fd52d9a598330788b87c5 Mon Sep 17 00:00:00 2001 From: Jonathan Algar <93204286+jonathanalgar@users.noreply.github.com> Date: Fri, 6 Oct 2023 01:32:50 +0100 Subject: [PATCH 04/30] add more detail --- README.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 80b2f46..1e49d84 100644 --- a/README.md +++ b/README.md @@ -212,11 +212,20 @@ The command to create a new container with the [Azure CLI](https://learn.microso --image ghcr.io/outsystems/outsystemscc \ --command-line 'outsystemscc --header "token: N2YwMDIxZTEtNGUzNS1jNzgzLTRkYjAtYjE2YzRkZGVmNjcy" https://customername.outsystems.app/sq_f5696918-3a8c-4da8-8079-ef768d5479fd R:8081:192.168.0.3:8393' +The key parameters used in the command: + +* `-g [ResourceGroupName]`: Specifies the name of the resource group where the container instance will be created. +* `--name [ContainerName]`: Specifies the name of the container instance. +* `--image ghcr.io/outsystems/outsystemscc`: Specifies the Docker image to use for the container instance. +* `--command-line '...'`: Specifies the command line to run in the container. This command starts the `outsystemscc` service with the specified header token, server URL, and remote connection details. + +Ensure to replace `[ResourceGroupName]`, `[ContainerName]`, and the values in the `--command-line` parameter with your actual values. + #### Network configuration -* **Outbound Access to Internet:** Ensure that the Azure Resource Group in which you are deploying `outsystemscc` has outbound access to the Internet. This is crucial for `outsystemscc` to communicate with your ODC organization. You may need to configure your Network Security Groups (NSGs), Azure Firewall, or whichever network security solution you have in place to allow outbound connections. It's advisable to work with your network administrator to verify the outbound connectivity. +* **Outbound Access to Internet:** Ensure that the Azure Resource Group in which you are deploying `outsystemscc` has outbound access to the Internet with minimum access restriction as specified in [Firewall setup](#firewall-setup). This is crucial for `outsystemscc` to communicate with your ODC organization. You may need to configure your Network Security Groups (NSGs), Azure Firewall, or whichever network security solution you have in place to allow outbound connections. It's advisable to work with your network administrator to verify the outbound connectivity. -* **Access to Endpoints:** Additionally, ensure that the network configuration allows traffic from the Azure Container Instance to the internal endpoints you wish to connect to. This may involve configuring your Virtual Network (VNet), Subnets, and Network Security Groups (NSGs) to allow the necessary traffic. If there are firewalls or other network devices blocking traffic, you'll need to configure them accordingly. +* **Access to Endpoints:** Additionally, ensure that the network configuration allows traffic from the Azure Container Instance to the internal endpoint(s) you wish to connect to. This may involve configuring your Virtual Network (VNet), Subnets, and Network Security Groups (NSGs) to allow the necessary traffic. If there are firewalls or other network devices blocking traffic, you'll need to configure them accordingly. * **Testing Connectivity:** It's a good practice to test the network connectivity before deploying `outsystemscc`. You can use tools like [Azure Network Watcher](https://docs.microsoft.com/en-us/azure/network-watcher/network-watcher-monitoring-overview) or even basic network troubleshooting tools like ping and traceroute to verify connectivity. From 992a0b827bd72ba5953c0e2225bc9a749159f14f Mon Sep 17 00:00:00 2001 From: Jonathan Algar <93204286+jonathanalgar@users.noreply.github.com> Date: Fri, 6 Oct 2023 08:11:01 +0100 Subject: [PATCH 05/30] revision --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1e49d84..ffc81ba 100644 --- a/README.md +++ b/README.md @@ -223,7 +223,7 @@ Ensure to replace `[ResourceGroupName]`, `[ContainerName]`, and the values in th #### Network configuration -* **Outbound Access to Internet:** Ensure that the Azure Resource Group in which you are deploying `outsystemscc` has outbound access to the Internet with minimum access restriction as specified in [Firewall setup](#firewall-setup). This is crucial for `outsystemscc` to communicate with your ODC organization. You may need to configure your Network Security Groups (NSGs), Azure Firewall, or whichever network security solution you have in place to allow outbound connections. It's advisable to work with your network administrator to verify the outbound connectivity. +* **Outbound Access to Internet:** Ensure that the Azure Resource Group in which you are deploying `outsystemscc` has outbound access to the Internet with no greater restriction than specified in [Firewall setup](#firewall-setup). This is crucial for `outsystemscc` to communicate with your ODC organization. You may need to configure your Network Security Groups (NSGs), Azure Firewall, or whichever network security solution you have in place to allow outbound connections. * **Access to Endpoints:** Additionally, ensure that the network configuration allows traffic from the Azure Container Instance to the internal endpoint(s) you wish to connect to. This may involve configuring your Virtual Network (VNet), Subnets, and Network Security Groups (NSGs) to allow the necessary traffic. If there are firewalls or other network devices blocking traffic, you'll need to configure them accordingly. From 7f0d07d95efc854ab1d2129a6e616e3e24c4b7b1 Mon Sep 17 00:00:00 2001 From: Jonathan Algar <93204286+jonathanalgar@users.noreply.github.com> Date: Mon, 9 Oct 2023 21:19:56 +0100 Subject: [PATCH 06/30] Reverse Dockerfile update --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index c7b62f8..8d1375a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ # Dockerfile FROM alpine -COPY outsystemscc /outsystemscc -ENTRYPOINT ["/outsystemscc"] \ No newline at end of file +COPY outsystemscc /app +ENTRYPOINT ["/app"] \ No newline at end of file From 2993d673730d4a295c3d5fd62b7424f108397705 Mon Sep 17 00:00:00 2001 From: Jonathan Algar <93204286+jonathanalgar@users.noreply.github.com> Date: Mon, 9 Oct 2023 21:28:47 +0100 Subject: [PATCH 07/30] Reverse Dockerfile update --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 8d1375a..20c4eb0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ # Dockerfile FROM alpine COPY outsystemscc /app -ENTRYPOINT ["/app"] \ No newline at end of file +ENTRYPOINT ["/app"] From 2138d30aff24fd49301a744be160855190f4827f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Valentim?= Date: Tue, 17 Oct 2023 16:08:06 +0100 Subject: [PATCH 08/30] Added info on how to run with a command line. --- README.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ffc81ba..e768a53 100644 --- a/README.md +++ b/README.md @@ -66,9 +66,13 @@ You may want to configure the binary to run as a service so it can start on syst ### Docker -Run the Docker image directly from the OutSystems GitHub Container registry: +Run the Docker image directly from the OutSystems GitHub container registry: - docker run --rm -it ghcr.io/outsystems/outsystemscc:latest --help + docker run --rm -it ghcr.io/outsystems/outsystemscc --help + +If you're running the container in a runtime where you need to specify the command line or override the entrypoint (e.g. Azure Container Instances or AWS Fargate): + + docker run --rm -it --entrypoint /app/outsystems ghcr.io/outsystems/outsystemscc --help ### Firewall setup @@ -210,7 +214,7 @@ The command to create a new container with the [Azure CLI](https://learn.microso -g [ResourceGroupName] \ --name [ContainerName] \ --image ghcr.io/outsystems/outsystemscc \ - --command-line 'outsystemscc --header "token: N2YwMDIxZTEtNGUzNS1jNzgzLTRkYjAtYjE2YzRkZGVmNjcy" https://customername.outsystems.app/sq_f5696918-3a8c-4da8-8079-ef768d5479fd R:8081:192.168.0.3:8393' + --command-line '/app/outsystemscc --header "token: N2YwMDIxZTEtNGUzNS1jNzgzLTRkYjAtYjE2YzRkZGVmNjcy" https://customername.outsystems.app/sq_f5696918-3a8c-4da8-8079-ef768d5479fd R:8081:192.168.0.3:8393' The key parameters used in the command: From d7e7ce29f6d8d18dc52f321c61b258ae2cad6307 Mon Sep 17 00:00:00 2001 From: Jonathan Algar <93204286+jonathanalgar@users.noreply.github.com> Date: Fri, 20 Oct 2023 07:35:06 +0100 Subject: [PATCH 09/30] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e768a53..56afd24 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,7 @@ Run the Docker image directly from the OutSystems GitHub container registry: docker run --rm -it ghcr.io/outsystems/outsystemscc --help -If you're running the container in a runtime where you need to specify the command line or override the entrypoint (e.g. Azure Container Instances or AWS Fargate): +If you're running the container on a runtime where you need to specify the command line or override the entrypoint (for example on Azure Container Instances or AWS Fargate): docker run --rm -it --entrypoint /app/outsystems ghcr.io/outsystems/outsystemscc --help From 20d86fbebd2de15df41b54cb4baf32de6c0911b4 Mon Sep 17 00:00:00 2001 From: Jonathan Algar <93204286+jonathanalgar@users.noreply.github.com> Date: Tue, 5 Dec 2023 12:13:12 +0000 Subject: [PATCH 10/30] remove ACI section --- README.md | 36 +----------------------------------- 1 file changed, 1 insertion(+), 35 deletions(-) diff --git a/README.md b/README.md index 56afd24..395ca68 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,6 @@ OutSystems Cloud Connector 1. [Usage](#usage) * [Logging](#logging) 1. [Detailed options](#detailed-options) -1. [FAQs](#faqs) 1. [License](#license) ## 1. Overview [Top ▲](#table-of-contents) @@ -108,8 +107,6 @@ Use the **Token** and **Address** to form the `outsystemscc` command to run. For In this example, you create a tunnel to the endpoint `192.168.0.3:8393`, a REST API service running on IP address `192.168.0.3`. The endpoint is available to consume by apps running in the connected stage at `secure-gateway:8081`. -> :bulb: If you want to run `outsystemscc` on Azure Container Instances, [see the FAQs](#how-do-i-run-outsystemscc-on-azure-container-instances) for guidance. - You can create a tunnel to connect multiple endpoints to the same Private Gateway. To do this, run multiple instances of `outsystemscc` or pass in multiple remotes (`R:::`) to the same instance. In the latter case, for example: outsystemscc \ @@ -204,37 +201,6 @@ If your organization uses a centralized log management product, see its document a SIGUSR2 to print process stats, and a SIGHUP to short-circuit the client reconnect timer -## 5. FAQs [Top ▲](#table-of-contents) - -### How do I run `outsystemscc` on Azure Container Instances? - -The command to create a new container with the [Azure CLI](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli) for the [Usage section example](#usage) is: - - az container create \ - -g [ResourceGroupName] \ - --name [ContainerName] \ - --image ghcr.io/outsystems/outsystemscc \ - --command-line '/app/outsystemscc --header "token: N2YwMDIxZTEtNGUzNS1jNzgzLTRkYjAtYjE2YzRkZGVmNjcy" https://customername.outsystems.app/sq_f5696918-3a8c-4da8-8079-ef768d5479fd R:8081:192.168.0.3:8393' - -The key parameters used in the command: - -* `-g [ResourceGroupName]`: Specifies the name of the resource group where the container instance will be created. -* `--name [ContainerName]`: Specifies the name of the container instance. -* `--image ghcr.io/outsystems/outsystemscc`: Specifies the Docker image to use for the container instance. -* `--command-line '...'`: Specifies the command line to run in the container. This command starts the `outsystemscc` service with the specified header token, server URL, and remote connection details. - -Ensure to replace `[ResourceGroupName]`, `[ContainerName]`, and the values in the `--command-line` parameter with your actual values. - -#### Network configuration - -* **Outbound Access to Internet:** Ensure that the Azure Resource Group in which you are deploying `outsystemscc` has outbound access to the Internet with no greater restriction than specified in [Firewall setup](#firewall-setup). This is crucial for `outsystemscc` to communicate with your ODC organization. You may need to configure your Network Security Groups (NSGs), Azure Firewall, or whichever network security solution you have in place to allow outbound connections. - -* **Access to Endpoints:** Additionally, ensure that the network configuration allows traffic from the Azure Container Instance to the internal endpoint(s) you wish to connect to. This may involve configuring your Virtual Network (VNet), Subnets, and Network Security Groups (NSGs) to allow the necessary traffic. If there are firewalls or other network devices blocking traffic, you'll need to configure them accordingly. - -* **Testing Connectivity:** It's a good practice to test the network connectivity before deploying `outsystemscc`. You can use tools like [Azure Network Watcher](https://docs.microsoft.com/en-us/azure/network-watcher/network-watcher-monitoring-overview) or even basic network troubleshooting tools like ping and traceroute to verify connectivity. - -* **Monitoring and Logging:** Implement monitoring and logging to get insights into the network traffic and to troubleshoot any connectivity issues. Azure provides various monitoring and logging tools like [Azure Monitor](https://docs.microsoft.com/en-us/azure/azure-monitor/overview) and [Azure Log Analytics](https://docs.microsoft.com/en-us/azure/azure-monitor/log-query/log-analytics-tutorial) which can be invaluable for diagnosing network-related issues. - -## 6. License [Top ▲](#table-of-contents) +## 5. License [Top ▲](#table-of-contents) [MIT](https://github.com/outsystems/cloud-connector/blob/master/LICENSE) © OutSystems From b47f1b027ad4815ec555b99ecf7414c9852c2c2a Mon Sep 17 00:00:00 2001 From: "Bruno Martins (bjm)" Date: Wed, 29 Nov 2023 14:28:17 +0000 Subject: [PATCH 11/30] fix documentation in entry point --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 395ca68..ede6f8f 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ Run the Docker image directly from the OutSystems GitHub container registry: If you're running the container on a runtime where you need to specify the command line or override the entrypoint (for example on Azure Container Instances or AWS Fargate): - docker run --rm -it --entrypoint /app/outsystems ghcr.io/outsystems/outsystemscc --help + docker run --rm -it --entrypoint /app/outsystemscc ghcr.io/outsystems/outsystemscc --help ### Firewall setup From aab19b1fc76a36009abac63da5945eedc6a33f20 Mon Sep 17 00:00:00 2001 From: Jonathan Algar <93204286+jonathanalgar@users.noreply.github.com> Date: Tue, 5 Dec 2023 14:07:10 +0000 Subject: [PATCH 12/30] Add ACI guidance back to seperate FAQ.md --- FAQ.md | 42 ++++++++++++++++++++++++++++++++++++++++++ README.md | 4 +++- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 FAQ.md diff --git a/FAQ.md b/FAQ.md new file mode 100644 index 0000000..c40f48f --- /dev/null +++ b/FAQ.md @@ -0,0 +1,42 @@ +

+ + +OutSystems Cloud Connector +

+ +![MIT][s0] + +[s0]: https://img.shields.io/badge/license-MIT-blue.svg + +## FAQs + +### How do I run `outsystemscc` on Azure Container Instances? + +The command to create a new container with the [Azure CLI](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli) for the [Usage section example](README.md#usage) is: + + az container create \ + -g [ResourceGroupName] \ + --name [ContainerName] \ + --image ghcr.io/outsystems/outsystemscc \ + --command-line '/app/outsystemscc --header "token: N2YwMDIxZTEtNGUzNS1jNzgzLTRkYjAtYjE2YzRkZGVmNjcy" https://customername.outsystems.app/sq_f5696918-3a8c-4da8-8079-ef768d5479fd R:8081:192.168.0.3:8393' + +The key parameters used in the command: + +* `-g [ResourceGroupName]`: Specifies the name of the resource group where the container instance will be created. +* `--name [ContainerName]`: Specifies the name of the container instance. +* `--image ghcr.io/outsystems/outsystemscc`: Specifies the Docker image to use for the container instance. +* `--command-line '...'`: Specifies the command line to run in the container. This command starts the `outsystemscc` service with the specified header token, server URL, and remote connection details. + +Ensure to replace `[ResourceGroupName]`, `[ContainerName]`, and the values in the `--command-line` parameter with your actual values. + +#### Network configuration + +* **Outbound Access to Internet:** Ensure that the Azure Resource Group in which you are deploying `outsystemscc` has outbound access to the Internet with no greater restriction than specified in [Firewall setup](#firewall-setup). This is crucial for `outsystemscc` to communicate with your ODC organization. You may need to configure your Network Security Groups (NSGs), Azure Firewall, or whichever network security solution you have in place to allow outbound connections. + +* **Access to Endpoints:** Additionally, ensure that the network configuration allows traffic from the Azure Container Instance to the internal endpoint(s) you wish to connect to. This may involve configuring your Virtual Network (VNet), Subnets, and Network Security Groups (NSGs) to allow the necessary traffic. If there are firewalls or other network devices blocking traffic, you'll need to configure them accordingly. + +* **Testing Connectivity:** It's a good practice to test the network connectivity before deploying `outsystemscc`. You can use tools like [Azure Network Watcher](https://docs.microsoft.com/en-us/azure/network-watcher/network-watcher-monitoring-overview) or even basic network troubleshooting tools like ping and traceroute to verify connectivity. + +* **Monitoring and Logging:** Implement monitoring and logging to get insights into the network traffic and to troubleshoot any connectivity issues. Azure provides various monitoring and logging tools like [Azure Monitor](https://docs.microsoft.com/en-us/azure/azure-monitor/overview) and [Azure Log Analytics](https://docs.microsoft.com/en-us/azure/azure-monitor/log-query/log-analytics-tutorial) which can be invaluable for diagnosing network-related issues. + +### **[⏎ Back to README](./README.md)** \ No newline at end of file diff --git a/README.md b/README.md index ede6f8f..58962b7 100644 --- a/README.md +++ b/README.md @@ -107,6 +107,8 @@ Use the **Token** and **Address** to form the `outsystemscc` command to run. For In this example, you create a tunnel to the endpoint `192.168.0.3:8393`, a REST API service running on IP address `192.168.0.3`. The endpoint is available to consume by apps running in the connected stage at `secure-gateway:8081`. +> :bulb: If you want to run `outsystemscc` on Azure Container Instances, [see the FAQs](FAQ.md#how-do-i-run-outsystemscc-on-azure-container-instances) for specific guidance. + You can create a tunnel to connect multiple endpoints to the same Private Gateway. To do this, run multiple instances of `outsystemscc` or pass in multiple remotes (`R:::`) to the same instance. In the latter case, for example: outsystemscc \ @@ -203,4 +205,4 @@ If your organization uses a centralized log management product, see its document ## 5. License [Top ▲](#table-of-contents) -[MIT](https://github.com/outsystems/cloud-connector/blob/master/LICENSE) © OutSystems +[MIT](https://github.com/outsystems/cloud-connector/blob/master/LICENSE) © OutSystems \ No newline at end of file From 743f94f1d9f05ba77e38b5df2309047535c7f48f Mon Sep 17 00:00:00 2001 From: Jonathan Algar <93204286+jonathanalgar@users.noreply.github.com> Date: Tue, 5 Dec 2023 15:03:59 +0000 Subject: [PATCH 13/30] fix format --- FAQ.md | 2 +- README.md | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/FAQ.md b/FAQ.md index c40f48f..687ded7 100644 --- a/FAQ.md +++ b/FAQ.md @@ -18,7 +18,7 @@ The command to create a new container with the [Azure CLI](https://learn.microso -g [ResourceGroupName] \ --name [ContainerName] \ --image ghcr.io/outsystems/outsystemscc \ - --command-line '/app/outsystemscc --header "token: N2YwMDIxZTEtNGUzNS1jNzgzLTRkYjAtYjE2YzRkZGVmNjcy" https://customername.outsystems.app/sq_f5696918-3a8c-4da8-8079-ef768d5479fd R:8081:192.168.0.3:8393' + --command-line '/app/outsystemscc --header "token: N2YwMDIxZTEtNGUzNS1jNzgzLTRkYjAtYjE2YzRkZGVmNjcy" https://organization.outsystems.app/sg_f5696918-3a8c-4da8-8079-ef768d5479fd R:8081:192.168.0.3:8393' The key parameters used in the command: diff --git a/README.md b/README.md index 58962b7..d48b21c 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Using the OutSystems Cloud Connector (`outsystemscc`) you can connect the apps r You run `outsystemscc` on a system in your private network—an on-premise network, a private cloud, or the public cloud—to establish a secure tunnel between your endpoints and the Private Gateway. Your apps can then access the endpoints through the Private Gateway, the server component you activate for each stage of your ODC organization [using the ODC Portal](https://www.outsystems.com/goto/secure-gateways). Common use cases include accessing data through a private REST API service and making requests to internal services (SMTP, SMB, NFS,..) -`outsystemscc` creates a fast TCP/UDP tunnel, with transport over HTTP via WebSockets, secured via SSH using ECDSA with SHA256 keys. The connection is established to either the built-in domain for the stage (for example `.outsystems.app`) or a custom domain configured for the stage (for example `example.com`). In both cases, the connection is over TLS and always encrypted with a valid X.509 certificate. +`outsystemscc` creates a fast TCP/UDP tunnel, with transport over HTTP via WebSockets, secured via SSH using ECDSA with SHA256 keys. The connection is established to either the built-in domain for the stage (for example `.outsystems.app`) or a custom domain configured for the stage (for example `example.com`). In both cases, the connection is over TLS and always encrypted with a valid X.509 certificate. The following diagram is an example of a ODC customer setup for a Private Gateway active on two stages. @@ -77,7 +77,7 @@ If you're running the container on a runtime where you need to specify the comma `outsystemscc` requires only outbound access to the internet in the private network(s) in which it's running. -You can restrict outbound internet connectivity (via a NAT Gateway, for example) by a firewall. For a Layer 7 firewall, you should allow outbound connections to the built-in domain (for example `.outsystems.app`) and any custom domains configured for the stage (for example `example.com`). For a Layer 4 firewall, you must open firewall rules to all [CloudFront IP ranges](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/LocationsOfEdgeServers.html) for port 443. +You can restrict outbound internet connectivity (via a NAT Gateway, for example) by a firewall. For a Layer 7 firewall, you should allow outbound connections to the built-in domain (for example `.outsystems.app`) and any custom domains configured for the stage (for example `example.com`). For a Layer 4 firewall, you must open firewall rules to all [CloudFront IP ranges](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/LocationsOfEdgeServers.html) for port 443. If the network requires outbound traffic to route through a proxy, you specify that using the `--proxy` option. @@ -102,7 +102,7 @@ Use the **Token** and **Address** to form the `outsystemscc` command to run. For outsystemscc \ --header "token: N2YwMDIxZTEtNGUzNS1jNzgzLTRkYjAtYjE2YzRkZGVmNjcy" \ - https://customername.outsystems.app/sq_f5696918-3a8c-4da8-8079-ef768d5479fd \ + https://organization.outsystems.app/sg_6c23a5b4-b718-4634-a503-f22aed17d4e7 \ R:8081:192.168.0.3:8393 In this example, you create a tunnel to the endpoint `192.168.0.3:8393`, a REST API service running on IP address `192.168.0.3`. The endpoint is available to consume by apps running in the connected stage at `secure-gateway:8081`. @@ -113,7 +113,7 @@ You can create a tunnel to connect multiple endpoints to the same Private Gatewa outsystemscc \ --header "token: N2YwMDIxZTEtNGUzNS1jNzgzLTRkYjAtYjE2YzRkZGVmNjcy" \ - https://customername.outsystems.app/sq_f5696918-3a8c-4da8-8079-ef768d5479fd \ + https://organization.outsystems.app/sg_6c23a5b4-b718-4634-a503-f22aed17d4e7 \ R:8081:192.168.0.3:8393 R:8082:192.168.0.4:587 In the above example you create a tunnel to connect two endpoints. One, as before, `192.168.0.3:8393`, a REST API service running on IP address `192.168.0.3`. The endpoint is available for use by apps running in the connected stage at `secure-gateway:8081`. Second, `192.168.0.4:587`, an SMTP server running on `192.168.0.4`, another IP in the internal address range. The endpoint is available for use by apps running in the connected stage at `secure-gateway:8082`. @@ -129,14 +129,14 @@ You can also use the connected endpoint(s) in custom code development using the By default, `outsystemscc` logs timestamped information about the connection status and latency to stdout. For example: - 2022/11/10 12:14:42 client: Connecting to ws://customername.outsystems.app/sq_f5696918-3a8c-4da8-8079-ef768d5479fd:80 + 2022/11/10 12:14:42 client: Connecting to ws://organization.outsystems.app/sg_6c23a5b4-b718-4634-a503-f22aed17d4e7:80 2022/11/10 12:14:42 client: Connected (Latency 733.439µs) You can redirect this output to a file for retention purposes. For example: outsystemscc \ --header "token: N2YwMDIxZTEtNGUzNS1jNzgzLTRkYjAtYjE2YzRkZGVmNjcy" \ - https://customername.outsystems.app/sq_f5696918-3a8c-4da8-8079-ef768d5479fd \ + https://organization.outsystems.app/sg_6c23a5b4-b718-4634-a503-f22aed17d4e7 \ R:8081:10.0.0.1:8393 \ >> outsystemscc_log From d2df891e368a057cdc49c1eac24f042bd2498898 Mon Sep 17 00:00:00 2001 From: Jonathan Algar <93204286+jonathanalgar@users.noreply.github.com> Date: Fri, 6 Oct 2023 00:24:04 +0100 Subject: [PATCH 14/30] Update Dockerfile & draft doc update --- Dockerfile | 4 ++-- README.md | 17 ++++++++++++++--- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0d2ed48..c7b62f8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ # Dockerfile FROM alpine -COPY outsystemscc /app/ -ENTRYPOINT ["/app/outsystemscc"] +COPY outsystemscc /outsystemscc +ENTRYPOINT ["/outsystemscc"] \ No newline at end of file diff --git a/README.md b/README.md index 0ac0437..53b2fc6 100644 --- a/README.md +++ b/README.md @@ -77,12 +77,12 @@ You can restrict outbound internet connectivity (via a NAT Gateway, for example) If the network requires outbound traffic to route through a proxy, you specify that using the `--proxy` option. -> :information_source: There may be a dedicated person or team at your organization responsible for administering network firewalls. If so, you may want to contact them for help with the process. +> :bulb: There may be a dedicated person or team at your organization responsible for administering network firewalls. If so, you may want to contact them for help with the process. ## 3. Usage [Top ▲](#table-of-contents) -The examples below use the binary command, `outsystemscc`. If you are using Docker, replace the command with `docker run --rm -it ghcr.io/outsystems/outsystemscc:latest`. +The examples below use the binary command, `outsystemscc`. If you are using Docker, replace the command with `docker run --rm -it ghcr.io/outsystems/outsystemscc:latest`. After using `outsystemscc` to connect one or more endpoints, you have a list of connected endpoint(s) of the form `secure-gateway:`. You or a member of your team can use these addresses directly in app development in ODC Studio or in developing external libraries using custom code. @@ -103,6 +103,17 @@ Use the **Token** and **Address** to form the `outsystemscc` command to run. For In this example, you create a tunnel to the endpoint `192.168.0.3:8393`, a REST API service running on IP address `192.168.0.3`. The endpoint is available to consume by apps running in the connected stage at `secure-gateway:8081`. +> :bulb: If you want to run `outsystemscc` on Azure Container Instances, the command to create a new container with the [Azure CLI](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli) for this example would be: +> +> ```bash +> az container create \ +> -g [ResourceGroupName] \ +> --name [ContainerName] \ +> --image ghcr.io/outsystems/outsystemscc \ +> --command-line 'outsystemscc --header "token: N2YwMDIxZTEtNGUzNS1jNzgzLTRkYjAtYjE2YzRkZGVmNjcy" https://customername.outsystems.app/sq_f5696918-3a8c-4da8-8079-ef768d5479fd R:8081:192.168.0.3:8393' +> ``` +> Make sure the Resource Group has outbound access to the internet and network access to the endpoint(s). This may involve configuring your Virtual Network (VNet), Subnets, and Network Security Groups (NSGs) to allow the necessary traffic. You can use tools like Azure Network Watcher to verify connectivity. + You can create a tunnel to connect multiple endpoints to the same Private Gateway. To do this, run multiple instances of `outsystemscc` or pass in multiple remotes (`R:::`) to the same instance. In the latter case, for example: outsystemscc \ @@ -141,7 +152,7 @@ If your organization uses a centralized log management product, see its document Keep remaining options with the default unless your network topology requires you to modify them. -``` +```bash Usage: outsystemscc [options] [remote] [remote] ... is the URL to the server. Use the Address displayed on ODC Portal. From af4f69012666c58b627ce24bff9e7fd767f8a5ac Mon Sep 17 00:00:00 2001 From: Jonathan Algar <93204286+jonathanalgar@users.noreply.github.com> Date: Fri, 6 Oct 2023 00:52:58 +0100 Subject: [PATCH 15/30] Make FAQ --- README.md | 116 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 64 insertions(+), 52 deletions(-) diff --git a/README.md b/README.md index 53b2fc6..b0402d1 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,7 @@ OutSystems Cloud Connector 1. [Usage](#usage) * [Logging](#logging) 1. [Detailed options](#detailed-options) +1. [FAQs](#faqs) 1. [License](#license) ## 1. Overview [Top ▲](#table-of-contents) @@ -103,16 +104,7 @@ Use the **Token** and **Address** to form the `outsystemscc` command to run. For In this example, you create a tunnel to the endpoint `192.168.0.3:8393`, a REST API service running on IP address `192.168.0.3`. The endpoint is available to consume by apps running in the connected stage at `secure-gateway:8081`. -> :bulb: If you want to run `outsystemscc` on Azure Container Instances, the command to create a new container with the [Azure CLI](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli) for this example would be: -> -> ```bash -> az container create \ -> -g [ResourceGroupName] \ -> --name [ContainerName] \ -> --image ghcr.io/outsystems/outsystemscc \ -> --command-line 'outsystemscc --header "token: N2YwMDIxZTEtNGUzNS1jNzgzLTRkYjAtYjE2YzRkZGVmNjcy" https://customername.outsystems.app/sq_f5696918-3a8c-4da8-8079-ef768d5479fd R:8081:192.168.0.3:8393' -> ``` -> Make sure the Resource Group has outbound access to the internet and network access to the endpoint(s). This may involve configuring your Virtual Network (VNet), Subnets, and Network Security Groups (NSGs) to allow the necessary traffic. You can use tools like Azure Network Watcher to verify connectivity. +> :bulb: If you want to run `outsystemscc` on Azure Container Instances, [see the FAQs](#how-do-i-run-outsystemscc-on-azure-container-instances). You can create a tunnel to connect multiple endpoints to the same Private Gateway. To do this, run multiple instances of `outsystemscc` or pass in multiple remotes (`R:::`) to the same instance. In the latter case, for example: @@ -152,64 +144,84 @@ If your organization uses a centralized log management product, see its document Keep remaining options with the default unless your network topology requires you to modify them. -```bash - Usage: outsystemscc [options] [remote] [remote] ... + Usage: outsystemscc [options] [remote] [remote] ... - is the URL to the server. Use the Address displayed on ODC Portal. + is the URL to the server. Use the Address displayed on ODC Portal. - s are remote connections tunneled through the server, each of - which come in the form: + s are remote connections tunneled through the server, each of + which come in the form: - R::: + R::: - which does reverse port forwarding, sharing : - from the client to the server's . + which does reverse port forwarding, sharing : + from the client to the server's . - example remotes + example remotes - R:8081:192.168.0.3:8393 - R:8082:192.168.0.4:587 + R:8081:192.168.0.3:8393 + R:8082:192.168.0.4:587 - See https://github.com/OutSystems/cloud-connector for examples in context. - - Options: + See https://github.com/OutSystems/cloud-connector for examples in context. + + Options: - --keepalive, An optional keepalive interval. Since the underlying - transport is HTTP, in many instances we'll be traversing through - proxies, often these proxies will close idle connections. You must - specify a time with a unit, for example '5s' or '2m'. Defaults - to '25s' (set to 0s to disable). + --keepalive, An optional keepalive interval. Since the underlying + transport is HTTP, in many instances we'll be traversing through + proxies, often these proxies will close idle connections. You must + specify a time with a unit, for example '5s' or '2m'. Defaults + to '25s' (set to 0s to disable). - --max-retry-count, Maximum number of times to retry before exiting. - Defaults to unlimited. + --max-retry-count, Maximum number of times to retry before exiting. + Defaults to unlimited. - --max-retry-interval, Maximum wait time before retrying after a - disconnection. Defaults to 5 minutes. + --max-retry-interval, Maximum wait time before retrying after a + disconnection. Defaults to 5 minutes. - --proxy, An optional HTTP CONNECT or SOCKS5 proxy which will be - used to reach the server. Authentication can be specified - inside the URL. - For example, http://admin:password@my-server.com:8081 - or: socks://admin:password@my-server.com:1080 + --proxy, An optional HTTP CONNECT or SOCKS5 proxy which will be + used to reach the server. Authentication can be specified + inside the URL. + For example, http://admin:password@my-server.com:8081 + or: socks://admin:password@my-server.com:1080 - --header, Set a custom header in the form "HeaderName: HeaderContent". - Use the Token displayed on ODC Portal in using token as HeaderName. - - --hostname, Optionally set the 'Host' header (defaults to the host - found in the server url). + --header, Set a custom header in the form "HeaderName: HeaderContent". + Use the Token displayed on ODC Portal in using token as HeaderName. + + --hostname, Optionally set the 'Host' header (defaults to the host + found in the server url). - --pid Generate pid file in current working directory + --pid Generate pid file in current working directory - -v, Enable verbose logging + -v, Enable verbose logging - --help, This help text + --help, This help text - Signals: - The outsystemscc process is listening for: - a SIGUSR2 to print process stats, and - a SIGHUP to short-circuit the client reconnect timer -``` + Signals: + The outsystemscc process is listening for: + a SIGUSR2 to print process stats, and + a SIGHUP to short-circuit the client reconnect timer -## 5. License [Top ▲](#table-of-contents) +## 5. FAQs [Top ▲](#table-of-contents) + +### How do I run `outsystemscc` on Azure Container Instances? + +The command to create a new container with the [Azure CLI](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli) for the [Usage section example](#usage) is: + + az container create \ + -g [ResourceGroupName] \ + --name [ContainerName] \ + --image ghcr.io/outsystems/outsystemscc \ + --command-line 'outsystemscc --header "token: N2YwMDIxZTEtNGUzNS1jNzgzLTRkYjAtYjE2YzRkZGVmNjcy" https://customername.outsystems.app/sq_f5696918-3a8c-4da8-8079-ef768d5479fd R:8081:192.168.0.3:8393' + +#### Network configuration + +* **Outbound Access to Internet:** Ensure that the Azure Resource Group in which you are deploying outsystemscc has outbound access to the Internet. This is crucial for `outsystemscc` to communicate with your ODC organization. You may need to configure your Network Security Groups (NSGs), Azure Firewall, or whichever network security solution you have in place to allow outbound connections. It's advisable to work with your network administrator to verify the outbound connectivity. + +* **Access to Endpoints:** Additionally, ensure that the network configuration allows traffic from the Azure Container Instance to the internal endpoints you wish to connect to. This may involve configuring your Virtual Network (VNet), Subnets, and Network Security Groups (NSGs) to allow the necessary traffic. If there are firewalls or other network devices blocking traffic, you'll need to configure them accordingly. + +* **Testing Connectivity:** It's a good practice to test the network connectivity before deploying `outsystemscc``. You can use tools like [Azure Network Watcher](https://docs.microsoft.com/en-us/azure/network-watcher/network-watcher-monitoring-overview) or even basic network troubleshooting tools like ping and traceroute to verify connectivity. + +* **Monitoring and Logging:** Implement monitoring and logging to get insights into the network traffic and to troubleshoot any connectivity issues. Azure provides various monitoring and logging tools like [Azure Monitor](https://docs.microsoft.com/en-us/azure/azure-monitor/overview) and [Azure Log Analytics](https://docs.microsoft.com/en-us/azure/azure-monitor/log-query/log-analytics-tutorial) which can be invaluable for diagnosing network-related issues. + +## 6. License [Top ▲](#table-of-contents) [MIT](https://github.com/outsystems/cloud-connector/blob/master/LICENSE) © OutSystems From bf36764749d159fc7f9e95fea2e4141d81b792a5 Mon Sep 17 00:00:00 2001 From: Jonathan Algar <93204286+jonathanalgar@users.noreply.github.com> Date: Fri, 6 Oct 2023 01:06:39 +0100 Subject: [PATCH 16/30] tweaks --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b0402d1..80b2f46 100644 --- a/README.md +++ b/README.md @@ -104,7 +104,7 @@ Use the **Token** and **Address** to form the `outsystemscc` command to run. For In this example, you create a tunnel to the endpoint `192.168.0.3:8393`, a REST API service running on IP address `192.168.0.3`. The endpoint is available to consume by apps running in the connected stage at `secure-gateway:8081`. -> :bulb: If you want to run `outsystemscc` on Azure Container Instances, [see the FAQs](#how-do-i-run-outsystemscc-on-azure-container-instances). +> :bulb: If you want to run `outsystemscc` on Azure Container Instances, [see the FAQs](#how-do-i-run-outsystemscc-on-azure-container-instances) for guidance. You can create a tunnel to connect multiple endpoints to the same Private Gateway. To do this, run multiple instances of `outsystemscc` or pass in multiple remotes (`R:::`) to the same instance. In the latter case, for example: @@ -214,11 +214,11 @@ The command to create a new container with the [Azure CLI](https://learn.microso #### Network configuration -* **Outbound Access to Internet:** Ensure that the Azure Resource Group in which you are deploying outsystemscc has outbound access to the Internet. This is crucial for `outsystemscc` to communicate with your ODC organization. You may need to configure your Network Security Groups (NSGs), Azure Firewall, or whichever network security solution you have in place to allow outbound connections. It's advisable to work with your network administrator to verify the outbound connectivity. +* **Outbound Access to Internet:** Ensure that the Azure Resource Group in which you are deploying `outsystemscc` has outbound access to the Internet. This is crucial for `outsystemscc` to communicate with your ODC organization. You may need to configure your Network Security Groups (NSGs), Azure Firewall, or whichever network security solution you have in place to allow outbound connections. It's advisable to work with your network administrator to verify the outbound connectivity. * **Access to Endpoints:** Additionally, ensure that the network configuration allows traffic from the Azure Container Instance to the internal endpoints you wish to connect to. This may involve configuring your Virtual Network (VNet), Subnets, and Network Security Groups (NSGs) to allow the necessary traffic. If there are firewalls or other network devices blocking traffic, you'll need to configure them accordingly. -* **Testing Connectivity:** It's a good practice to test the network connectivity before deploying `outsystemscc``. You can use tools like [Azure Network Watcher](https://docs.microsoft.com/en-us/azure/network-watcher/network-watcher-monitoring-overview) or even basic network troubleshooting tools like ping and traceroute to verify connectivity. +* **Testing Connectivity:** It's a good practice to test the network connectivity before deploying `outsystemscc`. You can use tools like [Azure Network Watcher](https://docs.microsoft.com/en-us/azure/network-watcher/network-watcher-monitoring-overview) or even basic network troubleshooting tools like ping and traceroute to verify connectivity. * **Monitoring and Logging:** Implement monitoring and logging to get insights into the network traffic and to troubleshoot any connectivity issues. Azure provides various monitoring and logging tools like [Azure Monitor](https://docs.microsoft.com/en-us/azure/azure-monitor/overview) and [Azure Log Analytics](https://docs.microsoft.com/en-us/azure/azure-monitor/log-query/log-analytics-tutorial) which can be invaluable for diagnosing network-related issues. From f384fa7a6ad44bc4caefe1f6c250dbc66eddbb14 Mon Sep 17 00:00:00 2001 From: Jonathan Algar <93204286+jonathanalgar@users.noreply.github.com> Date: Fri, 6 Oct 2023 01:32:50 +0100 Subject: [PATCH 17/30] add more detail --- README.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 80b2f46..1e49d84 100644 --- a/README.md +++ b/README.md @@ -212,11 +212,20 @@ The command to create a new container with the [Azure CLI](https://learn.microso --image ghcr.io/outsystems/outsystemscc \ --command-line 'outsystemscc --header "token: N2YwMDIxZTEtNGUzNS1jNzgzLTRkYjAtYjE2YzRkZGVmNjcy" https://customername.outsystems.app/sq_f5696918-3a8c-4da8-8079-ef768d5479fd R:8081:192.168.0.3:8393' +The key parameters used in the command: + +* `-g [ResourceGroupName]`: Specifies the name of the resource group where the container instance will be created. +* `--name [ContainerName]`: Specifies the name of the container instance. +* `--image ghcr.io/outsystems/outsystemscc`: Specifies the Docker image to use for the container instance. +* `--command-line '...'`: Specifies the command line to run in the container. This command starts the `outsystemscc` service with the specified header token, server URL, and remote connection details. + +Ensure to replace `[ResourceGroupName]`, `[ContainerName]`, and the values in the `--command-line` parameter with your actual values. + #### Network configuration -* **Outbound Access to Internet:** Ensure that the Azure Resource Group in which you are deploying `outsystemscc` has outbound access to the Internet. This is crucial for `outsystemscc` to communicate with your ODC organization. You may need to configure your Network Security Groups (NSGs), Azure Firewall, or whichever network security solution you have in place to allow outbound connections. It's advisable to work with your network administrator to verify the outbound connectivity. +* **Outbound Access to Internet:** Ensure that the Azure Resource Group in which you are deploying `outsystemscc` has outbound access to the Internet with minimum access restriction as specified in [Firewall setup](#firewall-setup). This is crucial for `outsystemscc` to communicate with your ODC organization. You may need to configure your Network Security Groups (NSGs), Azure Firewall, or whichever network security solution you have in place to allow outbound connections. It's advisable to work with your network administrator to verify the outbound connectivity. -* **Access to Endpoints:** Additionally, ensure that the network configuration allows traffic from the Azure Container Instance to the internal endpoints you wish to connect to. This may involve configuring your Virtual Network (VNet), Subnets, and Network Security Groups (NSGs) to allow the necessary traffic. If there are firewalls or other network devices blocking traffic, you'll need to configure them accordingly. +* **Access to Endpoints:** Additionally, ensure that the network configuration allows traffic from the Azure Container Instance to the internal endpoint(s) you wish to connect to. This may involve configuring your Virtual Network (VNet), Subnets, and Network Security Groups (NSGs) to allow the necessary traffic. If there are firewalls or other network devices blocking traffic, you'll need to configure them accordingly. * **Testing Connectivity:** It's a good practice to test the network connectivity before deploying `outsystemscc`. You can use tools like [Azure Network Watcher](https://docs.microsoft.com/en-us/azure/network-watcher/network-watcher-monitoring-overview) or even basic network troubleshooting tools like ping and traceroute to verify connectivity. From d35ea7ffda3bf868f36b38773736841584067f38 Mon Sep 17 00:00:00 2001 From: Jonathan Algar <93204286+jonathanalgar@users.noreply.github.com> Date: Fri, 6 Oct 2023 08:11:01 +0100 Subject: [PATCH 18/30] revision --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1e49d84..ffc81ba 100644 --- a/README.md +++ b/README.md @@ -223,7 +223,7 @@ Ensure to replace `[ResourceGroupName]`, `[ContainerName]`, and the values in th #### Network configuration -* **Outbound Access to Internet:** Ensure that the Azure Resource Group in which you are deploying `outsystemscc` has outbound access to the Internet with minimum access restriction as specified in [Firewall setup](#firewall-setup). This is crucial for `outsystemscc` to communicate with your ODC organization. You may need to configure your Network Security Groups (NSGs), Azure Firewall, or whichever network security solution you have in place to allow outbound connections. It's advisable to work with your network administrator to verify the outbound connectivity. +* **Outbound Access to Internet:** Ensure that the Azure Resource Group in which you are deploying `outsystemscc` has outbound access to the Internet with no greater restriction than specified in [Firewall setup](#firewall-setup). This is crucial for `outsystemscc` to communicate with your ODC organization. You may need to configure your Network Security Groups (NSGs), Azure Firewall, or whichever network security solution you have in place to allow outbound connections. * **Access to Endpoints:** Additionally, ensure that the network configuration allows traffic from the Azure Container Instance to the internal endpoint(s) you wish to connect to. This may involve configuring your Virtual Network (VNet), Subnets, and Network Security Groups (NSGs) to allow the necessary traffic. If there are firewalls or other network devices blocking traffic, you'll need to configure them accordingly. From e9b59a0abe112b21756695a423aa8fdfe0d999b5 Mon Sep 17 00:00:00 2001 From: Jonathan Algar <93204286+jonathanalgar@users.noreply.github.com> Date: Mon, 9 Oct 2023 21:19:56 +0100 Subject: [PATCH 19/30] Reverse Dockerfile update --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index c7b62f8..8d1375a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ # Dockerfile FROM alpine -COPY outsystemscc /outsystemscc -ENTRYPOINT ["/outsystemscc"] \ No newline at end of file +COPY outsystemscc /app +ENTRYPOINT ["/app"] \ No newline at end of file From 760cad1c9492fc545b7c36f1c5a6bccade5cfbad Mon Sep 17 00:00:00 2001 From: Jonathan Algar <93204286+jonathanalgar@users.noreply.github.com> Date: Mon, 9 Oct 2023 21:28:47 +0100 Subject: [PATCH 20/30] Reverse Dockerfile update --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 8d1375a..20c4eb0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ # Dockerfile FROM alpine COPY outsystemscc /app -ENTRYPOINT ["/app"] \ No newline at end of file +ENTRYPOINT ["/app"] From 9d07d0621b7fb8df14e1af72280e33f8f71979f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Valentim?= Date: Tue, 17 Oct 2023 16:08:06 +0100 Subject: [PATCH 21/30] Added info on how to run with a command line. --- README.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ffc81ba..e768a53 100644 --- a/README.md +++ b/README.md @@ -66,9 +66,13 @@ You may want to configure the binary to run as a service so it can start on syst ### Docker -Run the Docker image directly from the OutSystems GitHub Container registry: +Run the Docker image directly from the OutSystems GitHub container registry: - docker run --rm -it ghcr.io/outsystems/outsystemscc:latest --help + docker run --rm -it ghcr.io/outsystems/outsystemscc --help + +If you're running the container in a runtime where you need to specify the command line or override the entrypoint (e.g. Azure Container Instances or AWS Fargate): + + docker run --rm -it --entrypoint /app/outsystems ghcr.io/outsystems/outsystemscc --help ### Firewall setup @@ -210,7 +214,7 @@ The command to create a new container with the [Azure CLI](https://learn.microso -g [ResourceGroupName] \ --name [ContainerName] \ --image ghcr.io/outsystems/outsystemscc \ - --command-line 'outsystemscc --header "token: N2YwMDIxZTEtNGUzNS1jNzgzLTRkYjAtYjE2YzRkZGVmNjcy" https://customername.outsystems.app/sq_f5696918-3a8c-4da8-8079-ef768d5479fd R:8081:192.168.0.3:8393' + --command-line '/app/outsystemscc --header "token: N2YwMDIxZTEtNGUzNS1jNzgzLTRkYjAtYjE2YzRkZGVmNjcy" https://customername.outsystems.app/sq_f5696918-3a8c-4da8-8079-ef768d5479fd R:8081:192.168.0.3:8393' The key parameters used in the command: From 3a5f28573d722faa634a925c89b5ba6f6a4ded5f Mon Sep 17 00:00:00 2001 From: Jonathan Algar <93204286+jonathanalgar@users.noreply.github.com> Date: Fri, 20 Oct 2023 07:35:06 +0100 Subject: [PATCH 22/30] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e768a53..56afd24 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,7 @@ Run the Docker image directly from the OutSystems GitHub container registry: docker run --rm -it ghcr.io/outsystems/outsystemscc --help -If you're running the container in a runtime where you need to specify the command line or override the entrypoint (e.g. Azure Container Instances or AWS Fargate): +If you're running the container on a runtime where you need to specify the command line or override the entrypoint (for example on Azure Container Instances or AWS Fargate): docker run --rm -it --entrypoint /app/outsystems ghcr.io/outsystems/outsystemscc --help From a84565187ab145de018da018aaaefb977e194da0 Mon Sep 17 00:00:00 2001 From: Jonathan Algar <93204286+jonathanalgar@users.noreply.github.com> Date: Tue, 5 Dec 2023 12:13:12 +0000 Subject: [PATCH 23/30] remove ACI section --- README.md | 36 +----------------------------------- 1 file changed, 1 insertion(+), 35 deletions(-) diff --git a/README.md b/README.md index 56afd24..395ca68 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,6 @@ OutSystems Cloud Connector 1. [Usage](#usage) * [Logging](#logging) 1. [Detailed options](#detailed-options) -1. [FAQs](#faqs) 1. [License](#license) ## 1. Overview [Top ▲](#table-of-contents) @@ -108,8 +107,6 @@ Use the **Token** and **Address** to form the `outsystemscc` command to run. For In this example, you create a tunnel to the endpoint `192.168.0.3:8393`, a REST API service running on IP address `192.168.0.3`. The endpoint is available to consume by apps running in the connected stage at `secure-gateway:8081`. -> :bulb: If you want to run `outsystemscc` on Azure Container Instances, [see the FAQs](#how-do-i-run-outsystemscc-on-azure-container-instances) for guidance. - You can create a tunnel to connect multiple endpoints to the same Private Gateway. To do this, run multiple instances of `outsystemscc` or pass in multiple remotes (`R:::`) to the same instance. In the latter case, for example: outsystemscc \ @@ -204,37 +201,6 @@ If your organization uses a centralized log management product, see its document a SIGUSR2 to print process stats, and a SIGHUP to short-circuit the client reconnect timer -## 5. FAQs [Top ▲](#table-of-contents) - -### How do I run `outsystemscc` on Azure Container Instances? - -The command to create a new container with the [Azure CLI](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli) for the [Usage section example](#usage) is: - - az container create \ - -g [ResourceGroupName] \ - --name [ContainerName] \ - --image ghcr.io/outsystems/outsystemscc \ - --command-line '/app/outsystemscc --header "token: N2YwMDIxZTEtNGUzNS1jNzgzLTRkYjAtYjE2YzRkZGVmNjcy" https://customername.outsystems.app/sq_f5696918-3a8c-4da8-8079-ef768d5479fd R:8081:192.168.0.3:8393' - -The key parameters used in the command: - -* `-g [ResourceGroupName]`: Specifies the name of the resource group where the container instance will be created. -* `--name [ContainerName]`: Specifies the name of the container instance. -* `--image ghcr.io/outsystems/outsystemscc`: Specifies the Docker image to use for the container instance. -* `--command-line '...'`: Specifies the command line to run in the container. This command starts the `outsystemscc` service with the specified header token, server URL, and remote connection details. - -Ensure to replace `[ResourceGroupName]`, `[ContainerName]`, and the values in the `--command-line` parameter with your actual values. - -#### Network configuration - -* **Outbound Access to Internet:** Ensure that the Azure Resource Group in which you are deploying `outsystemscc` has outbound access to the Internet with no greater restriction than specified in [Firewall setup](#firewall-setup). This is crucial for `outsystemscc` to communicate with your ODC organization. You may need to configure your Network Security Groups (NSGs), Azure Firewall, or whichever network security solution you have in place to allow outbound connections. - -* **Access to Endpoints:** Additionally, ensure that the network configuration allows traffic from the Azure Container Instance to the internal endpoint(s) you wish to connect to. This may involve configuring your Virtual Network (VNet), Subnets, and Network Security Groups (NSGs) to allow the necessary traffic. If there are firewalls or other network devices blocking traffic, you'll need to configure them accordingly. - -* **Testing Connectivity:** It's a good practice to test the network connectivity before deploying `outsystemscc`. You can use tools like [Azure Network Watcher](https://docs.microsoft.com/en-us/azure/network-watcher/network-watcher-monitoring-overview) or even basic network troubleshooting tools like ping and traceroute to verify connectivity. - -* **Monitoring and Logging:** Implement monitoring and logging to get insights into the network traffic and to troubleshoot any connectivity issues. Azure provides various monitoring and logging tools like [Azure Monitor](https://docs.microsoft.com/en-us/azure/azure-monitor/overview) and [Azure Log Analytics](https://docs.microsoft.com/en-us/azure/azure-monitor/log-query/log-analytics-tutorial) which can be invaluable for diagnosing network-related issues. - -## 6. License [Top ▲](#table-of-contents) +## 5. License [Top ▲](#table-of-contents) [MIT](https://github.com/outsystems/cloud-connector/blob/master/LICENSE) © OutSystems From 82ad02dfb35f9363aca9f2af6a652e4c56a1c615 Mon Sep 17 00:00:00 2001 From: "Bruno Martins (bjm)" Date: Wed, 29 Nov 2023 14:28:17 +0000 Subject: [PATCH 24/30] fix documentation in entry point --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 395ca68..ede6f8f 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ Run the Docker image directly from the OutSystems GitHub container registry: If you're running the container on a runtime where you need to specify the command line or override the entrypoint (for example on Azure Container Instances or AWS Fargate): - docker run --rm -it --entrypoint /app/outsystems ghcr.io/outsystems/outsystemscc --help + docker run --rm -it --entrypoint /app/outsystemscc ghcr.io/outsystems/outsystemscc --help ### Firewall setup From b425954e66a2946fb99281d0f79c3eebc48c9a3c Mon Sep 17 00:00:00 2001 From: Jonathan Algar <93204286+jonathanalgar@users.noreply.github.com> Date: Tue, 5 Dec 2023 14:07:10 +0000 Subject: [PATCH 25/30] Add ACI guidance back to seperate FAQ.md --- FAQ.md | 42 ++++++++++++++++++++++++++++++++++++++++++ README.md | 4 +++- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 FAQ.md diff --git a/FAQ.md b/FAQ.md new file mode 100644 index 0000000..c40f48f --- /dev/null +++ b/FAQ.md @@ -0,0 +1,42 @@ +

+ + +OutSystems Cloud Connector +

+ +![MIT][s0] + +[s0]: https://img.shields.io/badge/license-MIT-blue.svg + +## FAQs + +### How do I run `outsystemscc` on Azure Container Instances? + +The command to create a new container with the [Azure CLI](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli) for the [Usage section example](README.md#usage) is: + + az container create \ + -g [ResourceGroupName] \ + --name [ContainerName] \ + --image ghcr.io/outsystems/outsystemscc \ + --command-line '/app/outsystemscc --header "token: N2YwMDIxZTEtNGUzNS1jNzgzLTRkYjAtYjE2YzRkZGVmNjcy" https://customername.outsystems.app/sq_f5696918-3a8c-4da8-8079-ef768d5479fd R:8081:192.168.0.3:8393' + +The key parameters used in the command: + +* `-g [ResourceGroupName]`: Specifies the name of the resource group where the container instance will be created. +* `--name [ContainerName]`: Specifies the name of the container instance. +* `--image ghcr.io/outsystems/outsystemscc`: Specifies the Docker image to use for the container instance. +* `--command-line '...'`: Specifies the command line to run in the container. This command starts the `outsystemscc` service with the specified header token, server URL, and remote connection details. + +Ensure to replace `[ResourceGroupName]`, `[ContainerName]`, and the values in the `--command-line` parameter with your actual values. + +#### Network configuration + +* **Outbound Access to Internet:** Ensure that the Azure Resource Group in which you are deploying `outsystemscc` has outbound access to the Internet with no greater restriction than specified in [Firewall setup](#firewall-setup). This is crucial for `outsystemscc` to communicate with your ODC organization. You may need to configure your Network Security Groups (NSGs), Azure Firewall, or whichever network security solution you have in place to allow outbound connections. + +* **Access to Endpoints:** Additionally, ensure that the network configuration allows traffic from the Azure Container Instance to the internal endpoint(s) you wish to connect to. This may involve configuring your Virtual Network (VNet), Subnets, and Network Security Groups (NSGs) to allow the necessary traffic. If there are firewalls or other network devices blocking traffic, you'll need to configure them accordingly. + +* **Testing Connectivity:** It's a good practice to test the network connectivity before deploying `outsystemscc`. You can use tools like [Azure Network Watcher](https://docs.microsoft.com/en-us/azure/network-watcher/network-watcher-monitoring-overview) or even basic network troubleshooting tools like ping and traceroute to verify connectivity. + +* **Monitoring and Logging:** Implement monitoring and logging to get insights into the network traffic and to troubleshoot any connectivity issues. Azure provides various monitoring and logging tools like [Azure Monitor](https://docs.microsoft.com/en-us/azure/azure-monitor/overview) and [Azure Log Analytics](https://docs.microsoft.com/en-us/azure/azure-monitor/log-query/log-analytics-tutorial) which can be invaluable for diagnosing network-related issues. + +### **[⏎ Back to README](./README.md)** \ No newline at end of file diff --git a/README.md b/README.md index ede6f8f..58962b7 100644 --- a/README.md +++ b/README.md @@ -107,6 +107,8 @@ Use the **Token** and **Address** to form the `outsystemscc` command to run. For In this example, you create a tunnel to the endpoint `192.168.0.3:8393`, a REST API service running on IP address `192.168.0.3`. The endpoint is available to consume by apps running in the connected stage at `secure-gateway:8081`. +> :bulb: If you want to run `outsystemscc` on Azure Container Instances, [see the FAQs](FAQ.md#how-do-i-run-outsystemscc-on-azure-container-instances) for specific guidance. + You can create a tunnel to connect multiple endpoints to the same Private Gateway. To do this, run multiple instances of `outsystemscc` or pass in multiple remotes (`R:::`) to the same instance. In the latter case, for example: outsystemscc \ @@ -203,4 +205,4 @@ If your organization uses a centralized log management product, see its document ## 5. License [Top ▲](#table-of-contents) -[MIT](https://github.com/outsystems/cloud-connector/blob/master/LICENSE) © OutSystems +[MIT](https://github.com/outsystems/cloud-connector/blob/master/LICENSE) © OutSystems \ No newline at end of file From c5521d33acc6444aa98bdf6a487938ff599865a1 Mon Sep 17 00:00:00 2001 From: Jonathan Algar <93204286+jonathanalgar@users.noreply.github.com> Date: Tue, 5 Dec 2023 15:03:59 +0000 Subject: [PATCH 26/30] fix format --- FAQ.md | 2 +- README.md | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/FAQ.md b/FAQ.md index c40f48f..687ded7 100644 --- a/FAQ.md +++ b/FAQ.md @@ -18,7 +18,7 @@ The command to create a new container with the [Azure CLI](https://learn.microso -g [ResourceGroupName] \ --name [ContainerName] \ --image ghcr.io/outsystems/outsystemscc \ - --command-line '/app/outsystemscc --header "token: N2YwMDIxZTEtNGUzNS1jNzgzLTRkYjAtYjE2YzRkZGVmNjcy" https://customername.outsystems.app/sq_f5696918-3a8c-4da8-8079-ef768d5479fd R:8081:192.168.0.3:8393' + --command-line '/app/outsystemscc --header "token: N2YwMDIxZTEtNGUzNS1jNzgzLTRkYjAtYjE2YzRkZGVmNjcy" https://organization.outsystems.app/sg_f5696918-3a8c-4da8-8079-ef768d5479fd R:8081:192.168.0.3:8393' The key parameters used in the command: diff --git a/README.md b/README.md index 58962b7..d48b21c 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Using the OutSystems Cloud Connector (`outsystemscc`) you can connect the apps r You run `outsystemscc` on a system in your private network—an on-premise network, a private cloud, or the public cloud—to establish a secure tunnel between your endpoints and the Private Gateway. Your apps can then access the endpoints through the Private Gateway, the server component you activate for each stage of your ODC organization [using the ODC Portal](https://www.outsystems.com/goto/secure-gateways). Common use cases include accessing data through a private REST API service and making requests to internal services (SMTP, SMB, NFS,..) -`outsystemscc` creates a fast TCP/UDP tunnel, with transport over HTTP via WebSockets, secured via SSH using ECDSA with SHA256 keys. The connection is established to either the built-in domain for the stage (for example `.outsystems.app`) or a custom domain configured for the stage (for example `example.com`). In both cases, the connection is over TLS and always encrypted with a valid X.509 certificate. +`outsystemscc` creates a fast TCP/UDP tunnel, with transport over HTTP via WebSockets, secured via SSH using ECDSA with SHA256 keys. The connection is established to either the built-in domain for the stage (for example `.outsystems.app`) or a custom domain configured for the stage (for example `example.com`). In both cases, the connection is over TLS and always encrypted with a valid X.509 certificate. The following diagram is an example of a ODC customer setup for a Private Gateway active on two stages. @@ -77,7 +77,7 @@ If you're running the container on a runtime where you need to specify the comma `outsystemscc` requires only outbound access to the internet in the private network(s) in which it's running. -You can restrict outbound internet connectivity (via a NAT Gateway, for example) by a firewall. For a Layer 7 firewall, you should allow outbound connections to the built-in domain (for example `.outsystems.app`) and any custom domains configured for the stage (for example `example.com`). For a Layer 4 firewall, you must open firewall rules to all [CloudFront IP ranges](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/LocationsOfEdgeServers.html) for port 443. +You can restrict outbound internet connectivity (via a NAT Gateway, for example) by a firewall. For a Layer 7 firewall, you should allow outbound connections to the built-in domain (for example `.outsystems.app`) and any custom domains configured for the stage (for example `example.com`). For a Layer 4 firewall, you must open firewall rules to all [CloudFront IP ranges](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/LocationsOfEdgeServers.html) for port 443. If the network requires outbound traffic to route through a proxy, you specify that using the `--proxy` option. @@ -102,7 +102,7 @@ Use the **Token** and **Address** to form the `outsystemscc` command to run. For outsystemscc \ --header "token: N2YwMDIxZTEtNGUzNS1jNzgzLTRkYjAtYjE2YzRkZGVmNjcy" \ - https://customername.outsystems.app/sq_f5696918-3a8c-4da8-8079-ef768d5479fd \ + https://organization.outsystems.app/sg_6c23a5b4-b718-4634-a503-f22aed17d4e7 \ R:8081:192.168.0.3:8393 In this example, you create a tunnel to the endpoint `192.168.0.3:8393`, a REST API service running on IP address `192.168.0.3`. The endpoint is available to consume by apps running in the connected stage at `secure-gateway:8081`. @@ -113,7 +113,7 @@ You can create a tunnel to connect multiple endpoints to the same Private Gatewa outsystemscc \ --header "token: N2YwMDIxZTEtNGUzNS1jNzgzLTRkYjAtYjE2YzRkZGVmNjcy" \ - https://customername.outsystems.app/sq_f5696918-3a8c-4da8-8079-ef768d5479fd \ + https://organization.outsystems.app/sg_6c23a5b4-b718-4634-a503-f22aed17d4e7 \ R:8081:192.168.0.3:8393 R:8082:192.168.0.4:587 In the above example you create a tunnel to connect two endpoints. One, as before, `192.168.0.3:8393`, a REST API service running on IP address `192.168.0.3`. The endpoint is available for use by apps running in the connected stage at `secure-gateway:8081`. Second, `192.168.0.4:587`, an SMTP server running on `192.168.0.4`, another IP in the internal address range. The endpoint is available for use by apps running in the connected stage at `secure-gateway:8082`. @@ -129,14 +129,14 @@ You can also use the connected endpoint(s) in custom code development using the By default, `outsystemscc` logs timestamped information about the connection status and latency to stdout. For example: - 2022/11/10 12:14:42 client: Connecting to ws://customername.outsystems.app/sq_f5696918-3a8c-4da8-8079-ef768d5479fd:80 + 2022/11/10 12:14:42 client: Connecting to ws://organization.outsystems.app/sg_6c23a5b4-b718-4634-a503-f22aed17d4e7:80 2022/11/10 12:14:42 client: Connected (Latency 733.439µs) You can redirect this output to a file for retention purposes. For example: outsystemscc \ --header "token: N2YwMDIxZTEtNGUzNS1jNzgzLTRkYjAtYjE2YzRkZGVmNjcy" \ - https://customername.outsystems.app/sq_f5696918-3a8c-4da8-8079-ef768d5479fd \ + https://organization.outsystems.app/sg_6c23a5b4-b718-4634-a503-f22aed17d4e7 \ R:8081:10.0.0.1:8393 \ >> outsystemscc_log From 3421a9f195be45d4225bfca1374e3c7120700163 Mon Sep 17 00:00:00 2001 From: Jonathan Algar <93204286+jonathanalgar@users.noreply.github.com> Date: Tue, 5 Dec 2023 15:54:20 +0000 Subject: [PATCH 27/30] fix Dockerfile --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 20c4eb0..c7b62f8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ # Dockerfile FROM alpine -COPY outsystemscc /app -ENTRYPOINT ["/app"] +COPY outsystemscc /outsystemscc +ENTRYPOINT ["/outsystemscc"] \ No newline at end of file From 97a370f1fca18f221a6b16174e24a6d45ce54850 Mon Sep 17 00:00:00 2001 From: Jonathan Algar <93204286+jonathanalgar@users.noreply.github.com> Date: Tue, 5 Dec 2023 15:55:14 +0000 Subject: [PATCH 28/30] Fix Dockerfile --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index c7b62f8..207b53b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ # Dockerfile FROM alpine -COPY outsystemscc /outsystemscc -ENTRYPOINT ["/outsystemscc"] \ No newline at end of file +COPY outsystemscc /app/ +ENTRYPOINT ["/app/outsystemscc"] \ No newline at end of file From 1021c47f8b3d08ce02667548888d6288959f51fc Mon Sep 17 00:00:00 2001 From: Jonathan Algar <93204286+jonathanalgar@users.noreply.github.com> Date: Tue, 5 Dec 2023 15:58:05 +0000 Subject: [PATCH 29/30] Add whitespace so no diff --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 207b53b..b21ae06 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ # Dockerfile FROM alpine COPY outsystemscc /app/ -ENTRYPOINT ["/app/outsystemscc"] \ No newline at end of file +ENTRYPOINT ["/app/outsystemscc"] \ No newline at end of file From 4939eb84f6b44c86bf3a0303f549110c5ba5cbd0 Mon Sep 17 00:00:00 2001 From: Jonathan Algar <93204286+jonathanalgar@users.noreply.github.com> Date: Tue, 5 Dec 2023 15:58:31 +0000 Subject: [PATCH 30/30] fix Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index b21ae06..207b53b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ # Dockerfile FROM alpine COPY outsystemscc /app/ -ENTRYPOINT ["/app/outsystemscc"] \ No newline at end of file +ENTRYPOINT ["/app/outsystemscc"] \ No newline at end of file