Adds distro-specific changes to make CI work
- Adds conditional for CentOS/RHEL and Ubuntu/Debian - Disables gpgcheck for RDO - Bumps release from liberty to mitaka - Bumps RDO repo to Testing Change-Id: I356f110ef0f80a0282e3ebea1fd7dae5ce9246e7 Depends-On: Ic3f27a48ad3ae75a514a0637c2f895ee6e6bfae2 Depends-On: I438fe85a2883029973fa2f5f8b263b7689334c8f Depends-On: I2dbbafaf8641ece00d4181d1ea4ba93f00eed6ed Depends-On: Iefe0cd8037c20627d326e0922476f8499b477d77 Depends-On: If8b784baadb761f1e92c9014c595361096384add Depends-On: Ifb1411a4392d04cd9a5e867ffc95327adf4ea4ea Depends-On: Icd75ff370f20d77f564bd6eb700704372345b0de Depends-On: Ie4a742a2a8aaeeec2886fcc0513e654d0237997c
This commit is contained in:
parent
0855c03839
commit
9f912e6d0e
|
@ -113,7 +113,7 @@ default['openstack']['secret']['user_passwords_data_bag'] = 'user_passwords'
|
|||
# needs.
|
||||
|
||||
# The coordinated release of OpenStack codename
|
||||
default['openstack']['release'] = 'liberty'
|
||||
default['openstack']['release'] = 'mitaka'
|
||||
|
||||
# The Ubuntu Cloud Archive has packages for multiple Ubuntu releases. For
|
||||
# more information, see: https://wiki.ubuntu.com/ServerTeam/CloudArchive.
|
||||
|
@ -131,10 +131,10 @@ default['openstack']['apt']['components'] = ["#{node['lsb']['codename']}-updates
|
|||
# default['openstack']['apt']['components'] = [ '%codename%-proposed/%release%', 'main' ]
|
||||
|
||||
default['openstack']['yum']['rdo_enabled'] = true
|
||||
default['openstack']['yum']['uri'] = 'http://trunk.rdoproject.org/centos7-mitaka/c4/51/c45166c3fac46f2f4921a44c77e48f5b8f6847c5_c28e30d0'
|
||||
default['openstack']['yum']['uri'] = 'http://buildlogs.centos.org/centos/7/cloud/x86_64/openstack-mitaka/'
|
||||
default['openstack']['yum']['repo-key'] = 'https://raw.githubusercontent.com/redhat-openstack/rdo-release/master/RPM-GPG-KEY-CentOS-SIG-Cloud'
|
||||
# Enforcing GnuPG signature check for RDO repo. Set this to false if you want to disable the check.
|
||||
default['openstack']['yum']['gpgcheck'] = true
|
||||
default['openstack']['yum']['gpgcheck'] = false
|
||||
default['openstack']['endpoints']['family'] = 'inet'
|
||||
|
||||
# Set a default region that other regions are set to - such that changing the region for all services can be done in one place
|
||||
|
|
52
bootstrap.sh
52
bootstrap.sh
|
@ -1,14 +1,43 @@
|
|||
#!/bin/bash -x
|
||||
## This script is for installing all the needed packages on trusty to run the chef tests with 'chef exec rake'
|
||||
## This script is for installing all the needed packages on centos 7 and trusty to run the chef tests with 'chef exec rake'
|
||||
|
||||
# install needed packages
|
||||
sudo apt-get -y install build-essential liblzma-dev zlib1g-dev
|
||||
if [ -f /etc/redhat-release ] ; then
|
||||
# enable repoforge/rpmforge
|
||||
repoforge=rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm
|
||||
wget -nv -t 3 http://pkgs.repoforge.org/rpmforge-release/$repoforge
|
||||
sudo yum -y install $repoforge
|
||||
rm $repoforge
|
||||
|
||||
# install chefdk
|
||||
chefdk=chefdk_0.9.0-1_amd64.deb
|
||||
wget -nv -t 3 https://opscode-omnibus-packages.s3.amazonaws.com/ubuntu/12.04/x86_64/$chefdk
|
||||
sudo dpkg -i $chefdk
|
||||
rm $chefdk
|
||||
# install needed packages
|
||||
sudo yum clean all
|
||||
sudo yum -y groupinstall "Development Tools"
|
||||
sudo yum -y install lzma-devel zlib-devel
|
||||
|
||||
# uninstall requests from pip
|
||||
sudo pip uninstall requests -y || true
|
||||
|
||||
# install chefdk
|
||||
chefdk=chefdk-0.9.0-1.el7.x86_64.rpm
|
||||
wget -nv -t 3 https://opscode-omnibus-packages.s3.amazonaws.com/el/7/x86_64/$chefdk
|
||||
sudo yum -y install $chefdk
|
||||
rm $chefdk
|
||||
|
||||
# explicitly disable selinux
|
||||
sudo /usr/sbin/setenforce 0
|
||||
|
||||
elif [ -f /etc/debian_version ]; then
|
||||
|
||||
# install needed packages
|
||||
sudo apt-get update
|
||||
sudo apt-get -y install build-essential liblzma-dev zlib1g-dev
|
||||
|
||||
# install chefdk
|
||||
chefdk=chefdk_0.9.0-1_amd64.deb
|
||||
wget -nv -t 3 https://opscode-omnibus-packages.s3.amazonaws.com/ubuntu/12.04/x86_64/$chefdk
|
||||
sudo dpkg -i $chefdk
|
||||
rm $chefdk
|
||||
|
||||
fi
|
||||
|
||||
## workaround to fix redhat fauxhai permission issue (can be removed with fauxhai > 2.3 in chefdk)
|
||||
sudo chef exec ruby -e "require 'fauxhai'; Fauxhai.mock(platform:'redhat', version:'7.1')"
|
||||
|
@ -43,6 +72,8 @@ for cookbook_info in "${cookbooks[@]}"; do
|
|||
done
|
||||
|
||||
# Allow the zuul cloner to pull down the necessary Depends-On patches
|
||||
#
|
||||
# also change ownership of .chef and workspace
|
||||
if [ "$cookbook_projects" ]
|
||||
then
|
||||
sudo -E /usr/zuul-env/bin/zuul-cloner \
|
||||
|
@ -50,5 +81,8 @@ then
|
|||
--cache-dir /opt/git \
|
||||
--workspace /home/jenkins/workspace/ \
|
||||
git://git.openstack.org \
|
||||
$cookbook_projects
|
||||
$cookbook_projects && \
|
||||
sudo chown -R jenkins:jenkins /home/jenkins/workspace && \
|
||||
sudo mkdir -p /home/jenkins/.chef && \
|
||||
sudo chown -R jenkins:jenkins /home/jenkins/.chef
|
||||
fi
|
||||
|
|
|
@ -61,14 +61,6 @@ when 'rhel'
|
|||
enabled true
|
||||
action repo_action
|
||||
end
|
||||
|
||||
yum_repository 'RDO-delorean-deps' do
|
||||
description 'RDO delorean deps repo'
|
||||
baseurl 'http://buildlogs.centos.org/centos/7/cloud/$basearch/openstack-liberty/'
|
||||
gpgcheck false
|
||||
enabled true
|
||||
action repo_action
|
||||
end
|
||||
end
|
||||
|
||||
if node['openstack']['databag_type'] == 'vault'
|
||||
|
|
|
@ -14,6 +14,7 @@ describe 'openstack-common::default' do
|
|||
context 'enabling RDO with gpgcheck enabled' do
|
||||
before do
|
||||
node.set['openstack']['yum']['rdo_enabled'] = true
|
||||
node.set['openstack']['yum']['gpgcheck'] = true
|
||||
end
|
||||
|
||||
it 'adds RDO yum repository' do
|
||||
|
|
|
@ -29,14 +29,14 @@ describe 'openstack-common::default' do
|
|||
node.set['openstack']['apt']['live_updates_enabled'] = true
|
||||
expect(chef_run).to add_apt_repository('openstack-ppa').with(
|
||||
uri: 'http://ubuntu-cloud.archive.canonical.com/ubuntu',
|
||||
components: ['trusty-updates/liberty', 'main'])
|
||||
components: ['trusty-updates/mitaka', 'main'])
|
||||
end
|
||||
|
||||
it 'disables openstack live updates' do
|
||||
node.set['openstack']['apt']['live_updates_enabled'] = false
|
||||
expect(chef_run).to_not add_apt_repository('openstack-ppa').with(
|
||||
uri: 'http://ubuntu-cloud.archive.canonical.com/ubuntu',
|
||||
components: ['trusty-updates/liberty', 'main'])
|
||||
components: ['trusty-updates/mitaka', 'main'])
|
||||
end
|
||||
|
||||
it 'does not install the gem chef-vault by default' do
|
||||
|
|
Loading…
Reference in New Issue