SlideShare a Scribd company logo
1 of 23
Scott Moser <smoser@ubuntu.com>
Josh Harlow <harlowja@yahoo-inc.com>
Evil Superuser’s HOWTO:
Launching Instances to do your bidding
Cloud Init In...
?
Quick deep[ish]-dive
$ nova boot --user-data=user-data.txt
--key-name=cubfan@ubuntu --flavor=m1.large 
--image=Ubuntu-14.04-x86_64 my-servername
Quick overview of Cloud Instance Launch
Select an Image
Ubuntu 14.04 or Windows Server 2008 or RedHat ...
Choose size / flavor
m1.large = 2xCPU + 8GB mem
m3.tiny = 1xCPU + 768G mem
Select networks attached / external addressability
Open port 22 and port 80
Select ssh keys
Who should be allowed in?
Click
OpenStack Metadata Sources
/metadata.json
/userdata
/vendordata.json
/metadata.json
/userdata
/vendordata.json
your-
vm.openstack
http://169.254.169.254/latest
Metadata Service Config Drive
https://gist.github.com/harlowja/3e
9ae39c0e8f70e702b6 (ex: config
drive layout)
https://gist.github.com/harlowja/0
f5e5c57f9d21b084e7f (ex:
metadata json blob)
OK, I launched an instance, now what?
I need
● puppet
● chef
● ansible
● ssh <host>
● installed package XYZ
● ...
How do I get these??
● Well cloud-init man (not smoser) can
help!
What is user-data
Also known as Instance Customization Data
Allows a single “image” to behave differently
Simple:
#!/bin/sh
echo “Hi Mom”
More Complex (via YAML):
#cloud-config
packages: [pastebinit]
runcmd:
- echo “Hi Mom” | tee /run/greeting.log | pastebinit
How it can be quite useful
● Store common user-data(s) in an external repo (ie, GIT) and
combine into a VM/machine/compute instance at a later point
● Creates a repository of common patterns that can be shared and
reviewed separately (inherent decoupling)
● Creates a clear boundary between instances and what they
eventually become when initialized
● Cross-platform (to some degree)
● Making the same common user-data/patterns work across
machine types, operating system types…
What happens (at a high-level)
Init:
Read from datasource (or use prior datasource)
Fetch & save instance-data (userdata, metadata, ...)
May write network configuration
Consume user-data (expanding it…)
Run init (sections) modules
Config:
Run config (sections) modules
Final:
Run final (sections) modules
Runs in various stages
Cloud-init’s take on user-data
Can be multi-part
● Input in mime multipart format or cloud-config-archive
format (yaml/json list)
● '#include' support
● Allows for including external urls…
● Useful for merging in large user-data from external sources...
Separates configuration and code
Processed via pluggable modules
Extensible via user-data
● Add your own ‘part-handlers’
● Change config that is built into system
Input Formats
gzipped content: save you some bytes
mime multipart: archive format containing any of these
user-script: script will be executed at "rc.local-like"
include url: #include http://another.example.com/resource
cloud-config: yaml format (primary format)
upstart job
cloud-boothook: scripts run very early
part-handler: python module loaded and able to handle
subsequent parts
Userdata (real-life) examples
- Upgrade, reboot if necessary
- https://goo.gl/h9IBy0
- Adding an initial user (with ssh-keys)
- https://goo.gl/TB08MY
- Using mime multipart
- https://goo.gl/0BbKOm
- Chef + yahoo (real example from chef group)
- https://goo.gl/tJUCXK
- Chef + yahoo.2 (real example from a different group)
- https://goo.gl/NyQ5ga
- Benchmark things (real example)
- https://goo.gl/u1wKr7
What else does Cloud-init do?
● import ssh keys
● grow the root partition
● add [default] user(s)/group(s)
● hostname
● timezone
● mount points
● distro packaging items: mirror selection, additional package
archives, packages, upgrade
● ssh public keys, ssh private [host keys]
● phone home (useful for on completion callbacks)
● seed your machines entropy source (/dev/urandom)
● More info: doc/examples/
Data Sources (Cloud Providers)
Azure
CloudStack
OpenStack
● ConfigDrive (r/o ISO9600/VFAT)
● MD/UD REST API (similar to EC2 variant)
DigitalOcean
EC2
Google Compute (GCE)
MAAS
NoCloud
OpenNebula
OVF
SmartOS [Joyent]
How and who provides data (for cloud-init to use)...
Cloud Init On...
LXD
MAAS
What’s changing?
License
License change from GPLv3 to dual license Apache 2.0 + GPLv3
Code Hosting / Development
● hosted on stackforge using git
● utilizes gerrit reviews
● planned use of gerrits features for continuous integration
● upstream git
● https://git.openstack.org/cgit/stackforge/cloud-init/
● https://github.com/stackforge/cloud-init (mirror)
● Development lead by Canonical, Yahoo, and Cloudbase
● Better documentation, test and continuous integration and
Cloud-init 2.0 supported platforms
Python
support 2.6 (RHEL 6.x), 2.7 (Ubuntu 14.04), 3.4 (Ubuntu 15.04+)
Operating Systems
Targeting support for:
● RHEL: 6.x, 7.x
● Ubuntu: 15.04+ (possibly supporting 14.04)
● Windows Vista and newer
● FreeBSD
Backwards Compatibility
Wherever possible support user-data or cloud-config from 0.7.x
Post Boot Actions
● Service / Agent available to process configs after boot
● Events such as device hotplug or metadata change cause actions
● Query Datasource in cloud-agnostic manner
Lifecycle Events
● Hooks called for events such as Startup, Shutdown, Capture,
Suspend, Resume.
● These hooks will/need to be defined in platform neutral way (so that
for example, Windows works as well).
Cloud-init 2.0 expected features
Cloud-init 2.0 expected features cont.
Disk and Network configuration specified in declarative data
format. re-use of function built for maas and curtin.
Networking
network info sources provide cloud-init with data on how to configure
network devices. Support static config, vlan, bonding ...
Supports event driven configuration such as network adapter hotplug.
Block Device Configuration
Enhance block device configuration of 0.7.X allowing for more complex disk
usage. Support bcache, lvm, raid.
Tomato throwing time
Questions/comments??

More Related Content

What's hot

Painless ruby deployment on shelly cloud
Painless ruby deployment on shelly cloudPainless ruby deployment on shelly cloud
Painless ruby deployment on shelly cloud
Giedrius Rimkus
 
iPhone/iPad开发讲座 第四讲 网络通讯和Xml处理
iPhone/iPad开发讲座 第四讲 网络通讯和Xml处理iPhone/iPad开发讲座 第四讲 网络通讯和Xml处理
iPhone/iPad开发讲座 第四讲 网络通讯和Xml处理
Hao Peiqiang
 

What's hot (20)

DevStack
DevStackDevStack
DevStack
 
Couch to OpenStack: Nova - July, 30, 2013
Couch to OpenStack: Nova - July, 30, 2013Couch to OpenStack: Nova - July, 30, 2013
Couch to OpenStack: Nova - July, 30, 2013
 
Drupaljam 2017 - Deploying Drupal 8 onto Hosted Kubernetes in Google Cloud
Drupaljam 2017 - Deploying Drupal 8 onto Hosted Kubernetes in Google CloudDrupaljam 2017 - Deploying Drupal 8 onto Hosted Kubernetes in Google Cloud
Drupaljam 2017 - Deploying Drupal 8 onto Hosted Kubernetes in Google Cloud
 
CloudStack Automated Integration Testing with Marvin
CloudStack Automated Integration Testing with Marvin CloudStack Automated Integration Testing with Marvin
CloudStack Automated Integration Testing with Marvin
 
Fun with containers: Use Ansible to build Docker images
Fun with containers: Use Ansible to build Docker imagesFun with containers: Use Ansible to build Docker images
Fun with containers: Use Ansible to build Docker images
 
Developing Terraform Modules at Scale - HashiTalks 2021
Developing Terraform Modules at Scale - HashiTalks 2021Developing Terraform Modules at Scale - HashiTalks 2021
Developing Terraform Modules at Scale - HashiTalks 2021
 
Automated Deployment & Benchmarking with Chef, Cobbler and Rally for OpenStack
Automated Deployment & Benchmarking with Chef, Cobbler and Rally for OpenStackAutomated Deployment & Benchmarking with Chef, Cobbler and Rally for OpenStack
Automated Deployment & Benchmarking with Chef, Cobbler and Rally for OpenStack
 
Guaranteeing CloudStack Storage Performance
Guaranteeing CloudStack Storage Performance Guaranteeing CloudStack Storage Performance
Guaranteeing CloudStack Storage Performance
 
Painless ruby deployment on shelly cloud
Painless ruby deployment on shelly cloudPainless ruby deployment on shelly cloud
Painless ruby deployment on shelly cloud
 
OpenNebulaConf 2016 - Networking, NFVs and SDNs Hands-on Workshop by Rubén S....
OpenNebulaConf 2016 - Networking, NFVs and SDNs Hands-on Workshop by Rubén S....OpenNebulaConf 2016 - Networking, NFVs and SDNs Hands-on Workshop by Rubén S....
OpenNebulaConf 2016 - Networking, NFVs and SDNs Hands-on Workshop by Rubén S....
 
iPhone/iPad开发讲座 第四讲 网络通讯和Xml处理
iPhone/iPad开发讲座 第四讲 网络通讯和Xml处理iPhone/iPad开发讲座 第四讲 网络通讯和Xml处理
iPhone/iPad开发讲座 第四讲 网络通讯和Xml处理
 
이미지 기반의 배포 패러다임 Immutable infrastructure
이미지 기반의 배포 패러다임 Immutable infrastructure이미지 기반의 배포 패러다임 Immutable infrastructure
이미지 기반의 배포 패러다임 Immutable infrastructure
 
Couch to OpenStack: Glance - July, 23, 2013
Couch to OpenStack: Glance - July, 23, 2013Couch to OpenStack: Glance - July, 23, 2013
Couch to OpenStack: Glance - July, 23, 2013
 
Creating Elasticsearch Snapshots
Creating Elasticsearch SnapshotsCreating Elasticsearch Snapshots
Creating Elasticsearch Snapshots
 
Cobbler - Fast and reliable multi-OS provisioning
Cobbler - Fast and reliable multi-OS provisioningCobbler - Fast and reliable multi-OS provisioning
Cobbler - Fast and reliable multi-OS provisioning
 
CoreOS + Kubernetes @ All Things Open 2015
CoreOS + Kubernetes @ All Things Open 2015CoreOS + Kubernetes @ All Things Open 2015
CoreOS + Kubernetes @ All Things Open 2015
 
Introduction to Docker & CoreOS - Symfony User Group Cologne
Introduction to Docker & CoreOS - Symfony User Group CologneIntroduction to Docker & CoreOS - Symfony User Group Cologne
Introduction to Docker & CoreOS - Symfony User Group Cologne
 
How to operate containerized OpenStack
How to operate containerized OpenStackHow to operate containerized OpenStack
How to operate containerized OpenStack
 
OpenNebula Conf 2014 | Building Hybrid Cloud Federated Environments with Open...
OpenNebula Conf 2014 | Building Hybrid Cloud Federated Environments with Open...OpenNebula Conf 2014 | Building Hybrid Cloud Federated Environments with Open...
OpenNebula Conf 2014 | Building Hybrid Cloud Federated Environments with Open...
 
[OpenInfra Days Korea 2018] (Track 3) - CephFS with OpenStack Manila based on...
[OpenInfra Days Korea 2018] (Track 3) - CephFS with OpenStack Manila based on...[OpenInfra Days Korea 2018] (Track 3) - CephFS with OpenStack Manila based on...
[OpenInfra Days Korea 2018] (Track 3) - CephFS with OpenStack Manila based on...
 

Viewers also liked

Viewers also liked (20)

Architecting Ceph Solutions
Architecting Ceph SolutionsArchitecting Ceph Solutions
Architecting Ceph Solutions
 
Openstack Summit Container Day Keynote
Openstack Summit Container Day KeynoteOpenstack Summit Container Day Keynote
Openstack Summit Container Day Keynote
 
Managing Container Clusters in OpenStack Native Way
Managing Container Clusters in OpenStack Native WayManaging Container Clusters in OpenStack Native Way
Managing Container Clusters in OpenStack Native Way
 
Webinar container management in OpenStack
Webinar container management in OpenStackWebinar container management in OpenStack
Webinar container management in OpenStack
 
Open Container Technologies and OpenStack - Sorting Through Kubernetes, the O...
Open Container Technologies and OpenStack - Sorting Through Kubernetes, the O...Open Container Technologies and OpenStack - Sorting Through Kubernetes, the O...
Open Container Technologies and OpenStack - Sorting Through Kubernetes, the O...
 
Who carries your container? Zun or Magnum?
Who carries your container? Zun or Magnum?Who carries your container? Zun or Magnum?
Who carries your container? Zun or Magnum?
 
My SQL and Ceph: Head-to-Head Performance Lab
My SQL and Ceph: Head-to-Head Performance LabMy SQL and Ceph: Head-to-Head Performance Lab
My SQL and Ceph: Head-to-Head Performance Lab
 
OpenStack Neutron Behind The Senes
OpenStack Neutron Behind The SenesOpenStack Neutron Behind The Senes
OpenStack Neutron Behind The Senes
 
Zun presentation (OpenStack Barcelona summit)
Zun presentation (OpenStack Barcelona summit)Zun presentation (OpenStack Barcelona summit)
Zun presentation (OpenStack Barcelona summit)
 
TUT18972: Unleash the power of Ceph across the Data Center
TUT18972: Unleash the power of Ceph across the Data CenterTUT18972: Unleash the power of Ceph across the Data Center
TUT18972: Unleash the power of Ceph across the Data Center
 
State of Containers in OpenStack
State of Containers in OpenStackState of Containers in OpenStack
State of Containers in OpenStack
 
OpenStack Magnum
OpenStack MagnumOpenStack Magnum
OpenStack Magnum
 
OpenStack Architecture
OpenStack ArchitectureOpenStack Architecture
OpenStack Architecture
 
Turning Containers into Cattle
Turning Containers into CattleTurning Containers into Cattle
Turning Containers into Cattle
 
How to Monitor Application Performance in a Container-Based World
How to Monitor Application Performance in a Container-Based WorldHow to Monitor Application Performance in a Container-Based World
How to Monitor Application Performance in a Container-Based World
 
Streamlining HPC Workloads with Containers
Streamlining HPC Workloads with ContainersStreamlining HPC Workloads with Containers
Streamlining HPC Workloads with Containers
 
KubeCon EU 2016: Multi-Tenant Kubernetes
KubeCon EU 2016: Multi-Tenant KubernetesKubeCon EU 2016: Multi-Tenant Kubernetes
KubeCon EU 2016: Multi-Tenant Kubernetes
 
[Container world 2017] The Questions You're Afraid to Ask about Containers
[Container world 2017] The Questions You're Afraid to Ask about Containers[Container world 2017] The Questions You're Afraid to Ask about Containers
[Container world 2017] The Questions You're Afraid to Ask about Containers
 
Automating OpenStack Deployment with Fuel
Automating OpenStack Deployment with FuelAutomating OpenStack Deployment with Fuel
Automating OpenStack Deployment with Fuel
 
Neutron Network Namespaces and IPtables--A Technical Deep Dive
Neutron Network Namespaces and IPtables--A Technical Deep DiveNeutron Network Namespaces and IPtables--A Technical Deep Dive
Neutron Network Namespaces and IPtables--A Technical Deep Dive
 

Similar to Cloud init and cloud provisioning [openstack summit vancouver]

Cacoo enterprise installation_manual
Cacoo enterprise installation_manualCacoo enterprise installation_manual
Cacoo enterprise installation_manual
joseig23
 
Introducing apache stratos (incubating) & wso2 paa s foundation
Introducing apache stratos (incubating) & wso2 paa s foundationIntroducing apache stratos (incubating) & wso2 paa s foundation
Introducing apache stratos (incubating) & wso2 paa s foundation
Lakmal Warusawithana
 
A Presentation about Puppet that I've made at the OSSPAC conference
A Presentation about Puppet that I've made at the OSSPAC conferenceA Presentation about Puppet that I've made at the OSSPAC conference
A Presentation about Puppet that I've made at the OSSPAC conference
ohadlevy
 
Linux sever building
Linux sever buildingLinux sever building
Linux sever building
Edmond Yu
 

Similar to Cloud init and cloud provisioning [openstack summit vancouver] (20)

Install and configure linux
Install and configure linuxInstall and configure linux
Install and configure linux
 
linux installation.pdf
linux installation.pdflinux installation.pdf
linux installation.pdf
 
One-Man Ops
One-Man OpsOne-Man Ops
One-Man Ops
 
Cloud Monitoring tool Grafana
Cloud Monitoring  tool Grafana Cloud Monitoring  tool Grafana
Cloud Monitoring tool Grafana
 
CloudStack and cloud-init
CloudStack and cloud-initCloudStack and cloud-init
CloudStack and cloud-init
 
Cacoo enterprise installation_manual
Cacoo enterprise installation_manualCacoo enterprise installation_manual
Cacoo enterprise installation_manual
 
Introduction to PaaS and Heroku
Introduction to PaaS and HerokuIntroduction to PaaS and Heroku
Introduction to PaaS and Heroku
 
Kubernetes for the PHP developer
Kubernetes for the PHP developerKubernetes for the PHP developer
Kubernetes for the PHP developer
 
Micro Datacenter & Data Warehouse
Micro Datacenter & Data WarehouseMicro Datacenter & Data Warehouse
Micro Datacenter & Data Warehouse
 
Introducing apache stratos (incubating) & wso2 paa s foundation
Introducing apache stratos (incubating) & wso2 paa s foundationIntroducing apache stratos (incubating) & wso2 paa s foundation
Introducing apache stratos (incubating) & wso2 paa s foundation
 
A Presentation about Puppet that I've made at the OSSPAC conference
A Presentation about Puppet that I've made at the OSSPAC conferenceA Presentation about Puppet that I've made at the OSSPAC conference
A Presentation about Puppet that I've made at the OSSPAC conference
 
Bare Metal to OpenStack with Razor and Chef
Bare Metal to OpenStack with Razor and ChefBare Metal to OpenStack with Razor and Chef
Bare Metal to OpenStack with Razor and Chef
 
Deploying PostgreSQL on Kubernetes
Deploying PostgreSQL on KubernetesDeploying PostgreSQL on Kubernetes
Deploying PostgreSQL on Kubernetes
 
Prosit google-cloud
Prosit google-cloudProsit google-cloud
Prosit google-cloud
 
[OpenStack Day in Korea 2015] Track 1-6 - 갈라파고스의 이구아나, 인프라에 오픈소스를 올리다. 그래서 보이...
[OpenStack Day in Korea 2015] Track 1-6 - 갈라파고스의 이구아나, 인프라에 오픈소스를 올리다. 그래서 보이...[OpenStack Day in Korea 2015] Track 1-6 - 갈라파고스의 이구아나, 인프라에 오픈소스를 올리다. 그래서 보이...
[OpenStack Day in Korea 2015] Track 1-6 - 갈라파고스의 이구아나, 인프라에 오픈소스를 올리다. 그래서 보이...
 
Surat MuleSoft Meetup#2 - Anypoint Runtime Fabric
Surat MuleSoft Meetup#2 - Anypoint Runtime FabricSurat MuleSoft Meetup#2 - Anypoint Runtime Fabric
Surat MuleSoft Meetup#2 - Anypoint Runtime Fabric
 
L.A.M.P Installation Note --- CentOS 6.5
L.A.M.P Installation Note --- CentOS 6.5L.A.M.P Installation Note --- CentOS 6.5
L.A.M.P Installation Note --- CentOS 6.5
 
Linux sever building
Linux sever buildingLinux sever building
Linux sever building
 
Open stack implementation
Open stack implementation Open stack implementation
Open stack implementation
 
Prometheus and Docker (Docker Galway, November 2015)
Prometheus and Docker (Docker Galway, November 2015)Prometheus and Docker (Docker Galway, November 2015)
Prometheus and Docker (Docker Galway, November 2015)
 

Recently uploaded

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 

Cloud init and cloud provisioning [openstack summit vancouver]

  • 1. Scott Moser <smoser@ubuntu.com> Josh Harlow <harlowja@yahoo-inc.com> Evil Superuser’s HOWTO: Launching Instances to do your bidding
  • 4. $ nova boot --user-data=user-data.txt --key-name=cubfan@ubuntu --flavor=m1.large --image=Ubuntu-14.04-x86_64 my-servername
  • 5. Quick overview of Cloud Instance Launch Select an Image Ubuntu 14.04 or Windows Server 2008 or RedHat ... Choose size / flavor m1.large = 2xCPU + 8GB mem m3.tiny = 1xCPU + 768G mem Select networks attached / external addressability Open port 22 and port 80 Select ssh keys Who should be allowed in? Click
  • 6. OpenStack Metadata Sources /metadata.json /userdata /vendordata.json /metadata.json /userdata /vendordata.json your- vm.openstack http://169.254.169.254/latest Metadata Service Config Drive https://gist.github.com/harlowja/3e 9ae39c0e8f70e702b6 (ex: config drive layout) https://gist.github.com/harlowja/0 f5e5c57f9d21b084e7f (ex: metadata json blob)
  • 7. OK, I launched an instance, now what? I need ● puppet ● chef ● ansible ● ssh <host> ● installed package XYZ ● ... How do I get these?? ● Well cloud-init man (not smoser) can help!
  • 8. What is user-data Also known as Instance Customization Data Allows a single “image” to behave differently Simple: #!/bin/sh echo “Hi Mom” More Complex (via YAML): #cloud-config packages: [pastebinit] runcmd: - echo “Hi Mom” | tee /run/greeting.log | pastebinit
  • 9. How it can be quite useful ● Store common user-data(s) in an external repo (ie, GIT) and combine into a VM/machine/compute instance at a later point ● Creates a repository of common patterns that can be shared and reviewed separately (inherent decoupling) ● Creates a clear boundary between instances and what they eventually become when initialized ● Cross-platform (to some degree) ● Making the same common user-data/patterns work across machine types, operating system types…
  • 10. What happens (at a high-level) Init: Read from datasource (or use prior datasource) Fetch & save instance-data (userdata, metadata, ...) May write network configuration Consume user-data (expanding it…) Run init (sections) modules Config: Run config (sections) modules Final: Run final (sections) modules
  • 11. Runs in various stages
  • 12. Cloud-init’s take on user-data Can be multi-part ● Input in mime multipart format or cloud-config-archive format (yaml/json list) ● '#include' support ● Allows for including external urls… ● Useful for merging in large user-data from external sources... Separates configuration and code Processed via pluggable modules Extensible via user-data ● Add your own ‘part-handlers’ ● Change config that is built into system
  • 13. Input Formats gzipped content: save you some bytes mime multipart: archive format containing any of these user-script: script will be executed at "rc.local-like" include url: #include http://another.example.com/resource cloud-config: yaml format (primary format) upstart job cloud-boothook: scripts run very early part-handler: python module loaded and able to handle subsequent parts
  • 14. Userdata (real-life) examples - Upgrade, reboot if necessary - https://goo.gl/h9IBy0 - Adding an initial user (with ssh-keys) - https://goo.gl/TB08MY - Using mime multipart - https://goo.gl/0BbKOm - Chef + yahoo (real example from chef group) - https://goo.gl/tJUCXK - Chef + yahoo.2 (real example from a different group) - https://goo.gl/NyQ5ga - Benchmark things (real example) - https://goo.gl/u1wKr7
  • 15. What else does Cloud-init do? ● import ssh keys ● grow the root partition ● add [default] user(s)/group(s) ● hostname ● timezone ● mount points ● distro packaging items: mirror selection, additional package archives, packages, upgrade ● ssh public keys, ssh private [host keys] ● phone home (useful for on completion callbacks) ● seed your machines entropy source (/dev/urandom) ● More info: doc/examples/
  • 16. Data Sources (Cloud Providers) Azure CloudStack OpenStack ● ConfigDrive (r/o ISO9600/VFAT) ● MD/UD REST API (similar to EC2 variant) DigitalOcean EC2 Google Compute (GCE) MAAS NoCloud OpenNebula OVF SmartOS [Joyent] How and who provides data (for cloud-init to use)...
  • 18.
  • 19. What’s changing? License License change from GPLv3 to dual license Apache 2.0 + GPLv3 Code Hosting / Development ● hosted on stackforge using git ● utilizes gerrit reviews ● planned use of gerrits features for continuous integration ● upstream git ● https://git.openstack.org/cgit/stackforge/cloud-init/ ● https://github.com/stackforge/cloud-init (mirror) ● Development lead by Canonical, Yahoo, and Cloudbase ● Better documentation, test and continuous integration and
  • 20. Cloud-init 2.0 supported platforms Python support 2.6 (RHEL 6.x), 2.7 (Ubuntu 14.04), 3.4 (Ubuntu 15.04+) Operating Systems Targeting support for: ● RHEL: 6.x, 7.x ● Ubuntu: 15.04+ (possibly supporting 14.04) ● Windows Vista and newer ● FreeBSD Backwards Compatibility Wherever possible support user-data or cloud-config from 0.7.x
  • 21. Post Boot Actions ● Service / Agent available to process configs after boot ● Events such as device hotplug or metadata change cause actions ● Query Datasource in cloud-agnostic manner Lifecycle Events ● Hooks called for events such as Startup, Shutdown, Capture, Suspend, Resume. ● These hooks will/need to be defined in platform neutral way (so that for example, Windows works as well). Cloud-init 2.0 expected features
  • 22. Cloud-init 2.0 expected features cont. Disk and Network configuration specified in declarative data format. re-use of function built for maas and curtin. Networking network info sources provide cloud-init with data on how to configure network devices. Support static config, vlan, bonding ... Supports event driven configuration such as network adapter hotplug. Block Device Configuration Enhance block device configuration of 0.7.X allowing for more complex disk usage. Support bcache, lvm, raid.

Editor's Notes

  1. cloud-config is cloud-init’s configuration mechanism, and what it