Skip to content

Commit

Permalink
update to copier 4.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
gilesknap committed Dec 10, 2024
1 parent ca9fff1 commit 58445c5
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 110 deletions.
2 changes: 1 addition & 1 deletion .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
_commit: 4.1.0b4
_commit: 4.1.0
_src_path: gh:epics-containers/ioc-template
description: Generic IOC for the Delta Tau turbo pmac and power pmac motion controllers
git_platform: github.com
Expand Down
3 changes: 0 additions & 3 deletions .devcontainer/.env

This file was deleted.

15 changes: 0 additions & 15 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,21 +46,6 @@
// Make sure SELinux does not disable write access to host filesystems like tmp
"--security-opt=label=disable"
],
"appPort": [
// Expose Channel Access ports on the host's loopback interface
// Note: set all three environment variables below to unique values
// in order to a second devcontainer on the same host.
//
// Then use e.g. EPICS_CA_ADDR_LIST="127.0.0.1:5064 127.0.0.1:6064"
// for clients to connect to multiple devcontainers' PVs.
//
"127.0.0.1:${localEnv:EPICS_CA_SERVER_PORT:5064}:${localEnv:EPICS_CA_SERVER_PORT:5064}/udp",
"127.0.0.1:${localEnv:EPICS_CA_SERVER_PORT:5064}:${localEnv:EPICS_CA_SERVER_PORT:5064}",
"127.0.0.1:${localEnv:EPICS_CA_REPEATER_PORT:5065}:${localEnv:EPICS_CA_REPEATER_PORT:5065}",
//
// Expose the PVA name server port on all host interfaces
"${localEnv:EPICS_PVA_SERVER_PORT:5075}:${localEnv:EPICS_PVA_SERVER_PORT:5075}"
],
// Mount the parent of the project folder so we can access peer projects
"workspaceMount": "source=${localWorkspaceFolder}/..,target=/workspaces,type=bind",
// mount in other useful files from the host
Expand Down
47 changes: 0 additions & 47 deletions .gitlab-ci.yml

This file was deleted.

29 changes: 0 additions & 29 deletions .gitlab/kanikobuild.sh

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ This repository includes a developer container configuration for Visual Studio C

## Channel Access

The developer container exposes channel access ports on the loopback interface. If you have channel access clients running on the host machine, you can connect to the IOC by setting the `EPICS_CA_ADDR_LIST` environment variable as follows:
The vscode developer container auto forwards the channel access ports on the loopback interface. If you have channel access clients running on the host machine, you can connect to the IOC by setting the `EPICS_CA_NAME_SERVERS` environment variable as follows:

```bash
export EPICS_CA_ADDR_LIST=127.0.0.1
export EPICS_CA_NAME_SERVERS=127.0.0.1:5064
caget IOCNAME:PVNAME
```
15 changes: 7 additions & 8 deletions opi/phoebus-launch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@ thisdir=$(realpath $(dirname $0))
workspace=$(realpath ${thisdir}/..)

# update settings.ini with CA and PVA ports
source ${workspace}/.devcontainer/.env
cat ${workspace}/opi/settings.ini |
sed -r \
-e "s|5064|${EPICS_CA_SERVER_PORT}|" \
-e "s|5075|${EPICS_PVA_SERVER_PORT}|" \
-e "s|5065|${EPICS_CA_REPEATER_PORT}|" > /tmp/settings.ini
-e "s|5064|${EPICS_CA_SERVER_PORT:-5064}|" \
-e "s|5075|${EPICS_PVA_SERVER_PORT:-5075}|" \
-e "s|5065|${EPICS_CA_REPEATER_PORT:-5065}|" > /tmp/settings.ini

settings="
-resource ${workspace}/opi/auto-generated/index.bob
Expand All @@ -31,10 +30,10 @@ elif module load phoebus 2>/dev/null; then
else
echo "No local phoebus install found, using a container"

# prefer docker but use podman if USE_PODMAN is set
if docker version &> /dev/null && [[ -z $USE_PODMAN ]]
then docker=docker; UIDGID=$(id -u):$(id -g)
else docker=podman; UIDGID=0:0
# prefer podman but use docker if USE_DOCKER is set
if podman version &> /dev/null && [[ -z $USE_DOCKER ]]
then docker=podman; UIDGID=0:0
else docker=docker; UIDGID=$(id -u):$(id -g)
fi
echo "Using $docker as container runtime"

Expand Down
5 changes: 3 additions & 2 deletions opi/settings.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
org.phoebus.pv.ca/addr_list=127.0.0.1
org.phoebus.pv.ca/server_port=5064
org.phoebus.pv.ca/repeater_port=5065
org.phoebus.pv.ca/name_servers=127.0.0.1:5064
# point at local host for pvAccess name server
org.phoebus.pv.pva/epics_pva_name_servers=127.0.0.1
org.phoebus.pv.pva/server_port=5075
org.phoebus.pv.pva/epics_pva_name_servers=127.0.0.1:5075
org.phoebus.pv.pva/server_port=5075
3 changes: 1 addition & 2 deletions tests/config/bl00i-ea-test-ioc.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# yaml-language-server: $schema=https://github.com/epics-containers/ioc-pmac/releases/download/2024.11.1/ibek.ioc.schema.json
# yaml-language-server: $schema=https://github.com/epics-containers/ioc-template-example/releases/download/4.1.0/ibek.ioc.schema.json

ioc_name: "{{ ioc_yaml_file_name }}"

Expand Down Expand Up @@ -26,4 +26,3 @@ entities:
- type: epics.PostStartupCommand
command: |
dbgf EXAMPLE:IBEK:SUM
dbgf BL00I-EA-TEST-IOC:ST_SCRIPT1
1 change: 0 additions & 1 deletion tests/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,3 @@ elif [[ ! ${result} =~ "5.15" || ! ${result} =~ "/epics/runtime/st.cmd" ]]; then
fi

echo "Tests passed!"

0 comments on commit 58445c5

Please sign in to comment.