Class: UU::C3::AppDeployment
- Inherits:
-
Object
- Object
- UU::C3::AppDeployment
- Defined in:
- lib/uu/c3/app_deployment.rb
Overview
Client of service providing operations for self-service deployment of uuApps.
Class Method Summary collapse
-
.deploy(resource_pool_uri, parameters = {}) ⇒ UU::OS::Lang::Future
Deploys the specified appbox to the given pool.
-
.get_app_deployment_list(resource_pool_uri, criteria = {}) ⇒ Hash<Symbol, Object>
Returns list of applications deployed in the given pool.
-
.get_app_share_list(app_deployment_uri, parameters = {}) ⇒ Hash<Symbol, Object>
Returns list of application shares.
-
.get_attributes(app_deployment_uri_or_tid_asid) ⇒ Hash<Symbol, Object>
Returns attributes of app deployment identified by either its UESURI or combination of TID (Territory ID) and ASID (AppServer ID) associated with that app deployment.
-
.get_effective_env(resource_pool_uri) ⇒ Hash
Returns effective environment configuration for nodes deployed in the specified resource pool.
-
.get_resource_pool_capacity(resource_pool_uri) ⇒ Hash<Symbol, Object>
Returns capacity overview for the given pool.
-
.get_supported_runtime_stack_list(resource_pool_uri, criteria = {}) ⇒ Hash<Symbol, Object>
Returns list of supported runtime stacks for the specified resource pool.
-
.redeploy(app_deployment_uri) ⇒ UU::OS::Lang::Future
Redeploys the specified app deployment.
-
.scale(app_deployment_uri, parameters = {}) ⇒ UU::OS::Lang::Future
Modifies the count of nodes on which the AppDeployment is deployed.
-
.share(app_deployment_uri, parameters = {}) ⇒ UU::OS::Lang::Future
Shares the specified app deployment to the given territories.
-
.swap(app_deployment_uri) ⇒ UU::OS::Lang::Future
Swaps between 'PRODUCTION' and 'BETA' slots.
-
.undeploy(app_deployment_uri, parameters = {}) ⇒ UU::OS::Lang::Future?
Undeploys the specified uuApp from the pool and releases all related allocated resources.
-
.unshare(app_deployment_uri, parameters = {}) ⇒ UU::OS::Lang::Future
Terminates sharing of the specified app deployment for the given territories.
Instance Method Summary collapse
-
#deploy(resource_pool_uri, parameters = {}) ⇒ UU::OS::Lang::Future, UU::OS::UESURI
Deploys the specified appbox to the given pool.
-
#get_app_deployment_list(resource_pool_uri, criteria = {}) ⇒ Hash<Symbol, Object>
Returns list of applications deployed in the given pool.
-
#get_app_share_list(app_deployment_uri, parameters = {}) ⇒ Hash<Symbol, Object>
Returns list of application shares.
-
#get_attributes(app_deployment_uri_or_tid_asid) ⇒ Hash<Symbol, Object>
Returns attributes of app deployment identified by either its UESURI or combination of TID (Territory ID) and ASID (AppServer ID) associated with that app deployment.
-
#get_effective_env(resource_pool_uri) ⇒ Hash
Returns effective environment configuration for nodes deployed in the specified resource pool.
-
#get_resource_pool_capacity(resource_pool_uri) ⇒ Hash<Symbol, Object>
Returns capacity overview for the given pool.
-
#get_supported_runtime_stack_list(resource_pool_uri, criteria = {}) ⇒ Hash<Symbol, Object>
Returns list of supported runtime stacks for the specified resource pool.
-
#initialize(session = nil) ⇒ AppDeployment
constructor
Creates a new instance of
AppDeployment
. -
#redeploy(app_deployment_uri) ⇒ UU::OS::Lang::Future
Redeploys the specified app deployment.
-
#scale(app_deployment_uri, parameters = {}) ⇒ UU::OS::Lang::Future
Modifies the count of nodes on which the AppDeployment is deployed.
-
#share(app_deployment_uri, parameters = {}) ⇒ UU::OS::Lang::Future
Shares the specified app deployment to the given territories.
-
#swap(app_deployment_uri) ⇒ UU::OS::Lang::Future
Swaps between 'PRODUCTION' and 'BETA' slots.
-
#undeploy(app_deployment_uri, parameters = {}) ⇒ UU::OS::Lang::Future?
Undeploys the specified uuApp from the pool and releases all related allocated resources.
-
#unshare(app_deployment_uri, parameters = {}) ⇒ UU::OS::Lang::Future
Terminates sharing of the specified app deployment for the given territories.
Constructor Details
#initialize(session = nil) ⇒ AppDeployment
Creates a new instance of AppDeployment
.
35 36 37 |
# File 'lib/uu/c3/app_deployment.rb', line 35 def initialize(session = nil) @client = UU::OS::CMD::CommandClient.new(PATH, session) end |
Class Method Details
.deploy(resource_pool_uri, parameters = {}) ⇒ UU::OS::Lang::Future
Deploys the specified appbox to the given pool. This method is a convenience shortcut for the #deploy instance method.
214 215 216 |
# File 'lib/uu/c3/app_deployment.rb', line 214 def self.deploy(resource_pool_uri, parameters = {}) self.new(UU::OS::Security::Session.current_session).deploy(resource_pool_uri, parameters) end |
.get_app_deployment_list(resource_pool_uri, criteria = {}) ⇒ Hash<Symbol, Object>
Returns list of applications deployed in the given pool. This method is a convenience shortcut for the #get_app_deployment_list instance method.
483 484 485 |
# File 'lib/uu/c3/app_deployment.rb', line 483 def self.get_app_deployment_list(resource_pool_uri, criteria = {}) self.new(UU::OS::Security::Session.current_session).get_app_deployment_list(resource_pool_uri, criteria) end |
.get_app_share_list(app_deployment_uri, parameters = {}) ⇒ Hash<Symbol, Object>
Returns list of application shares. This method is a convenience shortcut for the #get_app_share_list instance method.
659 660 661 |
# File 'lib/uu/c3/app_deployment.rb', line 659 def self.get_app_share_list(app_deployment_uri, parameters = {}) self.new(UU::OS::Security::Session.current_session).get_app_share_list(app_deployment_uri, parameters) end |
.get_attributes(app_deployment_uri_or_tid_asid) ⇒ Hash<Symbol, Object>
Returns attributes of app deployment identified by either its UESURI or combination of TID (Territory ID) and ASID (AppServer ID) associated with that app deployment. This method is a convenience shortcut for the #get_attributes method.
713 714 715 |
# File 'lib/uu/c3/app_deployment.rb', line 713 def self.get_attributes(app_deployment_uri_or_tid_asid) return self.new(UU::OS::Security::Session.current_session).get_attributes(app_deployment_uri_or_tid_asid) end |
.get_effective_env(resource_pool_uri) ⇒ Hash
Returns effective environment configuration for nodes deployed in the specified resource pool. This method is a convenience shortcut for the #get_effective_env method.
898 899 900 |
# File 'lib/uu/c3/app_deployment.rb', line 898 def self.get_effective_env(resource_pool_uri) self.new(UU::OS::Security::Session.current_session).get_effective_env(resource_pool_uri) end |
.get_resource_pool_capacity(resource_pool_uri) ⇒ Hash<Symbol, Object>
Returns capacity overview for the given pool. This method is a convenience shortcut for the #get_resource_pool_capacity instance method.
391 392 393 |
# File 'lib/uu/c3/app_deployment.rb', line 391 def self.get_resource_pool_capacity(resource_pool_uri) self.new(UU::OS::Security::Session.current_session).get_resource_pool_capacity(resource_pool_uri) end |
.get_supported_runtime_stack_list(resource_pool_uri, criteria = {}) ⇒ Hash<Symbol, Object>
Returns list of supported runtime stacks for the specified resource pool. This method is a convenience shortcut for the #get_supported_runtime_stack_list instance method.
986 987 988 |
# File 'lib/uu/c3/app_deployment.rb', line 986 def self.get_supported_runtime_stack_list(resource_pool_uri, criteria = {}) self.new(UU::OS::Security::Session.current_session).get_supported_runtime_stack_list(resource_pool_uri, criteria) end |
.redeploy(app_deployment_uri) ⇒ UU::OS::Lang::Future
Redeploys the specified app deployment. This method is a convenience shortcut for the #redeploy instance method.
290 291 292 |
# File 'lib/uu/c3/app_deployment.rb', line 290 def self.redeploy(app_deployment_uri, parameters = {}) self.new(UU::OS::Security::Session.current_session).redeploy(app_deployment_uri, parameters) end |
.scale(app_deployment_uri, parameters = {}) ⇒ UU::OS::Lang::Future
This command is experimental. And it may not be available for use in all uuCloud regions.
Modifies the count of nodes on which the AppDeployment is deployed. This method is a convenience shortcut for the #scale method.
822 823 824 |
# File 'lib/uu/c3/app_deployment.rb', line 822 def self.scale(app_deployment_uri, parameters = {}) self.new(UU::OS::Security::Session.current_session).scale(app_deployment_uri, parameters) end |
.share(app_deployment_uri, parameters = {}) ⇒ UU::OS::Lang::Future
Shares the specified app deployment to the given territories. This method is a convenience shortcut for the #share instance method.
(i.e. creation of the appbox activity). By default, reporting is enabled.
541 542 543 |
# File 'lib/uu/c3/app_deployment.rb', line 541 def self.share(app_deployment_uri, parameters = {}) self.new(UU::OS::Security::Session.current_session).share(app_deployment_uri, parameters) end |
.swap(app_deployment_uri) ⇒ UU::OS::Lang::Future
If you are not sure what this command mean. Take some information about ‘Blue/Green deployment strategy’ before use.
Make sure you really want to do this action! Check if your ‘BETA’ slot configuration is really configured to be used on ‘PRODUCTION’ slot.
If your production application was scaled, remember that this command switch scaled nodes to ‘BETA’ slot and production will be scaled as ‘BETA’ before this action.
This command cannot be called if there is a non-nil
slotMapping
attribute set on a corresponding ResourceGroup.
Swaps between 'PRODUCTION' and 'BETA' slots. This will have impact on AppDeployments accessible on concrete slots(gateways for slots will be changed). This command enables to use newest version of application with zero-downtime to switch. Can be used to rollback previous stable version or test on production environment.
928 929 930 |
# File 'lib/uu/c3/app_deployment.rb', line 928 def self.swap(app_deployment_uri) self.new(UU::OS::Security::Session.current_session).swap(app_deployment_uri) end |
.undeploy(app_deployment_uri, parameters = {}) ⇒ UU::OS::Lang::Future?
Undeploys the specified uuApp from the pool and releases all related allocated resources. This method is a convenience shortcut for the #undeploy instance method.
262 263 264 |
# File 'lib/uu/c3/app_deployment.rb', line 262 def self.undeploy(app_deployment_uri, parameters = {}) self.new(UU::OS::Security::Session.current_session).undeploy(app_deployment_uri, parameters) end |
.unshare(app_deployment_uri, parameters = {}) ⇒ UU::OS::Lang::Future
Terminates sharing of the specified app deployment for the given territories. This method is a convenience shortcut for the #unshare instance method.
(i.e. creation of the appbox activity). By default, reporting is enabled.
601 602 603 |
# File 'lib/uu/c3/app_deployment.rb', line 601 def self.unshare(app_deployment_uri, parameters = {}) self.new(UU::OS::Security::Session.current_session).unshare(app_deployment_uri, parameters) end |
Instance Method Details
#deploy(resource_pool_uri, parameters = {}) ⇒ UU::OS::Lang::Future, UU::OS::UESURI
Deploys the specified appbox to the given pool.
166 167 168 169 170 |
# File 'lib/uu/c3/app_deployment.rb', line 166 def deploy(resource_pool_uri, parameters = {}) result = @client.invoke(:deploy, resource_pool_uri, parameters: parameters) return UU::OS::UESURI.new(result) if result.is_a?(String) result end |
#get_app_deployment_list(resource_pool_uri, criteria = {}) ⇒ Hash<Symbol, Object>
Returns list of applications deployed in the given pool.
468 469 470 |
# File 'lib/uu/c3/app_deployment.rb', line 468 def get_app_deployment_list(resource_pool_uri, criteria = {}) @client.invoke(:getAppDeploymentList, resource_pool_uri, :parameters => criteria) end |
#get_app_share_list(app_deployment_uri, parameters = {}) ⇒ Hash<Symbol, Object>
Returns list of application shares.
640 641 642 |
# File 'lib/uu/c3/app_deployment.rb', line 640 def get_app_share_list(app_deployment_uri, parameters = {}) @client.invoke(:getAppShareList, app_deployment_uri, parameters: parameters) end |
#get_attributes(app_deployment_uri_or_tid_asid) ⇒ Hash<Symbol, Object>
Returns attributes of app deployment identified by either its UESURI or combination of TID (Territory ID) and ASID (AppServer ID) associated with that app deployment.
686 687 688 |
# File 'lib/uu/c3/app_deployment.rb', line 686 def get_attributes(app_deployment_uri_or_tid_asid) return @client.invoke(:getAttributes, app_deployment_uri_or_tid_asid) end |
#get_effective_env(resource_pool_uri) ⇒ Hash
Returns effective environment configuration for nodes deployed in the specified resource pool.
"Effective" means that the values are possibly merged from multiple sources (cloud, region, resource group, resource pool) and the values are taken according to the level of granularity of those sources.
881 882 883 |
# File 'lib/uu/c3/app_deployment.rb', line 881 def get_effective_env(resource_pool_uri) @client.invoke(:getEffectiveEnv, resource_pool_uri, parameters: {}) end |
#get_resource_pool_capacity(resource_pool_uri) ⇒ Hash<Symbol, Object>
Returns capacity overview for the given pool.
348 349 350 |
# File 'lib/uu/c3/app_deployment.rb', line 348 def get_resource_pool_capacity(resource_pool_uri) @client.invoke(:getResourcePoolCapacity, resource_pool_uri) end |
#get_supported_runtime_stack_list(resource_pool_uri, criteria = {}) ⇒ Hash<Symbol, Object>
Returns list of supported runtime stacks for the specified resource pool.
970 971 972 |
# File 'lib/uu/c3/app_deployment.rb', line 970 def get_supported_runtime_stack_list(resource_pool_uri, criteria = {}) @client.invoke(:getSupportedRuntimeStackList, resource_pool_uri, parameters: criteria) end |
#redeploy(app_deployment_uri) ⇒ UU::OS::Lang::Future
Redeploys the specified app deployment.
290 291 292 |
# File 'lib/uu/c3/app_deployment.rb', line 290 def redeploy(app_deployment_uri, parameters = {}) @client.invoke(:redeploy, app_deployment_uri, parameters: parameters) end |
#scale(app_deployment_uri, parameters = {}) ⇒ UU::OS::Lang::Future
This command is experimental. And it may not be available for use in all uuCloud regions.
Modifies the count of nodes on which the AppDeployment is deployed. You can scale out or scale in the entire AppDeployment (all NodeSets) or just the specified NodeSets.
770 771 772 |
# File 'lib/uu/c3/app_deployment.rb', line 770 def scale(app_deployment_uri, parameters = {}) @client.invoke(:scale, app_deployment_uri, parameters: parameters) end |
#share(app_deployment_uri, parameters = {}) ⇒ UU::OS::Lang::Future
Shares the specified app deployment to the given territories.
(i.e. creation of the appbox activity). By default, reporting is enabled.
512 513 514 |
# File 'lib/uu/c3/app_deployment.rb', line 512 def share(app_deployment_uri, parameters = {}) @client.invoke(:share, app_deployment_uri, parameters: parameters) end |
#swap(app_deployment_uri) ⇒ UU::OS::Lang::Future
If you are not sure what this command mean. Take some information about ‘Blue/Green deployment strategy’ before use.
Make sure you really want to do this action! Check if your ‘BETA’ slot configuration is really configured to be used on ‘PRODUCTION’ slot.
If your production application was scaled, remember that this command switch scaled nodes to ‘BETA’ slot and production will be scaled as ‘BETA’ before this action.
This command cannot be called if there is a non-nil
slotMapping
attribute set on a corresponding ResourceGroup.
Swaps between 'PRODUCTION' and 'BETA' slots. This will have impact on AppDeployments accessible on concrete slots(gateways for slots will be changed). This command enables to use newest version of application with zero-downtime to switch. Can be used to rollback previous stable version or test on production environment.
913 914 915 |
# File 'lib/uu/c3/app_deployment.rb', line 913 def swap(app_deployment_uri) @client.invoke(:swap, app_deployment_uri, parameters: {}) end |
#undeploy(app_deployment_uri, parameters = {}) ⇒ UU::OS::Lang::Future?
Undeploys the specified uuApp from the pool and releases all related allocated resources. This command can be invoked repeatedly with the same parameters, to ensure full cleanup even after unexpected failures from previous invocations.
243 244 245 |
# File 'lib/uu/c3/app_deployment.rb', line 243 def undeploy(app_deployment_uri, parameters = {}) @client.invoke(:undeploy, app_deployment_uri, parameters: parameters) end |
#unshare(app_deployment_uri, parameters = {}) ⇒ UU::OS::Lang::Future
Terminates sharing of the specified app deployment for the given territories. Routing data for the particular app deployment and territories are removed.
(i.e. creation of the appbox activity). By default, reporting is enabled.
572 573 574 |
# File 'lib/uu/c3/app_deployment.rb', line 572 def unshare(app_deployment_uri, parameters = {}) @client.invoke(:unshare, app_deployment_uri, parameters: parameters) end |