doc/vagrant.md

60 lines
1.3 KiB
Markdown
Raw Normal View History

2014-07-01 18:29:08 +02:00
# Vagrant and YunoHost
*If you need testing some code, you should using directly [ynh-dev](https://github.com/yunohost/ynh-dev)*
2014-07-01 18:29:08 +02:00
*Find other ways to install YunoHost **[here](/install)**.*
<img src="/images/vagrant.png" width=250>
2014-07-01 18:29:08 +02:00
2014-07-02 20:36:03 +02:00
**Prerequisite**: an x86 computer with VirtualBox installed and enough RAM capacity to be able to run a small virtual machine.
2014-07-01 18:29:08 +02:00
---
2014-07-02 09:50:41 +02:00
## Initialization
2014-07-01 18:29:08 +02:00
Create a project folder
```bash
mkdir YunoHost
cd YunoHost
```
2018-06-12 22:24:25 +02:00
The following command will initialize the project with a Yunohost image
2014-07-01 18:29:08 +02:00
```bash
2018-06-12 22:24:25 +02:00
vagrant box add yunohost/stretch-unstable https://build.yunohost.org/yunohost-stretch-unstable.box --provider virtualbox
vagrant init yunohost/stretch-unstable
2014-07-01 18:29:08 +02:00
```
2017-01-18 10:53:19 +01:00
You need to activate the network for the YunoHost instance.
```bash
sed -i 's/# config\.vm\.network "private_network"/config.vm.network "private_network"/' Vagrantfile```
2014-07-01 18:29:08 +02:00
---
2015-09-29 12:15:17 +02:00
## Run a vm
2014-07-01 18:29:08 +02:00
Start the virtual machine
```bash
vagrant up
```
2014-07-02 09:50:41 +02:00
Connect to the started virtual machine
2014-07-01 18:29:08 +02:00
```bash
vagrant ssh
```
Upgrade the system
```bash
2018-06-24 01:55:57 +02:00
sudo apt update && sudo apt dist-upgrade
2014-07-01 18:29:08 +02:00
```
2017-01-18 10:53:19 +01:00
You can access to your vm with the ip 192.168.33.10
The IP addresses related to the boxes are set by default but can be changed in the network settings.
2014-07-01 18:29:08 +02:00
---
*Once the installation is finished, you may want to proceed to post-installation: **[yunohost.org/postinstall](/postinstall)** *
2015-09-29 12:15:17 +02:00