13. 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
AlfrescoInstallation
15. Alfresco SPK Operations
AlfrescoSPK
Choose
a 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
16. AlfrescoSPK
• 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
18. AlfrescoSPK
Vagrantfile – community-allinone
Vagrant.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
end
End
https://artifacts.alfresco.com/.../releases/.../chef-alfresco-0.6.25.tar.gz
19. AlfrescoSPK
Vagrantfile – enterprise-clustered
Vagrant.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
20. AlfrescoSPK
Vagrantfile –Packer Plugin configuration
Vagrant.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”
21. AlfrescoSPK
Try it yourself!
# Clone SPK repo
git clone https://github.com/Alfresco/alfresco-spk
# Install Vagrant Packer Plugin
vagrant plugin install vagrant-packer-plugin
cd alfresco-spk/stacks/community-allinone
# Or build your own Vagrantfile and instance template(s)
# Run the stack locally
vagrant up
# Build immutable images (default to Vagrantbox)
vagrant packer-build
23. Wrappingup
[Go Live]
Configure
orchestration
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
24. Wrappingup
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
26. Wrappingup
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.
Based on Chef, a Configuration Management
With chef-alfresco we can do deep configuration – much more than installer
Idempotency ensures Continuous runs and therefore Continuous Delivery
Is not monolithic – is a 10kb configuration file that gets executed by a chef client into the box
Based on artifacts.alfresco.com – alfresco customer will be able to configure chef-alfresco with their nexus credentials to get the enterprise version
Mention Packer and Vagrant Packer Plugin
SPK comes with 2 built-in stacks (Vagrantfiles)
Packer is the engine that builds images and sets the image nature
instance_template_json_path=[“my_instance_templates/share.json”,” my_instance_templates/solr.json”]
config.packer_build.cookbooks_url = https://artifacts.alfresco.com/.../releases/.../chef-alfresco-0.6.25.tar.gz
This configuration uses chef-alfresco as provisioning “engine”
Vagrant Packer Plugin is not alfresco nor chef specific!
Don’t panic if you don’t know what Berkshelf is
Use alfresco-spk github repo to run the pre-built stacks.
Then copy the files into your own projects and tweak configuration beased on your needs