mirror of https://github.com/apache/cloudstack.git
PARITAL WORK _ DO NO BUILD FROM THIS
This commit is contained in:
parent
b6cf59aaff
commit
461a3eb87d
|
|
@ -1,12 +0,0 @@
|
|||
[Unit]
|
||||
Description=CloudStack Baremetal VR service
|
||||
After=network.target local-fs.target
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=/opt/cloud/bin
|
||||
ExecStart=/usr/bin/python /opt/cloud/bin/baremetal-vr.py
|
||||
Restart=on-failure
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
[Unit]
|
||||
Description=CloudStack Agent service
|
||||
After=cloud-early-config.service network.target cloud-postinit.service local-fs.target
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=/usr/local/cloud/systemvm
|
||||
ExecStart=/usr/local/cloud/systemvm/_run.sh
|
||||
Restart=on-failure
|
||||
|
|
@ -205,6 +205,41 @@ patch() {
|
|||
return 0
|
||||
}
|
||||
|
||||
|
||||
enable_guest_services() {
|
||||
|
||||
HYPERVISOR=$(</etc/cloudstack-agent_detected_hypervisor)
|
||||
case $HYPERVISOR in
|
||||
xen-pv|xen-domU)
|
||||
systemctl stop ntpd
|
||||
systemctl disable ntpd
|
||||
systemctl start xe-daemon
|
||||
;;
|
||||
xen-hvm)
|
||||
systemctl stop ntpd
|
||||
systemctl disable ntpd
|
||||
systemctl start xe-daemon
|
||||
;;
|
||||
kvm)
|
||||
systemctl start qemu-guest-agent
|
||||
VPORT=$(find /dev/virtio-ports -type l -name '*.vport' 2>/dev/null|head -1)
|
||||
;;
|
||||
vmware)
|
||||
# system time sync'd with host via vmware tools
|
||||
systemctl stop ntpd
|
||||
systemctl disable ntpd
|
||||
systemctl start open-vm-tools
|
||||
;;
|
||||
virtualpc|hyperv)
|
||||
# Hyper-V is recognized as virtualpc hypervisor type. Boot args are passed using KVP Daemon
|
||||
systemctl start hyperv-daemons.hv-fcopy-daemon.service hyperv-daemons.hv-kvp-daemon.service hyperv-daemons.hv-vss-daemon.service
|
||||
;;
|
||||
virtualbox)
|
||||
# Virtualbox is used to test the virtual router
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
start() {
|
||||
log_it "Executing cloud-early-config"
|
||||
|
||||
|
|
@ -225,6 +260,10 @@ start() {
|
|||
patch
|
||||
sync
|
||||
sysctl -p
|
||||
|
||||
log_it "Starting Virtual Guest Services for $HYPERVISOR"
|
||||
|
||||
enable_guest_services
|
||||
|
||||
log_it "Configuring systemvm type=$TYPE"
|
||||
|
||||
|
|
|
|||
|
|
@ -584,7 +584,7 @@ setup_ntp() {
|
|||
|
||||
routing_svcs() {
|
||||
echo "haproxy apache2" > /var/cache/cloud/enabled_svcs
|
||||
echo "cloud nfs-common portmap" > /var/cache/cloud/disabled_svcs
|
||||
echo "nfs-common portmap" > /var/cache/cloud/disabled_svcs
|
||||
if [ "$RROUTER" -eq "1" ]
|
||||
then
|
||||
echo "keepalived conntrackd" >> /var/cache/cloud/enabled_svcs
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/bash
|
||||
\#!/bin/bash
|
||||
# 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
|
||||
|
|
@ -19,7 +19,6 @@
|
|||
. /opt/cloud/bin/setup/common.sh
|
||||
|
||||
consoleproxy_svcs() {
|
||||
echo "cloud" > /var/cache/cloud/enabled_svcs
|
||||
echo "haproxy dnsmasq apache2 nfs-common portmap" > /var/cache/cloud/disabled_svcs
|
||||
mkdir -p /var/log/cloud
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,37 +30,6 @@ else
|
|||
fi
|
||||
sysctl -p
|
||||
|
||||
# HYPERVISOR exported by cloud-early-config
|
||||
HYPERVISOR=$(</etc/cloudstack-agent_detected_hypervisor)
|
||||
case $HYPERVISOR in
|
||||
xen-pv|xen-domU)
|
||||
systemctl stop ntpd
|
||||
systemctl start xe-daemon
|
||||
;;
|
||||
xen-hvm)
|
||||
systemctl stop ntpd
|
||||
systemctl start xe-daemon
|
||||
;;
|
||||
kvm)
|
||||
systemctl start qemu-guest-agent
|
||||
VPORT=$(find /dev/virtio-ports -type l -name '*.vport' 2>/dev/null|head -1)
|
||||
;;
|
||||
vmware)
|
||||
# system time sync'd with host via vmware tools
|
||||
systemctl stop ntpd
|
||||
systemctl start open-vm-tools
|
||||
;;
|
||||
virtualpc|hyperv)
|
||||
# Hyper-V is recognized as virtualpc hypervisor type. Boot args are passed using KVP Daemon
|
||||
systemctl start hyperv-daemons.hv-fcopy-daemon.service hyperv-daemons.hv-kvp-daemon.service hyperv-daemons.hv-vss-daemon.service
|
||||
;;
|
||||
virtualbox)
|
||||
# Virtualbox is used to test the virtual router
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
|
||||
|
||||
# Restart journald for setting changes to apply
|
||||
systemctl restart systemd-journald
|
||||
|
|
@ -103,3 +72,5 @@ fi
|
|||
systemctl enable --now --no-block ssh
|
||||
|
||||
date > /var/cache/cloud/boot_up_done
|
||||
|
||||
systemctl start cloud
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
. /opt/cloud/bin/setup/common.sh
|
||||
|
||||
secstorage_svcs() {
|
||||
echo "apache2 cloud nfs-common portmap" > /var/cache/cloud/enabled_svcs
|
||||
echo "apache2 nfs-common portmap" > /var/cache/cloud/enabled_svcs
|
||||
echo "conntrackd keepalived haproxy dnsmasq" > /var/cache/cloud/disabled_svcs
|
||||
mkdir -p /var/log/cloud
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue