Skip to content

Commit

Permalink
Merge branch 'SLE-12-SP2-CASP' into merge_SLE-12-SP2-CASP
Browse files Browse the repository at this point in the history
  • Loading branch information
teclator committed Feb 10, 2017
2 parents 9b985ed + 7480713 commit aebf1b9
Show file tree
Hide file tree
Showing 18 changed files with 680 additions and 124 deletions.
13 changes: 13 additions & 0 deletions package/yast2-installation.changes
@@ -1,3 +1,16 @@
-------------------------------------------------------------------
Wed Feb 8 16:42:29 UTC 2017 - kanderssen@suse.com

- CaaSP all-in-one-dialog: added validation to the controller node
location field, modified label and write it to the minion
master.conf file at the end of the installation (FATE#321738)
- CaaSP: Display the Beta product warning at start when it is
present (bsc#1016887)
- Enable CaaSP specific services on the installed system
(FATE#321738)
- Do not crash if role contain own service to enable (bsc#1022762)
- 3.2.21

-------------------------------------------------------------------
Fri Feb 3 10:07:35 UTC 2017 - jsrain@suse.cz

Expand Down
5 changes: 4 additions & 1 deletion package/yast2-installation.spec
Expand Up @@ -17,7 +17,7 @@


Name: yast2-installation
Version: 3.2.20
Version: 3.2.21
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build
Expand Down Expand Up @@ -77,6 +77,9 @@ Requires: yast2-services-manager
# Network service setup moved into yast2-network
Requires: yast2-network >= 3.1.143

# Augeas lenses
Requires: augeas-lenses

# Only in inst-sys
# Requires: yast2-add-on
# Requires: yast2-update
Expand Down
2 changes: 0 additions & 2 deletions src/clients/inst_worker_role.rb

This file was deleted.

3 changes: 3 additions & 0 deletions src/clients/roles_finish.rb
@@ -0,0 +1,3 @@
require "installation/clients/roles_finish"

::Installation::Clients::RolesFinish.run
28 changes: 28 additions & 0 deletions src/lib/installation/cfa/salt.rb
@@ -0,0 +1,28 @@
require "cfa/base_model"
require "cfa/augeas_parser"
require "cfa/matcher"

module Installation
module CFA
# Represents a Salt Minion master configuration file.
class MinionMasterConf < ::CFA::BaseModel
attributes(master: "master")

# Configuration parser
#
# FIXME: At this time, we're using Augeas' cobblersettings lense because,
# although the file is in yaml format, it doesn't have a YAML header
# which is required by the yaml lense.
PARSER = ::CFA::AugeasParser.new("cobblersettings.lns")
# Path to configuration file
PATH = "/etc/salt/minion.d/master.conf".freeze

# Constructor
#
# @param file_handler [.read, .write, nil] an object able to read/write a string.
def initialize(file_handler: nil)
super(PARSER, PATH, file_handler: file_handler)
end
end
end
end
26 changes: 23 additions & 3 deletions src/lib/installation/clients/inst_casp_overview.rb
Expand Up @@ -27,6 +27,7 @@

require "installation/widgets/overview"
require "installation/widgets/system_role"
require "installation/services"

module Installation
# This library provides a simple dialog for setting
Expand All @@ -47,6 +48,7 @@ def run
Yast.import "CWM"
Yast.import "Popup"
Yast.import "Pkg"
Yast.import "InstShowInfo"

textdomain "installation"

Expand All @@ -58,6 +60,9 @@ def run
# helpful when testing all manually on a running system
Yast::Wizard.CreateDialog if separate_wizard_needed?

# show the Beta warning if it exists
Yast::InstShowInfo.show_info_txt(INFO_FILE) if File.exist?(INFO_FILE)

ret = nil
loop do
ret = Yast::CWM.show(
Expand Down Expand Up @@ -92,13 +97,28 @@ def run
end
end

add_casp_services

Yast::Wizard.CloseDialog if separate_wizard_needed?

ret
end

private

# location of the info.txt file (containing the Beta warning)
INFO_FILE = "/info.txt".freeze

# Specific services that needs to be enabled on CAaSP see (FATE#321738)
# It is additional services to the ones defined for role.
# It is caasp only services and for generic approach systemd-presets should be used.
# In this case it is not used, due to some problems with cloud services.
CASP_SERVICES = ["sshd", "cloud-init-local", "cloud-init", "cloud-config",
"cloud-final", "issue-generator", "issue-add-ssh-keys"].freeze
def add_casp_services
::Installation::Services.enabled.concat(CASP_SERVICES)
end

def quadrant_layout(upper_left:, lower_left:, upper_right:, lower_right:)
HBox(
HWeight(
Expand All @@ -124,7 +144,7 @@ def quadrant_layout(upper_left:, lower_left:, upper_right:, lower_right:)
# Returns a pair with UI widget-set for the dialog and widgets that can
# block installation
def content
dashboard = Installation::Widgets::DashboardPlace.new
controller_node = Installation::Widgets::ControllerNodePlace.new
quadrant_layout(
upper_left: VBox(
::Registration::Widgets::RegistrationCode.new,
Expand All @@ -133,8 +153,8 @@ def content
::Y2Country::Widgets::KeyboardSelectionCombo.new("english-us")
),
lower_left: VBox(
Installation::Widgets::SystemRole.new(dashboard),
dashboard,
Installation::Widgets::SystemRole.new(controller_node),
controller_node,
Tune::Widgets::SystemInformation.new
),
upper_right: VBox(
Expand Down
1 change: 1 addition & 0 deletions src/lib/installation/clients/inst_finish.rb
Expand Up @@ -389,6 +389,7 @@ def save_config_steps
"users",
"autoinst_scripts2",
"installation_settings",
"roles",
"services"
].freeze

Expand Down
44 changes: 44 additions & 0 deletions src/lib/installation/clients/roles_finish.rb
@@ -0,0 +1,44 @@
# encoding: utf-8

# ------------------------------------------------------------------------------
# Copyright (c) 2017 SUSE LLC
#
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of version 2 of the GNU General Public License as published by the
# Free Software Foundation.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# this program; if not, contact SUSE.
#
# To contact SUSE about this file by physical or electronic mail, you may find
# current contact information at www.suse.com.
# ------------------------------------------------------------------------------

require "installation/finish_client"
require "installation/system_role"

module Installation
module Clients
# This is a step of base installation finish and is responsible of write the
# specific configuration for the current system role.
#
# It has been added for CaaSP Roles (FATE#321754) and currently only
# the 'worker_role' has an special behavior.
class RolesFinish < ::Installation::FinishClient
def title
textdomain "installation"
_("Writing specific role configuration ...")
end

# Finish installation for the current role
def write
SystemRole.finish
end
end
end
end
61 changes: 0 additions & 61 deletions src/lib/installation/dialogs/worker_role.rb

This file was deleted.

0 comments on commit aebf1b9

Please sign in to comment.