28 Commits

Author SHA1 Message Date
Pearl Dsilva
830f3061bc
SystemVM optimizations (#5831)
* 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
2022-04-21 13:40:19 -03:00
davidjumani
6ac834a358
Adding AutoScaling for cks + CKS CoreOS EOL update + systemvmtemplate improvements (#4329)
Adding AutoScaling support for cks
Kubernetes PR : kubernetes/autoscaler#3629
Also replaces CoreOS with Debian
Fixes #4198

Co-authored-by: Pearl Dsilva <pearl1594@gmail.com>
Co-authored-by: Pearl Dsilva <pearl.dsilva@shapeblue.com>
Co-authored-by: Wei Zhou <w.zhou@global.leaseweb.com>
Co-authored-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2021-10-06 21:17:41 +05:30
Andrija Panic
9b7acfde1e
Update message when keys are NOT being injected (#3799)
* Update message when keys are NOT being injected

* Correct the message after injectkeys.ssh is done

* Update message to a more meaningful one, since sometimes nothing is injected

* Update other 2

* typo
2020-01-18 09:11:42 +01:00
Anurag Awasthi
1771727ce1 Revert "Extract systemvm.iso using bsdtar (#3536)" (#3800)
This reverts commit 8a55c931e806a64f7f00153d4a58c4463caa7a47.
2020-01-13 12:24:43 +01:00
Kai Takahashi
8a55c931e8 Extract systemvm.iso using bsdtar (#3536)
* Extract systemvm.iso using bsdtar if available.

Signed-off-by: Kai Takahashi <k-takahashi@creationline.com>

* New dependency for CentOS 7 and Debian: bsdtar

bsdtar can extract iso images without mounting.

Signed-off-by: Kai Takahashi <k-takahashi@creationline.com>

* Remove all 'mount' and 'umount' command call(s).

Signed-off-by: Kai Takahashi <k-takahashi@creationline.com>
2020-01-06 11:46:20 +01:00
Manfred Touron
c92dcd2b32
Compabitility fix for Docker >= 1.11 (docker/docker#19490) 2016-06-30 17:21:53 +02:00
Rohit Yadav
a11f711062 systemvm: set default umask 022 in injectkeys.sh
The default umask of 0022 is set in Ubuntu and other packages. Set the same
in case of CentOS startup scripts. Use umask 022 in the injectkeys.sh script

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-03-14 12:21:57 +01:00
Remi Bergsma
9b0b69d9c8 CLOUDSTACK-9077 Fix injectkeys.sh to work on CentOS7 2015-11-25 11:26:10 +01:00
Pierre-Luc Dion
3381154faf initial dockerization commit. 1. update injectkeys.sh to work into restricted container 2. move previous dockerfiles into tools/docker 3. dockerfiles for management-server on centos and marvin
CLOUDSTACK-8249

Signed-off-by: Pierre-Luc Dion <pdion891@apache.org>
2015-08-01 08:30:16 -04:00
Hugo Trippaers
169cd6f939 Prevent any attempt at using askpass during management server startup 2014-02-25 16:02:48 +01:00
Sheng Yang
c8bc7a0af5 Revert "CLOUDSTACK-2534: Modify id_rsa.cloud's permission to 600"
This reverts commit 5d70e1928c19dc18b0479354b24649081f79c277.

Wrong fix. The correct key is at:

/var/cloudstack/management/.ssh/id_rsa
2013-06-18 18:02:32 -07:00
Sheng Yang
5d70e1928c CLOUDSTACK-2534: Modify id_rsa.cloud's permission to 600
644 is too open for ssh.
2013-06-18 17:34:21 -07:00
Hugo Trippaers
6bec37dc04 Detect if we are root based on the effective uid instead of the username. Allows sysadmins to specifiy their own username if they want. 2013-04-10 16:34:31 +02:00
Chiradeep Vittal
e7983b25cc QuickCloud: Enable secondary storage daemon to run outside the system vm 2013-04-09 14:45:25 -07:00
Wido den Hollander
82e57f8f40 Use /tmp as temporary location for injecting SSH keys into systemvm.iso
When starting the management server with 'sudo' the $HOME will be set to the user calling sudo.

This fixes CLOUDSTACK-218
2012-09-27 18:58:31 +02:00
David Nalley
d630fa8697 license header changes for scripts folder from Chip Childers 2012-06-23 00:58:00 -04:00
frank
2f634c0913 Switch to Apache license 2012-04-03 04:50:05 -07:00
frank
1a3a3f8e0d use /usr/lib/cloud/management/systemvm_mnt instead of /mnt/cloud/systemvm.
We should use home dir of user 'cloud', don't do any assumption of umask of /mnt,
it varies from distribution
2012-01-13 13:28:31 -08:00
frank
52610ffcb3 add copyright header to shell scripts 2012-01-11 18:41:53 -08:00
Frank
92155522f2 Add license header to files 2011-04-14 11:23:14 -07:00
Frank
9ca46b5b56 umount /mnt/cloud/systemvm if injectkey.sh failed or normal exit 2011-02-01 17:21:24 -08:00
Frank
b6fc6341fd Bug 8303 - Cant add xen hosts, due to ssh key permission setup failure
status 8303: resloved fixed
2011-02-01 12:49:15 -08:00
Frank
3486995ae7 use sudo when mount systemvm.iso in injectkeys.sh 2011-01-31 12:51:21 -08:00
Frank
4d2d820634 fix injectkeys.sh -- pass systemvm.iso path to scripts 2011-01-31 12:19:32 -08:00
Chiradeep Vittal
cc0ed77fee bug 8199: always update the keypairs on disk to account for multiple management servers 2011-01-28 12:24:22 -08:00
Chiradeep Vittal
fd081dc5e7 Bug 8199: only inject if needed 2011-01-28 12:24:21 -08:00
Chiradeep Vittal
8a1ca01f44 Bug 8199: insert generated private key where it is expected 2011-01-28 12:24:20 -08:00
Chiradeep Vittal
09145efc41 Bug 8199: inject ssh public key into systemvm iso file 2011-01-28 12:24:18 -08:00