Most people know Amazon Echo (Alexa), the device to voice control your home. I just couldn’t resist to order an echo dot to connect it to our Slack channel. Telling echo dot to write messages into the chat is ok and fun. But to use it to send commands to our VMware vSphere environment was getting me excited. About a week ago we released our OpBot ChatOps for VMware vSphere product, that is not less than the beginning of the new way to operate your VMware vSphere and much more.
Using voice commands to check for the health of some virtual machines, your ESXi hosts and many other datacenter components is intriguing.
So let’s start this project and welcome the players that share a room within Slack Chat:
Player 1 – Amazon Echo Dot, hosts the Alexa voice control to publish commands within the Chat
Player 2 – OpBot, who lives in your chat room to make sure, you got VMware vSphere under control
Player 3 – myself, who just wants to have access to his virtual environment from anywhere
I want to start with the result and get into the details then.
Of course I needed the obvious things, like a Slack account, an installed OpBot connected to Slack and the Amazon Echo Dot setup.
I created a Slack channel called #bottalk, where all action should happen and invited OpBot and myself.
Next thing was to create a Amazon Lambda service and to add an Alexa Skill. A very good starting point how to combine Slack and Alexa, is the following blog post: Hands-Free Slack: AWS Lambda meets Amazon Echo
Within Amazon AWS Lambda, I created a new function to send messages to the Slack chat, using the webhook and the introductional text.
Now we need to let Alexa know of the new skill we just created the service for.
Create a new skill, using the copied ARN as an endpoint is pretty forward and simple. You just need to create the correct opening word (invocation) to start the skill using the Lambda service.
Getting used to the OpBot commands is very helpful of course and it takes some training to say the commands in the right way, so they are interpreted correctly.
If all goes well, you should be able to give OpBot commands to show virtual machines, snapshots, events and much more.
- In my case, starting with the opening: Alexa open slack
- Now Alexa responds back to get the commands to send to slack
- I answer: send snapshots
- the Lambda service is pushing my response into the Slack channel #opbot
Stay tuned, as we’re going to continue enhancing OpBot massively over the next weeks, months and years.