Dev environement wrapper, based on Incus, to develop on YunoHost
Find a file
2016-05-03 14:34:45 +02:00
LICENSE Initial commit 2015-10-11 19:41:59 +02:00
README.md [fix] Use vanilla markdown. 2016-05-03 14:34:45 +02:00
ynh-dev [enh] Remove net-tools dependency and get proper VM IP. 2016-04-29 13:23:31 +02:00

ynh-dev, a yunohost dev env

This script is a cli to manage a yunohost development environement. With this you can develop on the unstable version of yunohost quickly.

Setup

Install dependencies

# Debian, Ubuntu, Mint
sudo apt-get install vagrant
# Fedora
sudo dnf install vagrant

Next download ynh-dev script

wget https://github.com/YunoHost/ynh-dev/raw/opi-boxes/ynh-dev
chmod u+x ynh-dev

Host usage

The ynh-dev tool provides 2 usefull command to run into your host machine. One create a development environment by cloning Git repositories, the other one is a helper to run a Vagrant virtual machine in the right place.

Create the environment

ynh-dev create-env /path/to/dev/env

Run a container

cd /path/to/dev/env
ynh-dev run ynh.local testing

You'll be automatically logged in the VM through ssh.

You probably wan't to run the postinstall now:

(sudo) yunohost tools postinstall

## Inside the Virtual machine (VM)

Once logged into your VM, go to /vagrant to enjoy folder sharing, and take advantages of the ynh-dev script.

Upgrade the container

It will update every debian packages.

/vagrant/ynh-dev upgrade

Use Git repositories

When doing create-env command, every YunoHost package have been cloned in the corresponding path. Use these Git repositories inside the VM (with symlink). Your changes will be available immediatly in your VM.

/vagrant/ynh-dev use-git

Note: These changes can be reverted now.

Alternatively you can use Git only for one packages (ssowat, yunohost, moulinette, yunohost-admin)

/vagrant/ynh-dev use-git PACKAGE_NAME

Deploy your change

/vagrant/ynh-dev deploy

Deploy your change in realtime (each time you saved source code)

/vagrant/ynh-dev watch

Get ip address of your vm

/vagrant/ynh-dev ip

More info

yunohost.org/dev_fr (in french)