38 Commits

Author SHA1 Message Date
Harikrishna
cca8b2fef9
Extensions Framework & Orchestrate Anything (#9752)
The Extensions Framework in Apache CloudStack is designed to provide a flexible and standardised mechanism for integrating external systems and custom workflows into CloudStack’s orchestration process. By defining structured hook points during key operations—such as virtual machine deployment, resource preparation, and lifecycle events—the framework allows administrators and developers to extend CloudStack’s behaviour without modifying its core codebase.
2025-07-28 10:41:17 +05:30
John Bampton
9f1577d2a8
pre-commit: check more file types for trailing whitespace (#9352) 2024-07-10 09:22:02 +02:00
davidjumani
d949302d0f
packaging: Adding Centos8, Ubuntu 20.04, XCPNG8.1 Support (#4068)
* DB : Add support for MySQL 8

- Splits commands to create user and grant access on database, the old
statement is no longer supported by MySQL 8.x
- `NO_AUTO_CREATE_USER` is no longer supported by MySQL 8.x so remove
that from db.properties conn parameters

For mysql-server 8.x setup the following changes were added/tested to
make it work with CloudStack in /etc/mysql/mysql.conf.d/mysqld.cnf and
then restart the mysql-server process:

    server_id = 1
    sql-mode="STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION,ERROR_FOR_DIVISION_BY_ZERO,NO_ZERO_DATE,NO_ZERO_IN_DATE,NO_ENGINE_SUBSTITUTION"
    innodb_rollback_on_timeout=1
    innodb_lock_wait_timeout=600
    max_connections=1000
    log-bin=mysql-bin
    binlog-format = 'ROW'

    default-authentication-plugin=mysql_native_password

Notice the last line above, this is to reset the old password based
authentication used by MySQL 5.x.

Developers can set empty password as follows:

    > sudo mysql -u root
    ALTER USER 'root'@'localhost' IDENTIFIED BY '';

In libvirt repository, there are two related commits

2019-08-23 13:13 Daniel P. Berrangé            ● rpm: don't enable socket activation in upgrade if --listen present
2019-08-22 14:52 Daniel P. Berrangé            ● remote: forbid the --listen arg when systemd socket activation

In libvirt.spec.in

        /bin/systemctl mask libvirtd.socket >/dev/null 2>&1 || :
        /bin/systemctl mask libvirtd-ro.socket >/dev/null 2>&1 || :
        /bin/systemctl mask libvirtd-admin.socket >/dev/null 2>&1 || :
        /bin/systemctl mask libvirtd-tls.socket >/dev/null 2>&1 || :
        /bin/systemctl mask libvirtd-tcp.socket >/dev/null 2>&1 || :

Co-authored-by: Wei Zhou <w.zhou@global.leaseweb.com>
Co-authored-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Co-authored-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2020-08-17 16:28:30 +05:30
Wido den Hollander
7313a5ead2 deb: Remove Ubuntu 14.04 LTS support and update DEB dependencies (#2828)
Ubuntu 14.04 will go EOL in April 2019. With a new CloudStack
release close to that date we can drop support for this Ubuntu
version and the master branch of CloudStack.

Ubuntu 16.04 (Xenial) and 18.04 (Bionic) both have systemd and
more recent Java versions which make it easier to run the CloudStack
KVM Agent on them.

In addition libvirt and Qemu are more up to date with features
which allow VMs to run better.

Yet to be implemented features in KVM can also leverage the newer
version of Qemu and libvirt without the need of taking older
version of them into account.

Signed-off-by: Wido den Hollander <wido@widodh.nl>
2018-09-18 16:01:37 +05:30
Rohit Yadav
eda3b35bfa CLOUDSTACK-10012: Migrate to Embedded Jetty
- Migrate to embedded Jetty server.
- Improve ServerDaemon implementation.
- Introduce a new server.properties file for easier configuration.
- Have a single /etc/default/cloudstack-management to configure env.
- Reduce shaded jar file, removing unnecessary dependencies.
- Upgrade to Spring 5.x, upgrade several jar dependencies.
- Does not shade and include mysql-connector, used from classpath instead.
- Upgrade and use bountcastle as a separate un-shaded jar dependency.
- Remove tomcat related configuration and files.
- Have both embedded UI assets in uber jar and separate webapp directory.
- Refactor systemd and init scripts, cleanup packaging.
- Made cloudstack-setup-databases faster, using `urandom`.
- Remove unmaintained distro packagings.
- Moves creation and usage of server keystore in CA manager, this
  deprecates the need to create/store cloud.jks in conf folder and
  the db.cloud.keyStorePassphrase in db.properties file. This also
  remove the need of the --keystore-passphrase in the
  cloudstack-setup-encryption script.
- GZip contents dynamically in embedded Jetty

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-11-03 23:57:25 +05:30
Marc-Aurèle Brothier
e9f29c787d CLOUDSTACK-10012: Introduce Embedded Jetty with shaded jar
- Changes packaging to shaded jar
- Introduced embedded jetty
- Updates jetty dependencies version 9.2 (java 7+)
- Initial changes to debian config files
- Initial removal of tomcat dependency
- Introduce ServerDaemon class with customizations
2017-11-03 23:57:25 +05:30
Rohit Yadav
e6cc78f531 CLOUDSTACK-9710: Switch to JRE1.8
- Switches Travis to use jdk1.8
- Changes java-version to 1.8
- Change jdk/maven version to 1.8
- Switch to F5/java8 compatible library release
- Switch packaging to use jdk 1.8, and jre 1.8 in init/systemd scripts
- Switch systemvm to openjdk-8-jre

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-01-11 14:04:03 +05:30
Abhinandan Prateek
bd85e5b4da CLOUDSTACK-9551: Move java tmp dir to cloudstack-agent's path to avoid
noexec on /tmp
2016-10-25 10:55:56 +05:30
Rohit Yadav
c8a52c94d2 CLOUDSTACK-9462: Refactor systemd scripts
Refactors and unifies usage of systemd script and default files across
CentOS and Ubuntu/Debian packaging system.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-08-26 15:19:58 +05:30
Wido den Hollander
142772d524 CLOUDSTACK-9462: Systemd support for Ubuntu 16.04
- systemd: Add a /etc/sysconfig/cloudstack-* file

  This allows users to easily override variables passed to Java when
  starting up.

  It also creates a foundation for sharing the systemd service profile
  between CentOS and Ubuntu since it only requires the environment file
  to be changed.

- deb: Add Ubuntu 16.04 support

  Ubuntu 16.04 differs from Ubuntu 14.04 in a few ways:
  - systemd instead of sysvinit / upstart
  - Java 8 support

  The packaging now detects on which distribution it is being
  build and based on that it installs different files in the
  packages, but it also changes the Dependencies.

  Packages for Ubuntu 16.04 will require Java 8 as a JRE

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-08-25 14:18:51 +05:30
Nick Livens
02c5d44f0b Dynamic loading of DB driver + support for other DB providers 2016-05-23 15:50:28 +02:00
Boris Schrijver
7bbc5338c5 CLOUDSTACK-9045: Corrected mount point for management server DEBIAN. 2015-11-08 20:38:47 +01:00
Rohit Yadav
58999daafe CLOUDSTACK-8433: remove awsapi rpm and debian packaging
- Removes awsapi packaging rules for debian, centos63, centos7, fedora 20/21
- Removes catalina port 7080 service configs
- Fixes build replace properties for AWSAPILOG
- Removes maven profile for building awsapi and deploying db in developer profile

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-05-06 15:22:04 +02:00
Rohit Yadav
19d73fe67d CLOUDSTACK-7951: Limit amount of memory used by cloudstack-agent jsvc
The -Xms value specifies the minimum heap size the JVM should start with and
-Xmx is the maximum heap size it can grow. The previous fix imposed minimum
limit of 1G which is unreasonably for small deployments. The fix is to start
with 256MB and limit to 2G for cloudstack-agent process. This was tested on
DevCloud/KVM and then again on a ACS/KVM deployment on real hardware.

With these values, it's possible for the agent to work in a DevCloud/KVM
environment and if JVM needs it can increase the heap size to 2G. The fix also
ports these settings to Debian cloud-agent init.d script as well.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit bb81082e58d90da9971b7e06f4c3f8639446b2d2)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-11-25 18:27:21 +05:30
Vincent Bernat
2401eb927b CLOUDSTACK-7633: fix "Provides" in most LSB headers
In init.d scripts, the LSB header may specify what kind of service is
provided by an init script. If spaces are used, this means the init
script is providing several boot facilities. We fix that by using an
hyphen.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-09-25 16:56:53 +02:00
Rajani Karuturi
fa1156092e CLOUDSTACK-6926 setting java_home from installed java
changed the order of preference to check for java first.

Usage server rpm installs JRE 1.7. In the case where JDK 1.6 is already
installed, java version would be 1.7 but, javac would be 1.6
If javac is given preference, usage server fails to start in this case.
2014-09-12 15:17:10 +05:30
Leo Simons
0ec36e128b Fix CLOUDSTACK-7476: always pass along $JAVA_HOME
On a secured environment (selinux w/ env_reset enabled in sudoers), the
runuser command that is invoked by the daemon() function does not pass
along environment variables, so $JAVA_HOME is empty, and JSVC falls
back to its default behavior, which may not find java or may not find
the intended java.

This fix simply passes $JAVA_HOME explicitly using the -home argument to
JSVC.

Signed-off-by: Rajani Karuturi <rajanikaruturi@gmail.com>
2014-09-05 16:39:34 +05:30
Rohit Yadav
47625af7c3 CLOUDSTACK-6360: Fix JDK paths in ubuntu packaging init scripts, don't use 1.6
Since we've agreed to use JDK/JRE 1.7, this enforces that for Ubuntu builds
- this fix remove usage of 1.6 paths in JDK_DIR for cloud-{agent, management, usage}.
- adds oracle jdk 1.7 path (in case a user is using that)
- adds mysql-connector-java path to CLASSPATH for usage server
- adds libmysql-java pkg dependency (tested and available for precise and trusty)

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit 96d6a2a03734ebbb9f41196d56c409d544a268ea)

Conflicts:
	packaging/debian/init/cloud-usage
Adds pessimistic logic to try the hard coded paths if Rajani's logic fails
2014-08-08 14:26:47 +02:00
Rajani Karuturi
c468228fe8 CLOUDSTACK-6926: removed hard coded jdk dirs and setting java home using readlink and dirname 2014-06-25 17:23:42 +05:30
Wido den Hollander
7cd2b2ae89 debian: Add JNA flag when starting agent
In some situations local JNA libraries might prevent the agent
from starting.
2014-03-26 13:31:02 +01:00
Wido den Hollander
e6fd794ca0 packaging: Do not depend on JNA and don't include it in the classpath
It's now packaged with maven due to libvirt 0.5.1 and will be included
in the classpath automatically.
2013-09-29 12:22:46 +02:00
Wei Zhou
2cc1dd4e74 change display name in /etc/init.d/cloudstack-agent from cloud-agent to cloudstack-agent
(cherry picked from commit add65051826eb0311a9028ecf3785617ea191733)
2013-09-06 14:20:55 +02:00
Wido den Hollander
9573f51d3b CLOUDSTACK-1977: Add management setup directory to classpath
This way the DB upgrade process can locate the SQL files
2013-04-18 21:32:08 +02:00
Wido den Hollander
96cf79535f CLOUDSTACK-2033 Fix usage server logging under Debian and Ubuntu 2013-04-18 10:26:09 +02:00
Wido den Hollander
28d5c959d6 debian: Update the cloudstack-management server's classpath
It should contain /etc/cloudstack/management so it can locate it's configuration
2013-04-03 15:57:40 +02:00
Wido den Hollander
80da4d5baf CLOUDSTACK-1490: deb packaging tomcat fixes
Signed-off-by: Wido den Hollander <wido@42on.com>
2013-03-31 14:16:31 +02:00
Wido den Hollander
bc1ce57c9b debian: Update the init script for the management server
Signed-off-by: Wido den Hollander <wido@42on.com>
2013-03-31 14:16:31 +02:00
Brian Spindler
ae3a048350 CLOUDSTACK-1736: Changes required to get cloudstack-management service
working again.

The newly created package for cloudstack-management was not correctly
installing the service. This prevented cloud-setup-management from being
able to configure the service, and the init script didn't even believe
the service was installed. I also added sudo to the chmod command for
checking script permissions, as most scripts belong to root. It was
trying to configure the agent with cloudstack-setup-agent but the script
was still called cloud-setup-agent, so I renamed it to cloudstack-setup-agent.
2013-03-25 17:23:18 +00:00
Wido den Hollander
7a794519a2 debian: Fix the usage server packaging 2013-03-12 14:26:10 +01:00
Wido den Hollander
9e02ed139f packaging: Include the Agent plugins dir in the classpath
For both the RPM and DEB packages are new directory for plugins
for the agent is created.

All JAR files in that directory will be added to the classpath
on boot of the agent.
2013-03-06 19:26:18 +01:00
Wido den Hollander
03bc74bd50 debian: Only include JAR files into the classpath 2013-03-06 19:26:18 +01:00
Wido den Hollander
72c4d6a873 packaging: Sync RPM and DEB init scripts Agent
The RPM init script was lacking some things, it is synced
now with the DEB init script.

Both prefer Java 7 over Java 6 and add the correct JAR files to the
classpath.
2013-03-05 16:10:38 +01:00
Wido den Hollander
e14e057f3d packaging: Use the JNA version from the distribution
Libvirt-java 0.4.9 works just fine with JNA 3.2.4 which is in
all distributions.

Future libvirt version require at least JNA 3.5.1 due to new methods
and memory management, but that is not our concern now.

By depending on the JNA in the distribution and adding it to the classpath
we can work just fine.
2013-03-05 16:10:38 +01:00
Wido den Hollander
ee695ba2c8 debian / rpm: When building the classpath in the init script strip last semi-column
Remove the trailing : so we don't get them double in the classpath
2013-03-01 16:47:05 +01:00
Wido den Hollander
379177fafc debian: Remove the scripts directory from the classpath
Scripts are found by paths.script in environment.properties
2013-03-01 16:47:05 +01:00
Wido den Hollander
20070ee07f debian: Packaging update for mainly the Agent
The new cloudstack-agent package wouldn't boot due to various issues.

Those all seem to be resolved.

Other changes include path changes like /etc/cloud -> /etc/cloudstack

The new package now installs, but the upgrade hasn't been tested yet.
2013-03-01 15:06:07 +01:00
Noa Resare
2f135be15f CLOUDSTACK-1415: Debian & Ubuntu packaging work
Some concepts included:

* the replace.properties location used by maven is parameterized to allow
  for a build that does not modify the currently git tracked files
* package naming is updated along the lines of what was discussed on the
  -dev mailing list and between committers at the Build a Cloud Day in Belgi
* package version pattern is updated (since we redo all package names,
  we might as well drop the epoch)
2013-02-27 15:44:46 +00:00
Wido den Hollander
a24ec2bdcc debian: Initial work to get the Debian packaging working again
Right now it isn't working yet, but this is the way it should start working
like the RPM package building is.

This commit is to clean up the rules file a bit and lay the groundwork for
the Debian packaging
2012-11-06 16:19:07 +01:00