diff --git a/ui/public/cloud-image-templates.json b/ui/public/cloud-image-templates.json new file mode 100644 index 000000000000..395477166f56 --- /dev/null +++ b/ui/public/cloud-image-templates.json @@ -0,0 +1,110 @@ +[ + { + "id": 1, + "name": "Ubuntu 24.04", + "arch": "x86_64", + "url": "https://download.cloudstack.org/templates/cloud-images/ubuntu/ubuntu-24.04-server-cloudimg-amd64.img" + }, + { + "id": 2, + "name": "Ubuntu 22.04", + "arch": "x86_64", + "url": "https://download.cloudstack.org/templates/cloud-images/ubuntu/ubuntu-22.04-server-cloudimg-amd64.img" + }, + { + "id": 3, + "name": "Ubuntu 20.04", + "arch": "x86_64", + "url": "https://download.cloudstack.org/templates/cloud-images/ubuntu/ubuntu-20.04-server-cloudimg-amd64.img" + }, + { + "id": 4, + "name": "Debian GNU/Linux 12 (64-bit)", + "arch": "x86_64", + "url": "https://download.cloudstack.org/templates/cloud-images/debian/debian-12-genericcloud-amd64.qcow2" + }, + { + "id": 5, + "name": "Rocky Linux 8", + "arch": "x86_64", + "url": "https://download.cloudstack.org/templates/cloud-images/rockylinux/Rocky-8-GenericCloud.latest.x86_64.qcow2" + }, + { + "id": 6, + "name": "Rocky Linux 9", + "arch": "x86_64", + "url": "https://download.cloudstack.org/templates/cloud-images/rockylinux/Rocky-9-GenericCloud.latest.x86_64.qcow2" + }, + { + "id": 7, + "name": "OpenSUSE 15.5", + "arch": "x86_64", + "url": "https://download.cloudstack.org/templates/cloud-images/opensuse/openSUSE-Leap-15.5-Minimal-VM.x86_64-Cloud.qcow2" + }, + { + "id": 8, + "name": "Ubuntu 24.04", + "arch": "aarch64", + "url": "https://download.cloudstack.org/templates/cloud-images/ubuntu/ubuntu-24.04-server-cloudimg-arm64.img" + }, + { + "id": 9, + "name": "Ubuntu 22.04", + "arch": "aarch64", + "url": "https://download.cloudstack.org/templates/cloud-images/ubuntu/ubuntu-22.04-server-cloudimg-arm64.img" + }, + { + "id": 10, + "name": "Ubuntu 20.04", + "arch": "aarch64", + "url": "https://download.cloudstack.org/templates/cloud-images/ubuntu/ubuntu-20.04-server-cloudimg-arm64.img" + }, + { + "id": 11, + "name": "Debian GNU/Linux 12 (64-bit)", + "arch": "aarch64", + "url": "https://download.cloudstack.org/templates/cloud-images/debian/debian-12-genericcloud-arm64.qcow2" + }, + { + "id": 12, + "name": "Rocky Linux 8", + "arch": "aarch64", + "url": "https://download.cloudstack.org/templates/cloud-images/rockylinux/Rocky-8-GenericCloud.latest.aarch64.qcow2" + }, + { + "id": 13, + "name": "Rocky Linux 9", + "arch": "aarch64", + "url": "https://download.cloudstack.org/templates/cloud-images/rockylinux/Rocky-9-GenericCloud.latest.aarch64.qcow2" + }, + { + "id": 14, + "name": "OpenSUSE 15.5", + "arch": "aarch64", + "url": "https://download.cloudstack.org/templates/cloud-images/opensuse/openSUSE-Leap-15.5-Minimal-VM.aarch64-Cloud.qcow2" + }, + { + "id": 15, + "name": "Oracle Linux 8", + "arch": "aarch64", + "url": "https://download.cloudstack.org/templates/cloud-images/oraclelinux/OL8U10_aarch64-kvm-b122.qcow2" + }, + { + "id": 16, + "name": "Oracle Linux 8", + "arch": "x86_64", + "url": "https://download.cloudstack.org/templates/cloud-images/oraclelinux/OL8U10_x86_64-kvm-b258.qcow2" + }, + { + "id": 17, + "name": "Oracle Linux 9", + "arch": "aarch64", + "url": "https://download.cloudstack.org/templates/cloud-images/oraclelinux/OL9U5_aarch64-kvm-b126.qcow2" + }, + { + "id": 18, + "name": "Oracle Linux 9", + "arch": "x86_64", + "url": "https://download.cloudstack.org/templates/cloud-images/oraclelinux/OL9U5_x86_64-kvm-b259.qcow2" + } +] diff --git a/ui/public/locales/en.json b/ui/public/locales/en.json index b3d5536e1f15..86069d8b9f3d 100644 --- a/ui/public/locales/en.json +++ b/ui/public/locales/en.json @@ -1010,6 +1010,7 @@ "label.filter.annotations.self": "Created by me", "label.filterby": "Filter by", "label.fingerprint": "FingerPrint", +"label.skip": "Skip", "label.finish": "Finish", "label.firewall": "Firewall", "label.firewall.policy": "Firewall Policy", @@ -3056,6 +3057,7 @@ "message.desc.importexportinstancewizard": "By choosing to manage an Instance, CloudStack takes over the orchestration of that Instance. Unmanaging an Instance removes CloudStack ability to manage it. In both cases, the Instance is left running and no changes are done to the VM on the hypervisor.

For KVM, managing a VM is an experimental feature.", "message.desc.importmigratefromvmwarewizard": "By selecting an existing or external VMware Datacenter and an instance to import, CloudStack migrates the selected instance from VMware to KVM on a conversion host using virt-v2v and imports it into a KVM cluster", "message.desc.primary.storage": "Each cluster must contain one or more primary storage servers. We will add the first one now. Primary storage contains the disk volumes for all the Instances running on hosts in the cluster. Use any standards-compliant protocol that is supported by the underlying hypervisor.", +"message.desc.register.template": "Hosted on download.cloudstack.org, these templates can be easily registered directly within CloudStack. Simply click Register Template for the templates you wish to use.", "message.desc.reset.ssh.key.pair": "Please specify a ssh key pair that you would like to add to this Instance.", "message.desc.secondary.storage": "Each zone must have at least one NFS or secondary storage server. We will add the first one now. Secondary storage stores Instance Templates, ISO images, and Instance disk volume Snapshots. This server must be available to all hosts in the zone.

Provide the IP address and exported path.", "message.desc.register.user.data": "Please fill in the following data to register a User data.", @@ -3759,6 +3761,7 @@ "message.warn.change.primary.storage.scope": "This feature is tested and supported for the following configurations:
KVM - NFS/Ceph - DefaultPrimary
VMware - NFS - DefaultPrimary
*There might be extra steps involved to make it work for other configurations.", "message.warn.filetype": "jpg, jpeg, png, bmp and svg are the only supported image formats.", "message.warn.importing.instance.without.nic": "WARNING: This Instance is being imported without NICs and many Network resources will not be available. Consider creating a NIC via vCenter before importing or as soon as the Instance is imported.", +"message.warn.select.template": "Please select a Template for Registration.", "message.warn.zone.mtu.update": "Please note that this limit won't affect pre-existing Network’s MTU settings", "message.webhook.deliveries.time.filter": "Webhook deliveries list can be filtered based on date-time. Select 'Custom' for specifying start and end date range.", "message.zone.creation.complete": "Zone creation complete.", diff --git a/ui/src/views/infra/zone/ZoneWizard.vue b/ui/src/views/infra/zone/ZoneWizard.vue index 9211aed92a50..5ca0792505c2 100644 --- a/ui/src/views/infra/zone/ZoneWizard.vue +++ b/ui/src/views/infra/zone/ZoneWizard.vue @@ -74,8 +74,10 @@ :prefillContent="zoneConfig" /> + + @@ -95,6 +106,7 @@ import ZoneWizardCoreZoneTypeStep from '@views/infra/zone/ZoneWizardCoreZoneType import ZoneWizardZoneDetailsStep from '@views/infra/zone/ZoneWizardZoneDetailsStep' import ZoneWizardNetworkSetupStep from '@views/infra/zone/ZoneWizardNetworkSetupStep' import ZoneWizardAddResources from '@views/infra/zone/ZoneWizardAddResources' +import ZoneWizardRegisterTemplate from '@views/infra/zone/ZoneWizardRegisterTemplate' import ZoneWizardLaunchZone from '@views/infra/zone/ZoneWizardLaunchZone' export default { @@ -103,6 +115,7 @@ export default { ZoneWizardCoreZoneTypeStep, ZoneWizardZoneDetailsStep, ZoneWizardNetworkSetupStep, + ZoneWizardRegisterTemplate, ZoneWizardAddResources, ZoneWizardLaunchZone }, @@ -114,6 +127,13 @@ export default { launchZone: false, launchData: {}, stepChild: '', + registerTemplateStep: { + name: 'registerTemplate', + title: 'label.register.template', + step: ['registerTemplateAction'], + description: this.$t('message.desc.register.template'), + hint: this.$t('message.hint.register.template') + }, coreZoneTypeStep: { name: 'coreType', title: 'label.core.zone.type', @@ -158,7 +178,10 @@ export default { hint: this.$t('message.launch.zone.hint') } ], - zoneConfig: {} + zoneConfig: {}, + returnedZoneId: null, + selectedArch: null, + selectedZoneSuperType: 'Core' } }, computed: { @@ -167,6 +190,9 @@ export default { if (this.zoneConfig.zoneSuperType !== 'Edge') { steps.splice(1, 0, this.coreZoneTypeStep) } + if (this.zoneConfig.hypervisor === 'KVM') { + steps.splice(steps.length, 0, this.registerTemplateStep) + } return steps } }, @@ -200,7 +226,15 @@ export default { data.zoneType !== this.zoneConfig.zoneType) { this.zoneConfig.physicalNetworks = null } - + if (data.zoneSuperType && data.zoneSuperType !== this.selectedZoneSuperType) { + this.selectedZoneSuperType = data.zoneSuperType + } + if (data.arch && data.arch !== this.selectedArch) { + this.selectedArch = data.arch + } + if (data.zoneReturned?.id) { + this.returnedZoneId = data.zoneReturned.id + } this.zoneConfig = { ...this.zoneConfig, ...data } }, onCloseAction () { diff --git a/ui/src/views/infra/zone/ZoneWizardLaunchZone.vue b/ui/src/views/infra/zone/ZoneWizardLaunchZone.vue index 571699a1f312..1f6653e920c5 100644 --- a/ui/src/views/infra/zone/ZoneWizardLaunchZone.vue +++ b/ui/src/views/infra/zone/ZoneWizardLaunchZone.vue @@ -1723,8 +1723,13 @@ export default { await this.$message.success('Success') this.loading = false this.steps = [] - this.$emit('closeAction') - this.$emit('refresh-data') + if (this.prefillContent.hypervisor === 'KVM') { + this.$emit('fieldsChanged', { zoneReturned: { id: this.stepData.zoneReturned.id } }) + this.$emit('nextPressed') + } else { + this.$emit('closeAction') + this.$emit('refresh-data') + } } catch (e) { this.loading = false await this.$notification.error({ diff --git a/ui/src/views/infra/zone/ZoneWizardRegisterTemplate.vue b/ui/src/views/infra/zone/ZoneWizardRegisterTemplate.vue new file mode 100644 index 000000000000..28fd4b950478 --- /dev/null +++ b/ui/src/views/infra/zone/ZoneWizardRegisterTemplate.vue @@ -0,0 +1,298 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + + + + + +