I have a BBQ Controller that has a terrible interface and associated phone app, I have worked out how to get the data from it and want to feed it into Brewblox purely for UI/ graphing and metrics tracking.
I would like to have it like how a spark is shown where the main container is ShareMyCook, then each of my devices has the keys that are in the data. This way I can detail multiple devices under the one data source.
I meant development. I was following your guide, and lots of little things didn’t match up or work out of the box, so I was just wondering what your development environment looks like, as I assume you iterate with docker locally, prior to committing and running the full CI process.
Where does the readline -f happen
Sorry, readlink -f
What version Docker are you using on ubuntu?
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04 LTS
$ DOCKER_CLI_EXPERIMENTAL=enabled docker version
API version: 1.40
Go version: go1.13.8
Git commit: afacb8b7f0
Built: Tue Jun 23 22:26:12 2020
API version: 1.40 (minimum version 1.12)
Go version: go1.13.8
Git commit: afacb8b7f0
Built: Thu Jun 18 08:26:54 2020
Version: spec: 1.0.1-dev
$ DOCKER_CLI_EXPERIMENTAL=enabled docker buildx version
docker: 'buildx' is not a docker command.
See 'docker --help'
Elco and me both use Ubuntu 20.04, and we both have separate machines at home and at the office.
We use a few shortcuts to save time, and our CI pipeline is set to build feature branches, but yes, we do commonly start local image builds.
According to docs, buildx is available in docker 19.03, which you have. How did you install Docker? (Snap, install guide, get.docker script, etc)
I suspect any omissions in the install guide are caused by the “it works on my machine” issue, where we forgot about one or more config changes, or happen to have a required package pre-installed for an unrelated purpose.
Pyenv / poetry typically are the most fiddly to get set up. Does this match your experiences?
So far, we’ve spent quite a lot of time improving and automating dependency/config management in dev, CI, and production - and it has been more than worth it.
I’ll make an issue to do a squeaky clean OS install on a spare disk to verify the instructions.
Feel free to mention any and all speed bumps you encounter.
I assume in docker/before_build.sh? It looks to be overkill. That line can be replaced with:
Just apt install docker, I spun up an EC2 instance with Ubuntu 20.03, just to test fresh, and it wanted to install it via snap, which I am still getting my head around, so I gave up when it acted the same.
Yeah especially on my mac with homebrew, I use zshell too, so there were a couple of things that I needed to sort out. I definitely attribute it to my setup though.
Poetry kept wanting to use my system interpreter, which by default on Mac is still Python2.7.
When I took out my specific variance, it was only those two points that I brought up that I thought worthwhile contributing back.
For development, I use IntelliJ IDEA with the Python plugin, so basically PyCharm. With the poetry plugin it found the venv no problems, and I just ended up just debugging with the entrypoint as __main__.py. Breakpoints and interactive debugging worked perfectly, so iterating quickly was no issue at all. I only went to docker after I was code complete.
I just followed your documentation for setting up Azure pipelines. The only section that I needed to stray from was this:
DOCKER_PASSWORD is your Docker Hub password. Make the value secret by clicking the lock icon.
I have two factor auth setup, so I needed to go into Account Settings -> Security and create an access token and use that for the password.
Otherwise, very complete and helpful.
I can see myself building more of these things.
One thing that I would like to build is a notifications plugin so that I can send myself telegram messages when thresholds are exceeded, or have it join a channel as a bot so I can send it requests for up-to-date metrics. The BBQ for example, I leave overnight, so it is good to know if the fan kicks up, or the temp rises/drops too much.
After getting my head around aresponses I finally have unit testing complete, but I get this warning
/Volumes/dev/projects/brewblox-sharemycook/.venv/lib/python3.7/site-packages/brewblox_service/features.py:48: DeprecationWarning: Changing state of started or joined application is deprecated
app[FEATURES_KEY] = dict()