We have made available in Github a series of templates for automating a number of aspects of provisioning and configuring your instances to tailor them to your needs.

Ansible templates

Ansible is a very popular automation tool that can be used to configure and customise your instances and other operations. We have published a number of Ansible Playbooks and Roles to carry out specific operations and customisations on the EWC that you can mix and match.

Ansible playbook repositories

Generic usage instructions

Each of those repositories will have specific instructions on how to use them, but here are the fundamental steps to get started if you want to use them directly on the command line or CI/CD pipeline:


Ansible role repositories

These are the basic building blocks upon which the provided playbooks are built, so you can create your own Ansible playbooks combining them as you see fit. All these repositories are clearly named with the prefix "ewc-ansible-role-":

Advanced: How to use your custom Ansible playbook using provided Ansible roles

For advanced users with existing Ansible playbooks and greater customisation needs, it is possible to just pick and choose roles you are interested and include them into your own playbooks, instead of running separate playbooks. You can find the URLs for each of the dependant roles in the requirements.yml file. 

  1. Make sure the necessary roles are installed. For that you may install them with ansible-galaxy either individually or writing your own requirements.yml. See the official Ansible documentation for more details on how to create such file.
    ansible-galaxy role install -r requirements.yml roles/
  2. In your playbook, you can include the roles that you are interested in. For example, here is a playbook that includes 3 roles and customises some variables :
    ---
    - hosts: all
      become: yes
      vars:
        conda_prefix: /opt/conda
      tasks:
        - name: Mars client
          ansible.builtin.include_role:
            name: ewc-ansible-role-mars-client
     
        - name: ML basic stack
          ansible.builtin.include_role:
            name: ewc-ansible-role-ml-basic
     
        - name: Anemoi
          ansible.builtin.include_role:
            name: ewc-ansible-role-ecmwf-anemoi
    
    

    See the official Ansible documentation for more information on roles and how to include them. 

Check each specific role documentation in the URLs above to see all the variables you may customise when running the automation.