mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-11-04 00:02:37 +01:00 
			
		
		
		
	* Support for live patching systemVMs and deprecating systemVM.iso. Includes: - fix systemVM template version - Include agent.zip, cloud-scripts.tgz to the commons package - Support for live-patching systemVMs - CPVM, SSVM, Routers - Fix Unit test - Remove systemvm.iso dependency * The following commit: - refactors logic added to support SystemVM deployment on KVM - Adds support to copy specific files (required for patching) to the hosts on Xenserver - Modifies vmops method - createFileInDomr to take cleanup param - Adds configuratble sleep param to CitrixResourceBase::connect() used to verify if telnet to specifc port is possible (if sleep is 0, then default to _sleep = 10000ms) - Adds Command/Answer for patch systemVMs on XenServer/Xcp * - Support to patch SystemVMs - VMWare - Remove attaching systemvm.iso to systemVMs - Modify / Refactor VMware start command to copy patch related files to the systemvms - cleanup * Commit comprises of: - remove docker from systemvm template - use containerd as container runtime - update create-k8s-binaries script to use ctr for all docker operations - Update userdata sent to the k8s nodes - update cksnode script, run during patching of the cks/k8s nodes * Add ssh to k8s nodes details in the Access tab on the UI * test * Refactor ca/cert patching logic * Commit comprises of the following changes: - Use restart network/VPC API to patch routers - use livePatch API support patching of only cpvm/ssvm - add timeout to the keystore setup/import script * remove all references of systemvm.iso * Fix keystore-cert-import invocation + refactor cert timeout in CP/SS VMs * fix script timeout * Refactor cert patching for systemVMs + update keystore-cert-import script + patch-sysvms script + remove patchSysvmCommand from networkelementcommand * remove commented code + change core user to cloud for cks nodes * Update ownership of ssh directory * NEED TO DISCUSS - add on the fly template conversion as an ExecStartPre action (systemd) * Add UI changes + move changes from patch file to runcmd * test: validate performance for template modification during seeding * create vms folder in cloudstack-commons directory - debian rules * remove logic for on the fly template convert + update k8s test * fix syntax issue - causing issue with shared network tests * Code cleanup * refactor patching logic - certs * move logic of fixing rootdiskcontroller from upgrade to kubernetes service * add livepatch option to restart network & vpc * smooth upgrade of cks clusters * Support for live patching systemVMs and deprecating systemVM.iso. Includes: - fix systemVM template version - Include agent.zip, cloud-scripts.tgz to the commons package - Support for live-patching systemVMs - CPVM, SSVM, Routers - Fix Unit test - Remove systemvm.iso dependency * The following commit: - refactors logic added to support SystemVM deployment on KVM - Adds support to copy specific files (required for patching) to the hosts on Xenserver - Modifies vmops method - createFileInDomr to take cleanup param - Adds configuratble sleep param to CitrixResourceBase::connect() used to verify if telnet to specifc port is possible (if sleep is 0, then default to _sleep = 10000ms) - Adds Command/Answer for patch systemVMs on XenServer/Xcp * - Support to patch SystemVMs - VMWare - Remove attaching systemvm.iso to systemVMs - Modify / Refactor VMware start command to copy patch related files to the systemvms - cleanup * Commit comprises of: - remove docker from systemvm template - use containerd as container runtime - update create-k8s-binaries script to use ctr for all docker operations - Update userdata sent to the k8s nodes - update cksnode script, run during patching of the cks/k8s nodes * Add ssh to k8s nodes details in the Access tab on the UI * test * Refactor ca/cert patching logic * Commit comprises of the following changes: - Use restart network/VPC API to patch routers - use livePatch API support patching of only cpvm/ssvm - add timeout to the keystore setup/import script * remove all references of systemvm.iso * Fix keystore-cert-import invocation + refactor cert timeout in CP/SS VMs * fix script timeout * Refactor cert patching for systemVMs + update keystore-cert-import script + patch-sysvms script + remove patchSysvmCommand from networkelementcommand * remove commented code + change core user to cloud for cks nodes * Update ownership of ssh directory * NEED TO DISCUSS - add on the fly template conversion as an ExecStartPre action (systemd) * Add UI changes + move changes from patch file to runcmd * test: validate performance for template modification during seeding * create vms folder in cloudstack-commons directory - debian rules * remove logic for on the fly template convert + update k8s test * fix syntax issue - causing issue with shared network tests * Code cleanup * add cgroup config for containerd * add systemd config for kubelet * add additional info during image registry config * address comments * add temp links of download.cloudstack.org * address part of the comments * address comments * update containerd config - as version has upgraded to 1.5 from 1.4.12 in 4.17.0 * address comments - simplify * fix vue3 related icon changes * allow network commands when router template version is lower but is patched * add internal LB to the list of routers to be patched on network restart with live patch * add unit tests for API param validations and new helper utilities - file scp & checksum validations * perform patching only for non-user i.e., system VMs * add test to validate params * remove unused import * add column to domain_router to display software version and support networkrestart with livePatch from router view * Requires upgrade column to consider package (cloud-scripts) checksum to identify if true/false * use router software version instead of checksum * show N/A if no software version reported i.e., in upgraded envs * fix deb failure * update pom to official links of systemVM template
		
			
				
	
	
		
			172 lines
		
	
	
		
			9.5 KiB
		
	
	
	
		
			Makefile
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			172 lines
		
	
	
		
			9.5 KiB
		
	
	
	
		
			Makefile
		
	
	
		
			Executable File
		
	
	
	
	
#!/usr/bin/make -f
 | 
						|
# -*- makefile -*-
 | 
						|
VERSION := $(shell grep '<version>' pom.xml | head -2 | tail -1 | cut -d'>' -f2 |cut -d'<' -f1)
 | 
						|
PACKAGE = $(shell dh_listpackages|head -n 1|cut -d '-' -f 1)
 | 
						|
SYSCONFDIR = "/etc"
 | 
						|
DESTDIR = "debian/tmp"
 | 
						|
 | 
						|
%:
 | 
						|
	dh $@ --with systemd
 | 
						|
 | 
						|
override_dh_auto_configure:
 | 
						|
	cp packaging/debian/replace.properties replace.properties.tmp
 | 
						|
	echo VERSION=${VERSION} >> replace.properties.tmp
 | 
						|
 | 
						|
override_dh_auto_build:
 | 
						|
	mvn clean package -Psystemvm,developer -Dsystemvm \
 | 
						|
	    -Dcs.replace.properties=replace.properties.tmp \
 | 
						|
	    -Dmaven.repo.local=$(HOME)/.m2/repository \
 | 
						|
	     ${ACS_BUILD_OPTS}
 | 
						|
 | 
						|
override_dh_auto_clean:
 | 
						|
	dh_auto_clean
 | 
						|
	rm -f replace.properties.tmp
 | 
						|
 | 
						|
override_dh_auto_install:
 | 
						|
	# Common packages
 | 
						|
	mkdir -p $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)
 | 
						|
	mkdir -p $(DESTDIR)/$(SYSCONFDIR)/default
 | 
						|
 | 
						|
	mkdir -p $(DESTDIR)/var/cache/$(PACKAGE)
 | 
						|
	mkdir -p $(DESTDIR)/var/log/$(PACKAGE)
 | 
						|
	mkdir -p $(DESTDIR)/var/lib/$(PACKAGE)
 | 
						|
	mkdir -p $(DESTDIR)/usr/bin
 | 
						|
	mkdir -p $(DESTDIR)/usr/share
 | 
						|
 | 
						|
	# cloudstack-agent
 | 
						|
	mkdir $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/agent
 | 
						|
	mkdir $(DESTDIR)/$(SYSCONFDIR)/profile.d
 | 
						|
	mkdir $(DESTDIR)/usr/share/$(PACKAGE)-agent
 | 
						|
	mkdir $(DESTDIR)/usr/share/$(PACKAGE)-agent/plugins
 | 
						|
	mkdir $(DESTDIR)/usr/share/$(PACKAGE)-agent/lib
 | 
						|
	install -D plugins/hypervisors/kvm/target/cloud-plugin-hypervisor-kvm-$(VERSION).jar $(DESTDIR)/usr/share/$(PACKAGE)-agent/lib/
 | 
						|
	install -D plugins/hypervisors/kvm/target/dependencies/* $(DESTDIR)/usr/share/$(PACKAGE)-agent/lib/
 | 
						|
	install -D plugins/storage/volume/storpool/target/cloud-plugin-storage-volume-storpool-$(VERSION).jar $(DESTDIR)/usr/share/$(PACKAGE)-agent/lib/
 | 
						|
 | 
						|
	install -d -m0755 debian/$(PACKAGE)-agent/lib/systemd/system
 | 
						|
	install -m0644 packaging/systemd/$(PACKAGE)-agent.service debian/$(PACKAGE)-agent/lib/systemd/system/$(PACKAGE)-agent.service
 | 
						|
	install -m0644 packaging/systemd/$(PACKAGE)-agent.default $(DESTDIR)/$(SYSCONFDIR)/default/$(PACKAGE)-agent
 | 
						|
	install -m0644 packaging/systemd/$(PACKAGE)-rolling-maintenance@.service debian/$(PACKAGE)-agent/lib/systemd/system/$(PACKAGE)-rolling-maintenance@.service
 | 
						|
 | 
						|
	install -D -m0644 agent/target/transformed/cloudstack-agent.logrotate $(DESTDIR)/$(SYSCONFDIR)/logrotate.d/cloudstack-agent
 | 
						|
 | 
						|
	install -D agent/target/transformed/cloud-setup-agent $(DESTDIR)/usr/bin/cloudstack-setup-agent
 | 
						|
	install -D agent/target/transformed/cloud-ssh $(DESTDIR)/usr/bin/cloudstack-ssh
 | 
						|
	install -D agent/target/transformed/cloudstack-agent-profile.sh $(DESTDIR)/$(SYSCONFDIR)/profile.d/cloudstack-agent-profile.sh
 | 
						|
	install -D agent/target/transformed/cloudstack-agent-upgrade $(DESTDIR)/usr/bin/cloudstack-agent-upgrade
 | 
						|
	install -D agent/target/transformed/cloud-guest-tool $(DESTDIR)/usr/bin/cloudstack-guest-tool
 | 
						|
	install -D agent/target/transformed/libvirtqemuhook $(DESTDIR)/usr/share/$(PACKAGE)-agent/lib/
 | 
						|
	install -D agent/target/transformed/rolling-maintenance $(DESTDIR)/usr/share/$(PACKAGE)-agent/lib/
 | 
						|
	install -D agent/target/transformed/* $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/agent
 | 
						|
 | 
						|
	# cloudstack-management
 | 
						|
	mkdir $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/server
 | 
						|
	mkdir $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/management
 | 
						|
	mkdir -p $(DESTDIR)/$(SYSCONFDIR)/security/limits.d/
 | 
						|
	mkdir -p $(DESTDIR)/$(SYSCONFDIR)/sudoers.d/
 | 
						|
	mkdir -p $(DESTDIR)/usr/share/$(PACKAGE)-management
 | 
						|
	mkdir -p $(DESTDIR)/usr/share/$(PACKAGE)-management/lib
 | 
						|
	mkdir -p $(DESTDIR)/usr/share/$(PACKAGE)-management/setup
 | 
						|
	mkdir -p $(DESTDIR)/usr/share/$(PACKAGE)-management/templates/systemvm
 | 
						|
	mkdir $(DESTDIR)/var/log/$(PACKAGE)/management
 | 
						|
	mkdir $(DESTDIR)/var/cache/$(PACKAGE)/management
 | 
						|
	mkdir $(DESTDIR)/var/log/$(PACKAGE)/ipallocator
 | 
						|
	mkdir $(DESTDIR)/var/lib/$(PACKAGE)/management
 | 
						|
	mkdir $(DESTDIR)/var/lib/$(PACKAGE)/mnt
 | 
						|
 | 
						|
	cp -r client/target/utilities/scripts/db/* $(DESTDIR)/usr/share/$(PACKAGE)-management/setup/
 | 
						|
	cp -r client/target/classes/META-INF/webapp $(DESTDIR)/usr/share/$(PACKAGE)-management/webapp
 | 
						|
	cp server/target/conf/* $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/server/
 | 
						|
	cp client/target/conf/* $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/management/
 | 
						|
	cp client/target/cloud-client-ui-$(VERSION).jar $(DESTDIR)/usr/share/$(PACKAGE)-management/lib/cloudstack-$(VERSION).jar
 | 
						|
	cp client/target/lib/*jar $(DESTDIR)/usr/share/$(PACKAGE)-management/lib/
 | 
						|
	cp -r engine/schema/dist/systemvm-templates/* $(DESTDIR)/usr/share/$(PACKAGE)-management/templates/systemvm/
 | 
						|
	rm -rf $(DESTDIR)/usr/share/$(PACKAGE)-management/templates/systemvm/md5sum.txt
 | 
						|
 | 
						|
	# nast hack for a couple of configuration files
 | 
						|
	mv $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/server/cloudstack-limits.conf $(DESTDIR)/$(SYSCONFDIR)/security/limits.d/
 | 
						|
	mv $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/server/cloudstack-sudoers $(DESTDIR)/$(SYSCONFDIR)/sudoers.d/$(PACKAGE)
 | 
						|
	chmod 0440 $(DESTDIR)/$(SYSCONFDIR)/sudoers.d/$(PACKAGE)
 | 
						|
 | 
						|
	install -D client/target/utilities/bin/cloud-update-xenserver-licenses $(DESTDIR)/usr/bin/cloudstack-update-xenserver-licenses
 | 
						|
	# Remove configuration in /ur/share/cloudstack-management/webapps/client/WEB-INF
 | 
						|
	# This should all be in /etc/cloudstack/management
 | 
						|
	ln -s ../../..$(SYSCONFDIR)/$(PACKAGE)/management $(DESTDIR)/usr/share/$(PACKAGE)-management/conf
 | 
						|
	ln -s ../../../var/log/$(PACKAGE)/management $(DESTDIR)/usr/share/$(PACKAGE)-management/logs
 | 
						|
 | 
						|
	install -d -m0755 debian/$(PACKAGE)-management/lib/systemd/system
 | 
						|
	install -m0644 packaging/systemd/$(PACKAGE)-management.service debian/$(PACKAGE)-management/lib/systemd/system/$(PACKAGE)-management.service
 | 
						|
	install -m0644 packaging/systemd/$(PACKAGE)-management.default $(DESTDIR)/$(SYSCONFDIR)/default/$(PACKAGE)-management
 | 
						|
 | 
						|
	# cloudstack-ui
 | 
						|
	mkdir $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/ui
 | 
						|
	mkdir -p $(DESTDIR)/usr/share/$(PACKAGE)-ui
 | 
						|
	cd ui && npm install && npm run build && cd ..
 | 
						|
	cp -r ui/dist/config.json $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/ui/
 | 
						|
	cp -r ui/dist/* $(DESTDIR)/usr/share/$(PACKAGE)-ui/
 | 
						|
	rm -f $(DESTDIR)/usr/share/$(PACKAGE)-ui/config.json
 | 
						|
	ln -s /$(SYSCONFDIR)/$(PACKAGE)/ui/config.json $(DESTDIR)/usr/share/$(PACKAGE)-ui/config.json
 | 
						|
	# copy ui to cloudstack-management
 | 
						|
	cp -r ui/dist/config.json $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/management/
 | 
						|
	cp -r ui/dist/* $(DESTDIR)/usr/share/$(PACKAGE)-management/webapp/
 | 
						|
	rm -f $(DESTDIR)/usr/share/$(PACKAGE)-management/webapp/config.json
 | 
						|
	ln -s /$(SYSCONFDIR)/$(PACKAGE)/management/config.json $(DESTDIR)/usr/share/$(PACKAGE)-management/webapp/config.json
 | 
						|
 | 
						|
	# cloudstack-common
 | 
						|
	mkdir -p $(DESTDIR)/usr/share/$(PACKAGE)-common
 | 
						|
	mkdir $(DESTDIR)/usr/share/$(PACKAGE)-common/scripts
 | 
						|
	mkdir $(DESTDIR)/usr/share/$(PACKAGE)-common/setup
 | 
						|
	mkdir $(DESTDIR)/usr/share/$(PACKAGE)-common/lib
 | 
						|
	mkdir $(DESTDIR)/usr/share/$(PACKAGE)-common/vms
 | 
						|
	cp -r scripts/installer $(DESTDIR)/usr/share/$(PACKAGE)-common/scripts
 | 
						|
	cp -r scripts/network $(DESTDIR)/usr/share/$(PACKAGE)-common/scripts
 | 
						|
	cp -r scripts/storage $(DESTDIR)/usr/share/$(PACKAGE)-common/scripts
 | 
						|
	cp -r scripts/util $(DESTDIR)/usr/share/$(PACKAGE)-common/scripts
 | 
						|
	cp -r scripts/vm $(DESTDIR)/usr/share/$(PACKAGE)-common/scripts
 | 
						|
	cp -r systemvm/dist/* $(DESTDIR)/usr/share/$(PACKAGE)-common/vms
 | 
						|
	install -D client/target/utilities/bin/cloud-migrate-databases $(DESTDIR)/usr/bin/cloudstack-migrate-databases
 | 
						|
	install -D client/target/utilities/bin/cloud-set-guest-password $(DESTDIR)/usr/bin/cloudstack-set-guest-password
 | 
						|
	install -D client/target/utilities/bin/cloud-set-guest-sshkey $(DESTDIR)/usr/bin/cloudstack-set-guest-sshkey
 | 
						|
	install -D client/target/utilities/bin/cloud-setup-databases $(DESTDIR)/usr/bin/cloudstack-setup-databases
 | 
						|
	install -D client/target/utilities/bin/cloud-setup-management $(DESTDIR)/usr/bin/cloudstack-setup-management
 | 
						|
	install -D client/target/utilities/bin/cloud-setup-encryption $(DESTDIR)/usr/bin/cloudstack-setup-encryption
 | 
						|
	install -D client/target/utilities/bin/cloud-sysvmadm $(DESTDIR)/usr/bin/cloudstack-sysvmadm
 | 
						|
	install -D systemvm/dist/* $(DESTDIR)/usr/share/$(PACKAGE)-common/vms/
 | 
						|
	# We need jasypt for cloud-install-sys-tmplt, so this is a nasty hack to get it into the right place
 | 
						|
	install -D agent/target/dependencies/jasypt-1.9.3.jar $(DESTDIR)/usr/share/$(PACKAGE)-common/lib
 | 
						|
 | 
						|
	# cloudstack-python
 | 
						|
	mkdir -p $(DESTDIR)/usr/share/pyshared
 | 
						|
	cp -r python/lib/cloud* $(DESTDIR)/usr/share/pyshared
 | 
						|
 | 
						|
	# cloudstack-usage
 | 
						|
	mkdir $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/usage
 | 
						|
	mkdir $(DESTDIR)/usr/share/$(PACKAGE)-usage
 | 
						|
	mkdir $(DESTDIR)/usr/share/$(PACKAGE)-usage/plugins
 | 
						|
	install -D usage/target/cloud-usage-$(VERSION).jar $(DESTDIR)/usr/share/$(PACKAGE)-usage/lib/$(PACKAGE)-usage.jar
 | 
						|
	install -D usage/target/dependencies/* $(DESTDIR)/usr/share/$(PACKAGE)-usage/lib/
 | 
						|
	cp client/target/lib/mysql*jar $(DESTDIR)/usr/share/$(PACKAGE)-usage/lib/
 | 
						|
	cp usage/target/transformed/db.properties $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/usage/
 | 
						|
	cp usage/target/transformed/log4j-cloud_usage.xml $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/usage/log4j-cloud.xml
 | 
						|
 | 
						|
	install -d -m0755 debian/$(PACKAGE)-usage/lib/systemd/system
 | 
						|
	install -m0644 packaging/systemd/$(PACKAGE)-usage.service debian/$(PACKAGE)-usage/lib/systemd/system/$(PACKAGE)-usage.service
 | 
						|
	install -m0644 packaging/systemd/$(PACKAGE)-usage.default $(DESTDIR)/$(SYSCONFDIR)/default/$(PACKAGE)-usage
 | 
						|
 | 
						|
	# cloudstack-marvin
 | 
						|
	mkdir -p $(DESTDIR)/usr/share/$(PACKAGE)-marvin
 | 
						|
	cp tools/marvin/dist/Marvin-*.tar.gz $(DESTDIR)/usr/share/$(PACKAGE)-marvin/
 | 
						|
 | 
						|
	# cloudstack-integration-tests
 | 
						|
	mkdir -p $(DESTDIR)/usr/share/$(PACKAGE)-integration-tests
 | 
						|
	cp -r test/integration/* $(DESTDIR)/usr/share/$(PACKAGE)-integration-tests/
 | 
						|
 | 
						|
override_dh_systemd_enable:
 | 
						|
	dh_systemd_enable -pcloudstack-management -pcloudstack-agent -pcloudstack-usage
 | 
						|
 | 
						|
override_dh_strip_nondeterminism:
 | 
						|
	# Disable dh_strip_nondeterminism to speed up the build
 | 
						|
 | 
						|
override_dh_installdocs:
 | 
						|
	dh_installdocs -A tools/whisker/LICENSE tools/whisker/NOTICE INSTALL.md
 |