Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lhaig/tlo
Turn Lights on Demo
https://github.com/lhaig/tlo
Last synced: about 1 month ago
JSON representation
Turn Lights on Demo
- Host: GitHub
- URL: https://github.com/lhaig/tlo
- Owner: lhaig
- License: gpl-2.0
- Created: 2024-01-09T12:23:08.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-12T13:29:01.000Z (about 1 year ago)
- Last Synced: 2024-12-02T03:42:33.052Z (about 1 month ago)
- Language: HCL
- Size: 20.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Turn On the Light with Nomad Demo.
This demo showcases Nomads ability to run diverse workloads on a cluster. Specifically it uses the docker and exec task drivers.
## Hardware
* [Turing Pi V1](https://turingpi.com/) with 7 [Raspberry Pi CM3+](https://www.raspberrypi.com/products/compute-module-3-plus/) 8GB modules running Debian.
* [Shelly Bulb RGB](https://www.shelly.com/en-de/products/product-overview/shelly-duo-rgbw)## Software
* [Nomad 1.7.2](https://releases.hashicorp.com/nomad/)
* [Demo Magic](https://github.com/paxtonhare/demo-magic/tree/master)## Setup
Clone the repo
```bash
git clone [email protected]:lhaig/tlo.git
cd tlo
```### Install Nomad
[Install Nomad](https://developer.hashicorp.com/nomad/tutorials/cluster-setup) onto your cluster.Deploy the Nomad jobs in this order
1. nomad job run jobs/traefik.nomad.hcl
2. nomad job run jobs/prometheus-server.nomad.hcl
3. nomad job run jobs/prometheus-node-exporter.nomad.hcl
4. nomad job run jobs/grafana-server.nomad.hcl
5. nomad job run jobs/godad.nomad.hcl### Install your RGB Light
Install your light and make note of the ipaddress for you light.
### Run the demo jobs
export the address of your Nomad server
`export NOMAD_ADDR=IPADDRESS:4646`Check the status of your connection to Nomad
```bash
nomad server members
nomad node status
nomad job status"```
Run the light.nomad.hcl job file replace `IPADDRESSOFLIGHT` with your light ip
```bash
nomad job run -var="url=IPADDRESSOFLIGHT" -var="turn=on" jobs/light.nomad.hcl
```
This should turn the light on.Have fun