Skip to content
Snippets Groups Projects
Commit 9adc4d41 authored by Benjamin Bertrand's avatar Benjamin Bertrand
Browse files

Add local environment to run Python scripts

Environment named named csstudio as it's shared with CS-Studio (no need
to have separate environments).
And Phoebus is still CS-Studio (just a new version).

JIRA INFRA-1428 #action In Progress
parent d6ed4924
No related branches found
No related tags found
No related merge requests found
......@@ -6,3 +6,11 @@ phoebus_archive: "http://artifactory.esss.lu.se/artifactory/libs-snapshot-local/
phoebus_settings_path: "{{ phoebus_home }}/phoebus.ini"
phoebus_settings: {}
phoebus_options: "-server 4918"
# Set to [] to not create a python environment
phoebus_python_packages:
- python=3.7
- py4j
- connect2j
- numpy=1.17
- scipy=1.3
- pandas=0.25
......@@ -10,4 +10,5 @@ galaxy_info:
versions:
- 7
dependencies:
- role: ics-ans-role-conda
- role: ics-ans-role-java
---
- src: git+https://gitlab.esss.lu.se/ics-ansible-galaxy/ics-ans-role-conda.git
- src: git+https://gitlab.esss.lu.se/ics-ansible-galaxy/ics-ans-role-java.git
......@@ -68,3 +68,15 @@
path: "{{ item.path }}"
state: absent
loop: "{{ (phoebus_installations.files | sort(attribute='ctime', reverse=True))[phoebus_installations_keep:] }}"
- name: install Python environment
conda:
name: "{{ phoebus_python_packages }}"
state: present
channels:
- ics-conda
- conda-forge
- anaconda-main
environment: csstudio
when: phoebus_python_packages != []
tags: phoebus-python-env
......@@ -3,4 +3,10 @@
PHOEBUS_OPTS="{{ phoebus_options }}"
PHOEBUS_JAR={{ phoebus_home }}/product-{{ phoebus_version }}.jar
if [[ -d /opt/conda/envs/csstudio/bin ]]
then
source /opt/conda/etc/profile.d/conda.sh
conda activate csstudio
fi
{{ java_openjdk_bin }} $JAVA_ARGS $JAVA_OPTS -jar $PHOEBUS_JAR $PHOEBUS_OPTS -resource %f -settings "{{ phoebus_settings_path }}"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment