cloudbox-server 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.yardopts +3 -0
- data/README.md +17 -0
- data/bin/cb-cluster-allocate +5 -0
- data/bin/cb-cluster-create +5 -0
- data/bin/cb-cluster-delete +5 -0
- data/bin/cb-cluster-desallocate +5 -0
- data/bin/cb-cluster-info +5 -0
- data/bin/cb-cluster-ls +5 -0
- data/bin/cb-node-destroy +5 -0
- data/bin/cb-node-detach +6 -0
- data/bin/cb-node-info +5 -0
- data/bin/cb-node-install +5 -0
- data/bin/cb-node-ls +5 -0
- data/bin/cb-service-add +5 -0
- data/bin/cb-service-component-add +5 -0
- data/bin/cb-service-component-delete +5 -0
- data/bin/cb-service-component-detach +5 -0
- data/bin/cb-service-conf-apply +5 -0
- data/bin/cb-service-conf-create +5 -0
- data/bin/cb-service-conf-get +5 -0
- data/bin/cb-service-conf-ls +5 -0
- data/bin/cb-service-follow-request +5 -0
- data/bin/cb-service-info +5 -0
- data/bin/cb-service-install +5 -0
- data/bin/cb-service-ls +5 -0
- data/bin/cb-service-start +5 -0
- data/bin/cb-service-stop +5 -0
- data/lib/command.rb +61 -0
- data/lib/command/ambari_add_host.rb +19 -0
- data/lib/command/ambari_cluster_command.rb +26 -0
- data/lib/command/ambari_cluster_component_command.rb +26 -0
- data/lib/command/ambari_cluster_component_host_command.rb +26 -0
- data/lib/command/ambari_cluster_create.rb +19 -0
- data/lib/command/ambari_cluster_host_command.rb +27 -0
- data/lib/command/ambari_cluster_list.rb +20 -0
- data/lib/command/ambari_cluster_service_command.rb +26 -0
- data/lib/command/ambari_cluster_service_host_command.rb +26 -0
- data/lib/command/ambari_command.rb +21 -0
- data/lib/command/ambari_create_cluster_configuration.rb +39 -0
- data/lib/command/ambari_get_cluster_configuration.rb +29 -0
- data/lib/command/ambari_host_list.rb +19 -0
- data/lib/command/ambari_install_cluster.rb +19 -0
- data/lib/command/ambari_install_component.rb +19 -0
- data/lib/command/ambari_install_host.rb +19 -0
- data/lib/command/ambari_install_host_component.rb +19 -0
- data/lib/command/ambari_install_host_components.rb +19 -0
- data/lib/command/ambari_install_service_components.rb +19 -0
- data/lib/command/ambari_service_add.rb +27 -0
- data/lib/command/ambari_service_component_add.rb +21 -0
- data/lib/command/ambari_service_component_delete.rb +21 -0
- data/lib/command/ambari_service_component_detach.rb +21 -0
- data/lib/command/ambari_service_component_info.rb +29 -0
- data/lib/command/ambari_service_conf_apply.rb +31 -0
- data/lib/command/ambari_service_conf_ls.rb +30 -0
- data/lib/command/ambari_service_delete.rb +21 -0
- data/lib/command/ambari_service_info.rb +20 -0
- data/lib/command/ambari_service_list.rb +21 -0
- data/lib/command/ambari_start_cluster.rb +19 -0
- data/lib/command/ambari_start_component.rb +19 -0
- data/lib/command/ambari_start_host.rb +19 -0
- data/lib/command/ambari_start_host_component.rb +19 -0
- data/lib/command/ambari_start_host_components.rb +19 -0
- data/lib/command/ambari_start_service_components.rb +19 -0
- data/lib/command/ambari_stop_cluster.rb +19 -0
- data/lib/command/ambari_stop_component.rb +19 -0
- data/lib/command/ambari_stop_host.rb +19 -0
- data/lib/command/ambari_stop_host_component.rb +19 -0
- data/lib/command/ambari_stop_host_components.rb +19 -0
- data/lib/command/ambari_stop_service_components.rb +19 -0
- data/lib/command/basic_command.rb +44 -0
- data/lib/command/cluster_create.rb +50 -0
- data/lib/command/cluster_delete.rb +30 -0
- data/lib/command/cluster_info.rb +30 -0
- data/lib/command/cluster_ls.rb +30 -0
- data/lib/command/crowbar_cluster_allocate.rb +42 -0
- data/lib/command/crowbar_command.rb +30 -0
- data/lib/command/crowbar_get_barclamps_list.rb +30 -0
- data/lib/command/crowbar_node_command.rb +21 -0
- data/lib/command/crowbar_node_list.rb +40 -0
- data/lib/command/crowbar_vcluster_command.rb +20 -0
- data/lib/command/filter.rb +15 -0
- data/lib/command/node_destroy.rb +58 -0
- data/lib/command/node_detach.rb +44 -0
- data/lib/command/node_info.rb +27 -0
- data/lib/command/node_install.rb +46 -0
- data/lib/command/node_reinstall.rb +44 -0
- data/lib/command/state_filter.rb +16 -0
- data/lib/common.rb +11 -0
- data/lib/common/cb-lib-node-erase-hard-disk.sh +29 -0
- data/lib/common/cloudbox_exceptions.rb +631 -0
- data/lib/common/cloudbox_logger.rb +81 -0
- data/lib/common/cloudbox_logger_mock.rb +43 -0
- data/lib/common/color.rb +267 -0
- data/lib/common/config_properties.rb +2027 -0
- data/lib/common/services_description.rb +192 -0
- data/lib/exec.rb +35 -0
- data/lib/exec/check_parameter.rb +208 -0
- data/lib/exec/cluster_allocate.rb +163 -0
- data/lib/exec/cluster_create.rb +99 -0
- data/lib/exec/cluster_delete.rb +38 -0
- data/lib/exec/cluster_desallocate.rb +37 -0
- data/lib/exec/cluster_info.rb +177 -0
- data/lib/exec/cluster_ls.rb +150 -0
- data/lib/exec/command_option.rb +222 -0
- data/lib/exec/executable_command.rb +194 -0
- data/lib/exec/node_destroy.rb +101 -0
- data/lib/exec/node_detach.rb +98 -0
- data/lib/exec/node_info.rb +280 -0
- data/lib/exec/node_install.rb +234 -0
- data/lib/exec/node_ls.rb +160 -0
- data/lib/exec/service_add.rb +224 -0
- data/lib/exec/service_component_add.rb +39 -0
- data/lib/exec/service_component_delete.rb +37 -0
- data/lib/exec/service_component_detach.rb +37 -0
- data/lib/exec/service_conf_apply.rb +57 -0
- data/lib/exec/service_conf_create.rb +80 -0
- data/lib/exec/service_conf_get.rb +165 -0
- data/lib/exec/service_conf_ls.rb +103 -0
- data/lib/exec/service_follow_request.rb +49 -0
- data/lib/exec/service_info.rb +346 -0
- data/lib/exec/service_install.rb +87 -0
- data/lib/exec/service_ls.rb +124 -0
- data/lib/exec/service_start.rb +110 -0
- data/lib/exec/service_stop.rb +112 -0
- data/lib/receiver.rb +14 -0
- data/lib/receiver/ambari_receiver.rb +812 -0
- data/lib/receiver/ambari_rest_api_connector.rb +599 -0
- data/lib/receiver/basic_receiver.rb +28 -0
- data/lib/receiver/connector.rb +28 -0
- data/lib/receiver/crowbar_receiver.rb +588 -0
- data/lib/receiver/crowbar_rest_api_connector.rb +518 -0
- data/lib/receiver/crowbar_shell_api.rb +643 -0
- data/lib/receiver/rest_api_connector.rb +275 -0
- data/resources/ambari-configurations/HBASE/default_hbase-site +33 -0
- data/resources/ambari-configurations/HDFS/default_hdfs-site +49 -0
- data/resources/ambari-configurations/HIVE/default_hive-site +33 -0
- data/resources/ambari-configurations/MAPREDUCE/default_mapred-site +72 -0
- data/resources/ambari-configurations/OOZIE/default_oozie-site +28 -0
- data/resources/ambari-configurations/WEBHCAT/default_webhcat-site +18 -0
- data/resources/ambari-configurations/ZOOKEEPER/default_zookeeper-site +8 -0
- data/resources/ambari-configurations/default_core-site +22 -0
- data/resources/ambari-configurations/default_global +141 -0
- data/resources/cloudbox-server.conf +10 -0
- data/spec/common/services_description.rb +130 -0
- data/spec/exec/check_parameter.rb +152 -0
- data/spec/exec/command_option_spec.rb +97 -0
- metadata +328 -0
data/.yardopts
ADDED
data/README.md
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Cloudbox-provider
|
|
2
|
+
|
|
3
|
+
Tool scripts available in /src/main/bin directory.
|
|
4
|
+
|
|
5
|
+
Prefixes:
|
|
6
|
+
* cb-node: OS/nodes provider
|
|
7
|
+
* cb-vcluster: virtual cluster provider
|
|
8
|
+
* cb-service: service provider
|
|
9
|
+
|
|
10
|
+
# NEEDED GEMS (gem sources -a http://rubygems.org))
|
|
11
|
+
|
|
12
|
+
* json
|
|
13
|
+
* logger
|
|
14
|
+
* ipaddress
|
|
15
|
+
* net-http-digest_auth
|
|
16
|
+
* scp
|
|
17
|
+
|
data/bin/cb-cluster-info
ADDED
data/bin/cb-cluster-ls
ADDED
data/bin/cb-node-destroy
ADDED
data/bin/cb-node-detach
ADDED
data/bin/cb-node-info
ADDED
data/bin/cb-node-install
ADDED
data/bin/cb-node-ls
ADDED
data/bin/cb-service-add
ADDED
data/bin/cb-service-info
ADDED
data/bin/cb-service-ls
ADDED
data/bin/cb-service-stop
ADDED
data/lib/command.rb
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# This file is part of cloudbox-service project
|
|
2
|
+
# @author tmarmin (INGENSI)
|
|
3
|
+
|
|
4
|
+
$: << File.dirname(__FILE__)
|
|
5
|
+
|
|
6
|
+
require 'command'
|
|
7
|
+
require 'command/basic_command'
|
|
8
|
+
require 'command/crowbar_command'
|
|
9
|
+
require 'command/ambari_command'
|
|
10
|
+
|
|
11
|
+
require 'command/crowbar_node_command'
|
|
12
|
+
require 'command/node_detach'
|
|
13
|
+
require 'command/node_destroy'
|
|
14
|
+
require 'command/node_info'
|
|
15
|
+
require 'command/node_install'
|
|
16
|
+
require 'command/node_reinstall'
|
|
17
|
+
require 'command/crowbar_node_list'
|
|
18
|
+
require 'command/crowbar_get_barclamps_list'
|
|
19
|
+
|
|
20
|
+
require 'command/ambari_add_host'
|
|
21
|
+
require 'command/ambari_cluster_command'
|
|
22
|
+
require 'command/ambari_cluster_component_command'
|
|
23
|
+
require 'command/ambari_cluster_component_host_command'
|
|
24
|
+
require 'command/ambari_cluster_create'
|
|
25
|
+
require 'command/ambari_cluster_host_command'
|
|
26
|
+
require 'command/ambari_cluster_list'
|
|
27
|
+
require 'command/ambari_cluster_service_command'
|
|
28
|
+
require 'command/ambari_cluster_service_host_command'
|
|
29
|
+
require 'command/ambari_create_cluster_configuration'
|
|
30
|
+
require 'command/ambari_get_cluster_configuration'
|
|
31
|
+
require 'command/ambari_install_cluster'
|
|
32
|
+
require 'command/ambari_install_component'
|
|
33
|
+
require 'command/ambari_install_host'
|
|
34
|
+
require 'command/ambari_install_host_component'
|
|
35
|
+
require 'command/ambari_install_service_components'
|
|
36
|
+
require 'command/ambari_service_add'
|
|
37
|
+
require 'command/ambari_service_component_add'
|
|
38
|
+
require 'command/ambari_service_component_delete'
|
|
39
|
+
require 'command/ambari_service_component_detach'
|
|
40
|
+
require 'command/ambari_service_component_info'
|
|
41
|
+
require 'command/ambari_service_conf_apply'
|
|
42
|
+
require 'command/ambari_service_conf_ls'
|
|
43
|
+
require 'command/ambari_service_info'
|
|
44
|
+
require 'command/ambari_service_list'
|
|
45
|
+
require 'command/ambari_host_list'
|
|
46
|
+
require 'command/ambari_start_cluster'
|
|
47
|
+
require 'command/ambari_start_component'
|
|
48
|
+
require 'command/ambari_start_host'
|
|
49
|
+
require 'command/ambari_start_host_component'
|
|
50
|
+
require 'command/ambari_start_host_components'
|
|
51
|
+
require 'command/ambari_start_service_components'
|
|
52
|
+
require 'command/ambari_stop_cluster'
|
|
53
|
+
require 'command/ambari_stop_component'
|
|
54
|
+
require 'command/ambari_stop_host'
|
|
55
|
+
require 'command/ambari_stop_host_component'
|
|
56
|
+
require 'command/ambari_stop_service_components'
|
|
57
|
+
|
|
58
|
+
require 'command/crowbar_vcluster_command'
|
|
59
|
+
require 'command/cluster_delete'
|
|
60
|
+
require 'command/cluster_info'
|
|
61
|
+
require 'command/cluster_ls'
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# This file is part of cloudbox-server project
|
|
2
|
+
# @author tnoguer (INGENSI)
|
|
3
|
+
|
|
4
|
+
require 'command/ambari_cluster_host_command'
|
|
5
|
+
|
|
6
|
+
module Command
|
|
7
|
+
# Command used to add host in a cluster.
|
|
8
|
+
# @author tnoguer
|
|
9
|
+
class AmbariAddHost < AmbariClusterHostCommand
|
|
10
|
+
|
|
11
|
+
public
|
|
12
|
+
# The execution of the command.
|
|
13
|
+
# @author tnoguer
|
|
14
|
+
def exec()
|
|
15
|
+
@receiver.add_host(@cluster_name, @host_name)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# This file is part of cloudbox-server project
|
|
2
|
+
# @author tnoguer (INGENSI)
|
|
3
|
+
|
|
4
|
+
require 'command/ambari_command'
|
|
5
|
+
|
|
6
|
+
module Command
|
|
7
|
+
# Class for all ambari command.
|
|
8
|
+
# @abstract Subclass and override {#exec} to implement
|
|
9
|
+
# @author tnoguer
|
|
10
|
+
class AmbariClusterCommand < AmbariCommand
|
|
11
|
+
|
|
12
|
+
public
|
|
13
|
+
# The cluster name
|
|
14
|
+
attr_accessor :cluster_name
|
|
15
|
+
|
|
16
|
+
private
|
|
17
|
+
# Default constructor.
|
|
18
|
+
# @author tnoguer
|
|
19
|
+
def initialize(cluster_name)
|
|
20
|
+
super()
|
|
21
|
+
@logger.info("Command::AmbariClusterCommand initialize the parameters...")
|
|
22
|
+
@cluster_name = cluster_name
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# This file is part of cloudbox-server project
|
|
2
|
+
# @author tnoguer (INGENSI)
|
|
3
|
+
|
|
4
|
+
require 'command/ambari_cluster_command'
|
|
5
|
+
|
|
6
|
+
module Command
|
|
7
|
+
# Class for all ambari command.
|
|
8
|
+
# @abstract Subclass and override {#exec} to implement
|
|
9
|
+
# @author tnoguer
|
|
10
|
+
class AmbariClusterComponentCommand < AmbariClusterCommand
|
|
11
|
+
|
|
12
|
+
public
|
|
13
|
+
# The component name
|
|
14
|
+
attr_accessor :component_name
|
|
15
|
+
|
|
16
|
+
private
|
|
17
|
+
# Default constructor.
|
|
18
|
+
# @author tnoguer
|
|
19
|
+
def initialize(cluster_name, component_name)
|
|
20
|
+
super(cluster_name)
|
|
21
|
+
@logger.info("Command::AmbariClusterComponentCommand initialize the parameters...")
|
|
22
|
+
@component_name = component_name
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# This file is part of cloudbox-server project
|
|
2
|
+
# @author tnoguer (INGENSI)
|
|
3
|
+
|
|
4
|
+
require 'command/ambari_cluster_component_command'
|
|
5
|
+
|
|
6
|
+
module Command
|
|
7
|
+
# Class for all ambari command.
|
|
8
|
+
# @abstract Subclass and override {#exec} to implement
|
|
9
|
+
# @author tnoguer
|
|
10
|
+
class AmbariClusterComponentHostCommand < AmbariClusterComponentCommand
|
|
11
|
+
|
|
12
|
+
public
|
|
13
|
+
# The host name
|
|
14
|
+
attr_accessor :host_name
|
|
15
|
+
|
|
16
|
+
private
|
|
17
|
+
# Default constructor.
|
|
18
|
+
# @author tnoguer
|
|
19
|
+
def initialize(cluster_name, component_name, host_name)
|
|
20
|
+
super(cluster_name, component_name)
|
|
21
|
+
@logger.info("Command::AmbariClusterComponentHostCommand initialize the parameters...")
|
|
22
|
+
@host_name = host_name
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# This file is part of cloudbox-server project
|
|
2
|
+
# @author tnoguer (INGENSI)
|
|
3
|
+
|
|
4
|
+
require 'command/ambari_cluster_command'
|
|
5
|
+
|
|
6
|
+
module Command
|
|
7
|
+
# Command used to get the list of the ambari clusters.
|
|
8
|
+
# @author tnoguer
|
|
9
|
+
class AmbariClusterCreate < AmbariClusterCommand
|
|
10
|
+
|
|
11
|
+
public
|
|
12
|
+
# The execution of the command.
|
|
13
|
+
# @author tnoguer
|
|
14
|
+
def exec()
|
|
15
|
+
@receiver.define_cluster(@cluster_name, "HDP-1.3.0")
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# This file is part of cloudbox-server project
|
|
2
|
+
# @author tnoguer (INGENSI)
|
|
3
|
+
|
|
4
|
+
require 'command/ambari_cluster_command'
|
|
5
|
+
|
|
6
|
+
module Command
|
|
7
|
+
# Class for all ambari command.
|
|
8
|
+
# @abstract Subclass and override {#exec} to implement
|
|
9
|
+
# @author tnoguer
|
|
10
|
+
class AmbariClusterHostCommand < AmbariClusterCommand
|
|
11
|
+
|
|
12
|
+
public
|
|
13
|
+
# The component name
|
|
14
|
+
attr_accessor :host_name
|
|
15
|
+
|
|
16
|
+
private
|
|
17
|
+
# Default constructor.
|
|
18
|
+
# @author tnoguer
|
|
19
|
+
def initialize(cluster_name, host_name)
|
|
20
|
+
super(cluster_name)
|
|
21
|
+
@logger.info("Command::AmbariClusterHostCommand initialize the parameters...")
|
|
22
|
+
@host_name = host_name
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# This file is part of cloudbox-server project
|
|
2
|
+
# @author tnoguer (INGENSI)
|
|
3
|
+
|
|
4
|
+
require 'command/ambari_command'
|
|
5
|
+
|
|
6
|
+
module Command
|
|
7
|
+
# Command used to get the list of the ambari clusters.
|
|
8
|
+
# @author tnoguer
|
|
9
|
+
class AmbariClusterList < AmbariCommand
|
|
10
|
+
|
|
11
|
+
public
|
|
12
|
+
# The execution of the command.
|
|
13
|
+
# @return The list of clusters.
|
|
14
|
+
# @author tnoguer
|
|
15
|
+
def exec()
|
|
16
|
+
return receiver.list_clusters()
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# This file is part of cloudbox-server project
|
|
2
|
+
# @author tnoguer (INGENSI)
|
|
3
|
+
|
|
4
|
+
require 'command/ambari_cluster_command'
|
|
5
|
+
|
|
6
|
+
module Command
|
|
7
|
+
# Class for all ambari command.
|
|
8
|
+
# @abstract Subclass and override {#exec} to implement
|
|
9
|
+
# @author tnoguer
|
|
10
|
+
class AmbariClusterServiceCommand < AmbariClusterCommand
|
|
11
|
+
|
|
12
|
+
public
|
|
13
|
+
# The cluster name
|
|
14
|
+
attr_accessor :service_name
|
|
15
|
+
|
|
16
|
+
private
|
|
17
|
+
# Default constructor.
|
|
18
|
+
# @author tnoguer
|
|
19
|
+
def initialize(cluster_name, service_name)
|
|
20
|
+
super(cluster_name)
|
|
21
|
+
@logger.info("Command::AmbariClusterServiceCommand initialize the parameters...")
|
|
22
|
+
@service_name = service_name
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
end
|
|
26
|
+
end
|