- playdeck
- Introduction
- System Overview
- User Personas
- Requirements
- Installation and Configuration
- Deployment
- Troubleshooting and FAQs
This document describes the Stream Deck automation and manual services that is provided for DevSecOps, Developers and Mac Users.
The audience for this document includes:
-
Mac User who will install and configure Stream Deck on their workstation, and to automate day-to-day tasks with a key press.
-
Developer who will implement, build, test all automation scripts.
-
DevSecOps who will deploy each script to Automator, and to publish the Automator application for the Users.
Category | Activity | Mac User | Developer | DevSecOps |
---|---|---|---|---|
Installation and Configuration | Setting up the Stream Deck for the first time | R,A | ||
Installation and Configuration | Set up an application on Stream Deck | R,A | ||
Deployment | Deploy a script to Automator | I | C | R,A |
Troubleshooting and FAQs | Creating a symbolic link /usr/local/bin/python |
I | C | R,A |
python
- Automator
This runbook should be performed by the User.
-
Open your web browser and navigate to
https://www.elgato.com/us/en/s/downloads
> click Download to download the Stream Deck installer. -
Run the Stream Deck installer and follow the on-screen instructions.
This runbook should be performed by the User.
-
Open Stream Deck on your workstation > click Configure Stream Deck.
-
In the right-hand panel > Find the plugin System > Drag and drop the Open command to an available slot.
-
Configure the command as follows:
- For Title, enter your application title.
- For App/File, click on the File icon > Choose your application, e.g.
~/playdeck/automation/QuickDaily.app
. - For Icon, click on the drop-down arrow > Select Set from File > Choose your icon, e.g.
~/playdeck/img/chrome.png
.
This runbook should be performed by the DevSecOps.
-
Open Automator on your workstation > Choose Application as the type of document.
-
Under Actions > drag and drop the Run Shell Script into the blank canvas.
-
In the Run Shell Script dialog window:
- For Shell, choose your shell interpreter, e.g.
/usr/local/bin/python
. - Copy and paste your script into the text box.
Example script:
import subprocess
if __name__ == "__main__":
chrome = ['/usr/bin/open','-b','com.google.Chrome']
urls = [
'https://github.com',
'https://netflix.com'
]
lstCmd = []
for c in chrome:
lstCmd.append(c)
for u in urls:
lstCmd.append(u)
print(" ".join(map(str,lstCmd)))
subprocess.Popen(lstCmd)
-
Name your application, e.g.
QuickDaily
-
Click File > Save.
-
Click Run to test the script.
-
Click File > Move To, and select the folder to save your Automator application, e.g.
~/playdeck/automator
.
This runbook should be performed by the DevSecOps.
The Run Shell Script within the Automator software cannot be configured to use a custom shell path. We use a workaround by creating a symbolic link that points to any pre-defined shell path, e.g. /usr/local/bin/python
.
- Open a shell terminal, and type the following command:
sudo ln -s /opt/homebrew/bin/python3 /usr/local/bin/python
- The target link
/usr/local/bin/python
should now exists, and points to our custom shell path/opt/homebrew/bin/python3
.