Upload
ow2-consortium
View
96
Download
2
Embed Size (px)
Citation preview
Copyright © UShareSoft 2016 Copyright © UShareSoft 2016
Look Beyond the Cloud
Hammr Project Update: Machine Images and DockerContainers for your Cloud
Joris Bremond, Software Development Engineer, UShareSoftAlexandre Lefebvre, Professional Services, UShareSoft
22
© Copyright 2016 UShareSoft© Copyright 2016 UShareSoft
What is ?
33
© Copyright 2016 UShareSoft© Copyright 2016 UShareSoft
Hammr Command-Line Tool
Hammr Command-line Tool: Consistent Machine Images from a Single Configuration FileHammr Command-line Tool: Consistent Machine Images from a Single Configuration File
> Open source OW2 project> command-line tool written in Python> http://www.ow2.org/bin/view/ActivitiesDashboard/hammr –
www.hammr.io> Github: https://github.com/usharesoft/hammr
> Open source OW2 project> command-line tool written in Python> http://www.ow2.org/bin/view/ActivitiesDashboard/hammr –
www.hammr.io> Github: https://github.com/usharesoft/hammr
44
© Copyright 2016 UShareSoft© Copyright 2016 UShareSoft
Hammr overall architecture
55
© Copyright 2016 UShareSoft© Copyright 2016 UShareSoft
Installing hammr
Installing Hammr
Install Hammr system dependencies first, then
Installing Hammr
Install Hammr system dependencies first, then
$ pip install hammr
$ hammr –v
hammr version '0.2.5.10'
$ pip install hammr
$ hammr –v
hammr version '0.2.5.10'
Help MenuHelp Menu
$ hammr --help$ hammr --help
66
© Copyright 2016 UShareSoft© Copyright 2016 UShareSoft
Creating &Managing your
Stackswith
77
© Copyright 2016 UShareSoft© Copyright 2016 UShareSoft
Getting Started with Hammr
> Template file: configuration file (Yaml or Json)> Describe your application stack using the stack keyword
> Generate machine or containers images by defining builders
> Publish the generated machine images using your cloud credentials
or download its to your computer
> Template file: configuration file (Yaml or Json)> Describe your application stack using the stack keyword
> Generate machine or containers images by defining builders
> Publish the generated machine images using your cloud credentials
or download its to your computer
88
© Copyright 2016 UShareSoft© Copyright 2016 UShareSoft
Defining your Stack: nginx Example
$ vi nginx-template.yaml
---
stack:
name: nginx
version: '1.0'
os:
name: Debian
version: '8'
arch: x86_64
profile: Minimal
pkgs:
- name: nginx
installation:
diskSize: 12288
$ vi nginx-template.yaml
---
stack:
name: nginx
version: '1.0'
os:
name: Debian
version: '8'
arch: x86_64
profile: Minimal
pkgs:
- name: nginx
installation:
diskSize: 12288
stack keyword defining the content of your stackstack keyword defining the content of your stack
os keyword defining the os profile and packagesos keyword defining the os profile and packages
installation keyword defining the “install” parametersinstallation keyword defining the “install” parameters
99
© Copyright 2016 UShareSoft© Copyright 2016 UShareSoft
Hammr: Modeling the Stack from a Single File
Security parametersKernel ParametersPartitioningNetworkingKeyboard, TimezoneLicense Entitlement
Security parametersKernel ParametersPartitioningNetworkingKeyboard, TimezoneLicense Entitlement
JeOS ProfilingPackage Updates
OS Repository SearchPackage Time Machine
JeOS ProfilingPackage Updates
OS Repository SearchPackage Time Machine
Off-the-Shelf SoftwareComponents
Off-the-Shelf SoftwareComponents
Private Software CatalogPrivate Software Catalog
Configuration scriptsConfiguration scripts
1010
© Copyright 2016 UShareSoft© Copyright 2016 UShareSoft
Creating the Template: nginx ExampleVerify the syntax: template validateVerify the syntax: template validate
$ hammr template validate --file nginx-template.yaml
Validating the template file [/Users/james/nginx-template.yaml] ...
OK: Syntax of template file [/Users/james/nginx-template.yaml] is ok
$ hammr template validate --file nginx-template.yaml
Validating the template file [/Users/james/nginx-template.yaml] ...
OK: Syntax of template file [/Users/james/nginx-template.yaml] is ok
Create the Template: template createCreate the Template: template create
$ hammr template create --file nginx-template.yamlValidating the template file [/Users/james/nginx-template.yaml] ...
OK: Syntax of template file [/Users/james/nginx-template.yaml] is ok
Creating template from temporary [/var/folders/f6/8kljm7cxgn/T/hammr-15888/archive.tar.gz] archive ...
100%|#############################################################################|
OK: Template create: DONE
Template URI: users/root/appliances/898
Template Id : 898
$ hammr template create --file nginx-template.yamlValidating the template file [/Users/james/nginx-template.yaml] ...
OK: Syntax of template file [/Users/james/nginx-template.yaml] is ok
Creating template from temporary [/var/folders/f6/8kljm7cxgn/T/hammr-15888/archive.tar.gz] archive ...
100%|#############################################################################|
OK: Template create: DONE
Template URI: users/root/appliances/898
Template Id : 898
1111
© Copyright 2016 UShareSoft© Copyright 2016 UShareSoft
Listing Created Templates
List created templates: template listList created templates: template list
$ hammr template list
+-----+----------------------+---------+---------------------+---------------------+---------------------+--------+---------+
| Id | Name | Version | OS | Created | Last modified | # Imgs | Updates |
+=====+======================+=========+=====================+=====================+=====================+========+=========+
683 | nginx | 1.0 | Debian 8 x86_64 | 2016-05-02 13:59:25 | 2016-05-02 13:59:27 | 0 | 0 |
+-----+----------------------+---------+---------------------+---------------------+---------------------+--------+---------+
Found 1 templates
$ hammr template list
+-----+----------------------+---------+---------------------+---------------------+---------------------+--------+---------+
| Id | Name | Version | OS | Created | Last modified | # Imgs | Updates |
+=====+======================+=========+=====================+=====================+=====================+========+=========+
683 | nginx | 1.0 | Debian 8 x86_64 | 2016-05-02 13:59:25 | 2016-05-02 13:59:27 | 0 | 0 |
+-----+----------------------+---------+---------------------+---------------------+---------------------+--------+---------+
Found 1 templates
1212
© Copyright 2016 UShareSoft© Copyright 2016 UShareSoft
Defining a Builder: Machine Image Format
$ vi nginx-template.yaml
---
...stack section omitted
builders:
- type: openstack
account:
file: "/home/joris/accounts/openstack-account.yaml"
tenant: opencloudware
image-name: test-nginx
description: joris test nginx image
$ vi nginx-template.yaml
---
...stack section omitted
builders:
- type: openstack
account:
file: "/home/joris/accounts/openstack-account.yaml"
tenant: opencloudware
image-name: test-nginx
description: joris test nginx image
builders keyword defining all the machineImages to buildbuilders keyword defining all the machineImages to buildImage formatImage format
Machine image registration informationMachine image registration informationCloud account credentialsCloud account credentials
1313
© Copyright 2016 UShareSoft© Copyright 2016 UShareSoft
Defining a Builder: Publication Information
$ vi nginx-template.yaml
---
...stack section omitted
builders:
- type: openstack
account:
file: "/home/joris/accounts/openstack-account.yaml"
tenant: opencloudware
image-name: test-nginx
description: joris test nginx image
$ vi nginx-template.yaml
---
...stack section omitted
builders:
- type: openstack
account:
file: "/home/joris/accounts/openstack-account.yaml"
tenant: opencloudware
image-name: test-nginx
description: joris test nginx image
Cloud account credentialsCloud account credentials
$ vi openstack-account.yaml
---
accounts:
- type: openstack
name: My OpenStack Account
endpoint: http://ow2stack.org:9292/v1/
keystoneEndpoint: http://ow2stack.org:5000/v2.0
username: test
password: password
$ vi openstack-account.yaml
---
accounts:
- type: openstack
name: My OpenStack Account
endpoint: http://ow2stack.org:9292/v1/
keystoneEndpoint: http://ow2stack.org:5000/v2.0
username: test
password: password
1414
© Copyright 2016 UShareSoft© Copyright 2016 UShareSoft
Generating Machine Image(s)
Create any cloud account first: account createCreate any cloud account first: account create
$ hammr account create --file openstack-account.yaml
Validating the template file [openstack-account.yaml] ...
OK: Syntax of template file [openstack-account.yaml] is ok
Create account for 'ow2stack'...
OK: Account create successfully for [openstack]
$ hammr account create --file openstack-account.yaml
Validating the template file [openstack-account.yaml] ...
OK: Syntax of template file [openstack-account.yaml] is ok
Create account for 'ow2stack'...
OK: Account create successfully for [openstack]
Generate the machine images: template build Generate the machine images: template build
$ hammr template build --file nginx-template.yaml
Validating the template file [nginx-template.yaml] ...
Generating 'openstack' image (1/1)
|>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>| 100%: Done, created on ... |<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<|
OK: Generation 'openstack' ok
Image URI: users/root/appliances/21/images/47
Image Id : 47
$ hammr template build --file nginx-template.yaml
Validating the template file [nginx-template.yaml] ...
Generating 'openstack' image (1/1)
|>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>| 100%: Done, created on ... |<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<|
OK: Generation 'openstack' ok
Image URI: users/root/appliances/21/images/47
Image Id : 47
Image ID: 47, used to register this generated machine image to the target cloud environmentImage ID: 47, used to register this generated machine image to the target cloud environment
1515
© Copyright 2016 UShareSoft© Copyright 2016 UShareSoft
Publishing Machine Image(s)
Publishing the generated machine image: image publishPublishing the generated machine image: image publish
$ hammr image publish --id 47 --file nginx-template.yamlPublishing 'openstack' image (1/1)
|>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>| 100%: Done, published o... |<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<|
OK: Publication to 'ow2stack' is ok
Cloud ID : 37d20dba-7a1c-43f9-9c77-c05f60d3094c
$ hammr image publish --id 47 --file nginx-template.yamlPublishing 'openstack' image (1/1)
|>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>| 100%: Done, published o... |<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<|
OK: Publication to 'ow2stack' is ok
Cloud ID : 37d20dba-7a1c-43f9-9c77-c05f60d3094c
Listing Your Images: image list Listing Your Images: image list
$ hammr image list$ hammr image list
Cloud ID: used for provisioning instances on OpenStackCloud ID: used for provisioning instances on OpenStack
1616
© Copyright 2016 UShareSoft© Copyright 2016 UShareSoft
Supported Target Machine Image Formats
> ISO> ISO > Hyper-V
> KVM
> Raw
> QCOW2
> Vagrant
> VirtualBox
> VHD
> VMware Workstation
> VMware ESXi
> VMware vCenter vSphere
> Xen
> Hyper-V
> KVM
> Raw
> QCOW2
> Vagrant
> VirtualBox
> VHD
> VMware Workstation
> VMware ESXi
> VMware vCenter vSphere
> Xen
> Abiquo
> AWS (EC2)
> CloudStack
> Eucalyptus (EMI)
> Flexiant
> Google Compute Engine
> Microsoft Azure
> Nimbula
> OpenStack
> VMware VCD
> Abiquo
> AWS (EC2)
> CloudStack
> Eucalyptus (EMI)
> Flexiant
> Google Compute Engine
> Microsoft Azure
> Nimbula
> OpenStack
> VMware VCD
PhysicalPhysical VirtualVirtual CloudCloud ContainerContainer> Docker
> LXC
> Docker
> LXC
1717
© Copyright 2016 UShareSoft© Copyright 2016 UShareSoft
Docker Integration
1818
© Copyright 2016 UShareSoft© Copyright 2016 UShareSoft
Hammr: Docker Image Support
Self-contained Docker Base Image
(1 Docker image by hammr file)
Self-contained Docker Base Image
(1 Docker image by hammr file)
BenefitsBenefits
Software governance for Docker Images
Consistency between VM ↔ Docker Images
Software governance for Docker Images
Consistency between VM ↔ Docker Images
> Full software governance: keep control over all software packagesand versions within your image
> Transparency: see at a glance which OS packages and software filesmake up your image
> Repeatability: generate a consistent Docker image each and everytime
> Full software governance: keep control over all software packagesand versions within your image
> Transparency: see at a glance which OS packages and software filesmake up your image
> Repeatability: generate a consistent Docker image each and everytime
1919
© Copyright 2016 UShareSoft© Copyright 2016 UShareSoft
Latest News andOutlook
2020
© Copyright 2016 UShareSoft© Copyright 2016 UShareSoft
Hammr: Latest Features
BenefitsBenefits
Software governance for Docker Images
Consistency between VM ↔ Docker Images
Software governance for Docker Images
Consistency between VM ↔ Docker Images
> YAML support> Facility to define a software bundle from a directory> Compatibility with UForge AppCenter 3.6> Support of Outscale cloud format> Hammr documentation moved to Read the Docs
> Documentation source on Github
> YAML support> Facility to define a software bundle from a directory> Compatibility with UForge AppCenter 3.6> Support of Outscale cloud format> Hammr documentation moved to Read the Docs
> Documentation source on Github
2121
© Copyright 2016 UShareSoft© Copyright 2016 UShareSoft
Hammr: Outlook
BenefitsBenefits
Software governance for Docker Images
Consistency between VM ↔ Docker Images
Software governance for Docker Images
Consistency between VM ↔ Docker Images
> Improve workload migration automation> Authentication modes on source workloads
> Support of Docker layers> Model layers> Assemble a stack from layers
> Bundles enhancement> Add configuration scripts and OS packages to bundles
> Ability to execute scripts at template build time
> Improve workload migration automation> Authentication modes on source workloads
> Support of Docker layers> Model layers> Assemble a stack from layers
> Bundles enhancement> Add configuration scripts and OS packages to bundles
> Ability to execute scripts at template build time
2222
© Copyright 2016 UShareSoft© Copyright 2016 UShareSoft
Machine image & container builderfor the cloud
It's an open source OW2 project
Use it! Contributions welcome!
hammr.ioow2.org/ActivitiesDashboard/hammrhttps://github.com/usharesoft/hammr
Copyright © UShareSoft 2016 Copyright © UShareSoft 2016
Joris Bremond, Alexandre [email protected]
www.usharesoft.com@usharesoft