-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Extensions Framework & Orchestrate Anything #9752
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Extensions Framework & Orchestrate Anything #9752
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #9752 +/- ##
============================================
- Coverage 16.57% 3.84% -12.74%
============================================
Files 5743 427 -5316
Lines 510468 34346 -476122
Branches 62073 6181 -55892
============================================
- Hits 84616 1321 -83295
+ Misses 416390 32869 -383521
+ Partials 9462 156 -9306
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
@blueorangutan package |
@harikrishna-patnala a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
Packaging result [SF]: ✔️ el8 ✔️ el9 ✖️ debian ✔️ suse15. SL-JID 11530 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@harikrishna-patnala , I noticed I had started reviewing this and abandonned it. I was about half way anf will leave you the comments now. I will revisit after 4.20 is out.
@Parameter(name = ApiConstants.EXTERNAL_PROVISIONER, type = CommandType.STRING, description = "Name of the provisioner for the external host, this is mandatory input in case of hypervisor type external", since = "4.21.0") | ||
private String provisioner; | ||
|
||
@Parameter(name = ApiConstants.EXTERNAL_DETAILS, type = CommandType.MAP, description = "Details in key/value pairs using format externaldetails[i].keyname=keyvalue. Example: externaldetails[0].endpoint.url=urlvalue", since = "4.21.0") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are these externaldetails
and not just details
@@ -67,6 +70,9 @@ public class UpdateHostCmd extends BaseCmd { | |||
@Parameter(name = ApiConstants.ANNOTATION, type = CommandType.STRING, description = "Add an annotation to this host", since = "4.11", authorized = {RoleType.Admin}) | |||
private String annotation; | |||
|
|||
@Parameter(name = ApiConstants.EXTERNAL_DETAILS, type = CommandType.MAP, description = "Details in key/value pairs using format externaldetails[i].keyname=keyvalue. Example: externaldetails[0].endpoint.url=urlvalue", since = "4.21.0") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
details
instead of external...
@@ -251,6 +252,8 @@ public class CreateServiceOfferingCmd extends BaseCmd { | |||
since="4.20") | |||
private Boolean purgeResources; | |||
|
|||
@Parameter(name = ApiConstants.EXTERNAL_DETAILS, type = CommandType.MAP, description = "Details in key/value pairs using format externaldetails[i].keyname=keyvalue. Example: externaldetails[0].endpoint.url=urlvalue", since = "4.21.0") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need those extra external-details
? aren't these just details
?
@@ -359,9 +362,21 @@ public Map<String, String> getDetails() { | |||
} | |||
} | |||
} | |||
|
|||
detailsMap.putAll(getExternalDetails()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see? these are just details
.
public class RebootCommand extends Command { | ||
String vmName; | ||
VirtualMachineTO vm; | ||
private Map<String, String> _details; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
private Map<String, String> _details; | |
private Map<String, String> details; |
} | ||
|
||
public void setDetails(Map<String, String> details) { | ||
_details = details; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_details = details; | |
this.details = details; |
} | ||
|
||
public Map<String, String> getDetails() { | ||
return _details; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return _details; | |
return details; |
} else if (template.getFormat() == ImageFormat.BAREMETAL) { | ||
logger.debug("%s has format [{}]. Skipping ROOT volume [{}] allocation.", template.toString(), ImageFormat.BAREMETAL, rootVolumeName); | ||
} else if (template.getFormat() == ImageFormat.BAREMETAL || template.getFormat() == ImageFormat.EXTERNAL) { | ||
logger.debug(String.format("%s has format [%s]. Skipping ROOT volume [%s] allocation.", template.toString(), template.getFormat(), rootVolumeName)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logger.debug(String.format("%s has format [%s]. Skipping ROOT volume [%s] allocation.", template.toString(), template.getFormat(), rootVolumeName)); | |
logger.debug("{} has format [{}]. Skipping ROOT volume [{}] allocation.", template.toString(), template.getFormat(), rootVolumeName); |
if (HypervisorType.External.equals(vm.getHypervisorType())) { | ||
Long hostID = profile.getHostId(); | ||
if (hostID != null) { | ||
HostVO host = _hostDao.findById(hostID); | ||
HashMap<String, String> accessDetails = new HashMap<>(); | ||
loadExternalHostAccessDetails(host, accessDetails); | ||
loadExternalInstanceDetails(vm.getId(), accessDetails); | ||
|
||
stpCmd.setDetails(accessDetails); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can this be a method too?
if (HypervisorType.External.equals(vm.getHypervisorType())) { | ||
Long hostID = profile.getHostId(); | ||
HostVO host = _hostDao.findById(hostID); | ||
|
||
HashMap<String, String> accessDetails = new HashMap<>(); | ||
loadExternalHostAccessDetails(host, accessDetails); | ||
loadExternalInstanceDetails(vm.getId(), accessDetails); | ||
|
||
stop.setDetails(accessDetails); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
another method? maybe even unify with the one at line 1910-1920.
@blueorangutan package |
@rohityadavcloud a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 11592 |
engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java
Outdated
Show resolved
Hide resolved
engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java
Outdated
Show resolved
Hide resolved
engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java
Outdated
Show resolved
Hide resolved
...hestration/src/main/java/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java
Outdated
Show resolved
Hide resolved
...hestration/src/main/java/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java
Outdated
Show resolved
Hide resolved
server/src/main/java/com/cloud/network/guru/GuestNetworkGuru.java
Outdated
Show resolved
Hide resolved
server/src/main/java/com/cloud/network/router/NetworkHelperImpl.java
Outdated
Show resolved
Hide resolved
@DaanHoogland I see many other custom detail parameters in a few other APIs, such as vnfdetails, domaindetails, accountdetails, and a few more. In this case, I would like to keep this as a separate parameter because these are the only details that are important if the hypervisor type is External. The other parameters are just meant to fit into CloudStack's workflow. The core purpose of this feature is to send these external details to the external provisioner. |
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
Signed-off-by: Abhishek Kumar <[email protected]>
For apache/cloudstack#9752 Signed-off-by: Abhishek Kumar <[email protected]>
Signed-off-by: Abhishek Kumar <[email protected]>
Signed-off-by: Abhishek Kumar <[email protected]>
Signed-off-by: Abhishek Kumar <[email protected]>
) | ||
VALUES ( | ||
UUID(), ext_name, ext_desc, 'Orchestrator', | ||
entry_point, 1, 0, 'Enabled', NOW(), NULL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@abh1sar should this be Disabled
by default?
generate_random_mac() { | ||
hexchars="0123456789ABCDEF" | ||
echo "52:54:00:$(for i in {1..3}; do echo -n ${hexchars:$(( RANDOM % 16 )):1}${hexchars:$(( RANDOM % 16 )):1}; [[ $i -lt 3 ]] && echo -n ':'; done)" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@abh1sar we don't seem to be using prepare for proxmox, should we remove this?
parse_json "$1" || exit 1 | ||
|
||
local mac_address | ||
mac_address=$(generate_random_mac) | ||
|
||
local response | ||
response=$(jq -n --arg mac "$mac_address" \ | ||
'{status: "success", mac_address: $mac}') | ||
|
||
echo "$response" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since we are not using prepare maybe better to send empty response or remove prepare handling? @abh1sar
Signed-off-by: Abhishek Kumar <[email protected]>
@blueorangutan package |
@shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 13846 |
@blueorangutan test |
@shwstppr a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
[SF] Trillian Build Failed (tid-13575) |
@blueorangutan test |
@shwstppr a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
Signed-off-by: Abhishek Kumar <[email protected]>
Signed-off-by: Abhishek Kumar <[email protected]>
to TemplateAdapterBase Signed-off-by: Abhishek Kumar <[email protected]>
[SF] Trillian test result (tid-13576)
|
Description
Apache CloudStack already supports a wide range of hypervisors, including KVM, VMware, and Xen, to provision and manage instances. We are now introducing a new feature or framework that allows seamless integration of "external" provisioning systems into CloudStack. For example, this enables the integration of any baremetal provisioning system, platforms like Proxmox, or even the addition of new hypervisor support through the use of simple scripts.
A design document is made with more details at https://cwiki.apache.org/confluence/display/CLOUDSTACK/External+Deployment+Integration+in+CloudStack
Documentation PR: apache/cloudstack-documentation#523
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale