Most mid-sized Django websites thrive by relying on memcached. Though what happens when basic memcached is not enough? And how can one identify when the caching architecture is becoming a bottleneck? We'll cover the problems we've encountered and solutions we've put in place.
Although event sourcing (and its sister pattern CQRS) has been gaining traction in recent years, it's still baffling for many engineers attempting to implement it for the first time. While there's plenty of material on the subject, most of it is too basic or theoretical for practical applications, and engineers often end up having to reinvent (or rediscover) suitable approaches and techniques.
This talk focuses on practical aspects of building event-sourced systems, lessons learned from our experience building such systems at Wix. We'll walk through the design and implementation of a relatively simple event-sourced system, covering the event model, underlying persistence model, code layering/factoring and operational considerations.
A talk given at Reversim Summit 2017 in Tel-Aviv, Israel.
Mobile devices are so useful because they can get on the net with their built-in wi-fi or cellular data radios. But how does this work? In iOS, we have a slew of networking APIs, each appropriate in different situations. From decades-old BSD sockets to the new-in-iOS-5 iCloud, there are a wide range of networking calls available to your app, and an equally wide range of semantics in how to use them. In this talk, we'll start with high-level abstractions like iCloud and other objects that can either load from or save to a URL, then progress down through the stack, grabbing arbitrary content from URLs, self-networking with Bonjour and Game Kit, and finally accessing the socket layer with CFNetwork and BSD sockets.
iCloud sample code at: http://dl.dropbox.com/u/12216224/conferences/codemash12/bonjour-icloud/CloudNotes.zip
Most mid-sized Django websites thrive by relying on memcached. Though what happens when basic memcached is not enough? And how can one identify when the caching architecture is becoming a bottleneck? We'll cover the problems we've encountered and solutions we've put in place.
Although event sourcing (and its sister pattern CQRS) has been gaining traction in recent years, it's still baffling for many engineers attempting to implement it for the first time. While there's plenty of material on the subject, most of it is too basic or theoretical for practical applications, and engineers often end up having to reinvent (or rediscover) suitable approaches and techniques.
This talk focuses on practical aspects of building event-sourced systems, lessons learned from our experience building such systems at Wix. We'll walk through the design and implementation of a relatively simple event-sourced system, covering the event model, underlying persistence model, code layering/factoring and operational considerations.
A talk given at Reversim Summit 2017 in Tel-Aviv, Israel.
Mobile devices are so useful because they can get on the net with their built-in wi-fi or cellular data radios. But how does this work? In iOS, we have a slew of networking APIs, each appropriate in different situations. From decades-old BSD sockets to the new-in-iOS-5 iCloud, there are a wide range of networking calls available to your app, and an equally wide range of semantics in how to use them. In this talk, we'll start with high-level abstractions like iCloud and other objects that can either load from or save to a URL, then progress down through the stack, grabbing arbitrary content from URLs, self-networking with Bonjour and Game Kit, and finally accessing the socket layer with CFNetwork and BSD sockets.
iCloud sample code at: http://dl.dropbox.com/u/12216224/conferences/codemash12/bonjour-icloud/CloudNotes.zip
This talk revisits dependency injection, and attempts to answer a single question honestly, or at least while pointing out and acknowledging the biases at play: "is dependency injection a good thing?"
Dependency injection has fast established itself as a major design pattern in modern software. No longer the province of server-side and enterprise software, it is now a fundamental component of frameworks from Spring to Angular.js.
With such widespread success, the time is ripe to take a fresh look at dependency injection if we are to understand it better. After all, DI is instrumental in building large systems that are loosely coupled, and it cleanly separates your tests from implementation... or does it?
(A talk given at GeeCON 2017 in Prague, Czech Republic)
My Node.js workshop from Sela's Developer Conference 2015.
In the Workshop we covered The basics Node.js api's and the express web application framework.
Look past the square braces and the damned header files and Objective-C -- the essential language of iOS development -- really isn't that different from other object-oriented languages. Classes, single-inheritance, polymorphism, implementation hiding... check, check, check, and check. So it's really not that difficult for old Java / Python / Ruby / C++ dogs to learn new tricks once they install Xcode, right?
To be a competent Obj-C programmer, not that hard.
To be a great Obj-C programmer... now that's another story.
In this session, we will look at traits that are unique to Objective-C, the tricks that bring out the expressiveness and power of the language. We'll also look at how to write idiomatic code that will be easily understood and maintained by other Objective-C developers. We'll look at how Automatic Reference Counting resembles but is really nothing like Garbage Collection, how properties put plain old instance variables to shame, how we loosely couple classes with delegates and notification, how blocks help us un-block our code by simplifying asynchronicity, and more.
Original slides from Ryan Dahl's NodeJs intro talkAarti Parikh
These are the original slides from the nodejs talk. I was surprised not find them on slideshare so adding them. The video link is here https://www.youtube.com/watch?v=ztspvPYybIY
Terracotta (an open source technology) provides a clustered, durable virtual heap. Terracotta's goal is to make Java apps scale with as little effort as possible. If you are using Hibernate, there are several patterns that can be used to leverage Terracotta and reduce the load on your database so your app can scale.
First, you can use the Terracotta clustered Hibernate cache. This is a high-performance clustered cache and allows you to avoid hitting the database on all nodes in your cluster. It's suitable, not just for read-only, but also for read-mostly and read-write use cases, which traditionally have not been viewed as good use cases for Hibernate second level cache.
Another high performance option is to disconnect your POJOs from their Hibernate session and manage them entirely in Terracotta shared heap instead. This is a great option for conversational data where the conversational data is not of long-term interest but must be persistent and highly-available. This pattern can significantly reduce your database load but does require more changes to your application than using second-level cache.
This talk will examine the basics of what Terracotta provides and examples of how you can scale your Hibernate application with both clustered second level cache and detached clustered state. Also, we'll take a look at Terracotta's Hibernate-specific monitoring tools.
Vert.x – The problem of real-time data bindingAlex Derkach
As the popularity of any event-driven application increases, the number of concurrent connections may increase. Applications that employ thread-per-client architecture, frustrate scalability by exhausting a server’s memory with excessive allocations and by exhausting a server’s CPU with excessive context-switching. One of obvious solutions, is exorcising blocking operations from such applications. Vert.x is event driven and non blocking toolkit, which may help you to achive this goal. In this talk, we are going to cover it’s core features and develop a primitive application using WebSockets, RxJava and Vert.x.
Slides for presentation on ZooKeeper I gave at Near Infinity (www.nearinfinity.com) 2012 spring conference.
The associated sample code is on GitHub at https://github.com/sleberknight/zookeeper-samples
"Puppet and Apache CloudStack" by David Nalley, Citrix, at Puppet Camp San Francisco 2013. Find a Puppet Camp near you: puppetlabs.com/community/puppet-camp/
VMworld 2013: PowerCLI Best Practices - A Deep DiveVMworld
VMworld 2013
Luc Dekens, Eurocontrol
Alan Renouf, VMware
Learn more about VMworld and register at http://www.vmworld.com/index.jspa?src=socmed-vmworld-slideshare
This talk revisits dependency injection, and attempts to answer a single question honestly, or at least while pointing out and acknowledging the biases at play: "is dependency injection a good thing?"
Dependency injection has fast established itself as a major design pattern in modern software. No longer the province of server-side and enterprise software, it is now a fundamental component of frameworks from Spring to Angular.js.
With such widespread success, the time is ripe to take a fresh look at dependency injection if we are to understand it better. After all, DI is instrumental in building large systems that are loosely coupled, and it cleanly separates your tests from implementation... or does it?
(A talk given at GeeCON 2017 in Prague, Czech Republic)
My Node.js workshop from Sela's Developer Conference 2015.
In the Workshop we covered The basics Node.js api's and the express web application framework.
Look past the square braces and the damned header files and Objective-C -- the essential language of iOS development -- really isn't that different from other object-oriented languages. Classes, single-inheritance, polymorphism, implementation hiding... check, check, check, and check. So it's really not that difficult for old Java / Python / Ruby / C++ dogs to learn new tricks once they install Xcode, right?
To be a competent Obj-C programmer, not that hard.
To be a great Obj-C programmer... now that's another story.
In this session, we will look at traits that are unique to Objective-C, the tricks that bring out the expressiveness and power of the language. We'll also look at how to write idiomatic code that will be easily understood and maintained by other Objective-C developers. We'll look at how Automatic Reference Counting resembles but is really nothing like Garbage Collection, how properties put plain old instance variables to shame, how we loosely couple classes with delegates and notification, how blocks help us un-block our code by simplifying asynchronicity, and more.
Original slides from Ryan Dahl's NodeJs intro talkAarti Parikh
These are the original slides from the nodejs talk. I was surprised not find them on slideshare so adding them. The video link is here https://www.youtube.com/watch?v=ztspvPYybIY
Terracotta (an open source technology) provides a clustered, durable virtual heap. Terracotta's goal is to make Java apps scale with as little effort as possible. If you are using Hibernate, there are several patterns that can be used to leverage Terracotta and reduce the load on your database so your app can scale.
First, you can use the Terracotta clustered Hibernate cache. This is a high-performance clustered cache and allows you to avoid hitting the database on all nodes in your cluster. It's suitable, not just for read-only, but also for read-mostly and read-write use cases, which traditionally have not been viewed as good use cases for Hibernate second level cache.
Another high performance option is to disconnect your POJOs from their Hibernate session and manage them entirely in Terracotta shared heap instead. This is a great option for conversational data where the conversational data is not of long-term interest but must be persistent and highly-available. This pattern can significantly reduce your database load but does require more changes to your application than using second-level cache.
This talk will examine the basics of what Terracotta provides and examples of how you can scale your Hibernate application with both clustered second level cache and detached clustered state. Also, we'll take a look at Terracotta's Hibernate-specific monitoring tools.
Vert.x – The problem of real-time data bindingAlex Derkach
As the popularity of any event-driven application increases, the number of concurrent connections may increase. Applications that employ thread-per-client architecture, frustrate scalability by exhausting a server’s memory with excessive allocations and by exhausting a server’s CPU with excessive context-switching. One of obvious solutions, is exorcising blocking operations from such applications. Vert.x is event driven and non blocking toolkit, which may help you to achive this goal. In this talk, we are going to cover it’s core features and develop a primitive application using WebSockets, RxJava and Vert.x.
Slides for presentation on ZooKeeper I gave at Near Infinity (www.nearinfinity.com) 2012 spring conference.
The associated sample code is on GitHub at https://github.com/sleberknight/zookeeper-samples
"Puppet and Apache CloudStack" by David Nalley, Citrix, at Puppet Camp San Francisco 2013. Find a Puppet Camp near you: puppetlabs.com/community/puppet-camp/
VMworld 2013: PowerCLI Best Practices - A Deep DiveVMworld
VMworld 2013
Luc Dekens, Eurocontrol
Alan Renouf, VMware
Learn more about VMworld and register at http://www.vmworld.com/index.jspa?src=socmed-vmworld-slideshare
Through the magic of virtualization technology (Vagrant) and Puppet, a companion Enterprise grade provisioning technology, we explore how to make the complex configuration game a walk in the park. Bring new team members up to speed in minutes, eliminate variances in configurations, and make integration issues a thing of the past.
Welcome to the new age of team development!
DevCloud - Setup and Demo on Apache CloudStack buildacloud
Hands-on Hacking Session by Amogh Vasekar
1. Demo of CloudStack using DevCloud
2. How we got there -
A) Building CloudStack from scratch
B) Deploying databases
C) Configuring your own DevCloud using Marvin
OpenNebula Conf 2014 | Puppet and OpenNebula - David LutterkortNETWAYS
Many facets of using an IaaS cloud like OpenNebula can be greatly
simplified by using a configuration management tool such as Puppet. This
includes the management of hosts as well as the management of cloud
resources such as virtual machines and networks. Of course, Puppet can also
play an important role in the management of the actual workload of virtual
machine instances. Besides using it in the traditional, purely agent-based
way, it is also possible to use Puppet during the building of machine
images. This serves two purposes: firstly, it speeds up the initial Puppet
run when an instance is launched off that image, sometimes quite
dramatically. Secondly, it supports operating immutable infrastructure
without losing Puppet’s benefits to organize and simplify the description
of the entire infrastructure.
This talk will show how Puppet can be used by adminsitrators to manage
OpenNebula hosts, and by users to manage their infrastructure as well as
how to use Puppet during image builds.
Ansible: How to Get More Sleep and Require Less CoffeeSarah Z
Why you need automation, configuration management and remote execution in your life. An intro to Ansible and how it can make your life in Ops infinitely easier.
Julien Simon "Scaling ML from 0 to millions of users"Fwdays
In this session, I'll show you how to scale machine learning workloads using containers on AWS (Deep Learning AMI and containers, ECS, EKS, SageMaker). We'll discuss the pros and cons of these different services from a technical, operational and cost perspective. Of course, we'll run some demos :)
In the past years it was our mission to manage development, testing and production environments for web projects with agile multi-team setups. Systems were often rather complex, with dozens of services involved. The infrastructure requirements changed frequently and as agile as the rest of project. And of course changes had to be tested and deployed continuously in a controlled and reproducible manner. A mission impossible without systematic configuration management and even with such a great tool like Puppet a continuous challenge.
In this talk I will present our collection of useful tools, learnings and design patterns for Puppet. We will potentially come across topics like Vagrant, VeeWee, EC2, Docker, ENC, facter.d, git magic, Hiera, monitoring, autoregistration, rspec testing, MCollective, Puppet roles and profiles. This talk will not reinvent the wheel, but present some techniques that made us much more productive in our daily work and will hopefully help you in the future.
07 - VMUGIT - Lecce 2018 - Antonio Gentile, FortinetVMUG IT
VMUGIT Meeting - Lecce, 5 Aprile 2018
Antonio Gentile - System Engineer Fortinet Italy - Fortinet Security Fabric - Le nuove sfide della cyber security su infrastrutture software defined
VMUGIT Meeting - Lecce, 5 Aprile 2018
Rodolfo Rotondo VMware Sr. Business Solution Strategist, SEMEA - Difendere tutto... difendere niente! Come sviluppare un approccio strategico alla cyber security nell'era del mobile-cloud e degli oggetti interconnessi
VMUGIT Meeting - Lecce, 5 Aprile 2018
Massimiliano Mortillaro, Partner & Principal Analyst at TECHunplugged - IT Analyst, Data Center Consultant, Trusted Advisor Blockchain & Enterprise IT: autostrada del futuro o via senza uscita?
VMUGIT Meeting - Lecce, 5 Aprile 2018
Enrico Signoretti, Head of Product Strategy at OpenIO, blogger at Juku - IIoT. Il futuro è nell'integrazione Cloud-Edge
Connector Corner: Automate dynamic content and events by pushing a buttonDianaGray10
Here is something new! In our next Connector Corner webinar, we will demonstrate how you can use a single workflow to:
Create a campaign using Mailchimp with merge tags/fields
Send an interactive Slack channel message (using buttons)
Have the message received by managers and peers along with a test email for review
But there’s more:
In a second workflow supporting the same use case, you’ll see:
Your campaign sent to target colleagues for approval
If the “Approve” button is clicked, a Jira/Zendesk ticket is created for the marketing design team
But—if the “Reject” button is pushed, colleagues will be alerted via Slack message
Join us to learn more about this new, human-in-the-loop capability, brought to you by Integration Service connectors.
And...
Speakers:
Akshay Agnihotri, Product Manager
Charlie Greenberg, Host
"Impact of front-end architecture on development cost", Viktor TurskyiFwdays
I have heard many times that architecture is not important for the front-end. Also, many times I have seen how developers implement features on the front-end just following the standard rules for a framework and think that this is enough to successfully launch the project, and then the project fails. How to prevent this and what approach to choose? I have launched dozens of complex projects and during the talk we will analyze which approaches have worked for me and which have not.
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
PHP Frameworks: I want to break free (IPC Berlin 2024)Ralf Eggert
In this presentation, we examine the challenges and limitations of relying too heavily on PHP frameworks in web development. We discuss the history of PHP and its frameworks to understand how this dependence has evolved. The focus will be on providing concrete tips and strategies to reduce reliance on these frameworks, based on real-world examples and practical considerations. The goal is to equip developers with the skills and knowledge to create more flexible and future-proof web applications. We'll explore the importance of maintaining autonomy in a rapidly changing tech landscape and how to make informed decisions in PHP development.
This talk is aimed at encouraging a more independent approach to using PHP frameworks, moving towards a more flexible and future-proof approach to PHP development.
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Tobias Schneck
As AI technology is pushing into IT I was wondering myself, as an “infrastructure container kubernetes guy”, how get this fancy AI technology get managed from an infrastructure operational view? Is it possible to apply our lovely cloud native principals as well? What benefit’s both technologies could bring to each other?
Let me take this questions and provide you a short journey through existing deployment models and use cases for AI software. On practical examples, we discuss what cloud/on-premise strategy we may need for applying it to our own infrastructure to get it to work from an enterprise perspective. I want to give an overview about infrastructure requirements and technologies, what could be beneficial or limiting your AI use cases in an enterprise environment. An interactive Demo will give you some insides, what approaches I got already working for real.
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
3. PowerCLI, che figata!
Short Practical Guide to make you a PowerCLI User
And no, I’m afraid this session will not be in Italian
4. Luc Dekens
• Systems Engineer
• Eurocontrol
• vExpert
• MVP
• Co-author PowerCLI Reference Ed 1 & 2
• Twitter @LucD22
• VMTN LucD
• Blog http://lucd.info
5. Agenda
• PowerCLI is cool!
• Quick tips on Getting Started
• Pitfalls and Common Errors
• How to advance
• Advanced functionality
• And since we all like a good story...
6. Chapter 1 – Meet the Junior Wizard
• Once upon a time, in a kingdom datacenter far way…
• A young girl, fresh from Wizard School, was employed as the Junior
Virtualisation Admin.
• The head Virtualisation Wizard had a first task for her:
• Give me an overview of our clusters and ESXi nodes
• Luckily she learned at Wizard School about Google, the crystal ball.
• After the incantation “vSphere cluster esxi report”, she saw images
appearing in the crystal ball...
7. Community
• The PowerCLI Community is a very active community
• There are tons of snippets available
• VMTN PowerCLI Community
• PowerCLI Community Repository on Github
• VMware{code} – VMware Sample Exchange
• Blogs
• Slack PowerCLI Channels
• Vmware{code}
• vExpert
• PowerShell
9. Zoom in
• PowerShell works with objects
• The pipeline concept
Get-Cluster | Get-VMHost | Select-Object -Property Name,NumCpu,MemoryTotalGB
Get-Cluster Get-VMHost
Cluster
$cluster = Get-Cluster
$esx = Get-VMHost -Location $cluster
foreach($vmhost in $esx){
Select-Object -InputObject $vmhost -Property Name,NumCpu,MemoryTotalGB
}
10. Zoom in further I
• Objects have
• Properties
• Methods
• Get-Member
• Format-Custom
11. Zoom in further II
• Format-Custom
• See the “Values”
• Nested properties
• ‘more’ DOS cmd
12. Code Snippet
• Search turns up a PowerCLI snippet
• What do you need?
• Windows machine with PowerShell installed
• PowerShell v5.1
• .Net
• Connectivity to the vCenter/ESXi node(s)/Appliance
• Mind the Firewall
13. What is PowerCLI?
• PowerCLI is a collection of modules
• Run on/in PowerShell (v5.1)
• Go for PS v5.1
• PowerCLI Core is a Fling (Mac/Linux)
• PowerShell Core v6.0
• .Net Core
• Access to several VMware products
• Installation
• From the PowerShell Gallery
• Install-Module
• Computer
• User
• $PSModulePath
• Auto-load
• PowerCLI Cmdlet Reference
14. PowerCLI has a past I
• 10th Anniversary
• From PSSnapin Modules
• Currently 600+ cmdlets
• Covering more than vSphere
• Code you find, might be “old-ish”
• PSSnapin
• Less cmdlets
15. VMware PowerCLI
Nov
2006
PowerShell
v1 Beta
1.0 1.5
VMware Infrastructure Toolkit VMware vSphere PowerCLI
Nov
2007
Jul
2008
Jan
2009
May
2009
4.0
Jul
2010
4.1
Aug
2011
5.0
Sep
2012
5.1R1
Sep
2013
5.5R1
Sep
2014
5.8R1
Mar
2015
6.0R1
Mar
2016
6.5R16.3R1
Nov
2016
1.0U1 4.0U1 5.0.1 5.1R2 5.5R24.1U1 6.0R2
6.0R3
Apr
2017
6.5.1
6.5.2
Core Core
DeployAutomation DeployAutomation
ImageBuilder ImageBuilder
License License
Cloud Cloud
Vds Vds
Storage Storage
Cis.Core
HA
PCloud
SDK
vROps
VUM
Common
HorizonView
PowerCLI
StorageUtility
SRM
8 102 120 157 165 237 293 361 400 426 498 528 587 623
VMware PowerCLI
6.5.3
626
PowerCLI has a past II
16. How to run PowerCLI code I
• PowerShell prompt
• Execution Policy (Set-ExecutionPolicy)
• Connect to vSphere Server (Connect-VIServer)
• PowerCLI Configuration
• Certificates
• Warnings
• Paste snippet
• Run .ps1 file
• Integrated Environment
• ISE
• Visual Studio Code
17. How to run PowerCLI code II
• The .ps1 file
• Run from the prompt
• Don’t forget to “connect”
• Shortcut
• Schedule it
19. Chapter 2 – Learning new tricks
• That went well!
• Our Junior Wizard got access to the Advanced Spell Books
• But as it goes, the Head Wizard had some new tasks
• Time to start reading those new spell books
• ... and give Google, the crystal ball, an extra polish
20. Expanding the Select I
• Calculated property = Hash table
• Name
• Expression scriptblock
• Using .Net function
• Accessing the vSphere object
• Pipeline variable
26. Chapter 3 – Getting creative
• Our Junior Wizard became a Principal Wizard
• But she still was missing something in her job!
• She wanted to become creative, and use those “create” spells
• The Head Wizard went of to a Wizard Conference in Las Vegas
• ... now she had her chance!
• But how was she going to minimise the risk?
27. Use the Safe Guards I
• After the Get-phase, time to tackle Set- and New- cmdlets
• PowerShell comes with a number of safe guards, use them!
• WhatIf
• Verbose
• Try-Catch
• Make sure to automate your back out as well
• Snapshot
29. Digging deep aka The API
• PowerCLI cmdlets have a 80/20 behaviour
• 80% of the use cases covered by cmdlets
• 20% use the API
• Get comfortable with the vSphere API
• Read up
• Practice, practice, practice!
• REST is there/coming
30. A simple API sample I
• ESXi node – CPU Power Management
• No cmdlet vSphere Web Services API Reference
31. A simple API sample II
# Options are: static,dynamic,low,custom
$desiredPowerPolicy = "static"
Get-VMHost | %{
$powSys = Get-View $_.ExtensionData.ConfigManager.PowerSystem
$key = ($powSys.Capability.AvailablePolicy |
where {$_.ShortName -eq $desiredPowerPolicy}).Key
$powSys.ConfigurePowerPolicy($key)
}
32. It’s not always the API
• There is also Get-EsxCli
• Example: getting LAG information from a VDS
$lagInfo = foreach($vds in Get-VDSwitch){
$vds | Get-VMHost | %{
$esxcli = Get-EsxCli -VMHost $_
$vnic = $esxcli.network.vswitch.dvs.vmware.list() |
where{$_.Name -eq $vds.Name} | Select -ExpandProperty Uplinks
$esxcli.network.vswitch.dvs.vmware.lacp.config.get() |
where{$_.DVSName -eq $vds.Name} |
Select DVSName,LAGName,LAGID,
@{N='vmnic';E={($vnic | Sort-Object) -join '|'}}
}
}
$lagInfo | Sort-Object -Property LAGName -Unique
33. Chapter 4 - Mastery
• Our heroin is now ready to become a Master Wizard
• A wExpert, a much coveted title for wizards
• Since she learned so much from other wizards,
• … she now wants to share that knowledge.
• That would make her wizard career full circle!
34. From snippet to function I
$vmConfigSpec = New-Object VMware.Vim.VirtualMachineConfigSpec
$vmConfigSpec.changeTrackingEnabled = $true
Get-VM | %{
$vm.ExtensionData.ReconfigVM($vmConfigSpec)
}
• Snippet to enable CBT on all VMs
35. From snippet to function II
function Set-CBT
{
[cmdletbinding(SupportsShouldProcess = $true,ConfirmImpact='High')]
param(
[Parameter(Mandatory=$true,ValueFromPipeline)]
[VMware.VimAutomation.ViCore.Types.V1.Inventory.VirtualMachine[]]$VM
)
Begin
{
$vmConfigSpec = New-Object VMware.Vim.VirtualMachineConfigSpec
$vmConfigSpec.changeTrackingEnabled = $true
}
Process
{
$VM | ForEach-Object {
if ($PSCmdlet.ShouldProcess($_.Name))
{
$_.ExtensionData.ReconfigVM($vmConfigSpec)
}
}
}
}
36. From snippet to function III
Get-VMHost -PipelineVariable esx |
Get-ScsiLun -LunType disk |
Get-scsilunpath | Where {$_.state -eq “Dead”} |
Select @{N='VMHost';E={$esx.Name}},Name,ScsiCanonicalName,State
• Snippet to LUN path states
37. From snippet to function IV
function Get-ISeeDeadPaths{
[cmdletbinding(SupportsShouldProcess = $true,ConfirmImpact='Low')]
param(
[Parameter(Mandatory=$true,ValueFromPipeline)]
[VMware.VimAutomation.ViCore.Types.V1.Inventory.VMHost[]]$VMHost
)
Process
{
foreach($esx in $VMHost){
Get-ScsiLun -LunType disk -VmHost $esx |
Get-scsilunpath | Where {$_.state -eq “Dead”} | %{
New-Object PSObject -Property @{
VMHost = $esx.Name
Name = $_.Name
ScsiCanonicalName = $_.ScsiCanonicalName
State = $_.State
}
}
}
}
}
38. From function to advanced function
function Set-CBT
{
<#
.SYNOPSIS
Enable Chaged Block Tracking for a VM
.DESCRIPTION
Enables Change Block Tracking for a VM.
See KB1020128
.PARAMETER VM
The VM object
.EXAMPLE
Set-CBT -VM (Get-VM -Name MyVM)
.EXAMPLE
Get-VM | Set-CBT
.INPUTS
[VMware.VimAutomation.ViCore.Types.V1.Inventory.VirtualMachine[]]
.OUTPUTS
void
.NOTES
Author: me
History:
v1.1 19/08/2017 19:50 Added Help
v1.0 07/08/2017 13:10 Added pipeline support
v0.9 02/06/2017 15:30 Initial version
#>
[cmdletbinding(SupportsShouldProcess = $true,ConfirmImpact='High')]
param(
[Parameter(Mandatory=$true,ValueFromPipeline)]
[VMware.VimAutomation.ViCore.Types.V1.Inventory.VirtualMachine[]]$VM
)
39. From function to module
• Create a module
• .psm1 – collect all your functions
• .psd1 – manifest New-ModuleManifest
• Share the module
• Local – company share
• World - PowerCLI Community Repository
40. Epilog – A Wizard’s Life
• No need to be clueless!
• Start slow, Rome wasn’t build in one day!
• Set yourself practical goals
• Learn as you go along
• Use the Community
• Ask questions
• Don’t reinvent the wheel, just steal!
• Contribute to the Community!
• PowerCLI Community Repository
• Report “features” through an SR
• Suggest PowerCLI Ideas