Merge "Add wheel_mirror_slaves that use pypi-mirror"
This commit is contained in:
commit
35dd625727
@ -1103,4 +1103,23 @@ node 'codesearch.openstack.org' {
|
||||
}
|
||||
}
|
||||
|
||||
# Node-OS: trusty
|
||||
node /.*wheel-mirror-.*\.openstack\.org/ {
|
||||
include openstack_project
|
||||
class { 'openstack_project::wheel_mirror_slave':
|
||||
sysadmins => hiera('sysadmins', []),
|
||||
jenkins_ssh_public_key => $openstack_project::jenkins_ssh_key,
|
||||
pypi_mirror_bhs1_host_key => hiera('pypi_mirror_bhs1_host_key'),
|
||||
pypi_mirror_dfw_host_key => hiera('pypi_mirror_dfw_host_key'),
|
||||
pypi_mirror_gra1_host_key => hiera('pypi_mirror_gra1_host_key'),
|
||||
pypi_mirror_iad_host_key => hiera('pypi_mirror_iad_host_key'),
|
||||
pypi_mirror_nyj01_host_key => hiera('pypi_mirror_nyj01_host_key'),
|
||||
pypi_mirror_ord_host_key => hiera('pypi_mirror_ord_host_key'),
|
||||
pypi_mirror_hp1_host_key => hiera('pypi_mirror_hp1_host_key'),
|
||||
pypi_mirror_regionone_host_key => hiera('pypi_mirror_regionone_host_key'),
|
||||
wheel_mirror_ssh_public_key => hiera('wheel_mirror_ssh_public_key_contents'),
|
||||
wheel_mirror_ssh_private_key => hiera('wheel_mirror_ssh_private_key_contents'),
|
||||
}
|
||||
}
|
||||
|
||||
# vim:sw=2:ts=2:expandtab:textwidth=79
|
||||
|
@ -1,15 +0,0 @@
|
||||
# This file is managed by puppet.
|
||||
# https://git.openstack.org/cgit/openstack-infra/system-config
|
||||
|
||||
cache-root: /home/jenkins/pypimirror/cache
|
||||
|
||||
mirrors:
|
||||
- name: openstack
|
||||
projects:
|
||||
- git://git.openstack.org/openstack/requirements
|
||||
output: /home/jenkins/pypimirror/mirror/openstack
|
||||
|
||||
- name: openstack-infra
|
||||
projects:
|
||||
- git://git.openstack.org/openstack-infra/system-config
|
||||
output: /home/jenkins/pypimirror/mirror/openstack-infra
|
99
modules/openstack_project/manifests/wheel_mirror_slave.pp
Normal file
99
modules/openstack_project/manifests/wheel_mirror_slave.pp
Normal file
@ -0,0 +1,99 @@
|
||||
# Copyright 2015 Hewlett-Packard Development Company, L.P.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
#
|
||||
# Class to install dependencies for uploading python packages to pypi and
|
||||
# maven repositories
|
||||
#
|
||||
class openstack_project::wheel_mirror_slave (
|
||||
$jenkins_ssh_public_key,
|
||||
$pypi_mirror_bhs1_host_key,
|
||||
$pypi_mirror_dfw_host_key,
|
||||
$pypi_mirror_gra1_host_key,
|
||||
$pypi_mirror_iad_host_key,
|
||||
$pypi_mirror_nyj01_host_key,
|
||||
$pypi_mirror_ord_host_key,
|
||||
$pypi_mirror_hp1_host_key,
|
||||
$pypi_mirror_regionone_host_key,
|
||||
$wheel_mirror_ssh_public_key,
|
||||
$wheel_mirror_ssh_private_key,
|
||||
$sysadmins = [],
|
||||
$jenkins_gitfullname = 'OpenStack Jenkins',
|
||||
$jenkins_gitemail = 'jenkins@openstack.org',
|
||||
) {
|
||||
class { 'openstack_project::slave':
|
||||
sysadmins => $sysadmins,
|
||||
ssh_key => $jenkins_ssh_public_key,
|
||||
jenkins_gitfullname => $jenkins_gitfullname,
|
||||
jenkins_gitemail => $jenkins_gitemail,
|
||||
project_config_repo => $project_config_repo,
|
||||
}
|
||||
|
||||
file { '/home/jenkins/.ssh/id_rsa':
|
||||
owner => 'jenkins',
|
||||
group => 'jenkins',
|
||||
mode => '0400',
|
||||
require => File['/home/jenkins/.ssh'],
|
||||
content => $wheel_mirror_ssh_private_key,
|
||||
}
|
||||
|
||||
file { '/home/jenkins/.ssh/id_rsa.pub':
|
||||
owner => 'jenkins',
|
||||
group => 'jenkins',
|
||||
mode => '0400',
|
||||
require => File['/home/jenkins/.ssh'],
|
||||
content => $wheel_mirror_ssh_public_key,
|
||||
}
|
||||
|
||||
file { '/home/jenkins/.ssh/known_hosts':
|
||||
owner => 'jenkins',
|
||||
group => 'jenkins',
|
||||
mode => '0600',
|
||||
content => template('openstack_project/wheel_mirror/known_hosts.erb')
|
||||
}
|
||||
|
||||
# below follows a rough list of things required to build binary
|
||||
# wheels.
|
||||
|
||||
# TODO: global-requirements keeps other-requirements that can be
|
||||
# parsed by bindep. We should have some sort of bindep provider
|
||||
# that can interact with that
|
||||
|
||||
case $::osfamily {
|
||||
'Debian': {
|
||||
ensure_packages(['build-essential',
|
||||
'python-all-dev', 'python3-all-dev',
|
||||
'libxml2-dev', 'libxslt-dev',
|
||||
'libffi-dev', 'libreadline-dev',
|
||||
'libssl-dev', 'libyaml-dev', 'zlib1g-dev',
|
||||
'libldap2-dev', 'libmysqlclient-dev',
|
||||
'libnspr4-dev', 'libpq-dev', 'libsasl2-dev',
|
||||
'libsqlite3-dev', 'libvirt-dev', 'libzmq-dev',
|
||||
'pkg-config', 'swig', 'uuid-dev'])
|
||||
}
|
||||
'Redhat': {
|
||||
ensure_packages(['gcc', 'gcc-c++', 'make',
|
||||
'python-devel', 'python3-devel',
|
||||
'libxml2-devel', 'libxslt-devel',
|
||||
'libffi-devel', 'readline-devel',
|
||||
'openssl-devel', 'libyaml-devel', 'zlib-devel',
|
||||
'openldap-devel', 'mariadb-devel',
|
||||
'nspr-devel', 'postgresql-devel', 'cyrus-sasl-devel',
|
||||
'sqlite-devel', 'libvirt-devel', 'zeromq-devel',
|
||||
'pkgconfig', 'swig', 'uuid-devel'])
|
||||
}
|
||||
default: {
|
||||
err "${::osfamily} not supported yet"
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
pypi.bhs1.openstack.org,158.69.74.113 <%= @pypi_mirror_bhs1_host_key %>
|
||||
pypi.dfw.openstack.org,23.253.237.8,2001:4800:7817:104:d256:7a33:5187:7e1b <%= @pypi_mirror_dfw_host_key %>
|
||||
pypi.gra1.openstack.org,149.202.184.178 <%= @pypi_mirror_gra1_host_key %>
|
||||
pypi.iad.openstack.org,104.130.30.92,2001:4802:7803:104:be76:4eff:fe20:a9e2 <%= @pypi_mirror_iad_host_key %>
|
||||
pypi.nyj01.openstack.org,74.217.28.53 <%= @pypi_mirror_nyj01_host_key %>
|
||||
pypi.ord.openstack.org,104.130.78.177,2001:4801:7825:104:21b7:8857:f8a0:efaf <%=@pypi_mirror_ord_host_key %>
|
||||
pypi.region-b.geo-1.openstack.org,15.126.140.7 <%= @pypi_mirror_hp1_host_key %>
|
||||
pypi.regionone.openstack.org,169.45.71.89 <%= @pypi_mirror_regionone_host_key %>
|
Loading…
x
Reference in New Issue
Block a user