forked from crowbar/crowbar-openstack
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ironic: barclamp for Ironic Bare Metal Service
New barclamp to handle deployment and configuration of Ironic service.
- Loading branch information
Showing
36 changed files
with
1,221 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/env ruby | ||
# | ||
# Copyright 2016, SUSE | ||
# | ||
# 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. | ||
# | ||
|
||
require File.join(File.expand_path(File.dirname(__FILE__)), "barclamp_lib") | ||
@barclamp = "ironic" | ||
@timeout = 3600 | ||
|
||
main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
DESCRIPTION | ||
=========== | ||
Chef Cookbook to install and configure Ironic | ||
|
||
REQUIREMENTS | ||
============ | ||
TBD | ||
|
||
|
||
License | ||
======= | ||
Author:: Jacek Tomasiak <[email protected]> | ||
|
||
Copyright:: 2016 SUSE | ||
|
||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# Copyright 2016, SUSE | ||
# | ||
# 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. | ||
# | ||
|
||
case node[:platform_family] | ||
when "rhel", "suse" | ||
default[:ironic][:platform] = { | ||
packages: [ | ||
"openstack-ironic", | ||
"openstack-ironic-api", | ||
"openstack-ironic-conductor", | ||
"python-ironicclient", | ||
"python-openstackclient" | ||
], | ||
services: [ | ||
"openstack-ironic-api", | ||
"openstack-ironic-conductor" | ||
], | ||
driver_dependencies: { | ||
pxe_ssh: ["python-paramiko"] | ||
} | ||
} | ||
default[:ironic][:api][:service_name] = "openstack-ironic-api" | ||
default[:ironic][:conductor][:service_name] = "openstack-ironic-conductor" | ||
|
||
when "debian" | ||
default[:ironic][:platform] = { | ||
packages: [ | ||
"ironic-api", | ||
"ironic-conductor", | ||
"python-ironicclient", | ||
"python-openstackclient" | ||
], | ||
services: [ | ||
"ironic-api", | ||
"ironic-api-conductor" | ||
], | ||
driver_dependencies: { | ||
pxe_ssh: ["python-paramiko"] | ||
} | ||
} | ||
default[:ironic][:api][:service_name] = "ironic-api" | ||
default[:ironic][:conductor][:service_name] = "ironic-conductor" | ||
end | ||
|
||
default[:ironic][:debug] = false | ||
default[:ironic][:verbose] = false | ||
default[:ironic][:max_header_line] = 16384 | ||
|
||
default[:ironic][:user] = "ironic" | ||
default[:ironic][:group] = "ironic" | ||
|
||
default[:ironic][:db][:database] = "ironic" | ||
default[:ironic][:db][:user] = "ironic" | ||
default[:ironic][:db][:password] = "" # Set by Crowbar | ||
|
||
default[:ironic][:service_user] = "ironic" | ||
default[:ironic][:service_password] = "" # Set by Crowbar | ||
|
||
default[:ironic][:api][:protocol] = "http" | ||
default[:ironic][:api][:port] = 6385 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name "ironic" | ||
maintainer "Crowbar project" | ||
maintainer_email "[email protected]" | ||
license "Apache 2.0" | ||
description "Installs/Configures Ironic" | ||
long_description IO.read(File.join(File.dirname(__FILE__), "README.md")) | ||
version "0.1" | ||
|
||
depends "crowbar-openstack" | ||
depends "database" | ||
depends "keystone" | ||
depends "rabbitmq" | ||
depends "neutron" | ||
depends "glance" | ||
depends "utils" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# frozen_string_literal: true | ||
return unless node["roles"].include?("nagios-client") | ||
|
||
svcs = [] | ||
ports = {} | ||
node[:ironic][:platform][:services].each { |svc| svcs << svc } | ||
node[:ironic][:api].each do |k, v| | ||
next if k !~ /port*/ | ||
ports[k] = v | ||
end | ||
|
||
log "Will monitor ironic services: #{svcs.inspect}" | ||
|
||
include_recipe "nagios::common" | ||
|
||
template "/etc/nagios/nrpe.d/ironic_nrpe.cfg" do | ||
source "ironic_nrpe.cfg.erb" | ||
mode "0644" | ||
group node[:nagios][:group] | ||
owner node[:nagios][:user] | ||
variables( | ||
ironic_services: svcs, | ||
ironic_ports: ports, | ||
ironic_ip: node.ipaddress | ||
) | ||
notifies :restart, "service[nagios-nrpe-server]" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# frozen_string_literal: true | ||
# Copyright 2016, SUSE | ||
# | ||
# 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. | ||
# | ||
|
||
if CrowbarRoleRecipe.node_state_valid_for_role?(node, "ironic", "ironic-server") | ||
include_recipe "ironic::server" | ||
include_recipe "ironic::monitor" | ||
include_recipe "ironic::tftp" | ||
end |
Oops, something went wrong.