94 Commits

Author SHA1 Message Date
Abhishek Kumar
b29ec2bf12 Merge remote-tracking branch 'apache/4.19' 2024-03-01 17:40:58 +05:30
Abhishek Kumar
9fd410be36 Merge remote-tracking branch 'apache/4.18' into 4.19 2024-03-01 17:34:27 +05:30
Vishesh
bbe56ae283
Update actions/setup-java from v3 to v4 (#8709) 2024-02-27 11:46:20 +05:30
Abhishek Kumar
592038a304
api,server,ui: granular resource limit management (#8362)
Feature spec: https://cwiki.apache.org/confluence/display/CLOUDSTACK/Granular+Resource+Limit+Management

Introduces the concept of tagged resource limits for granular resource limit management. Limits can be enforced on accounts and domains for the deployment of entities for a tagged resource. Current tagged resource limits can be used for the following resource types,

Host limits
- user_vm
- cpu
- memory

Storage limits
- volume
- primary_storage

Following global settings can used to specify tags for which limit needs to be enforced,

Host: `resource.limit.host.tags`
Storage: `resource.limit.storage.tags`

Option for specifying tagged resource limits and viewing tagged resource usage are made available in the UI.

Enhances the use of templatetag for VM deployment and template creation

Adds option to list service/compute offerings that can be used with a given template. A new parameter named templateid has been added.

Adds option to list disk offering with suitability flag for a virtual machine. A new parameter named virtualmachineid has been added to the listDiskOfferings API which when passed returns suitableforvirtualmachine param in the response.
2024-02-19 14:17:34 +05:30
Rohit Yadav
affead1160 Merge remote-tracking branch 'origin/4.19' 2024-02-07 14:19:58 +05:30
Vishesh
df412a99d2
test: Add e2e tests for listing resources (#8410)
* Use dualzones for ci github actions

* Update advdualzone.cfg to be similar to advanced.cfg & fixup test_metrics_api.py

* Fixup e2e tests for running with multiple zones

* Add e2e tests for listing of accounts, disk_offerings, domains, hosts, service_offerings, storage_pools, volumes

* Fixup

* another fixup

* Add test for listing volumes with tags filter

* Add check for existing volumes in test_list_volumes

* Wait for volumes to be deleted on cleanup

* Filter out volumes in Destroy state before checking the count of volumes
2024-02-07 08:25:55 +01:00
John Bampton
48410d0d67
Bump actions/setup-python to v5 (#8419) 2024-02-05 14:28:55 +05:30
Abhishek Kumar
ab808995ff
Revert "Add e2e tests for listing resources (#8281)" (#8396)
This reverts commit 1411da1a22bc6aa26634f3038475e3d5fbbcd6bb.
2023-12-21 20:56:40 +05:30
Vishesh
1411da1a22
Add e2e tests for listing resources (#8281)
This PR adds e2e tests for listing resources
2023-12-20 11:54:39 +05:30
kishankavala
5651eab49c
ObjectStore Framework with MinIO and Simulator plugins (#7752)
This PR adds Object Storage feature to CloudStack.

FS: https://cwiki.apache.org/confluence/display/CLOUDSTACK/%5BDRAFT%5D+CloudStack+Object+Store
2023-12-01 17:51:00 +05:30
Bryan Lima
cb62ce6767
Global ACL for VPCs (#7150) 2023-11-30 14:51:43 +01:00
StepSecurity Bot
f0b757e91e
[StepSecurity] ci: Harden GitHub Actions (#8209)
Signed-off-by: StepSecurity Bot <bot@stepsecurity.io>
2023-11-27 12:07:19 +05:30
John Bampton
a7c6599ae2
Bump the actions/checkout action to v4 (#8133)
https://github.com/actions/checkout
2023-11-03 18:10:49 +05:30
Vishesh
ea90848429
Feature: Add support for DRS in a Cluster (#7723)
This pull request (PR) implements a Distributed Resource Scheduler (DRS) for a CloudStack cluster. The primary objective of this feature is to enable automatic resource optimization and workload balancing within the cluster by live migrating the VMs as per configuration.
Administrators can also execute DRS manually for a cluster, using the UI or the API.
Adds support for two algorithms - condensed & balanced. Algorithms are pluggable allowing ACS Administrators to have customized control over scheduling.

Implementation
There are three top level components:

    Scheduler
    A timer task which:

    Generate DRS plan for clusters
    Process DRS plan
    Remove old DRS plan records

    DRS Execution
    We go through each VM in the cluster and use the specified algorithm to check if DRS is required and to calculate cost, benefit & improvement of migrating that VM to another host in the cluster. On the basis of cost, benefit & improvement, the best migration is selected for the current iteration and the VM is migrated. The maximum number of iterations (live migrations) possible on the cluster is defined by drs.iterations which is defined as a percentage (as a value between 0 and 1) of total number of workloads.

    Algorithm
    Every algorithms implements two methods:
        needsDrs - to check if drs is required for cluster
        getMetrics - to calculate cost, benefit & improvement of a migrating a VM to another host.

Algorithms

    Condensed - Packs all the VMs on minimum number of hosts in the cluster.
    Balanced - Distributes the VMs evenly across hosts in the cluster.
    Algorithms use drs.level to decide the amount of imbalance to allow in the cluster.

APIs Added

listClusterDrsPlan

    id - ID of the DRS plan to list
    clusterid - to list plans for a cluster id

generateClusterDrsPlan

    id - cluster id
    iterations - The maximum number of iterations in a DRS job defined as a percentage (as a value between 0 and 1) of total number of workloads. Defaults to value of cluster's drs.iterations setting.

executeClusterDrsPlan

    id - ID of the cluster for which DRS plan is to be executed.
    migrateto - This parameter specifies the mapping between a vm and a host to migrate that VM. Format of this parameter: migrateto[vm-index].vm=<uuid>&migrateto[vm-index].host=<uuid>.

Config Keys Added

    ClusterDrsPlanExpireInterval
    Key drs.plan.expire.interval
    Scope Global
    Default Value 30 days
    Description The interval in days after which old DRS records will be cleaned up.

    ClusterDrsEnabled
    Key drs.automatic.enable
    Scope Cluster
    Default Value false
    Description Enable/disable automatic DRS on a cluster.

    ClusterDrsInterval
    Key drs.automatic.interval
    Scope Cluster
    Default Value 60 minutes
    Description The interval in minutes after which a periodic background thread will schedule DRS for a cluster.

    ClusterDrsIterations
    Key drs.max.migrations
    Scope Cluster
    Default Value 50
    Description Maximum number of live migrations in a DRS execution.

    ClusterDrsAlgorithm
    Key drs.algorithm
    Scope Cluster
    Default Value condensed
    Description DRS algorithm to execute on the cluster. This PR implements two algorithms - balanced & condensed.

    ClusterDrsLevel
    Key drs.imbalance
    Scope Cluster
    Default Value 0.5
    Description Percentage (as a value between 0.0 and 1.0) of imbalance allowed in the cluster. 1.0 means no imbalance
    is allowed and 0.0 means imbalance is allowed.

    ClusterDrsMetric
    Key drs.imbalance.metric
    Scope Cluster
    Default Value memory
    Description The cluster imbalance metric to use when checking the drs.imbalance.threshold. Possible values are memory and cpu.
2023-10-26 11:48:18 +05:30
Abhishek Kumar
b4c7705d4b Merge remote-tracking branch 'apache/4.18' into main 2023-10-10 17:30:37 +05:30
Wei Zhou
864a195868
.github: run Sonar Check only on PRs from apache/cloudstack branches (#8058)
This PR fixes #8050
2023-10-10 17:28:58 +05:30
John Bampton
e0ab2a4bd4
Enable four more flake8 rules (#7811) 2023-10-10 08:32:55 +02:00
Vishesh
3ec3007635
Generate coverage for Simulator based integration tests & ui tests in github actions (#7784)
* Generate coverage for Simulator based integration tests

* Add flag for unit tests

* Add coverage for uitests
2023-09-11 14:14:12 +05:30
John Bampton
b0ae701ca4
Remove Super-Linter action and move flake8 to pre-commit (#7861) 2023-08-17 09:37:10 +02:00
Vishesh
b5eebc4347
Fix codecov github action (#7747) 2023-07-18 13:27:01 +03:00
Vishesh
c956d329f5
Fix test_vm_schedule's intermittent failures (#7726)
* Fix test_vm_schedule's intermittent failures

* Add smoke/test_vm_schedule to CI
2023-07-07 22:51:38 +05:30
dahn
ae10263b3b
Possibility to choose the source NAT IP address on a isolated network or VPC (#6442)
Co-authored-by: NuxRo <nux@li.nux.ro>
Co-authored-by: Daniel Augusto Veronezi Salvador <38945620+GutoVeronezi@users.noreply.github.com>
2023-06-09 14:51:53 +02:00
Abhishek Kumar
c00a1ba532 Merge remote-tracking branch 'apache/4.18' into main 2023-06-08 15:34:46 +05:30
Vishesh
811b6293af
.github: Use parallel builds for github actions (#7592) 2023-06-07 13:17:29 +02:00
John Bampton
8d6241fb1b
Enable two more flake8 rules (#7552) 2023-05-31 10:49:53 +02:00
Rohit Yadav
2f309b573b Merge remote-tracking branch 'origin/4.18' 2023-05-12 12:58:49 +05:30
Abhishek Kumar
44024a8a8b
github-actions: fix ui build workflow (#7522)
package-lock.json is not removed.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2023-05-12 12:54:23 +05:30
Rohit Yadav
0af56179a5 Merge remote-tracking branch 'origin/4.18' 2023-05-10 14:08:14 +05:30
Rohit Yadav
0e4a5a1fa4 .github: restrict sonar and CI actions to only apache/cloudstack
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2023-05-10 14:07:29 +05:30
Daan Hoogland
45928d2d9f vim-oops 2023-05-09 20:15:03 +02:00
Daan Hoogland
66cbe0a051 replace pull_request_target with pull_request 2023-05-09 18:40:20 +02:00
Daan Hoogland
216c565308 replace pull_request_target with pull_request 2023-05-09 18:39:10 +02:00
Daan Hoogland
35862d4532 no write for external forks 2023-05-09 17:35:12 +02:00
Alex
80c999cc81
GitHub Workflows security hardening (#6762)
Signed-off-by: Alex <aleksandrosansan@gmail.com>
2023-04-25 16:35:39 +02:00
Daan Hoogland
da58a20cc2 repair vi typo 2023-02-27 09:37:32 +01:00
Daan Hoogland
2fc443e909 bash evaluation within quotes 2023-02-26 21:51:56 +01:00
Daan Hoogland
3ee32244d8 bash evaluation as opposed to gha. 2023-02-26 19:32:46 +01:00
Wei Zhou
0457cc559e .github: allow only read permission in sonar-check.yml 2023-02-23 13:47:48 +01:00
Wei Zhou
bc5dbe95e9
.github: use tag name as docker image name for new tags (#7233) 2023-02-20 12:42:57 +01:00
Wei Zhou
ea18b86684
.github: disable Sonar check on forks as it requires crendential (#7199) 2023-02-13 11:58:05 +01:00
John Bampton
dcf01f7bef
.github: Skip Coverage Check when forks are updated (#7177) 2023-02-13 09:48:31 +01:00
Harikrishna
a3feccf70c
User two factor authentication (#6924)
Co-authored-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2023-02-13 09:14:17 +01:00
Wei Zhou
e32016d4a1
.github: set docker repository to apache (#7176)
Now the images are pushed to
https://hub.docker.com/r/asfjenkins/cloudstack-simulator/tags
2023-02-07 13:46:22 +01:00
Wei Zhou
b93608eada
Github Action: Build docker image for cloudstack-simulator (#7122) 2023-02-07 10:37:44 +01:00
dahn
6f6cec5f56
.github: run all gha on ubuntu latest (#7091)
* run all gha on ubuntu latest

* replace latest with 22.04
2023-01-18 10:35:56 +05:30
John Bampton
c0a32d00b7
Use Super-Linter Slim Image (#6610)
Co-authored-by: dahn <daan@onecht.net>
2023-01-12 13:41:28 +01:00
John Bampton
00426ede46
Add pre-commit workflow with 3 Git hooks (#6273)
Co-authored-by: dahn <daan@onecht.net>
2023-01-11 12:25:31 +01:00
Rohit Yadav
c2b75f4c81 README: revert project logo and update README
Happy New Year - this reverts project logo and updates README and the
names of Github Actions badges used on README.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2023-01-05 17:59:08 +05:30
Rohit Yadav
9a18ea28dd .github: use ubuntu:22.04 for Sonar jacoco coverage checks
Apologies to commit this to main directly, this is because the
pull_request_target requires that Github Actions yaml changes are on the
source repo main branch.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2022-12-30 15:00:17 +05:30
Wei Zhou
dc40ea130f
UI: fix ui test errors (#7030) 2022-12-29 09:08:54 +01:00