22 Commits

Author SHA1 Message Date
Jenkins
fb9026accc Merge "Correct property accessibility for classes in Instance hierarchy" 2014-06-04 14:52:23 +00:00
Alexander Tivelkov
66eed1adf4 Correct property accessibility for classes in Instance hierarchy
`environment` and `resources` properties are no longer used in classes which
inherit `Instance` (local vars are used instead)

Change-Id: I2f3eb64157d2754fedffa66b814f26aa62081456
Closes-Bug: #1326369
2014-06-04 17:31:35 +04:00
Alexander Tivelkov
f8687fdc52 Declare a Runtime property for StatusReporter in Environment
`reporter` field is initialized in Environment's `initialize` method, 
however it was not declared.
This caused the property to private, i.e. unaccessible from other 
classes.
Declaring it with `Runtime` usage solves the problem

Change-Id: Iee74139bb143bd3891bce8e317ef7c047ecf2517
Closes-bug: #1326363
2014-06-04 11:59:55 +00:00
Serg Melikyan
8c91052b47 Add support for actions in engine
Methods in MuranoPL now can be marked with Usage attribute
to specify whether particular method available for remote
call or not. By default usage is Runtime (not available for
remote call).

Workflow:
  migrateVm:
    Usage: Action
    Arguments:
      - killExisting:
          Contract: $.bool()
          Default: True

Change-Id: If3da3c6bf67aa79d522d82abbf3b5378f72e87ae
Partially-Implements: blueprint application-actions
2014-06-03 14:01:41 +04:00
Alexander Tivelkov
79e07eeac4 Renamed the PublicIp and set it to addresses in instance snippet
As the heat format of the Instance has been changed from AWS to HOT,
the PublicIp attribute is not longer available. A "address" should
be used instead.

Also, the resource name has to be renamed from PublicIp to the
assigned-ip, as it is not necessary public

Change-Id: I9a4e99680939b6e31d47a1f181b92d1878f65a5e
Closes-Bug: #1319135
2014-05-23 21:13:37 +04:00
Jenkins
36ace6b00b Merge "Add more classes to Instance inheritance hierarchy" 2014-05-13 16:39:35 +00:00
Alexander Tivelkov
16d751adaf Add more classes to Instance inheritance hierarchy
Instance class is too generic and contains some dirty workarounds to differently handle
Windows and Linux images, different ways to bootstrap the instance etc.

It is suggested to add more classes to build a better hierarchy:

Base Instance class becomes abstract and agnostic of the desired OS and agent type
It is inherited by two classes: LinuxInstance and WindowsInstance
LinuxInstance adds a default security rule for Linux, opening a standard SSH port
WindowsInstance adds a default security rule for Windows, opening an RDP port
At the same time WindowsInstance prepares a user-data allowing to use Murano v1 agent

LinuxInstance is inherited by two other classes, having different software config method
LinuxMuranoInstance adds a user-data preparation to configure Murano v2 agent
LinuxUDInstance adds a custom user-data field, allowing the services to supply their own
user data

Change-Id: I7394a10d1940c0cb746df6db9d326375dc5e7ccb
2014-05-13 13:39:35 +00:00
Steve McLellan
b7626aa140 Use HOT instead of CFN heat template format
New Heaet features will get added to HOT but possibly not the
older CFN format, and it's easier to make the change now than
later.

The only code change is in heat_stack to look for 'resources'
instead of 'Resources'; all other changes are to the Heat template
sections within PL class definitions. Keys are lower-cased and
in some cases changed to match HOT (e.g. key_name instead of KeyName),
and sections specifying Heat resources add heat_template_version to
the template.

Implements blueprint replace-cfn-templates-with-hot

Change-Id: If4d34cd25a4e964d7555fedf218512d5c0f5615c
2014-05-07 16:46:28 -05:00
Alexander Tivelkov
3e7eaee594 Basic Security Groups implementation
Change-Id: I6a7f9953206f28b2b1fa6223bcceab60ddaadb13
Closes-bug: #1308623
2014-05-05 15:08:22 +04:00
Steve McLellan
df28846c4a Add KeyName to Instance heat template
Adds an ssh keyname if specified to the Heat template; it is optional
and defaults to null.

Change-Id: Id80cf403f834a9ed8d3a0660a2687ab17ddb0f6d
2014-05-02 18:15:54 -05:00
Alexander Tivelkov
86a3fa3abe Added functionality to assign FloatingIP addresses
The Instance class got an boolean field 'assignFloatingIp', false by default.
If this is set 'true', the instance will attempt to assign a floating ip in one
of its networks (starting from default ones)

NetworkExplorer class got a functionality to dicover the ID of the external network:
- for newly created networks it will use their specified external router's external_gateway_info
- for existing networks it will iterate among all their routers

Change-Id: I754cd41ffacbf2a2ec62ac23c3a5a7883d1e13b5
Closes-Bug: #1314193
2014-04-29 19:11:28 +04:00
Alexander Tivelkov
b7aec89493 Added MuranoPL infrastructure for advanced networking scenarios
Base class 'Network' (io.murano.resources.Network) was added to core package.
This class is an abstract class for network interaction, to be inherited by
engine-specific implementations.

'Environment' class got a 'defaultNetworks' input parameter, containing two
different instances of Network class  for two initially supported networking use-cases:
'environment' for a topology when each environment has an isolated network
'flat' for a single network per multiple environments

'Instance' class got a 'networks' input parameter with a default value.
This is a composite parameter indicating which networks the instance should join
If 'useEnvironmentNetwork' is set to 'true' the instance should join an
isolated network of current environment
if 'useFlatNetwork' is set to 'true' the instance should join a single
shared network
Both values may be enabled, so the instance will join both networks.
'customNetworks' field of the same data structure may be used to specify custom
network resources to join

Same commit includes a temporary workaround for bug #1313694
The workaround is needed to properly use default of 'networks' field

The actual implementation of io.murano.resources.Network class should
be done in a separate package, which should be added to app-incubator repo

Change-Id: If2ae332a61900b0dd94cec94c1c140c54079441f
Partial-Bug: #1308921
2014-04-29 12:43:48 +04:00
Jenkins
130bf9d295 Merge "Add basic reporting to engine" 2014-04-23 20:32:09 +00:00
Georgy Okrokvertskhov
1a17a0fe45 Add basic reporting to engine
This patch adds reporting system to engine.
It is used in two major places
a) to report error to API when exception occurs
b) report service status reports to API via workflow as
- $this.find(std:Environment).reporter.report($this, 'Creating VM.')

Change-Id: I7310931482447e174114164ed921bb3fcbfb9d66
2014-04-24 00:08:11 +04:00
Serg Melikyan
732da7b5ba Added ipAddresses property to Instance
Change-Id: I780cc6ea056ee3777af1becd59f1d9e9373f89b4
2014-04-23 17:53:56 +04:00
Serg Melikyan
ca9aae1554 Fixed name of the log file on VM
Small fix for images with pre-created /etc/murano directory

Change-Id: Ie5738b89efba7619f0d4e30500407ff0daea4f6a
2014-04-22 18:45:55 +04:00
Jenkins
1b7d3b0bbd Merge "Heat stack could remain even if all applications were removed" 2014-04-21 10:42:26 +00:00
Stan Lagun
11bdc79d24 Heat stack could remain even if all applications were removed
Closes-Bug: #1308910

Change-Id: I03b8ec9597575a9be5eec7a79ace7c7e74a3d775
2014-04-21 03:07:44 +04:00
Stan Lagun
c4266d89df Rename Type to Usage for MuranoPL properties
Change-Id: Ide9368fd57d3322476d59c7d4cbb83d59736f664
Closes-Bug: #1308924
2014-04-20 23:06:49 +04:00
Stan Lagun
4dd5c7b2f2 Billing statistics improved
Instance tracking information was improved to contain additional
information on instances such as type name, descriptive title
and number of VMs used by the application.

Added ability to retrieve non-aggregated statistics.
Also instance statistics API refactoring was made.

Implements blueprint app-catalog-billing

Change-Id: I8f3ea1a3947ceaf7deb2ee62b4ad41cbf230596e
2014-04-11 14:54:54 +04:00
Serg Melikyan
c76dff77fe io.murano.Environment used without namespace
Change-Id: Ia858573b197d4197fde6540dd69f54ef57c3b61b
2014-04-10 16:33:11 +04:00
Stan Lagun
ac6a0dedec Added 'destroy' method that is called on deleted instances
Added ability to modify/remove data from structures (like Heat
templates) via jsonpatch and thus added ability to clean up Heat
resources that was obtained by deleted instances

Closes bug: #1296624

Change-Id: I4db226a5ab00ff363f8b5d44a5d690df942622e8
2014-04-08 16:32:29 +04:00