Skip to content

Register AWS GCE instance to jenkins

Amos Kong edited this page Mar 6, 2018 · 5 revisions

AWS instace:

  1. upload a pem key as credential, create a jenkins user in instance, and setup ~/.ssh/authorized_keys (add public key of jenkins server)
  2. Replace Defaults requiretty by Defaults !requiretty in your /etc/sudoers. This will impact your global sudo configuration. Reference: https://www.shell-tips.com/2014/09/08/sudo-sorry-you-must-have-a-tty-to-run-sudo/
  3. create ~/.aws/config & ~/.aws/credentials chmod 400 ~/.aws/*

GCE instance: we already has a global key in GCE, just choose in credentials list (jenkins(New RSA key for slave)).

General setup in instance:

[scylla-cluster-tests]# sudo yum update
[scylla-cluster-tests]# sudo pip install -f requirements.txt
[jenkins@public-jenkins-builder1-qavpc scylla-cluster-tests]$ sudo pip install requests --upgrade --force-reinstall