Keine Ergebnisse gefunden
February 22, 2019Jennifer King
Editor’s Note: Integrating Alexa with Jenkins to launch your pipelines and obtain results about your deployments through voice is easier than you think. Learn how Alexa Champion, Kesha Williams’, latest side project teaches Alexa to deploy code to the cloud.
From the time that I developed my first Alexa skill, I dreamed of deploying my Java projects to the cloud via voice. For a software engineer like me, telling Alexa to deploy my code is the ultimate level of cool! I recently made my dream a reality when I devoted a weekend to developing my newest Alexa skill, DevOps Pal. In this blog, I will explain the architecture of DevOps Pal, and why I chose Alexa for Business as the mechanism to distribute the skill.
Voice is changing how we interact with technology because the interaction is simple, frictionless, and streamlined. For me, voice is an easier way to control Jenkins and retrieve results about my deployments without having to touch a keyboard. In this use case, voice is another access point for data and is a way to further automate the process of building, testing, and deploying a Java project to the cloud, improving efficiency.
If you’re working with DevOps, you understand the need for Continuous Integration and Continuous Delivery (CI/CD) to automate the software delivery pipeline in a reproducible way.
CI/CD is the practice of continuously building, testing, and deploying code once it’s committed to version control. DevOps and CI/CD provides software engineering teams with confidence in the code being pushed to production and shorter development lifecycles, which in the end produces happier users, clients, and customers.
DevOps Pal is an Alexa for Business skill that is used to kick off a Jenkins pipeline job. Once DevOps Pal invokes the job, the pipeline status displays in real time via the Blue Ocean Pipeline Run Details View Page.
I used several components and tools to create DevOps Pal. Let’s review the architecture in detail.
The flow begins by saying, “Alexa, open DevOps Pal and deploy my code,” to the Alexa-enabled device.
First, the Alexa-enabled device detects the wake word (e.g. Alexa, Echo, Computer, or Amazon). Once the wake word is detected, what I say is recorded and securely sent to the Alexa voice service, which uses speech-to-text and natural language understanding (NLU) to identify my intent. My intent is sent to DevOps Pal; the skill acts accordingly by kicking off the Jenkins job and sending a response back using text-to-speech synthesis (TTS), which makes the response natural sounding.
Let’s explore each component in more detail:
Jenkins Classic UI
The Jenkins job, ‘alexa-cicd’, is the job invoked from DevOps Pal. Although, the Jenkins Classic User Interface (UI) is functional, I prefer the Blue Ocean interface because it rethinks the user experience of Jenkins by making it visually intuitive. Blue Ocean is easily enabled via a plugin and leaves the option to continue using the Jenkins Classic UI should you so choose.
Blue Ocean Pipeline Run Details View Page
After Alexa kicks off the ‘alexa-cicd’ job, I navigate to the Pipeline Run Details View Page, which allows me to watch the job status in real-time. This job has four stages: Initialize, Build, Test, and Deploy. The final stage, Deploy, uses the AWS Command Line Interface (CLI) on the Jenkins server to copy the artifact to Amazon Simple Storage Service (S3) and create a new Elastic Beanstalk application version based on the artifact located on S3.
DevOps Pal is a published Alexa skill; however, it is not available in the Alexa Skills Store. In fact, DevOps Pal didn’t even go through the traditional certification process. DevOps Pal is considered to be a private skill that is only available to approved organizations via Alexa for Business. Alexa for Business, currently only available in the US, allows developers to use the Alexa Skills Kit (ASK) to publish private skills meant for workplace empowerment. Alexa for Business also provides tools to help organizations configure private skills that boost employees’ productivity, manage Alexa devices across an organization, and enroll employees along with their own personal devices. I knew Alexa for Business was the perfect way to distribute DevOps Pal, privately, to select organizations.
Alexa Developer Console
Through the Alexa Developer Console, I am able to control which organizations have access to DevOps Pal. This level of control is perfect because there is organization specific configuration that should occur before an organization can make use of the skill.
Organization’s Alexa for Business Console
The Alexa for Business Console is used by an organization to enable and manage the DevOps Pal skill once I’ve provided access.
The initial release of DevOps Pal is just the beginning. I spent a weekend proving that deploying code via voice was possible, and I have several enhancements in the pipeline:
I hope you’ve enjoyed learning more about the architecture of DevOps Pal and deploying code to the cloud using voice. For more detailed steps, I’ve collaborated with Cloud Academy to author a course on the subject. Click here to learn more about the course and sign up to be notified when it’s available. Reach out to me on Twitter at @KeshaWillz.