Class: RightScale::ExecutableBundle
- Includes:
- Serializable
- Defined in:
- lib/right_agent/core_payload_types/executable_bundle.rb
Overview
Boot, operation or decommission executable bundle, includes:
-
RightScripts with associated packages, parameters and attachments
-
Recipes with associated JSON
-
Cookbook repositories with associated attributes
-
Audit id
Recipes and RightScripts instantiations are interspersed and ordered into one collection The instance agent can use the audit created by the core agent to audit messages associated with the processing of the software repositories
Instance Attribute Summary collapse
-
#audit_id ⇒ Object
(Integer) ID of corresponding audit entry.
-
#cookbook_repositories ⇒ Object
(Array) Chef cookbook repositories.
-
#cookbooks ⇒ Object
(Array) Chef cookbooks.
-
#dev_cookbooks ⇒ Object
- (Hash)
- collection of repos to be checked out on the instance :key (String)
- the hash id (SHA) of the repository :value (Hash)
- repo and cookbook detail :repo (Hash)
- repo details { <Symbol> Type of repository: one of :git, :svn, :download or :local * :git denotes a ‘git’ repository that should be retrieved via ‘git clone’ * :svn denotes a ‘svn’ repository that should be retrieved via ‘svn checkout’ * :download denotes a tar ball that should be retrieved via HTTP GET (HTTPS if uri starts with https://) * :local denotes cookbook that is already local and doesn’t need to be retrieved :repo_type => <Symbol>, <String> URL to repository (e.g. git://github.com/opscode/chef-repo.git) :url => <String>, <String> git commit or svn branch that should be used to retrieve repository Optional, use ‘master’ for git and ‘trunk’ for svn if tag is nil. Not used for raw repositories. :tag => <String>, <Array> Path to cookbooks inside repostory Optional (use location of repository as cookbook path if nil) :cookbooks_path => <Array>, <String> Private SSH key used to retrieve git repositories Optional, not used for svn and raw repositories. :ssh_key => <String>, <String> Username used to retrieve svn and raw repositories Optional, not used for git repositories. :username => <String>, <String> Password used to retrieve svn and raw repositories Optional, not used for git repositories. :password => <String> } :positions (Array)
-
List of CookbookPositions to be developed.
-
#executables ⇒ Object
(Array) Collection of RightScripts and chef recipes instantiations.
-
#full_converge ⇒ Object
(Boolean) Whether a full or partial converge should be done Note: Obsolete as of r_s_version 8, kept for backwards compatibility.
-
#repose_servers ⇒ Object
(String) Repose server to use.
-
#runlist_policy ⇒ Object
(RunlistPolicy) The RightLink policy this bundle belongs to.
-
#server_secret ⇒ Object
(String) The secret for any instance of the server that generated this bundle.
Instance Method Summary collapse
-
#initialize(*args) ⇒ ExecutableBundle
constructor
A new instance of ExecutableBundle.
-
#serialized_members ⇒ Object
Array of serialized fields given to constructor.
-
#to_s ⇒ Object
Human readable representation.
Methods included from Serializable
Constructor Details
#initialize(*args) ⇒ ExecutableBundle
Returns a new instance of ExecutableBundle.
96 97 98 99 100 101 102 103 104 105 106 |
# File 'lib/right_agent/core_payload_types/executable_bundle.rb', line 96 def initialize(*args) @executables = args[0] @cookbook_repositories = args[1] if args.size > 1 @audit_id = args[2] if args.size > 2 @full_converge = args[3] if args.size > 3 @cookbooks = args[4] if args.size > 4 @repose_servers = args[5] if args.size > 5 @dev_cookbooks = args[6] if args.size > 6 @runlist_policy = args[7] if args.size > 7 @server_secret = args[8] if args.size > 8 end |
Instance Attribute Details
#audit_id ⇒ Object
(Integer) ID of corresponding audit entry
45 46 47 |
# File 'lib/right_agent/core_payload_types/executable_bundle.rb', line 45 def audit_id @audit_id end |
#cookbook_repositories ⇒ Object
(Array) Chef cookbook repositories
42 43 44 |
# File 'lib/right_agent/core_payload_types/executable_bundle.rb', line 42 def cookbook_repositories @cookbook_repositories end |
#cookbooks ⇒ Object
(Array) Chef cookbooks
52 53 54 |
# File 'lib/right_agent/core_payload_types/executable_bundle.rb', line 52 def cookbooks @cookbooks end |
#dev_cookbooks ⇒ Object
- (Hash)
-
collection of repos to be checked out on the instance
- :key (String)
-
the hash id (SHA) of the repository
- :value (Hash)
-
repo and cookbook detail
- :repo (Hash)
-
repo details
{
<Symbol> Type of repository: one of :git, :svn, :download or :local
* :git denotes a 'git' repository that should be retrieved via 'git clone'
* :svn denotes a 'svn' repository that should be retrieved via 'svn checkout'
* :download denotes a tar ball that should be retrieved via HTTP GET (HTTPS if uri starts with https://)
* :local denotes cookbook that is already local and doesn't need to be retrieved
:repo_type => <Symbol>,
<String> URL to repository (e.g. git://github.com/opscode/chef-repo.git)
:url => <String>,
<String> git commit or svn branch that should be used to retrieve repository
Optional, use 'master' for git and 'trunk' for svn if tag is nil.
Not used for raw repositories.
:tag => <String>,
<Array> Path to cookbooks inside repostory
Optional (use location of repository as cookbook path if nil)
:cookbooks_path => <Array>,
<String> Private SSH key used to retrieve git repositories
Optional, not used for svn and raw repositories.
:ssh_key => <String>,
<String> Username used to retrieve svn and raw repositories
Optional, not used for git repositories.
:username => <String>,
<String> Password used to retrieve svn and raw repositories
Optional, not used for git repositories.
:password => <String>
}
:positions (Array):: List of CookbookPositions to be developed. Represents the subset of cookbooks identified as the "dev cookbooks"
88 89 90 |
# File 'lib/right_agent/core_payload_types/executable_bundle.rb', line 88 def dev_cookbooks @dev_cookbooks end |
#executables ⇒ Object
(Array) Collection of RightScripts and chef recipes instantiations
39 40 41 |
# File 'lib/right_agent/core_payload_types/executable_bundle.rb', line 39 def executables @executables end |
#full_converge ⇒ Object
(Boolean) Whether a full or partial converge should be done Note: Obsolete as of r_s_version 8, kept for backwards compatibility
49 50 51 |
# File 'lib/right_agent/core_payload_types/executable_bundle.rb', line 49 def full_converge @full_converge end |
#repose_servers ⇒ Object
(String) Repose server to use
55 56 57 |
# File 'lib/right_agent/core_payload_types/executable_bundle.rb', line 55 def repose_servers @repose_servers end |
#runlist_policy ⇒ Object
(RunlistPolicy) The RightLink policy this bundle belongs to
91 92 93 |
# File 'lib/right_agent/core_payload_types/executable_bundle.rb', line 91 def runlist_policy @runlist_policy end |
#server_secret ⇒ Object
(String) The secret for any instance of the server that generated this bundle.
94 95 96 |
# File 'lib/right_agent/core_payload_types/executable_bundle.rb', line 94 def server_secret @server_secret end |
Instance Method Details
#serialized_members ⇒ Object
Array of serialized fields given to constructor
109 110 111 112 113 114 115 116 117 118 119 |
# File 'lib/right_agent/core_payload_types/executable_bundle.rb', line 109 def serialized_members [ @executables, @cookbook_repositories, @audit_id, @full_converge, @cookbooks, @repose_servers, @dev_cookbooks, @runlist_policy, @server_secret ] end |
#to_s ⇒ Object
Human readable representation
Return
- desc(String)
-
Auditable description
125 126 127 128 |
# File 'lib/right_agent/core_payload_types/executable_bundle.rb', line 125 def to_s desc = @executables.collect { |e| e.title }.join(', ') if @executables desc ||= 'empty bundle' end |