Remove bifrost support
... because it was deprecated during Xena cycle[1].
[1] 78f7e9efb7
Change-Id: I059c0f132be0ebb01a21e144166bcecbcc4530b4
This commit is contained in:
parent
51ea0c95ea
commit
f47dc524aa
@ -68,15 +68,6 @@ class { 'ironic::api':
|
||||
|
||||
class { 'ironic::drivers::ipmi': }
|
||||
|
||||
# alternatively, you can deploy Ironic with Bifrost. It's a collection of Ansible playbooks to configure
|
||||
# and install Ironic in a stand-alone fashion (for more information visit https://docs.openstack.org/bifrost/latest/)
|
||||
class { 'ironic::bifrost':
|
||||
ironic_db_password => 'a_big_secret',
|
||||
mysql_password => 'yet_another_big_secret',
|
||||
baremetal_json_hosts => hiera('your_hiera_var_containing_bm_json_hosts'),
|
||||
}
|
||||
```
|
||||
|
||||
Examples of usage also can be found in the *examples* directory.
|
||||
|
||||
Implementation
|
||||
|
@ -30,33 +30,6 @@ $rabbit_port = '5672'
|
||||
$glance_api_servers = 'glance:9292'
|
||||
$deploy_kernel = 'glance://deploy_kernel_uuid'
|
||||
$deploy_ramdisk = 'glance://deploy_ramdisk_uuid'
|
||||
$baremetal_json_hosts = '
|
||||
"ironic-bm-test.bifrost.example": {
|
||||
"ansible_ssh_host": "1.1.1.1",
|
||||
"uuid": "11111111-1111-1111-1111-111111111111",
|
||||
"driver_info": {
|
||||
"power": {
|
||||
"ipmi_address": "10.0.0.1",
|
||||
"ipmi_username": "admin",
|
||||
"ipmi_password": "pass"
|
||||
},
|
||||
},
|
||||
"nics": [
|
||||
{
|
||||
"mac": "ff:ff:ff:ff:ff:ff"
|
||||
}
|
||||
],
|
||||
"driver": "agent_ipmitool",
|
||||
"ipv4_address": "1.1.1.1",
|
||||
"properties": {
|
||||
"cpu_arch": "x86_64",
|
||||
"ram": null,
|
||||
"disk_size": null,
|
||||
"cpus": null
|
||||
},
|
||||
"name": "ironic-bm-test.bifrost.example"
|
||||
}
|
||||
'
|
||||
|
||||
node 'db' {
|
||||
|
||||
@ -108,14 +81,3 @@ node 'controller' {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
node 'bifrost-controller' {
|
||||
|
||||
class { 'ironic::bifrost':
|
||||
network_interface => 'eth1',
|
||||
ironic_db_password => 'changeme',
|
||||
mysql_password => 'changemetoo',
|
||||
baremetal_json_hosts => $baremetal_json_hosts,
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,220 +0,0 @@
|
||||
# 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: ironic::bifrost
|
||||
#
|
||||
# DEPRECATED - Installs and configures Bifrost
|
||||
# Bifrost is a set of Ansible playbooks that automates the task of deploying a
|
||||
# base image onto a set of known hardware using Ironic. It provides modular
|
||||
# utility for one-off operating system deployment with as few operational requirements
|
||||
# as reasonably possible.
|
||||
# Bifrost also allows to install Ironic in a stand-alone fashion. In this kind of setup,
|
||||
# neither Keystone nor Neutron is installed, and dnsmasq is used to provide PXE booting.
|
||||
#
|
||||
# DEPRECATED PARAMETERS
|
||||
#
|
||||
# [*ironic_db_password*]
|
||||
# (required) The Ironic DB password
|
||||
#
|
||||
# [*mysql_password*]
|
||||
# (required) The mysql server password
|
||||
#
|
||||
# [*baremetal_json_hosts*]
|
||||
# (required) Baremetal hosts in JSON format, will be included in baremetal.json
|
||||
#
|
||||
# [*git_source_repo*]
|
||||
# (optional) Git repository location for pulling Bifrost
|
||||
# Defaults to 'https://opendev.org/openstack/bifrost'
|
||||
#
|
||||
# [*ensure*]
|
||||
# (optional) Ensure value for cloning the Bifrost repository.
|
||||
# This is a pass-thru variable for vcsrepo, acceptable values are
|
||||
# present/bare/absent/latest
|
||||
# Typically, you may want to set this value to either present or absent and use
|
||||
# revision for setting the branch or commit to clone.
|
||||
# Defaults to 'present'
|
||||
#
|
||||
# [*revision*]
|
||||
# (optional) The branch or commit to checkout on Bifrost repository
|
||||
# Defaults to 'master'
|
||||
#
|
||||
# [*git_dest_repo_folder*]
|
||||
# (optional) Folder to clone the Bifrost git repository
|
||||
# Defaults to '/opt/stack/bifrost'
|
||||
#
|
||||
# [*bifrost_config_folder*]
|
||||
# (optional) Folder to keep the configuration files, namely the global vars file
|
||||
# and baremetal.json
|
||||
# Defaults to '/etc/bifrost'
|
||||
# Note that due to how Ansible handles the directory layout of playbooks and roles,
|
||||
# you will need to pass '-e "@/etc/bifrost/bifrost_global_vars' switch to 'ansible-playbook'
|
||||
# to load the variables at execution time.
|
||||
# For more information, check http://docs.ansible.com/ansible/playbooks_variables.html
|
||||
#
|
||||
# [*ironic_url*]
|
||||
# (optional) The URL of the Ironic server
|
||||
# Defaults to '"http://localhost:6385"'
|
||||
#
|
||||
# [*network_interface*]
|
||||
# (optional) The network interface DHCP will serve requests on
|
||||
# Defaults to '"virbr0"'
|
||||
#
|
||||
# [*testing*]
|
||||
# (optional) If true, Ironic will provision libvirt and VMs instead of baremetal
|
||||
# Defaults to 'false'
|
||||
#
|
||||
# [*testing_user*]
|
||||
# (optional) VM default user in case testing is enabled
|
||||
# Defaults to 'ubuntu'
|
||||
#
|
||||
# [*http_boot_folder*]
|
||||
# (optional) gPXE folder location for HTTP PXE boot
|
||||
# Defaults to '/httpboot'
|
||||
#
|
||||
# [*nginx_port*]
|
||||
# (optional) NGINX HTTP port
|
||||
# Defaults to 8080
|
||||
|
||||
# [*ssh_public_key_path*]
|
||||
# (optional) SSH public key location, this will be injected in provisioned servers
|
||||
# Defaults to '"{{ ansible_env.HOME }}/.ssh/id_rsa.pub"'
|
||||
#
|
||||
# [*deploy_kernel*]
|
||||
# (optional) Kernel to PXE boot from
|
||||
# Defaults to '"{{http_boot_folder}}/coreos_production_pxe.vmlinuz"'
|
||||
#
|
||||
# [*deploy_ramdisk*]
|
||||
# (optional) Ramdisk to load after kernel boot
|
||||
# Defaults to '"{{http_boot_folder}}/coreos_production_pxe_image-oem.cpio.gz"'
|
||||
#
|
||||
# [*deploy_kernel_url*]
|
||||
# (optional) Kernel URL
|
||||
# Defaults to '"http://{{ hostvars[inventory_hostname][\'ansible_\' + network_interface][\'ipv4\'][\'address\'] }}:{{nginx_port}}/coreos_production_pxe.vmlinuz"'
|
||||
#
|
||||
# [*deploy_ramdisk_url*]
|
||||
# (optional) Ramdisk URL
|
||||
# Defaults to '"http://{{ hostvars[inventory_hostname][\'ansible_\' + network_interface][\'ipv4\'][\'address\'] }}:{{nginx_port}}/coreos_production_pxe_image-oem.cpio.gz"'
|
||||
#
|
||||
# [*deploy_image_filename*]
|
||||
# (optional) Deploy image filename
|
||||
# Defaults to '"deployment_image.qcow2"'
|
||||
#
|
||||
# [*deploy_image*]
|
||||
# (optional) URL for the deployment image
|
||||
# Defaults to '"{{http_boot_folder}}/{{deploy_image_filename}}"'
|
||||
#
|
||||
# [*create_image_via_dib*]
|
||||
# (optional) Flag to enable/disable image creation with diskimage-builder
|
||||
# Defaults to 'true'
|
||||
#
|
||||
# [*transform_boot_image*]
|
||||
# (optional) Flag to prepend a partition image with boot sector and partition table
|
||||
# Defaults to 'false'
|
||||
#
|
||||
# [*node_default_network_interface*]
|
||||
# (optional) Default network interface to configure with configdrive settings
|
||||
# Defaults to 'eth0'
|
||||
#
|
||||
# [*ipv4_subnet_mask*]
|
||||
# (optional) Subnet mask for configured NIC
|
||||
# Defaults to '255.255.255.0'
|
||||
#
|
||||
# [*ipv4_gateway*]
|
||||
# (optional) Gateway for configured NIC
|
||||
# Defaults to '192.168.1.1'
|
||||
#
|
||||
# [*ipv4_nameserver*]
|
||||
# (optional) Nameserver for DNS configuration
|
||||
# Defaults to '8.8.8.8'
|
||||
#
|
||||
# [*network_mtu*]
|
||||
# (optional) MTU for configured NIC
|
||||
# Defaults to '1500'
|
||||
#
|
||||
# [*dhcp_pool_start*]
|
||||
# (optional) Dnsmasq DHCP pool start
|
||||
# Defaults to '192.168.1.200'
|
||||
#
|
||||
# [*dhcp_pool_end*]
|
||||
# (optional) Dnsmasq DHCP pool end
|
||||
# Defaults to '192.168.1.250'
|
||||
#
|
||||
# [*ipmi_bridging*]
|
||||
# (optional) Flag to enable/disable IPMI bridging
|
||||
# Defaults to 'no'
|
||||
|
||||
class ironic::bifrost (
|
||||
$ironic_db_password,
|
||||
$mysql_password,
|
||||
$baremetal_json_hosts,
|
||||
$git_source_repo = 'https://opendev.org/openstack/bifrost',
|
||||
$ensure = present,
|
||||
$revision = 'master',
|
||||
$git_dest_repo_folder = '/opt/stack/bifrost',
|
||||
$bifrost_config_folder = '/etc/bifrost',
|
||||
$ironic_url = '"http://localhost:6385/"',
|
||||
$network_interface = '"virbr0"',
|
||||
$testing = false,
|
||||
$testing_user = 'ubuntu',
|
||||
$http_boot_folder = '/httpboot',
|
||||
$nginx_port = 8080,
|
||||
$ssh_public_key_path = '"{{ ansible_env.HOME }}/.ssh/id_rsa.pub"',
|
||||
$deploy_kernel = '"{{http_boot_folder}}/coreos_production_pxe.vmlinuz"',
|
||||
$deploy_ramdisk = '"{{http_boot_folder}}/coreos_production_pxe_image-oem.cpio.gz"',
|
||||
$deploy_kernel_url = '"http://{{ hostvars[inventory_hostname][\'ansible_\' + network_interface][\'ipv4\'][\'address\'] }}:{{nginx_port}}/coreos_production_pxe.vmlinuz"',
|
||||
$deploy_ramdisk_url = '"http://{{ hostvars[inventory_hostname][\'ansible_\' + network_interface][\'ipv4\'][\'address\'] }}:{{nginx_port}}/coreos_production_pxe_image-oem.cpio.gz"',
|
||||
$deploy_image_filename = '"deployment_image.qcow2"',
|
||||
$deploy_image = '"{{http_boot_folder}}/{{deploy_image_filename}}"',
|
||||
$create_image_via_dib = true,
|
||||
$transform_boot_image = false,
|
||||
$node_default_network_interface = 'eth0',
|
||||
$ipv4_subnet_mask = '255.255.255.0',
|
||||
$ipv4_gateway = '192.168.1.1',
|
||||
$ipv4_nameserver = '8.8.8.8',
|
||||
$network_mtu = '1500',
|
||||
$dhcp_pool_start = '192.168.1.200',
|
||||
$dhcp_pool_end = '192.168.1.250',
|
||||
$ipmi_bridging = 'no',
|
||||
) {
|
||||
|
||||
include ironic::deps
|
||||
|
||||
warning('ironic::bifrost is deprecated and will be removed during the OpenStack Yoga development cycle.')
|
||||
|
||||
git { $git_dest_repo_folder:
|
||||
ensure => $ensure,
|
||||
branch => $revision,
|
||||
origin => $git_source_repo,
|
||||
}
|
||||
|
||||
file { $bifrost_config_folder:
|
||||
ensure => directory
|
||||
}
|
||||
|
||||
file { "${bifrost_config_folder}/bifrost_global_vars":
|
||||
ensure => present,
|
||||
content => template('ironic/bifrost_global_vars.erb'),
|
||||
tag => 'bifrost-file',
|
||||
}
|
||||
|
||||
file { "${bifrost_config_folder}/baremetal.json":
|
||||
ensure => present,
|
||||
content => template('ironic/baremetal.json.erb'),
|
||||
tag => 'bifrost-file',
|
||||
}
|
||||
|
||||
File<| title == $bifrost_config_folder |> ~> File<| tag == 'bifrost-file' |>
|
||||
|
||||
}
|
||||
|
@ -17,10 +17,6 @@
|
||||
"name": "openstack/openstacklib",
|
||||
"version_requirement": ">=20.0.0 <21.0.0"
|
||||
},
|
||||
{
|
||||
"name": "puppet/git_resource",
|
||||
"version_requirement": ">=1.0.2 <2.0.0"
|
||||
},
|
||||
{
|
||||
"name": "openstack/oslo",
|
||||
"version_requirement": ">=20.0.0 <21.0.0"
|
||||
|
@ -0,0 +1,4 @@
|
||||
---
|
||||
upgrade:
|
||||
- |
|
||||
Integration for Ironic's Bifrost sub-project has been removed.
|
@ -1,94 +0,0 @@
|
||||
# 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.
|
||||
#
|
||||
# Unit tests for ironic::bifrost class
|
||||
#
|
||||
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'ironic::bifrost' do
|
||||
let :default_params do
|
||||
{
|
||||
:git_source_repo => 'https://opendev.org/openstack/bifrost',
|
||||
:revision => master,
|
||||
:git_dest_repo_folder => '/opt/stack/bifrost',
|
||||
:bifrost_config_folder => '/etc/bifrost',
|
||||
:ironic_url => '"http://localhost:6385/"',
|
||||
:network_interface => '"virbr0"',
|
||||
:testing => false,
|
||||
:testing_user => 'ubuntu',
|
||||
:http_boot_folder => '/httpboot',
|
||||
:nginx_port => 8080,
|
||||
:ssh_public_key_path => '"{{ ansible_env.HOME }}/.ssh/id_rsa.pub"',
|
||||
:deploy_kernel => '"{{http_boot_folder}}/coreos_production_pxe.vmlinuz"',
|
||||
:deploy_ramdisk => '"{{http_boot_folder}}/coreos_production_pxe_image-oem.cpio.gz"',
|
||||
:deploy_kernel_url => '"http://{{ hostvars[inventory_hostname][\'ansible_\' + network_interface][\'ipv4\'][\'address\'] }}:{{nginx_port}}/coreos_production_pxe.vmlinuz"',
|
||||
:deploy_ramdisk_url => '"http://{{ hostvars[inventory_hostname][\'ansible_\' + network_interface][\'ipv4\'][\'address\'] }}:{{nginx_port}}/coreos_production_pxe_image-oem.cpio.gz"',
|
||||
:deploy_image_filename => '"deployment_image.qcow2"',
|
||||
:deploy_image => '"{{http_boot_folder}}/{{deploy_image_filename}}"',
|
||||
:create_image_via_dib => true,
|
||||
:transform_boot_image => false,
|
||||
:node_default_network_interface => 'eth0',
|
||||
:ipv4_subnet_mask => '255.255.255.0',
|
||||
:ipv4_gateway => '192.168.1.1',
|
||||
:ipv4_nameserver => '8.8.8.8',
|
||||
:network_mtu => '1500',
|
||||
:dhcp_pool_start => '192.168.1.200',
|
||||
:dhcp_pool_end => '192.168.1.250',
|
||||
:ipmi_bridging => 'no',
|
||||
}
|
||||
end
|
||||
|
||||
let :params do
|
||||
{
|
||||
:mysql_password => 'changeme',
|
||||
:ironic_db_password => 'changeme',
|
||||
:baremetal_json_hosts => 'test',
|
||||
}
|
||||
end
|
||||
|
||||
shared_examples 'ironic::bifrost' do
|
||||
it { should contain_git('/opt/stack/bifrost').with(
|
||||
:ensure => 'present',
|
||||
:branch => 'master',
|
||||
:origin => 'https://opendev.org/openstack/bifrost',
|
||||
)}
|
||||
|
||||
it { should contain_file('/etc/bifrost').with(
|
||||
:ensure => 'directory',
|
||||
)}
|
||||
|
||||
it { should contain_file('/etc/bifrost/bifrost_global_vars').with(
|
||||
:ensure => 'present',
|
||||
:content => /ironic_url/,
|
||||
)}
|
||||
|
||||
it { should contain_file('/etc/bifrost/baremetal.json').with(
|
||||
:ensure => 'present',
|
||||
:content => /test/,
|
||||
)}
|
||||
end
|
||||
|
||||
on_supported_os({
|
||||
:supported_os => OSDefaults.get_supported_os
|
||||
}).each do |os,facts|
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge!(OSDefaults.get_facts())
|
||||
end
|
||||
|
||||
it_behaves_like 'ironic::bifrost'
|
||||
end
|
||||
end
|
||||
end
|
@ -1,3 +0,0 @@
|
||||
{
|
||||
<%= @baremetal_json_hosts %>
|
||||
}
|
@ -1,44 +0,0 @@
|
||||
---
|
||||
ironic_url: <%= @ironic_url %>
|
||||
network_interface: <%= @network_interface %>
|
||||
# ironic_db_password ironic user password for rabbit
|
||||
ironic_db_password: <%= @ironic_db_password %>
|
||||
# mysql_password: mysql root user password
|
||||
mysql_password: <%= @mysql_password %>
|
||||
# If testing is true, then the environment is setup for using libvirt
|
||||
# virtual machines for the hardware instead of real hardware.
|
||||
# testing: true
|
||||
#
|
||||
# Normally this user should be ubuntu, however if cirros is used,
|
||||
# a user may wish to define a specific user for testing VM
|
||||
# connectivity during atest sequence
|
||||
testing: <%= @testing %>
|
||||
testing_user: <%= @testing_user %>
|
||||
http_boot_folder: <%= @http_boot_folder %>
|
||||
nginx_port: <%= @nginx_port %>
|
||||
ssh_public_key_path: <%= @ssh_public_key_path %>
|
||||
deploy_kernel: <%= @deploy_kernel %>
|
||||
deploy_ramdisk: <%= @deploy_ramdisk %>
|
||||
deploy_kernel_url: <%= @deploy_kernel_url %>
|
||||
deploy_ramdisk_url: <%= @deploy_ramdisk_url %>
|
||||
# When using disk image builder based image generation, which is the
|
||||
# default at this time, the deploy_image_filename must end with .qcow2
|
||||
# due to the image creation process.
|
||||
deploy_image_filename: <%= @deploy_image_filename %>
|
||||
deploy_image: <%= @deploy_image %>
|
||||
# Setting to utilize diskimage-builder to create a bootable image.
|
||||
create_image_via_dib: <%= @create_image_via_dib %>
|
||||
# Transform boot image is intended for use with the Ubuntu trusty image. It makes the image bootable by installing Grub.
|
||||
# Setting to prepend a partition image with a boot sector and partition table.
|
||||
transform_boot_image: <%= @transform_boot_image %>
|
||||
node_default_network_interface: <%= @node_default_network_interface %>
|
||||
# ipv4_subnet_mask is intended for the static ipv4 address assignments.
|
||||
ipv4_subnet_mask: <%= @ipv4_subnet_mask %>
|
||||
ipv4_gateway: <%= @ipv4_gateway %>
|
||||
ipv4_nameserver: <%= @ipv4_nameserver %>
|
||||
network_mtu: <%= @network_mtu %>
|
||||
dhcp_pool_start: <%= @dhcp_pool_start %>
|
||||
dhcp_pool_end: <%= @dhcp_pool_end %>
|
||||
# ipmi_bridging: Default undefined. Valid values: "no", "single", and "dual"
|
||||
# See http://docs.openstack.org/developer/ironic/_modules/ironic/drivers/modules/ipmitool.html
|
||||
ipmi_bridging: <%= @ipmi_bridging %>
|
Loading…
Reference in New Issue
Block a user