duartej / openstack-tbdanalysis

Instructions, setup and configuration for the TB analysis VM at CERN's openstack
GNU General Public License v3.0
0 stars 0 forks source link

Openstack virtual machine setup-up: cmsit-tb

Virtual machines to run EUTelescope analysis code accessing Test beam EOS data

Table of Contents
  1. Instances creation
  2. Usage instructions
  3. Troubleshooting
  4. Deployment
  5. Maintenance & Development

Instances creation

Create the multipart file to be used for the user configuration:

write-mime-multipart -o user_data_context_mlt.txt user_data_ci.txt user_data_bs.txt

Template file cmsit_tb_group_stack.yaml for orchestration:

heat_template_version: 2018-03-02

description: >
    Create  VM instances servers for CMS Inner Tracker Phase-II
    test beam analysis

resources:
    group:
        type: OS::Heat::ResourceGroup
        properties:
            count: 10
            resource_def:
                type: OS::Nova::Server
                properties:
                    name: "cmsit-tba0%index%"
                    key_name: lxplus
                    image: 65bc0185-7fba-4b08-b256-cfc7576d9dda
                    flavor: m2.large
                    metadata: {"cern-services": "true",
                        "landb-description":"TEST-BEAM EUDET type dockerized analysis server",
                        "landb-os": "LINUX",
                        "landb-mainuser": "CMS-IT-TB-SPS"
                        }
                    user_data_format: RAW
                    user_data:
                        get_file: user_data_context_mlt.txt

Create the stack of servers (10) using the template in the file cmsit_tb_group_stack.yaml:

openstack --os-project-id c44e1040-5691-4ea5-881c-eb9a4b4d97e6 stack create -t cmsit_tb_group_stack.yaml cmsit-tba

A stack of servers named cmsit-tb0\<ID>.cern.ch will be created. Note there is no mechanism to balance the access to the servers so far. (TODO: Incorporate the servers into the puppet configuration mechanism and integrate them into an automatic load balancer)

Usage Instructions

In order to be able to access in the VM machine you have to belong to the CMS-IT-TB-SPS e-group. Using your NICE user:

ssh -oGSSAPIDelegateCredentials=no <your user>@cmsit-tb0<ID>.cern.ch

Being <ID> any number between 0 and 9. Note the -o option in order not to accept delegated kerberos credentials. This will avoid having problems with the AFS filesystem within the docker analysis container.

Those machines are intented to be used in a similar way than the lxplus machines, that means you will have access to your home AFS (which is your home here as well), several EOS directories (including CMS-related and USER) and some CVMFS software (desy).

Services

Analysis container

Once logged into the cmsit-tb0<ID> machine, you can launch the docker container with the needed code to perform the EUTelescope offline analysis.

docker-analysis

The above command will create a container and give you a terminal inside it. Marlin, root and other offline analysis commands are available in there. Again, /afs and /eos folders are available, as well.

The steering files from the EUTelescope processor can be found in the docker-container at:

Troubleshooting

Deployment

Every time any of the main codes and configuration elements are modified, the stack should be reinitialized. The easy, less error-prone way to do it, is by destroying and re-creating the stack. The main codes are:

And the main configuration elements:

The list of commands to destroy and create again the stack are described below. The openstack commands are available at lxplus-cloud.cern.ch.

Obtain the project id to be used with --os-project-id

$ openstack project list

Destroy the stack

# First get the stack id
$ openstack --os-project-id <PROJECTID> stack list
# Then delete them
$ openstack --os-project-id <PROJECTID> stack delete <STACKID>

Wait until the vm instances are actually destroyed and all the resources freed.

Create the stack

Before create the stack, and if needed, create the multipart file

# Create the multipart config file
write-mime-multipart -o user_data_context_mlt.txt user_data_ci.txt user_data_bs.txt
# Create the stack
openstack --os-project-id c44e1040-5691-4ea5-881c-eb9a4b4d97e6 stack create -t cmsit_tb_group_stack.yaml cmsit-tba

Maintenance and development

References