dwyl / smart-home-security-system

Smart Home Security System
GNU General Public License v2.0
4 stars 2 forks source link

Automatic install scripts for #11 #23

Closed th0mas closed 4 years ago

th0mas commented 4 years ago

Install scripts to allow for a "One Click" setup of smart home.

Can be used by running:

bash <(curl -sL https://git.io/JUIen) # POSIX-compatible shell (e.g. bash/zsh/most shells)
bash (curl -sL https://git.io/JUIen | psub) # Fish shell

This will download and install the smart-home-security-system repositories and do any required configuration changes. Will fix #11

th0mas commented 4 years ago

@nelsonic can you test this out on your system?

Should be able to run bash <(curl -sL https://git.io/JUIen) to install

nelsonic commented 4 years ago

Just confirmed that the default version of Python on MacOS Catalina (Latest) is not 3.x:

python --version
Python 2.7.16

Could be worth adding a link to where people can download/install the latest Python. 💭

nelsonic commented 4 years ago

https://docs.python-guide.org/starting/install3/osx/ Install homebrew:

$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

then install python:

brew install python

nelsonic commented 4 years ago

https://xkcd.com/1987 image

nelsonic commented 4 years ago

After installing with python with homebrew still got:

python --version
Python 2.7.16

Had to follow: https://dev.to/malwarebo/how-to-set-python3-as-a-default-python-version-on-mac-4jjf Ran the command:

ln -s -f /usr/local/bin/python3.8 /usr/local/bin/python

Now have:

python --version
Python 3.8.5

Running the script now.

th0mas commented 4 years ago

Pretty sure python should always reference python 2.x, and python3 references Python 3.x for backwards compatibility reasons

th0mas commented 4 years ago

@nelsonic you shouldn't have to worry about this if you run bash <(curl -sL https://git.io/JUIen), that's the point of the initial bash script

nelsonic commented 4 years ago

@th0mas OK. cool. 👍

What should I put for the URL: image

th0mas commented 4 years ago

https://docs.python-guide.org/starting/install3/osx/ Install homebrew:

$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

then install python:

brew install python

Could be worth adding this to the initial install script, although we would be bordering on malware there installing brew, python and smart-home onto peoples computers

th0mas commented 4 years ago

Should be the Phoenix default, http://localhost:4000

nelsonic commented 4 years ago

yeah, we don't want to do the brew install.

nelsonic commented 4 years ago
FileNotFoundError: [Errno 2] No such file or directory: '.env'

no-such-file-env

th0mas commented 4 years ago

git pull again?

Should be fixed in 9ae50b9

nelsonic commented 4 years ago

Created the .env file manually.

FileNotFoundError: [Errno 2] No such file or directory: 'mix'

no-mix

brew install elixir

th0mas commented 4 years ago

Yeah think were working on the assumption that users have Postgres and Elixir installed?

If not that's ~5 lines to prompt user and install

th0mas commented 4 years ago

Side note: wget not found - guessing that's not default with macOS then.

nelsonic commented 4 years ago

Yeah, wget not standard on Mac. 🙄

Got Elixir and Postgres: elixir-version

postgres-running

nelsonic commented 4 years ago

git-pull

going to try run the script again. 👍

th0mas commented 4 years ago

wget swapped for curl in d665246

nelsonic commented 4 years ago

Script hangs on Installing hub server deps... script-hangs

Going to kill it so I can run the latest version: git-pull-d665246

klll-python-script

th0mas commented 4 years ago

Script hangs on Installing hub server deps...

Thats odd, how long did you leave it for? And try running ./manage.py --verbose install to see mix output

nelsonic commented 4 years ago

Will run with verbose after standup. ⏳

nelsonic commented 4 years ago

db-fail

nelsonic commented 4 years ago

brew install postgres giving me grief so using https://postgresapp.com/ instead

nelsonic commented 4 years ago

Screen Shot 2020-08-28 at 5 26 31 PM

nelsonic commented 4 years ago

After exporting the AUTH_API_KEY in the cwd it works: hub-working

th0mas commented 4 years ago

@nelsonic Want to try this again?

nelsonic commented 4 years ago

@th0mas when you are next available, we will do a Zoom remote-pairing session to re-test this. 📆 I think it's worth finishing this PR even if you decide to go for the Docker approach. 💭