simple-framework / simple_grid_yaml_compiler

Generates the extended YAML output for an input site_level_configuration_file
Apache License 2.0
0 stars 9 forks source link

Split config if a component is deployed on multiple nodes #13

Closed maany closed 5 years ago

maany commented 5 years ago
- repository_url: https://github.com/WLCG-Lightweight-Sites/wlcg_lightweight_site_wn_pbs
  nodes:
  - node: lw-site-droplet-0,
    container_count: 3
  - node: ec2-18-184-37-92.eu-central-1,
    container_count: 3
  config:
    px_host: myproxy.cern.ch
    batch_server:
    - lw-site-droplet-0

In the above site-level-config file snippet, we are deploying cream ce on 2 nodes, namely lw-site-droplet-0 and ec2-18-184-37-92.eu-central-1. When the puppet module is running pre-config.py on a particular node, it may need the hostname of the node where it is being deployed. In the pre-config.py for cream, we need to provide hostname of VM where the container is being deployed. As we choose to trust the information in the site-level-configuration-file, we parse the file and find the lightweight-component section that contains config for the current node in the pre-config.py script. Now we encounter 2 nodes and do not know which node's hostname is to be used for the current container's configuration. (CE_HOST in this case). Therefore, we should split the above configuration in the compiler into exactly similar YAML sections for the nodes and assign them different id's.