Comments (1)
Please see This Project Is Dormant.
IOTstack (this repo and the active one) implicitly assume a Raspberry Pi (3 or 4) running Raspbian ("Raspberry Pi OS") with a default login user of "pi", user ID 1000, where "~" expands to "/home/pi". That's not to say other arrangements won't work. It's just that that particular combination gets a lot more testing than anything else so, the further you get away from that, the more your mileage may vary, as it were.
It sounds like things are a bit hosed. How far have you gone and what can you afford to lose?
Here's what I would do. If your stack is running, take it down.
$ cd ~/IOTstack
$ docker-compose down
Then, move your current folder out of the way:
$ cd
$ mv IOTstack IOTstack.off
Check out the current repo:
$ git clone https://github.com/SensorsIot/IOTstack.git ~/IOTstack
Be aware that you can't re-use your existing docker-compose.yml. The main problem is in networks (see Issue 245 if you want a detailed discussion).
Tip:
- If you're doing this headless via ssh (which is what you said), make your terminal window as big as you can.
Run the menu and build your stack:
$ cd ~/IOTstack
$ ./menu.sh
Is Node-Red part of your build? If yes, one reasonably common mistake is selecting Node-Red in the menu but not hitting the right-arrow at that point to select the nodes you want to install. If you avoid that mistake, it mostly works OK.
AFTER you have run the menu to choose your containers but BEFORE you bring up the stack for the first time, think about whether there is anything in ~/IOTstack.off/volumes that you want to preserve. If there is, you can move it. You'll need to pay attention to permissions. Something like:
$ sudo cp -a ~/IOTstack.off/volumes/nodered ~/IOTstack
generally gets the job done. The -a
preserves permissions.
Next, think about anything you might need to recover from the old docker-compose.yml. But please be careful and don't replace whole chunks. Line by line is better.
THEN bring up the stack:
$ cd ~/IOTstack
$ docker-compose up -d
One major difference between what you've experienced to date (gcgarner/IOTstack) and the current version of SensorsIot/IOTstack concerns environment files. Those used to live in subfolders of ~/IOTstack/services
but now all of the environment variables are inline in docker-compose.yml.
When it comes to Influx, you might find these two gists helpful:
Both of those explain how to create a new empty database. The second one also covers fiddling with environment variables. Just make sure you read the "definition" at the top and understand it is telling you that environment variables can be in EITHER place. What it actually MEANS is that, if you were running old-menu (gcgarner-like) then your environment variables would be in an environment file; under new-menu, they're in docker-compose.yml. As you'll be running new-menu (what you get by default), there won't be any environment file for InfluxDB. Clear?
If a fresh checkout of the current repo doesn't help then I'd probably start to question the Debian decision.
One final point. You wrote:
I want to add a database in influxdb and the doc explains me to add it in the ./services/influxdb/influx.env
I don't know what doco you are talking about but it's somewhere between misleading and wrong (or you might be misunderstanding what it is saying). You do not create databases with environment variables. After you've read the gists, you'll understand that it helps to have this alias in place:
$ alias influx='docker exec -it influxdb influx -precision=rfc3339'
after which creating a database named, say, "example" is:
$ influx
> create database example
> exit
$
The kinds of things you do with environment variables are to enable authentication, set a default username and password for the database administrator (it applies when the influx
command above is typed - nothing else), and define a database for something like Telegraf to log data over UDP. If it is this that you are talking about, the environment variable:
INFLUXDB_UDP_DATABASE=udp
means you have to create the database named "udp" (ie replace "example" with "udp" in the above). Then, once that database exists, you can change:
INFLUXDB_UDP_ENABLED=false
to be "true", then:
$ docker-compose up -d influxdb
will cause docker-compose to notice the change to the environment variable, recreate the influxdb container, the influxd process will see that INFLUXDB_UDP_ENABLED is true, and will turn on UDP support, writing anything it receives to whatever is on the right hand side of INFLUXDB_UDP_DATABASE. I hope that all makes sense.
Please try to remember to close your issue here on gcgarner.
If you have any more questions, either open a new issue on SensorsIot/IOTstack or join the Discord channel (there's a link near the bottom of the main page).
Hope this helps.
from iotstack.
Related Issues (20)
- menu.sh error HOT 2
- unable to stop and remove Hassio containers in IOTstack HOT 1
- zigbee2mqtt
- menu.sh just checks for current version HOT 2
- Home Assistant Native keeps coming back after removal HOT 1
- Zigbee2MqttAssistant: Unable to connect to MQTT server mosquitto HOT 2
- chown -R 1883:1883 ./volumes/mosquitto does not accept "Y" HOT 1
- ImportError: No module named 'blessed' HOT 1
- running rtl_433 container problem HOT 7
- influxdb.conf ... changing the retention of data HOT 1
- how to retrive an old image HOT 5
- How Do I get rid of Pihole ? I tried everything. HOT 5
- IOT stack vs raspberry pi OS bullseye HOT 5
- installation script incorrectly prompting version types HOT 2
- Concerned about prerequisites HOT 3
- pi.hole only works intermittently. HOT 3
- Cannot start service nodered /dev/ttyAMA0 HOT 2
- can't install new nodes in Node-Red due to no connection of node-red container with internet HOT 1
- i2c in nodered HOT 2
- Integrating Telegram Nodes into Node-RED HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from iotstack.