diff --git a/compose/environment.sh b/compose/environment.sh index cc9e451..502e297 100644 --- a/compose/environment.sh +++ b/compose/environment.sh @@ -31,6 +31,12 @@ if check_docker; then USER_ID=$(id -u); USER_GID=$(id -g) else USER_ID=0; USER_GID=0 + alias docker=podman +fi + +# make sure we have a network to share beteen the devcontainer and gateway container +if ! docker network exists channel_access ; then + docker network create --subnet="170.20.0.0/16" channel_access fi # ensure local container users can access X11 server diff --git a/compose/include/ioc.yml b/compose/include/ioc.yml deleted file mode 100644 index 0005c6d..0000000 --- a/compose/include/ioc.yml +++ /dev/null @@ -1,61 +0,0 @@ -# common features for all IOCs in this repository. -# -# For use with 'extends' in each individual IOC service description - -services: - # linux IOCs that run in a container ######################################### - linux_ioc: &linux_ioc - labels: - # a reference to which repository created this IOC - ioc_group: "t01" - # lets tools like ec identify which containers are IOCs - is_ioc: true - # in K8S each IOC can have an indication of what physical location it - # should be (used by machine IOCs) this is for parity (but redundant). - location: localhost - - # NOTE: blank environment vars should be overriden in individual IOCs - environment: - IOCSH_PS1: - IOC_NAME: - # a prefix for devIocStats PVs. Configured externally for health_check - IOC_PREFIX: - IOC_LOCATION: localhost - BEAMLINE: t01 - IOC_GROUP: t01 - - tty: true - stdin_open: true - restart: unless-stopped - - # for docker use 'networks: [channel_access]' - # for podman at DLS use 'network_mode: host' - # or for both use 'networks: [channel_access]' - # and ca-gateway + pvagw - # network_mode: host - - networks: - - channel_access - expose: - - "5064-5065/udp" - - "5064-5065" - - profiles: - - test - - deploy - - # proxy services that each manage an RTEMS hard IOC ########################## - rtems_ioc: - # use an alias to copy all of the linux_ioc spec - <<: *linux_ioc - - # and add RTEMS environment variables - environment: - RTEMS_ROOT_NFS: /nfsv2-tftp - RTEMS_ROOT_TFTP: /nfsv2-tftp - RTEMS_NFS_IP": 172.23.90.238 - RTEMS_TFTP_IP": 172.23.90.238 - # NB. Gateway and Netmask are the same for all RTEMS IOCs on a beamline - # But may need to move these to individual IOCs for the Machine. - RTEMS_IOC_NETMASK": 255.255.240.0 - RTEMS_IOC_GATEWAY": 172.23.240.254 diff --git a/compose/include/networks.yml b/compose/include/networks.yml deleted file mode 100644 index 6d9ce15..0000000 --- a/compose/include/networks.yml +++ /dev/null @@ -1,7 +0,0 @@ -networks: - channel_access: - name: "channel_access" - ipam: - driver: default - config: - - subnet: "172.20.0.0/16" diff --git a/compose/services/gateway/compose.yml b/compose/services/gateway/compose.yml index ccc8e10..4b50776 100644 --- a/compose/services/gateway/compose.yml +++ b/compose/services/gateway/compose.yml @@ -28,7 +28,7 @@ services: - source: ca-gateway_config target: /config - command: -cip 172.20.255.255 -pvlist /config/pvlist -access /config/access -log /dev/stdout -debug 1 + command: -cip 170.20.255.255 -pvlist /config/pvlist -access /config/access -log /dev/stdout -debug 1 profiles: - test @@ -49,6 +49,6 @@ configs: ca-gateway_config: file: ./config -include: - - path: - ../../include/networks.yml +networks: + channel_access: + external: true \ No newline at end of file diff --git a/compose/services/phoebus/compose.yml b/compose/services/phoebus/compose.yml index 0964e10..cdc32b8 100644 --- a/compose/services/phoebus/compose.yml +++ b/compose/services/phoebus/compose.yml @@ -9,11 +9,11 @@ services: DISPLAY: $DISPLAY tty: true # pick a server port for phoebus so it does not reconnect to existing phoebus - command: phoebus-product/phoebus.sh -settings /config/settings.ini -server 7010 + command: phoebus-product/phoebus.sh -settings /config/settings.ini -resource /opi/ioc/index.bob -server 7010 volumes: - /tmp/.X11-unix:/tmp/.X11-unix - ~/.Xauthority:/root/.Xauthority - - ../../opi:/opi + - ../../../opi:/opi # for X11 to work we need to run as the same UID as the host # IMPORTANT: set UIDGID to your host user:group e.g. 1000:1000 # BUT: always to 0:0 if you are using podman @@ -30,7 +30,3 @@ services: configs: phoebus_config: file: ./config - -include: - - path: - ../../include/networks.yml \ No newline at end of file