IQSS / dataverse-jenkins

configs and docs for running continuous integration for Dataverse in Jenkins

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot spin up Jenkins on EC2

pdurbin opened this issue · comments

I'm on 051c825 and I'm having trouble following the quickstart in INSTALL.md, which says this:

This should spin up a working Jenkins installation on AWS EC2:

ec2/ec2-create-instance.sh -r https://github.com/IQSS/dataverse-jenkins.git

Here's the error I get:

Complete!
Adding user jenkins to group docker
Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service.
fatal: repository 'jenkins' does not exist
-bash: line 12: cd: jenkins: No such file or directory
mv: cannot stat ‘ansible’: No such file or directory
Using /etc/ansible/ansible.cfg as config file
ERROR! the playbook: jenkins/dataverse-jenkins.pb could not be found
(aws) dhcp-10-250-251-208:dataverse-jenkins pdurbin$

Here's a clue that something is missing:

Please wait at least 15 minutes while the branch "" from https://github.com/IQSS/dataverse-jenkins.git is being deployed.

This may not be the best fix but it got me unblocked: 10213a5

I'm not quite sure what's going on below but I thought I'd note it:

TASK [jenkins : include_tasks] *************************************************
included: /home/centos/jenkins/jenkins/tasks/import.yml for localhost

TASK [jenkins : jenkins_job] ***************************************************
[WARNING]: Unable to find '~/jenkins/config.xml' in expected paths (use -vvvvv
to see paths)
fatal: [localhost]: FAILED! => {"msg": "An unhandled exception occurred while running the lookup plugin 'file'. Error was a <class 'ansible.errors.AnsibleError'>, original message: could not locate file in lookup: ~/jenkins/config.xml"}

RUNNING HANDLER [jenkins : restart jenkins] ************************************

PLAY RECAP *********************************************************************
localhost : ok=31 changed=13 unreachable=0 failed=1 skipped=6 rescued=0 ignored=0

Jenkins is up at http://ec2-18-215-150-104.compute-1.amazonaws.com:8080 so I'm happy. 😄

Here's a clue that something is missing:

Please wait at least 15 minutes while the branch "" from https://github.com/IQSS/dataverse-jenkins.git is being deployed.

Yeah, you have to give it a branch and repo (the command line args were a convenience, it was really intended to be run from group_vars)