Auto approve gateway network connection

Hello community,

I've a simple compose file with one hub and one spoke and gateway network set up (image : latest). I'd like to have gateway network automatically approved.
According to https://github.com/thirdgen88/ignition-docker/blob/main/docs/README.md, I set the GATEWAY_NETWORK_AUTOACCEPT_DELAY in the hub environment variables. But in the gateway network incoming tab, the remote certificate is still not approved.
What am I missing?

Thanks,

Hello,

Are you using the official Ignition image from Inductive Automation or the community image that is referenced in the link you provided? Both images have different environment variables. This user manual page for Docker Image covers everything you need to know for the official image including available environment variables.

As @Gabriel_Hernandez correctly mentioned above, the "unofficial/community" image that you're linking to is very similar to the official one but there are still some differences between them. The auto-approve functionality that is there is also only for gateway network certificate acceptance; there is an approval for the connection itself that must still be done separately.

I've attached an example Compose stack that achieves what you're looking for (with our official image!) under the current constraints. The basic approach for creating this was as follows:

  1. Bring up the initial stack without the gateway restore and without the bind-mounts on the spoke gateway for metro-keystore and .uuid.
  2. Connect to the hub and approve the incoming GAN connection from spoke. Perform any other baseline configurations that you'd like.
  3. Create a gw-init sub-folder in your Compose solution gw-init that we'll use for bind-mounting some files into our containers.
  4. Capture GWBK from the hub (where the connection approvals are configured) and place as gw-init/hub.gwbk. Note: you can use docker compose cp to copy from the service containers to your host filesystem.
  5. Capture the data/.uuid and data/local/metro-keystore files from spoke and place then accordingly under gw-init/.
  6. Modify the Compose YAML to bind-mount the GWBK into hub (and update the command to issue the restore on first-launch). Also modify the spoke service with bind-mounts for the files captured in (5). Note we're using the long syntax for volumes here so we can override the create-host-path setting.
  7. Bring down the stack and wipe volumes. Then re-launch it and verify that everything comes up as connected out-of-the-box.

Here is the solution for everyone's reference:

forum-73220.zip (330.2 KB)

And the YAML displayed here for quick reference:

---
x-ignition-env: &ignition-env
  IGNITION_EDITION: standard
  ACCEPT_IGNITION_EULA: "Y"
  GATEWAY_ADMIN_PASSWORD: password
  DISABLE_QUICKSTART: true

services:
  hub:
    image: inductiveautomation/ignition:8.1.27
    ports:
      - 8088:8088
    volumes:
      - hub-data:/usr/local/bin/ignition/data
      - ./gw-init/hub.gwbk:/usr/local/bin/ignition/base.gwbk
    environment:
      <<: *ignition-env
    command: >
      -n hub
      -r base.gwbk
  spoke:
    image: inductiveautomation/ignition:8.1.27
    hostname: spoke
    ports:
      - 8089:8088
    volumes:
      - type: volume
        source: spoke-data
        target: /usr/local/bin/ignition/data
      - type: bind
        source: ./gw-init/spoke-uuid.txt
        target: /usr/local/bin/ignition/data/.uuid
        bind:
          create_host_path: false
      - type: bind
        source: ./gw-init/spoke-metro-keystore
        target: /usr/local/bin/ignition/data/local/metro-keystore
        bind:
          create_host_path: false
    environment:
      <<: *ignition-env
      GATEWAY_NETWORK_0_HOST: hub
    command: >
      -n spoke

volumes:
  hub-data:
  spoke-data:
3 Likes

Hello @Gabriel_Hernandez, @kcollins1

I'm using this the official one (inductiveautomation/ignition:latest); I'll test with all your recommandations and get back her for results.

Thank you.

Gentlemen,
On click, and boum! Thanks a lot.