35 Commits

Author SHA1 Message Date
Rohit Yadav
d90341ebf1
cloudstack: add JDK11 support (#3601)
This adds support for JDK11 in CloudStack 4.14+:

- Fixes code to build against JDK11
- Bump to Debian 9 systemvmtemplate with openjdk-11
- Fix Travis to run smoketests against openjdk-11
- Use maven provided jdk11 compatible mysql-connector-java
- Remove old agent init.d scripts

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2020-02-12 12:58:25 +05:30
Rohit Yadav
b1783fbcf1
travis: use https based maven repo mirror (#3845)
Travis has been failing lately as it requires that repositories use
https:// URLs.

Reference:
https://blog.sonatype.com/central-repository-moving-to-https

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2020-01-28 18:50:37 +05:30
Rohit Yadav
408cce48a5
travis: fail fast if --with-marvin fails with nose (#3024)
* travis: fail fast if --with-marvin fails with nose

Install missing dependency pycrypto.
This fixes issue with recent Travis runs which gave incorrect results
around smoketests with simulator where each test run failed with an
error like "nosetests: error: no such option: --with-marvin".

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-12-07 23:45:19 +05:30
Rafael Weingärtner
bfe4cb0c41
Fix Python code checkstyle execute by "systemvm\test\runtests.sh" (#2576)
* dependencies update

* Add extra blank line required by ...!?

* fix W605 invalid escape sequence and more blank lines

* print all installed python packages versions
2018-04-18 13:07:37 -03:00
Rohit Yadav
85aee8d18d CLOUDSTACK-10013: SystemVM codebase refactorings and improvements
- Refactors and simplifies systemvm codebase file structures keeping
  the same resultant systemvm.iso packaging
- Password server systemd script and new postinit script that runs
  before sshd starts
- Fixes to keepalived and conntrackd config to make rVRs work again
- New /etc/issue featuring ascii based cloudmonkey logo/message and
  systemvmtemplate version
- SystemVM python codebase linted and tested. Added pylint/pep to
  Travis.
- iptables re-application fixes for non-VR systemvms.
- SystemVM template build fixes.
- Default secondary storage vm service offering boosted to have 2vCPUs
  and RAM equal to console proxy.
- Fixes to several marvin based smoke tests, especially rVR related
  tests. rVR tests to consider 3*advert_int+skew timeout before status
  is checked.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-12-23 09:22:44 +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
Rohit Yadav
b81683b742
Merge branch '4.8' into 4.9 2016-12-02 22:29:16 +05:30
Rohit Yadav
7da423157b CLOUDSTACK-9584: Fix Travis to cleanup apt repo before pkg installation
This fixes an env issue that cleans apt repo pkg/cache, before installing new
packages.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-12-02 22:21:06 +05:30
Rohit Yadav
7a96d32c7e
CLOUDSTACK-9584: run component tests in Travis run
This would run additional component tests in Travis run

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-11-28 13:47:50 +05:30
Rohit Yadav
91c9fc9f6e travis: use ipmitool from ubuntu repository
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-05-29 16:14:28 +05:30
Rohit Yadav
4d5e8df2f9 travis: Use patched version of ipmitool for tests
- For out-of-band management feature (CLOUDSTACK-9299) use patched version of
  ipmitool that would work on trusty travis machines
- The ipmitool used is from xenial/16.04 release with patch from RedHat
  https://bugzilla.redhat.com/show_bug.cgi?id=1286035
- Installs ipmitool from xenial repositories to get all the dependencies
  and then install patched deb version
- Skip test if the known failure occurs

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-05-12 11:05:40 +05:30
Rohit Yadav
07564469e9 CLOUDSTACK-9299: Out-of-band Management for CloudStack
Support access to a host’s out-of-band management interface (e.g. IPMI, iLO,
DRAC, etc.) to manage host power operations (on/off etc.) and querying current
power state in CloudStack.

Given the wide range of out-of-band management interfaces such as iLO and iDRA,
the service implementation allows for development of separate drivers as plugins.
This feature comes with a ipmitool based driver that uses the
ipmitool (http://linux.die.net/man/1/ipmitool) to communicate with any
out-of-band management interface that support IPMI 2.0.

This feature allows following common use-cases:
- Restarting stalled/failed hosts
- Powering off under-utilised hosts
- Powering on hosts for provisioning or to increase capacity
- Allowing system administrators to see the current power state of the host

For testing this feature `ipmisim` can be used:
https://pypi.python.org/pypi/ipmisim

FS:
https://cwiki.apache.org/confluence/display/CLOUDSTACK/Out-of-band+Management+for+CloudStack

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-05-12 11:05:40 +05:30
Rohit Yadav
87b431c0f3 travis: Fix simulator tests and optimize default global configs
- Migrate to trusty based Travis VMs
- Increase tests across five build matrices
- Fix xunit-reader output, include time
- Fix pip/python usage, pkg installation
- Build CloudStack in parallel with -T4
- Deploy database with optimized global settings

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-04-07 02:19:52 +05:30
Rafael da Fonseca
e8c0c8f849 Reclaim disk space from /tmp caused by long running mysql daemon 2015-06-26 01:16:05 +02:00
Rafael da Fonseca
c980003c37 Cleanup stale files in /tmp which is filling up during some runs
Output status of disk and memory on build host
2015-06-26 00:54:25 +02:00
Rafael da Fonseca
12d52401f7 Add git status output to debug git fetch failures
Signed-off-by: Daan Hoogland <daan@onecht.net>

This closes #523
2015-06-25 11:29:13 +02:00
Rafael da Fonseca
6fd49e49a3 Add apache license header to script
Signed-off-by: Daan Hoogland <daan@onecht.net>

This closes #482
2015-06-21 15:13:27 +02:00
Rafael da Fonseca
b9f5d38772 Improve plugin dependency download Add download for midonet and juniper stuff, this increases runtime for a few minutes, may remove in future if travis show too much overhead
Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-06-21 15:13:27 +02:00
Rafael da Fonseca
0d671b9e54 Some of the plugin dependencies were'nt being properly resolved on the dependency:resolve-plugins mojo This adds a couple more dark magic sprinkles to make sure no dependencies will be downloaded at build time
Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-06-21 15:13:27 +02:00
Rafael da Fonseca
e4f09e9ebc Allow proper retry in pip install command
Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-06-21 15:13:27 +02:00
Rafael da Fonseca
5386e0f6b5 Travis reported another false negative, if paramiko was present but version too low for marvin, nosetests wouldn't run and result would be success
Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-06-21 15:13:26 +02:00
Rafael da Fonseca
773e4158b6 Print log data on after_failure.sh
Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-06-21 15:13:26 +02:00
Rafael da Fonseca
348bd2f3cc Use upstart to start mysql and get rid of the warnings
Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-06-21 15:13:26 +02:00
Rafael da Fonseca
e52f3ab932 Add urandom as random source in install.sh
Add urandom as random source in before_script.sh

Remove commented lines in before_script.sh

Remove commented lines in install.sh

Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-06-21 15:13:26 +02:00
Rafael da Fonseca
c4a38bdb0d Tomcat download is not doing anything except waste time and disk
Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-06-21 15:13:25 +02:00
Rafael da Fonseca
118f607942 Add some retry and debug to python packages install Sometimes after a full successful run, travis will fail due to not being able to parse tests output
Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-06-21 15:13:25 +02:00
Rafael da Fonseca
7838bfcc70 Add timeout to nc command, as it was waiting forever and not going through the while loop. This will make sure nc gets restared to retry in case something nasty is happening in the running process
host command not present in build env, switch to getent
second phase of dep download turning some error, print failure log

Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-06-21 15:13:25 +02:00
Rafael da Fonseca
c1c0382bf5 Don't sleep for a fixed amount of time, no use in continuing if repo is unavailable Check if DNS resolution is working properly when failure occurs
Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-06-21 15:13:25 +02:00
Rafael da Fonseca
b55ef551ca It seems the network failures last for a bit.. allow some sleeping time Add some verbosity for status checking
Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-06-21 15:13:24 +02:00
Rafael da Fonseca
f0dcd403e7 Second phase wan't running properly due to path issue Add extra echo command to make sure there's data in the pom
Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-06-21 15:13:24 +02:00
Rafael da Fonseca
f0e1c8908b Send output to oblivion because of this message in travis log view: This log is too long to be displayed. Please reduce the verbosity of your build or download the raw log.
Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-06-21 15:13:24 +02:00
Rafael da Fonseca
880f116a62 This is a quick fix to attempt to resolve most of the travis failures Most of the failures have been due to transient network failures, that are causing dependency artifact downloads to fail Maven does not have a way to retry this without restarting the whole build, so the mvn dependency plugin is the best bet Unfortunately, running a dependency:resolve on the project returns yet to be compiled dependencies, and causes it to fail... There is an option to excludeGroupIds and excludeArtifactIds in the docs for this goal, but unfortunately they don't seem to work This drafts a dummy pom in a quick and dirty way, just to download all the deps in one go, while retrying for RETRY_COUNT times if it fails
Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-06-21 15:13:24 +02:00
Abhinandan Prateek
1eb6f929ab CLOUDSTACK-8429: optimizing travis to run configurable set of tests only after configurable runs 2015-05-05 14:11:41 +05:30
Ian Duffy
b38d0b6b43 Fix RAT issue 2014-09-01 11:22:36 +01:00
Ian Duffy
26069aa377 [CLOUDSTACK-6115] Investigate the use of TravisCI for CloudStack integration testing 2014-09-01 10:56:44 +01:00