Date post: | 07-Jan-2017 |
Category: |
Technology |
Upload: | alfresco-software |
View: | 500 times |
Download: | 0 times |
Alfresco SPK Design|Run|Integrate Alfresco stacks
A bit about us
About us
Maurizio (maoo) Pillitu • Today, 365 days of Alfresco Devops • Before, 30 months of Alfresco Consultancy • Creator and maintainer of
– https://github.com/Alfresco/chef-alfresco – https://github.com/Alfresco/alfresco-spk
• Follow – https://www.alfresco.com/blogs/devops – https://github.com/maoo
About us
Alfresco Devops Keep the lights on • Public services (activiti|my.alfresco.com, Alfresco
Online Trials) • Internal infrastructure • Internal projects (QA, Engineering, Sales,
Marketing, ...) Automate all the things • Mostly inspire • Sometimes lead • Never impose
Stack Genesis and Lifecycle
Challenges Stack G
enesis
Where to install Alfresco • Myriads of Cloud Providers
– AWS, Rackspace, OpenShift, Tutum, … • Myriads of Orchestration Tools
– Cloudformation, Beanstalk, Kubernetes, Terraform, Cloudify/Tosca, Mesos, Brooklyn, …
How to install Alfresco • Alfresco is highly configurable • Alfresco is modular
Stack Design Stack G
enesis Alfresco Share 1
Alfresco Share 2
(E)LB
User
Alfresco Solr 1
Alfresco Solr 2
DB &
store
HTTP
HTTP Fail over
Instance Lifecycle Stack G
enesis
Root Image (distro) <provision> <bootstrap>
<full provisioning>
ID IP ID
Stack Engine
Alfresco Instance
Alfresco Image (Dered)
Stack Genesis
Instance Lifecycle Stack G
enesis
Root Image (distro) <provision> <bootstrap>
<full provisioning>
ID IP ID
Stack Engine
Alfresco Instance
Alfresco Image (Dered)
Stack Genesis
Alfresco Installation
Chef Alfresco VS Alfresco Installer – good things • Cool logo • (Alfresco) Component-based: repo, share, solr, aos, … • Additional components: haproxy, nginx, … • Supports 3 run modes
– full-provisioning - to spin up an Alfresco instance from a root Image
– provisioning-only - to create an immutable image – bootstrap-only - to boot a pre-baked immutable image
• Any Alfresco configuration can be customised • Can run continuously (install on top of an installation) • Artifacts from artifacts.alfresco.com (VS Alfresco Installer
monolithic installation) or any Maven Repository of your choice
• Open Source, 55 releases, 8 contributors - https://github.com/Alfresco/chef-alfresco
Alfresco Installation
Chef Alfresco VS Alfresco Installer – bad things • Not working on all platforms (currently working
on Centos 7.1 and Ubuntu 14.04, soon Centos 6.7 and Ubuntu 12/13)
• artifacts.alfresco.com is (currently) slow, causing longer provisioning runs
• Not on https://supermarket.chef.io (yet)
Alfresco Installation
Presenting Alfresco SPK
Instance Lifecycle Stack G
enesis
Root Image (distro) <provision> <bootstrap>
<full provisioning>
ID IP ID
Stack Engine
Alfresco Instance
Alfresco Image (Dered)
Presenting SPK
Instance Lifecycle Stack G
enesis
Root Image (distro) <provision> <bootstrap>
<full provisioning>
ID IP ID
Stack Engine
Alfresco Instance
Alfresco Image (Dered)
2. Build Images
1. Run locally
3. Integrate
Virtualbox/VmWare <or>
AWS/OpenStack/…
Presenting SPK
Alfresco SPK Operations Presenting SPK
Choose
Browse stack templates provided by
SPK
Run
Spin up a stack locally using Virtualbox or
VmWare
Build Images (op9onal)
Define Alfresco
immutable images
Integrate
Run the cloud provider and
orchestra9on tool of your choice
Alfresco SPK Templates
SPK Templates
Choose – List of Stack templates
SPK Templates
Choose – community-allinone.json
{ "alfresco-allinone" : { "instance-template" : { "url" : "file://$PWD/instance-templates/allinone-community.json", "overlay" : { "alfresco" : { "install_fonts" : false }
} }, "local-run" : { "memory" : "2048", "cpus" : "2” } ...
SPK Templates
Choose – community-allinone.json
{ "alfresco-allinone" : { "images" : { "provisioners" : { "selinux-permissive" : "file://$PWD/packer/selinux-permissive-provisioner.json", "chef-alfresco" : "file://$PWD/packer/chef-alfresco-provisioner.json" }, "builders" : { "amazon-ebs" : "file://$PWD/packer/amazon-ebs-builder.json" }, "variables" : { "ami_description" : "Alfresco Community 5.1.c-EA - Allinone Server - {{timestamp}}", "ami_name" : "Alfresco Community 5.1.c-EA - Allinone Server - {{timestamp}}" }
SPK Templates
Choose – List of instance templates
SPK Templates
Choose – Allinone Instance template
{ "name": "allinone-community", "nginx" : { "use_nossl_config" : true, "disable_nginx_init" : true }, "alfresco" : { "skip_certificate_creation" : true, "public_protocol" : "http", "public_portssl" : "80" }, "run_list": ["alfresco::default"] }
SPK Templates
Choose – enterprise-clustered.json
{ "alfresco-share1" : { "instance-template" : { "url" : "file://$PWD/instance-templates/share.json", ... }, "alfresco-share2" : { [same as share1] }, "alfresco-solr1" : { "instance-template" : { "url" : "file://$PWD/instance-templates/solr.json", ... }, "alfresco-solr2" : { [same as solr1]
Run Alfresco SPK
Run SPK
Run – Local stack # Checkout Alfresco SPK project > git clone [email protected]:Alfresco/alfresco-spk.git ; cd alfresco-spk # Choose Enterprise Clustered stack > STACK_INSTANCE_TEMPLATE=file://$PWD/stack-templates/enterprise-clustered.json # Run the stack locally > vagrant up Instance ‘share1’ started! Instance ‘share2’ started! Instance ‘solr1’ started! Instance ‘solr2’ started!
Build images with SPK
Build Images
Build Images # Choose your custom Stack Template > STACK_INSTANCE_TEMPLATE=file://$PWD/stack-templates/my-stack.json
# Build your custom Images > vagrant up build-images EBS AMI for ‘My Alfresco Share Enterprise 5.0.2’ created! EBS AMI for ‘My Alfresco Solr Enterprise 5.0.2’ created!
Docker Image for ‘My Alfresco Share Enterprise 5.0.2’ created! Docker Image for ‘My Alfresco Solr Enterprise 5.0.2’ created!
Integrate Alfresco SPK
Integrate SPK
Integrate – EC2 User Data
#!/bin/bash export FQDN=$(curl http://169.254.169.254/latest/meta-data/public-hostname) cat > $CHEF_LOCAL_YAML_VARS_URL << ENDOFCONTENT --- run_list: ["alfresco::default"] alfresco: public_hostname: '$FQDN' ENDOFCONTENT ... curl -L https://raw.githubusercontent.com/alfresco/alfresco-spk/master/scripts/chef-bootstrap.rb > chef-bootstrap.rb # Run Alfresco installation ruby chef-bootstrap.rb
Full provisioning
Integrate SPK
Integrate – AWS Cloudformation Template
#!/bin/bash cat > $CHEF_LOCAL_YAML_VARS_URL << ENDOFCONTENT --- run_list: ["alfresco::redeploy"] alfresco: public_hostname: '{"Fn::GetAtt": ["ElasticLoadBalancer","DNSName"]}' ENDOFCONTENT ... curl -L https://raw.githubusercontent.com/alfresco/alfresco-spk/master/scripts/chef-bootstrap.rb > chef-bootstrap.rb # Run Alfresco installation ruby chef-bootstrap.rb
Bootstrapping
Wrapping up
Wrapping up
Infrastructure as Code delivered
• Revamped installation experience
– Component-based installation – Controls provisioning and bootstrap phases
https://github.com/Alfresco/chef-alfresco
• Reusable stack templates • Reusable images • Integration with cloud providers and orchestration tools
https://github.com/Alfresco/alfresco-spk
SPK
Wrapping up
Roadmap • Phase II
– Support for Centos 6.7 (next 2 weeks) and Ubuntu 12/13 – Publish Alfresco AMIs for existing instance templates (allinone, share, solr) – Publish chef-alfresco into Chef Supermarket – Improved docs for advanced Chef users – Integrate with SDK
• Phase III
– Add support for OVF and Docker – Certify some SPK stack templates to be Alfresco Supported – Ship Alfresco SPK as a Vagrant plugin
Wrapping up
Links Code • http://github.com/Alfresco/chef-alfresco • http://github.com/Alfresco/alfresco-spk
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
Thank you!
Condividi su
#AlfrescoDayRoma