Class: Jelastic::DockerNode

Inherits:
Node
  • Object
show all
Defined in:
lib/jelastic/docker_node.rb

Defined Under Namespace

Classes: DockerRegistry

Instance Attribute Summary collapse

Attributes inherited from Node

#count, #display_name, #fixed_cloudlets, #flexible_cloudlets, #type

Instance Method Summary collapse

Methods inherited from Node

#docker?, #public_ip?, #with_public_ip

Constructor Details

#initializeDockerNode

Returns a new instance of DockerNode.



8
9
10
11
12
# File 'lib/jelastic/docker_node.rb', line 8

def initialize
  @type = 'docker'

  super
end

Instance Attribute Details

#cmdObject

Returns the value of attribute cmd.



3
4
5
# File 'lib/jelastic/docker_node.rb', line 3

def cmd
  @cmd
end

#envsObject

Returns the value of attribute envs.



3
4
5
# File 'lib/jelastic/docker_node.rb', line 3

def envs
  @envs
end

#groupObject (readonly)

Returns the value of attribute group.



4
5
6
# File 'lib/jelastic/docker_node.rb', line 4

def group
  @group
end

#imageObject

Returns the value of attribute image.



3
4
5
# File 'lib/jelastic/docker_node.rb', line 3

def image
  @image
end

Returns the value of attribute links.



3
4
5
# File 'lib/jelastic/docker_node.rb', line 3

def links
  @links
end

#registryObject (readonly)

Returns the value of attribute registry.



4
5
6
# File 'lib/jelastic/docker_node.rb', line 4

def registry
  @registry
end

Instance Method Details

#as_application_serverObject



14
15
16
# File 'lib/jelastic/docker_node.rb', line 14

def as_application_server
  @group = 'cp'
end

#as_cacheObject



30
31
32
# File 'lib/jelastic/docker_node.rb', line 30

def as_cache
  @group = 'cache'
end

#as_extra_layerObject



34
35
36
# File 'lib/jelastic/docker_node.rb', line 34

def as_extra_layer
  @group = nil
end

#as_load_balancerObject



18
19
20
# File 'lib/jelastic/docker_node.rb', line 18

def as_load_balancer
  @group = 'bl'
end

#as_no_sql_databaseObject



22
23
24
# File 'lib/jelastic/docker_node.rb', line 22

def as_no_sql_database
  @group = 'nosqldb'
end

#as_sql_databaseObject



26
27
28
# File 'lib/jelastic/docker_node.rb', line 26

def as_sql_database
  @group = 'sqldb'
end

#set_registry(user, password, url = nil) ⇒ Object



38
39
40
# File 'lib/jelastic/docker_node.rb', line 38

def set_registry(user, password, url = nil)
  @registry = DockerRegistry.new(user, password, url)
end