Alfresco Tech Talk Live #95Alfresco Software Provisioning Kit (Enzo Rivello, Maurizio Pillitu)
About us
Maurizio (maoo) Pillitu• Alfresco DevOps• Before, 30 months of Alfresco
Consultancy • Lead Developer of
– https://github.com/Alfresco/chef-alfresco
About us
Alfresco DevOpsKeep the lights on• Public services (activiti|my.alfresco.com,
Alfresco Online Trials)• Internal infrastructure• Internal projects (QA, Engineering, Sales,
Marketing, ...)Automate all the things• Automation across the borders
– Technologies– Departments
• Integration• Evangelisation
Alfresco SPKDesign|Run|Integrate Alfresco stacks
AgendaAgenda
• The Challenges• Alfresco Installation• Alfresco SPK• Wrapping up
The Challenges
ChallengesThe hosting choice• Myriads of Cloud Providers
– AWS, Google Compute, Rackspace, OpenShift, Tutum, …• Myriads of Orchestration Tools
– Cloudformation, Beanstalk, Kubernetes, Terraform, Cloudify/Tosca, Mesos, Brooklyn, …
Provisioning challenges• Distributed architectures• Articulated provisioning process• Alfresco Installer limitations
Provisioning
Solutions• Alfresco Installation
– Customisable/Configurable– Modular– Versionable– Portable
• Alfresco SPK– Define/reuse a stack– Test a stack locally– Create Official Alfresco Images (Marketplace AMIs, Vagrant Boxes, …)– Create Custom Images– Integrate CI tools with image building process (release pipeline
integration)– Integrate orchestration tools to bootstrap immutable images (go live)
Provisioning
About us
Enzo Rivello• 3 months of Alfresco Devops
– Activiti Team• Before, Playstation DevOps• Lead Developer of
– https://github.com/Alfresco/alfresco-spk– https://github.com/Alfresco/vagrant-pac
ker-plugin• Follow
– https://www.alfresco.com/blogs/devops– https://github.com/enzor
Alfresco Installation
Instance Lifecycle
Alfresco Installation
Stack Genesis
RootImage(distro) <provision> <bootstrap>
<full provisioning>
ID4 IPs
ID
Stack Engine
AlfrescoImage
(tiered) Solr 2
Share1
Share 2
Solr 1
Instance Lifecycle
Alfresco Installation
Stack Genesis
RootImage(distro) <provision> <bootstrap>
<full provisioning>
ID4 IPs
ID
Stack Engine
AlfrescoImage
(tiered) Solr 2
Share1
Share 2
Solr 1
Chef Alfresco (beyond Alfresco Installer)• Cool logo• Component-based: repo, share, solr, aos and
more• Additional components: haproxy, nginx and more• Supports 3 run modes (full-provisioning,
provisioning-only, bootstrap-only)• Any Alfresco configuration can be customised• Can run continuously (install on top of an
installation)• Downloads artifacts (VS Alfresco Installer
monolithic installation)– Maven compatible (uses artifacts.alfresco.com by
default)– Use Maven repository of your choice– (optional) Use URL or file-system to resolve
artifacts• Open Source, 68 releases, 11 contributors -
https://github.com/Alfresco/chef-alfresco
Alfresco Installation
Alfresco SPKand the Vagrant Packer Plugin
Alfresco SPK OperationsAlfresco SPK
Choosea stack
Browse stack examples provided by the SPK
Run/Tweak
Spin up a stack locally using Virtualbox or
VmWare
Build Images
Define Alfresco immutable images
Integrate
Run the CI and orchestration tool
of your choice
Alfresco SPK
• Stacks (Vagrantfile)– community-allinone– enterprise-clustered (share + solr)
• Instance templates– community-allinone.json– share.json– solr.json
SPK Provided Stacks
Configuration items• Instance template(s) (JSON), which contain
– Chef Alfresco Attributes– Image building configuration (Packer)– Local run (Vagrant)
• Vagrantfile to define the stack and reference instance template(s)– Packer Plugin common configuration– Local Vagrant run common configuration
Alfresco SPKInstance template – Chef Alfresco components{ "name": ”...", "alfresco" : { "components" : <alfresco_components> }}
["haproxy","nginx","tomcat","transform","repo","share","solr","mysql"]
Allinone components
["haproxy","nginx","tomcat","transform","repo","share"]
Share components
["haproxy","tomcat”,"repo","transform","solr"]Solr components
Alfresco SPK
Vagrantfile – community-allinoneVagrant.configure("2") do |config|
# Source Image configuration config.vm.box = "<vagrant_box_name>" config.vm.box_url = "<vagrant_box_url>”
# Vagrant up configuration instance_template = JSON.parse("<instance_template_json_path>") config.vm.provision "chef_solo" do |chef| chef.json = instance_template chef.recipe_url = "<chef_alfresco_tar_url>" instance_template['run_list'].each do |recipe| chef.add_recipe recipe end endEnd
https://artifacts.alfresco.com/.../releases/.../chef-alfresco-0.6.25.tar.gz
Alfresco SPK
Vagrantfile – enterprise-clusteredVagrant.configure("2") do |config|
# Source Image configuration config.vm.box = "<vagrant_box_name>" config.vm.box_url = "<vagrant_box_url>”
# Vagrant up multi-machine configuration ['share','solr'].each do |role| config.vm.define role do |instance| instance_template = JSON.parse("<#{role}.json >") config.vm.provision "chef_solo" do |chef| chef.json = instance_template chef.recipe_url = "<chef_alfresco_tar_url>" instance_template['run_list'].each do |recipe| chef.add_recipe recipe end end end end
Alfresco SPK
Vagrantfile –Packer Plugin configurationVagrant.configure("2") do |config|
# Mandatory Vagrant Packer Plugin configuration config.packer_build.instance_templates = [”share.json”,”solr.json”]
# Optional Chef provisioning configuration config.packer_build.cookbooks_url = “<chef-alfresco_tar_gz_url>” config.packer_build.cookbooks_username = “<chef-alfresco_tar_gz_username>” config.packer_build.cookbooks_password = “<chef-alfresco_tar_gz_password>”
# Chef Databags configuration config.packer_build.databags_url = “<databags_tar_gz_url>” config.packer_build.databags_username = “<databags_username>” config.packer_build.databags_password = “<databags_password>”
# Alternative for Chef cookbooks configuration (using Berkshelf) # config.packer_build.berksfile = “Berksfile”
Alfresco SPK
Try it yourself!# Clone SPK repogit clone https://github.com/Alfresco/alfresco-spk
# Install Vagrant Packer Pluginvagrant plugin install vagrant-packer-plugin
cd alfresco-spk/stacks/community-allinone# Or build your own Vagrantfile and instance template(s)
# Run the stack locallyvagrant up
# Build immutable images (default to Vagrantbox)vagrant packer-build
Wrapping up
Wrapping up
[Go Live]Configure
orchestrati
on tools & CI
[Image Build]Vagrant packer-
build
[Tweak and Local run]Vagrant up
[Configuration]Choose an SPK stack and play with Vagrantfile and instance
templates
Go Live – Zero to Hero
Wrapping up
Infrastructure as Code delivered
• Revamped installation experience– Component-based installation– Controls provisioning and bootstrap phases
https://github.com/Alfresco/chef-alfresco
• Reusable instance templates• Reusable images• Integration with cloud providers and orchestration
tools
https://github.com/Alfresco/alfresco-spk
SPK
Wrapping up
SPK in Alfresco• AWS Marketplace AMIs
– Alfresco 5.1 Enterprise Allinone– Alfresco 5.1 Enterprise Allinone + Records Management– Alfresco Activiti Enterprise
• Online Trials• Offline Trials / Sales Demos• Alfresco Benchmark• Alfresco Infrastructure• Alfresco Cloud
Wrapping up
Roadmap• Support additional Linux/Unix OSes• Publish Alfresco Vagrant boxes for existing instance templates
– allinone, share, solr, …• Add (seamless) integration with orchestration tools
– Terraform, Cloudformation, Kubernetes, …• Integrate with Alfresco SDK• Improved docs for advanced Chef users• Publish chef-alfresco into Chef Supermarket
Product capabilities, timeframes and features are subject to change and should not be viewed as Alfresco commitments.
LinksLinksCode• https://github.com/Alfresco/chef-alfresco• https://github.com/Alfresco/alfresco-spk• https://github.com/Alfresco/vagrant-packer-plugin
Icons in the presentation• http://www.flaticon.com/free-icon/three-books_74982• http://www.flaticon.com/free-icon/puzzle_69154• http://www.flaticon.com/free-icon/man-sprinting_67001• http://www.flaticon.com/free-icon/closed-cardboard-box-with-packing-tape_65843• http://www.flaticon.com/free-icon/recycle-reuse_25274• http://www.flaticon.com/free-icon/light-bulb_34386• http://www.flaticon.com/free-icon/robot-with-server_77744
Thanks!@Alfresco
Follow us on