Skip to content

Commit

Permalink
fix(google): add better help text around accelerators (#6750)
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott authored Mar 26, 2019
1 parent 4bc6ecd commit 432e6e3
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
2 changes: 2 additions & 0 deletions app/scripts/modules/google/src/help/gce.help.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,8 @@ const helpContents: { [key: string]: string } = {
'A load balancer sends traffic to an instance group through a named port. Input must be a port number (i.e., between 1 and 65535).',
'gce.serverGroup.traffic':
'Registers the server group with any associated load balancers. These registrations are used by Spinnaker to determine if the server group is enabled.',
'gce.serverGroup.accelerator':
'Attaches GPUs to instances in this server group. The set of available GPUs is dictated by the selected zone. You cannot attach GPUs to instances with shared-core machine types.',
'gce.tagImage.consideredStages':
'Limit which previous stages will be considered when locating images to tag. If left unchecked, images generated by any upstream stage will be tagged.',
'pipeline.config.gce.bake.accountName':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ class GceAcceleratorConfigurerController implements IComponentController {
return config.availableCardCounts;
}

public acceleratorsAvailableInSelectedZone(): boolean {
return !this.command.regional && !!this.command.zone && this.getAvailableAcceleratorTypes().length > 0;
}

public onAcceleratorTypeChanged(acceleratorConfig: IGceAcceleratorConfig): void {
if (!acceleratorConfig) {
return;
Expand Down Expand Up @@ -77,6 +81,7 @@ const gceAcceleratorConfigurer: IComponentOptions = {
<div class="form-group">
<div class="sm-label-left" style="margin-bottom: 5px;">
Accelerators
<help-field key="gce.serverGroup.accelerator"></help-field>
</div>
<table class="table table-condensed packed tags">
Expand Down Expand Up @@ -114,18 +119,31 @@ const gceAcceleratorConfigurer: IComponentOptions = {
<tfoot>
<tr ng-if="$ctrl.command.acceleratorConfigs && $ctrl.command.acceleratorConfigs.length > 0">
<td colspan="3">
Adding Accelerators places constraints on the instances that you can deploy. For a complete list of
these restrictions see <a href="https://cloud.google.com/compute/docs/gpus/#restrictions">the docs on GPUs</a>.
Adding Accelerators places constraints on the instances that you can deploy. See
<a href="https://cloud.google.com/compute/docs/gpus/#restrictions">the complete list of
these restrictions</a> for more information.
</td>
</tr>
<tr>
<tr ng-if="$ctrl.acceleratorsAvailableInSelectedZone()">
<td colspan="3">
<button class="btn btn-block btn-sm add-new" ng-click="$ctrl.addAccelerator()">
<span class="glyphicon glyphicon-plus-sign"></span> Add Accelerator
</button>
</td>
</tr>
</div>
<tr ng-if="!$ctrl.acceleratorsAvailableInSelectedZone()">
<td ng-if="$ctrl.command.regional" colspan="3">
Adding accelerators is not currently supported in multi-zone deployments.
</td>
<td ng-if="!$ctrl.command.regional && !$ctrl.command.zone" colspan="3">
A zone must be selected to configure accelerators. Please note: the set of available accelerator types are limited
by zone. See <a href="https://cloud.google.com/compute/docs/gpus/#gpus-list">the complete list of types in each zone</a>
for more information.
</td>
<td ng-if="!$ctrl.command.regional && $ctrl.command.zone" colspan="3">
There are no accelerators available in the currently selected zone
</td>
</tr>
</tfoot>
</table>
</div>
Expand Down

0 comments on commit 432e6e3

Please sign in to comment.