Giter VIP home page Giter VIP logo

kuutti's Introduction

Provision instructions

Assume that headnode and compute nodes are created, st. compute nodes are accessible from headnode. See step 5) for naming.

Sometimes during first run of playbook there is problems with /bin/python no being found. Just run the playbook again and it shloud fix itself.

  1. ssh to headnode
  2. create a ssh key of type rsa
  3. add wanted keys to authorize keys (including headnode´s own ssh key!)
  4. close ssh connection
  5. Crete inventory.yml
    • It has to contain groups:
      • login_server
        • With only one entry
      • compute_servers
        • Hostnames of compute_servers must be in form <kuutti_computenode_common_hostname_prefix>-<ordinal_number>
    • Hosts are given in form <hostname> ansible_host=<local_ip> ansible_user=<user_that_ansible_ssh_into>
      • kuutti role assumes at some point that dir /home/<user_that_ansible_ssh_into>/ exists

If using openstack create_inventory.py script can help (remember to modify variables inside).

  1. Copy kuutti to floating ip with:

scp -r -O <path_to_kuutti> cc@$FLOATING_IP:/home/cc

  1. ssh to loginnode
  2. install required ansible stuff with:
ansible-galaxy install -r requirements.yml
ansible-galaxy collection install -r requirements.yml
  1. Set variables in vars/main.yml

    • Set user names in vars/main.yml users variable as list of the user names
    • Also set kuutti_path_to_user_public_keys to full path of directory containg pulic keys of users in format <user_name>.pub

)

ANSIBLE_REMOTE_TMP=/tmp ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -i inventory.yml provision_cluster.yml

Removed steps (only for historic purposes)

  • save floating ip of loging node as FLOATING_IP
  • save the public key of loging node as LOGIN_PUB
LOGIN_PUB='<public_key>'
  • Append login node public key to all servers authorized keys: (ssh command will also be run for all ips (static and floating) in the project. It will fail for the oneas that do not have right keys setup and id does not matter if it succeess for floating)
openstack server list | grep -oE '([[:digit:]]{1,3}\.){3}[[:digit:]]{1,3}' | while read ln; do ssh -o StrictHostKeyChecking=no -J cc@$FLOATING_IP cc@$ln "echo '$LOGIN_PUB' >> .ssh/authorized_keys" < /dev/null; done

kuutti's People

Contributors

miropalmu avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.