24 Commits

Author SHA1 Message Date
Abhishek Kumar
12c077d704
api,ui: multi arch improvements (#10289) 2025-04-25 11:02:27 +02:00
João Jandre
49cecaed06
Normalize loggers and upgrade log4j 1.2 to log4j 2.19 (#7131)
* Normalize logs

All classes that could have their loggers inherited from their fathers had their own loggers deleted;
Most loggers didn't have to be static, so most of them were normalized so that they wouldn't be;
All loggers are protected now;
Static logger's name are now 'LOGGER';
Non-static logger's name are now 'logger';
New class DbUpgradeAbstractImpl created so that all Upgraders extend it and inherit its logger

* Upgrade log4j

* fix errors caused by the merge

* Refactor cglibThrowableRenderer functionality to log4j2 and upgrade the last configuration files

* fix sonarcloud bug

* Fix errors caused by merge, remove some unused loggers, and rename a variable that was mistakenly renamed on the normalization commit

* Readd snmpTrapAppender, remove TestAppender

* Regenerate changes

* regenerate changes

* refactor last custom appender

* fix systemvm configuration xml

* Regenerate changes

* Regenerate changes

* regenerate changes

* Regenerate changes

* regenerate changes

* regenerate changes

* regenerate changes

* Fix utils pom

* fix some tests

* regenerate changes

* Fix jar being printed on exception

* fix logging in system VMs, fix commands not having log4j2 classpath.

* regenerate changes

* Fix some unwanted renomeations

* fix end of file

* regenerate changes

* regenerate changes

* fix merge error

* regenerate changes

* fix tests

* regenerate changes

* regenerate changes

* regenerate changes

* regenerate changes

* regenerate changes

* regenerate changes

* regenerate changes

* readd reload4j to tungsten as juniper depends on it

* Regenerate changes

* regenerate changes

* regenerate changes

* regenerate changes

* regenerate changes

* re-add reload4j dependency to network-contrail, as juniper depends on it

* regenerate changes

* regenerate changes

* regenerate changes

* fix typo

* regenerate changes

* regenerate changes

* Fix end of files

* regenerate changes

* add logj42 to cloud-utils-SHADED.jar

* regenerate changes

* regenerate changes

* regenerate changes

* regenerate changes

* regenerate changes

* regenerate changes

* regenerate changes

* regenerate changes

* Regenerate changes

* Regenerate changes

* Regenerate changes

* regenerate changes

* Regenerate changes

* regenerate changes

* Regenerate changes

* Regenerate changes

* Regenerate changes

* regenerate changes

* Regenerate changes

* Regenerate changes

* fix some tests

* Regenerate changes

* Regenerate changes

* fix test

* Regenerate changes

* Regenerate changes
2024-02-08 09:55:41 -03:00
Wei Zhou
6495bc1a47
packaging: display First Install and Onboarding Message (#5851)
* packaging: display First Install and Onboarding Message

* Update #5851: Update as per Rohit's comments

* Update #5851: display package name in help message

* Update #5851: display links of installed cloudstack version on UI

* Update #5851: fix vue warnings
2022-02-08 16:11:03 +01:00
sureshanaparti
0d72886ee3
Replace the DB properties having master and slave(s), with source and replica(s) respectively, on Upgrade for inclusiveness (#5162)
Updates the DB properties (with strict / full property string search) having master and slave(s), with source and replica(s) respectively on upgrade (for inclusiveness).

Signed-off-by: Suresh Kumar Anaparti <suresh.anaparti@shapeblue.com>
2021-07-01 10:12:59 +05:30
Marc-Aurèle Brothier
9c067c0496 CLOUDSTACK-10137: Only link log4j if not already present (#2316)
Use ln -sf to add link log4j.xml.

Signed-off-by: Marc-Aurèle Brothier <m@brothier.org>
2017-11-10 19:59:59 +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
7ce54bf7a8 CLOUDSTACK-9993: Securing Agents Communications (#2239)
This introduces a new certificate authority framework that allows
pluggable CA provider implementations to handle certificate operations
around issuance, revocation and propagation. The framework injects
itself to `NioServer` to handle agent connections securely. The
framework adds assumptions in `NioClient` that a keystore if available
with known name `cloud.jks` will be used for SSL negotiations and
handshake.

This includes a default 'root' CA provider plugin which creates its own
self-signed root certificate authority on first run and uses it for
issuance and provisioning of certificate to CloudStack agents such as
the KVM, CPVM and SSVM agents and also for the management server for
peer clustering.

Additional changes and notes:
- Comma separate list of management server IPs can be set to the 'host'
  global setting. Newly provisioned agents (KVM/CPVM/SSVM etc) will get
  radomized comma separated list to which they will attempt connection
  or reconnection in provided order. This removes need of a TCP LB on
  port 8250 (default) of the management server(s).
- All fresh deployment will enforce two-way SSL authentication where
  connecting agents will be required to present certificates issued
  by the 'root' CA plugin.
- Existing environment on upgrade will continue to use one-way SSL
  authentication and connecting agents will not be required to present
  certificates.
- A script `keystore-setup` is responsible for initial keystore setup
  and CSR generation on the agent/hosts.
- A script `keystore-cert-import` is responsible for import provided
  certificate payload to the java keystore file.
- Agent security (keystore, certificates etc) are setup initially using
  SSH, and later provisioning is handled via an existing agent connection
  using command-answers. The supported clients and agents are limited to
  CPVM, SSVM, and KVM agents, and clustered management server (peering).
- Certificate revocation does not revoke an existing agent-mgmt server
  connection, however rejects a revoked certificate used during SSL
  handshake.
- Older `cloudstackmanagement.keystore` is deprecated and will no longer
  be used by mgmt server(s) for SSL negotiations and handshake. New
  keystores will be named `cloud.jks`, any additional SSL certificates
  should not be imported in it for use with tomcat etc. The `cloud.jks`
  keystore is stricly used for agent-server communications.
- Management server keystore are validated and renewed on start up only,
  the validity of them are same as the CA certificates.

New APIs:
- listCaProviders: lists all available CA provider plugins
- listCaCertificate: lists the CA certificate(s)
- issueCertificate: issues X509 client certificate with/without a CSR
- provisionCertificate: provisions certificate to a host
- revokeCertificate: revokes a client certificate using its serial

Global settings for the CA framework:
- ca.framework.provider.plugin: The configured CA provider plugin
- ca.framework.cert.keysize: The key size for certificate generation
- ca.framework.cert.signature.algorithm: The certificate signature algorithm
- ca.framework.cert.validity.period: Certificate validity in days
- ca.framework.cert.automatic.renewal: Certificate auto-renewal setting
- ca.framework.background.task.delay: CA background task delay/interval
- ca.framework.cert.expiry.alert.period: Days to check and alert expiring certificates

Global settings for the default 'root' CA provider:
- ca.plugin.root.private.key: (hidden/encrypted) CA private key
- ca.plugin.root.public.key: (hidden/encrypted) CA public key
- ca.plugin.root.ca.certificate: (hidden/encrypted) CA certificate
- ca.plugin.root.issuer.dn: The CA issue distinguished name
- ca.plugin.root.auth.strictness: Are clients required to present certificates
- ca.plugin.root.allow.expired.cert: Are clients with expired certificates allowed

UI changes:
- Button to download/save the CA certificates.

Misc changes:
- Upgrades bountycastle version and uses newer classes
- Refactors SAMLUtil to use new CertUtils

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-08-28 12:15:11 +02:00
Wei Zhou
4a77a79949 CLOUDSTACK-9462: Build packages on Ubuntu 14.04/16.04 and support tomcat6/tomcat7
Changes
(1) add systemd support in debian/control and debian/rules for 16.04
(2) add python-setuptools in Build-Depends in debian/control
(3) seperate cloudstack-management.service and cloudstack-management.default for CentOS7 and Ubuntu 16.04
(4) add server7-ssl.xml and server7-nonssl.xml in management installation
(5) link /usr/share/cloudstack-management/lib and /usr/share/cloudstack-management/bin to correct path (tomcat6 or tomcat7)
(6) link /etc/cloudstack/management/server.xml to correct file path (server-nonssl.xml or server7-nonssl.xml)
(7) remove *.zip from .gitignore to avoid build error caused by missing /vhds/test.vhd.zip

Instruction
(1) build packages on Ubuntu 16.04: dpkg-buildpackage -uc -us
    Output on Ubuntu 16.04:
-rw-r--r-- 1 root root      4090 Feb 17 10:12 cloudstack_4.10.0.0-SNAPSHOT_amd64.changes
-rw-r--r-- 1 root root      1235 Feb 17 09:53 cloudstack_4.10.0.0-SNAPSHOT.dsc
-rw-r--r-- 1 root root   8018248 Feb 17 09:53 cloudstack_4.10.0.0-SNAPSHOT.tar.xz
-rw-r--r-- 1 root root  91868746 Feb 17 10:11 cloudstack-agent_4.10.0.0-SNAPSHOT_all.deb
-rw-r--r-- 1 root root     52882 Feb 17 10:12 cloudstack-cli_4.10.0.0-SNAPSHOT_all.deb
-rw-r--r-- 1 root root  98556216 Feb 17 10:08 cloudstack-common_4.10.0.0-SNAPSHOT_all.deb
-rw-r--r-- 1 root root     52864 Feb 17 10:12 cloudstack-docs_4.10.0.0-SNAPSHOT_all.deb
-rw-r--r-- 1 root root    585434 Feb 17 10:12 cloudstack-integration-tests_4.10.0.0-SNAPSHOT_all.deb
-rw-r--r-- 1 root root 323459934 Feb 17 10:10 cloudstack-management_4.10.0.0-SNAPSHOT_all.deb
-rw-r--r-- 1 root root    442656 Feb 17 10:12 cloudstack-marvin_4.10.0.0-SNAPSHOT_all.deb
-rw-r--r-- 1 root root  87037576 Feb 17 10:12 cloudstack-usage_4.10.0.0-SNAPSHOT_all.deb

(2) setup tomcat6/tomcat7 on management server:
    tomcat6: cloudstack-setup-management --tomcat6
    tomcat7: cloudstack-setup-management --tomcat7

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-04-07 18:41:24 +05:30
Milamber
6051fa503a Fix a little issue from PR1610 if the db.properties file hasn't EOL character at the end of file
And some improvements about the dir/file using variables
2016-08-30 08:29:06 +01:00
Wido den Hollander
343ea6098e
packaging: Add db.X.driver=jdbc:mysql to db.properties on upgrade
This is required afther the upgrade to 4.9.0 and for convience we
add this to the configuration so our users do not have to.
2016-07-12 10:13:23 +02:00
Felix Geyer
b77198def5 Use invoke-rc.d instead of service to stop tomcat.
Debian policy requires that invoke-rc.d is used.

Signed-off-by: Wido den Hollander <wido@widodh.nl>
2015-03-05 14:39:54 +01:00
Felix Geyer
71b42e266f Use /bin/sh and set -e uniformly in maintainer scripts.
Signed-off-by: Wido den Hollander <wido@widodh.nl>
2015-03-05 14:35:53 +01:00
Felix Geyer
6ce9729580 Add DEBHELPER tokens to maintainer script.
dh_* tools insert their scripts there.

Signed-off-by: Wido den Hollander <wido@widodh.nl>
2015-03-05 14:35:53 +01:00
Rohit Yadav
b9f705f238 debian: remove old cache after upgrade
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit d4ead2c72ad8d761b87e1672552a67c7cfeff51b)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-07 01:39:43 +05:30
Rohit Yadav
4179ccbf55 debian: stop tomcat6 after installing cloudstack-management
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-09-12 17:34:44 +02:00
Wei Zhou
57ba367f3c CLOUDSTACK-5042: change cloud.keystore to cloudmanagementserver.keystore and install it (cherry picked from commit de448ec4792eda5b47d79b26e9cb8ce96a2b22f4) 2013-11-08 09:00:29 +01:00
Wido den Hollander
a773ed88b7 debian: Management server packaging fixes
We should be carefull what we package since all configuration should
be in /etc/cloudstack/management

Signed-off-by: Wido den Hollander <wido@widodh.nl>
2013-04-05 16:13:42 +02:00
Wido den Hollander
d80d8d8a67 Remove db-enc.properties
This seemed to be used with Ant, but there is no other reference to this file.

It shouldn't be here and isn't used. It only confuses people.
2013-04-04 08:51:38 +02:00
Wido den Hollander
44a0facd38 debian: Copy management server configuration from old location
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
aee6fc3bce debian: Copy the contents of the old ~cloud directory to the new location 2013-03-12 14:26:10 +01:00
Wido den Hollander
579b02756f debian: Change the homedir of the user 'cloud' 2013-03-05 16:10:38 +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