Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEV: Add proxy section #315

Merged
merged 1 commit into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion DEV.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
<!-- omit from toc -->
# ACAP application developer topics

This page is a collection of common topics related to ACAP application
development.

<!-- omit from toc -->
## Table of contents

- [Access the device](#access-the-device)
- [Developer Mode](#developer-mode)
- [Logs and reports](#logs-and-reports)
- [Access the system log](#access-the-system-log)
- [Access the application log](#access-the-application-log)
- [Access the server report](#access-the-server-report)
- [Proxy](#proxy)

## Access the device

To log in to an Axis device shell to perform command-line options, **SSH** is
Expand Down Expand Up @@ -66,10 +78,21 @@ The system report can be accessed,
curl --anyauth -u <username>:<password> http://<AXIS_DEVICE_IP>/axis-cgi/serverreport.cgi
```

## Proxy

To develop or run ACAP applications from inside a network with proxy, additional
configuration is needed. More information about proxy and instructions on
how to configure are available in the ACAP documentation [Proxy][proxy] page, or
specifically in the [Proxy in build time][proxy-in-build-time] and
[Proxy in runtime][proxy-in-runtime] sections.

<!-- Links to external references -->
<!-- markdownlint-disable MD034 -->
[access-device-through-ssh]: https://axiscommunications.github.io/acap-documentation/docs/get-started/set-up-developer-environment/set-up-device-advanced.html#access-the-device-through-ssh
[developer-mode]: https://axiscommunications.github.io/acap-documentation/docs/get-started/set-up-developer-environment/set-up-device-advanced.html#developer-mode
[server-report-cgi]: https://www.axis.com/vapix-library/subjects/t10175981/section/t10036044/display?section=t10036044-t10003915
[system-log-cgi]: https://www.axis.com/vapix-library/subjects/t10175981/section/t10036044/display?section=t10036044-t10003913
<!-- markdownlint-enable MD034 -->
[proxy]: https://axiscommunications.github.io/acap-documentation/docs/develop/proxy
[proxy-in-build-time]: https://axiscommunications.github.io/acap-documentation/docs/develop/proxy#proxy-in-build-time
[proxy-in-runtime]: https://axiscommunications.github.io/acap-documentation/docs/develop/proxy#proxy-in-runtim
<!-- markdownlint-enable MD034 -->
9 changes: 4 additions & 5 deletions axevent/send_event/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,11 @@ Below is the step by step instructions on how to execute the program. So basical

Standing in your working directory run the following commands:

> **Note**
> [!NOTE]
>
> Depending on the network you are connected to, you may need to add proxy settings.
> The file that needs these settings is: `~/.docker/config.json`. For reference please see
> https://docs.docker.com/network/proxy and a
> [script for Axis devices](https://axiscommunications.github.io/acap-documentation/docs/develop/build-install-run.html#configure-network-proxy-settings) in the ACAP documentation.
> Depending on the network your local build machine is connected to, you may need to add proxy
> settings for Docker. See
> [Proxy in build time](https://axiscommunications.github.io/acap-documentation/docs/develop/proxy#proxy-in-build-time).

```sh
docker build --tag <APP_IMAGE> .
Expand Down
9 changes: 4 additions & 5 deletions axevent/subscribe_to_event/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,11 @@ Below is the step by step instructions on how to execute the program. So basical

Standing in your working directory run the following commands:

> **Note**
> [!NOTE]
>
> Depending on the network you are connected to, you may need to add proxy settings.
> The file that needs these settings is: `~/.docker/config.json`. For reference please see
> https://docs.docker.com/network/proxy and a
> [script for Axis devices](https://axiscommunications.github.io/acap-documentation/docs/develop/build-install-run.html#configure-network-proxy-settings) in the ACAP documentation.
> Depending on the network your local build machine is connected to, you may need to add proxy
> settings for Docker. See
> [Proxy in build time](https://axiscommunications.github.io/acap-documentation/docs/develop/proxy#proxy-in-build-time).

```sh
docker build --tag <APP_IMAGE> .
Expand Down
9 changes: 4 additions & 5 deletions axevent/subscribe_to_events/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,11 @@ Below is the step by step instructions on how to execute the program. So basical

Standing in your working directory run the following commands:

> **Note**
> [!NOTE]
>
> Depending on the network you are connected to, you may need to add proxy settings.
> The file that needs these settings is: `~/.docker/config.json`. For reference please see
> https://docs.docker.com/network/proxy and a
> [script for Axis devices](https://axiscommunications.github.io/acap-documentation/docs/develop/build-install-run.html#configure-network-proxy-settings) in the ACAP documentation.
> Depending on the network your local build machine is connected to, you may need to add proxy
> settings for Docker. See
> [Proxy in build time](https://axiscommunications.github.io/acap-documentation/docs/develop/proxy#proxy-in-build-time).

```sh
docker build --tag <APP_IMAGE> .
Expand Down
9 changes: 4 additions & 5 deletions axoverlay/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,11 @@ Below is the step by step instructions on how to execute the program. So basical

Standing in your working directory run the following commands:

> **Note**
> [!NOTE]
>
> Depending on the network you are connected to, you may need to add proxy settings.
> The file that needs these settings is: `~/.docker/config.json`. For reference please see
> https://docs.docker.com/network/proxy and a
> [script for Axis devices](https://axiscommunications.github.io/acap-documentation/docs/develop/build-install-run.html#configure-network-proxy-settings) in the ACAP documentation.
> Depending on the network your local build machine is connected to, you may need to add proxy
> settings for Docker. See
> [Proxy in build time](https://axiscommunications.github.io/acap-documentation/docs/develop/proxy#proxy-in-build-time).

```sh
docker build --tag <APP_IMAGE> --build-arg ARCH=<ARCH> .
Expand Down
8 changes: 3 additions & 5 deletions axparameter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,9 @@ Standing in your working directory run the following commands:

> [!NOTE]
>
> Depending on the network you are connected to, you may need to add proxy settings.
> The file that needs these settings is: `~/.docker/config.json`. For reference please see
> https://docs.docker.com/network/proxy and a
> [script for Axis devices](https://axiscommunications.github.io/acap-documentation/docs/develop/build-install-run.html#configure-network-proxy-settings)
> in the ACAP documentation.
> Depending on the network your local build machine is connected to, you may need to add proxy
> settings for Docker. See
> [Proxy in build time](https://axiscommunications.github.io/acap-documentation/docs/develop/proxy#proxy-in-build-time).

```sh
docker build --tag <APP_IMAGE> --build-arg ARCH=<ARCH> .
Expand Down
7 changes: 3 additions & 4 deletions axserialport/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,9 @@ Standing in your working directory run the following commands:

> [!NOTE]
>
> Depending on the network you are connected to, you may need to add proxy settings.
> The file that needs these settings is: `~/.docker/config.json`. For reference please see
> https://docs.docker.com/network/proxy and a
> [script for Axis devices](https://axiscommunications.github.io/acap-documentation/docs/develop/build-install-run.html#configure-network-proxy-settings) in the ACAP documentation.
> Depending on the network your local build machine is connected to, you may need to add proxy
> settings for Docker. See
> [Proxy in build time](https://axiscommunications.github.io/acap-documentation/docs/develop/proxy#proxy-in-build-time).

```sh
docker build --tag <APP_IMAGE> .
Expand Down
7 changes: 3 additions & 4 deletions axstorage/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,9 @@ Standing in your working directory run the following commands:

> [!NOTE]
>
> Depending on the network you are connected to, you may need to add proxy settings.
> The file that needs these settings is: `~/.docker/config.json`. For reference please see
> https://docs.docker.com/network/proxy and a
> [script for Axis devices](https://axiscommunications.github.io/acap-documentation/docs/develop/build-install-run.html#configure-network-proxy-settings) in the ACAP documentation.
> Depending on the network your local build machine is connected to, you may need to add proxy
> settings for Docker. See
> [Proxy in build time](https://axiscommunications.github.io/acap-documentation/docs/develop/proxy#proxy-in-build-time).

```sh
docker build --tag <APP_IMAGE> .
Expand Down
8 changes: 3 additions & 5 deletions bounding-box/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,9 @@ Standing in your working directory run the following commands:

> [!NOTE]
>
> Depending on the network you are connected to, you may need to add proxy settings.
> The file that needs these settings is: `~/.docker/config.json`. For reference please see
> https://docs.docker.com/network/proxy and a
> [script for Axis devices](https://axiscommunications.github.io/acap-documentation/docs/develop/build-install-run.html#configure-network-proxy-settings)
> in the ACAP documentation.
> Depending on the network your local build machine is connected to, you may need to add proxy
> settings for Docker. See
> [Proxy in build time](https://axiscommunications.github.io/acap-documentation/docs/develop/proxy#proxy-in-build-time).

```sh
docker build --tag <APP_IMAGE> --build-arg ARCH=<ARCH> .
Expand Down
7 changes: 3 additions & 4 deletions container-example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,9 @@ Standing in your working directory run the following commands:

> [!NOTE]
>
> Depending on the network you are connected to, you may need to add proxy settings.
> The file that needs these settings is: `~/.docker/config.json`. For reference please see
> https://docs.docker.com/network/proxy and a
> [script for Axis devices](https://axiscommunications.github.io/acap-documentation/docs/develop/build-install-run.html#configure-network-proxy-settings) in the ACAP documentation.
> Depending on the network your local build machine is connected to, you may need to add proxy
> settings for Docker. See
> [Proxy in build time](https://axiscommunications.github.io/acap-documentation/docs/develop/proxy#proxy-in-build-time).

Pull the [Alpine linux container image][alpine] and save it to a .tar file.

Expand Down
16 changes: 5 additions & 11 deletions curl-openssl/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,9 @@ Standing in your working directory run the following commands:

> [!NOTE]
>
> Depending on the network you are connected to, you may need to add proxy settings.
> The file that needs these settings is: `~/.docker/config.json`. For reference please see
> https://docs.docker.com/network/proxy and a
> [script for Axis devices](https://axiscommunications.github.io/acap-documentation/docs/develop/build-install-run.html#configure-network-proxy-settings) in the ACAP documentation.
> Depending on the network your local build machine is connected to, you may need to add proxy
> settings for Docker. See
> [Proxy in build time](https://axiscommunications.github.io/acap-documentation/docs/develop/proxy#proxy-in-build-time).

```sh
docker build --tag <APP_IMAGE> --build-arg ARCH=<ARCH> .
Expand All @@ -75,13 +74,8 @@ docker build --build-arg APP_DEBUG=yes --tag <APP_IMAGE> --build-arg ARCH=<ARCH>
```

If the device is inside a network with a proxy, the global device proxy must be
set to allow curl to pick it up at runtime. Set up global device proxy via either:

- The VAPIX
[Network Settings API](https://developer.axis.com/vapix/network-video/network-settings-api#setglobalproxyconfiguration-1).
- Browse to the network page at
`http://<AXIS_DEVICE_IP>/index.html#system/network` and section
`Global proxies`.
set to allow curl to pick it up at runtime. For reference see
[Configure global device proxy](https://axiscommunications.github.io/acap-documentation/docs/develop/global-device-proxy.md#configure-global-device-proxy).

Copy the result from the container image to a local directory `build`:

Expand Down
9 changes: 4 additions & 5 deletions hello-world/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,11 @@ Below is the step by step instructions on how to execute the program. So basical

Standing in your working directory run the following commands:

> **Note**
> [!NOTE]
>
> Depending on the network you are connected to, you may need to add proxy settings.
> The file that needs these settings is: `~/.docker/config.json`. For reference please see
> https://docs.docker.com/network/proxy and a
> [script for Axis devices](https://axiscommunications.github.io/acap-documentation/docs/develop/build-install-run.html#configure-network-proxy-settings) in the ACAP documentation.
> Depending on the network your local build machine is connected to, you may need to add proxy
> settings for Docker. See
> [Proxy in build time](https://axiscommunications.github.io/acap-documentation/docs/develop/proxy#proxy-in-build-time).

```sh
docker build --tag <APP_IMAGE> .
Expand Down
9 changes: 4 additions & 5 deletions licensekey/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,11 @@ Below is the step by step instructions on how to execute the program. So basical

Standing in your working directory run the following commands:

> **Note**
> [!NOTE]
>
> Depending on the network you are connected to, you may need to add proxy settings.
> The file that needs these settings is: `~/.docker/config.json`. For reference please see
> https://docs.docker.com/network/proxy and a
> [script for Axis devices](https://axiscommunications.github.io/acap-documentation/docs/develop/build-install-run.html#configure-network-proxy-settings) in the ACAP documentation.
> Depending on the network your local build machine is connected to, you may need to add proxy
> settings for Docker. See
> [Proxy in build time](https://axiscommunications.github.io/acap-documentation/docs/develop/proxy#proxy-in-build-time).

```sh
docker build --tag <APP_IMAGE> .
Expand Down
6 changes: 2 additions & 4 deletions message-broker/consume-scene-metadata/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,8 @@ Standing in your working directory run the following commands:

> [!NOTE]
>
> Depending on the network you are connected to, you may need to add proxy settings.
> The file that needs these settings is: `~/.docker/config.json`. For reference please see
> https://docs.docker.com/network/proxy and a
> [script for Axis devices](https://axiscommunications.github.io/acap-documentation/docs/develop/build-install-run.html#configure-network-proxy-settings) in the ACAP documentation.
> Depending on the network your local build machine is connected to, you may need to add proxy
> settings for docker. See [Proxy in build time](../DEV.md#proxy-in-build-time).

```sh
docker build --tag <APP_IMAGE> --build-arg ARCH=<ARCH> .
Expand Down
6 changes: 6 additions & 0 deletions object-detection-cv25/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,12 @@ and added to the ACAP application via the -a flag in the
The application is built to specification by the `Makefile` and `manifest.json`
in the [app](app) directory. Standing in the application directory, run:

> [!NOTE]
>
> Depending on the network your local build machine is connected to, you may need to add proxy
> settings for Docker. See
> [Proxy in build time](https://axiscommunications.github.io/acap-documentation/docs/develop/proxy#proxy-in-build-time).

```sh
docker build --tag obj_detect:1.0 .
docker cp $(docker create obj_detect:1.0):/opt/app ./build
Expand Down
6 changes: 6 additions & 0 deletions object-detection/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,12 @@ downloaded and added to the ACAP application via the -a flag in the
The application is built to specification by the `Makefile` and `manifest.json`
in the [app](app) directory. Standing in the application directory, run:

> [!NOTE]
>
> Depending on the network your local build machine is connected to, you may need to add proxy
> settings for Docker. See
> [Proxy in build time](https://axiscommunications.github.io/acap-documentation/docs/develop/proxy#proxy-in-build-time).

```sh
docker build --build-arg ARCH=<ARCH> --build-arg CHIP=<CHIP> --tag obj_detect:1.0 .
docker cp $(docker create obj_detect:1.0):/opt/app ./build
Expand Down
9 changes: 4 additions & 5 deletions reproducible-package/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,11 @@ and not how a real application would be built.

Standing in your working directory follow the commands below:

> **Note**
> [!NOTE]
>
> Depending on the network you are connected to, you may need to add proxy settings.
> The file that needs these settings is: `~/.docker/config.json`. For reference please see
> https://docs.docker.com/network/proxy and a
> [script for Axis devices](https://axiscommunications.github.io/acap-documentation/docs/develop/build-install-run.html#configure-network-proxy-settings) in the ACAP documentation.
> Depending on the network your local build machine is connected to, you may need to add proxy
> settings for Docker. See
> [Proxy in build time](https://axiscommunications.github.io/acap-documentation/docs/develop/proxy#proxy-in-build-time).

In all examples the option `--no-cache` is used to ensure that image is rebuilt.

Expand Down
9 changes: 4 additions & 5 deletions shell-script-example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,11 @@ Below is the step by step instructions on how to execute the program. So basical

Standing in your working directory run the following commands:

> **Note**
> [!NOTE]
>
> Depending on the network you are connected to, you may need to add proxy settings.
> The file that needs these settings is: `~/.docker/config.json`. For reference please see
> https://docs.docker.com/network/proxy and a
> [script for Axis devices](https://axiscommunications.github.io/acap-documentation/docs/develop/build-install-run.html#configure-network-proxy-settings) in the ACAP documentation.
> Depending on the network your local build machine is connected to, you may need to add proxy
> settings for Docker. See
> [Proxy in build time](https://axiscommunications.github.io/acap-documentation/docs/develop/proxy#proxy-in-build-time).

```sh
docker build --tag <APP_IMAGE> .
Expand Down
9 changes: 4 additions & 5 deletions using-opencv/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,11 @@ building-opencv

### Quick start

> **Note**
> [!NOTE]
>
> Depending on the network you are connected to, you may need to add proxy settings.
> The file that needs these settings is: `~/.docker/config.json`. For reference please see
> https://docs.docker.com/network/proxy and a
> [script for Axis devices](https://axiscommunications.github.io/acap-documentation/docs/develop/build-install-run.html#configure-network-proxy-settings) in the ACAP documentation.
> Depending on the network your local build machine is connected to, you may need to add proxy
> settings for Docker. See
> [Proxy in build time](https://axiscommunications.github.io/acap-documentation/docs/develop/proxy#proxy-in-build-time).

1. Standing in your working directory run the following commands:

Expand Down
8 changes: 3 additions & 5 deletions utility-libraries/custom_lib_example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,10 @@ Below is the step by step instructions on how to execute the program. So basical

Standing in your working directory run the following commands:

> **Note**
> [!NOTE]
>
> Depending on the network you are connected to, you may need to add proxy settings.
> The file that needs these settings is: `~/.docker/config.json`. For reference please see
> https://docs.docker.com/network/proxy and a
> [script for Axis devices](https://axiscommunications.github.io/acap-documentation/docs/develop/build-install-run.html#configure-network-proxy-settings) in the ACAP documentation.
> Depending on the network your local build machine is connected to, you may need to add proxy
> settings for docker. See [Proxy in build time](../DEV.md#proxy-in-build-time).

```sh
docker build --tag <APP_IMAGE> .
Expand Down
8 changes: 3 additions & 5 deletions utility-libraries/openssl_curl_example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,10 @@ the application on a device.

### Build the application

> **Note**
> [!NOTE]
>
> Depending on the network you are connected to, you may need to add proxy settings.
> The file that needs these settings is: `~/.docker/config.json`. For reference please see
> https://docs.docker.com/network/proxy and a
> [script for Axis devices](https://axiscommunications.github.io/acap-documentation/docs/develop/build-install-run.html#configure-network-proxy-settings) in the ACAP documentation.
> Depending on the network your local build machine is connected to, you may need to add proxy
> settings for docker. See [Proxy in build time](../DEV.md#proxy-in-build-time).

Standing in your working directory run:

Expand Down
Loading
Loading