Skip to content
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
33 changes: 33 additions & 0 deletions .github/workflows/molecule.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: "Run molecule tests"

on:
push:
paths:
- 'ansible/**'
pull_request:
paths:
- 'ansible/**'

jobs:
molecule:
runs-on: ubuntu-latest
strategy:
matrix:
role: ["initial_setup", "m_base"]
steps:
- uses: actions/checkout@v2
with:
path: "${{ github.repository }}"
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.11.x"
- name: Install dependencies
run: |
pip install "ansible>11,<12" molecule=="25.1.0" molecule-plugins=="23.7.0" molecule-docker pytest pytest-testinfra
- name: Run molecule tests
working-directory: "${{ github.repository }}/ansible/roles/${{ matrix.role }}"
run: |
molecule test
env:
PY_COLORS: 1
4 changes: 2 additions & 2 deletions .github/workflows/rebuild-container-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- '.github/workflows/rebuild-container-images.yml'
- '.github/workflows/Containerfile.*'
- 'ansible/roles/initial_setup/**'
- 'ansible/roles/m-base/**'
- 'ansible/roles/m_base/**'
- 'ansible/vars/ci-base-image.yml'
- 'ansible/playbook.yml'
- 'ansible/requirements.yml'
Expand All @@ -17,7 +17,7 @@ on:
- '.github/workflows/rebuild-container-images.yml'
- '.github/workflows/Containerfile.*'
- 'ansible/roles/initial_setup/**'
- 'ansible/roles/m-base/**'
- 'ansible/roles/m_base/**'
- 'ansible/vars/ci-base-image.yml'
- 'ansible/playbook.yml'
- 'ansible/requirements.yml'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test-roles-areadetector.yml.autosave
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
- '!ansible/roles/initial_setup/**'
- '!ansible/roles/catrust/**'
- '!ansible/roles/common/**'
- '!ansible/roles/m-base/**'
- '!ansible/roles/m_base/**'
- '!ansible/roles/epics-module/**'
pull_request:
paths:
Expand All @@ -26,7 +26,7 @@ on:
- '!ansible/roles/initial_setup/**'
- '!ansible/roles/catrust/**'
- '!ansible/roles/common/**'
- '!ansible/roles/m-base/**'
- '!ansible/roles/m_base/**'
- '!ansible/roles/epics-module/**'
workflow_run:
workflows: ["Rebuild Container Images"]
Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
conf:
- name: "areaDetector"
id: "ci-areadetector"
- name: "oac-tree"
- name: "oac_tree"
id: "ci-oac-tree"
- name: "Phoebus & Archiver"
id: "ci-phoebus-aa"
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test-roles-modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ on:
- 'ansible/vars/ci-*.yml'
- 'ansible/playbook.yml'
- 'ansible/requirements.yml'
- 'ansible/roles/m-*/**'
- '!ansible/roles/m-base/**'
- 'ansible/roles/m_*/**'
- '!ansible/roles/m_base/**'
pull_request:
paths:
- '.github/workflows/test-roles-modules.yml'
- 'ansible/vars/ci-*.yml'
- 'ansible/playbook.yml'
- 'ansible/requirements.yml'
- 'ansible/roles/m-*/**'
- '!ansible/roles/m-base/**'
- 'ansible/roles/m_*/**'
- '!ansible/roles/m_base/**'
workflow_run:
workflows: ["Rebuild Container Images"]
types:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-roles-oac-tree.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ on:
- 'ansible/vars/ci-*.yml'
- 'ansible/playbook.yml'
- 'ansible/requirements.yml'
- 'ansible/roles/oac-tree/**'
- 'ansible/roles/oac_tree/**'
pull_request:
paths:
- '.github/workflows/test-roles-oac-tree.yml'
- 'ansible/vars/ci-*.yml'
- 'ansible/playbook.yml'
- 'ansible/requirements.yml'
- 'ansible/roles/oac-tree/**'
- 'ansible/roles/oac_tree/**'
workflow_run:
workflows: ["Rebuild Container Images"]
types:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-roles-phoebus-aa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- 'ansible/requirements.yml'
- 'ansible/roles/phoebus/**'
- 'ansible/roles/java/**'
- 'ansible/roles/archiver-appliance/**'
- 'ansible/roles/archiver_appliance/**'
pull_request:
paths:
- '.github/workflows/test-roles-phoebus-aa.yml'
Expand All @@ -18,7 +18,7 @@ on:
- 'ansible/requirements.yml'
- 'ansible/roles/phoebus/**'
- 'ansible/roles/java/**'
- 'ansible/roles/archiver-appliance/**'
- 'ansible/roles/archiver_appliance/**'
workflow_run:
workflows: ["Rebuild Container Images"]
types:
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ ansible/group_vars/local.yml
venv
**/.vagrant
/vagrant/corporate_root_ca.crt
__pycache__
*.pyc
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"ansible.python.interpreterPath": "/usr/local/bin/python3"
}
52 changes: 26 additions & 26 deletions ansible/playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,75 +35,75 @@

- name: EPICS Base
include_role:
name: m-base
name: m_base
when: m_base is defined and m_base | bool
tags: m-base
tags: m_base

- name: ASYN
include_role:
name: m-asyn
name: m_asyn
when: m_asyn is defined and m_asyn | bool
tags: m-asyn
tags: m_asyn

- name: Autosave
include_role:
name: m-autosave
name: m_autosave
when: m_autosave is defined and m_autosave | bool
tags: m-autosave
tags: m_autosave

- name: SScan
include_role:
name: m-sscan
name: m_sscan
when: m_sscan is defined and m_sscan | bool
tags: m-sscan
tags: m_sscan

- name: Calc
include_role:
name: m-calc
name: m_calc
when: m_calc is defined and m_calc | bool
tags: m-calc
tags: m_calc

- name: Busy
include_role:
name: m-busy
name: m_busy
when: m_busy is defined and m_busy | bool
tags: m-busy
tags: m_busy

- name: AreaDetector
include_role:
name: m-areadetector
name: m_areadetector
when: m_areadetector is defined and m_areadetector | bool
tags: m-areadetector
tags: m_areadetector

- name: OPC UA
include_role:
name: m-opcua
name: m_opcua
when: m_opcua is defined and m_opcua | bool
tags: m-opcua
tags: m_opcua

- name: P4P
include_role:
name: m-p4p
name: m_p4p
when: m_p4p is defined and m_p4p | bool
tags: m-p4p
tags: m_p4p

- name: pvaPy
include_role:
name: m-pvaPy
name: m_pvaPy
when: m_pvaPy is defined and m_pvaPy | bool
tags: m-pvaPy
tags: m_pvaPy

- name: Sequencer
include_role:
name: m-seq
name: m_seq
when: m_seq is defined and m_seq | bool
tags: m-seq
tags: m_seq

- name: StreamDevice
include_role:
name: m-stream
name: m_stream
when: m_stream is defined and m_stream | bool
tags: m-stream
tags: m_stream

- name: Docker
include_role:
Expand All @@ -129,13 +129,13 @@

- name: OAC Tree
include_role:
name: oac-tree
name: oac_tree
when: oac_tree is defined and oac_tree | bool
tags: oac_tree

- name: Archiver Appliance
include_role:
name: archiver-appliance
name: archiver_appliance
when: archiver_appliance is defined and archiver_appliance | bool
tags: archiver_appliance

Expand Down
32 changes: 16 additions & 16 deletions ansible/roles/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,40 @@

## EPICS Modules

### m-areadetector
### m_areadetector
The AreaDetector image processing framework
(modules Core, SimDetector and PVADriver)
and their dependency Busy.

### m-base
### m_base
EPICS Base C++ and PVXS.

### m-opcua
### m_opcua
OPC UA Device Support and the open62541 low-level driver.

### m-p4p
### m_p4p
Python wrapper for PVAccess (PVXS-based) and PVA Gateway.

### m-pvaPy
### m_pvaPy
Python wrapper for PVAccess (based on the classical PVA stack).

### m-seq
### m_seq
State Notation language compiler and Sequencer.

### m-stream
### m_stream
StreamDevice Device Support.

## Phoebus and Services

### phoebus
Control System Studio / Phoebus.

### archiver-appliance
### archiver_appliance
Minimal install of the EPICS Archiver Appliance.

## Other Clients

### oac-tree
### oac_tree
High-level sequencer for automation, operation and control.

## Bluesky Modules
Expand All @@ -52,16 +52,16 @@ Enterprise CA certificate install
## Internal Modules
Low-level stuff and dependencies of the above.

### m-asyn
### m_asyn
The ASYN Driver framework.

### m-autosave
### m_autosave
The AutoSaveRestore (EPICS Process Database persistence) module.

### m-calc
### m_calc
The CALC (array and string calculation) module.

### m-sscan
### m_sscan
The SSCAN (multi-dimensional scan record) module.

### docker
Expand All @@ -75,7 +75,7 @@ Java SDK needed for Phoebus and Services.

# Adding EPICS modules

m-base provides a task file to install one or more EPICS modules.
m_base provides a task file to install one or more EPICS modules.

## Parameters

Expand All @@ -102,7 +102,7 @@ Each dictionary in `epics_modules_to_build` should have the following keys:

## Usage Example

In a high-level role `m-example`:
In a high-level role `m_example`:

`vars/main.yml`:
```yaml
Expand All @@ -114,7 +114,7 @@ m_example_modules:
url: "https://example.com/example-{{ example_version }}.tar.gz"
release_var: "EXAMPLE"
release_sortkey: "10"
pre_hook: "{{ playbook_dir }}/roles/m-example/tasks/example_prep.yml"
pre_hook: "{{ playbook_dir }}/roles/m_example/tasks/example_prep.yml"
```

`tasks/main.yml`:
Expand Down
2 changes: 2 additions & 0 deletions ansible/roles/initial_setup/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
dev_user: "epics-dev"
30 changes: 30 additions & 0 deletions ansible/roles/initial_setup/molecule/default/molecule.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
dependency:
name: galaxy
lint: |
set -e
yamllint .
ansible-lint
flake8
provisioner:
name: ansible
playbooks:
converge: ../resources/converge.yml
inventory:
host_vars:
initial_setup-docker:
in_container: true
docker: true
group_vars:
all:

scenario:
name: default
verifier:
name: testinfra
directory: ../resources/tests/
driver:
name: docker
platforms:
- name: initial_setup-docker
image: ubuntu:22.04
Loading
Loading