See Kaltura Install Packaging Project for the parent project.
The Continuous Integration system will be responsible for the automation of the following tasks:
- Overall build of the Kaltura platform packages against the master branch, release branches and approved pull-requests (for both nightly and stable releases).
- Pushing the packages to the install repositories.
- Perform a full Kaltura deployment on a test cluster.
- Perform automated testing of the installed server features via API calls and command line scripts, determining overall build stability for both clean install and version to version upgrades.
- Generate web-page build reports and email in case of fails.
- Distribute packaged/compiled API client libraries to respective language repositories.
An automatic approach to the build, test and release process has many advantages, most prominently, it significantly reduces the time to release new packages and verifies that packages were fully tested before being used in production. We’ve also listed some key advantages in our specific project -
- Release more often, faster, and provide nightly builds for advanced platform testers.
- Ensure new commits do not break existing functionality on the master branch.
- Allow contributors to make changes and additions with a higher level of security, knowing pull-requests are tested as part of the whole system in production mode, before being merged.
- Provide elaborate platform test reports before entering official manual QA phase.
This will be the general flow of each CI run.
- Versions of packages included in the new release will be updated in spec files.
- Additional required steps for the upgrade [SQL alter scripts, additional token replacements, etc] will be added to the postinst according to need
- The packages will be built
- Packages are uploaded to the repository using an SSH key
- Packages are distributed to Akamai
Following successful build, AMI instances are launched via EC2 CLI API, and Kaltura will be deployed on them.
All deployments will be done using self-signed SSL certificates.
- 2 fronts behind an HTTPs LB (a Linux machine running Apache configured to use the ProxyPass module)
- 1 Admin Console front
- 2 batch servers
- 2 sphinx servers
- 1 MySQL DB server (shall we also test replication?)
- 2 fronts behind an HTTPs LB (a Linux machine running Apache configured to use the ProxyPass module)
- 1 Admin Console front
- 2 batch servers
- 2 sphinx servers
- 1 MySQL DB server (shall we also test replication?)
Following successful deployment and upgrade of the Kaltura clusters, the test suites will be ran, and build & test reports will be generated.
All API calls and apps will be loaded over SSL.
The following test cases will be run in the following order, on each cluster deployment (both clean and upgrade). Nightly testing should run a complete regression coverage via API client libs, verifying the stability of the latest MASTER branch.
Check space on / partition
Check space on web partition
Check KDP3 version is correct by comparing KMC's config.ini with the actual last created KDP3 dir on disk.
Check KMC version is correct by comparing KMC's config.ini with the actual last created KDP3 dir on disk.
Check KDP3 version is correct by comparing KMC's config.ini with the actual last created HTML5 dir on disk.
Verify that all relevant processes (Apache, MySQL, Sphinx, batch, memcache, monit) are up and running on all machines in the cluster
Verify that all processes and crons are properly configured to run after system restart
Verify HTTPs call redirects for start page, KMC, Admin Console and testme. Perform curl request (with redirect follow) to each of the URLs, and test the response returned as expected:
- https://[DOMAIN]/ --- Verify Start Page
- https://[DOMAIN]/api_v3/testme/ --- Verify TestMe Console URL
- https://[DOMAIN]/index.php/kmc --- Verify KMC URL
- https://[DOMAIN]/admin_console/ --- Verify Admin Console URL
- https://[DOMAIN]/apps/studio --- Verify Universal Studio URL
Verify system restart behaviour (run 1 through 3 post restart)
Verify that processes (Apache, MySQL, Sphinx, batch, memcache) are being relaunched by monit after MANUAL kill (testing crash resurrection).
Verify new publisher account creation. Continue all following tests on this new partner account.
Verify profile ID creation.
Verify profile ID delete.
Test email logs for sent new publisher account activation email.
uiConf and file verifications -
Verify simple transcoding: Upload video, see complete transcoding flow finished successfully.
Verify reconversion: reconvert an existing asset, see complete transcoding flow finished successfully.
- Verify fallback transcoding: Rename the ffmpeg symlink. Upload video, see complete transcoding flow finished successfully. Rename the ffmpeg symlink back.
Verify clipping and trimming API
Verify clipapp index page loads
Run all client libraries and their respective unit-tests
Enable dropfolder plugin
Create a Local DropFolder
Test Bulk Upload XML that includes custom metadata fields and thumbnails.
Setup email notification for new entry event
Setup HTTP notification for entry change event
Create a new Entry
Check mail logs to see if email was sent.
Analytics verification
Upload captions
Search string in captions and entry metadata
Check the report API to see the play count
Curl playManifest to that Entry WITH a valid sview KS, see that the video returns
Thumbnail API verification:
- This test will have a stored prepared image to compare against
- Call the thmbnail API for second 2 of the new entry
- Use ImageMagick to compare the returned image against the stored test imaged
Verify Red5 is working - http://exchange.nagios.org/directory/Plugins/Software/FMS-monitor/details
- Verify YouTube distribution (create profile, distribute entry, query for success)
- Check the bandwidth report API to see bandwidth and storage counts
- Verify KS Access Control:
- Create an AC Profile with KS protection
- Assign it to a Video Entry
- Curl playManifest to that Entry without a KS, see that the video fails to return
- Create a Local XML DropFolder, copy a file to the folder, test the file was successfully pulled in to Kaltura, transcoded and that the XML metadata exists.
- Create a Remote Storage profile against an S3 Bucket, verify that content uploaded gets pushed to the S3 bucket.
- Verify Player - Use http://phantomjs.org/ to run base tests against player embed, playlist embed, thumbnail embed, and common player scenarios (play, pause, seek)
For each step in the CI cycle, execution time measurements will be performed and saved in order to analyze platform trends over time. The following CI steps will measured:
- Time it took to pull the code from git repositories.
- Time it took to build packages.
- Time it took to push packages to install repositories.
- Time it took to install each package on the test clusters (clean and upgrade).
- Time it took to run post-inst scripts per package.
- Time to run each unit-test.
- Aggregate time from pulling code till finish tests (complete cycle).
- Full test report available on a URL with the version-date combo.
- Header should show overall health status of the build - Percentage of fail/pass
- Per test, status (FAILED or PASSED), and if failed, show unit test error output. According to the following table:
Test File | Status | Execution Time | Details |
---|---|---|---|
test_xxx | PASSED | 12ms | |
test_yyy | PASSED | 100ms | |
test_zzz | FAILED | 876912ms | Output of what failed in the test |
Setup a mailing list for people to subscribe for reports via email. 3 types of emails:
- If RPM layer failed packaging - email subject: [PACKAGING_FAILED] Kaltura Release - {CORE.VERSION} - {BUILD.DATE}
- If any of the core unit tests failed - email subject: [CORE_FAILED] Kaltura Release - {HEALTH.PERCENT} - {CORE.VERSION} - {BUILD.DATE}
- If all tests passed successfully - email subject: [BUILD_READY] Kaltura Release - {CORE.VERSION} - {BUILD.DATE}
The body of the email will be a full table report of the test suite (as defined above in web reports).
- Nightly packages are built and saved into the /nightly/ folder.
- Pre-QA-Release packages are built and saved into the /release/ folder with respective release version and date.
- If Pre-QA-Release passes 100%, also distribute packaged/compiled client libraries to respective repositories: http://rubygems.org/ , https://www.npmjs.org/ , https://getcomposer.org/ https://pypi.python.org/
All code in this project is released under the AGPLv3 license unless a different license for a particular library is specified in the applicable library path.
Copyright © Kaltura Inc. All rights reserved.
Authors @jessp01, @zoharbabin and many others.