@spinnaker/oracle 0.0.0-main-2
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.
- package/CHANGELOG.md +868 -0
- package/LICENSE.txt +203 -0
- package/dist/common/footer.component.d.ts +2 -0
- package/dist/domain/IOracleLoadBalancer.d.ts +114 -0
- package/dist/helpContents/oracleHelpContents.d.ts +1 -0
- package/dist/image/image.reader.d.ts +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3634 -0
- package/dist/index.js.map +1 -0
- package/dist/instance/details/instance.details.controller.d.ts +2 -0
- package/dist/loadBalancer/configure/createLoadBalancer.controller.d.ts +87 -0
- package/dist/loadBalancer/details/loadBalancerDetail.controller.d.ts +21 -0
- package/dist/loadBalancer/loadBalancer.transformer.d.ts +12 -0
- package/dist/oracle.module.d.ts +2 -0
- package/dist/oracle.settings.d.ts +15 -0
- package/dist/pipeline/stages/bake/bakeExecutionDetails.controller.d.ts +2 -0
- package/dist/pipeline/stages/bake/ociBakeStage.d.ts +2 -0
- package/dist/pipeline/stages/destroyAsg/destroyAsgStage.d.ts +2 -0
- package/dist/pipeline/stages/disableAsg/disableAsgStage.d.ts +2 -0
- package/dist/pipeline/stages/findAmi/findAmiStage.d.ts +2 -0
- package/dist/pipeline/stages/findImageFromTags/oracleFindImageFromTagsStage.d.ts +2 -0
- package/dist/pipeline/stages/resizeAsg/resizeAsgStage.d.ts +2 -0
- package/dist/pipeline/stages/scaleDownCluster/scaleDownClusterStage.d.ts +2 -0
- package/dist/pipeline/stages/shrinkCluster/shrinkClusterStage.d.ts +2 -0
- package/dist/securityGroup/configure/createSecurityGroup.controller.d.ts +2 -0
- package/dist/securityGroup/securityGroup.reader.d.ts +2 -0
- package/dist/securityGroup/securityGroup.transformer.d.ts +2 -0
- package/dist/serverGroup/configure/serverGroup.configure.module.d.ts +2 -0
- package/dist/serverGroup/configure/serverGroupCommandBuilder.service.d.ts +2 -0
- package/dist/serverGroup/configure/serverGroupConfiguration.service.d.ts +2 -0
- package/dist/serverGroup/configure/wizard/basicSettings/basicSettings.controller.d.ts +2 -0
- package/dist/serverGroup/configure/wizard/capacity/capacitySelector.component.d.ts +2 -0
- package/dist/serverGroup/configure/wizard/cloneServerGroup.controller.d.ts +2 -0
- package/dist/serverGroup/details/resize/resizeCapacity.component.d.ts +2 -0
- package/dist/serverGroup/details/resize/resizeServerGroup.controller.d.ts +2 -0
- package/dist/serverGroup/details/rollback/rollbackServerGroup.controller.d.ts +2 -0
- package/dist/serverGroup/details/serverGroupDetails.controller.d.ts +2 -0
- package/dist/serverGroup/serverGroup.transformer.d.ts +2 -0
- package/package.json +38 -0
- package/src/common/footer.component.html +7 -0
- package/src/common/footer.component.js +18 -0
- package/src/common/ocid/ocid.component.js +15 -0
- package/src/common/ocid/ocid.template.html +10 -0
- package/src/common/ocid/truncateOcid.filter.js +14 -0
- package/src/domain/IOracleLoadBalancer.ts +110 -0
- package/src/helpContents/oracleHelpContents.ts +52 -0
- package/src/image/image.reader.js +38 -0
- package/src/index.ts +1 -0
- package/src/instance/details/instance.details.controller.js +56 -0
- package/src/instance/details/instanceDetails.html +31 -0
- package/src/loadBalancer/configure/backendSets.html +67 -0
- package/src/loadBalancer/configure/certificates.html +63 -0
- package/src/loadBalancer/configure/createLoadBalancer.controller.spec.ts +201 -0
- package/src/loadBalancer/configure/createLoadBalancer.controller.ts +540 -0
- package/src/loadBalancer/configure/createLoadBalancer.html +25 -0
- package/src/loadBalancer/configure/createLoadBalancerProperties.html +167 -0
- package/src/loadBalancer/configure/editLoadBalancer.html +26 -0
- package/src/loadBalancer/configure/listeners.html +88 -0
- package/src/loadBalancer/details/loadBalancerDetail.controller.spec.ts +62 -0
- package/src/loadBalancer/details/loadBalancerDetail.controller.ts +163 -0
- package/src/loadBalancer/details/loadBalancerDetail.html +100 -0
- package/src/loadBalancer/loadBalancer.transformer.ts +144 -0
- package/src/oracle.module.ts +94 -0
- package/src/oracle.settings.ts +19 -0
- package/src/pipeline/disableAsg/disableAsgStage.html +11 -0
- package/src/pipeline/disableAsg/disableAsgStage.js +62 -0
- package/src/pipeline/disableAsg/disableAsgStepLabel.html +1 -0
- package/src/pipeline/stages/bake/bakeExecutionDetails.controller.js +38 -0
- package/src/pipeline/stages/bake/bakeExecutionDetails.html +52 -0
- package/src/pipeline/stages/bake/bakeStage.html +109 -0
- package/src/pipeline/stages/bake/ociBakeStage.js +147 -0
- package/src/pipeline/stages/destroyAsg/destroyAsgStage.html +9 -0
- package/src/pipeline/stages/destroyAsg/destroyAsgStage.js +64 -0
- package/src/pipeline/stages/destroyAsg/destroyAsgStepLabel.html +1 -0
- package/src/pipeline/stages/disableAsg/disableAsgStage.html +11 -0
- package/src/pipeline/stages/disableAsg/disableAsgStage.js +63 -0
- package/src/pipeline/stages/disableAsg/disableAsgStepLabel.html +1 -0
- package/src/pipeline/stages/findAmi/findAmiStage.html +20 -0
- package/src/pipeline/stages/findAmi/findAmiStage.js +82 -0
- package/src/pipeline/stages/findImageFromTags/findImageFromTagsExecutionDetails.html +44 -0
- package/src/pipeline/stages/findImageFromTags/findImageFromTagsStage.html +11 -0
- package/src/pipeline/stages/findImageFromTags/oracleFindImageFromTagsStage.js +36 -0
- package/src/pipeline/stages/resizeAsg/resizeAsgStage.html +89 -0
- package/src/pipeline/stages/resizeAsg/resizeAsgStage.js +101 -0
- package/src/pipeline/stages/resizeAsg/resizeAsgStepLabel.html +1 -0
- package/src/pipeline/stages/scaleDownCluster/scaleDownClusterStage.html +35 -0
- package/src/pipeline/stages/scaleDownCluster/scaleDownClusterStage.js +75 -0
- package/src/pipeline/stages/shrinkCluster/shrinkClusterStage.html +34 -0
- package/src/pipeline/stages/shrinkCluster/shrinkClusterStage.js +71 -0
- package/src/securityGroup/configure/createSecurityGroup.controller.js +19 -0
- package/src/securityGroup/configure/createSecurityGroup.html +19 -0
- package/src/securityGroup/securityGroup.reader.js +15 -0
- package/src/securityGroup/securityGroup.transformer.js +25 -0
- package/src/serverGroup/configure/serverGroup.configure.module.js +15 -0
- package/src/serverGroup/configure/serverGroupCommandBuilder.service.js +105 -0
- package/src/serverGroup/configure/serverGroupConfiguration.service.js +229 -0
- package/src/serverGroup/configure/wizard/advancedSettings/advancedSettings.html +13 -0
- package/src/serverGroup/configure/wizard/basicSettings/basicSettings.controller.js +35 -0
- package/src/serverGroup/configure/wizard/basicSettings/basicSettings.html +134 -0
- package/src/serverGroup/configure/wizard/capacity/capacity.html +7 -0
- package/src/serverGroup/configure/wizard/capacity/capacitySelector.component.html +13 -0
- package/src/serverGroup/configure/wizard/capacity/capacitySelector.component.js +17 -0
- package/src/serverGroup/configure/wizard/cloneServerGroup.controller.js +109 -0
- package/src/serverGroup/configure/wizard/instanceType/instanceType.html +29 -0
- package/src/serverGroup/configure/wizard/loadBalancers/loadBalancers.html +44 -0
- package/src/serverGroup/configure/wizard/network/networkSettings.html +15 -0
- package/src/serverGroup/configure/wizard/serverGroupWizard.html +40 -0
- package/src/serverGroup/configure/wizard/templateSelection/templateSelection.html +9 -0
- package/src/serverGroup/details/resize/resizeCapacity.component.html +36 -0
- package/src/serverGroup/details/resize/resizeCapacity.component.js +42 -0
- package/src/serverGroup/details/resize/resizeServerGroup.controller.js +62 -0
- package/src/serverGroup/details/resize/resizeServerGroup.html +33 -0
- package/src/serverGroup/details/rollback/rollbackServerGroup.controller.js +73 -0
- package/src/serverGroup/details/rollback/rollbackServerGroup.html +41 -0
- package/src/serverGroup/details/serverGroupDetails.controller.js +230 -0
- package/src/serverGroup/details/serverGroupDetails.html +94 -0
- package/src/serverGroup/serverGroup.transformer.js +29 -0
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
import { module } from 'angular';
|
|
4
|
+
import { size } from 'lodash';
|
|
5
|
+
|
|
6
|
+
import {
|
|
7
|
+
AccountService,
|
|
8
|
+
AuthenticationService,
|
|
9
|
+
BakeExecutionLabel,
|
|
10
|
+
BakeryReader,
|
|
11
|
+
PipelineTemplates,
|
|
12
|
+
Registry,
|
|
13
|
+
} from '@spinnaker/core';
|
|
14
|
+
|
|
15
|
+
import { ORACLE_PIPELINE_STAGES_BAKE_BAKEEXECUTIONDETAILS_CONTROLLER } from './bakeExecutionDetails.controller';
|
|
16
|
+
|
|
17
|
+
export const ORACLE_PIPELINE_STAGES_BAKE_OCIBAKESTAGE = 'spinnaker.oracle.pipeline.stage.bakeStage';
|
|
18
|
+
export const name = ORACLE_PIPELINE_STAGES_BAKE_OCIBAKESTAGE; // for backwards compatibility
|
|
19
|
+
module(ORACLE_PIPELINE_STAGES_BAKE_OCIBAKESTAGE, [ORACLE_PIPELINE_STAGES_BAKE_BAKEEXECUTIONDETAILS_CONTROLLER])
|
|
20
|
+
.config(function () {
|
|
21
|
+
Registry.pipeline.registerStage({
|
|
22
|
+
provides: 'bake',
|
|
23
|
+
cloudProvider: 'oracle',
|
|
24
|
+
label: 'Bake',
|
|
25
|
+
description: 'Bakes an image',
|
|
26
|
+
templateUrl: require('./bakeStage.html'),
|
|
27
|
+
executionDetailsUrl: require('./bakeExecutionDetails.html'),
|
|
28
|
+
executionLabelComponent: BakeExecutionLabel,
|
|
29
|
+
supportsCustomTimeout: true,
|
|
30
|
+
validators: [
|
|
31
|
+
{ type: 'requiredField', fieldName: 'accountName' },
|
|
32
|
+
{ type: 'requiredField', fieldName: 'region' },
|
|
33
|
+
{ type: 'requiredField', fieldName: 'baseOs' },
|
|
34
|
+
{ type: 'requiredField', fieldName: 'upgrade' },
|
|
35
|
+
{ type: 'requiredField', fieldName: 'cloudProviderType' },
|
|
36
|
+
{ type: 'requiredField', fieldName: 'amiName', fieldLabel: 'Image Name' },
|
|
37
|
+
],
|
|
38
|
+
restartable: true,
|
|
39
|
+
});
|
|
40
|
+
})
|
|
41
|
+
.controller('oracleBakeStageCtrl', [
|
|
42
|
+
'$scope',
|
|
43
|
+
'$q',
|
|
44
|
+
'$uibModal',
|
|
45
|
+
function ($scope, $q, $uibModal) {
|
|
46
|
+
const provider = 'oracle';
|
|
47
|
+
|
|
48
|
+
if (!$scope.stage.cloudProvider) {
|
|
49
|
+
$scope.stage.cloudProvider = provider;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
if (!$scope.stage) {
|
|
53
|
+
$scope.stage = {};
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
$scope.stage.extendedAttributes = $scope.stage.extendedAttributes || {};
|
|
57
|
+
|
|
58
|
+
if (!$scope.stage.user) {
|
|
59
|
+
$scope.stage.user = AuthenticationService.getAuthenticatedUser().name;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function initialize() {
|
|
63
|
+
$scope.viewState.providerSelected = true;
|
|
64
|
+
|
|
65
|
+
$q.all([BakeryReader.getBaseOsOptions(provider), AccountService.listAccounts(provider)]).then(
|
|
66
|
+
([baseOsOptions, accounts]) => {
|
|
67
|
+
if (baseOsOptions.baseImages.length > 0) {
|
|
68
|
+
$scope.baseOsOptions = baseOsOptions;
|
|
69
|
+
if (!$scope.stage.baseOs) {
|
|
70
|
+
$scope.stage.baseOs = $scope.baseOsOptions.baseImages[0].id;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
if (!$scope.stage.user) {
|
|
74
|
+
$scope.stage.user = AuthenticationService.getAuthenticatedUser().name;
|
|
75
|
+
}
|
|
76
|
+
if (!$scope.stage.upgrade) {
|
|
77
|
+
$scope.stage.upgrade = true;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
$scope.accounts = accounts;
|
|
81
|
+
|
|
82
|
+
if ($scope.stage.accountName) {
|
|
83
|
+
AccountService.getRegionsForAccount($scope.stage.accountName).then(function (regions) {
|
|
84
|
+
if (Array.isArray(regions) && regions.length != 0) {
|
|
85
|
+
// there is exactly one region per account
|
|
86
|
+
$scope.stage.region = regions[0].name;
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
$scope.viewState.loading = false;
|
|
92
|
+
},
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
this.getBaseOsDescription = function (baseOsOption) {
|
|
97
|
+
return baseOsOption.id + (baseOsOption.shortDescription ? ' (' + baseOsOption.shortDescription + ')' : '');
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
this.accountUpdated = function () {
|
|
101
|
+
AccountService.getRegionsForAccount($scope.stage.accountName).then(function (regions) {
|
|
102
|
+
if (Array.isArray(regions) && regions.length != 0) {
|
|
103
|
+
// there is exactly one region per account
|
|
104
|
+
$scope.stage.region = regions[0].name;
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
this.addExtendedAttribute = function () {
|
|
110
|
+
if (!$scope.stage.extendedAttributes) {
|
|
111
|
+
$scope.stage.extendedAttributes = {};
|
|
112
|
+
}
|
|
113
|
+
$uibModal
|
|
114
|
+
.open({
|
|
115
|
+
templateUrl: PipelineTemplates.addExtendedAttributes,
|
|
116
|
+
controller: 'bakeStageAddExtendedAttributeController',
|
|
117
|
+
controllerAs: 'addExtendedAttribute',
|
|
118
|
+
resolve: {
|
|
119
|
+
extendedAttribute: function () {
|
|
120
|
+
return {
|
|
121
|
+
key: '',
|
|
122
|
+
value: '',
|
|
123
|
+
};
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
})
|
|
127
|
+
.result.then(function (extendedAttribute) {
|
|
128
|
+
$scope.stage.extendedAttributes[extendedAttribute.key] = extendedAttribute.value;
|
|
129
|
+
})
|
|
130
|
+
.catch(() => {});
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
this.removeExtendedAttribute = function (key) {
|
|
134
|
+
delete $scope.stage.extendedAttributes[key];
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
this.showExtendedAttributes = function () {
|
|
138
|
+
return (
|
|
139
|
+
$scope.viewState.roscoMode || ($scope.stage.extendedAttributes && size($scope.stage.extendedAttributes) > 0)
|
|
140
|
+
);
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
$scope.$watch('stage.accountName', $scope.accountUpdated);
|
|
144
|
+
|
|
145
|
+
initialize();
|
|
146
|
+
},
|
|
147
|
+
]);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<div ng-controller="oracleDestroyAsgStageCtrl as destroyAsgStageCtrl" class="form-horizontal">
|
|
2
|
+
<div ng-if="!pipeline.strategy">
|
|
3
|
+
<account-region-cluster-selector application="application" component="stage" accounts="accounts">
|
|
4
|
+
</account-region-cluster-selector>
|
|
5
|
+
</div>
|
|
6
|
+
<stage-config-field label="Target">
|
|
7
|
+
<target-select model="stage" options="targets"></target-select>
|
|
8
|
+
</stage-config-field>
|
|
9
|
+
</div>
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
import { module } from 'angular';
|
|
4
|
+
|
|
5
|
+
import { AccountService, Registry, StageConstants } from '@spinnaker/core';
|
|
6
|
+
|
|
7
|
+
export const ORACLE_PIPELINE_STAGES_DESTROYASG_DESTROYASGSTAGE = 'spinnaker.oracle.pipeline.stage.destroyAsgStage';
|
|
8
|
+
export const name = ORACLE_PIPELINE_STAGES_DESTROYASG_DESTROYASGSTAGE; // for backwards compatibility
|
|
9
|
+
module(ORACLE_PIPELINE_STAGES_DESTROYASG_DESTROYASGSTAGE, [])
|
|
10
|
+
.config(function () {
|
|
11
|
+
Registry.pipeline.registerStage({
|
|
12
|
+
provides: 'destroyServerGroup',
|
|
13
|
+
cloudProvider: 'oracle',
|
|
14
|
+
templateUrl: require('./destroyAsgStage.html'),
|
|
15
|
+
executionStepLabelUrl: require('./destroyAsgStepLabel.html'),
|
|
16
|
+
validators: [
|
|
17
|
+
{
|
|
18
|
+
type: 'targetImpedance',
|
|
19
|
+
message:
|
|
20
|
+
'This pipeline will attempt to destroy a server group without deploying a new version into the same cluster.',
|
|
21
|
+
},
|
|
22
|
+
{ type: 'requiredField', fieldName: 'cluster' },
|
|
23
|
+
{ type: 'requiredField', fieldName: 'target' },
|
|
24
|
+
{ type: 'requiredField', fieldName: 'regions' },
|
|
25
|
+
{ type: 'requiredField', fieldName: 'credentials', fieldLabel: 'account' },
|
|
26
|
+
],
|
|
27
|
+
});
|
|
28
|
+
})
|
|
29
|
+
.controller('oracleDestroyAsgStageCtrl', [
|
|
30
|
+
'$scope',
|
|
31
|
+
function ($scope) {
|
|
32
|
+
const stage = $scope.stage;
|
|
33
|
+
const provider = 'oracle';
|
|
34
|
+
|
|
35
|
+
$scope.targets = StageConstants.TARGET_LIST;
|
|
36
|
+
stage.regions = stage.regions || [];
|
|
37
|
+
stage.cloudProvider = provider;
|
|
38
|
+
$scope.state = {
|
|
39
|
+
accounts: false,
|
|
40
|
+
regionsLoaded: false,
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
init();
|
|
44
|
+
|
|
45
|
+
function init() {
|
|
46
|
+
AccountService.listAccounts(provider).then((accounts) => {
|
|
47
|
+
$scope.accounts = accounts;
|
|
48
|
+
$scope.state.accounts = true;
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
if (!stage.credentials && $scope.application.defaultCredentials.oracle) {
|
|
52
|
+
stage.credentials = $scope.application.defaultCredentials.oracle;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
if (!stage.regions.length && $scope.application.defaultRegions.oracle) {
|
|
56
|
+
stage.regions.push($scope.application.defaultRegions.oracle);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
if (!stage.target) {
|
|
60
|
+
stage.target = $scope.targets[0].val;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<span class="task-label"> Destroy Server Group: {{step.context.serverGroupName}} ({{step.context.region}}) </span>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<div ng-controller="oracleDisableAsgStageCtrl as disableAsgStageCtrl" class="form-horizontal">
|
|
2
|
+
<div ng-if="!pipeline.strategy">
|
|
3
|
+
<account-region-cluster-selector application="application" component="stage" accounts="accounts">
|
|
4
|
+
</account-region-cluster-selector>
|
|
5
|
+
</div>
|
|
6
|
+
<stage-config-field label="Target">
|
|
7
|
+
<target-select model="stage" options="targets"></target-select>
|
|
8
|
+
</stage-config-field>
|
|
9
|
+
<stage-platform-health-override application="application" stage="stage" platform-health-type="'Oracle'">
|
|
10
|
+
</stage-platform-health-override>
|
|
11
|
+
</div>
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
import { module } from 'angular';
|
|
4
|
+
|
|
5
|
+
import { AccountService, Registry, StageConstants } from '@spinnaker/core';
|
|
6
|
+
|
|
7
|
+
export const ORACLE_PIPELINE_STAGES_DISABLEASG_DISABLEASGSTAGE = 'spinnaker.oracle.pipeline.stage.disableAsgStage';
|
|
8
|
+
export const name = ORACLE_PIPELINE_STAGES_DISABLEASG_DISABLEASGSTAGE; // for backwards compatibility
|
|
9
|
+
module(ORACLE_PIPELINE_STAGES_DISABLEASG_DISABLEASGSTAGE, [])
|
|
10
|
+
.config(function () {
|
|
11
|
+
Registry.pipeline.registerStage({
|
|
12
|
+
provides: 'disableServerGroup',
|
|
13
|
+
cloudProvider: 'oracle',
|
|
14
|
+
templateUrl: require('./disableAsgStage.html'),
|
|
15
|
+
executionStepLabelUrl: require('./disableAsgStepLabel.html'),
|
|
16
|
+
validators: [
|
|
17
|
+
{
|
|
18
|
+
type: 'targetImpedance',
|
|
19
|
+
message:
|
|
20
|
+
'This pipeline will attempt to disable a server group without deploying a new version into the same cluster.',
|
|
21
|
+
},
|
|
22
|
+
{ type: 'requiredField', fieldName: 'cluster' },
|
|
23
|
+
{ type: 'requiredField', fieldName: 'target' },
|
|
24
|
+
{ type: 'requiredField', fieldName: 'regions' },
|
|
25
|
+
{ type: 'requiredField', fieldName: 'credentials', fieldLabel: 'account' },
|
|
26
|
+
],
|
|
27
|
+
});
|
|
28
|
+
})
|
|
29
|
+
.controller('oracleDisableAsgStageCtrl', [
|
|
30
|
+
'$scope',
|
|
31
|
+
function ($scope) {
|
|
32
|
+
const stage = $scope.stage;
|
|
33
|
+
|
|
34
|
+
const provider = 'oracle';
|
|
35
|
+
|
|
36
|
+
$scope.state = {
|
|
37
|
+
accounts: false,
|
|
38
|
+
regionsLoaded: false,
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
AccountService.listAccounts(provider).then((accounts) => {
|
|
42
|
+
$scope.accounts = accounts;
|
|
43
|
+
$scope.state.accounts = true;
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
$scope.targets = StageConstants.TARGET_LIST;
|
|
47
|
+
|
|
48
|
+
stage.regions = stage.regions || [];
|
|
49
|
+
stage.cloudProvider = provider;
|
|
50
|
+
|
|
51
|
+
if (!stage.credentials && $scope.application.defaultCredentials.oracle) {
|
|
52
|
+
stage.credentials = $scope.application.defaultCredentials.oracle;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
if (!stage.regions.length && $scope.application.defaultRegions.gce) {
|
|
56
|
+
stage.regions.push($scope.application.defaultRegions.oracle);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
if (!stage.target) {
|
|
60
|
+
stage.target = $scope.targets[0].val;
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<span class="task-label"> Disable Server Group: {{step.context.serverGroupName}} ({{step.context.region}}) </span>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<div ng-controller="oracleFindAmiStageCtrl as findAmiCtrl" class="form-horizontal">
|
|
2
|
+
<account-region-cluster-selector application="application" component="stage" accounts="accounts">
|
|
3
|
+
</account-region-cluster-selector>
|
|
4
|
+
|
|
5
|
+
<stage-config-field label="Server Group Selection">
|
|
6
|
+
<ui-select ng-model="stage.selectionStrategy" class="form-control input-sm">
|
|
7
|
+
<ui-select-match placeholder="None">{{$select.selected.label}}</ui-select-match>
|
|
8
|
+
<ui-select-choices repeat="strategy.val as strategy in selectionStrategies | filter: $select.search">
|
|
9
|
+
<strong ng-bind-html="strategy.label | highlight: $select.search"></strong>
|
|
10
|
+
<div ng-bind-html="strategy.description"></div>
|
|
11
|
+
</ui-select-choices>
|
|
12
|
+
</ui-select>
|
|
13
|
+
</stage-config-field>
|
|
14
|
+
<stage-config-field label="Server Group Filters">
|
|
15
|
+
<label class="checkbox-inline">
|
|
16
|
+
<input type="checkbox" ng-model="stage.onlyEnabled" />
|
|
17
|
+
Only consider enabled Server Groups
|
|
18
|
+
</label>
|
|
19
|
+
</stage-config-field>
|
|
20
|
+
</div>
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
import * as angular from 'angular';
|
|
4
|
+
|
|
5
|
+
import { AccountService, Registry } from '@spinnaker/core';
|
|
6
|
+
|
|
7
|
+
export const ORACLE_PIPELINE_STAGES_FINDAMI_FINDAMISTAGE = 'spinnaker.oracle.pipeline.stage.findAmiStage';
|
|
8
|
+
export const name = ORACLE_PIPELINE_STAGES_FINDAMI_FINDAMISTAGE; // for backwards compatibility
|
|
9
|
+
angular
|
|
10
|
+
.module(ORACLE_PIPELINE_STAGES_FINDAMI_FINDAMISTAGE, [])
|
|
11
|
+
.config(function () {
|
|
12
|
+
Registry.pipeline.registerStage({
|
|
13
|
+
provides: 'findImage',
|
|
14
|
+
cloudProvider: 'oracle',
|
|
15
|
+
templateUrl: require('./findAmiStage.html'),
|
|
16
|
+
validators: [
|
|
17
|
+
{ type: 'requiredField', fieldName: 'cluster' },
|
|
18
|
+
{ type: 'requiredField', fieldName: 'selectionStrategy', fieldLabel: 'Server Group Selection' },
|
|
19
|
+
{ type: 'requiredField', fieldName: 'regions' },
|
|
20
|
+
{ type: 'requiredField', fieldName: 'credentials' },
|
|
21
|
+
],
|
|
22
|
+
});
|
|
23
|
+
})
|
|
24
|
+
.controller('oracleFindAmiStageCtrl', [
|
|
25
|
+
'$scope',
|
|
26
|
+
($scope) => {
|
|
27
|
+
const provider = 'oracle';
|
|
28
|
+
|
|
29
|
+
const stage = $scope.stage;
|
|
30
|
+
|
|
31
|
+
$scope.state = {
|
|
32
|
+
accounts: false,
|
|
33
|
+
regionsLoaded: false,
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
AccountService.listAccounts(provider).then((accounts) => {
|
|
37
|
+
$scope.accounts = accounts;
|
|
38
|
+
$scope.state.accounts = true;
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
$scope.selectionStrategies = [
|
|
42
|
+
{
|
|
43
|
+
label: 'Largest',
|
|
44
|
+
val: 'LARGEST',
|
|
45
|
+
description: 'When multiple server groups exist, prefer the server group with the most instances',
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
label: 'Newest',
|
|
49
|
+
val: 'NEWEST',
|
|
50
|
+
description: 'When multiple server groups exist, prefer the newest',
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
label: 'Oldest',
|
|
54
|
+
val: 'OLDEST',
|
|
55
|
+
description: 'When multiple server groups exist, prefer the oldest',
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
label: 'Fail',
|
|
59
|
+
val: 'FAIL',
|
|
60
|
+
description: 'When multiple server groups exist, fail',
|
|
61
|
+
},
|
|
62
|
+
];
|
|
63
|
+
|
|
64
|
+
stage.regions = stage.regions || [];
|
|
65
|
+
stage.cloudProvider = provider;
|
|
66
|
+
stage.selectionStrategy = stage.selectionStrategy || $scope.selectionStrategies[0].val;
|
|
67
|
+
|
|
68
|
+
if (angular.isUndefined(stage.onlyEnabled)) {
|
|
69
|
+
stage.onlyEnabled = true;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
if (!stage.credentials && $scope.application.defaultCredentials.oracle) {
|
|
73
|
+
stage.credentials = $scope.application.defaultCredentials.oracle;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
if (!stage.regions.length && $scope.application.defaultRegions.oracle) {
|
|
77
|
+
stage.regions.push($scope.application.defaultRegions.oracle);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
$scope.$watch('stage.credentials', $scope.accountUpdated);
|
|
81
|
+
},
|
|
82
|
+
]);
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<div ng-controller="BaseExecutionDetailsCtrl">
|
|
2
|
+
<execution-details-section-nav sections="configSections"></execution-details-section-nav>
|
|
3
|
+
<div class="step-section-details" ng-if="detailsSection === 'findImageConfig'">
|
|
4
|
+
<div class="row">
|
|
5
|
+
<div class="col-md-12">
|
|
6
|
+
<dl class="dl-narrow dl-horizontal">
|
|
7
|
+
<dt if-multiple-providers>Provider</dt>
|
|
8
|
+
<dd if-multiple-providers>Oracle</dd>
|
|
9
|
+
<dt>Regions</dt>
|
|
10
|
+
<dd>{{stage.context.regions.join(', ')}}</dd>
|
|
11
|
+
<dt>Name</dt>
|
|
12
|
+
<dd>{{stage.context.packageName}}</dd>
|
|
13
|
+
<dt>Tags</dt>
|
|
14
|
+
<dd>
|
|
15
|
+
<span ng-repeat="(key, val) in stage.context.tags"> {{key}}:{{val}}{{$last ? '' : ', '}} </span>
|
|
16
|
+
</dd>
|
|
17
|
+
</dl>
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
<stage-failure-message stage="stage" message="stage.failureMessage"></stage-failure-message>
|
|
21
|
+
|
|
22
|
+
<div class="row" ng-if="stage.context.amiDetails">
|
|
23
|
+
<div class="col-md-12">
|
|
24
|
+
<div class="well alert alert-info">
|
|
25
|
+
<h4>Results</h4>
|
|
26
|
+
<dl ng-repeat="image in stage.context.amiDetails" class="dl-narrow dl-horizontal">
|
|
27
|
+
<dt>Region</dt>
|
|
28
|
+
<dd>{{image.region}}</dd>
|
|
29
|
+
<dt>Image ID</dt>
|
|
30
|
+
<dd>{{image.imageId}}</dd>
|
|
31
|
+
<dt>Name</dt>
|
|
32
|
+
<dd>{{image.imageName}}</dd>
|
|
33
|
+
</dl>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
|
|
39
|
+
<div class="step-section-details" ng-if="detailsSection === 'taskStatus'">
|
|
40
|
+
<div class="row">
|
|
41
|
+
<execution-step-details item="stage"></execution-step-details>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<div ng-controller="oracleFindImageFromTagsStageCtrl as findImageFromTagsCtrl" class="form-horizontal">
|
|
2
|
+
<stage-config-field label="Regions">
|
|
3
|
+
<checklist items="regions" model="stage.regions" inline="true" include-select-all-button="true"></checklist>
|
|
4
|
+
</stage-config-field>
|
|
5
|
+
<stage-config-field label="Pattern">
|
|
6
|
+
<map-editor model="stage.packageName" allow-empty="true"></map-editor>
|
|
7
|
+
</stage-config-field>
|
|
8
|
+
<stage-config-field label="Tags">
|
|
9
|
+
<map-editor model="stage.tags" allow-empty="true"></map-editor>
|
|
10
|
+
</stage-config-field>
|
|
11
|
+
</div>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
import { module } from 'angular';
|
|
4
|
+
|
|
5
|
+
import { BakeryReader, Registry } from '@spinnaker/core';
|
|
6
|
+
|
|
7
|
+
export const ORACLE_PIPELINE_STAGES_FINDIMAGEFROMTAGS_ORACLEFINDIMAGEFROMTAGSSTAGE =
|
|
8
|
+
'spinnaker.oracle.pipeline.stage.findImageFromTagsStage';
|
|
9
|
+
export const name = ORACLE_PIPELINE_STAGES_FINDIMAGEFROMTAGS_ORACLEFINDIMAGEFROMTAGSSTAGE; // for backwards compatibility
|
|
10
|
+
module(ORACLE_PIPELINE_STAGES_FINDIMAGEFROMTAGS_ORACLEFINDIMAGEFROMTAGSSTAGE, [])
|
|
11
|
+
.config(function () {
|
|
12
|
+
Registry.pipeline.registerStage({
|
|
13
|
+
provides: 'findImageFromTags',
|
|
14
|
+
cloudProvider: 'oracle',
|
|
15
|
+
templateUrl: require('./findImageFromTagsStage.html'),
|
|
16
|
+
executionDetailsUrl: require('./findImageFromTagsExecutionDetails.html'),
|
|
17
|
+
executionConfigSections: ['findImageConfig', 'taskStatus'],
|
|
18
|
+
validators: [
|
|
19
|
+
{ type: 'requiredField', fieldName: 'regions' },
|
|
20
|
+
{ type: 'requiredField', fieldName: 'packageName' },
|
|
21
|
+
],
|
|
22
|
+
});
|
|
23
|
+
})
|
|
24
|
+
.controller('oracleFindImageFromTagsStageCtrl', [
|
|
25
|
+
'$scope',
|
|
26
|
+
function ($scope) {
|
|
27
|
+
$scope.stage.packageName = $scope.stage.packageName || '*';
|
|
28
|
+
$scope.stage.tags = $scope.stage.tags || {};
|
|
29
|
+
$scope.stage.regions = $scope.stage.regions || [];
|
|
30
|
+
$scope.stage.cloudProvider = $scope.stage.cloudProvider || 'oracle';
|
|
31
|
+
|
|
32
|
+
BakeryReader.getRegions('oracle').then(function (regions) {
|
|
33
|
+
$scope.regions = regions;
|
|
34
|
+
});
|
|
35
|
+
},
|
|
36
|
+
]);
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
<div ng-controller="oracleResizeAsgStageCtrl as resizeAsgStageCtrl">
|
|
2
|
+
<div ng-if="!pipeline.strategy">
|
|
3
|
+
<div ng-if="viewState.loading" class="horizontal center middle">
|
|
4
|
+
<loading-spinner size="'small'"></loading-spinner>
|
|
5
|
+
</div>
|
|
6
|
+
<div ng-if="!viewState.loading">
|
|
7
|
+
<account-region-cluster-selector application="application" component="stage" accounts="accounts">
|
|
8
|
+
</account-region-cluster-selector>
|
|
9
|
+
</div>
|
|
10
|
+
</div>
|
|
11
|
+
<stage-config-field label="Target">
|
|
12
|
+
<target-select model="stage" options="resizeTargets"></target-select>
|
|
13
|
+
</stage-config-field>
|
|
14
|
+
<stage-config-field label="Action" help-key="pipeline.config.resizeAsg.action">
|
|
15
|
+
<select
|
|
16
|
+
class="form-control input-sm"
|
|
17
|
+
required
|
|
18
|
+
ng-model="stage.action"
|
|
19
|
+
ng-change="resizeAsgStageCtrl.updateResizeType()"
|
|
20
|
+
ng-options="a.val as a.label for a in scaleActions"
|
|
21
|
+
>
|
|
22
|
+
<option>Select an action...</option>
|
|
23
|
+
</select>
|
|
24
|
+
</stage-config-field>
|
|
25
|
+
<div ng-if="stage.action !== 'scale_exact'">
|
|
26
|
+
<stage-config-field label="{{stage.action === 'scale_to_cluster' ? 'Additional Capacity' : 'Type'}}">
|
|
27
|
+
<select
|
|
28
|
+
class="form-control input-sm"
|
|
29
|
+
required
|
|
30
|
+
ng-model="stage.resizeType"
|
|
31
|
+
ng-change="resizeAsgStageCtrl.updateResizeType()"
|
|
32
|
+
ng-options="t.val as t.label for t in resizeTypes"
|
|
33
|
+
>
|
|
34
|
+
<option>Select an action...</option>
|
|
35
|
+
</select>
|
|
36
|
+
</stage-config-field>
|
|
37
|
+
<div class="form-group" ng-if="stage.resizeType === 'pct'">
|
|
38
|
+
<div class="col-md-9 col-md-offset-3">
|
|
39
|
+
<label class="col-md-2 sm-label-right" style="margin-left: 0; padding-left: 0">Resize Percentage</label>
|
|
40
|
+
<div class="col-md-2">
|
|
41
|
+
<input type="number" min="0" ng-model="stage.scalePct" class="form-control input-sm" />
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
<div class="col-md-9 col-md-offset-3">
|
|
45
|
+
<em class="subinput-note"
|
|
46
|
+
>This is the percentage by which the target server group's capacity will be increased</em
|
|
47
|
+
>
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
<div class="form-group" ng-if="stage.resizeType === 'incr'">
|
|
51
|
+
<div class="col-md-9 col-md-offset-3">
|
|
52
|
+
<label class="col-md-2 sm-label-right" style="margin-left: 0; padding-left: 0">Resize-by Amount</label>
|
|
53
|
+
<div class="col-md-2">
|
|
54
|
+
<input type="number" min="0" ng-model="stage.scaleNum" class="form-control input-sm" />
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
<div class="col-md-9 col-md-offset-3">
|
|
58
|
+
<em class="subinput-note"
|
|
59
|
+
>This is the exact amount by which the target server group's capacity will be increased</em
|
|
60
|
+
>
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
<div class="form-group" ng-if="stage.action === 'scale_exact'">
|
|
65
|
+
<div class="col-md-9 col-md-offset-3 small">
|
|
66
|
+
<div class="col-md-9">
|
|
67
|
+
<div class="col-md-3 col-md-offset-3">Min</div>
|
|
68
|
+
<div class="col-md-3">Max</div>
|
|
69
|
+
<div class="col-md-3">Desired</div>
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
<div class="col-md-9 col-md-offset-3">
|
|
73
|
+
<label class="col-md-2 sm-label-right small" style="margin-left: 0; padding-left: 0">Match Capacity</label>
|
|
74
|
+
<div class="col-md-9">
|
|
75
|
+
<div class="col-md-3">
|
|
76
|
+
<input type="number" ng-model="stage.capacity.min" class="form-control input-sm" />
|
|
77
|
+
</div>
|
|
78
|
+
<div class="col-md-3">
|
|
79
|
+
<input type="number" ng-model="stage.capacity.max" class="form-control input-sm" />
|
|
80
|
+
</div>
|
|
81
|
+
<div class="col-md-3">
|
|
82
|
+
<input type="number" ng-model="stage.capacity.desired" class="form-control input-sm" />
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
</div>
|
|
87
|
+
<stage-platform-health-override application="application" stage="stage" platform-health-type="'Oracle'">
|
|
88
|
+
</stage-platform-health-override>
|
|
89
|
+
</div>
|