From 81e06b46b129269739d7cdef2231f640d0f6f6a6 Mon Sep 17 00:00:00 2001 From: Anton Joubert <ajoubert@ska.ac.za> Date: Tue, 11 Sep 2018 23:49:15 +0200 Subject: [PATCH] Update ansible readme and docker notes Add some info on which ansible tasks to run in a Docker. The startup of some elements stills fails sometimes (e.g. SKALogger servers did not work in recent test). Remove old items from generate_sw task, and deprecate the original register_refelt task. --- ansible/README.md | 45 +++++++++++++++++--- ansible/roles/generate_sw/tasks/main.yml | 5 +-- ansible/roles/register_refelt/tasks/main.yml | 6 +++ 3 files changed, 45 insertions(+), 11 deletions(-) diff --git a/ansible/README.md b/ansible/README.md index adcf3772..b3523393 100644 --- a/ansible/README.md +++ b/ansible/README.md @@ -1,5 +1,5 @@ -# LEvPro Deployment Notes -Notes for LEvPRo deployment can be found in: +# Deployment Notes +Old notes for LEvPRo deployment can be found in: [LEvPro Deployment Notes](https://docs.google.com/document/d/12f495FEMOi0g3bJjoZL3icZaCCr7iSjTY3jToFqA2Ns/edit#) ## Recent changes @@ -15,12 +15,37 @@ Added deregister_refelts to remove registrations in Tango DB and Astor so that w Get the desired inventories from ansible variables instead of loading files -# To get going with a fresh node: +# To get going with a fresh node (Docker container): + +## Run a Docker container: +Follow the steps in `../docker/README.md`. Launch the docker with the levpro 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. + +## Install the levpro python modules and register TANGO devices ``` -fab proxmox.create_nodes_by_group:devXX, -ssh kat@levpro.devXX.camlab.kat.ac.za +cd ~/src/levpro/ansible +./play-task.sh install-sw +./play-task.sh generate-sw-refelt-simlib +./play-task.sh register-my-refelt local # startup can take 5 minutes! ``` +Note: `register-refelt` is deprecated. + +## Updating after .xmi file changes (POGO generation) +``` +cd ~/src/levpro/ansible +./play-task.sh deregister_refelts.yml +./play-task.sh generate-sw +./play-task.sh register-my-refelt local +``` + +Note: license file text may need to be updated in POGO generated files. + +# To get going with a fresh Ubuntu 14.04 system (not recommended!): + +If you don't have Docker, you could try a virtual machine. The ansible playbooks and instructions below have only been used on Ubuntu 14.04, so your mileage may vary on other versions of Linux. + ## Install latest version of pip (required on Ubuntu 14.04): Old Ubuntu packages cause an issue, so remove manually. Can't easily be done using Ansible, since removing the Python packages removes ansible while it is running! ``` @@ -48,15 +73,21 @@ git clone https://github.com/ska-sa/levpro ~/src/levpro cd ~/src/levpro/ansible ./play-task.sh deploy-tangobox ./play-task.sh deploy-sw -./play-task.sh refresh-sw # Not required for fresh node ./play-task.sh generate-sw ./play-task.sh install-sw -./play-task.sh register-refelt +./play-task.sh register-my-refelt local Optional: ./play-task.sh register-my-refelt devXn ./play-task.sh deregister_refelts.yml ``` +## Updating after .xmi file changes (POGO generation) +``` +cd ~/src/levpro/ansible +./play-task.sh deregister_refelts.yml +./play-task.sh generate-sw +./play-task.sh register-my-refelt local +``` # play-task - A utility to run a single specific task (based on ROLE tags and TASK IDs described in NOTES below) diff --git a/ansible/roles/generate_sw/tasks/main.yml b/ansible/roles/generate_sw/tasks/main.yml index e2f93725..b649627d 100644 --- a/ansible/roles/generate_sw/tasks/main.yml +++ b/ansible/roles/generate_sw/tasks/main.yml @@ -47,10 +47,7 @@ - RefAlarmHandler - RefB - RefBchild - - RefCapCorrelator - - RefCapPssBeams - - RefCapPstBeams - - RefCapVlbiBeams + - RefCapabilityA - RefSubarray - RefTelState - Server diff --git a/ansible/roles/register_refelt/tasks/main.yml b/ansible/roles/register_refelt/tasks/main.yml index fe821d4b..361d5e2c 100644 --- a/ansible/roles/register_refelt/tasks/main.yml +++ b/ansible/roles/register_refelt/tasks/main.yml @@ -1,4 +1,10 @@ --- +# +# +# !!!!!!!! DEPRECATED - use register_my_refelt !!!!!!!!!!! +# +# + # THIS IS SPECIFIC FOR REFELT - JUST TO GET A REFELT REGISTERED # GENERALISATION OF CONFIG AND FOR OTHER ELEMENTS IS TBD -- GitLab