If the configuration of software component has not been changed, but a
set of nodes in the server group has been modified, the component's
default checkClusterIsConfigured method will now properly return true,
thus the configuration will be applied on newly added nodes.
This is achieved by storing instance ids as part of component's
'configuration' attributed stored for its server group.
Change-Id: Ic8bbddc577518071d90a6e33518156047a1d2e2e
Closes-bug: #1634206
Classes were removed for the following reasons:
1) They doesn't bring any significant value. Especially for complex
apps where the are supposed to be used
2) The naming is not appropriate
3) There are no appropriate names exist because those classes can
be equally good used for scenarios where there is a primary/secondary
nodes, when there are 2 types of nodes with different relations or
even for just 2-components apps
4) Thus property names like master and slave limit inheritors in
giving them better names that better reflect component roles
within the application
Change-Id: Ia47f0ee42e03706223e73eaced44fda8f22fe814
Closes-Bug: #1617363
When security rules were applied they were were
applied to the environment's Heat stack. Now they
are applied to each region's stack application
instances belong in.
Change-Id: Ia94cf24bcf517af7db57117f86c7b802423f81df
This commit introduces several basic building blocks
for replication providers:
* PoolReplicaProvider returns replica from the prepopulated pool (that
can become empty over time). Released replicas are returned to the pool.
* RoundrobinReplicaProvider returns items from the prepopulated
list. When the list is exhausted it returns them again thus reusing
the items. This is usually needed to spread the load between
fixed number of servers or other cloud resources.
* CompositeReplicaProvider allows to combine several replica
providers into one. When new replica is requested it tries to
obtain it from the underlay providers one by so if the first
replica provider goes out of resources the second is used
for further allocations.
Also refactor replica release interface to better handle
down-scaling by more than 1 item
Change-Id: I923b2c6d0cd3a881be323399b7b13481e9a4a459
With introduction of template() contract method
most of the functionality of the replication code
is now built in into murano.
This commit removes unneeded classes, simplifies
replication and fixes bugs from previous commits
Change-Id: I4b2c7c9faa5b0773f2b398e4265f456010766fd9
Added 6 base classes which may be inherited by app developers to
utilize the benefits of Application Development Framework:
* SingleServerApplication - an app which is a software component of
its own and expects a single server as an input. Deploys itself on
this server.
* MultiServerApplication - an app which is a software component of its
own. Expects a ServerGroup as an input. Deploys itself on all
servers of this group.
* MultiServerApplicationWithScaling - same as MultiServerApplication
but also capable of scaling in and out.
* MasterSlaveApplication - a composite application which consists of a
'Master' and 'Slave' software comonents and two ServerGroup's (the
second one being optional). First installs the 'Master' component on
the first group, then - the 'Slave' component on the second (or the
first, if the second group is not specified)
* MasterSlaveApplicationWithMasterScaling - same as
MasterSlaveApplication but also capable of scaling its 'master'
group in and out.
* MasterSlaveApplicationWithSlaveScaling - same as
MasterSlaveApplication but also capable of scaling its 'slave' group
in and out.
Both MasterSlaveApplicationWithMasterScaling and
MasterSlaveApplicationWithSlaveScaling can be inherited by a single
class to achieve both master and slave scaling capabilities.
Targets-blueprint: application-development-framework
Change-Id: I153c6865d8295b44254c50535c61edca44553ca8
ServerGroup is now split into ServerGroupList and ServerReplicationGroup.
The ServerGroup class is now the base interface for both.
ServerGroupList (previously just ServerGroup) class no longer
inherits ReplicationGroup, thus just being a collection of servers,
without the mandatory provider property.
Replication functionality extracted to ServerReplicationGroup, being a
subclass of both ServerGroup and ReplicationGroup. Apps requiring
autoscaling may narrow down their contracts to ServerReplicationGroup.
Others may stay with a base class.
Also introduces CompositeServerGroup which is a convenient
way to join several ServerGroups into one.
Change-Id: Ia15659c43422551785a762b4dce3bde312a7915f
Introduced a number of changes to classes of SoftwareComponent
hierarchy:
* BaseSoftwareComponent class removed, Installable and Configurable have
no base anymore.
* Allowed number of failures may now be configured independently for
different workflows.
* Allowed number of failures extended with 'two' and 'three'.
* Attribute usage for state persistence is simplified: attributes are
now saved on appropriate servers and server groups.
* Inverted the names and semantics of status checking methods: they now
return true if the needed status is already applied and no further
action is needed.
* on%something% methods no longer trigger events, they have no default
bodies at all, so it's easier to override them; events are triggered
by the caller method.
* Handler methods got more arguments: besides the primary argument (a
servergroup or a server) they get a list of pending servers, failed
servers et.
* Some methods and method arguments renamed for consistency.
Change-Id: Ic52e66014d18e7fe640b79dd161286a1a9ebe15e
Changed the pattern of component name for servers created with
ServerProviders (now they always have names like 'Server-X' where X is
the index of server, followed by a name of an owning ServerGroup if
one exists), as well as the reporting of Server's provisioning (it now
happens even if the server of server group do not have their component
names)
Change-Id: I6a92b7951606069e576824a0ba4135275b959776
The naming of the classes which were working with servers was
inconsistent: at some places they were referenced as "instances", at
some others as "servers". This is inconsistent, also the word
'instance' is too generic.
So a refactoring was made: InstanceGroup and InstanceProvider were
renamed to ServerGroup and ServerProvider. Some other properties and
variable names were renamed accordingly.
Change-Id: I4ce2d09ae890aec4eb61d9719932c65457fb6dba
Fixed several reporting-related bugs in io.murano.applications
framework:
* when reporting was relying on the presence of possibly uninitialized
property of Environment
* when environment for reporting was not accessible due to property
protection level
* when reporting was done for an instance object name instead of
hostname
Closes-bug: #1610997
Change-Id: Id517a511937fa1f65b5fec6bcd0ff5dbe1b33812
Added two classed to implement two basic application workflows:
installation and software configuration, with appropriate error
handling, reporting, event-based notifications and so on. A class
called 'SoftwareComponent' inherits both these classes and is able to
run these two workflows sequentially to install and configure software
on given Instance Groups.
Change-Id: Ic0c1bbad1f0e3ae71b339c56db245075bcc420ac
Targets-blueprint: application-development-framework
Added 'InstanceGroup' - an Instance-based implementation of
'ReplicationGroup' class, and a 'LmiProvider' - a factory class capable
of producing objects of LinuxMuranoInstance class for the
InstanceGroup by cloning a given 'source' instance.
Change-Id: If3e450d8261a8a5510a2b43f8842fa4023efd15a
Targets-blueprint: application-development-framework
This patch adds an 'Event' class which may be used to issue various
notifications to other MuranoPl classes in an Event-driven manner.
Any object which is going to emit the notifications should declare the
instances of this new class as its public Runtime properties. The
objects going to subscribe for the notifications should pass
themselves into the 'subscribe' method of the Event along with the
names of their methods which will be used to handle the notification.
The specified handler methods must be present in the subscriber class
(if the method name is missing it will be defaulted to the
'handle%Eventname%') and has at least one standard (i.e. non-vararg
or kwarg) argument.
The class going to emit the notification should call the 'notify'
method of the event and pass itself as the first argument. All the
optional parameters of the event may be passed as varargs/kwargs of
the 'notify' call and will be passed all the way to the handler
methods.
Since this approach relies on the reflection this patch also fixes a
bug #1596647 since its fix is required for the argument reflection to
work properly. It also documents new reflection capabilities which
were added as part of the bugfix.
Targets-blueprint: application-development-framework
Closes-Bug: #1596647
Change-Id: Ifa7053e4c7b8456030e8df743f57ed812104b064
This is a first commit for a library package for Application
Development Library (earlier known as "Scalable Framework") called
io.murano.applications
This patch includes the base classes for node Replication
(ReplicaProvider and ReplicationGroup) and their Test-Runner-based
tests, as well as two reference implementations of ReplicaProvider -
one based on the templating (TemplateReplicaProvider) and another one
based on the cloning of passed objects (CloneReplicaProvider).
Both reference provider implementations are covered with their own
tests.
Targets-blueprint: application-development-framework
Change-Id: Ia6a48d51f41693fbb85d2b6c2851c1c286c6aa23