This repository was archived by the owner on May 13, 2022. It is now read-only.
File tree 4 files changed +14
-4
lines changed
4 files changed +14
-4
lines changed Original file line number Diff line number Diff line change 1
1
config.sh
2
+ config.ini
2
3
.ssh
3
4
* .pyc
4
5
composer.phar
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ sudo apt-get install zip python-pip python-dev
19
19
sudo pip install python-novaclient
20
20
```
21
21
* Create an ssh key pair for jenkins; add the public key to openstack, with a key name of: jenkins
22
+ * Copy config-dist.ini to config.ini and edit
22
23
* As the jenkins user, checkout this repo to ` /var/lib/jenkins/moodle-ci `
23
24
* Download Selenium's standalone server (version: $SELENIUM_VERSION) and stick it in ` /var/lib/jenkins/moodle-ci/ ` too
24
25
* ` cp config-dist.sh config.sh ` and fill in creds
Original file line number Diff line number Diff line change
1
+ [openstack]
2
+ imagename =" youcloudimagesnapshotname"
3
+ flavor =" c1.c4r4"
4
+ sshkeyname =" openstacksshkeyname"
Original file line number Diff line number Diff line change 3
3
from novaclient import client
4
4
import novaclient .exceptions
5
5
from credentials import get_nova_creds
6
+ import ConfigParser
6
7
7
8
class cloudslave :
8
9
def __init__ (self , name ):
10
+ # read the config
11
+ config = ConfigParser .ConfigParser ()
12
+ config .read (os .path .join (os .path .dirname (os .path .realpath (__file__ )), 'config.ini' ))
13
+
9
14
self .name = name
10
- self .imagename = "jenkins-tests"
11
- self .flavorname = "c1.c4r4"
12
- #self.flavorname = "c1.c8r8"
13
- self .sshkeyname = "jenkins"
15
+ self .imagename = config .get ('openstack' , 'imagename' )
16
+ self .flavorname = config .get ('openstack' , 'flavor' )
17
+ self .sshkeyname = config .get ('openstack' , 'sshkeyname' )
14
18
15
19
def spinup (self ):
16
20
# initialise novaclient instance
You can’t perform that action at this time.
0 commit comments