Alfresco spk-alfresco-day

28
Alfresco Tech Talk Live #95 Alfresco Software Provisioning Kit (Enzo Rivello, Maurizio Pillitu)

Transcript of Alfresco spk-alfresco-day

Page 1: Alfresco spk-alfresco-day

Alfresco Tech Talk Live #95Alfresco Software Provisioning Kit (Enzo Rivello, Maurizio Pillitu)

Page 2: Alfresco spk-alfresco-day

About us

Maurizio (maoo) Pillitu• Alfresco DevOps• Before, 30 months of Alfresco

Consultancy • Lead Developer of

– https://github.com/Alfresco/chef-alfresco

Page 3: Alfresco spk-alfresco-day

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

Page 4: Alfresco spk-alfresco-day

Alfresco SPKDesign|Run|Integrate Alfresco stacks

Page 5: Alfresco spk-alfresco-day

AgendaAgenda

• The Challenges• Alfresco Installation• Alfresco SPK• Wrapping up

Page 6: Alfresco spk-alfresco-day

The Challenges

Page 7: Alfresco spk-alfresco-day

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

Page 8: Alfresco spk-alfresco-day

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

Page 9: Alfresco spk-alfresco-day

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

Page 10: Alfresco spk-alfresco-day

Alfresco Installation

Page 11: Alfresco spk-alfresco-day

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

Page 12: Alfresco spk-alfresco-day

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

Page 13: Alfresco spk-alfresco-day

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

Page 14: Alfresco spk-alfresco-day

Alfresco SPKand the Vagrant Packer Plugin

Page 15: Alfresco spk-alfresco-day

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

Page 16: Alfresco spk-alfresco-day

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

Page 17: Alfresco spk-alfresco-day

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

Page 18: Alfresco spk-alfresco-day

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

Page 19: Alfresco spk-alfresco-day

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

Page 20: Alfresco spk-alfresco-day

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”

Page 21: Alfresco spk-alfresco-day

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

Page 22: Alfresco spk-alfresco-day

Wrapping up

Page 23: Alfresco spk-alfresco-day

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

Page 24: Alfresco spk-alfresco-day

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

Page 25: Alfresco spk-alfresco-day

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

Page 26: Alfresco spk-alfresco-day

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.

Page 27: Alfresco spk-alfresco-day

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

Page 28: Alfresco spk-alfresco-day

Thanks!@Alfresco

Follow us on