not really known
Find a file
2021-06-14 19:35:38 -07:00
.docker Add dotfiles. 2021-06-08 22:22:00 -07:00
Ansible/roles/meshmage-node Use a single data directory. 2021-06-14 19:20:18 -07:00
DB Add SSH Public key to DB. 2021-06-13 15:27:43 -07:00
Web Tidy up the function. 2021-06-14 19:35:38 -07:00
.dex.yaml Add dotfiles. 2021-06-08 22:22:00 -07:00
.gitignore Use a single data directory. 2021-06-14 19:20:18 -07:00
README.md Add README. 2021-06-09 20:34:48 -07:00

Setting Up Development Environment

Debian 10

  1. Install Docker

As root on a fresh Debian 10 machine, docker can be installed as follows:

apt-get remove -y docker docker-engine docker.io containerd runc
apt-get install -y apt-transport-https ca-certificates curl gnupg lsb-release
curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

echo \
  "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian \
  $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

apt-get update
apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose
  1. Install system dependancies
apt-get install -y build-essential libpq-dev libssl-dev libz-dev cpanminus liblocal-lib-perl
  1. Add a user account with docker permissions and install public key
useradd --shell /bin/bash -m -U -G docker meshmage
echo 'eval "$(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib)"' >> /home/meshmage/.bashrc
mkdir /home/meshmage/.ssh
chown meshmage.meshmage /home/meshmage/.ssh
chmod 0700 /home/meshmage/.ssh
cp ~/.ssh/authorized_keys /home/meshmage/.ssh/
chown meshmage.meshmage /home/meshmage/.ssh/authorized_keys
chmod 0600 /home/meshmage/.ssh/authorized_keys
  1. Install MeshMage
cpanm App::plx App::opan App::Dex Carton Dist::Zilla
git clone git@github.com:symkat/MeshMage.git
cd MeshMage/DB
dzil build
cd ../Web
plx --init
plx --config libspec add 00tilde.ll $HOME/perl5
plx --config libspec add 40dblib.dir ../DB/lib
plx opan add ../DB/MeshMage-DB-0.001.tar.gz
plx opan merge
plx opan carton install

Now you will want to copy Web/meshmage.yml.sample to Web/meshmage.yml and fill out the config file.

  1. Run The App

You'll want to grab a second shell to start the DB. Make sure you're in the top level directory of MeshMage.

meshmage@localhost:~/MeshMage$ dex db start

Once the database, open a third terminal to start the web server. Make sure you're in MeshMage/Web.

meshmage@localhost:~/MeshMage/Web$ plx morbo script/meshmage_web

With the Web and Database running, open a fourth terminal to run the job queue. Make sure you're in MeshMage/Web.

meshmage@localhost:~/MeshMage/Web$ plx script/meshmage_web minion worker

Once this has started, you can access MeshMage through port http://127.0.0.1:3000 or any other exposed IP address. Using morbo will cause the Web app to reload when changes are made to the webapp. Changes to DB/ will require the app be restarted, and changes to the Minion tasks will require the minion worker be restarted.