ui can support ceph_firefly

Change-Id: I70c6b3c652f454b710c18218247c92664e954fdb
This commit is contained in:
chi zhang 2014-12-24 16:46:09 -08:00
parent 2d9bd1e6a9
commit 0d41c806be
4 changed files with 190 additions and 31 deletions

View File

@ -52,7 +52,7 @@
"local_repo": ""
},
"server_credentials": {
"username": "root",
"username": "",
"password": ""
},
"service_credentials": {
@ -183,8 +183,8 @@
"local_repo": ""
},
"server_credentials": {
"username": "root",
"password": "huawei"
"username": "",
"password": ""
},
"service_credentials": {
"rabbitmq": {
@ -327,8 +327,148 @@
"local_repo": ""
},
"server_credentials": {
"username": "root",
"password": "huawei"
"username": "",
"password": ""
}
},
"ceph_firefly": {
"cluster": {
"id": 1,
"name": "demo",
"adapter_id": 1,
"os_id": 1
},
"partition": {
"/var": {
"percentage": 30,
"max_size": "10G"
},
"/usr": {
"percentage": 30,
"max_size": "20G"
}
},
"interface": {
"eth0": {
"subnet_id": 1,
"is_mgmt": true,
"is_promiscuous": false
},
"eth1": {
"subnet_id": 2,
"is_mgmt": false,
"is_promiscuous": true
},
"eth2": {
"subnet_id": 1,
"is_mgmt": false,
"is_promiscuous": false
},
"eth3": {
"subnet_id": 2,
"is_mgmt": false,
"is_promiscuous": false
}
},
"general": {
"timezone": "America/Los_Angeles",
"language": "en",
"http_proxy": "",
"https_proxy": "",
"no_proxy": [""],
"ntp_server": "",
"dns_servers": [""],
"search_path": ["ods.com"],
"domain": "ods.com",
"default_gateway": "10.145.88.1",
"local_repo": ""
},
"server_credentials": {
"username": "",
"password": ""
},
"service_credentials": {
"rabbitmq": {
"username": "guest",
"password": "guest"
},
"compute": {
"username": "nova",
"password": "nova"
},
"dashboard": {
"username": "dashboard",
"password": "dashboard"
},
"identity": {
"username": "keystone",
"password": "keystone"
},
"image": {
"username": "glance",
"password": "glance"
},
"metering": {
"username": "ceilometer",
"password": "ceilometer"
},
"mysql": {
"username": "root",
"password": "root"
},
"volume": {
"username": "cinder",
"password": "cinder"
}
},
"console_credentials": {
"admin": {
"username": "admin",
"password": "admin"
},
"compute": {
"username": "nova",
"password": "nova"
},
"dashboard": {
"username": "dashboard",
"password": "dashboard"
},
"image": {
"username": "glance",
"password": "glance"
},
"metering": {
"username": "ceilometer",
"password": "ceilometer"
},
"network": {
"username": "quantum",
"password": "quantum"
},
"object-store": {
"username": "swift",
"password": "swift"
},
"volume": {
"username": "cinder",
"password": "cinder"
}
},
"network_mapping": {
"public_network": "",
"cluster_network": ""
},
"ceph_config": {
"global_config": {
"osd_pool_pg_num": "1024",
"osd_pool_pgp_num": "1024",
"osd_pool_size": "3"
},
"osd_config": {
"journal_size": "10000",
"op_threads": 10
}
}
}
}

View File

@ -42,8 +42,18 @@ compassAppDev.run(function($httpBackend, settings, $http) {
}],
"id": 2
}, {
"flavors": [],
"name": "ceph(chef)",
"flavors": [{
"roles": [{
"display_name": "Ceph Cluster (Firefly)",
"description": "Ceph Cluster (Firefly)",
"name": "ceph_firefly"
}],
"display_name": "Ceph Cluster (Firefly)",
"id": 1,
"template": "cephfirefly.tmpl",
"name": "ceph_firefly"
}],
"name": "ceph_firefly",
"roles": [],
"distributed_system_id": 2,
"supported_oses": [{
@ -56,7 +66,7 @@ compassAppDev.run(function($httpBackend, settings, $http) {
"name": "Ubuntu-12.04-x86_64"
}],
"distributed_system_name": "ceph",
"display_name": "ceph(chef)",
"display_name": "ceph_firefly",
"id": 4
}, {
"flavors": [{
@ -709,8 +719,8 @@ compassAppDev.run(function($httpBackend, settings, $http) {
var config = {
"os_config": {
"server_credentials": {
"username": "",
"password": ""
"username": "root",
"password": "huawei"
},
"partition": {
"/var": {

View File

@ -34,7 +34,7 @@
</div>
</accordion-group-->
<accordion-group is-open="serviceAccordion.open">
<accordion-group is-open="serviceAccordion.open" ng-if="currentAdapterName != 'ceph_firefly'">
<accordion-heading>
<i class="ace-icon fa fa-angle-right" ng-class="{'fa-angle-down': serviceAccordion.open, 'fa-angle-right': !serviceAccordion.open}"></i> OpenStack Database &amp; Queue Credentials
@ -94,7 +94,7 @@
</accordion-group>
<accordion-group is-open="mgmtAccordion.open">
<accordion-group is-open="mgmtAccordion.open" ng-if="currentAdapterName != 'ceph_firefly'">
<accordion-heading>
<i class="ace-icon fa fa-angle-right" ng-class="{'fa-angle-down': mgmtAccordion.open, 'fa-angle-right': !mgmtAccordion.open}"></i> OpenStack Keystone User Credentials
</accordion-heading>
@ -151,7 +151,7 @@
</div>
</accordion-group>
<accordion-group is-open="cephAccordion.open" ng-if="currentAdapterName == 'ceph_openstack_icehouse'">
<accordion-group is-open="cephAccordion.open" ng-if="currentAdapterName == 'ceph_openstack_icehouse' || currentAdapterName == 'ceph_firefly'">
<accordion-heading>
<i class="ace-icon fa fa-angle-right" ng-class="{'fa-angle-down': cephAccordion.open, 'fa-angle-right': !cephAccordion.open}"></i> Ceph Global Configurations
</accordion-heading>

View File

@ -97,6 +97,11 @@ define(['uiRouter', 'angularTable', 'angularDragDrop', 'angularTouch', 'ngSpinne
$scope.steps = wizardStepsData["os_and_ts"];
wizardFactory.setSteps($scope.steps);
break;
case "ceph_firefly":
preConfigData = data["ceph_firefly"];
$scope.steps = wizardStepsData["os_and_ts"];
wizardFactory.setSteps($scope.steps);
break;
default:
break;
}
@ -672,16 +677,15 @@ define(['uiRouter', 'angularTable', 'angularDragDrop', 'angularTouch', 'ngSpinne
$scope.autoFill = false;
$scope.autoFillButtonDisplay = "Enable Autofill";
//$scope.servers = wizardFactory.getServers();
$scope.autoFillMange = function(){
$scope.autoFillMange = function() {
$scope.autoFill = !$scope.autoFill;
if($scope.autoFill)
{
if ($scope.autoFill) {
$scope.autoFillButtonDisplay = "Disable Autofill";
}
else{
} else {
$scope.autoFillButtonDisplay = "Enable Autofill";
}
};
dataService.getServerColumns().success(function(data) {
$scope.server_columns = data.showless;
});
@ -1266,6 +1270,10 @@ define(['uiRouter', 'angularTable', 'angularDragDrop', 'angularTouch', 'ngSpinne
if ($scope.currentAdapterName == "ceph_openstack_icehouse") {
targetSysConfigData["package_config"]["ceph_config"] = $scope.cephConfig;
}
if ($scope.currentAdapterName == "ceph_firefly") {
targetSysConfigData["package_config"]={};
targetSysConfigData["package_config"]["ceph_config"] = $scope.cephConfig;
}
dataService.updateClusterConfig(cluster.id, targetSysConfigData).success(function(data) {
var commitState = {
"name": "package_config",
@ -1573,18 +1581,19 @@ define(['uiRouter', 'angularTable', 'angularDragDrop', 'angularTouch', 'ngSpinne
$scope.dropSuccessHandler = function($event, key, dict) {
dict[key].mapping_interface = $scope.pendingInterface;
};
angular.forEach($scope.interfaces, function(value, key) {
// The interface with promisc mode is required to be set as External Network
if (value.is_promiscuous) {
$scope.networking["external"].mapping_interface = key;
$scope.interfaces[key].dropChannel = "external";
}
// The interface marked as management is required to be set as Management Network
if (value.is_mgmt) {
$scope.networking["management"].mapping_interface = key;
}
});
if ($scope.currentAdapterName != "ceph_firefly") {
angular.forEach($scope.interfaces, function(value, key) {
// The interface with promisc mode is required to be set as External Network
if (value.is_promiscuous) {
$scope.networking["external"].mapping_interface = key;
$scope.interfaces[key].dropChannel = "external";
}
// The interface marked as management is required to be set as Management Network
if (value.is_mgmt) {
$scope.networking["management"].mapping_interface = key;
}
});
}
$scope.$watch(function() {
return wizardFactory.getCommitState()
@ -1922,4 +1931,4 @@ define(['uiRouter', 'angularTable', 'angularDragDrop', 'angularTouch', 'ngSpinne
}, true);
};
});
});