Raspberry Pi powered manual release approval gate for Azure Pipelines. Mit viele blinkenlighten
MIT License
Raspberry Pi powered manual release approval gate for Azure Pipelines. Mit viele blinkenlighten.
I did a short talk about this project at Microsoft Ignite 2019.
The following lists the GPIO port assignments for the Raspberry Pi.
RPi | Description |
---|---|
IO17 | Main Button Switch |
IO21 | RGB Data In |
IO2 (SDA) | LCD SDA |
IO3 (SCL) | LCD SCL |
IO4 | Red Button LED |
IO6 | Red Button Switch |
IO27 | Orange Button LED |
IO5 | Orange Button Switch |
IO13 | Green Button LED |
IO25 | Green Button Switch |
IO26 | Blue Button LED |
IO24 | Blue Button Switch |
IO12 | Dev Toggle LED |
IO16 | Dev Toggle Switch |
IO20 | Stage Toggle LED |
IO23 | Stage Toggle Switch |
IO19 | Prod Toggle LED |
IO22 | Prod Toggle Switch |
TODO
Installing the service
We want the dasdeployer
service to run after the network comes up on the Raspberry Pi. Therefore we use systemd to allow us to do that. I'm an old fashioned SysV init.d type of person and systemd was new to me therefore the following resources were very helpful:
Basically I entered the following commands:
chmod a+rx /home/pi/DasDeployer/scripts/dasdeployer.sh
chmod a+rx /home/pi/DasDeployer/dasdeployer/dasdeployer.py
sudo systemctl edit --force --full dasdeployer.service
and then set the service configuration to be as follows
[Unit]
Description=Das Deployer
Wants=network-online.target
After=network-online.target
[Service]
Type=forking
User=root
WorkingDirectory=/home/pi/DasDeployer/scripts
ExecStart=/home/pi/DasDeployer/scripts/dasdeployer.sh start
[Install]
WantedBy=multi-user.target
Then I enabled and started the service, followed by a quick reboot to make sure everything worked correctly on initial start.
sudo systemctl enable dasdeployer.service
sudo systemctl start dasdeployer.service
sudo shutdown -r now