Skip to content
Snippets Groups Projects
Unverified Commit 9b4a497f authored by Anton Joubert's avatar Anton Joubert Committed by GitHub
Browse files

Merge pull request #79 from ska-telescope/user/ajoubert/change_levpro_references

 Change all levpro references to lmc-base-classes 
parents 02afbeb1 d06b89e0
No related branches found
No related tags found
No related merge requests found
Showing
with 95 additions and 1285 deletions
node('docker') { node('docker') {
withDockerContainer( withDockerContainer(
image: 'tango-levpro:latest', image: 'tango-lmc-base-classes:latest',
args: '-u root' args: '-u root'
) { ) {
stage 'Cleanup workspace' stage 'Cleanup workspace'
...@@ -23,9 +23,9 @@ node('docker') { ...@@ -23,9 +23,9 @@ node('docker') {
timeout(time: 30, unit: 'MINUTES') { timeout(time: 30, unit: 'MINUTES') {
ansiColor('xterm') { ansiColor('xterm') {
try { try {
// Add a symbolic link to levpro dir, as the Ansible scripts // Add a symbolic link to lmc-base-classes dir, as the Ansible scripts
// assume that is part of the path // assume that is part of the path
sh 'ln -sv $WORKSPACE ../levpro' sh 'ln -sv $WORKSPACE ../lmc-base-classes'
// use Ansible to do pip installs, using current WORKSPACE // use Ansible to do pip installs, using current WORKSPACE
// as the software_root // as the software_root
...@@ -35,7 +35,7 @@ node('docker') { ...@@ -35,7 +35,7 @@ node('docker') {
cd ansible cd ansible
ansible-playbook -i hosts install_sw.yml \ ansible-playbook -i hosts install_sw.yml \
--limit "local" \ --limit "local" \
--tags install-sw-levpro \ --tags install-sw-lmc-base-classes \
--tags install-sw-skabase \ --tags install-sw-skabase \
--verbose \ --verbose \
--extra-vars software_root=$PARENT_DIR --extra-vars software_root=$PARENT_DIR
......
...@@ -7,7 +7,7 @@ Early work in this repo was done as part of the LMC Base Classes Evolutionary Pr ...@@ -7,7 +7,7 @@ Early work in this repo was done as part of the LMC Base Classes Evolutionary Pr
## Docs ## Docs
- SKA Control System guidelines: [Google docs folder](https://drive.google.com/drive/folders/0B8fhAW5QnZQWQ2ZlcjhVS0NmRms) - SKA Control System guidelines: [Google docs folder](https://drive.google.com/drive/folders/0B8fhAW5QnZQWQ2ZlcjhVS0NmRms)
- LEvPro work area: [Google docs folder](https://drive.google.com/drive/folders/0B8fhAW5QnZQWVHVFVGVXT2Via28) - Old LEvPro work area: [Google docs folder](https://drive.google.com/drive/folders/0B8fhAW5QnZQWVHVFVGVXT2Via28)
## Contribute ## Contribute
Contributions are always welcome! Please ensure that you adhere to our coding standards [CAM_Style_guide](https://docs.google.com/document/d/1aZoIyR9tz5rCWr2qJKuMTmKp2IzHlFjrCFrpDDHFypM/edit?usp=sharing). Use [flake8](http://flake8.pycqa.org/en/latest/) for linting (default settings, except maximum line length of 90 characters). Contributions are always welcome! Please ensure that you adhere to our coding standards [CAM_Style_guide](https://docs.google.com/document/d/1aZoIyR9tz5rCWr2qJKuMTmKp2IzHlFjrCFrpDDHFypM/edit?usp=sharing). Use [flake8](http://flake8.pycqa.org/en/latest/) for linting (default settings, except maximum line length of 90 characters).
...@@ -2,31 +2,18 @@ ...@@ -2,31 +2,18 @@
Old notes for LEvPRo deployment can be found in: Old notes for LEvPRo deployment can be found in:
[LEvPro Deployment Notes](https://docs.google.com/document/d/12f495FEMOi0g3bJjoZL3icZaCCr7iSjTY3jToFqA2Ns/edit#) [LEvPro Deployment Notes](https://docs.google.com/document/d/12f495FEMOi0g3bJjoZL3icZaCCr7iSjTY3jToFqA2Ns/edit#)
## Recent changes
Moving refelt config files from role to inventories
Adding register_my_refelt to support different refelts (e.g. Ref4 on devl4, Ref5 on devl5) with different config files (from inventories) e.g. ./play-task.sh register_my_refelt devl
Added deregister_refelts to remove registrations in Tango DB and Astor so that we can start again (but not added to site.yml) and added support to run a different .yml instead of site.yml e.g. ./play-task.sh deregsiter_refelts.yml
## TODO
Get the desired inventories from ansible variables instead of loading files
# To get going with a fresh node (Docker container): # To get going with a fresh node (Docker container):
## Run a Docker container: ## Run a Docker container:
Follow the steps in `../docker/README.md`. Launch the docker with the levpro project mounted inside the container. Follow the steps in `../docker/README.md`. Launch the docker with the lmc-base-classes project mounted inside the container.
Obviously any changes made inside the container, e.g. software installed, will not persist. Images can be made from a running container, if you want to keep changes (read the Docker docs). Note that changes to the files in the levpro project will persist, because these files live on the host machine, and are just mounted inside the container. Obviously any changes made inside the container, e.g. software installed, will not persist. Images can be made from a running container, if you want to keep changes (read the Docker docs). Note that changes to the files in the lmc-base-classes project will persist, because these files live on the host machine, and are just mounted inside the container.
## Install the levpro python modules and register TANGO devices ## Install the lmc-base-classes python modules and register TANGO devices
``` ```
cd ~/src/levpro/ansible cd ~/src/lmc-base-classes/ansible
./play-task.sh install-sw
./play-task.sh generate-sw-refelt-simlib ./play-task.sh generate-sw-refelt-simlib
./play-task.sh install-sw
./play-task.sh register-my-refelt local # startup can take 5 minutes! ./play-task.sh register-my-refelt local # startup can take 5 minutes!
``` ```
...@@ -34,13 +21,19 @@ Note: `register-refelt` is deprecated. ...@@ -34,13 +21,19 @@ Note: `register-refelt` is deprecated.
## Updating after .xmi file changes (POGO generation) ## Updating after .xmi file changes (POGO generation)
``` ```
cd ~/src/levpro/ansible cd ~/src/lmc-base-classes
purge_xmi_tree.py --path .
cd ~/src/lmc-base-classes/ansible
./play-task.sh deregister_refelts.yml ./play-task.sh deregister_refelts.yml
./play-task.sh generate-sw ./play-task.sh generate-sw
./play-task.sh install-sw
./play-task.sh register-my-refelt local ./play-task.sh register-my-refelt local
``` ```
Note: license file text may need to be updated in POGO generated files. Notes:
- license file text may need to be updated in POGO generated files.
- The deregister_refelts.yml role removes registrations in Tango DB and Astor so that
we can start again, with nothing registered.
# To get going with a fresh Ubuntu 14.04 system (not recommended!): # To get going with a fresh Ubuntu 14.04 system (not recommended!):
...@@ -65,12 +58,12 @@ sudo add-apt-repository ppa:ansible/ansible ...@@ -65,12 +58,12 @@ sudo add-apt-repository ppa:ansible/ansible
sudo apt-get update sudo apt-get update
sudo apt-get install ansible sudo apt-get install ansible
mkdir ~/src mkdir ~/src
git clone https://github.com/ska-sa/levpro ~/src/levpro git clone https://github.com/ska-telescope/lmc-base-classes ~/src/lmc-base-classes
``` ```
## Deploy tangobox and a levpro RefElt on a fresh node ## Deploy tangobox and a lmc-base-classes RefElt on a fresh node
``` ```
cd ~/src/levpro/ansible cd ~/src/lmc-base-classes/ansible
./play-task.sh deploy-tangobox ./play-task.sh deploy-tangobox
./play-task.sh deploy-sw ./play-task.sh deploy-sw
./play-task.sh generate-sw ./play-task.sh generate-sw
...@@ -83,9 +76,12 @@ Optional: ...@@ -83,9 +76,12 @@ Optional:
## Updating after .xmi file changes (POGO generation) ## Updating after .xmi file changes (POGO generation)
``` ```
cd ~/src/levpro/ansible cd ~/src/lmc-base-classes
purge_xmi_tree.py --path .
cd ~/src/lmc-base-classes/ansible
./play-task.sh deregister_refelts.yml ./play-task.sh deregister_refelts.yml
./play-task.sh generate-sw ./play-task.sh generate-sw
./play-task.sh install-sw
./play-task.sh register-my-refelt local ./play-task.sh register-my-refelt local
``` ```
...@@ -137,7 +133,7 @@ or using ansible-playbook directly ...@@ -137,7 +133,7 @@ or using ansible-playbook directly
ansible-playbook -i hosts install_sw.yml --list-tags [--limit devXX] ansible-playbook -i hosts install_sw.yml --list-tags [--limit devXX]
ansible-playbook -i hosts install_sw.yml --list-hosts [--limit devXX] ansible-playbook -i hosts install_sw.yml --list-hosts [--limit devXX]
ansible-playbook -i hosts install_sw.yml ansible-playbook -i hosts install_sw.yml
ansible-playbook -i hosts install_sw.yml -t install-sw-levpro ansible-playbook -i hosts install_sw.yml -t install-sw-lmc-base-classes
``` ```
### To deploy SW on local: # Git clone if not available, else git pull ### To deploy SW on local: # Git clone if not available, else git pull
...@@ -152,52 +148,46 @@ ansible-playbook -i hosts site.yml --limit local --tags "deploy-sw" ...@@ -152,52 +148,46 @@ ansible-playbook -i hosts site.yml --limit local --tags "deploy-sw"
### To refresh SW on local: # Git pull ### To refresh SW on local: # Git pull
``` ```
./play-task.sh refresh-sw ./play-task.sh refresh-sw
./play-task.sh refresh-sw-levpro ./play-task.sh refresh-sw-lmc-base-classes
``` ```
or using ansible-playbook directly or using ansible-playbook directly
``` ```
ansible-playbook -i hosts site.yml --limit local --tags "refresh-sw" ansible-playbook -i hosts site.yml --limit local --tags "refresh-sw"
ansible-playbook -i hosts site.yml --limit local --tags "refresh-sw-levpro" ansible-playbook -i hosts site.yml --limit local --tags "refresh-sw-lmc-base-classes"
``` ```
### To install SW on local: # sudo pip install ### To install SW on local: # sudo pip install
``` ```
./play-task.sh install-sw ./play-task.sh install-sw
./play-task.sh install-sw-levpro ./play-task.sh install-sw-lmc-base-classes
./play-task.sh install-sw-skabase ./play-task.sh install-sw-skabase
./play-task.sh install-sw-refelt ./play-task.sh install-sw-refelt
``` ```
or using ansible-playbook directly or using ansible-playbook directly
``` ```
ansible-playbook -i hosts site.yml --limit local --tags "install-sw" # all ansible-playbook -i hosts site.yml --limit local --tags "install-sw" # all
ansible-playbook -i hosts site.yml --limit local --tags "install-sw-levpro" ansible-playbook -i hosts site.yml --limit local --tags "install-sw-lmc-base-classes"
ansible-playbook -i hosts site.yml --limit local --tags "install-sw-skabase" ansible-playbook -i hosts site.yml --limit local --tags "install-sw-skabase"
ansible-playbook -i hosts site.yml --limit local --tags "install-sw-refelt" ansible-playbook -i hosts site.yml --limit local --tags "install-sw-refelt"
``` ```
### To regenerate POGO output ### To regenerate POGO output
When XMI or code has been changed When XMI has been changed
``` ```
cd ~/src/levpro/ansible cd ~/src/lmc-base-classes
purge_xmi_tree.py --path .
cd ~/src/lmc-base-classes/ansible
./play-task.sh deregister_refelts.yml
./play-task.sh generate-sw ./play-task.sh generate-sw
``` ./play-task.sh install-sw
./play-task.sh register-my-refelt local
### To configure the RefElt TANGO facility and start its device servers
```
./play-task.sh register-refelt
```
or
```
./play-task.sh register-refelt-in-tangodb
./play-task.sh register-refelt-in-astor
``` ```
### To configure a specific RefEltX TANGO facility and start its device servers (my_refelt) ### To configure a specific RefEltX TANGO facility and start its device servers (my_refelt)
You need to add the group to levpro/ansible/hosts e.g. You need to add the group to lmc-base-classes/ansible/hosts e.g.
``` ```
[devXX] [devXX]
devXXlevpro devXXlmc
``` ```
And group vars for the group in ansible/group_vars/devXX: And group vars for the group in ansible/group_vars/devXX:
...@@ -209,32 +199,27 @@ And group vars for the group in ansible/group_vars/devXX: ...@@ -209,32 +199,27 @@ And group vars for the group in ansible/group_vars/devXX:
id: refX id: refX
``` ```
and ansible/host_vars for each host in the group as appropriate, at least: and ansible/host_vars/devXXlmc for each host in the group as appropriate, at least:
```
ansible_ssh_host: levpro.devXXX.camlab.kat.ac.za
```
and ansible/host_vars/devXXlevpro for each host in the group as appropriate, at least:
``` ```
ansible_ssh_host: levpro.devXXX.camlab.kat.ac.za ansible_ssh_host: lmc.devXX.domain
``` ```
Lastly, you need to create an inventory for devXX in ansible/inventories/devXX defining the refXXX element. Lastly, you need to create an inventory for devXX in ansible/inventories/devXX defining the refX element.
Note: this may later be templated for RefElts (as it may be a useful pattern for DSH) Note: this may later be templated for RefElts (as it may be a useful pattern for DSH)
(If need be, deregister previous registrations with:) (If need be, deregister previous registrations with:)
``` ```
ansible-playbook deregister-refelts.yml ./play-task.sh deregister_refelts.yml
``` ```
Then do Then do
``` ```
ansible-playbook register-my-refelt.yml devXX ./play-task.sh register-my-refelt devXX
``` ```
this produces the ansible command line (note the --limit): this produces the ansible command line (note the --limit):
``` ```
ansible-playbook -i hosts site.yml --limit devXX --tags register-my-refelt --verbose --ask-become-pass ansible-playbook -i hosts site.yml --limit devXX --tags register-my-refelt --verbose
``` ```
# NOTES: # NOTES:
...@@ -259,11 +244,11 @@ role-tag defined in in roles/xxx/tasks/main.yml followed by a task specialisatio ...@@ -259,11 +244,11 @@ role-tag defined in in roles/xxx/tasks/main.yml followed by a task specialisatio
E.g. any tag starting with deploy-sw will be found in the deploy_sw.yml role E.g. any tag starting with deploy-sw will be found in the deploy_sw.yml role
``` ```
tags: tags:
- deploy-sw-levpro - deploy-sw-lmc-base-classes
``` ```
To execute a specific task specify the full --tags from the task file e.g. To execute a specific task specify the full --tags from the task file e.g.
``` ```
--tags deploy-sw-levpro --tags deploy-sw-lmc-base-classes
``` ```
Format is "<role-tag>-<task-id>" e.g. install-sw-refelt Format is "<role-tag>-<task-id>" e.g. install-sw-refelt
``` ```
...@@ -275,7 +260,7 @@ To list the current task tags: ...@@ -275,7 +260,7 @@ To list the current task tags:
``` ```
./play-task.sh ./play-task.sh
kat@levpro.devXX.camlab.kat.ac.za:~/src/levpro/ansible$ ./play-task.sh tango-cs@95f06d131e41:~/src/lmc-base-classes/ansible$ ./play-task.sh
You have to specify a roletag, and optional task-id You have to specify a roletag, and optional task-id
---------------------------<<<< ANSIBLE COMMAND LINE >>>>-------------------------------------------- ---------------------------<<<< ANSIBLE COMMAND LINE >>>>--------------------------------------------
...@@ -287,24 +272,21 @@ The available task tags are: ...@@ -287,24 +272,21 @@ The available task tags are:
playbook: site.yml playbook: site.yml
play #1 (operational): deploy_sw TAGS: [] play #1 (operational): deploy_sw TAGS: []
TASK TAGS: [deploy-sw, deploy-sw-levpro] TASK TAGS: [deploy-sw, deploy-sw-lmc-base-classes]
play #2 (operational): deploy_tangobox TAGS: [] play #2 (operational): deploy_tangobox TAGS: []
TASK TAGS: [debs, deploy-box-tango-java, deploy-tangobox, deploy-tangobox-debs, deploy-tangobox-itango, deploy-tangobox-mysql, deploy-tangobox-mysql-installed, deploy-tangobox-pip, deploy-tangobox-start-tango, deploy-tangobox-tango-core, deploy-tangobox-tango-java, deploy-tangobox-tango-java-pogo, deploy-tangobox-tango-webapp, itango, mysql, pip, tango-core, tango-java] TASK TAGS: [debs, deploy-box-tango-java, deploy-tangobox, deploy-tangobox-debs, deploy-tangobox-itango, deploy-tangobox-mysql, deploy-tangobox-mysql-installed, deploy-tangobox-pip, deploy-tangobox-start-tango, deploy-tangobox-tango-core, deploy-tangobox-tango-java, deploy-tangobox-tango-java-pogo, deploy-tangobox-tango-webapp, itango, mysql, pip, tango-core, tango-java]
play #3 (operational): install_sw TAGS: [] play #3 (operational): install_sw TAGS: []
TASK TAGS: [install-sw, install-sw-levpro, install-sw-refelt, install-sw-skabase] TASK TAGS: [install-sw, install-sw-lmc-base-classes, install-sw-refelt, install-sw-skabase]
play #4 (operational): refresh_sw TAGS: [] play #4 (operational): refresh_sw TAGS: []
TASK TAGS: [refresh-sw, refresh-sw-levpro] TASK TAGS: [refresh-sw, refresh-sw-lmc-base-classes]
play #5 (operational): register_refelt TAGS: []
TASK TAGS: [register-refelt, register-refelt-in-astor, register-refelt-in-astor-ds-path, register-refelt-in-tangodb]
play #6 (operational): register_my_refelt TAGS: [] play #5 (operational): register_my_refelt TAGS: []
TASK TAGS: [register-my-refelt, register-myrefelt-in-astor, register-myrefelt-in-astor-ds-path, register-myrefelt-in-tangodb] TASK TAGS: [register-my-refelt, register-myrefelt-in-astor, register-myrefelt-in-astor-ds-path, register-myrefelt-in-tangodb]
play #7 (operational): generate_sw TAGS: [] play #6 (operational): generate_sw TAGS: []
TASK TAGS: [generate-sw, generate-sw-refelt, generate-sw-refelt-simlib, generate-sw-skabase] TASK TAGS: [generate-sw, generate-sw-refelt, generate-sw-refelt-simlib, generate-sw-skabase]
``` ```
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
python_path: /usr/lib/python2.7/site-packages python_path: /usr/lib/python2.7/site-packages
## SOFTWARE BASE DIR ## SOFTWARE BASE DIR
software_root: /home/kat/git software_root: /home/tango-cs/src
## Element personality ## Element personality
element_details: element_details:
......
---
python_path: /usr/lib/python2.7/site-packages
## SOFTWARE BASE DIR
software_root: /home/kat/src
## Element personality
element_details:
type: refelt
name: refelt5
id: ref5
instance: Ref5
...
ansible_ssh_host: levpro.devl4.camlab.kat.ac.za ansible_ssh_host: lmc.dev4.domain
special_params: special_params:
- name: spec1 - name: spec1
......
ansible_ssh_host: levpro.devl5.camlab.kat.ac.za
special_params:
- name: spec1
detail: specdet1
- name: spec2
detail: specdet2
\ No newline at end of file
[dev4]
[devlt] dev4lmc
monctl.devlt
[devl5]
devl5levpro
[devl4]
devl4levpro
[local] [local]
localhost ansible_connection=local localhost ansible_connection=local
[operational] [operational]
devl4levpro dev4lmc
devl5levpro localhost
localhost # assume local is an operational node
---
# file: init_refelt.yml
- import_playbook: deploy_tangobox.yml
- import_playbook: deploy_sw.yml
- import_playbook: generate_sw.yml
- import_playbook: install_sw.yml
- import_playbook: register_refelt.yml
{ {
"api_version": "v1", "api_version": "v1",
"tango_hosts": { "tango_hosts": {
"levpro": [ "lmc-base-classes": [
{ {
"startup_level": 1, "startup_level": 1,
"server_instances": ["SKALogger/{{ my_instance }}", "SKALogger/Central"] "server_instances": ["SKALogger/{{ my_instance }}", "SKALogger/Central"]
......
{ {
"queue": { "queue": {
"first": { "first": {
"car": "bmw", "key1": "value11",
"year": "1990", "key2": "value21",
"model": "x3", "key3": "value31",
"color": "blue" "key4": "value41"
}, },
"second": { "second": {
"car": "bmw", "key1": "value12",
"year": "2000", "key2": "value22",
"model": "318", "key3": "value32",
"color": "red" "key4": "value42"
}, },
"3rd": { "3rd": {
"car": "ref5", "key1": "value13",
"year": "2000", "key2": "value23",
"model": "ref5", "key3": "value33",
"color": "colref5" "key4": "value43"
},
"4th": {
"car": "ref4",
"year": "2000",
"model": "ref4",
"color": "colref4"
},
"5th": {
"car": "ref",
"year": "2000",
"model": "ref",
"color": "colref"
}, },
"last": { "last": {
"car": "{{ my_id }}", "key1": "{{ my_id }}",
"year": "2000", "key2": "2000",
"model": "{{ my_name }}", "key3": "{{ my_name }}",
"color": "col{{my_id}}" "key4": "col{{my_id}}"
} }
} }
} }
{ {
"api_version": "v1", "api_version": "v1",
"tango_hosts": { "tango_hosts": {
"levpro": [ "lmc-base-classes": [
{ {
"startup_level": 1, "startup_level": 1,
"server_instances": ["SKALogger/{{ my_instance }}", "SKALogger/Central"] "server_instances": ["SKALogger/{{ my_instance }}", "SKALogger/Central"]
......
{ {
"queue": { "queue": {
"first": { "first": {
"car": "bmw", "key1": "value11",
"year": "1990", "key2": "value21",
"model": "x3", "key3": "value31",
"color": "blue" "key4": "value41"
}, },
"second": { "second": {
"car": "bmw", "key1": "value12",
"year": "2000", "key2": "value22",
"model": "318", "key3": "value32",
"color": "red" "key4": "value42"
}, },
"3rd": { "3rd": {
"car": "ref5", "key1": "value13",
"year": "2000", "key2": "value23",
"model": "ref5", "key3": "value33",
"color": "colref5" "key4": "value43"
},
"4th": {
"car": "ref4",
"year": "2000",
"model": "ref4",
"color": "colref4"
},
"5th": {
"car": "ref",
"year": "2000",
"model": "ref",
"color": "colref"
}, },
"last": { "last": {
"car": "{{ my_id }}", "key1": "{{ my_id }}",
"year": "2000", "key2": "2000",
"model": "{{ my_name }}", "key3": "{{ my_name }}",
"color": "col{{my_id}}" "key4": "col{{my_id}}"
} }
} }
} }
{
"api_version": "v1",
"tango_servers": [
{
"server_name": "SvrRefA",
"server_instances": [
{
"instance_name": "1",
"device_classes": [
{
"class_name": "RefA",
"devices": ["{{ my_id }}/a/1"]
}
]
},
{
"instance_name": "2",
"device_classes": [
{
"class_name": "RefA",
"devices": ["{{ my_id }}/a/2"]
}
]
}
]
},
{
"server_name": "SvrRefAchild",
"server_instances": [
{
"instance_name": "11",
"device_classes": [
{
"class_name": "RefAchild",
"devices": ["{{ my_id }}/achild/11"]
}
]
},
{
"instance_name": "12",
"device_classes": [
{
"class_name": "RefAchild",
"devices": ["{{ my_id }}/achild/12"]
}
]
},
{
"instance_name": "21",
"device_classes": [
{
"class_name": "RefAchild",
"devices": ["{{ my_id }}/achild/21"]
}
]
},
{
"instance_name": "22",
"device_classes": [
{
"class_name": "RefAchild",
"devices": ["{{ my_id }}/achild/22"]
}
]
}
]
},
{
"server_name": "SvrRefMaster",
"server_instances": [
{
"instance_name": "{{ my_instance }}",
"device_classes": [
{
"class_name": "RefMaster",
"devices": ["{{ my_id }}/elt/master"]
}
]
}
]
},
{
"server_name": "SKALogger",
"server_instances": [
{
"instance_name": "{{ my_instance }}",
"device_classes": [
{
"class_name": "SKALogger",
"devices": ["{{ my_id }}/elt/logger"]
}
]
},
{
"instance_name": "Central",
"device_classes": [
{
"class_name": "SKALogger",
"devices": ["central/logger/1"]
}
]
}
]
},
{
"server_name": "SvrRefAlarmHandler",
"server_instances": [
{
"instance_name": "{{ my_instance }}",
"device_classes": [
{
"class_name": "RefAlarmHandler",
"devices": ["{{ my_id }}/elt/alarmhandler"]
}
]
}
]
},
{
"server_name": "SvrRefTelState",
"server_instances": [
{
"instance_name": "{{ my_instance }}",
"device_classes": [
{
"class_name": "RefTelState",
"devices": ["{{ my_id }}/elt/telstate"]
}
]
}
]
},
{
"server_name": "SvrRefSubarray",
"server_instances": [
{
"instance_name": "1",
"device_classes": [
{
"class_name": "RefSubarray",
"devices": ["{{ my_id }}/subarray/1"]
}
]
},
{
"instance_name": "2",
"device_classes": [
{
"class_name": "RefSubarray",
"devices": ["{{ my_id }}/subarray/2"]
}
]
},
{
"instance_name": "3",
"device_classes": [
{
"class_name": "RefSubarray",
"devices": ["{{ my_id }}/subarray/3"]
}
]
},
{
"instance_name": "4",
"device_classes": [
{
"class_name": "RefSubarray",
"devices": ["{{ my_id }}/subarray/4"]
}
]
}
]
},
{
"server_name": "SvrRefCapability",
"server_instances": [
{
"instance_name": "1A",
"device_classes": [
{
"class_name": "RefCapability",
"devices": ["{{ my_id }}/cap/sub1calca"]
}
]
},
{
"instance_name": "1B",
"device_classes": [
{
"class_name": "RefCapability",
"devices": ["{{ my_id }}/cap/sub1calcb"]
}
]
},
{
"instance_name": "1C",
"device_classes": [
{
"class_name": "RefCapability",
"devices": ["{{ my_id }}/cap/sub1procc"]
}
]
},
{
"instance_name": "1D",
"device_classes": [
{
"class_name": "RefCapability",
"devices": ["{{ my_id }}/cap/sub1procd"]
}
]
},
{
"instance_name": "2A",
"device_classes": [
{
"class_name": "RefCapability",
"devices": ["{{ my_id }}/cap/sub2calca"]
}
]
},
{
"instance_name": "2B",
"device_classes": [
{
"class_name": "RefCapability",
"devices": ["{{ my_id }}/cap/sub2calcb"]
}
]
},
{
"instance_name": "2C",
"device_classes": [
{
"class_name": "RefCapability",
"devices": ["{{ my_id }}/cap/sub2procc"]
}
]
},
{
"instance_name": "2D",
"device_classes": [
{
"class_name": "RefCapability",
"devices": ["{{ my_id }}/cap/sub2procd"]
}
]
}
]
},
{
"server_name": "SvrSimPdu",
"server_instances": [
{
"instance_name": "A",
"device_classes": [
{
"class_name": "PDU",
"devices": ["{{ my_id }}/pdu/a"]
},
{
"class_name": "PDUSimControl",
"devices": ["sim_control/pdu/a"]
}
]
},
{
"instance_name": "B",
"device_classes": [
{
"class_name": "PDU",
"devices": ["{{ my_id }}/pdu/b"]
},
{
"class_name": "PDUSimControl",
"devices": ["sim_control/pdu/b"]
}
]
}
]
},
{
"server_name": "SvrSimServer",
"server_instances": [
{
"instance_name": "1",
"device_classes": [
{
"class_name": "Server",
"devices": ["{{ my_id }}/server/1"]
},
{
"class_name": "ServerSimControl",
"devices": ["sim_control/server/1"]
}
]
},
{
"instance_name": "2",
"device_classes": [
{
"class_name": "Server",
"devices": ["{{ my_id }}/server/2"]
},
{
"class_name": "ServerSimControl",
"devices": ["sim_control/server/2"]
}
]
},
{
"instance_name": "3",
"device_classes": [
{
"class_name": "Server",
"devices": ["{{ my_id }}/server/3"]
},
{
"class_name": "ServerSimControl",
"devices": ["sim_control/server/3"]
}
]
},
{
"instance_name": "4",
"device_classes": [
{
"class_name": "Server",
"devices": ["{{ my_id }}/server/4"]
},
{
"class_name": "ServerSimControl",
"devices": ["sim_control/server/4"]
}
]
}
]
},
{
"server_name": "SvrSimRack",
"server_instances": [
{
"instance_name": "A",
"device_classes": [
{
"class_name": "Rack",
"devices": ["{{ my_id }}/rack/a"]
},
{
"class_name": "RackSimControl",
"devices": ["sim_control/rack/a"]
}
]
},
{
"instance_name": "B",
"device_classes": [
{
"class_name": "Rack",
"devices": ["{{ my_id }}/rack/b"]
},
{
"class_name": "RackSimControl",
"devices": ["sim_control/rack/b"]
}
]
}
]
},
{
"server_name": "SvrSimSwitch",
"server_instances": [
{
"instance_name": "A",
"device_classes": [
{
"class_name": "Switch",
"devices": ["{{ my_id }}/switch/a"]
},
{
"class_name": "SwitchSimControl",
"devices": ["sim_control/switch/a"]
}
]
},
{
"instance_name": "B",
"device_classes": [
{
"class_name": "Switch",
"devices": ["{{ my_id }}/switch/b"]
},
{
"class_name": "SwitchSimControl",
"devices": ["sim_control/switch/b"]
}
]
}
]
}
]
}
{
"api_version": "v1",
"global": {
"Logging": {
"CentralLoggingTarget": "central/logger/1",
"ElementLoggingTarget": "{{ my_id }}/elt/logger",
"StorageLoggingTarget": "/dev/log",
"CentralLoggingLevelDefault": 2,
"ElementLoggingLevelDefault": 3,
"StorageLoggingLevelDefault": 4
}
},
"devices": {
"{{ my_id }}/a/1": {
"GroupDefinitions":
[
{"group_name": "children",
"devices": ["{{ my_id }}/achild/11", "{{ my_id }}/achild/12"]}
]
},
"{{ my_id }}/a/2": {
"GroupDefinitions":
[
{"group_name": "children",
"devices": ["{{ my_id }}/achild/21", "{{ my_id }}/achild/22"]}
]
},
"{{ my_id }}/elt/master": {
"NrSubarrays": 4,
"CapabilityTypes": ["calca", "calcb", "procc", "procd"],
"GroupDefinitions":
[
{"group_name": "subarrays",
"devices": ["{{ my_id }}/subarray/1", "{{ my_id }}/subarray/2",
"{{ my_id }}/subarray/3", "{{ my_id }}/subarray/4"]},
{"group_name": "servers",
"devices": ["{{ my_id }}/server/1", "{{ my_id }}/server/2",
"{{ my_id }}/server/3", "{{ my_id }}/server/4"]},
{"group_name": "switches",
"devices": ["{{ my_id }}/switch/a", "{{ my_id }}/switch/b"]},
{"group_name": "pdus",
"devices": ["{{ my_id }}/pdu/a", "{{ my_id }}/pdu/b"]},
{"group_name": "racks",
"devices": ["{{ my_id }}/rack/a", "{{ my_id }}/rack/b"],
"subgroups": [
{"group_name": "rackA",
"devices": ["{{ my_id }}/server/1", "{{ my_id }}/server/2",
"{{ my_id }}/switch/a", "{{ my_id }}/pdu/a"]},
{"group_name": "rackB",
"devices": ["{{ my_id }}/server/3", "{{ my_id }}/server/4",
"{{ my_id }}/switch/b", "{{ my_id }}/pdu/b"]}
]
}
]
},
"{{ my_id }}/subarray/1": {
"GroupDefinitions":
[
{"group_name": "capabilities",
"devices": ["{{ my_id }}/cap/sub1calca", "{{ my_id }}/cap/sub1calcb",
"{{ my_id }}/cap/sub1procc", "{{ my_id }}/cap/sub1procd"]}
]
},
"{{ my_id }}/subarray/2": {
"GroupDefinitions":
[
{"group_name": "capabilities",
"devices": ["{{ my_id }}/cap/sub2calca", "{{ my_id }}/cap/sub2calcb",
"{{ my_id }}/cap/sub2procc", "{{ my_id }}/cap/sub2procd"]}
]
},
"{{ my_id }}/subarray/3": {
"GroupDefinitions":
[
{"group_name": "capabilities",
"devices": ["{{ my_id }}/cap/sub3calca", "{{ my_id }}/cap/sub3calcb",
"{{ my_id }}/cap/sub3procc", "{{ my_id }}/cap/sub3procd"]}
]
},
"{{ my_id }}/subarray/4": {
"GroupDefinitions":
[
{"group_name": "capabilities",
"devices": ["{{ my_id }}/cap/sub4calca", "{{ my_id }}/cap/sub4calcb",
"{{ my_id }}/cap/sub4procc", "{{ my_id }}/cap/sub4procd"]}
]
},
"{{ my_id }}/elt/logger": {
"Config": []
},
"{{ my_id }}/elt/telstate": {
"TelStateConfigFile": []
},
"{{ my_id }}/elt/alarmhandler": {
"Config": []
},
"central/logger/1": {
"Config": []
}
}
}
{
"api_version": "v1",
"tango_hosts": {
"levpro": [
{
"startup_level": 1,
"server_instances": ["SKALogger/{{ my_instance }}", "SKALogger/Central"]
},
{
"startup_level": 2,
"server_instances": ["SvrRefAchild/11", "SvrRefAchild/12",
"SvrRefAchild/21", "SvrRefAchild/22",
"SvrRefCapability/1A", "SvrRefCapability/1B",
"SvrRefCapability/1C", "SvrRefCapability/1D",
"SvrRefCapability/2A", "SvrRefCapability/2B",
"SvrRefCapability/2C", "SvrRefCapability/2D",
"SvrSimPdu/A", "SvrSimPdu/B",
"SvrSimServer/1", "SvrSimServer/2",
"SvrSimServer/3", "SvrSimServer/4",
"SvrSimRack/A", "SvrSimRack/B",
"SvrSimSwitch/A", "SvrSimSwitch/B"]
},
{
"startup_level": 3,
"server_instances": ["SvrRefA/1", "SvrRefA/2",
"SvrRefCapabilityA/1", "SvrRefCapabilityA/2",
"SvrRefCapabilityA/3", "SvrRefCapabilityA/4"]
},
{
"startup_level": 4,
"server_instances": ["SvrRefSubarray/1", "SvrRefSubarray/2",
"SvrRefSubarray/3", "SvrRefSubarray/4"]
},
{
"startup_level": 5,
"server_instances": ["SvrRefMaster/{{ my_instance }}",
"SvrRefAlarmHandler/{{ my_instance }}",
"SvrRefTelState/{{ my_instance }}"]
}
]
}
}
\ No newline at end of file
{
"queue": {
"first": {
"car": "bmw",
"year": "1990",
"model": "x3",
"color": "blue"
},
"second": {
"car": "bmw",
"year": "2000",
"model": "318",
"color": "red"
},
"3rd": {
"car": "ref5",
"year": "2000",
"model": "ref5",
"color": "colref5"
},
"4th": {
"car": "ref4",
"year": "2000",
"model": "ref4",
"color": "colref4"
},
"5th": {
"car": "ref",
"year": "2000",
"model": "ref",
"color": "colref"
},
"last": {
"car": "{{ my_id }}",
"year": "2000",
"model": "{{ my_name }}",
"color": "col{{my_id}}"
}
}
}
{
"api_version": "v1",
"tango_servers": [
{
"server_name": "SvrRefA",
"server_instances": [
{
"instance_name": "1",
"device_classes": [
{
"class_name": "RefA",
"devices": ["{{ my_id }}/a/1"]
}
]
},
{
"instance_name": "2",
"device_classes": [
{
"class_name": "RefA",
"devices": ["{{ my_id }}/a/2"]
}
]
}
]
},
{
"server_name": "SvrRefAchild",
"server_instances": [
{
"instance_name": "1",
"device_classes": [
{
"class_name": "RefAchild",
"devices": ["{{ my_id }}/achild/11", "{{ my_id }}/achild/12"]
}
]
},
{
"instance_name": "2",
"device_classes": [
{
"class_name": "RefAchild",
"devices": ["{{ my_id }}/achild/21", "{{ my_id }}/achild/22"]
}
]
}
]
},
{
"server_name": "SvrRefMaster",
"server_instances": [
{
"instance_name": "{{ my_instance }}",
"device_classes": [
{
"class_name": "RefMaster",
"devices": ["{{ my_id }}/elt/master"]
}
]
}
]
},
{
"server_name": "SKALogger",
"server_instances": [
{
"instance_name": "{{ my_instance }}",
"device_classes": [
{
"class_name": "SKALogger",
"devices": ["{{ my_id }}/elt/logger"]
}
]
},
{
"instance_name": "Central",
"device_classes": [
{
"class_name": "SKALogger",
"devices": ["central/logger/1"]
}
]
}
]
},
{
"server_name": "SvrRefAlarmHandler",
"server_instances": [
{
"instance_name": "{{ my_instance }}",
"device_classes": [
{
"class_name": "RefAlarmHandler",
"devices": ["{{ my_id }}/elt/alarmhandler"]
}
]
}
]
},
{
"server_name": "SvrRefTelState",
"server_instances": [
{
"instance_name": "{{ my_instance }}",
"device_classes": [
{
"class_name": "RefTelState",
"devices": ["{{ my_id }}/elt/telstate"]
}
]
}
]
},
{
"server_name": "SvrRefSubarray",
"server_instances": [
{
"instance_name": "1",
"device_classes": [
{
"class_name": "RefSubarray",
"devices": ["{{ my_id }}/subarray/1"]
}
]
},
{
"instance_name": "2",
"device_classes": [
{
"class_name": "RefSubarray",
"devices": ["{{ my_id }}/subarray/2"]
}
]
},
{
"instance_name": "3",
"device_classes": [
{
"class_name": "RefSubarray",
"devices": ["{{ my_id }}/subarray/3"]
}
]
},
{
"instance_name": "4",
"device_classes": [
{
"class_name": "RefSubarray",
"devices": ["{{ my_id }}/subarray/4"]
}
]
}
]
},
{
"server_name": "SvrRefCapability",
"server_instances": [
{
"instance_name": "1",
"device_classes": [
{
"class_name": "RefCapability",
"devices": ["{{ my_id }}/cap/sub1calca",
"{{ my_id }}/cap/sub1calcb",
"{{ my_id }}/cap/sub1procc",
"{{ my_id }}/cap/sub1procd"]
}
]
},
{
"instance_name": "2",
"device_classes": [
{
"class_name": "RefCapability",
"devices": ["{{ my_id }}/cap/sub2calca",
"{{ my_id }}/cap/sub2calcb",
"{{ my_id }}/cap/sub2procc",
"{{ my_id }}/cap/sub2procd"]
}
]
},
{
"instance_name": "3",
"device_classes": [
{
"class_name": "RefCapability",
"devices": ["{{ my_id }}/cap/sub3calca",
"{{ my_id }}/cap/sub3calcb",
"{{ my_id }}/cap/sub3procc",
"{{ my_id }}/cap/sub3procd"]
}
]
},
{
"instance_name": "4",
"device_classes": [
{
"class_name": "RefCapability",
"devices": ["{{ my_id }}/cap/sub4calca",
"{{ my_id }}/cap/sub4calcb",
"{{ my_id }}/cap/sub4procc",
"{{ my_id }}/cap/sub4procd"]
}
]
}
]
},
{
"server_name": "SvrSimPdu",
"server_instances": [
{
"instance_name": "A",
"device_classes": [
{
"class_name": "PDU",
"devices": ["{{ my_id }}/pdu/a"]
},
{
"class_name": "PDUSimControl",
"devices": ["sim_control/pdu/a"]
}
]
},
{
"instance_name": "B",
"device_classes": [
{
"class_name": "PDU",
"devices": ["{{ my_id }}/pdu/b"]
},
{
"class_name": "PDUSimControl",
"devices": ["sim_control/pdu/b"]
}
]
}
]
},
{
"server_name": "SvrSimServer",
"server_instances": [
{
"instance_name": "1",
"device_classes": [
{
"class_name": "Server",
"devices": ["{{ my_id }}/server/1"]
},
{
"class_name": "ServerSimControl",
"devices": ["sim_control/server/1"]
}
]
},
{
"instance_name": "2",
"device_classes": [
{
"class_name": "Server",
"devices": ["{{ my_id }}/server/2"]
},
{
"class_name": "ServerSimControl",
"devices": ["sim_control/server/2"]
}
]
},
{
"instance_name": "3",
"device_classes": [
{
"class_name": "Server",
"devices": ["{{ my_id }}/server/3"]
},
{
"class_name": "ServerSimControl",
"devices": ["sim_control/server/3"]
}
]
},
{
"instance_name": "4",
"device_classes": [
{
"class_name": "Server",
"devices": ["{{ my_id }}/server/4"]
},
{
"class_name": "ServerSimControl",
"devices": ["sim_control/server/4"]
}
]
}
]
},
{
"server_name": "SvrSimRack",
"server_instances": [
{
"instance_name": "A",
"device_classes": [
{
"class_name": "Rack",
"devices": ["{{ my_id }}/rack/a"]
},
{
"class_name": "RackSimControl",
"devices": ["sim_control/rack/a"]
}
]
},
{
"instance_name": "B",
"device_classes": [
{
"class_name": "Rack",
"devices": ["{{ my_id }}/rack/b"]
},
{
"class_name": "RackSimControl",
"devices": ["sim_control/rack/b"]
}
]
}
]
},
{
"server_name": "SvrSimSwitch",
"server_instances": [
{
"instance_name": "A",
"device_classes": [
{
"class_name": "Switch",
"devices": ["{{ my_id }}/switch/a"]
},
{
"class_name": "SwitchSimControl",
"devices": ["sim_control/switch/a"]
}
]
},
{
"instance_name": "B",
"device_classes": [
{
"class_name": "Switch",
"devices": ["{{ my_id }}/switch/b"]
},
{
"class_name": "SwitchSimControl",
"devices": ["sim_control/switch/b"]
}
]
}
]
}
]
}
{
"api_version": "v1",
"tango_hosts": {
"levpro": [
{
"startup_level": 1,
"server_instances": ["SKALogger/{{ my_instance }}", "SKALogger/Central"]
},
{
"startup_level": 2,
"server_instances": ["SvrSimPdu/A", "SvrSimPdu/B",
"SvrSimServer/1", "SvrSimServer/2",
"SvrSimServer/3", "SvrSimServer/4",
"SvrSimRack/A", "SvrSimRack/B",
"SvrSimSwitch/A", "SvrSimSwitch/B"]
},
{
"startup_level": 3,
"server_instances": ["SvrRefAchild/11", "SvrRefAchildA/12",
"SvrRefAchild/21", "SvrRefAchildA/22",
"SvrRefCapability/1", "SvrRefCapability/2",
"SvrRefCapability/3", "SvrRefCapability/4"]
},
{
"startup_level": 4,
"server_instances": ["SvrRefA/1", "SvrRefA/2",
"SvrRefSubarray/1", "SvrRefSubarray/2",
"SvrRefSubarray/3", "SvrRefSubarray/4"]
},
{
"startup_level": 5,
"server_instances": ["SvrRefMaster/{{ my_instance }}", "SvrRefAlarmHandler/{{ my_instance }}", "SvrRefTelState/{{ my_instance }}"]
}
]
}
}
{
"api_version": "v1",
"global": {
"CentralLoggingTarget": "central/logger/1",
"ElementLoggingTarget": "{{ my_id }}/elt/logger",
"StorageLoggingTarget": "/dev/log",
"CentralLoggingLevelDefault": 2,
"ElementLoggingLevelDefault": 3,
"StorageLoggingLevelDefault": 3
},
"devices": {
"{{ my_id }}/a/1": {
"GroupDefinitions":
[
{"group_name": "children",
"devices": ["{{ my_id }}/achild/11", "{{ my_id }}/achild/12"]}
]
},
"{{ my_id }}/a/2": {
"GroupDefinitions":
[
{"group_name": "children",
"devices": ["{{ my_id }}/achild/21", "{{ my_id }}/achild/22"]}
]
},
"{{ my_id }}/elt/master": {
"NrSubarrays": 4,
"CapabilityTypes": ["calca", "calcb", "procc", "procd"],
"GroupDefinitions":
[
{"group_name": "subarrays",
"devices": ["{{ my_id }}/subarray/1", "{{ my_id }}/subarray/2",
"{{ my_id }}/subarray/3", "{{ my_id }}/subarray/4"]},
{"group_name": "servers",
"devices": ["{{ my_id }}/server/1", "{{ my_id }}/server/2",
"{{ my_id }}/server/3", "{{ my_id }}/server/4"]},
{"group_name": "switches",
"devices": ["{{ my_id }}/switch/a", "{{ my_id }}/switch/b"]},
{"group_name": "pdus",
"devices": ["{{ my_id }}/pdu/a", "{{ my_id }}/pdu/b"]},
{"group_name": "racks",
"devices": ["{{ my_id }}/rack/a", "{{ my_id }}/rack/b"],
"subgroups": [
{"group_name": "rackA",
"devices": ["{{ my_id }}/server/1", "{{ my_id }}/server/2",
"{{ my_id }}/switch/a", "{{ my_id }}/pdu/a"]},
{"group_name": "rackB",
"devices": ["{{ my_id }}/server/3", "{{ my_id }}/server/4",
"{{ my_id }}/switch/b", "{{ my_id }}/pdu/b"]}
]
}
]
},
"{{ my_id }}/subarray/1": {
"GroupDefinitions":
[
{"group_name": "capabilities",
"devices": ["{{ my_id }}/cap/sub1calca", "{{ my_id }}/cap/sub1calcb",
"{{ my_id }}/cap/sub1procc", "{{ my_id }}/cap/sub1procd"]}
]
},
"{{ my_id }}/subarray/2": {
"GroupDefinitions":
[
{"group_name": "capabilities",
"devices": ["{{ my_id }}/cap/sub2calca", "{{ my_id }}/cap/sub2calcb",
"{{ my_id }}/cap/sub2procc", "{{ my_id }}/cap/sub2procd"]}
]
},
"{{ my_id }}/subarray/3": {
"GroupDefinitions":
[
{"group_name": "capabilities",
"devices": ["{{ my_id }}/cap/sub3calca", "{{ my_id }}/cap/sub3calcb",
"{{ my_id }}/cap/sub3procc", "{{ my_id }}/cap/sub3procd"]}
]
},
"{{ my_id }}/subarray/4": {
"GroupDefinitions":
[
{"group_name": "capabilities",
"devices": ["{{ my_id }}/cap/sub4calca", "{{ my_id }}/cap/sub4calcb",
"{{ my_id }}/cap/sub4procc", "{{ my_id }}/cap/sub4procd"]}
]
},
"{{ my_id }}/elt/logger": {
"Config": []
},
"{{ my_id }}/elt/telstate": {
"TelStateConfigFile": []
},
"{{ my_id }}/elt/alarmhandler": {
"Config": []
},
"sim_control/pdu/A": {
"model_key": "{{ my_id }}/pdu/a"
},
"sim_control/pdu/B": {
"model_key": "{{ my_id }}/pdu/b"
},
"sim_control/server/1": {
"model_key": "{{ my_id }}/server/1"
},
"sim_control/server/2": {
"model_key": "{{ my_id }}/server/2"
},
"sim_control/server/3": {
"model_key": "{{ my_id }}/server/3"
},
"sim_control/server/4": {
"model_key": "{{ my_id }}/server/4"
},
"sim_control/rack/A": {
"model_key": "{{ my_id }}/rack/a"
},
"sim_control/rack/B": {
"model_key": "{{ my_id }}/rack/b"
},
"sim_control/switch/A": {
"model_key": "{{ my_id }}/switch/a"
},
"sim_control/switch/B": {
"model_key": "{{ my_id }}/switch/b"
},
"central/logger/1": {
"Config": []
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment