Add OpenStack+Ceph installation in wizard
Change-Id: Ic1c0dc5b7429083476f55f1d0cf595b6bd2e310d
This commit is contained in:
parent
f6bdeb4487
commit
a5eabe0343
@ -13,9 +13,6 @@ body {
|
||||
font-family: "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif !important;
|
||||
color: rgba(83, 83, 83, 1) !important;
|
||||
}
|
||||
.main-container {
|
||||
position: relative;
|
||||
}
|
||||
body, .main-content {
|
||||
background: #fff;
|
||||
/* right: 0px;
|
||||
@ -98,14 +95,16 @@ body, .main-content {
|
||||
display: inline-block;
|
||||
font-size: 13px;
|
||||
font-weight: normal;
|
||||
margin-bottom: 3px;
|
||||
margin-bottom: 3px !important;
|
||||
margin-right: 3px;
|
||||
padding: 4px 22px 5px 9px;
|
||||
position: relative;
|
||||
text-transform: capitalize;
|
||||
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.15);
|
||||
transition: all 0.2s ease 0s;
|
||||
vertical-align: baseline;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
}
|
||||
.no-border-search {
|
||||
padding-left: 10px;
|
||||
@ -235,6 +234,9 @@ button[disabled] {
|
||||
pointer-events: auto !important;
|
||||
cursor: not-allowed !important;
|
||||
}
|
||||
.wizard-steps li .title {
|
||||
white-space: nowrap;
|
||||
}
|
||||
.wizard-steps li.active .step {
|
||||
transform: scale(1.2, 1.2);
|
||||
-webkit-transform: scale(1.2, 1.2);
|
||||
@ -445,6 +447,9 @@ a:active {
|
||||
.label:first-letter {
|
||||
text-transform: uppercase !important;
|
||||
}
|
||||
.label-red {
|
||||
background-color: #e2755f !important;
|
||||
}
|
||||
.capitalize {
|
||||
text-transform: capitalize;
|
||||
}
|
||||
@ -626,8 +631,9 @@ div.center-align {
|
||||
|
||||
.network-draggable {
|
||||
position: relative;
|
||||
width: 132px !important;
|
||||
width: 155px !important;
|
||||
border-radius: 7px;
|
||||
cursor: move;
|
||||
}
|
||||
.external-event {
|
||||
float: left !important;
|
||||
@ -985,24 +991,27 @@ circle[depth='4'] {
|
||||
margin-left: -4px;
|
||||
}
|
||||
.table-col {
|
||||
width: 87%;
|
||||
width: 75%;
|
||||
}
|
||||
.role-col {
|
||||
width: 10%;
|
||||
width: 24%;
|
||||
}
|
||||
.role-panel {
|
||||
z-index: 10;
|
||||
margin-left: 10px;
|
||||
margin-right: -25px;
|
||||
}
|
||||
.role-panel.stick {
|
||||
position: fixed;
|
||||
z-index: 10000;
|
||||
top: 0px;
|
||||
width: 24%;
|
||||
}
|
||||
.role-assign-drag {
|
||||
border: 1px solid rgba(190, 210, 219, 0.5) !important;
|
||||
border-radius: 4px;
|
||||
min-height: 120px;
|
||||
width: 122px;
|
||||
width: 90%;
|
||||
}
|
||||
.role-assign-drop {
|
||||
min-height: 30px;
|
||||
@ -1012,8 +1021,8 @@ circle[depth='4'] {
|
||||
margin-left: 7px;
|
||||
margin-top: 7px;
|
||||
display: block !important;
|
||||
width: 105px !important;
|
||||
border-radius: 4px !important;
|
||||
cursor: move;
|
||||
}
|
||||
.drag-enter-role {
|
||||
background: none repeat scroll 0 0 #F0F9FF;
|
||||
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
@ -1,131 +1,334 @@
|
||||
{
|
||||
"cluster": {
|
||||
"id": 1,
|
||||
"name": "demo",
|
||||
"adapter_id": 1,
|
||||
"os_id": 1
|
||||
},
|
||||
"partition": {
|
||||
"/var": {
|
||||
"percentage": 30,
|
||||
"max_size": "10G"
|
||||
"openstack": {
|
||||
"cluster": {
|
||||
"id": 1,
|
||||
"name": "demo",
|
||||
"adapter_id": 1,
|
||||
"os_id": 1
|
||||
},
|
||||
"/home": {
|
||||
"percentage": 30,
|
||||
"max_size": "20G"
|
||||
}
|
||||
},
|
||||
"interface": {
|
||||
"eth0": {
|
||||
"subnet_id": 1,
|
||||
"is_mgmt": true,
|
||||
"is_promiscuous": false
|
||||
"partition": {
|
||||
"/var": {
|
||||
"percentage": 30,
|
||||
"max_size": "10G"
|
||||
},
|
||||
"/usr": {
|
||||
"percentage": 30,
|
||||
"max_size": "20G"
|
||||
}
|
||||
},
|
||||
"eth1": {
|
||||
"subnet_id": 2,
|
||||
"is_mgmt": false,
|
||||
"is_promiscuous": true
|
||||
"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
|
||||
}
|
||||
},
|
||||
"eth2": {
|
||||
"subnet_id": 1,
|
||||
"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": ""
|
||||
},
|
||||
"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": "root",
|
||||
"password": "huawei"
|
||||
},
|
||||
"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": {
|
||||
"server_credentials": {
|
||||
"username": "root",
|
||||
"password": "root"
|
||||
"password": "huawei"
|
||||
},
|
||||
"volume": {
|
||||
"username": "cinder",
|
||||
"password": "cinder"
|
||||
"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": {
|
||||
"management": "",
|
||||
"tenant": "",
|
||||
"storage": "",
|
||||
"external": ""
|
||||
}
|
||||
},
|
||||
"console_credentials": {
|
||||
"admin": {
|
||||
"username": "admin",
|
||||
"password": "admin"
|
||||
"openstack_ceph": {
|
||||
"cluster": {
|
||||
"id": 1,
|
||||
"name": "demo",
|
||||
"adapter_id": 1,
|
||||
"os_id": 1
|
||||
},
|
||||
"compute": {
|
||||
"username": "nova",
|
||||
"password": "nova"
|
||||
"partition": {
|
||||
"/var": {
|
||||
"percentage": 30,
|
||||
"max_size": "10G"
|
||||
},
|
||||
"/usr": {
|
||||
"percentage": 30,
|
||||
"max_size": "20G"
|
||||
}
|
||||
},
|
||||
"dashboard": {
|
||||
"username": "dashboard",
|
||||
"password": "dashboard"
|
||||
"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
|
||||
}
|
||||
},
|
||||
"image": {
|
||||
"username": "glance",
|
||||
"password": "glance"
|
||||
"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": ""
|
||||
},
|
||||
"metering": {
|
||||
"username": "ceilometer",
|
||||
"password": "ceilometer"
|
||||
"server_credentials": {
|
||||
"username": "root",
|
||||
"password": "huawei"
|
||||
},
|
||||
"network": {
|
||||
"username": "quantum",
|
||||
"password": "quantum"
|
||||
"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"
|
||||
}
|
||||
},
|
||||
"object-store": {
|
||||
"username": "swift",
|
||||
"password": "swift"
|
||||
"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"
|
||||
}
|
||||
},
|
||||
"volume": {
|
||||
"username": "cinder",
|
||||
"password": "cinder"
|
||||
"network_mapping": {
|
||||
"management": "",
|
||||
"tenant": "",
|
||||
"storage": "",
|
||||
"external": "",
|
||||
"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
|
||||
}
|
||||
}
|
||||
},
|
||||
"network_mapping": {
|
||||
"management": "",
|
||||
"tenant": "",
|
||||
"storage": "",
|
||||
"public": ""
|
||||
"os_only": {
|
||||
"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": "root",
|
||||
"password": "huawei"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -5,7 +5,7 @@
|
||||
"title": "Server Selection",
|
||||
"state": "active",
|
||||
"template": "src/app/wizard/server_selection.tpl.html",
|
||||
"description": "Select the servers you want to use for OpenStack"
|
||||
"description": "Select the servers you want to use for your target system(s)"
|
||||
}, {
|
||||
"id": 2,
|
||||
"name": "os_global",
|
||||
@ -29,10 +29,10 @@
|
||||
"description": ""
|
||||
}, {
|
||||
"id": 5,
|
||||
"name": "security",
|
||||
"title": "Security",
|
||||
"name": "package_config",
|
||||
"title": "Target System Config",
|
||||
"state": "",
|
||||
"template": "src/app/wizard/security.tpl.html",
|
||||
"template": "src/app/wizard/package_config.tpl.html",
|
||||
"description": ""
|
||||
}, {
|
||||
"id": 6,
|
||||
@ -58,39 +58,39 @@
|
||||
}],
|
||||
"os": [{
|
||||
"id": 1,
|
||||
"name": "sv_selection",
|
||||
"title": "Server Selection",
|
||||
"state": "active",
|
||||
"template": "templates/server_selection.html"
|
||||
"template": "src/app/wizard/server_selection.tpl.html",
|
||||
"description": "Select the servers you want to use for your targer system(s)"
|
||||
}, {
|
||||
"id": 2,
|
||||
"title": "Timezone & Language",
|
||||
"name": "os_global",
|
||||
"title": "OS Global Config",
|
||||
"state": "",
|
||||
"template": "templates/timezone_language.html"
|
||||
"template": "src/app/wizard/global.tpl.html",
|
||||
"description": ""
|
||||
}, {
|
||||
"id": 3,
|
||||
"title": "Partition",
|
||||
"state": "",
|
||||
"template": "templates/partition.html"
|
||||
}, {
|
||||
"id": 4,
|
||||
"name": "network",
|
||||
"title": "Network",
|
||||
"state": "",
|
||||
"template": "templates/network.html"
|
||||
"template": "src/app/wizard/network.tpl.html",
|
||||
"description": ""
|
||||
}, {
|
||||
"id": 4,
|
||||
"name": "partition",
|
||||
"title": "Partition",
|
||||
"state": "",
|
||||
"template": "src/app/wizard/partition.tpl.html",
|
||||
"description": ""
|
||||
}, {
|
||||
"id": 5,
|
||||
"title": "Host Configuration",
|
||||
"state": "",
|
||||
"template": "templates/host_config.html"
|
||||
}, {
|
||||
"id": 6,
|
||||
"title": "Security",
|
||||
"state": "",
|
||||
"template": "templates/security.html"
|
||||
}, {
|
||||
"id": 7,
|
||||
"name": "review",
|
||||
"title": "Review",
|
||||
"state": "",
|
||||
"template": "templates/review.html"
|
||||
"template": "src/app/wizard/review.tpl.html",
|
||||
"description": "Click a section title to navigate back to that page."
|
||||
}],
|
||||
"ts": [{
|
||||
"id": 1,
|
||||
|
@ -20,78 +20,91 @@ compassAppDev.run(function($httpBackend, settings, $http) {
|
||||
$httpBackend.whenGET(settings.apiUrlBase + '/adapters').respond(function(method, url, data) {
|
||||
console.log(method, url);
|
||||
var adapters = [{
|
||||
"id": 1,
|
||||
"display_name": "openstack",
|
||||
"display": "OpenStack",
|
||||
"os_installer": "cobbler",
|
||||
"package_installer": "chef",
|
||||
"supported_oses": [{
|
||||
"name": "CentOs",
|
||||
"id": 1
|
||||
}, {
|
||||
"name": "Ubuntu",
|
||||
"flavors": [],
|
||||
"display_name": "os_only",
|
||||
"name": "os_only",
|
||||
"roles": [],
|
||||
"supported_oses": [{
|
||||
"os_id": 3,
|
||||
"id": 3,
|
||||
"name": "CentOS-6.5-x86_64"
|
||||
}, {
|
||||
"os_id": 4,
|
||||
"id": 4,
|
||||
"name": "Ubuntu-12.04-x86_64"
|
||||
}],
|
||||
"id": 2
|
||||
}],
|
||||
"flavors": [{
|
||||
"display_name": "allinone",
|
||||
"id": 1,
|
||||
"name": "allinone",
|
||||
"roles": [{
|
||||
"display_name": "Compute",
|
||||
"name": "os-compute-worker"
|
||||
}, {
|
||||
"display_name": "Controller",
|
||||
"name": "os-controller"
|
||||
}, {
|
||||
"display_name": "Network",
|
||||
"name": "os-network"
|
||||
}, {
|
||||
"display_name": "Storage",
|
||||
"name": "os-block-storage-worker"
|
||||
}]
|
||||
}, {
|
||||
"display_name": "multiroles",
|
||||
"id": 2,
|
||||
"name": "multiroles",
|
||||
"roles": [{
|
||||
"display_name": "Compute",
|
||||
"name": "os-compute-worker"
|
||||
"flavors": [],
|
||||
"name": "ceph(chef)",
|
||||
"roles": [],
|
||||
"distributed_system_id": 2,
|
||||
"supported_oses": [{
|
||||
"os_id": 3,
|
||||
"id": 3,
|
||||
"name": "CentOS-6.5-x86_64"
|
||||
}, {
|
||||
"display_name": "Controller",
|
||||
"name": "os-controller"
|
||||
"os_id": 4,
|
||||
"id": 4,
|
||||
"name": "Ubuntu-12.04-x86_64"
|
||||
}],
|
||||
"distributed_system_name": "ceph",
|
||||
"display_name": "ceph(chef)",
|
||||
"id": 4
|
||||
}, {
|
||||
"flavors": [{
|
||||
"roles": [{
|
||||
"display_name": "all in one compute",
|
||||
"description": "all in one compute",
|
||||
"name": "allinone-compute"
|
||||
}],
|
||||
"display_name": "All-In-One",
|
||||
"id": 1,
|
||||
"template": "allinone.tmpl",
|
||||
"name": "allinone"
|
||||
}, {
|
||||
"display_name": "Network",
|
||||
"name": "os-network"
|
||||
"roles": [],
|
||||
"display_name": "Single Controller, Multi-compute",
|
||||
"id": 2,
|
||||
"name": "single-contoller-multi-compute"
|
||||
}, {
|
||||
"display_name": "Storage",
|
||||
"name": "os-block-storage-worker"
|
||||
}]
|
||||
}]
|
||||
}, {
|
||||
"id": 2,
|
||||
"display_name": "hadoop",
|
||||
"display": "Hadoop",
|
||||
"os_installer": "cobbler",
|
||||
"package_installer": "chef",
|
||||
"roles": [{
|
||||
"display_name": "Compute",
|
||||
"name": "os-compute-worker"
|
||||
"roles": [],
|
||||
"display_name": "Multi-node Cluster",
|
||||
"id": 3,
|
||||
"template": "multinodes.tmpl",
|
||||
"name": "multinodes"
|
||||
}],
|
||||
"name": "openstack_icehouse",
|
||||
"distributed_system_id": 1,
|
||||
"supported_oses": [{
|
||||
"os_id": 3,
|
||||
"id": 3,
|
||||
"name": "CentOS-6.5-x86_64"
|
||||
}, {
|
||||
"os_id": 4,
|
||||
"id": 4,
|
||||
"name": "Ubuntu-12.04-x86_64"
|
||||
}],
|
||||
"distributed_system_name": "openstack",
|
||||
"display_name": "OpenStack Icehouse",
|
||||
"id": 5
|
||||
}, {
|
||||
"display_name": "Controller",
|
||||
"name": "os-controller"
|
||||
}, {
|
||||
"display_name": "Network",
|
||||
"name": "os-network"
|
||||
}],
|
||||
"supported_oses": [{
|
||||
"name": "CentOs",
|
||||
"id": 1
|
||||
}, {
|
||||
"name": "Ubuntu",
|
||||
"id": 2
|
||||
}],
|
||||
"flavors": []
|
||||
}];
|
||||
"id": 6,
|
||||
"name": "ceph_openstack_icehouse",
|
||||
"display_name": "OpenStack and Ceph",
|
||||
"supported_oses": [{
|
||||
"os_id": 3,
|
||||
"id": 3,
|
||||
"name": "CentOS-6.5-x86_64"
|
||||
}, {
|
||||
"os_id": 4,
|
||||
"id": 4,
|
||||
"name": "Ubuntu-12.04-x86_64"
|
||||
}],
|
||||
"flavors": []
|
||||
|
||||
}];
|
||||
|
||||
return [200, adapters, {}];
|
||||
});
|
||||
|
||||
@ -649,9 +662,9 @@ compassAppDev.run(function($httpBackend, settings, $http) {
|
||||
var index = url.indexOf("clusters/");
|
||||
var id = url.substring(index).split("/")[1];
|
||||
var cluster = {
|
||||
"id": id,
|
||||
"id": parseInt(id),
|
||||
"name": "Cluster" + id,
|
||||
"adapter_id": 1,
|
||||
"adapter_id": 6,
|
||||
"os_id": 1,
|
||||
"editable": true,
|
||||
"create_by": "user@someemail.com",
|
||||
@ -674,7 +687,7 @@ compassAppDev.run(function($httpBackend, settings, $http) {
|
||||
"display_name": "Network",
|
||||
"name": "os-network"
|
||||
}, {
|
||||
"display_name": "database",
|
||||
"display_name": "Database",
|
||||
"name": "os-db"
|
||||
}]
|
||||
},
|
||||
@ -702,7 +715,7 @@ compassAppDev.run(function($httpBackend, settings, $http) {
|
||||
"percentage": 30,
|
||||
"max_size": "10G"
|
||||
},
|
||||
"/home": {
|
||||
"/usr": {
|
||||
"percentage": 30,
|
||||
"max_size": "10G"
|
||||
}
|
||||
@ -783,7 +796,9 @@ compassAppDev.run(function($httpBackend, settings, $http) {
|
||||
"management": "eth0",
|
||||
"tenant": "eth0",
|
||||
"storage": "eth0",
|
||||
"public": "eth1"
|
||||
"external": "eth1",
|
||||
"cluster_config": "",
|
||||
"public_config": ""
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -957,7 +972,7 @@ compassAppDev.run(function($httpBackend, settings, $http) {
|
||||
"display_name": "Message Queue",
|
||||
"name": "os-mq"
|
||||
}, {
|
||||
"display_name": "database",
|
||||
"display_name": "Database",
|
||||
"name": "os-db"
|
||||
}];
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
define(['angular'], function() {
|
||||
var servicesModule = angular.module('compass.services', []);
|
||||
// stateService is used for dynamically add/edit state
|
||||
/* .service('stateService', ['$state',
|
||||
/* .service('stateService', ['$state',
|
||||
function($state) {
|
||||
this.addStates = function(pendingStates) {
|
||||
var existingStates = $state.get(); // get all the current existing states
|
||||
@ -341,6 +341,7 @@ define(['angular'], function() {
|
||||
wizard.service_credentials = {};
|
||||
wizard.console_credentials = {};
|
||||
wizard.network_mapping = {};
|
||||
wizard.ceph_config = {};
|
||||
};
|
||||
|
||||
wizard.init();
|
||||
@ -354,6 +355,9 @@ define(['angular'], function() {
|
||||
wizard.setServiceCredentials(config.service_credentials);
|
||||
wizard.setConsoleCredentials(config.console_credentials);
|
||||
wizard.setNetworkMapping(config.network_mapping);
|
||||
if (config.ceph_config) {
|
||||
wizard.setCephConfig(config.ceph_config);
|
||||
}
|
||||
};
|
||||
|
||||
wizard.setClusterInfo = function(cluster) {
|
||||
@ -396,14 +400,14 @@ define(['angular'], function() {
|
||||
return angular.copy(wizard.servers);
|
||||
};
|
||||
/*
|
||||
wizard.setAdapter = function(adapter) { ////
|
||||
wizard.adapter = adapter;
|
||||
};
|
||||
wizard.setAdapter = function(adapter) { ////
|
||||
wizard.adapter = adapter;
|
||||
};
|
||||
|
||||
wizard.getAdapter = function() { /////
|
||||
return angular.copy(wizard.adapter);
|
||||
};
|
||||
*/
|
||||
wizard.getAdapter = function() { /////
|
||||
return angular.copy(wizard.adapter);
|
||||
};
|
||||
*/
|
||||
wizard.setGeneralConfig = function(config) {
|
||||
wizard.generalConfig = config;
|
||||
};
|
||||
@ -422,14 +426,14 @@ define(['angular'], function() {
|
||||
|
||||
// keey routing table for later use
|
||||
/*
|
||||
wizard.setRoutingTable = function(routingTb) {
|
||||
wizard.routingtable = routingTb;
|
||||
};
|
||||
wizard.setRoutingTable = function(routingTb) {
|
||||
wizard.routingtable = routingTb;
|
||||
};
|
||||
|
||||
wizard.getRoutingTable = function() {
|
||||
return wizard.routingtable;
|
||||
};
|
||||
*/
|
||||
wizard.getRoutingTable = function() {
|
||||
return wizard.routingtable;
|
||||
};
|
||||
*/
|
||||
|
||||
wizard.setInterfaces = function(interfaces) {
|
||||
wizard.interfaces = interfaces;
|
||||
@ -478,6 +482,14 @@ define(['angular'], function() {
|
||||
return angular.copy(wizard.network_mapping);
|
||||
};
|
||||
|
||||
wizard.setCephConfig = function(cephConfig) {
|
||||
wizard.ceph_config = cephConfig;
|
||||
};
|
||||
|
||||
wizard.getCephConfig = function() {
|
||||
return angular.copy(wizard.ceph_config);
|
||||
};
|
||||
|
||||
return wizard;
|
||||
}
|
||||
])
|
||||
|
@ -174,6 +174,40 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div>
|
||||
<label class="col-sm-4 control-label no-padding-right">
|
||||
Server Credentials
|
||||
<span class="text-danger">*</span>
|
||||
</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="col-xs-10 col-sm-5" placeholder="Username" name="server-username" ng-model="server_credentials.username" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div>
|
||||
<label class="col-sm-4 control-label no-padding-right">
|
||||
<span class="text-danger">*</span>
|
||||
</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="password" class="col-xs-10 col-sm-5" placeholder="Password" name="server-password" ng-model="server_credentials.password" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div>
|
||||
<label class="col-sm-4 control-label no-padding-right">
|
||||
<span class="text-danger">*</span>
|
||||
</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="password" class="col-xs-10 col-sm-5" placeholder="Confirm Password" ng-model="confirmPassword" name="server-confirmpassword" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<!--table class="table table-hover nowrap">
|
||||
|
@ -16,10 +16,11 @@
|
||||
(Management)
|
||||
</span>
|
||||
<div ui-on-Drop="onDrop($event, interface_key)" drag-hover-class="drag-enter" drop-channel="{{interface_value.dropChannel}}" class="interface-placeholder interface-placeholder-margin">
|
||||
<div ng-repeat="(network_key, network_value) in networking" ui-draggable="true" on-drop-success="dropSuccessHandler($event, network_key, networking)" drag-channel="{{network_value.dragChannel}}" class="external-event ui-draggable network-draggable margin-right-5 fade-animation" ng-class="{'label-pink': network_key == 'management', 'label-success': network_key =='tenant', 'label-purple': network_key == 'public', 'label-warning': network_key == 'storage'}" ng-if="network_value.mapping_interface==interface_key">
|
||||
<div ng-repeat="(network_key, network_value) in networking" ui-draggable="true" on-drop-success="dropSuccessHandler($event, network_key, networking)" drag-channel="{{network_value.dragChannel}}" class="external-event ui-draggable network-draggable margin-right-5 fade-animation" ng-class="{'label-pink': network_key == 'management', 'label-success': network_key == 'tenant', 'label-purple': network_key == 'external', 'label-warning': network_key == 'storage', 'label-info': network_key == 'public_network', 'label-red': network_key == 'cluster_network'}" ng-if="network_value.mapping_interface == interface_key">
|
||||
<i class="ace-icon fa fa-arrows"></i>
|
||||
<span class="capitalize">{{network_key}}</span>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -33,11 +34,11 @@
|
||||
<h4>Networks</h4>
|
||||
</div>
|
||||
<br>
|
||||
<p>Use drag and drop to move logical networks between physical interfaces. (Interface assigned Promisc Mode can only map with Public network)</p>
|
||||
<p>Use drag and drop to move logical networks between physical interfaces. (Interface assigned Promisc Mode can only map with External network)</p>
|
||||
<div class="widget-body">
|
||||
<div class="widget-main network-background">
|
||||
<div ui-on-Drop="onDrop($event, '')" drag-hover-class="drag-enter" class="network-placeholder network-margin-border" drop-channel="E">
|
||||
<div ng-repeat="(key, value) in networking" ui-draggable="true" on-drop-success="dropSuccessHandler($event, key, networking);" class="external-event ui-draggable network-draggable network-margin margin-right-20 fade-animation" ng-class="{'label-pink': key == 'management', 'label-success': key =='tenant', 'label-purple': key == 'public', 'label-warning': key == 'storage'}" drag-channel="{{value.dragChannel}}" ng-if="!value.mapping_interface">
|
||||
<div ui-on-Drop="onDrop($event, '')" drag-hover-class="drag-enter" class="network-placeholder network-margin-border" drop-channel="external others">
|
||||
<div ng-repeat="(key, value) in networking" ui-draggable="true" on-drop-success="dropSuccessHandler($event, key, networking);" class="external-event ui-draggable network-draggable network-margin margin-right-20 fade-animation" ng-class="{'label-pink': key == 'management', 'label-success': key =='tenant', 'label-purple': key == 'external', 'label-warning': key == 'storage', 'label-info': key == 'public_network', 'label-red': key == 'cluster_network'}" drag-channel="{{value.dragChannel}}" ng-if="!value.mapping_interface">
|
||||
<i class="ace-icon fa fa-arrows"></i>
|
||||
<span class="capitalize">{{key}}</span>
|
||||
</div>
|
||||
@ -47,4 +48,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -1,10 +1,10 @@
|
||||
<div ng-controller="securityCtrl">
|
||||
<div ng-controller="packageConfigCtrl">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="accordion-style1 panel-group accordion-style2" id="accordion">
|
||||
<accordion close-others="true">
|
||||
|
||||
<accordion-group is-open="serverAccordion.open" ng-init="serverAccordion.open=true">
|
||||
<!--accordion-group is-open="serverAccordion.open" ng-init="serverAccordion.open=true">
|
||||
<accordion-heading>
|
||||
<i class="ace-icon fa fa-angle-right" ng-class="{'fa-angle-down': status1.open, 'fa-angle-right': !status1.open}"></i> Server Credentials
|
||||
</accordion-heading>
|
||||
@ -32,12 +32,12 @@
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</accordion-group>
|
||||
</accordion-group-->
|
||||
|
||||
<accordion-group is-open="serviceAccordion.open">
|
||||
|
||||
<accordion-heading>
|
||||
<i class="ace-icon fa fa-angle-right" ng-class="{'fa-angle-down': status2.open, 'fa-angle-right': !status2.open}"></i> OpenStack Database & Queue Credentials
|
||||
<i class="ace-icon fa fa-angle-right" ng-class="{'fa-angle-down': serviceAccordion.open, 'fa-angle-right': !serviceAccordion.open}"></i> OpenStack Database & Queue Credentials
|
||||
</accordion-heading>
|
||||
<div class="row">
|
||||
<div class="col-lg-1">
|
||||
@ -96,7 +96,7 @@
|
||||
|
||||
<accordion-group is-open="mgmtAccordion.open">
|
||||
<accordion-heading>
|
||||
<i class="ace-icon fa fa-angle-right" ng-class="{'fa-angle-down': status.open, 'fa-angle-right': !status.open}"></i> OpenStack Keystone User Credentials
|
||||
<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>
|
||||
<div class="row">
|
||||
<div class="col-lg-1">
|
||||
@ -151,10 +151,100 @@
|
||||
</div>
|
||||
</accordion-group>
|
||||
|
||||
<accordion-group is-open="cephAccordion.open" ng-if="currentAdapterName == 'ceph_openstack_icehouse'">
|
||||
<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>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<form id="cephForm" name="cephForm" class="form-horizontal" role="form">
|
||||
<div class="form-group">
|
||||
<div>
|
||||
<label class="col-sm-4 control-label no-padding-right">
|
||||
OSD Pool PG Number
|
||||
<span class="text-danger">*</span>
|
||||
</label>
|
||||
<div class="col-sm-8">
|
||||
<input ng-model="cephConfig.global_config.osd_pool_pg_num" type="text" class="col-xs-10 col-sm-5" placeholder="OSD Pool PG Number" name="osd_pool_pg_num" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div>
|
||||
<label class="col-sm-4 control-label no-padding-right">
|
||||
OSD Pool PGP Number
|
||||
<span class="text-danger">*</span>
|
||||
</label>
|
||||
<div class="col-sm-8">
|
||||
<input ng-model="cephConfig.global_config.osd_pool_pgp_num" type="text" class="col-xs-10 col-sm-5" placeholder="OSD Pool PGP Number" name="osd_pool_pgp_num" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div>
|
||||
<label class="col-sm-4 control-label no-padding-right">
|
||||
OSD Pool Size
|
||||
<span class="text-danger">*</span>
|
||||
</label>
|
||||
<div class="col-sm-8">
|
||||
<input ng-model="cephConfig.global_config.osd_pool_size" type="text" class="col-xs-10 col-sm-5" placeholder="OSD Pool Size" name="osd_pool_size" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div>
|
||||
<label class="col-sm-4 control-label no-padding-right">
|
||||
Journal Size
|
||||
<span class="text-danger opacity-zero">*</span>
|
||||
</label>
|
||||
<div class="col-sm-8">
|
||||
<input ng-model="cephConfig.osd_config.journal_size" type="text" class="col-xs-10 col-sm-5" placeholder="Journal Size" name="journal_size">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div>
|
||||
<label class="col-sm-4 control-label no-padding-right">
|
||||
OP Threads
|
||||
<span class="text-danger opacity-zero">*</span>
|
||||
</label>
|
||||
<div class="col-sm-8">
|
||||
<input ng-model="cephConfig.osd_config.op_threads" type="number" class="col-xs-10 col-sm-5" placeholder="OP Threads" name="op_threads">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--div class="form-group">
|
||||
<div>
|
||||
<label class="col-sm-4 control-label no-padding-right">
|
||||
OSD Devices
|
||||
<span class="text-danger opacity-zero">*</span>
|
||||
</label>
|
||||
<div class="col-sm-8">
|
||||
<input ng-model="cephConfig.osd_devices" type="text" class="col-xs-5 col-sm-2" placeholder="Device" name="device">
|
||||
<input ng-model="cephConfig.journals" type="text" class="col-xs-5 col-sm-3" placeholder="Journal" name="journal">
|
||||
<span class="col-xs-2 col-sm-3"-->
|
||||
<!--Add Action-->
|
||||
<!--span class="action" ng-click="addValue('dns_servers')">
|
||||
<i class="fa fa-plus-circle bigger-140 blue"></i>
|
||||
</span-->
|
||||
<!--Remove Action-->
|
||||
<!--span ng-show="general.dns_servers.length > 1" class="action" ng-click="general.dns_servers.splice($index,1)">
|
||||
<i class="fa fa-minus-circle bigger-140 blue"></i>
|
||||
</span-->
|
||||
<!--/span>
|
||||
</div>
|
||||
</div>
|
||||
</div-->
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</accordion-group>
|
||||
|
||||
</accordion>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
@ -55,7 +55,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<span class="opacity-zero">
|
||||
<span style="display: none">
|
||||
<input type="text" placeholder="HA VIP" ng-model="ha_vip">
|
||||
</span>
|
||||
<button class="btn btn-sm btn-info" ng-init="autoAssignRoles.isCollapsed = true;" ng-click="autoAssignRoles.isCollapsed = !autoAssignRoles.isCollapsed">
|
||||
@ -141,12 +141,12 @@
|
||||
<div id="sticky-anchor"></div>
|
||||
<div class="row role-panel" rolepanelscroll>
|
||||
<div class="blue">
|
||||
<h4 class="margin-left-neg4">Drag to Assign</h4>
|
||||
<h4>Drag to Assign</h4>
|
||||
</div>
|
||||
<div class="role-assign-drag">
|
||||
<div tooltip-placement="left" tooltip="{{role_value.display_name}}" tooltip-popup-delay='100' ui-draggable="true" on-drop-success="dropSuccessHandler($event,role_value,role_key)" class="role-tag drag-roles ui-draggable" ng-repeat="(role_key, role_value) in roles" ng-style="{'background-color': role_value.color}" drag-channel="{{role_value.dragChannel}}">
|
||||
<i class="ace-icon fa fa-arrows margin-left-neg4"></i>
|
||||
<span >{{role_value.display_name | limitTo: 10 }}</span>
|
||||
<span >{{role_value.display_name}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -33,7 +33,7 @@ define(['uiRouter', 'angularTable', 'angularDragDrop', 'angularTouch', 'ngSpinne
|
||||
});
|
||||
return deferred.promise;
|
||||
},
|
||||
wizardStepsData: function($q, dataService) {
|
||||
wizardStepsData: function($q, dataService) { // get the create-cluster-wizard steps
|
||||
var deferred = $q.defer();
|
||||
dataService.getWizardSteps().success(function(data) {
|
||||
deferred.resolve(data);
|
||||
@ -47,65 +47,103 @@ define(['uiRouter', 'angularTable', 'angularDragDrop', 'angularTouch', 'ngSpinne
|
||||
deferred.resolve(data);
|
||||
});
|
||||
return deferred.promise;
|
||||
},
|
||||
adaptersData: function($q, dataService) {
|
||||
var deferred = $q.defer();
|
||||
dataService.getAdapters().success(function(data) {
|
||||
deferred.resolve(data);
|
||||
});
|
||||
return deferred.promise;
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
wizardModule.controller('wizardCtrl', function($scope, dataService, wizardFactory, $stateParams, $state, $modal, clusterData, machinesHostsData, wizardStepsData, clusterConfigData) {
|
||||
wizardModule.controller('wizardCtrl', function($scope, dataService, wizardFactory, $stateParams, $state, $modal, clusterData, adaptersData, machinesHostsData, wizardStepsData, clusterConfigData) {
|
||||
$scope.loading = false;
|
||||
$scope.clusterId = $stateParams.id;
|
||||
$scope.cluster = clusterData;
|
||||
wizardFactory.setClusterInfo($scope.cluster);
|
||||
wizardFactory.setAllMachinesHost(machinesHostsData);
|
||||
|
||||
$scope.adapters = adaptersData;
|
||||
|
||||
angular.forEach($scope.adapters, function(adapter) {
|
||||
if (adapter.id == $scope.cluster.adapter_id) {
|
||||
$scope.currentAdapterName = adapter.name;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
// get pre-config data for wizard and set wizard steps based on different adapters
|
||||
var oldConfig = clusterConfigData;
|
||||
$scope.steps = [];
|
||||
if ($stateParams.config == "true") {
|
||||
dataService.getWizardPreConfig().success(function(data) {
|
||||
var preConfigData = {};
|
||||
switch ($scope.currentAdapterName) {
|
||||
case "openstack_icehouse":
|
||||
preConfigData = data["openstack"];
|
||||
$scope.steps = wizardStepsData["os_and_ts"];
|
||||
wizardFactory.setSteps($scope.steps);
|
||||
break;
|
||||
case "os_only":
|
||||
preConfigData = data["os_only"];
|
||||
$scope.steps = wizardStepsData["os"];
|
||||
wizardFactory.setSteps($scope.steps);
|
||||
break;
|
||||
case "ceph_openstack_icehouse":
|
||||
preConfigData = data["openstack_ceph"];
|
||||
$scope.steps = wizardStepsData["os_and_ts"];
|
||||
wizardFactory.setSteps($scope.steps);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (preConfigData) {
|
||||
wizardFactory.preConfig(preConfigData);
|
||||
|
||||
if (oldConfig.os_config) {
|
||||
if (oldConfig.os_config.general) {
|
||||
wizardFactory.setGeneralConfig(oldConfig.os_config.general);
|
||||
}
|
||||
if (oldConfig.os_config.partition) {
|
||||
wizardFactory.setPartition(oldConfig.os_config.partition);
|
||||
}
|
||||
if (oldConfig.os_config.server_credentials) {
|
||||
wizardFactory.setServerCredentials(oldConfig.os_config.server_credentials);
|
||||
}
|
||||
}
|
||||
if (oldConfig.package_config) {
|
||||
if (oldConfig.package_config.security) {
|
||||
if (oldConfig.package_config.security.service_credentials) {
|
||||
wizardFactory.setServiceCredentials(oldConfig.package_config.security.service_credentials);
|
||||
}
|
||||
if (oldConfig.package_config.security.console_credentials) {
|
||||
wizardFactory.setConsoleCredentials(oldConfig.package_config.security.console_credentials);
|
||||
}
|
||||
}
|
||||
if (oldConfig.package_config.network_mapping) {
|
||||
wizardFactory.setNetworkMapping(oldConfig.package_config.network_mapping);
|
||||
}
|
||||
if (oldConfig.package_config.ceph_config) {
|
||||
wizardFactory.setCephConfig(oldConfig.package_config.ceph_config);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$scope.$on('loading', function(event, data) {
|
||||
$scope.loading = data;
|
||||
});
|
||||
|
||||
// get pre-config data for wizard
|
||||
if ($stateParams.config == "true") {
|
||||
dataService.getWizardPreConfig().success(function(data) {
|
||||
wizardFactory.preConfig(data);
|
||||
|
||||
if (oldConfig.os_config) {
|
||||
if (oldConfig.os_config.general) {
|
||||
wizardFactory.setGeneralConfig(oldConfig.os_config.general);
|
||||
}
|
||||
if (oldConfig.os_config.partition) {
|
||||
wizardFactory.setPartition(oldConfig.os_config.partition);
|
||||
}
|
||||
if (oldConfig.os_config.server_credentials) {
|
||||
wizardFactory.setServerCredentials(oldConfig.os_config.server_credentials);
|
||||
}
|
||||
}
|
||||
if (oldConfig.package_config) {
|
||||
if (oldConfig.package_config.security) {
|
||||
if (oldConfig.package_config.security.service_credentials) {
|
||||
wizardFactory.setServiceCredentials(oldConfig.package_config.security.service_credentials);
|
||||
}
|
||||
if (oldConfig.package_config.security.console_credentials) {
|
||||
wizardFactory.setConsoleCredentials(oldConfig.package_config.security.console_credentials);
|
||||
}
|
||||
}
|
||||
if (oldConfig.package_config.network_mapping) {
|
||||
wizardFactory.setNetworkMapping(oldConfig.package_config.network_mapping);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
$scope.currentStep = 1;
|
||||
$scope.maxStep = 1;
|
||||
$scope.pendingStep = 1;
|
||||
|
||||
// get the create-cluster-wizard steps for os, ts or os_and_ts
|
||||
$scope.steps = wizardStepsData["os_and_ts"];
|
||||
wizardFactory.setSteps($scope.steps);
|
||||
|
||||
// Watch commit state change
|
||||
$scope.$watch(function() {
|
||||
return wizardFactory.getCommitState()
|
||||
@ -479,6 +517,7 @@ define(['uiRouter', 'angularTable', 'angularDragDrop', 'angularTouch', 'ngSpinne
|
||||
var cluster = wizardFactory.getClusterInfo();
|
||||
|
||||
$scope.general = wizardFactory.getGeneralConfig();
|
||||
$scope.server_credentials = wizardFactory.getServerCredentials();
|
||||
|
||||
if (!$scope.general["dns_servers"]) {
|
||||
$scope.general["dns_servers"] = [""];
|
||||
@ -538,13 +577,17 @@ define(['uiRouter', 'angularTable', 'angularDragDrop', 'angularTouch', 'ngSpinne
|
||||
return;
|
||||
}
|
||||
$scope.$emit("loading", true);
|
||||
var os_global_general = {
|
||||
var osGlobalConfig = {
|
||||
"os_config": {
|
||||
"general": $scope.general
|
||||
"general": $scope.general,
|
||||
"server_credentials": {
|
||||
"username": $scope.server_credentials.username,
|
||||
"password": $scope.server_credentials.password
|
||||
}
|
||||
}
|
||||
};
|
||||
if ($scope.generalForm.$valid) {
|
||||
dataService.updateClusterConfig(cluster.id, os_global_general).success(function(configData) {
|
||||
dataService.updateClusterConfig(cluster.id, osGlobalConfig).success(function(configData) {
|
||||
wizardFactory.setGeneralConfig($scope.general);
|
||||
var commitState = {
|
||||
"name": "os_global",
|
||||
@ -571,7 +614,6 @@ define(['uiRouter', 'angularTable', 'angularDragDrop', 'angularTouch', 'ngSpinne
|
||||
};
|
||||
wizardFactory.setCommitState(commitState);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
@ -919,7 +961,7 @@ define(['uiRouter', 'angularTable', 'angularDragDrop', 'angularTouch', 'ngSpinne
|
||||
$scope.partition[mount_point].percentage = $scope.newPartition.percentage;
|
||||
$scope.partition[mount_point].max_size = $scope.newPartition.max_size;
|
||||
$scope.newPartition = {};
|
||||
};*/
|
||||
};*/
|
||||
|
||||
$scope.addPartition = function() {
|
||||
var newRowExist = false;
|
||||
@ -1062,11 +1104,10 @@ define(['uiRouter', 'angularTable', 'angularDragDrop', 'angularTouch', 'ngSpinne
|
||||
});
|
||||
}
|
||||
};
|
||||
})
|
||||
});
|
||||
|
||||
wizardModule.controller('securityCtrl', function($scope, wizardFactory, dataService) {
|
||||
wizardModule.controller('packageConfigCtrl', function($scope, wizardFactory, dataService) {
|
||||
var cluster = wizardFactory.getClusterInfo();
|
||||
$scope.server_credentials = wizardFactory.getServerCredentials();
|
||||
$scope.service_credentials = wizardFactory.getServiceCredentials();
|
||||
$scope.console_credentials = wizardFactory.getConsoleCredentials();
|
||||
|
||||
@ -1092,7 +1133,7 @@ define(['uiRouter', 'angularTable', 'angularDragDrop', 'angularTouch', 'ngSpinne
|
||||
return wizardFactory.getCommitState()
|
||||
}, function(newCommitState, oldCommitState) {
|
||||
if (newCommitState !== undefined) {
|
||||
if (newCommitState.name == "security" && newCommitState.state == "triggered") {
|
||||
if (newCommitState.name == "package_config" && newCommitState.state == "triggered") {
|
||||
$scope.commit(newCommitState.sendRequest);
|
||||
}
|
||||
}
|
||||
@ -1167,10 +1208,19 @@ define(['uiRouter', 'angularTable', 'angularDragDrop', 'angularTouch', 'ngSpinne
|
||||
$scope.service_credentials = angular.copy($scope.originalServiceData);
|
||||
}
|
||||
|
||||
// Ceph Config
|
||||
$scope.cephAccordion = {};
|
||||
/*$scope.cephConfig = {
|
||||
"global_config": {},
|
||||
"osd_config": {},
|
||||
"osd_devices": {}
|
||||
};*/
|
||||
$scope.cephConfig = wizardFactory.getCephConfig();
|
||||
|
||||
$scope.commit = function(sendRequest) {
|
||||
if (!sendRequest) {
|
||||
var commitState = {
|
||||
"name": "security",
|
||||
"name": "package_config",
|
||||
"state": "goToPreviousStep",
|
||||
"message": ""
|
||||
};
|
||||
@ -1178,13 +1228,7 @@ define(['uiRouter', 'angularTable', 'angularDragDrop', 'angularTouch', 'ngSpinne
|
||||
return;
|
||||
}
|
||||
$scope.$emit("loading", true);
|
||||
var securityData = {
|
||||
"os_config": {
|
||||
"server_credentials": {
|
||||
"username": $scope.server_credentials.username,
|
||||
"password": $scope.server_credentials.password
|
||||
}
|
||||
},
|
||||
var targetSysConfigData = {
|
||||
"package_config": {
|
||||
"security": {
|
||||
"service_credentials": $scope.service_credentials,
|
||||
@ -1192,16 +1236,19 @@ define(['uiRouter', 'angularTable', 'angularDragDrop', 'angularTouch', 'ngSpinne
|
||||
}
|
||||
}
|
||||
};
|
||||
dataService.updateClusterConfig(cluster.id, securityData).success(function(data) {
|
||||
if($scope.currentAdapterName == "ceph_openstack_icehouse") {
|
||||
targetSysConfigData["package_config"]["ceph_config"] = $scope.cephConfig;
|
||||
}
|
||||
dataService.updateClusterConfig(cluster.id, targetSysConfigData).success(function(data) {
|
||||
var commitState = {
|
||||
"name": "security",
|
||||
"name": "package_config",
|
||||
"state": "success",
|
||||
"message": ""
|
||||
};
|
||||
wizardFactory.setCommitState(commitState);
|
||||
}).error(function(response) {
|
||||
var commitState = {
|
||||
"name": "security",
|
||||
"name": "package_config",
|
||||
"state": "error",
|
||||
"message": response
|
||||
};
|
||||
@ -1236,7 +1283,7 @@ define(['uiRouter', 'angularTable', 'angularDragDrop', 'angularTouch', 'ngSpinne
|
||||
angular.forEach($scope.servers[key].roles, function(server_role, server_role_key) {
|
||||
$scope.server_role = "";
|
||||
angular.forEach($scope.roles, function(role, role_key) {
|
||||
if (server_role.display_name == $scope.roles[role_key].display_name) {
|
||||
if (server_role.name == $scope.roles[role_key].name) {
|
||||
$scope.server_role = role_key;
|
||||
}
|
||||
});
|
||||
@ -1263,7 +1310,7 @@ define(['uiRouter', 'angularTable', 'angularDragDrop', 'angularTouch', 'ngSpinne
|
||||
var roleIndex = $scope.servers[serverIndex].roles.indexOf(role);
|
||||
$scope.servers[serverIndex].roles.splice(roleIndex, 1);
|
||||
angular.forEach($scope.roles, function(role_value, role_key) {
|
||||
if (role.display_name == $scope.roles[role_key].display_name) {
|
||||
if (role.name == $scope.roles[role_key].name) {
|
||||
$scope.existingRoles[serverIndex].splice(role_key, 1, role_key)
|
||||
}
|
||||
});
|
||||
@ -1460,7 +1507,7 @@ define(['uiRouter', 'angularTable', 'angularDragDrop', 'angularTouch', 'ngSpinne
|
||||
angular.forEach($scope.servers, function(value, key) {
|
||||
angular.forEach($scope.servers[key].roles, function(server_role, server_role_key) {
|
||||
angular.forEach($scope.roles, function(role, role_key) {
|
||||
if ($scope.servers[key].roles[server_role_key].display_name == $scope.roles[role_key].display_name) {
|
||||
if ($scope.servers[key].roles[server_role_key].name == $scope.roles[role_key].name) {
|
||||
$scope.existingRoles[key].splice(role_key, 1, "p");
|
||||
}
|
||||
});
|
||||
@ -1481,28 +1528,29 @@ define(['uiRouter', 'angularTable', 'angularDragDrop', 'angularTouch', 'ngSpinne
|
||||
};
|
||||
|
||||
angular.forEach($scope.interfaces, function(value, key) {
|
||||
$scope.interfaces[key].dropChannel = "E";
|
||||
})
|
||||
$scope.interfaces[key].dropChannel = "others";
|
||||
});
|
||||
|
||||
$scope.networking = {};
|
||||
angular.forEach($scope.original_networking, function(value, key) {
|
||||
$scope.networking[key] = {};
|
||||
$scope.networking[key].mapping_interface = value;
|
||||
if (key == "public") {
|
||||
$scope.networking[key].dragChannel = "P";
|
||||
if (key == "external") {
|
||||
$scope.networking[key].dragChannel = "external";
|
||||
} else
|
||||
$scope.networking[key].dragChannel = "E";
|
||||
})
|
||||
$scope.networking[key].dragChannel = "others";
|
||||
});
|
||||
|
||||
|
||||
$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 Public Network
|
||||
// The interface with promisc mode is required to be set as External Network
|
||||
if (value.is_promiscuous) {
|
||||
$scope.networking["public"].mapping_interface = key;
|
||||
$scope.interfaces[key].dropChannel = "P";
|
||||
$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) {
|
||||
@ -1558,7 +1606,7 @@ define(['uiRouter', 'angularTable', 'angularDragDrop', 'angularTouch', 'ngSpinne
|
||||
wizardFactory.setCommitState(commitState);
|
||||
});
|
||||
};
|
||||
})
|
||||
});
|
||||
|
||||
wizardModule.controller('reviewCtrl', function($scope, wizardFactory, dataService, $filter, ngTableParams, sortingService) {
|
||||
var cluster = wizardFactory.getClusterInfo();
|
||||
@ -1709,9 +1757,11 @@ define(['uiRouter', 'angularTable', 'angularDragDrop', 'angularTouch', 'ngSpinne
|
||||
angular.element($window).bind("scroll", function() {
|
||||
var window_top = this.pageYOffset;
|
||||
var sticky_anchor_elem = angular.element($('#sticky-anchor'));
|
||||
var window_height = $(window).height();
|
||||
var scroll_panel_height = $('.role-assign-drag').height();
|
||||
if (sticky_anchor_elem.length != 0) {
|
||||
var div_top = sticky_anchor_elem.offset().top;
|
||||
if (window_top > div_top) {
|
||||
if (window_top > div_top + 10 && window_height > scroll_panel_height + 150) {
|
||||
$('.role-panel').addClass('stick');
|
||||
} else {
|
||||
$('.role-panel').removeClass('stick');
|
||||
|
Loading…
x
Reference in New Issue
Block a user