Solum Application Lifecycle Management for OpenStack
Solum PaaS/ALM for OpenStackDevdatta Kulkarni, PTL, [email protected](irc: devkulkarni)
OutlineProject goalsEarly trials and use-cases Solum architectureFactors influencing adoptionUpcoming featuresQuestion and answers2
OpenStack User survey April 2016
3
What is Solum?System which provides a declarative model for application developers to deploy and run their applications on OpenStack starting from applications source code
Why should you care?For developers, Solum provides an easy-to-use platform for building, testing, and deploying applications on OpenStack clouds
For operators, Solum provides ability to make their OpenStack cloud more useful to their application developers by enabling CI/CD capabilities for applications to OpenStack clouds
4
4
Project goalsDeveloper ProductivityAbility to perform CI/CD, integration with github, integration with existing CI solutions
Application Stack FlexibilityAbility to support applications written in different languages
Add-On Services ExtensibilityAbility to support different add-on services
Application PortabilityAbility to deploy applications across different OpenStack clouds
5
Solum - System for building and deploying applications to OpenStack Clouds Solum in context with other OpenStack servicesCinder (Block)Manila (File)Trove (DB)Neutron (Network)Nova (VM)Glance(Image)Magnum(Container orchestration & lifecycle)Heat (Orchestration)Solum(App lifecycle)Keystone(Identity)Horizon(UI)Murano(App catalog)Mistral(Workflow)Ironic (Baremetal)Swift (Object)Barbican(Key Mgmt)Ceilometer(Monitoring)6
Early trials & usecases7
Solum in the wild
8
Solum in useUsers/use-cases:WiproRackspacePaderborn UniversityInterest / References:
9
https://blog.jasoncallaway.com/http://www.tcpcloud.eu/en/blog/2015/06/27/beyond-horizon-part-1/http://ronaldbradford.com/blog/using-your-devstack-cloud-2016-04-05/http://egonzalez.org/nova-docker-driver/https://www.ctl.io/developers/blog/post/openstack-solum-on-the-centurylink-cloud/
How to use existing Jenkins setup with Solum for performing seamless application CI/CD on OpenStack?
Solum features used: App image storage in Glance, API to deploy a pre-built DU
Usecase 1 Wipro: Jenkins for CI, Solum for CDContinuous Integration with JenkinsContinuous Deployment with Solum10
Easily deploy applications to Carina (container cluster service from Rackspace)
Usecase 2 Rackspace: Deploying apps to Docker SwarmSolum features used: Pluggable deployer architecture; Built a Carina specific deployer in Solum
11
Easily deploy applications to Virtual Machines
Usecase 3 Rackspace: Deploying apps to VMsSolum features used: Pluggable deployer architecture, Used Solums Heat deployer12
Continuous integration and testing of Chef recipes
Solum features used:Custom languagepacks: Developed a custom languagepack containing chef testing tools (rubocop, foodcritic, chef-spec, test-kitchen)https://github.com/openstack/solum/tree/master/examples/language-packs/chefIntegrate with Private github repositories
Usecase 4 Rackspace: Testing Chef recipes13
Considering to build and deploy services from source code with an existing Heat template
Useful Solum features: Build application DUs,; integration with public/private git repositories
Usecase 5 Paderborn Univ: Deploying multiple services14
14
Solum architecture 15
Solum abstractions and conceptsLanguagepack (LP)AppDeployment Unit (DU)WorkflowParameters16
Solum abstraction - Languagepack (LP)A Docker image that contains libraries, packages, and tools required for testing, building, compiling an applicationExamples:Python applications need: pip, tox, python-mysqldbJava applications need: jdk, jre, mavenChef recipes: chefdk, rubocop, test-kitchen, foodcriticApplication-specific languagepacksDifferent languagepacks for different life-cycle stages of an applicationTesting libraries may be different than libraries for building application artifactsMulti-language applicationsCombine all libraries and tools from different languages in a single languagepackOperator-defined languagepacks, user-defined languagepacks
$ solum languagepack create python https://github.com/rackspace-solum-samples/solum-languagepack-python.git
17
Solum abstraction - Languagepack Example: Python
FROM ubuntu:preciseMAINTAINER Murali Allada
RUN apt-get -yqq updateRUN apt-get -yqq install python-pipRUN apt-get -yqq install python-dev
COPY build.sh /solum/bin/https://github.com/rackspace-solum-samples/solum-languagepack-python
#!/bin/bash
# Check if pip is installedpip help[[ $? != 0 ]] && echo python-pip is not installed. && exit 1
# Install app dependenciescd /apppip install -r requirements.txtbuild.shDockerfile18
Solum sample languagepackshttps://github.com/rackspace-solum-samples/solum-languagepack-pythonhttps://github.com/rackspace-solum-samples/solum-languagepack-javahttps://github.com/rackspace-solum-samples/solum-languagepack-nodejshttps://github.com/rackspace-solum-samples/solum-languagepack-nodejswithmongohttps://github.com/rackspace-solum-samples/solum-languagepack-wordpresshttps://github.com/openstack/solum/tree/master/examples/language-packs/chef19
19
Other languagepacks to support
20
Solum abstraction - AppDeclarative application definition source code repositoryrun commandportlanguagepack
version: 1name: cherrypydescription: python web applanguagepack: pythonsource: repository: https://github.com/rackspace-solum-samples/solum-python-sample-app.git revision: masterworkflow_config: run_cmd: python app.pyports:- 80$ solum app register --app-file appfile.yamlReason to specify languagepack: App developer knows what libraries are required by their app21
Solum concept - Deployment Unit (DU)Docker image that is formed from the languagepack image with applications source code added to itDU = LP + application source codeSolum guarantees the DU contractApplication source code available at a known location on the DU image /appHow to build a DU?Construct Dockerfile with languagepack as the base image, application source code injected, run command as the entry pointBuild the DU image from this DockerfileLP and DU storageGlance and Swift
22
DU Deployment: Supported optionsNova-docker driverWorks with DU images stored in Glance
Heat + VM image + DU location provided through user_data sectionWorks with DU images stored in Swift/Docker registry1-1 mapping of DU container to VM
Carina deployer in Rackspaces Solum environmentWorks with Rackspace Carina
23
Solum abstraction - WorkflowAbstraction to represent execution of application deployment action
Supported application deployment actions (workflows)Build DURun unit tests and build DURun unit tests, build DU, and deploy DUBuild DU and deploy DUDeploy a pre-built DU
Workflows can be triggered from github webhooks
$ solum app deploy cherrypy24
Solum concept ParametersApplication parametersServices needed by an applicationE.g.: Connection parameters for relational database such as TroveThese are injected into the DUEnvironmental parametersParameters intended for Solum to useE.g.: Carina cluster credentials Parameters specified at:application registration timeapplication deploy time (upcoming feature)$ solum app create --app-file appfile.yaml --param-file params.yaml25
Solum sample appshttps://github.com/openstack/solum/blob/master/examples/apps/python_app.yamlhttps://github.com/openstack/solum/blob/master/examples/apps/java_app.yamlhttps://github.com/rackspace-solum-samples/solum-wordpress-sample-apphttps://github.com/openstack/solum/blob/master/examples/apps/nodejs_app.yaml
26
Summary of current Solum featuresCreate languagepacksRegister, deploy, scale an appUpdate an app keeping the application URL sameSpecify application parameters when registering an appIntegration with public and private github repositories (via github webooks)Deploy app using different compute form factorsnova-dockerVMsContainer cluster (such as Docker Swarm)Environments (dev/test/staging/production)Possible by creating different app for each env and deploying same DU for each27
High-level ArchitectureSolumAPISolumWorkerSolumDeployerQueueQueueQueueSolumConductorHeatDatabaseGlance/SwiftBuilds LP; run unit tests; Build DUDeploys DUDecoupled architectureAsynchronous communication28
Factors influencing adoption29
Usage experienceLanguagepacksLanguagepacks built: python, java, php, nodejs, angularjs, chef testing toolsInternal test users at Rackspace tended to use operator defined languagepacksNeed to install appropriate OS packages in addition to the language libraries/toolspython-msqldb not sufficient, needed OS-level mysql packageLanguagepack creation is iterative processLearning curve how to lower this barrier is question?
AppsNeed for ease of application registration led to supporting interactive prompts for getting app information
Github webhooksStarted with support for public repositoriesInternal use-cases required adding support forPrivate repositoriesCLI support for registering deploy keysCLI support for two-factor authentication
30
Building LPs and DUsHow to provide isolated environment for building LP and DU Docker images and running untrusted unit test scripts?
Isolated git clone with resource constraints on CPU, memory, disk on containers running unit testing scriptsRunning unit testing scripts as unprivileged user inside a containerTimeout mechanism to constrain and limit the running time of unit testing scriptsEasy-to-use CLI for operator to kill long running (malicious) containers
On Rackspace version of Solum using Carina for building LPs, running unit tests, and building DUsThis provides a natural isolated environment
31
ReliabilityExperienceDU and LP images saved in Glance and Swift using docker save
Success rate of building and saving archives improved from 80% to 98.8%Retry mechanism for performing git actions (git clone) and Docker actions (build, save, load)Better use of Swift client to upload/download archivesRace condition handling in docker load and docker rmiPerform docker rmi only for DU images on the worker node and not for LP imagesSmall risk of Worker running out of disk space
32
PerformanceExperimental setup - 2 servers, 10 workers, 10 deployers, Deployer: Heat with deployment to VMsApplications used - Mix of Python and Java applicationsDeployed 330 applications in 30 minutesResults330 Queued3 in ERROR_STACK_CREATE_FAILED327 in READY (99.09%)Average time from QUEUED to READY = 348 seconds (6.5 minutes)36.8 seconds for unit testing99 seconds to build DU41 seconds to deploy DU via Heat120 seconds to start the web app (wget, docker load, docker run)Other time spent in queuing.We are seeing faster times when using Carina deployer (within Rackspace Solum setup)33
Community involvement
http://stackalytics.com/?release=all&project_type=openstack&module=solum-group34
Upcoming features35
Key Features for NewtonMulti-tier/micro-service applicationsCurrently possible using the parameter featureWe plan to build native support in Solum during Newton (app file format changes)Infrastructure choice for deploying applicationsOperator vs. App developer choiceVMs for isolationBare metal for performanceContainer clusters for packagingApplication monitoringDU monitoring is the keyLeverage Heat + Ceilometer
36
Other Features
Health monitoring of Solum services and apps
Documentation, examples37
Solum Features/Improvements
ConclusionsGood newsSolum is getting interest from users.RackspaceWiproPaderborn UniversityCurrent capabilitiesCI/CD of applications starting from app source code natively on OpenStackBuilding custom languagepacksIntegration with Github (public and private)CLIExciting features have been planned for Newton38
ReferencesWiki:https://wiki.openstack.org/wiki/SolumSetting up development environment: https://wiki.openstack.org/wiki/Solum/solum-development-setupMeetings:Tuesdays 1700 UTC in #openstack-meeting-3IRC:Channel: #solum on freenodeCode:https://github.com/openstack/solumhttps://github.com/openstack/python-solumclientDemo: https://vimeo.com/163874891 https://vimeo.com/143425822
39
ONE FANATICAL PLACE | SAN ANTONIO, TX 78218US SALES: 1-800-961-2888 | US SUPPORT: 1-800-961-4454 | WWW.RACKSPACE.COM RACKSPACE LTD. | RACKSPACE AND FANATICAL SUPPORT ARE SERVICE MARKS OF RACKSPACE US, INC. REGISTERED IN THE UNITED STATES AND OTHER COUNTRIES. | WWW.RACKSPACE.COMUSThank you
40
FROM ubuntu:14.04 RUN apt-get -yqq update && \ apt-get -yqq install openjdk-7-jdk RUN apt-get -yqq install maven ENV JAVA_HOME /usr/lib/jvm/java-7-openjdk-amd64 COPY bin/build.sh /solum/binhttps://github.com/rackspace-solum-samples/solum-languagepack-javamvn -v[[ $? != 0 ]] && echo "maven is not installed" && exit 1
# buildcd /appmvn -q packageDockerfilebuild.sh Solum abstractions - Languagepack Example: Java41
https://github.com/rackspace-solum-samples/solum-languagepack-wordpressDockerfile--------------Install PHP, required Apache modulesbuild.sh------------EmptyApp run command--------------------------Setting the environment variablesand starting the app Solum abstractions - Languagepack Example: Wordpress42
Basic operational flowAPI receives a request to build and deploy an appAPI sends the request to the WorkerWorker downloads the specified LP from configured storage (Swift or Glance)Worker builds the DU and stores itWorker informs the Deployer to deploy the DUDeployer deploys the DU by calling Heat43
Related ProjectsDeisCloudFoundryOpenShift
44
PerformanceExperimental setup (2 servers, 10 workers, 10 deployers)MemTotal: 8171504 kBArchitecture: x86_64CPU(s): 8Vendor ID: GenuineIntelCPU MHz: 2593.604Hypervisor vendor: XenL1d cache: 32KL1i cache: 32KL2 cache: 256KL3 cache: 20480K45
OpenStack User survey April 2016
46