Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ssh key for ubuntu user to be able to ssh to NCI workers more easily #2264

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dev-handler_playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
- group_vars/dev_slurm.yml
- host_vars/dev.gvl.org.au.yml
- host_vars/dev-handlers.gvl.org.au.yml
- secret_group_vars/ubuntu_maintenance_key
- secret_group_vars/ssh_keys
- secret_group_vars/stats_server_vault
- secret_group_vars/dev_secrets
- secret_group_vars/sentry_vault
Expand Down
2 changes: 1 addition & 1 deletion dev-pulsar_playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
- group_vars/dev_pulsar_slurm.yml
- group_vars/VAULT
- host_vars/dev-pulsar.gvl.org.au.yml
- secret_group_vars/ubuntu_maintenance_key
- secret_group_vars/ssh_keys
- secret_group_vars/stats_server_vault
pre_tasks:
- name: apt update
Expand Down
2 changes: 1 addition & 1 deletion dev_playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
- group_vars/galaxyservers.yml
- group_vars/dev_slurm.yml
- host_vars/dev.gvl.org.au.yml
- secret_group_vars/ubuntu_maintenance_key
- secret_group_vars/ssh_keys
- secret_group_vars/stats_server_vault
- secret_group_vars/dev_secrets
- secret_group_vars/sentry_vault
Expand Down
2 changes: 1 addition & 1 deletion dev_update_configs_playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
- group_vars/dev_slurm.yml
- host_vars/dev.gvl.org.au.yml
- host_vars/dev-handlers.gvl.org.au.yml
- secret_group_vars/ubuntu_maintenance_key
- secret_group_vars/ssh_keys
- secret_group_vars/dev_secrets
handlers:
- include: handlers/galaxy_handlers.yml
Expand Down
1 change: 1 addition & 0 deletions files/keys/pulsar_internal_hop_key.pub
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDZHp4U2WsvJMYyholic8UId8YLNX+D5fYDrqKVlUIz95yeEK/drTGp6Qjng0uHz7976TdLRaVKQfarcMwHiVPu/HufdcR8LBuzgpgrWinTrahAXfmejGEHl3cJ+PC2nTpUY5nMhhtIPHBDUXFGz2tup8HTfyt3JkDLwc+4XF7SyQ== pulsar_internal_hop_key
2 changes: 1 addition & 1 deletion galaxy-backup_playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
- group_vars/VAULT
- host_vars/galaxy-backup.yml
- secret_group_vars/stats_server_vault
- secret_group_vars/ubuntu_maintenance_key
- secret_group_vars/ssh_keys
pre_tasks:
- name: Attach volume to instance
include_role:
Expand Down
2 changes: 1 addition & 1 deletion galaxy-db_playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
- group_vars/dbservers.yml
- host_vars/galaxy-db.usegalaxy.org.au.yml
- secret_group_vars/stats_server_vault
- secret_group_vars/ubuntu_maintenance_key
- secret_group_vars/ssh_keys
pre_tasks:
- name: Attach volume to instance
include_role:
Expand Down
2 changes: 1 addition & 1 deletion galaxy-handlers_playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
- host_vars/galaxy.usegalaxy.org.au.yml
- host_vars/galaxy-handlers.usegalaxy.org.au.yml
- secret_group_vars/stats_server_vault
- secret_group_vars/ubuntu_maintenance_key
- secret_group_vars/ssh_keys
- secret_group_vars/etca_vault.yml
pre_tasks:
- name: Attach volume to instance
Expand Down
2 changes: 1 addition & 1 deletion galaxy-job-nfs_playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
- group_vars/nfs_servers.yml
- host_vars/galaxy-job-nfs.usegalaxy.org.au.yml
- secret_group_vars/stats_server_vault
- secret_group_vars/ubuntu_maintenance_key
- secret_group_vars/ssh_keys
pre_tasks:
- name: Attach volume to instance
include_role:
Expand Down
2 changes: 1 addition & 1 deletion galaxy-misc-nfs_playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
- group_vars/VAULT
- group_vars/nfs_servers.yml
- host_vars/galaxy-misc-nfs.usegalaxy.org.au.yml
- secret_group_vars/ubuntu_maintenance_key
- secret_group_vars/ssh_keys
- secret_group_vars/stats_server_vault
pre_tasks:
- name: Create nfs directories
Expand Down
2 changes: 1 addition & 1 deletion galaxy-queue_playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
- group_vars/galaxy_etca_slurm.yml
- secret_group_vars/stats_server_vault
- secret_group_vars/etca_vault.yml
- secret_group_vars/ubuntu_maintenance_key
- secret_group_vars/ssh_keys
roles:
- common
- insspb.hostname
Expand Down
2 changes: 1 addition & 1 deletion galaxy-user-nfs_playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
- group_vars/nfs_servers.yml
- host_vars/galaxy-user-nfs.usegalaxy.org.au.yml
- secret_group_vars/stats_server_vault
- secret_group_vars/ubuntu_maintenance_key
- secret_group_vars/ssh_keys
pre_tasks:
# - name: Attach volumes to instance # handle user nfs mounting manually
# include_role:
Expand Down
2 changes: 1 addition & 1 deletion galaxy-workers_playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
- group_vars/VAULT
- group_vars/galaxy_etca_slurm.yml
- group_vars/galaxy_workers.yml
- secret_group_vars/ubuntu_maintenance_key # TODO: when branches are merged, rename this file to internal_keys
- secret_group_vars/ssh_keys # TODO: when branches are merged, rename this file to internal_keys
- secret_group_vars/stats_server_vault
pre_tasks:
- name: Attach volume to instance
Expand Down
2 changes: 1 addition & 1 deletion galaxy_playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
- group_vars/galaxy_etca_slurm.yml
- host_vars/galaxy.usegalaxy.org.au.yml
- secret_group_vars/stats_server_vault
- secret_group_vars/ubuntu_maintenance_key
- secret_group_vars/ssh_keys
- secret_group_vars/etca_vault.yml
pre_tasks:
- name: Attach volume to instance
Expand Down
4 changes: 4 additions & 0 deletions group_vars/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,10 @@ internal_ssh_keys:
private_key_content: "{{ vault_internal_hop_key }}"
public_key_src: files/keys/internal_hop_key.pub
user: ubuntu
pulsar_internal_hop_key:
private_key_content: "{{ vault_pulsar_internal_hop_key }}"
public_key_src: files/keys/pulsar_internal_hop_key.pub
user: ubuntu

# Golang
golang_version: '1.15.6' # default for role version 2.6.3
Expand Down
5 changes: 5 additions & 0 deletions group_vars/pulsar-nci-test/pulsar-nci-test_workers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,8 @@ cvmfs_quota_limit: 20000
# Docker
docker_daemon_options:
data-root: /mnt/docker-data

extra_keys:
- id: pulsar_internal_hop_key
type: public
from: "{{ hostvars['pulsar-nci-test']['internal_ip'] }}"
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,8 @@ attached_volumes:
# docker
docker_daemon_options:
data-root: /mnt/tmpdisk/docker-data

extra_keys:
- id: pulsar_internal_hop_key
type: public
from: "{{ hostvars['pulsar-nci-training']['internal_ip'] }}"
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,12 @@ pulsar_conda_exec: "mamba"
# Docker
docker_daemon_options:
data-root: /mnt/docker-data

extra_keys:
- id: pulsar_internal_hop_key
type: private

# ssh config for ubuntu to ssh to worker machines
ssh_config_id_file: "/home/{{ ssh_config_user }}/.ssh/pulsar_internal_hop_key"
ssh_config_user: ubuntu
ssh_config_hosts: "{{ groups['pulsar_nci_test_workers'] }}"
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,13 @@ extra_keys:
- id: ubuntu_maintenance_key
type: public
from: "{{ hostvars['galaxy']['ansible_ssh_host'] }},{{ hostvars['galaxy-handlers']['ansible_ssh_host'] }},{{ hostvars['galaxy-backup']['ansible_ssh_host'] }}"
- id: pulsar_internal_hop_key
type: private

# ssh config for ubuntu to ssh to worker machines
ssh_config_id_file: "/home/{{ ssh_config_user }}/.ssh/pulsar_internal_hop_key"
ssh_config_user: ubuntu
ssh_config_hosts: "{{ groups['pulsar_nci_training_workers'] }}"

# docker
docker_daemon_options:
Expand Down
5 changes: 4 additions & 1 deletion hosts
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,16 @@ nci-build ansible_ssh_host=130.56.246.156 internal_ip=10.0.0.249
[pulsar_nci_training_head]
pulsar-nci-training ansible_ssh_host=130.56.246.233 internal_ip=10.0.1.46

[pulsar_nci_training_workers_unreachable]
pulsar-nci-training-w5 ansible_ssh_host=10.0.1.218 internal_ip=10.0.1.218

[pulsar_nci_training_workers]
pulsar-nci-training-w0 ansible_ssh_host=10.0.1.197 internal_ip=10.0.1.197
pulsar-nci-training-w1 ansible_ssh_host=10.0.0.28 internal_ip=10.0.0.28
pulsar-nci-training-w2 ansible_ssh_host=10.0.3.167 internal_ip=10.0.3.167
pulsar-nci-training-w3 ansible_ssh_host=10.0.2.236 internal_ip=10.0.2.236
pulsar-nci-training-w4 ansible_ssh_host=10.0.0.175 internal_ip=10.0.0.175
pulsar-nci-training-w5 ansible_ssh_host=10.0.1.218 internal_ip=10.0.1.218
# pulsar-nci-training-w5 ansible_ssh_host=10.0.1.218 internal_ip=10.0.1.218
pulsar-nci-training-w6 ansible_ssh_host=10.0.2.125 internal_ip=10.0.2.125
pulsar-nci-training-w7 ansible_ssh_host=10.0.2.186 internal_ip=10.0.2.186
pulsar-nci-training-w8 ansible_ssh_host=10.0.1.143 internal_ip=10.0.1.143
Expand Down
2 changes: 1 addition & 1 deletion jenkins_playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
- group_vars/all.yml
- group_vars/jenkins.yml
- group_vars/VAULT
- secret_group_vars/ubuntu_maintenance_key
- secret_group_vars/ssh_keys
- host_vars/jenkins.yml

pre_tasks:
Expand Down
2 changes: 1 addition & 1 deletion pulsar-QLD-nfs_playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
- group_vars/nfs_servers.yml
- host_vars/pulsar-QLD/pulsar-QLD-nfs.genome.edu.au.yml
- secret_group_vars/stats_server_vault
- secret_group_vars/ubuntu_maintenance_key
- secret_group_vars/ssh_keys
roles:
- attached-volumes
- common
Expand Down
2 changes: 1 addition & 1 deletion pulsar-QLD-queue_playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
- host_vars/pulsar-QLD/pulsar-QLD-queue.genome.edu.au.yml
- group_vars/pulsar_QLD/pulsar-QLD_slurm.yml
- secret_group_vars/stats_server_vault
- secret_group_vars/ubuntu_maintenance_key
- secret_group_vars/ssh_keys
roles:
- common
- insspb.hostname
Expand Down
2 changes: 1 addition & 1 deletion pulsar-QLD_playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
- group_vars/VAULT
- host_vars/pulsar-QLD/pulsar-QLD.genome.edu.au.yml
- secret_group_vars/stats_server_vault
- secret_group_vars/ubuntu_maintenance_key
- secret_group_vars/ssh_keys
pre_tasks:
- name: Attach volume to instance
include_role:
Expand Down
2 changes: 1 addition & 1 deletion pulsar-high-mem1_playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
- group_vars/VAULT
- host_vars/pulsar-high-mem1/pulsar-high-mem1.yml
- secret_group_vars/stats_server_vault
- secret_group_vars/ubuntu_maintenance_key
- secret_group_vars/ssh_keys
pre_tasks:
- name: Create pulsar deps path
file:
Expand Down
2 changes: 1 addition & 1 deletion pulsar-high-mem2_playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
- group_vars/VAULT
- host_vars/pulsar-high-mem2/pulsar-high-mem2.yml
- secret_group_vars/stats_server_vault
- secret_group_vars/ubuntu_maintenance_key
- secret_group_vars/ssh_keys
pre_tasks:
- name: Create pulsar deps path
file:
Expand Down
2 changes: 1 addition & 1 deletion pulsar-mel2_playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
- group_vars/VAULT
- host_vars/pulsar-mel2/pulsar-mel2.genome.edu.au.yml
- secret_group_vars/stats_server_vault
- secret_group_vars/ubuntu_maintenance_key
- secret_group_vars/ssh_keys
pre_tasks:
- name: Attach volume to instance
include_role:
Expand Down
2 changes: 1 addition & 1 deletion pulsar-mel3_playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
- group_vars/VAULT
- host_vars/pulsar-mel3/pulsar-mel3.genome.edu.au.yml
- secret_group_vars/stats_server_vault
- secret_group_vars/ubuntu_maintenance_key
- secret_group_vars/ssh_keys
pre_tasks:
- name: apt update
apt:
Expand Down
1 change: 1 addition & 0 deletions pulsar-nci-test_playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- group_vars/pulsar-nci-test/pulsar-nci-test_slurm.yml
- group_vars/VAULT
- host_vars/pulsar-nci-test/pulsar-nci-test.usegalaxy.org.au.yml
- secret_group_vars/ssh_keys
roles:
- common
- insspb.hostname
Expand Down
1 change: 1 addition & 0 deletions pulsar-nci-test_workers_playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- group_vars/pulsar-nci-test/pulsar-nci-test_workers.yml
- group_vars/pulsar-nci-test/pulsar-nci-test_slurm.yml
- group_vars/VAULT
- secret_group_vars/ssh_keys
pre_tasks:
# - name: Attach volume to instance
# include_role:
Expand Down
2 changes: 1 addition & 1 deletion pulsar-nci-training_playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
- group_vars/VAULT
- host_vars/pulsar-nci-training/pulsar-nci-training.usegalaxy.org.au.yml
- secret_group_vars/stats_server_vault
- secret_group_vars/ubuntu_maintenance_key
- secret_group_vars/ssh_keys
roles:
- common
- insspb.hostname
Expand Down
1 change: 1 addition & 0 deletions pulsar-nci-training_workers_playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- group_vars/pulsar_nci_training/pulsar-nci-training_slurm.yml
- group_vars/VAULT
- secret_group_vars/stats_server_vault
- secret_group_vars/ssh_keys
pre_tasks:
- name: Remove cloudinit entry in fstab
# remove line '/dev/vdb /mnt auto defaults,nofail,x-systemd.requires=cloud-init.service,comment=cloudconfig 0 2'
Expand Down
2 changes: 1 addition & 1 deletion pulsar-qld-blast_playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
- group_vars/VAULT
- host_vars/pulsar-qld-blast.yml
- secret_group_vars/stats_server_vault
- secret_group_vars/ubuntu_maintenance_key
- secret_group_vars/ssh_keys
roles:
- common
- insspb.hostname
Expand Down
2 changes: 1 addition & 1 deletion pulsar-qld-gpu-dev_playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
- group_vars/pulsar_qld_gpus.yml
- group_vars/VAULT
- secret_group_vars/stats_server_vault
- secret_group_vars/ubuntu_maintenance_key
- secret_group_vars/ssh_keys
- host_vars/pulsar-qld-gpu-dev.yml
pre_tasks:
- name: ensure Nvidia GPU has been pre-configured with one-offs/initial_nvidia_config_and_disable_cgroups_v2_playbook.yml
Expand Down
2 changes: 1 addition & 1 deletion pulsar-qld-gpu_playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
- group_vars/VAULT
- group_vars/pulsar_qld_gpus.yml
- secret_group_vars/stats_server_vault
- secret_group_vars/ubuntu_maintenance_key
- secret_group_vars/ssh_keys
pre_tasks:
- name: ensure Nvidia GPU has been pre-configured with one-offs/initial_nvidia_config_and_disable_cgroups_v2_playbook.yml
shell:
Expand Down
2 changes: 1 addition & 1 deletion pulsar-qld-high-mem_playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
- group_vars/pulsarservers.yml
- group_vars/VAULT
- secret_group_vars/stats_server_vault
- secret_group_vars/ubuntu_maintenance_key
- secret_group_vars/ssh_keys
# - host_vars/pulsar-high-mem2/pulsar-high-mem2.yml
pre_tasks:
- name: Attach volume to instance
Expand Down
Loading