Copy-paste the following into command line:
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.4.3
On Ubuntu (and other Linux distros):
echo -e '\n. $HOME/.asdf/asdf.sh' >> ~/.bashrc
echo -e '\n. $HOME/.asdf/completions/asdf.bash' >> ~/.bashrc
On macOS:
echo -e '\n. $HOME/.asdf/asdf.sh' >> ~/.bash_profile
echo -e '\n. $HOME/.asdf/completions/asdf.bash' >> ~/.bash_profile
For most plugins, it is good if you have installed the following packages OR their equivalent on your OS
- Ubuntu:
automake autoconf libreadline-dev libncurses-dev libssl-dev libyaml-dev libxslt-dev libffi-dev libtool unixodbc-dev
- macOS: Install these via homebrew
coreutils automake autoconf openssl libyaml readline libxslt libtool unixodbc
asdf plugin-add erlang https://github.com/asdf-vm/asdf-erlang.git'
asdf plugin-add elixir https://github.com/asdf-vm/asdf-elixir.git'
asdf install erlang 21.2'
Set Erlang version using asdf
asdf global erlang 21.2'
asdf install elixir 1.8.0'
Set Elixir version using asdf
asdf global elixir 1.8.0'
mix local.hex --force
mix local.rebar --force
Install PostgreSQL according to Ubuntu version, This steps is for ubuntu 17.04, If you have any other ubuntu version follow the steps mentioned in the below link after selecting your ubuntu version.
https://www.postgresql.org/download/linux/ubuntu/
deb http://apt.postgresql.org/pub/repos/apt/ zesty-pgdg main
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | \ sudo apt-key add -
sudo apt-get update
apt-get install postgresql-9.6
Install PostGIS according to PostgreSQL version these steps are for PostgreSQL 9.6.
Check your PostgreSQL Version:
psql --version
sudo apt install postgis postgresql-9.6-postgis-2.3
The postgres installation doesn't setup a user for you, so you'll need to follow these steps to create a user with permission to create databases.
sudo -u postgres createuser {{username}} -s
# Set database username and password postgres, you can do the following
sudo -u postgres psql
postgres=# \password
mix ecto.create
mix ecto.load
mix ecto.migrate
For running server locally, Run:
iex -S mix phx.server
This repo is used for automated provisioning and configuration of developer and production environments needed to run Evercam system. This README will explain how to setup the developer environment.
When finished with the README, you will have a Vagrant Virtual Machine running Ubuntu 14.04 LTS with the following software:
- Ruby
- Elixir
- Erlang
- Node.js
- Redis
- Memcached
- Postgres with Postgis
- Nginx with Nginx-RTMP
These instructions assume that you're running either Linux or OS X (Ansible doesn't work on Windows).
git clone https://github.com/evercam/evercam-devops.git && cd evercam-devops
git pull && git submodule init && git submodule update && git submodule status
git submodule foreach --recursive "git checkout master && git pull"
sudo ansible-galaxy install -r ansible/requirements.yml --force
cp .env evercam-dashboard/ && cp .env evercam-models/ && cp .env evercam-media/
vagrant up && vagrant ssh
Grab a cup of your favorite beverage, this is going to take some time...
cd /vagrant/evercam-dashboard
bundle exec rspec --pattern 'c*/*_spec.rb,h*/*_spec.rb'
cd /vagrant/evercam-media
mix test
Now start the Media server:
cd /vagrant/evercam-media
EVERCAM_LOCAL=true mix phoenix.server
And in another terminal tab/window start the Dashboard server:
cd /vagrant/evercam-dashboard
EVERCAM_LOCAL=true bundle exec rails server -b 0.0.0.0
And in another terminal tab/window start the Phony camera for offline tests:
cd /vagrant/phony_camera
EVERCAM_LOCAL=true node index
Open http://localhost:3000/ in a browser and you'll see the dashboard of the Next Big Thing™
All of the Evercam documentation can be found here: https://github.com/evercam/evercam-media/wiki