SlideShare a Scribd company logo
1 of 17
SaltStack & VMWare
An Automation and Orchestration
Solution for VMWare Esxi 6.0
The problem
A considerable amount of
time was spent on
commissioning virtual
machines and
customizing existing
ones
Development needed a
fast CLI based method
for provisioning vms with
a non domain restricted
syntax
Chart: Average approximates 2013-
600sec
Salt-Time
1h 40m
Manually
1h 30m
Manually
The solution
Automation
Select a tool that is easy
to implement , extensible
and rewarding to learn.
Help us provide a rapid
response that matches the
requirement.
Compatible with Ansible
but much more powerful
How it works
Step 1
Capture Specification
into a template
Clients specification
needs to be verified and
confirmed, it will then be
translated into a virtual
machine template.
Step 2
Link
Create a saltstack ‘salt-
cloud’ configuration file
Connects to the
‘vmware-template’
Step 3
Build
implement the SaltStack
command line to spin
the new virtual machine.
Why SaltStack !
implements the most up to
date APIs with ‘pyVmomi’,
these are compatible with
our target environment.
Active community
Our trial proved to us that the
community support was very
good and helped us
overcome issues.
Documentation
Excellent documentation, this
was found to be organised
and containing material or
high quality
versatility
A well designed tool relying
on the richness of Python,
can server the IT-Team in
different implementations.
Compatibility API
Salt General Structure
Standard
Master
Own comms protocol,
scalable can also
use ssh.
Minion
Implement instructions
Multi Master
Many Master (Nodes)
Resilience
Have master of
masters case in
complex structures.
Masterless
Minion only.
Minion delegate as
master for multiple
nodes, (Special
cases).
Salt-Cloud: Elements
SaltStack has several elements that are required by salt-cloud
In the instal several elements are needed on CentOS6:
Ensure EPEL repository and salt repositories are included
yum -y install update
yum -y install python-pip
pip install pyVimomi
yum -y install zlib-devel bzip2-devel openssl-devel xz-libs wget sqlite-devel python-devel- libxml2-devel libxslt-devel salt-master salt-minion salt-
cloud
Please remember that salt-cloud should not be installed via pip as it was detected to cause compatibility issues.
Salt Virtual machines (Masters)
Salt Targets
(Minions)
SaltStack Files
Salt-Standard
Standard files are meant for standard functions.
Configuration that impacts the nodes controlled
by SaltStack, similar to the way playbooks in
Ansible impact the target nodes.
These are located at ‘/srv/salt’. These files are
details next page.
Salt-Cloud:
Additional files that in our case come with
installing the ‘salt-cloud’ API specific to
SaltStack’s interface with Cloud providers, those
include in our case VMware & Amazon, they are
not limited to those but include RackSpace,
digital ocean, KVM and much more.
Located @ /etc/salt/: cloud.providers.d,
cloud.profiles.d
Salt Cloud folder components
Salt Cloud structure After installing ‘Salt-Cloud’ one would notice the
following components added. The two that are
important for the basic interaction of SaltStack
with vmware Esxi are
1. cloud.providers.d
2. cloud.profiles.d
Salt-Cloud files Purpose!
Looking at the newly generated ‘salt cloud’ folders & files to verify their purposes
cloud.providers.d: vmware.conf, contains the login credentials to vmware vcenter, typical login and password for an account
that has sufficient rights to create and delete virtual machines or whatever operations this setup is expected to execute.
cloud.profiles.d: Specifications for the vms to be created.
Other Important components: ‘vmware.py’ is an important python script, it uses pyVimomi, the salt system will not function
without it, it was found that it will be added by the repos on Centos but not Ubuntu, so Ununtu users can add this manually and
download it from github. The locations for it are:
On Ubuntu 14.04: /usr/lib/python2.7/dist-packages/salt/cloud/clouds/ On CentOS7: /usr/lib/python2.6/site-packages/sos/plugins/
Salt Cloud Provider and profiles relation
/etc/salt/cloud.providers.d/vmware.conf
vcenter6:
user: ‘saltstack@example.com’
password: $ecret
url: ‘vcenter6.example.com’
protocol: ‘https’
port: 443
VM01_Profile:
provider: vcenter6
num_cpus: 1
memory: 1GB
devices:
disk:
Hard disk 1:
size: 20
network:
adapter type: vmxnet3
name: “vm network”
switch_type: standard
ip: 10.194.70.31
gateway: 10.194.70.1
subnet_mask: 255.255.255.0
domain: example.com
dns_servers:
- 10.194.0.33
- 10.194.0.44
resourcepool: devops
cluster: DevopsCluster
minion:
master: salt03.example.com
deploy: True
power_on: True
ssh_username: root
password: SaltAccess
extra_config:
guestinfo.ipaddress: 10.194.70.31
guestinfo.netmast: 255.255.255.0
guestinfo.gateway: 10.194.70.1
guestinfo.hostname: vm01.example.com
file_map:
/srv/salt/map/vm01/etc/hosts: /etc/hosts
Salt-cloud For VMWARE Interaction
SALT-CLOUD: Administrative Commands
The command used to create the virtual machines is as below:
tttthihsss
after the -p one would specify the profile used , this line for the profile comes from the first line in the configuration file that specify the vm specification and
is included in ‘/etc/salt/cloud.profiles,d/ The first line from that configuration file is below, it highlight where the line has come from:
After that comes the name we intend to give to the virtual machine. ‘dev01.example.com’ that will show on vcenter as the machine is being built, that will
also be given to the folder where is will sit. Please note this will not impact the name of the vm within its own operating system as that will need to be
specified within the configuration file. The ‘-lL’ flag will be very useful to include, it will enable one to be capture the errors . It’s essential to restart the ‘salt-
master’ service upon making changes to refresh.
Useful commands:
salt-cloud --query # This will give details about the vms created
salt-cloud -p dev01 dev02 # One can create several vms with one command
salt-cloud -d dev01 dev02 # One can also destroy several vms at the same time
salt-cloud -F # List all vms and templates on all configured providers
Dependencies
VMWARE-Tools has a number of related packages. This used to enable the customization of a virtual machine.
This involves taking a vm or a template, cloning a new one from it the giving the new one a name, network
configuration files and packages.
It’s important to know that after reading the api for ‘vmware’ that we cannot so far create a vm from scratch, so far
we can only clone from a vm or a template.
Traditionally vmware provided the vmware-tools, this has now been handed over to the open source community
and is provided in the following packages:
Remove the network adapter configuration from the gold image and implement the changes below on it:
(On CentOS 6): install libmspack
open-vm-tools
open-vm-tools-devel
open-vm-tools-desktop
open-vm-tools-debuginfo
open-vm-tools-deploypkg (released by vmware and is essential )
change /etc/udev/rules.d/70-persistent-net.rules remove the reference related to the mac address
completely, the line will look as below:
SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”VMXNET3”, ATTR{type}==”1”, KERNEL==”eth*”,
NAME=”eth0”
chkconfig vmtoolsd enable
service vmtoolsd start
Dependencies ‘VMWARE-Tools
CentOS 7 & Ubuntu 14.04
On the gold image, (VM or template one will clone from):
Will rely on %100 open source packages, ‘open-vm-tools’ in the case of CentOS, RHEL, Oracle Linux,
Scientific Linux and Fedora, one needs to ensure they have added the ‘EPEL’ repositories. It’s
recommended that one keeps a golden image with a working version of ‘open-vm-tools’ and experiment
with the latest ‘open-vm-tools’ separately as it’s likely to show some compatibility issues.
remove the network adapter configuration
In the location ‘/etc/udev/70-persistent-net.rules’
The line should be as such:
SUBSYSTEM=”net”, ACTION==”add”, DRIVERS==”vmxnet3”, ATTR{type}==”1”, KERNEL==”eth*”,
NAME==”eth0”
One can add this line as many times as they have network adapters on the vm. The driver ‘VMXNET3’ is
the latest in vmware and the most recommended. The older network driver “e1000” may still be used
and needs to be referenced appropriately.
systemctl enable vmtoolsd
systemctl start vmtoolsd

More Related Content

What's hot

VMware Vsan vtug 2014
VMware Vsan vtug 2014VMware Vsan vtug 2014
VMware Vsan vtug 2014
csharney
 
RHT Upgrading to vSphere 5
RHT Upgrading to vSphere 5RHT Upgrading to vSphere 5
RHT Upgrading to vSphere 5
virtualsouthwest
 

What's hot (20)

STO7534 VSAN Day 2 Operations (VMworld 2016)
STO7534 VSAN Day 2 Operations (VMworld 2016)STO7534 VSAN Day 2 Operations (VMworld 2016)
STO7534 VSAN Day 2 Operations (VMworld 2016)
 
VMware VSAN Technical Deep Dive - March 2014
VMware VSAN Technical Deep Dive - March 2014VMware VSAN Technical Deep Dive - March 2014
VMware VSAN Technical Deep Dive - March 2014
 
VMware Virtual SAN slideshow
VMware Virtual SAN slideshowVMware Virtual SAN slideshow
VMware Virtual SAN slideshow
 
VMware Vsan vtug 2014
VMware Vsan vtug 2014VMware Vsan vtug 2014
VMware Vsan vtug 2014
 
Five common customer use cases for Virtual SAN - VMworld US / 2015
Five common customer use cases for Virtual SAN - VMworld US / 2015Five common customer use cases for Virtual SAN - VMworld US / 2015
Five common customer use cases for Virtual SAN - VMworld US / 2015
 
vSAN architecture components
vSAN architecture componentsvSAN architecture components
vSAN architecture components
 
VMworld 2013: Lowering TCO for Virtual Desktops with VMware View and VMware V...
VMworld 2013: Lowering TCO for Virtual Desktops with VMware View and VMware V...VMworld 2013: Lowering TCO for Virtual Desktops with VMware View and VMware V...
VMworld 2013: Lowering TCO for Virtual Desktops with VMware View and VMware V...
 
VMworld 2017 Core Storage
VMworld 2017 Core StorageVMworld 2017 Core Storage
VMworld 2017 Core Storage
 
2017 VMUG Storage Policy Based Management
2017 VMUG Storage Policy Based Management2017 VMUG Storage Policy Based Management
2017 VMUG Storage Policy Based Management
 
VMworld 2017 vSAN Network Design
VMworld 2017 vSAN Network Design VMworld 2017 vSAN Network Design
VMworld 2017 vSAN Network Design
 
VMworld 2017 - Top 10 things to know about vSAN
VMworld 2017 - Top 10 things to know about vSANVMworld 2017 - Top 10 things to know about vSAN
VMworld 2017 - Top 10 things to know about vSAN
 
What is coming for VMware vSphere?
What is coming for VMware vSphere?What is coming for VMware vSphere?
What is coming for VMware vSphere?
 
RHT Upgrading to vSphere 5
RHT Upgrading to vSphere 5RHT Upgrading to vSphere 5
RHT Upgrading to vSphere 5
 
VMworld 2014: vSphere Distributed Switch
VMworld 2014: vSphere Distributed SwitchVMworld 2014: vSphere Distributed Switch
VMworld 2014: vSphere Distributed Switch
 
VMware Advance Troubleshooting Workshop - Day 4
VMware Advance Troubleshooting Workshop - Day 4VMware Advance Troubleshooting Workshop - Day 4
VMware Advance Troubleshooting Workshop - Day 4
 
Presentation v mware virtual san 6.0
Presentation   v mware virtual san 6.0Presentation   v mware virtual san 6.0
Presentation v mware virtual san 6.0
 
Virtual san hardware guidance & best practices
Virtual san hardware guidance & best practicesVirtual san hardware guidance & best practices
Virtual san hardware guidance & best practices
 
A day in the life of a VSAN I/O - STO7875
A day in the life of a VSAN I/O - STO7875A day in the life of a VSAN I/O - STO7875
A day in the life of a VSAN I/O - STO7875
 
Virtual SAN 6.2, hyper-converged infrastructure software
Virtual SAN 6.2, hyper-converged infrastructure softwareVirtual SAN 6.2, hyper-converged infrastructure software
Virtual SAN 6.2, hyper-converged infrastructure software
 
STO7535 Virtual SAN Proof of Concept - VMworld 2016
STO7535 Virtual SAN Proof of Concept - VMworld 2016STO7535 Virtual SAN Proof of Concept - VMworld 2016
STO7535 Virtual SAN Proof of Concept - VMworld 2016
 

Viewers also liked

Presentation vmware building “your cloud”
Presentation   vmware building “your cloud”Presentation   vmware building “your cloud”
Presentation vmware building “your cloud”
solarisyourep
 
Salty OPS – Saltstack Introduction
Salty OPS – Saltstack IntroductionSalty OPS – Saltstack Introduction
Salty OPS – Saltstack Introduction
Walter Liu
 
Disaster Recovery with the AWS Cloud
Disaster Recovery with the AWS CloudDisaster Recovery with the AWS Cloud
Disaster Recovery with the AWS Cloud
Amazon Web Services
 

Viewers also liked (20)

Introduction to vSphere APIs Using pyVmomi
Introduction to vSphere APIs Using pyVmomiIntroduction to vSphere APIs Using pyVmomi
Introduction to vSphere APIs Using pyVmomi
 
VMware Presentation
VMware PresentationVMware Presentation
VMware Presentation
 
Free VMware Presentation: The Power to Change
Free VMware Presentation:  The Power to ChangeFree VMware Presentation:  The Power to Change
Free VMware Presentation: The Power to Change
 
Oracle Public Cloud : Provisioning with Chef
Oracle Public Cloud : Provisioning with ChefOracle Public Cloud : Provisioning with Chef
Oracle Public Cloud : Provisioning with Chef
 
Presentation vmware building “your cloud”
Presentation   vmware building “your cloud”Presentation   vmware building “your cloud”
Presentation vmware building “your cloud”
 
Using SaltStack to orchestrate microservices in application containers at Sal...
Using SaltStack to orchestrate microservices in application containers at Sal...Using SaltStack to orchestrate microservices in application containers at Sal...
Using SaltStack to orchestrate microservices in application containers at Sal...
 
EMC Hybrid Cloud Solutions with VMware
EMC Hybrid Cloud Solutions with VMwareEMC Hybrid Cloud Solutions with VMware
EMC Hybrid Cloud Solutions with VMware
 
Orchestrate Event-Driven Infrastructure with SaltStack
Orchestrate Event-Driven Infrastructure with SaltStackOrchestrate Event-Driven Infrastructure with SaltStack
Orchestrate Event-Driven Infrastructure with SaltStack
 
Salty OPS – Saltstack Introduction
Salty OPS – Saltstack IntroductionSalty OPS – Saltstack Introduction
Salty OPS – Saltstack Introduction
 
Deploying Foreman in Enterprise Environments
Deploying Foreman in Enterprise EnvironmentsDeploying Foreman in Enterprise Environments
Deploying Foreman in Enterprise Environments
 
SaltConf14 - Matthew Williams, Flowroute - Salt Virt for Linux contatiners an...
SaltConf14 - Matthew Williams, Flowroute - Salt Virt for Linux contatiners an...SaltConf14 - Matthew Williams, Flowroute - Salt Virt for Linux contatiners an...
SaltConf14 - Matthew Williams, Flowroute - Salt Virt for Linux contatiners an...
 
Vmware vSphere Api Best Practices
Vmware vSphere Api Best PracticesVmware vSphere Api Best Practices
Vmware vSphere Api Best Practices
 
Top 3 Reasons to Move Existing Applications to the Cloud
Top 3 Reasons to Move Existing Applications to the CloudTop 3 Reasons to Move Existing Applications to the Cloud
Top 3 Reasons to Move Existing Applications to the Cloud
 
Software Defined Storage
Software Defined Storage Software Defined Storage
Software Defined Storage
 
SaltStack For DevOps, Free Sample
SaltStack For DevOps, Free SampleSaltStack For DevOps, Free Sample
SaltStack For DevOps, Free Sample
 
Disaster Recovery with the AWS Cloud
Disaster Recovery with the AWS CloudDisaster Recovery with the AWS Cloud
Disaster Recovery with the AWS Cloud
 
Running and Managing Your Network Just Got Easier
Running and Managing Your Network Just Got EasierRunning and Managing Your Network Just Got Easier
Running and Managing Your Network Just Got Easier
 
vRealize Operations 6.4: Supercharge your SDDC Intelligent Operations
vRealize Operations 6.4: Supercharge your SDDC Intelligent OperationsvRealize Operations 6.4: Supercharge your SDDC Intelligent Operations
vRealize Operations 6.4: Supercharge your SDDC Intelligent Operations
 
Managing your SaltStack Minions with Foreman
Managing your SaltStack Minions with ForemanManaging your SaltStack Minions with Foreman
Managing your SaltStack Minions with Foreman
 
Introducing VMware vRealize Suite - Purpose Built for the Hybrid Cloud
Introducing VMware vRealize Suite - Purpose Built for the Hybrid Cloud Introducing VMware vRealize Suite - Purpose Built for the Hybrid Cloud
Introducing VMware vRealize Suite - Purpose Built for the Hybrid Cloud
 

Similar to Salt Cloud vmware-orchestration

Sa106 – practical solutions for connections administrators
Sa106 – practical solutions for connections administratorsSa106 – practical solutions for connections administrators
Sa106 – practical solutions for connections administrators
Sharon James
 

Similar to Salt Cloud vmware-orchestration (20)

(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...
(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...
(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...
 
ASP.NET Core and Docker
ASP.NET Core and DockerASP.NET Core and Docker
ASP.NET Core and Docker
 
Open Stack compute-service-nova
Open Stack compute-service-novaOpen Stack compute-service-nova
Open Stack compute-service-nova
 
Kl 031.30 eng_class_setup_guide_1.2
Kl 031.30 eng_class_setup_guide_1.2Kl 031.30 eng_class_setup_guide_1.2
Kl 031.30 eng_class_setup_guide_1.2
 
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
 
Scaling drupal horizontally and in cloud
Scaling drupal horizontally and in cloudScaling drupal horizontally and in cloud
Scaling drupal horizontally and in cloud
 
Dockerization of Azure Platform
Dockerization of Azure PlatformDockerization of Azure Platform
Dockerization of Azure Platform
 
CloudStack - Top 5 Technical Issues and Troubleshooting
CloudStack - Top 5 Technical Issues and TroubleshootingCloudStack - Top 5 Technical Issues and Troubleshooting
CloudStack - Top 5 Technical Issues and Troubleshooting
 
PVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agents
PVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agentsPVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agents
PVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agents
 
DCHQ Cloud Application Platform | Linux Containers | Docker PaaS
DCHQ Cloud Application Platform | Linux Containers | Docker PaaSDCHQ Cloud Application Platform | Linux Containers | Docker PaaS
DCHQ Cloud Application Platform | Linux Containers | Docker PaaS
 
Amazon AWS Workspace Howto
Amazon AWS Workspace HowtoAmazon AWS Workspace Howto
Amazon AWS Workspace Howto
 
Mythical Mysfits: Monolith to Microservices with Docker and Fargate - MAD305 ...
Mythical Mysfits: Monolith to Microservices with Docker and Fargate - MAD305 ...Mythical Mysfits: Monolith to Microservices with Docker and Fargate - MAD305 ...
Mythical Mysfits: Monolith to Microservices with Docker and Fargate - MAD305 ...
 
Assembling an Open Source Toolchain to Manage Public, Private and Hybrid Clou...
Assembling an Open Source Toolchain to Manage Public, Private and Hybrid Clou...Assembling an Open Source Toolchain to Manage Public, Private and Hybrid Clou...
Assembling an Open Source Toolchain to Manage Public, Private and Hybrid Clou...
 
Nested CloudStack with VMware
Nested CloudStack with VMwareNested CloudStack with VMware
Nested CloudStack with VMware
 
Sa106 – practical solutions for connections administrators
Sa106 – practical solutions for connections administratorsSa106 – practical solutions for connections administrators
Sa106 – practical solutions for connections administrators
 
OSDC 2018 | Spicing up VMWare with Ansible and InSpec by Martin Schurz and S...
OSDC 2018 | Spicing up VMWare with Ansible and InSpec by Martin Schurz and  S...OSDC 2018 | Spicing up VMWare with Ansible and InSpec by Martin Schurz and  S...
OSDC 2018 | Spicing up VMWare with Ansible and InSpec by Martin Schurz and S...
 
SaltConf14 - Ben Cane - Using SaltStack in High Availability Environments
SaltConf14 - Ben Cane - Using SaltStack in High Availability EnvironmentsSaltConf14 - Ben Cane - Using SaltStack in High Availability Environments
SaltConf14 - Ben Cane - Using SaltStack in High Availability Environments
 
Gianluca Arbezzano Wordpress: gestione delle installazioni e scalabilità con ...
Gianluca Arbezzano Wordpress: gestione delle installazioni e scalabilità con ...Gianluca Arbezzano Wordpress: gestione delle installazioni e scalabilità con ...
Gianluca Arbezzano Wordpress: gestione delle installazioni e scalabilità con ...
 
A 60-minute tour of AWS Compute (November 2016)
A 60-minute tour of AWS Compute (November 2016)A 60-minute tour of AWS Compute (November 2016)
A 60-minute tour of AWS Compute (November 2016)
 
Ansible & CloudStack - Configuration Management
Ansible & CloudStack - Configuration ManagementAnsible & CloudStack - Configuration Management
Ansible & CloudStack - Configuration Management
 

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
 

Recently uploaded (20)

Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
"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 ...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
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, ...
 
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)
 
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
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
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...
 
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
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
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
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 

Salt Cloud vmware-orchestration

  • 1. SaltStack & VMWare An Automation and Orchestration Solution for VMWare Esxi 6.0
  • 2. The problem A considerable amount of time was spent on commissioning virtual machines and customizing existing ones Development needed a fast CLI based method for provisioning vms with a non domain restricted syntax Chart: Average approximates 2013- 600sec Salt-Time 1h 40m Manually 1h 30m Manually
  • 3. The solution Automation Select a tool that is easy to implement , extensible and rewarding to learn. Help us provide a rapid response that matches the requirement. Compatible with Ansible but much more powerful
  • 4. How it works Step 1 Capture Specification into a template Clients specification needs to be verified and confirmed, it will then be translated into a virtual machine template. Step 2 Link Create a saltstack ‘salt- cloud’ configuration file Connects to the ‘vmware-template’ Step 3 Build implement the SaltStack command line to spin the new virtual machine.
  • 5. Why SaltStack ! implements the most up to date APIs with ‘pyVmomi’, these are compatible with our target environment. Active community Our trial proved to us that the community support was very good and helped us overcome issues. Documentation Excellent documentation, this was found to be organised and containing material or high quality versatility A well designed tool relying on the richness of Python, can server the IT-Team in different implementations. Compatibility API
  • 6. Salt General Structure Standard Master Own comms protocol, scalable can also use ssh. Minion Implement instructions Multi Master Many Master (Nodes) Resilience Have master of masters case in complex structures. Masterless Minion only. Minion delegate as master for multiple nodes, (Special cases).
  • 7. Salt-Cloud: Elements SaltStack has several elements that are required by salt-cloud In the instal several elements are needed on CentOS6: Ensure EPEL repository and salt repositories are included yum -y install update yum -y install python-pip pip install pyVimomi yum -y install zlib-devel bzip2-devel openssl-devel xz-libs wget sqlite-devel python-devel- libxml2-devel libxslt-devel salt-master salt-minion salt- cloud Please remember that salt-cloud should not be installed via pip as it was detected to cause compatibility issues.
  • 8. Salt Virtual machines (Masters) Salt Targets (Minions)
  • 9.
  • 10. SaltStack Files Salt-Standard Standard files are meant for standard functions. Configuration that impacts the nodes controlled by SaltStack, similar to the way playbooks in Ansible impact the target nodes. These are located at ‘/srv/salt’. These files are details next page. Salt-Cloud: Additional files that in our case come with installing the ‘salt-cloud’ API specific to SaltStack’s interface with Cloud providers, those include in our case VMware & Amazon, they are not limited to those but include RackSpace, digital ocean, KVM and much more. Located @ /etc/salt/: cloud.providers.d, cloud.profiles.d
  • 11. Salt Cloud folder components Salt Cloud structure After installing ‘Salt-Cloud’ one would notice the following components added. The two that are important for the basic interaction of SaltStack with vmware Esxi are 1. cloud.providers.d 2. cloud.profiles.d
  • 12. Salt-Cloud files Purpose! Looking at the newly generated ‘salt cloud’ folders & files to verify their purposes cloud.providers.d: vmware.conf, contains the login credentials to vmware vcenter, typical login and password for an account that has sufficient rights to create and delete virtual machines or whatever operations this setup is expected to execute. cloud.profiles.d: Specifications for the vms to be created. Other Important components: ‘vmware.py’ is an important python script, it uses pyVimomi, the salt system will not function without it, it was found that it will be added by the repos on Centos but not Ubuntu, so Ununtu users can add this manually and download it from github. The locations for it are: On Ubuntu 14.04: /usr/lib/python2.7/dist-packages/salt/cloud/clouds/ On CentOS7: /usr/lib/python2.6/site-packages/sos/plugins/
  • 13. Salt Cloud Provider and profiles relation /etc/salt/cloud.providers.d/vmware.conf vcenter6: user: ‘saltstack@example.com’ password: $ecret url: ‘vcenter6.example.com’ protocol: ‘https’ port: 443 VM01_Profile: provider: vcenter6 num_cpus: 1 memory: 1GB devices: disk: Hard disk 1: size: 20 network: adapter type: vmxnet3 name: “vm network” switch_type: standard ip: 10.194.70.31 gateway: 10.194.70.1 subnet_mask: 255.255.255.0 domain: example.com dns_servers: - 10.194.0.33 - 10.194.0.44 resourcepool: devops cluster: DevopsCluster minion: master: salt03.example.com deploy: True power_on: True ssh_username: root password: SaltAccess extra_config: guestinfo.ipaddress: 10.194.70.31 guestinfo.netmast: 255.255.255.0 guestinfo.gateway: 10.194.70.1 guestinfo.hostname: vm01.example.com file_map: /srv/salt/map/vm01/etc/hosts: /etc/hosts
  • 14. Salt-cloud For VMWARE Interaction
  • 15. SALT-CLOUD: Administrative Commands The command used to create the virtual machines is as below: tttthihsss after the -p one would specify the profile used , this line for the profile comes from the first line in the configuration file that specify the vm specification and is included in ‘/etc/salt/cloud.profiles,d/ The first line from that configuration file is below, it highlight where the line has come from: After that comes the name we intend to give to the virtual machine. ‘dev01.example.com’ that will show on vcenter as the machine is being built, that will also be given to the folder where is will sit. Please note this will not impact the name of the vm within its own operating system as that will need to be specified within the configuration file. The ‘-lL’ flag will be very useful to include, it will enable one to be capture the errors . It’s essential to restart the ‘salt- master’ service upon making changes to refresh. Useful commands: salt-cloud --query # This will give details about the vms created salt-cloud -p dev01 dev02 # One can create several vms with one command salt-cloud -d dev01 dev02 # One can also destroy several vms at the same time salt-cloud -F # List all vms and templates on all configured providers
  • 16. Dependencies VMWARE-Tools has a number of related packages. This used to enable the customization of a virtual machine. This involves taking a vm or a template, cloning a new one from it the giving the new one a name, network configuration files and packages. It’s important to know that after reading the api for ‘vmware’ that we cannot so far create a vm from scratch, so far we can only clone from a vm or a template. Traditionally vmware provided the vmware-tools, this has now been handed over to the open source community and is provided in the following packages: Remove the network adapter configuration from the gold image and implement the changes below on it: (On CentOS 6): install libmspack open-vm-tools open-vm-tools-devel open-vm-tools-desktop open-vm-tools-debuginfo open-vm-tools-deploypkg (released by vmware and is essential ) change /etc/udev/rules.d/70-persistent-net.rules remove the reference related to the mac address completely, the line will look as below: SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”VMXNET3”, ATTR{type}==”1”, KERNEL==”eth*”, NAME=”eth0” chkconfig vmtoolsd enable service vmtoolsd start
  • 17. Dependencies ‘VMWARE-Tools CentOS 7 & Ubuntu 14.04 On the gold image, (VM or template one will clone from): Will rely on %100 open source packages, ‘open-vm-tools’ in the case of CentOS, RHEL, Oracle Linux, Scientific Linux and Fedora, one needs to ensure they have added the ‘EPEL’ repositories. It’s recommended that one keeps a golden image with a working version of ‘open-vm-tools’ and experiment with the latest ‘open-vm-tools’ separately as it’s likely to show some compatibility issues. remove the network adapter configuration In the location ‘/etc/udev/70-persistent-net.rules’ The line should be as such: SUBSYSTEM=”net”, ACTION==”add”, DRIVERS==”vmxnet3”, ATTR{type}==”1”, KERNEL==”eth*”, NAME==”eth0” One can add this line as many times as they have network adapters on the vm. The driver ‘VMXNET3’ is the latest in vmware and the most recommended. The older network driver “e1000” may still be used and needs to be referenced appropriately. systemctl enable vmtoolsd systemctl start vmtoolsd

Editor's Notes

  1. Hi Rita, I have shared this with you