-
Notifications
You must be signed in to change notification settings - Fork 0
/
jenkinsfile
69 lines (67 loc) · 2.99 KB
/
jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
pipeline {
agent { node "Master" }
stages {
stage('git_checkout_repo') {
steps {
checkout(
[$class: 'GitSCM',
branches: [[name: '*/master']],
doGenerateSubmoduleConfigurations: false,
extensions: [],
submoduleCfg: [],
userRemoteConfigs: [
[url: 'https://github.com/mnadeem92/osp-deployment.git']
]
]
)
}
}
stage('setup_InfraRed_tool') {
steps {
sh '''
yum install -y git gcc libffi-devel openssl-devel python-virtualenv libselinux-python redhat-rpm-config
# prepare virtual Environment
if [ -d ~/.venv_infrared ] ; then
rm -rf ~/.venv_infrared
rm -rf ~/.infrared
fi
virtualenv ~/.venv_infrared
source ~/.venv_infrared/bin/activate
pip install --upgrade pip
pip install --upgrade setuptools
cd ~/.venv_infrared
git clone https://github.com/redhat-openstack/infrared.git
cd infrared
pip install .
echo ". $(pwd)/etc/bash_completion.d/infrared" >> ${VIRTUAL_ENV}/bin/activate
cp $WORKSPACE/key_osp ~/.ssh/.
chmod 400 ~/.ssh/key_osp
'''
}
}
stage('Coverage'){
steps {
sh '''
export MAINSERVER="dell-r220-05.cfme.lab.eng.rdu2.redhat.com"
source ~/.venv_infrared/bin/activate
cd ~/.venv_infrared/infrared
#Create work space for undercloud deployment
infrared workspace create $MAINSERVER
# Cleanup the system
infrared virsh --host-address $MAINSERVER --host-key ~/.ssh/key_osp --cleanup yes
# Prepare the environment
#infrared virsh --host-address $MAINSERVER --host-key ~/.ssh/key_osp --topology-nodes undercloud:1,controller:1 --host-memory-overcommit True -e override.controller.cpu=4 -e override.controller.memory=32288 -e override.undercloud.disks.disk1.size=150G --image-url http://download-node-02.eng.bos.redhat.com/brewroot/packages/rhel-guest-image/7.7/415/images/rhel-guest-image-7.7-415.x86_64.qcow2
infrared virsh --host-address $MAINSERVER --host-key ~/.ssh/key_osp --topology-nodes undercloud:1,controller:1 --host-memory-overcommit True -e override.controller.cpu=2 -e override.controller.memory=10288 -e override.undercloud.disks.disk1.size=150G --image-url http://download-node-02.eng.bos.redhat.com/brewroot/packages/rhel-guest-image/7.7/415/images/rhel-guest-image-7.7-415.x86_64.qcow2
# Deploy undercloud environment
infrared tripleo-undercloud --version 13 --images-task=rpm --build ga
# Update the instack.env file with physical compute nodes entry
# Launch the introspection of the nodes
infrared tripleo-overcloud --deployment-files virt --version 13 --introspect yes --tag yes --deploy no --post no --containers yes
#Note : After that you can able to access the undercloud node using below credential
#ssh stack@undercloud-0
#Password : stack
'''
}
}
}
}