@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,101 @@
|
|
|
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_RESIZEASG_RESIZEASGSTAGE = 'spinnaker.oracle.pipeline.stage.resizeAsgStage';
|
|
8
|
+
export const name = ORACLE_PIPELINE_STAGES_RESIZEASG_RESIZEASGSTAGE; // for backwards compatibility
|
|
9
|
+
module(ORACLE_PIPELINE_STAGES_RESIZEASG_RESIZEASGSTAGE, [])
|
|
10
|
+
.config(function () {
|
|
11
|
+
Registry.pipeline.registerStage({
|
|
12
|
+
provides: 'resizeServerGroup',
|
|
13
|
+
cloudProvider: 'oracle',
|
|
14
|
+
templateUrl: require('./resizeAsgStage.html'),
|
|
15
|
+
executionStepLabelUrl: require('./resizeAsgStepLabel.html'),
|
|
16
|
+
validators: [
|
|
17
|
+
{
|
|
18
|
+
type: 'targetImpedance',
|
|
19
|
+
message:
|
|
20
|
+
'This pipeline will attempt to resize 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: 'action' },
|
|
25
|
+
{ type: 'requiredField', fieldName: 'regions' },
|
|
26
|
+
{ type: 'requiredField', fieldName: 'credentials', fieldLabel: 'account' },
|
|
27
|
+
],
|
|
28
|
+
});
|
|
29
|
+
})
|
|
30
|
+
.controller('oracleResizeAsgStageCtrl', [
|
|
31
|
+
'$scope',
|
|
32
|
+
function ($scope) {
|
|
33
|
+
const ctrl = this;
|
|
34
|
+
|
|
35
|
+
const provider = 'oracle';
|
|
36
|
+
|
|
37
|
+
const stage = $scope.stage;
|
|
38
|
+
|
|
39
|
+
$scope.viewState = {
|
|
40
|
+
accountsLoaded: false,
|
|
41
|
+
regionsLoaded: false,
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
AccountService.listAccounts(provider).then(function (accounts) {
|
|
45
|
+
$scope.accounts = accounts;
|
|
46
|
+
$scope.viewState.accountsLoaded = true;
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
$scope.resizeTargets = StageConstants.TARGET_LIST;
|
|
50
|
+
|
|
51
|
+
$scope.scaleActions = [
|
|
52
|
+
{ label: 'Scale Up', val: 'scale_up' },
|
|
53
|
+
{ label: 'Scale Down', val: 'scale_down' },
|
|
54
|
+
{ label: 'Scale to Cluster Size', val: 'scale_to_cluster' },
|
|
55
|
+
{ label: 'Scale to Exact Size', val: 'scale_exact' },
|
|
56
|
+
];
|
|
57
|
+
|
|
58
|
+
$scope.resizeTypes = [
|
|
59
|
+
{ label: 'Percentage', val: 'pct' },
|
|
60
|
+
{ label: 'Incremental', val: 'incr' },
|
|
61
|
+
];
|
|
62
|
+
|
|
63
|
+
stage.capacity = stage.capacity || {};
|
|
64
|
+
stage.regions = stage.regions || [];
|
|
65
|
+
stage.target = stage.target || $scope.resizeTargets[0].val;
|
|
66
|
+
stage.action = stage.action || $scope.scaleActions[0].val;
|
|
67
|
+
stage.resizeType = stage.resizeType || $scope.resizeTypes[0].val;
|
|
68
|
+
|
|
69
|
+
if (!stage.action && stage.resizeType === 'exact') {
|
|
70
|
+
stage.action = 'scale_exact';
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
stage.cloudProvider = provider;
|
|
74
|
+
stage.cloudProviderType = provider;
|
|
75
|
+
|
|
76
|
+
if (!stage.credentials && $scope.application.defaultCredentials.gce) {
|
|
77
|
+
stage.credentials = $scope.application.defaultCredentials.gce;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
if (!stage.regions.length && $scope.application.defaultRegions.gce) {
|
|
81
|
+
stage.regions.push($scope.application.defaultRegions.gce);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
ctrl.updateResizeType = function () {
|
|
85
|
+
if (stage.action === 'scale_exact') {
|
|
86
|
+
stage.resizeType = 'exact';
|
|
87
|
+
delete stage.scalePct;
|
|
88
|
+
delete stage.scaleNum;
|
|
89
|
+
} else {
|
|
90
|
+
stage.capacity = {};
|
|
91
|
+
if (stage.resizeType === 'pct') {
|
|
92
|
+
delete stage.scaleNum;
|
|
93
|
+
} else {
|
|
94
|
+
stage.resizeType = 'incr';
|
|
95
|
+
delete stage.scalePct;
|
|
96
|
+
stage.scaleNum = stage.scaleNum || 0;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
},
|
|
101
|
+
]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<span class="task-label"> Resize Server Group: {{step.context.serverGroupName}} ({{step.context.region}}) </span>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<div ng-controller="oracleScaleDownClusterStageCtrl as scaleDownClusterStageCtrl" 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="Scale Down Options">
|
|
7
|
+
<div class="form-inline">
|
|
8
|
+
<p>
|
|
9
|
+
Keep the
|
|
10
|
+
<input
|
|
11
|
+
type="number"
|
|
12
|
+
min="0"
|
|
13
|
+
required
|
|
14
|
+
ng-model="stage.remainingFullSizeServerGroups"
|
|
15
|
+
class="form-control input-sm"
|
|
16
|
+
style="width: 50px"
|
|
17
|
+
/>
|
|
18
|
+
<select class="form-control input-sm" ng-model="stage.preferLargerOverNewer" style="width: 100px">
|
|
19
|
+
<option value="true">largest</option>
|
|
20
|
+
<option value="false">newest</option>
|
|
21
|
+
</select>
|
|
22
|
+
{{scaleDownClusterStageCtrl.pluralize('server group', stage.remainingFullSizeServerGroups)}} at current size.
|
|
23
|
+
</p>
|
|
24
|
+
<p>The remaining server groups will be scaled down to zero instances.</p>
|
|
25
|
+
</div>
|
|
26
|
+
</stage-config-field>
|
|
27
|
+
<div class="form-group">
|
|
28
|
+
<div class="col-md-offset-3 col-md-6 checkbox">
|
|
29
|
+
<label>
|
|
30
|
+
<input type="checkbox" ng-model="stage.allowScaleDownActive" />
|
|
31
|
+
Allow scale down of active server groups
|
|
32
|
+
</label>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
import { module } from 'angular';
|
|
4
|
+
|
|
5
|
+
import { AccountService, Registry } from '@spinnaker/core';
|
|
6
|
+
|
|
7
|
+
export const ORACLE_PIPELINE_STAGES_SCALEDOWNCLUSTER_SCALEDOWNCLUSTERSTAGE =
|
|
8
|
+
'spinnaker.oracle.pipeline.stage.scaleDownClusterStage';
|
|
9
|
+
export const name = ORACLE_PIPELINE_STAGES_SCALEDOWNCLUSTER_SCALEDOWNCLUSTERSTAGE; // for backwards compatibility
|
|
10
|
+
module(ORACLE_PIPELINE_STAGES_SCALEDOWNCLUSTER_SCALEDOWNCLUSTERSTAGE, [])
|
|
11
|
+
.config(function () {
|
|
12
|
+
Registry.pipeline.registerStage({
|
|
13
|
+
provides: 'scaleDownCluster',
|
|
14
|
+
cloudProvider: 'oracle',
|
|
15
|
+
templateUrl: require('./scaleDownClusterStage.html'),
|
|
16
|
+
validators: [
|
|
17
|
+
{ type: 'requiredField', fieldName: 'cluster' },
|
|
18
|
+
{
|
|
19
|
+
type: 'requiredField',
|
|
20
|
+
fieldName: 'remainingFullSizeServerGroups',
|
|
21
|
+
fieldLabel: 'Keep [X] full size Server Groups',
|
|
22
|
+
},
|
|
23
|
+
{ type: 'requiredField', fieldName: 'regions' },
|
|
24
|
+
{ type: 'requiredField', fieldName: 'credentials', fieldLabel: 'account' },
|
|
25
|
+
],
|
|
26
|
+
strategy: true,
|
|
27
|
+
});
|
|
28
|
+
})
|
|
29
|
+
.controller('oracleScaleDownClusterStageCtrl', [
|
|
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(function (accounts) {
|
|
42
|
+
$scope.accounts = accounts;
|
|
43
|
+
$scope.state.accounts = true;
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
stage.regions = stage.regions || [];
|
|
47
|
+
stage.cloudProvider = provider;
|
|
48
|
+
|
|
49
|
+
if (!stage.credentials && $scope.application.defaultCredentials.gce) {
|
|
50
|
+
stage.credentials = $scope.application.defaultCredentials.gce;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
if (!stage.regions.length && $scope.application.defaultRegions.gce) {
|
|
54
|
+
stage.regions.push($scope.application.defaultRegions.gce);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
if (stage.remainingFullSizeServerGroups === undefined) {
|
|
58
|
+
stage.remainingFullSizeServerGroups = 1;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
if (stage.allowScaleDownActive === undefined) {
|
|
62
|
+
stage.allowScaleDownActive = false;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
if (stage.preferLargerOverNewer === undefined) {
|
|
66
|
+
stage.preferLargerOverNewer = 'false';
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
this.pluralize = function (str, val) {
|
|
70
|
+
return val === 1 ? str : str + 's';
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
stage.preferLargerOverNewer = stage.preferLargerOverNewer.toString();
|
|
74
|
+
},
|
|
75
|
+
]);
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<div ng-controller="oracleShrinkClusterStageCtrl as shrinkClusterStageCtrl" 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="Shrink Options">
|
|
7
|
+
<div class="form-inline">
|
|
8
|
+
Shrink to
|
|
9
|
+
<input
|
|
10
|
+
type="number"
|
|
11
|
+
min="0"
|
|
12
|
+
required
|
|
13
|
+
ng-model="stage.shrinkToSize"
|
|
14
|
+
class="form-control input-sm"
|
|
15
|
+
style="width: 50px"
|
|
16
|
+
/>
|
|
17
|
+
{{shrinkClusterStageCtrl.pluralize('server group', stage.shrinkToSize)}}, keeping the
|
|
18
|
+
<select class="form-control input-sm" ng-model="stage.retainLargerOverNewer">
|
|
19
|
+
<option value="true">largest</option>
|
|
20
|
+
<option value="false">newest</option>
|
|
21
|
+
</select>
|
|
22
|
+
</div>
|
|
23
|
+
</stage-config-field>
|
|
24
|
+
<div class="form-group">
|
|
25
|
+
<div class="col-md-offset-3 col-md-6 checkbox">
|
|
26
|
+
<label>
|
|
27
|
+
<input type="checkbox" ng-model="stage.allowDeleteActive" />
|
|
28
|
+
Allow deletion of active server groups
|
|
29
|
+
</label>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
<stage-platform-health-override application="application" stage="stage" platform-health-type="'Google'">
|
|
33
|
+
</stage-platform-health-override>
|
|
34
|
+
</div>
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
import { module } from 'angular';
|
|
4
|
+
|
|
5
|
+
import { AccountService, Registry } from '@spinnaker/core';
|
|
6
|
+
|
|
7
|
+
export const ORACLE_PIPELINE_STAGES_SHRINKCLUSTER_SHRINKCLUSTERSTAGE =
|
|
8
|
+
'spinnaker.core.pipeline.stage.oracle.shrinkClusterStage';
|
|
9
|
+
export const name = ORACLE_PIPELINE_STAGES_SHRINKCLUSTER_SHRINKCLUSTERSTAGE; // for backwards compatibility
|
|
10
|
+
module(ORACLE_PIPELINE_STAGES_SHRINKCLUSTER_SHRINKCLUSTERSTAGE, [])
|
|
11
|
+
.config(function () {
|
|
12
|
+
Registry.pipeline.registerStage({
|
|
13
|
+
provides: 'shrinkCluster',
|
|
14
|
+
cloudProvider: 'oracle',
|
|
15
|
+
templateUrl: require('./shrinkClusterStage.html'),
|
|
16
|
+
validators: [
|
|
17
|
+
{ type: 'requiredField', fieldName: 'cluster' },
|
|
18
|
+
{ type: 'requiredField', fieldName: 'shrinkToSize', fieldLabel: 'shrink to [X] Server Groups' },
|
|
19
|
+
{ type: 'requiredField', fieldName: 'regions' },
|
|
20
|
+
{ type: 'requiredField', fieldName: 'credentials', fieldLabel: 'account' },
|
|
21
|
+
],
|
|
22
|
+
});
|
|
23
|
+
})
|
|
24
|
+
.controller('oracleShrinkClusterStageCtrl', [
|
|
25
|
+
'$scope',
|
|
26
|
+
function ($scope) {
|
|
27
|
+
const ctrl = this;
|
|
28
|
+
|
|
29
|
+
const stage = $scope.stage;
|
|
30
|
+
|
|
31
|
+
$scope.state = {
|
|
32
|
+
accounts: false,
|
|
33
|
+
regionsLoaded: false,
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
AccountService.listAccounts('oracle').then(function (accounts) {
|
|
37
|
+
$scope.accounts = accounts;
|
|
38
|
+
$scope.state.accounts = true;
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
stage.regions = stage.regions || [];
|
|
42
|
+
|
|
43
|
+
stage.cloudProvider = 'oracle';
|
|
44
|
+
|
|
45
|
+
if (!stage.credentials && $scope.application.defaultCredentials.oracle) {
|
|
46
|
+
stage.credentials = $scope.application.defaultCredentials.oracle;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
if (!stage.regions.length && $scope.application.defaultRegions.oracle) {
|
|
50
|
+
stage.regions.push($scope.application.defaultRegions.oracle);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
if (stage.shrinkToSize === undefined) {
|
|
54
|
+
stage.shrinkToSize = 1;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
if (stage.allowDeleteActive === undefined) {
|
|
58
|
+
stage.allowDeleteActive = false;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
ctrl.pluralize = function (str, val) {
|
|
62
|
+
return val === 1 ? str : str + 's';
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
if (stage.retainLargerOverNewer === undefined) {
|
|
66
|
+
stage.retainLargerOverNewer = 'false';
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
stage.retainLargerOverNewer = stage.retainLargerOverNewer.toString();
|
|
70
|
+
},
|
|
71
|
+
]);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
import { module } from 'angular';
|
|
4
|
+
|
|
5
|
+
import { FirewallLabels } from '@spinnaker/core';
|
|
6
|
+
|
|
7
|
+
export const ORACLE_SECURITYGROUP_CONFIGURE_CREATESECURITYGROUP_CONTROLLER =
|
|
8
|
+
'spinnaker.oracle.securityGroup.create.controller';
|
|
9
|
+
export const name = ORACLE_SECURITYGROUP_CONFIGURE_CREATESECURITYGROUP_CONTROLLER; // for backwards compatibility
|
|
10
|
+
module(ORACLE_SECURITYGROUP_CONFIGURE_CREATESECURITYGROUP_CONTROLLER, []).controller('oracleCreateSecurityGroupCtrl', [
|
|
11
|
+
'$scope',
|
|
12
|
+
'$uibModalInstance',
|
|
13
|
+
function ($scope, $uibModalInstance) {
|
|
14
|
+
this.cancel = () => {
|
|
15
|
+
$uibModalInstance.dismiss();
|
|
16
|
+
};
|
|
17
|
+
$scope.firewallLabel = FirewallLabels.get('Firewall');
|
|
18
|
+
},
|
|
19
|
+
]);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<ng-form role="form" name="form" novalidate>
|
|
2
|
+
<v2-modal-wizard heading="Create New Oracle {{firewallLabel}}" dismiss="$dismiss()"> </v2-modal-wizard>
|
|
3
|
+
<div class="container-fluid">
|
|
4
|
+
<div class="col-md-12 well">
|
|
5
|
+
<h4>Notice</h4>
|
|
6
|
+
<p>
|
|
7
|
+
We don't currently support the ability to create <firewall-label label="firewalls"></firewall-label> for Oracle
|
|
8
|
+
Cloud from Spinnaker.
|
|
9
|
+
</p>
|
|
10
|
+
<p>
|
|
11
|
+
You can use the Oracle Cloud console to create and manage Security Lists to provide a virtual
|
|
12
|
+
<firewall-label label="firewall"></firewall-label> for an instance.
|
|
13
|
+
</p>
|
|
14
|
+
</div>
|
|
15
|
+
</div>
|
|
16
|
+
<div class="modal-footer">
|
|
17
|
+
<button class="btn btn-default" ng-click="ctrl.cancel()">Cancel</button>
|
|
18
|
+
</div>
|
|
19
|
+
</ng-form>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
import { module } from 'angular';
|
|
4
|
+
|
|
5
|
+
export const ORACLE_SECURITYGROUP_SECURITYGROUP_READER = 'spinnaker.oracle.securityGroup.reader';
|
|
6
|
+
export const name = ORACLE_SECURITYGROUP_SECURITYGROUP_READER; // for backwards compatibility
|
|
7
|
+
module(ORACLE_SECURITYGROUP_SECURITYGROUP_READER, []).factory('oracleSecurityGroupReader', function () {
|
|
8
|
+
function resolveIndexedSecurityGroup(indexedSecurityGroups, container, securityGroupId) {
|
|
9
|
+
return indexedSecurityGroups[container.account][container.region][securityGroupId];
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
return {
|
|
13
|
+
resolveIndexedSecurityGroup: resolveIndexedSecurityGroup,
|
|
14
|
+
};
|
|
15
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
import { module } from 'angular';
|
|
4
|
+
import _ from 'lodash';
|
|
5
|
+
|
|
6
|
+
import { NetworkReader } from '@spinnaker/core';
|
|
7
|
+
|
|
8
|
+
export const ORACLE_SECURITYGROUP_SECURITYGROUP_TRANSFORMER = 'spinnaker.oracle.securityGroup.transformer';
|
|
9
|
+
export const name = ORACLE_SECURITYGROUP_SECURITYGROUP_TRANSFORMER; // for backwards compatibility
|
|
10
|
+
module(ORACLE_SECURITYGROUP_SECURITYGROUP_TRANSFORMER, []).factory('oracleSecurityGroupTransformer', function () {
|
|
11
|
+
const provider = 'oracle';
|
|
12
|
+
|
|
13
|
+
function normalizeSecurityGroup(securityGroup) {
|
|
14
|
+
return NetworkReader.listNetworksByProvider(provider).then(_.partial(addVcnNameToSecurityGroup, securityGroup));
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function addVcnNameToSecurityGroup(securityGroup, vcns) {
|
|
18
|
+
const matches = vcns.find((vcn) => vcn.id === securityGroup.network);
|
|
19
|
+
securityGroup.vpcName = matches.length ? matches[0].name : '';
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
return {
|
|
23
|
+
normalizeSecurityGroup: normalizeSecurityGroup,
|
|
24
|
+
};
|
|
25
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { module } from 'angular';
|
|
2
|
+
|
|
3
|
+
import { ORACLE_SERVERGROUP_CONFIGURE_SERVERGROUPCONFIGURATION_SERVICE } from './serverGroupConfiguration.service';
|
|
4
|
+
import { ORACLE_SERVERGROUP_CONFIGURE_WIZARD_BASICSETTINGS_BASICSETTINGS_CONTROLLER } from './wizard/basicSettings/basicSettings.controller';
|
|
5
|
+
import { ORACLE_SERVERGROUP_CONFIGURE_WIZARD_CAPACITY_CAPACITYSELECTOR_COMPONENT } from './wizard/capacity/capacitySelector.component';
|
|
6
|
+
|
|
7
|
+
('use strict');
|
|
8
|
+
|
|
9
|
+
export const ORACLE_SERVERGROUP_CONFIGURE_SERVERGROUP_CONFIGURE_MODULE = 'spinnaker.oracle.serverGroup.configure';
|
|
10
|
+
export const name = ORACLE_SERVERGROUP_CONFIGURE_SERVERGROUP_CONFIGURE_MODULE; // for backwards compatibility
|
|
11
|
+
module(ORACLE_SERVERGROUP_CONFIGURE_SERVERGROUP_CONFIGURE_MODULE, [
|
|
12
|
+
ORACLE_SERVERGROUP_CONFIGURE_WIZARD_BASICSETTINGS_BASICSETTINGS_CONTROLLER,
|
|
13
|
+
ORACLE_SERVERGROUP_CONFIGURE_WIZARD_CAPACITY_CAPACITYSELECTOR_COMPONENT,
|
|
14
|
+
ORACLE_SERVERGROUP_CONFIGURE_SERVERGROUPCONFIGURATION_SERVICE,
|
|
15
|
+
]);
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
import * as angular from 'angular';
|
|
4
|
+
import _ from 'lodash';
|
|
5
|
+
|
|
6
|
+
import { NameUtils } from '@spinnaker/core';
|
|
7
|
+
|
|
8
|
+
import { OracleProviderSettings } from '../../oracle.settings';
|
|
9
|
+
|
|
10
|
+
export const ORACLE_SERVERGROUP_CONFIGURE_SERVERGROUPCOMMANDBUILDER_SERVICE =
|
|
11
|
+
'spinnaker.oracle.serverGroupCommandBuilder.service';
|
|
12
|
+
export const name = ORACLE_SERVERGROUP_CONFIGURE_SERVERGROUPCOMMANDBUILDER_SERVICE; // for backwards compatibility
|
|
13
|
+
angular
|
|
14
|
+
.module(ORACLE_SERVERGROUP_CONFIGURE_SERVERGROUPCOMMANDBUILDER_SERVICE, [])
|
|
15
|
+
.factory('oracleServerGroupCommandBuilder', [
|
|
16
|
+
'$q',
|
|
17
|
+
function ($q) {
|
|
18
|
+
const oracle = 'oracle';
|
|
19
|
+
|
|
20
|
+
function buildNewServerGroupCommand(application, defaults) {
|
|
21
|
+
defaults = defaults || {};
|
|
22
|
+
|
|
23
|
+
const defaultAccount = defaults.account || OracleProviderSettings.defaults.account;
|
|
24
|
+
const defaultRegion = defaults.region || OracleProviderSettings.defaults.region;
|
|
25
|
+
|
|
26
|
+
const command = {
|
|
27
|
+
account: defaultAccount,
|
|
28
|
+
application: application.name,
|
|
29
|
+
capacity: {
|
|
30
|
+
desired: 1,
|
|
31
|
+
},
|
|
32
|
+
region: defaultRegion,
|
|
33
|
+
selectedProvider: oracle,
|
|
34
|
+
viewState: {
|
|
35
|
+
mode: defaults.mode || 'create',
|
|
36
|
+
disableStrategySelection: true,
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
return $q.when(command);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function buildServerGroupCommandFromExisting(application, serverGroup, mode) {
|
|
44
|
+
mode = mode || 'clone';
|
|
45
|
+
const serverGroupName = NameUtils.parseServerGroupName(serverGroup.name);
|
|
46
|
+
|
|
47
|
+
const command = {
|
|
48
|
+
account: serverGroup.account,
|
|
49
|
+
application: application.name,
|
|
50
|
+
shape: serverGroup.launchConfig.shape,
|
|
51
|
+
strategy: '',
|
|
52
|
+
stack: serverGroupName.stack,
|
|
53
|
+
vpcId: serverGroup.launchConfig.vpcId,
|
|
54
|
+
subnetId: serverGroup.launchConfig.subnetId,
|
|
55
|
+
region: serverGroup.region,
|
|
56
|
+
availabilityDomain: serverGroup.launchConfig.availabilityDomain,
|
|
57
|
+
sshAuthorizedKeys: serverGroup.launchConfig.sshAuthorizedKeys,
|
|
58
|
+
selectedProvider: oracle,
|
|
59
|
+
capacity: {
|
|
60
|
+
desired: serverGroup.capacity.desired,
|
|
61
|
+
},
|
|
62
|
+
viewState: {
|
|
63
|
+
mode: mode,
|
|
64
|
+
disableStrategySelection: true,
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
return $q.when(command);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function buildServerGroupCommandFromPipeline(application, originalCluster) {
|
|
71
|
+
const pipelineCluster = _.cloneDeep(originalCluster);
|
|
72
|
+
const commandDefaults = { account: pipelineCluster.account, region: pipelineCluster.region };
|
|
73
|
+
return buildNewServerGroupCommand(application, commandDefaults).then((command) => {
|
|
74
|
+
const viewState = {
|
|
75
|
+
disableImageSelection: true,
|
|
76
|
+
mode: 'editPipeline',
|
|
77
|
+
submitButtonLabel: 'Done',
|
|
78
|
+
templatingEnabled: true,
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
const viewOverrides = {
|
|
82
|
+
viewState: viewState,
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
pipelineCluster.strategy = pipelineCluster.strategy || '';
|
|
86
|
+
return angular.extend({}, command, pipelineCluster, viewOverrides);
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
function buildNewServerGroupCommandForPipeline() {
|
|
91
|
+
return $q.when({
|
|
92
|
+
viewState: {
|
|
93
|
+
requiresTemplateSelection: true,
|
|
94
|
+
},
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
return {
|
|
99
|
+
buildNewServerGroupCommand: buildNewServerGroupCommand,
|
|
100
|
+
buildServerGroupCommandFromExisting: buildServerGroupCommandFromExisting,
|
|
101
|
+
buildNewServerGroupCommandForPipeline: buildNewServerGroupCommandForPipeline,
|
|
102
|
+
buildServerGroupCommandFromPipeline: buildServerGroupCommandFromPipeline,
|
|
103
|
+
};
|
|
104
|
+
},
|
|
105
|
+
]);
|