Initial repo Pike updates
- Switched default linter to cookstyle - Renamed rake tasks to conform with Chef conventions - Added repo, memcached, libvirtd overrides for testing - Added Python wrapper recipe Change-Id: I91d380006d8ca8b81a05c629aff444321ada13e7
This commit is contained in:
parent
962633f25a
commit
f6ce85b324
5
Rakefile
5
Rakefile
|
@ -51,9 +51,12 @@ desc "Blow everything away"
|
|||
task clean: [:destroy_all]
|
||||
|
||||
# CI tasks
|
||||
require 'cookstyle'
|
||||
require 'rubocop/rake_task'
|
||||
desc 'Run RuboCop'
|
||||
RuboCop::RakeTask.new(:rubocop)
|
||||
RuboCop::RakeTask.new do |task|
|
||||
task.options << "--display-cop-names"
|
||||
end
|
||||
|
||||
desc "Validate data bags, environments and roles"
|
||||
task :json_check do
|
||||
|
|
|
@ -12,6 +12,10 @@
|
|||
}
|
||||
},
|
||||
"openstack": {
|
||||
"yum": {
|
||||
"uri": "https://trunk.rdoproject.org/centos7-master/current-passed-ci/",
|
||||
"gpgcheck": false
|
||||
},
|
||||
"telemetry": {
|
||||
"conf": {
|
||||
"DEFAULT": {
|
||||
|
@ -19,6 +23,10 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"dashboard": {
|
||||
"server_hostname": "localhost"
|
||||
},
|
||||
"memcached_servers": [ "127.0.0.1:11211" ],
|
||||
"mq": {
|
||||
"user": "admin"
|
||||
},
|
||||
|
@ -35,6 +43,7 @@
|
|||
"compute": {
|
||||
"conf": {
|
||||
"libvirt": {
|
||||
"cpu_mode": "none",
|
||||
"virt_type": "qemu"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
"compute": {
|
||||
"conf": {
|
||||
"libvirt": {
|
||||
"cpu_type": "none",
|
||||
"virt_type": "qemu"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,7 +12,9 @@
|
|||
},
|
||||
"openstack": {
|
||||
"yum": {
|
||||
"update_yum_cache": true
|
||||
"update_yum_cache": true,
|
||||
"uri": "https://trunk.rdoproject.org/centos7-master/current-passed-ci/",
|
||||
"gpgcheck": false
|
||||
},
|
||||
"sysctl": {
|
||||
"net.ipv4.ip_forward": 1
|
||||
|
@ -118,6 +120,7 @@
|
|||
"compute": {
|
||||
"conf": {
|
||||
"libvirt": {
|
||||
"cpu_type": "none",
|
||||
"virt_type": "qemu"
|
||||
},
|
||||
"oslo_messaging_rabbit": { "rabbit_host": "192.168.101.60" }
|
||||
|
|
|
@ -124,6 +124,7 @@
|
|||
"compute": {
|
||||
"conf": {
|
||||
"libvirt": {
|
||||
"cpu_type": "none",
|
||||
"virt_type": "qemu"
|
||||
},
|
||||
"transport_url": { "rabbit_host": "192.168.101.60" }
|
||||
|
|
|
@ -8,36 +8,36 @@ override_attributes(
|
|||
'server_debian_password' => 'root',
|
||||
'server_repl_password' => 'root',
|
||||
'allow_remote_root' => true,
|
||||
'root_network_acl' => '%'
|
||||
'root_network_acl' => '%',
|
||||
},
|
||||
'openstack' => {
|
||||
'auth' => {
|
||||
'validate_certs' => false
|
||||
'validate_certs' => false,
|
||||
},
|
||||
'block-storage' => {
|
||||
'syslog' => {
|
||||
'use' => false
|
||||
'use' => false,
|
||||
},
|
||||
'api' => {
|
||||
'ratelimit' => 'False'
|
||||
'ratelimit' => 'False',
|
||||
},
|
||||
'debug' => true,
|
||||
'image_api_chef_role' => 'os-image',
|
||||
'identity_service_chef_role' => 'os-identity',
|
||||
'rabbit_server_chef_role' => 'os-ops-messaging'
|
||||
'rabbit_server_chef_role' => 'os-ops-messaging',
|
||||
},
|
||||
'compute' => {
|
||||
'syslog' => {
|
||||
'use' => false
|
||||
'use' => false,
|
||||
},
|
||||
'libvirt' => {
|
||||
'bind_interface' => 'eth0'
|
||||
'bind_interface' => 'eth0',
|
||||
},
|
||||
'novnc_proxy' => {
|
||||
'bind_interface' => 'eth0'
|
||||
'bind_interface' => 'eth0',
|
||||
},
|
||||
'xvpvnc_proxy' => {
|
||||
'bind_interface' => 'eth0'
|
||||
'bind_interface' => 'eth0',
|
||||
},
|
||||
'image_api_chef_role' => 'os-image',
|
||||
'identity_service_chef_role' => 'os-identity',
|
||||
|
@ -45,44 +45,44 @@ override_attributes(
|
|||
'rabbit_server_chef_role' => 'os-ops-messaging',
|
||||
'ratelimit' => { # Disable ratelimiting so Tempest doesn't have issues.
|
||||
'api' => {
|
||||
'enabled' => false
|
||||
'enabled' => false,
|
||||
},
|
||||
'volume' => {
|
||||
'enabled' => false
|
||||
}
|
||||
'enabled' => false,
|
||||
},
|
||||
},
|
||||
'network' => {
|
||||
'fixed_range' => '10.0.0.0/8'
|
||||
'fixed_range' => '10.0.0.0/8',
|
||||
},
|
||||
'networks' => [
|
||||
]
|
||||
],
|
||||
},
|
||||
'db' => {
|
||||
'bind_interface' => 'eth0',
|
||||
'compute' => {
|
||||
'host' => '10.0.3.10'
|
||||
'host' => '10.0.3.10',
|
||||
},
|
||||
'identity' => {
|
||||
'host' => '10.0.3.10'
|
||||
'host' => '10.0.3.10',
|
||||
},
|
||||
'image' => {
|
||||
'host' => '10.0.3.10'
|
||||
'host' => '10.0.3.10',
|
||||
},
|
||||
'network' => {
|
||||
'host' => '10.0.3.10'
|
||||
'host' => '10.0.3.10',
|
||||
},
|
||||
'volume' => {
|
||||
'host' => '10.0.3.10'
|
||||
'host' => '10.0.3.10',
|
||||
},
|
||||
'dashboard' => {
|
||||
'host' => '10.0.3.10'
|
||||
'host' => '10.0.3.10',
|
||||
},
|
||||
'telemetry' => {
|
||||
'host' => '10.0.3.10'
|
||||
'host' => '10.0.3.10',
|
||||
},
|
||||
'orchestration' => {
|
||||
'host' => '10.0.3.10'
|
||||
}
|
||||
'host' => '10.0.3.10',
|
||||
},
|
||||
},
|
||||
'developer_mode' => true,
|
||||
'endpoints' => {
|
||||
|
@ -90,92 +90,92 @@ override_attributes(
|
|||
'host' => '10.0.3.11',
|
||||
'scheme' => 'http',
|
||||
'port' => '8774',
|
||||
'path' => '/v2/%(tenant_id)s'
|
||||
'path' => '/v2/%(tenant_id)s',
|
||||
},
|
||||
'compute-ec2-admin' => {
|
||||
'host' => '10.0.3.11',
|
||||
'scheme' => 'http',
|
||||
'port' => '8773',
|
||||
'path' => '/services/Admin'
|
||||
'path' => '/services/Admin',
|
||||
},
|
||||
'compute-ec2-api' => {
|
||||
'host' => '10.0.3.11',
|
||||
'scheme' => 'http',
|
||||
'port' => '8773',
|
||||
'path' => '/services/Cloud'
|
||||
'path' => '/services/Cloud',
|
||||
},
|
||||
'compute-xvpvnc' => {
|
||||
'host' => '10.0.3.11',
|
||||
'scheme' => 'http',
|
||||
'port' => '6081',
|
||||
'path' => '/console'
|
||||
'path' => '/console',
|
||||
},
|
||||
'compute-novnc' => {
|
||||
'host' => '10.0.3.11',
|
||||
'scheme' => 'http',
|
||||
'port' => '6080',
|
||||
'path' => '/vnc_auto.html'
|
||||
'path' => '/vnc_auto.html',
|
||||
},
|
||||
'image-api' => {
|
||||
'host' => '10.0.3.11',
|
||||
'scheme' => 'http',
|
||||
'port' => '9292',
|
||||
'path' => '/v2'
|
||||
'path' => '/v2',
|
||||
},
|
||||
'image-registry' => {
|
||||
'host' => '10.0.3.11',
|
||||
'scheme' => 'http',
|
||||
'port' => '9191',
|
||||
'path' => '/v2'
|
||||
'path' => '/v2',
|
||||
},
|
||||
'identity-api' => {
|
||||
'host' => '10.0.3.11',
|
||||
'scheme' => 'http',
|
||||
'port' => '5000',
|
||||
'path' => '/v2.0'
|
||||
'path' => '/v2.0',
|
||||
},
|
||||
'identity-admin' => {
|
||||
'host' => '10.0.3.11',
|
||||
'scheme' => 'http',
|
||||
'port' => '35357',
|
||||
'path' => '/v2.0'
|
||||
'path' => '/v2.0',
|
||||
},
|
||||
'volume-api' => {
|
||||
'host' => '10.0.3.11',
|
||||
'scheme' => 'http',
|
||||
'port' => '8776',
|
||||
'path' => '/v1/%(tenant_id)s'
|
||||
'path' => '/v1/%(tenant_id)s',
|
||||
},
|
||||
'telemetry-api' => {
|
||||
'host' => '10.0.3.11',
|
||||
'scheme' => 'http',
|
||||
'port' => '8777',
|
||||
'path' => '/v1'
|
||||
'path' => '/v1',
|
||||
},
|
||||
'network-api' => {
|
||||
'host' => '10.0.3.11',
|
||||
'scheme' => 'http',
|
||||
'port' => '9696',
|
||||
'path' => '/v2'
|
||||
'path' => '/v2',
|
||||
},
|
||||
'orchestration-api' => {
|
||||
'host' => '10.0.3.11',
|
||||
'scheme' => 'http',
|
||||
'port' => '8004',
|
||||
'path' => '/v1/%(tenant_id)s'
|
||||
'path' => '/v1/%(tenant_id)s',
|
||||
},
|
||||
'orchestration-api-cfn' => {
|
||||
'host' => '10.0.3.11',
|
||||
'scheme' => 'http',
|
||||
'port' => '8000',
|
||||
'path' => '/v1'
|
||||
}
|
||||
'path' => '/v1',
|
||||
},
|
||||
},
|
||||
'identity' => {
|
||||
'admin_user' => 'ksadmin',
|
||||
'bind_interface' => 'eth0',
|
||||
'catalog' => {
|
||||
'backend' => 'templated'
|
||||
'backend' => 'templated',
|
||||
},
|
||||
'debug' => true,
|
||||
'rabbit_server_chef_role' => 'os-ops-messaging',
|
||||
|
@ -186,11 +186,11 @@ override_attributes(
|
|||
netadmin
|
||||
sysadmin),
|
||||
'syslog' => {
|
||||
'use' => false
|
||||
'use' => false,
|
||||
},
|
||||
'tenants' => %w(admin service demo),
|
||||
'token' => {
|
||||
'backend' => 'memcache'
|
||||
'backend' => 'memcache',
|
||||
},
|
||||
'users' => {
|
||||
'ksadmin' => {
|
||||
|
@ -199,15 +199,15 @@ override_attributes(
|
|||
'roles' => {
|
||||
# Each key is the role name, each value is a list of tenants
|
||||
'admin' => [
|
||||
'admin'
|
||||
'admin',
|
||||
],
|
||||
'keystone_admin' => [
|
||||
'admin'
|
||||
'admin',
|
||||
],
|
||||
'keystone_service_admin' => [
|
||||
'admin'
|
||||
]
|
||||
}
|
||||
'admin',
|
||||
],
|
||||
},
|
||||
},
|
||||
'demo' => {
|
||||
'password' => 'demo',
|
||||
|
@ -215,51 +215,51 @@ override_attributes(
|
|||
'roles' => {
|
||||
# Each key is the role name, each value is a list of tenants
|
||||
'sysadmin' => [
|
||||
'demo'
|
||||
'demo',
|
||||
],
|
||||
'netadmin' => [
|
||||
'demo'
|
||||
'demo',
|
||||
],
|
||||
'member' => [
|
||||
'demo'
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
'demo',
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
'image' => {
|
||||
'api' => {
|
||||
'bind_interface' => 'eth0'
|
||||
'bind_interface' => 'eth0',
|
||||
},
|
||||
'debug' => true,
|
||||
'identity_service_chef_role' => 'os-identity',
|
||||
'rabbit_server_chef_role' => 'os-ops-messaging',
|
||||
'registry' => {
|
||||
'bind_interface' => 'eth0'
|
||||
'bind_interface' => 'eth0',
|
||||
},
|
||||
'syslog' => {
|
||||
'use' => false
|
||||
'use' => false,
|
||||
},
|
||||
'upload_image' => {
|
||||
'cirros' => 'http://hypnotoad/cirros-0.3.0-x86_64-disk.img'
|
||||
'cirros' => 'http://hypnotoad/cirros-0.3.0-x86_64-disk.img',
|
||||
},
|
||||
'upload_images' => [
|
||||
'cirros'
|
||||
]
|
||||
'cirros',
|
||||
],
|
||||
},
|
||||
'memcached_servers' => [
|
||||
'10.0.3.10:11211'
|
||||
'10.0.3.10:11211',
|
||||
],
|
||||
'mq' => {
|
||||
'bind_interface' => 'eth0',
|
||||
'host' => '10.0.3.10',
|
||||
'user' => 'guest',
|
||||
'vhost' => '/nova'
|
||||
}
|
||||
'vhost' => '/nova',
|
||||
},
|
||||
},
|
||||
'queue' => {
|
||||
'host' => '10.0.3.10',
|
||||
'user' => 'guest',
|
||||
'vhost' => '/nova'
|
||||
'vhost' => '/nova',
|
||||
}
|
||||
)
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
"recipe[openstack-common]",
|
||||
"recipe[openstack-common::logging]",
|
||||
"recipe[openstack-common::sysctl]",
|
||||
"recipe[openstack-common::python]",
|
||||
"recipe[openstack-common::client]",
|
||||
"recipe[openstack-common::etcd]",
|
||||
"recipe[openstack-ops-database::server]",
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
"recipe[openstack-common]",
|
||||
"recipe[openstack-common::logging]",
|
||||
"recipe[openstack-common::sysctl]",
|
||||
"recipe[openstack-common::python]",
|
||||
"recipe[openstack-common::client]",
|
||||
"recipe[openstack-common::etcd]",
|
||||
"recipe[openstack-ops-database::server]",
|
||||
|
|
|
@ -11,9 +11,7 @@ env = 'allinone-centos7' if ENV['REPO_OS'].to_s.include?('centos')
|
|||
|
||||
# make sure your ethernet interface matches preferred_interfaces, or override
|
||||
# with OS_BRIDGE
|
||||
|
||||
# rubocop:disable LineLength
|
||||
preferred_interfaces = ['Ethernet', 'eth0', 'enp3s0', 'Wi-Fi',
|
||||
preferred_interfaces = ['Ethernet', 'eth0', 'enp3s0', 'enp30s0', 'Wi-Fi',
|
||||
'Thunderbolt 1', 'Thunderbolt 2', 'Centrino']
|
||||
host_interfaces = `VBoxManage list bridgedifs | grep ^Name`
|
||||
.gsub(/Name:\s+/, '').split("\n")
|
||||
|
@ -39,18 +37,19 @@ options = {
|
|||
':forwarded_port, guest: 6080, host: 6080',
|
||||
':forwarded_port, guest: 8773, host: 8773',
|
||||
':forwarded_port, guest: 8774, host: 8774',
|
||||
':forwarded_port, guest: 35357, host: 35357'
|
||||
]
|
||||
':forwarded_port, guest: 35357, host: 35357',
|
||||
],
|
||||
},
|
||||
vagrant_config: <<-EOF
|
||||
config.vm.provision "chef_solo" do |chef|
|
||||
chef.version = "12.21.3"
|
||||
chef.version = "12.21.4"
|
||||
chef.channel = "stable"
|
||||
end
|
||||
config.vm.provider "virtualbox" do |v|
|
||||
v.memory = 8192
|
||||
v.cpus = 4
|
||||
v.customize ["modifyvm", :id, "--nicpromisc2", "allow-all"]
|
||||
v.customize ["modifyvm", :id, "--nicpromisc3", "allow-all"]
|
||||
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
|
||||
end
|
||||
config.vm.define "controller" do |cont|
|
||||
|
|
|
@ -11,8 +11,6 @@ env = 'multinode-centos7' if ENV['REPO_OS'].to_s.include?('centos')
|
|||
|
||||
# make sure your ethernet interface matches preferred_interfaces, or override
|
||||
# with OS_BRIDGE
|
||||
|
||||
# rubocop:disable LineLength
|
||||
preferred_interfaces = ['Ethernet', 'eth0', 'enp3s0', 'Wi-Fi',
|
||||
'Thunderbolt 1', 'Thunderbolt 2', 'Centrino']
|
||||
host_interfaces = `VBoxManage list bridgedifs | grep ^Name`
|
||||
|
@ -42,12 +40,12 @@ controller_options = {
|
|||
':forwarded_port, guest: 6080, host: 6080',
|
||||
':forwarded_port, guest: 8773, host: 8773',
|
||||
':forwarded_port, guest: 8774, host: 8774',
|
||||
':forwarded_port, guest: 35357, host: 35357'
|
||||
]
|
||||
':forwarded_port, guest: 35357, host: 35357',
|
||||
],
|
||||
},
|
||||
vagrant_config: <<-EOH
|
||||
config.vm.provision "chef_solo" do |chef|
|
||||
chef.version = "12.21.3"
|
||||
chef.version = "12.21.4"
|
||||
chef.channel = "stable"
|
||||
end
|
||||
config.vm.provider "virtualbox" do |v|
|
||||
|
@ -79,12 +77,12 @@ network_options = {
|
|||
'vm.box' => os,
|
||||
'vm.network' => [
|
||||
':private_network, {ip: "192.168.100.70"}',
|
||||
':private_network, {ip: "192.168.101.70"}'
|
||||
]
|
||||
':private_network, {ip: "192.168.101.70"}',
|
||||
],
|
||||
},
|
||||
vagrant_config: <<-EOH
|
||||
config.vm.provision "chef_solo" do |chef|
|
||||
chef.version = "12.21.3"
|
||||
chef.version = "12.21.4"
|
||||
chef.channel = "stable"
|
||||
end
|
||||
config.vm.provider "virtualbox" do |v|
|
||||
|
@ -119,12 +117,12 @@ machine_batch do
|
|||
'vm.box' => os,
|
||||
'vm.network' => [
|
||||
":private_network, {ip: '192.168.100.#{61 + number}'}",
|
||||
":private_network, {ip: '192.168.101.#{62 + number}'}"
|
||||
]
|
||||
":private_network, {ip: '192.168.101.#{62 + number}'}",
|
||||
],
|
||||
},
|
||||
vagrant_config: <<-EOH
|
||||
config.vm.provision "chef_solo" do |chef|
|
||||
chef.version = "12.21.3"
|
||||
chef.version = "12.21.4"
|
||||
chef.channel = "stable"
|
||||
end
|
||||
config.vm.provider "virtualbox" do |v|
|
||||
|
|
|
@ -15,8 +15,6 @@ def version
|
|||
'0.1.0'
|
||||
end
|
||||
|
||||
# rubocop:disable LineLength
|
||||
|
||||
def run(command, verbose = true)
|
||||
puts "## Running command: [#{Dir.pwd}] $ #{command}"
|
||||
live_stream = STDOUT
|
||||
|
@ -41,13 +39,13 @@ def get_gerrit_user(user)
|
|||
user
|
||||
end
|
||||
|
||||
def get_patch_info(user, patch) # rubocop:disable Metrics/MethodLength
|
||||
def get_patch_info(user, patch)
|
||||
puts "## Gathering information for patch: #{patch} with user: #{user}"
|
||||
if user == 'jenkins'
|
||||
patch_info = run("ssh -p 29418 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no #{user}@review.openstack.org gerrit query --current-patch-set #{patch}", false)
|
||||
else
|
||||
patch_info = run("ssh -p 29418 #{user}@review.openstack.org gerrit query --current-patch-set #{patch}", false)
|
||||
end
|
||||
patch_info = if user == 'jenkins'
|
||||
run("ssh -p 29418 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no #{user}@review.openstack.org gerrit query --current-patch-set #{patch}", false)
|
||||
else
|
||||
run("ssh -p 29418 #{user}@review.openstack.org gerrit query --current-patch-set #{patch}", false)
|
||||
end
|
||||
%r{^\s*project: openstack\/(?<patch_project>.*)$}i =~ patch_info
|
||||
/^\s*ref: (?<patch_ref>.*)$/i =~ patch_info
|
||||
abort "Error! Patch: #{patch} not valid" if patch_project.nil?
|
||||
|
@ -75,7 +73,7 @@ def run_tempest
|
|||
end
|
||||
end
|
||||
|
||||
def run_basic_queries # rubocop:disable Metrics/MethodLength
|
||||
def run_basic_queries
|
||||
puts '## Starting basic query tests'
|
||||
{
|
||||
'nova-manage' => ['version', 'db version'],
|
||||
|
@ -86,7 +84,7 @@ def run_basic_queries # rubocop:disable Metrics/MethodLength
|
|||
'keystone' => %w(--version user-list endpoint-list role-list service-list tenant-list),
|
||||
'cinder-manage' => ['version list', 'db version'],
|
||||
'cinder' => %w(--version list),
|
||||
'rabbitmqctl' => %w(cluster_status)
|
||||
'rabbitmqctl' => %w(cluster_status),
|
||||
}.each do |cli, commands|
|
||||
commands.each do |command|
|
||||
Dir.chdir('vms') do
|
||||
|
@ -149,7 +147,7 @@ LONGDESC
|
|||
option :keep, aliases: :k, default: false, type: :boolean, banner: ' Keep the environment, do not run \"rake destroy_machines\".'
|
||||
option :username, aliases: :u, banner: ' Gerrit user name used to fetch a patch if tool cannot automatically find it in git config.'
|
||||
option :skip, aliases: :s, banner: ' Skip all source changes, just run converge and tests again. For development after manually tweaking a node.'
|
||||
def test # rubocop:disable Metrics/MethodLength, Metrics/AbcSize, CyclomaticComplexity, Metrics/PerceivedComplexity
|
||||
def test
|
||||
puts "## Starting repo test version: #{version} environment: #{options[:env]} on os: #{options[:os]}"
|
||||
ENV['REPO_OS'] = options[:os]
|
||||
|
||||
|
|
Loading…
Reference in New Issue