Skip to content

Commit

Permalink
Provide a hook to add an additional SSH key in the rdo-base element
Browse files Browse the repository at this point in the history
Jobs ran from jenkins on ci.centos.org will start using nodepool images
but the problem is that they are set up to have the public key of the
nodepool keypair.

The nodepool private ssh key isn't going to be set up on the jenkins
nodes so let's instead add the public key of the jenkins instead.

Change-Id: Iba95d1d6818d5101c6cf02d0b9fb4cb708972957
  • Loading branch information
David Moreau Simard committed May 11, 2018
1 parent 838a764 commit 642c421
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Expand Up @@ -2,3 +2,5 @@
sudo cp /var/lib/nodepool/.ssh/nodepool_rsa.pub $TMP_HOOKS_PATH/id_rsa.pub
# Also install jenkins key
cat /var/lib/nodepool/.ssh/jenkins_rsa.pub | sudo tee -a $TMP_HOOKS_PATH/id_rsa.pub
# If there's an extra key, set it up too
[[ ! -z "${NODEPOOL_SSH_KEY}" ]] && echo "${NODEPOOL_SSH_KEY}" | sudo tee -a $TMP_HOOKS_PATH/id_rsa.pub
2 changes: 2 additions & 0 deletions nodepool/nodepool.yaml
Expand Up @@ -12,6 +12,8 @@ diskimages:
DIB_GRUB_TIMEOUT: '0'
DIB_YUM_MINIMAL_CREATE_INTERFACES: '1'
DIB_INSTALLTYPE_pip_and_virtualenv: 'package'
NODEPOOL_SSH_KEY: >-
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAyJ4DxTKdQ8grli+FqUzoJnXWlwvhWBJwdSbKJh6en6tWwLp97dUXM2R8B5WGtggtlC7SKOSk0u49ZAOInz5lf4ljSStkWIm4DzwJWEKB5iiWgorEwhYyuKFvfikC2OMlPE8bBKCquK40gWGYeINMGeeoKWeXhB5ks4MjZqg0l65J3BGHJd4StDSd903lzNwPM9c8LBfHgEM0H7K1W/Qt86rDi2bcaDv1q1xNhVjQ8v/bR3yglnwsEjX5S6ULQlx3mYUMhfRQUiOb7bSaBlDL9faKL89GFrvkMT3zJ4v65cHpPDa3pQfuD/k+UBUhFeaXMyPFT/Wmimf2g7iLroCbhQ== rdo-ci@ci.centos.org
- name: upstream-centos-7
elements:
- centos-minimal
Expand Down

0 comments on commit 642c421

Please sign in to comment.