Add cluster template options
Following updates of magnumclient, this patch adds some properties to cluster template creation and views. To spec section: - docker_storage_driver: 'devicemapper' or 'overlay', default='devicemapper' To network section: - fixed_subnet: string - floating_ip_enabled: boolean, default=True - master_lb_enabled: boolean, default=False Change-Id: Ibeb9933e68f533b0aea3b6951a3c293dc85343e4 Implements: blueprint cluster-template-options Depends-On: I971ef74f0cc79346a76c1faba55777b0a44465da
This commit is contained in:
parent
04c6e4433a
commit
8d7104be1a
@ -31,7 +31,10 @@ CLUSTER_TEMPLATE_CREATE_ATTRS = ['name', 'image_id', 'flavor_id',
|
||||
'dns_nameserver', 'docker_volume_size',
|
||||
'labels', 'coe', 'http_proxy', 'https_proxy',
|
||||
'no_proxy', 'network_driver', 'volume_driver',
|
||||
'public', 'registry_enabled', 'tls_disabled']
|
||||
'public', 'registry_enabled', 'tls_disabled',
|
||||
'docker_storage_driver', 'fixed_subnet',
|
||||
'floating_ip_enabled', 'master_lb_enabled',
|
||||
'insecure_registry']
|
||||
|
||||
CLUSTER_CREATE_ATTRS = ['name', 'baymodel_id', 'node_count',
|
||||
'discovery_url', 'cluster_create_timeout',
|
||||
|
@ -45,6 +45,7 @@
|
||||
flavor_id: "",
|
||||
master_flavor_id: "",
|
||||
docker_volume_size: null,
|
||||
docker_storage_driver: "devicemapper",
|
||||
keypair_id: "",
|
||||
network_driver: "",
|
||||
volume_driver: "",
|
||||
@ -53,13 +54,19 @@
|
||||
no_proxy: null,
|
||||
external_network_id: "",
|
||||
fixed_network: "",
|
||||
fixed_subnet: "",
|
||||
dns_nameserver: null,
|
||||
master_lb_enabled: "",
|
||||
floating_ip_enabled: true,
|
||||
labels: null,
|
||||
network_drivers : [{name: "docker", label: gettext("Docker")},
|
||||
network_drivers : [{name: "", label: gettext("Choose a Network Driver")},
|
||||
{name: "docker", label: gettext("Docker")},
|
||||
{name: "flannel", label: gettext("Flannel")}],
|
||||
volume_drivers : [{name: "", label: gettext("Choose a Volume Driver")},
|
||||
{name: "cinder", label: gettext("Cinder")},
|
||||
{name: "rexray", label: gettext("Rexray")}]
|
||||
{name: "rexray", label: gettext("Rexray")}],
|
||||
docker_storage_drivers: [{name: "devicemapper", label: gettext("Device Mapper")},
|
||||
{name: "overlay", label: gettext("Overley")}]
|
||||
};
|
||||
}
|
||||
|
||||
@ -83,7 +90,7 @@
|
||||
// These are not for submittion.
|
||||
for (var key in finalSpec) {
|
||||
if (finalSpec.hasOwnProperty(key) && finalSpec[key] === null || finalSpec[key] === ""
|
||||
|| key === "network_drivers" || key === "volume_drivers") {
|
||||
|| key === "network_drivers" || key === "volume_drivers" || key === "docker_storage_drivers") {
|
||||
delete finalSpec[key];
|
||||
}
|
||||
}
|
||||
|
@ -2,3 +2,7 @@
|
||||
<dd translate>This should really be named fixed-network-cidr. Default: 10.0.0.0/24</dd>
|
||||
<dt translate>DNS</dt>
|
||||
<dd translate>Specify the nameserver to use for the cluster template. Default: 8.8.8.8</dd>
|
||||
<dt translate>Master LB</dt>
|
||||
<dd translate>Indicates whether created clusters should have a load balancer for master nodes or not. Default: False</dd>
|
||||
<dt translate>Floating IP</dt>
|
||||
<dd translate>Indicates whether created clusters should have a floating ip or not. Default: True</dd>
|
@ -48,6 +48,13 @@
|
||||
ng-model="model.newClusterTemplateSpec.fixed_network"
|
||||
placeholder="{$ 'The private Neutron network name to connect to this cluster template'|translate $}">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="cluster-template-fixed-subnet" translate>Fixed Subnet</label>
|
||||
<input name="cluster-template-fixed-subnet" type="text" class="form-control"
|
||||
id="cluster-template-fixed-subnet"
|
||||
ng-model="model.newClusterTemplateSpec.fixed_subnet"
|
||||
placeholder="{$ 'The private Neutron subnet name to connect to this cluster template'|translate $}">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="cluster-template-dns-nameserver" translate>DNS</label>
|
||||
<input name="cluster-template-dns-nameserver" type="text" class="form-control"
|
||||
@ -55,6 +62,20 @@
|
||||
ng-model="model.newClusterTemplateSpec.dns_nameserver"
|
||||
placeholder="{$ 'The DNS nameserver to use for this cluster template'|translate $}">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="themable-checkbox">
|
||||
<input name="cluster-template-master-lb-enabled" type="checkbox" id="cluster-template-master-lb-enabled"
|
||||
ng-model="model.newClusterTemplateSpec.master_lb_enabled">
|
||||
<label for="cluster-template-master-lb-enabled" translate>Master LB</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="themable-checkbox">
|
||||
<input name="cluster-template-floating-ip-enabled" type="checkbox" id="cluster-template-floating-ip-enabled"
|
||||
ng-model="model.newClusterTemplateSpec.floating_ip_enabled">
|
||||
<label for="cluster-template-floating-ip-enabled" translate>Floating IP</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,12 +1,12 @@
|
||||
<dl>
|
||||
<dt translate>Image</dt>
|
||||
<dd translate>The name or UUID of the base image to customize for the cluster.</dd>
|
||||
<dt translate>Keypair</dt>
|
||||
<dd translate>The name or UUID of the SSH keypair to load into the cluster nodes.</dd>
|
||||
<dt translate>Flavor</dt>
|
||||
<dd translate>The nova flavor id to use when launching the cluster. Default: m1.small</dd>
|
||||
<dt translate>Master Flavor</dt>
|
||||
<dd translate>The nova flavor id to use when launching the master node of the cluster. Default: m1.small</dd>
|
||||
<dt translate>Docker Volume Size</dt>
|
||||
<dd translate>The size in GB for Docker Volume. Default: 25</dd>
|
||||
<dt translate>Keypair</dt>
|
||||
<dd translate>The name or UUID of the SSH keypair to load into the cluster nodes.</dd>
|
||||
</dl>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<div ng-controller="createClusterTemplateSpecController as ctrl">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="cluster-template-image-id">
|
||||
<translate>Image</translate>
|
||||
@ -12,6 +12,18 @@
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="cluster-template-keypair-id">
|
||||
<translate>Keypair</translate>
|
||||
<span class="hz-icon-required fa fa-asterisk"></span>
|
||||
</label>
|
||||
<select name="cluster-template-keypair-id" type="text" class="form-control" id="cluster-template-keypair-id"
|
||||
ng-model="model.newClusterTemplateSpec.keypair_id" ng-required="true"
|
||||
ng-options="keypair.id as keypair.name for keypair in ctrl.keypairs">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="cluster-template-flavor-id" translate>Flavor</label>
|
||||
@ -30,7 +42,7 @@
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="cluster-template-volume-driver" translate>Volume Driver</label>
|
||||
<select name="cluster-template-volume-driver" type="text" class="form-control" id="cluster-template-volume-driver"
|
||||
@ -40,6 +52,15 @@
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="cluster-template-docker-storage-driver" translate>Docker Volume Driver</label>
|
||||
<select name="cluster-template-docker-storage-driver" type="text" class="form-control" id="cluster-template-docker-storage-driver"
|
||||
ng-model="model.newClusterTemplateSpec.docker_storage_driver"
|
||||
ng-options="driver.name as driver.label for driver in model.newClusterTemplateSpec.docker_storage_drivers">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="cluster-template-docker-volume-size" translate>
|
||||
@ -51,17 +72,5 @@
|
||||
placeholder="{$ 'Specify the size in GB for the docker volume'|translate $}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="cluster-template-keypair-id">
|
||||
<translate>Keypair</translate>
|
||||
<span class="hz-icon-required fa fa-asterisk"></span>
|
||||
</label>
|
||||
<select name="cluster-template-keypair-id" type="text" class="form-control" id="cluster-template-keypair-id"
|
||||
ng-model="model.newClusterTemplateSpec.keypair_id" ng-required="true"
|
||||
ng-options="keypair.id as keypair.name for keypair in ctrl.keypairs">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -24,16 +24,18 @@
|
||||
<dl class="dl-horizontal">
|
||||
<dt translate>Image ID</dt>
|
||||
<dd><a href="project/images/{$ ctrl.image_uuid $}/" target="_self">{$ ctrl.cluster_template.image_id $}</a></dd>
|
||||
<dt translate>Keypair ID</dt>
|
||||
<dd><a href="project/access_and_security/keypairs/{$ ctrl.cluster_template.keypair_id $}/" target="_self">{$ ctrl.cluster_template.keypair_id $}</a></dd>
|
||||
<dt translate>Flavor ID</dt>
|
||||
<dd>{$ ctrl.cluster_template.flavor_id $}</dd>
|
||||
<dt translate>Master Flavor ID</dt>
|
||||
<dd>{$ ctrl.cluster_template.master_flavor_id $}</dd>
|
||||
<dt translate>Volume Driver</dt>
|
||||
<dd>{$ ctrl.cluster_template.volume_driver $}</dd>
|
||||
<dt translate>Docker Storage Driver</dt>
|
||||
<dd>{$ ctrl.cluster_template.docker_storage_driver $}</dd>
|
||||
<dt translate>Docker Volume Size</dt>
|
||||
<dd>{$ ctrl.cluster_template.docker_volume_size | gb $}</dd>
|
||||
<dt translate>Keypair ID</dt>
|
||||
<dd><a href="project/access_and_security/keypairs/{$ ctrl.cluster_template.keypair_id $}/" target="_self">{$ ctrl.cluster_template.keypair_id $}</a></dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
@ -54,8 +56,14 @@
|
||||
<dd>{$ ctrl.cluster_template.external_network_id $}</dd>
|
||||
<dt translate>Fixed Network</dt>
|
||||
<dd>{$ ctrl.cluster_template.fixed_network $}</dd>
|
||||
<dt translate>Fixed Subnet</dt>
|
||||
<dd>{$ ctrl.cluster_template.fixed_subnet $}</dd>
|
||||
<dt translate>DNS</dt>
|
||||
<dd>{$ ctrl.cluster_template.dns_nameserver $}</dd>
|
||||
<dt translate>TLS Enabled</dt>
|
||||
<dd>{$ ctrl.cluster_template.master_lb_enabled | yesno $}</dd>
|
||||
<dt translate>Floating IP Enabled</dt>
|
||||
<dd>{$ ctrl.cluster_template.floating_ip_enabled | yesno $}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="col-md-6 detail">
|
||||
|
@ -37,7 +37,12 @@ def data(TEST):
|
||||
"no-proxy": "",
|
||||
"labels": "",
|
||||
"tls-disabled": "",
|
||||
"public": ""}
|
||||
"public": "",
|
||||
"docker_storage_driver": "",
|
||||
"fixed_subnet": "",
|
||||
"floating_ip_enabled": "",
|
||||
"master_lb_enabled": "",
|
||||
"insecure_registry": ""}
|
||||
|
||||
TEST.cluster_templates.add(cluster_template_dict_1)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user