ynh-dev/README.md

69 lines
1.3 KiB
Markdown
Raw Normal View History

2016-01-30 22:38:29 +01:00
# ynh-dev, a yunohost dev env
2016-04-27 09:23:32 +02:00
This script is a cli to manage a yunohost development environement.
With this you can develop on the unstable version of yunohost quickly.
2016-01-30 22:38:29 +01:00
## Setup
2016-04-27 09:23:32 +02:00
2016-01-30 22:38:29 +01:00
Install dependencies
```shell
# Debian, Ubuntu, Mint
2016-04-27 09:23:32 +02:00
sudo apt-get install vagrant
2016-01-30 22:38:29 +01:00
# Fedora
2016-04-27 09:23:32 +02:00
sudo dnf install vagrant vagrant-libvirt
2016-01-30 22:38:29 +01:00
```
2016-03-15 11:09:08 +01:00
Next download ynh-dev script
2016-01-30 22:38:29 +01:00
```shell
2016-04-27 09:40:28 +02:00
wget https://github.com/YunoHost/ynh-dev/raw/opi-boxes/ynh-dev
2016-01-30 22:38:29 +01:00
chmod u+x ynh-dev
```
2016-04-27 09:23:32 +02:00
## 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.
2016-01-30 22:38:29 +01:00
### Create the environment
```shell
2016-03-15 11:09:08 +01:00
ynh-dev create-env /path/to/dev/env
2016-01-30 22:38:29 +01:00
```
### Run a container
```
2016-04-27 09:23:32 +02:00
cd /path/to/dev/env
ynh-dev run ynh.local testing
2016-01-30 22:38:29 +01:00
```
2016-04-27 09:23:32 +02:00
## 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.
2016-01-30 22:38:29 +01:00
### Upgrade the container
```
2016-04-27 09:52:35 +02:00
/vagrant/ynh-dev upgrade
2016-01-30 22:38:29 +01:00
```
### Deploy your change
```
2016-04-27 09:52:35 +02:00
/vagrant/ynh-dev deploy
2016-01-30 22:38:29 +01:00
```
### Deploy your change in realtime (each time you saved source code)
```
2016-04-27 09:52:35 +02:00
/vagrant/ynh-dev watch
2016-01-30 22:38:29 +01:00
```
2016-04-27 09:23:32 +02:00
2016-01-30 22:38:29 +01:00
### Get ip address of your vm
```
2016-04-27 09:52:35 +02:00
/vagrant/ynh-dev ip
2016-01-30 22:38:29 +01:00
```
## More info
2016-03-15 11:09:08 +01:00
https://yunohost.org/#/dev_fr (french)