2015-01-14 17:32:10 +00:00
|
|
|
Vagrant for Friendica Developers
|
|
|
|
===================
|
|
|
|
|
|
|
|
* [Home](help)
|
|
|
|
|
2015-04-17 14:58:48 +00:00
|
|
|
Getting started
|
|
|
|
---------------
|
2015-02-02 22:14:01 +00:00
|
|
|
|
2015-04-17 07:13:40 +00:00
|
|
|
[Vagrant](https://www.vagrantup.com/) is a virtualization solution for developers.
|
|
|
|
No need to setup up a webserver, database etc. before actually starting.
|
2016-11-19 15:09:20 +00:00
|
|
|
Vagrant creates a virtual machine for you that you can just run inside VirtualBox and start to work directly on Friendica.
|
|
|
|
|
2017-10-04 18:25:15 +00:00
|
|
|
It brings an Ubuntu Xenial (16.04) with PHP 7.0 and MySQL 5.7.16
|
2015-11-07 13:55:58 +00:00
|
|
|
|
2015-04-17 07:13:40 +00:00
|
|
|
What you need to do:
|
2015-01-14 17:32:10 +00:00
|
|
|
|
|
|
|
1. Install VirtualBox and vagrant.
|
2015-11-07 13:55:58 +00:00
|
|
|
Please use an up-to-date vagrant version from https://www.vagrantup.com/downloads.html.
|
2015-04-17 07:13:40 +00:00
|
|
|
2. Git clone your Friendica repository.
|
|
|
|
Inside, you'll find a "Vagrantfile" and some scripts in the utils folder.
|
2017-10-04 18:25:15 +00:00
|
|
|
3. Run "vagrant up" from inside the friendica clone:
|
|
|
|
$> vagrant up
|
2015-04-17 07:13:40 +00:00
|
|
|
Be patient: When it runs for the first time, it downloads an Ubuntu Server image.
|
2017-10-04 18:25:15 +00:00
|
|
|
4. Run "vagrant ssh" to log into the virtual machine to log in to the VM:
|
|
|
|
$> vagrant ssh
|
2016-11-19 15:09:20 +00:00
|
|
|
5. Open you test installation in a browser.
|
2017-10-04 18:25:15 +00:00
|
|
|
Go to 192.168.22.10.
|
|
|
|
The mysql database is called "friendica", the mysql user and password both are "friendica".
|
2015-01-14 17:32:10 +00:00
|
|
|
6. Work on Friendica's code in your git clone on your machine (not in the VM).
|
2015-11-07 13:55:58 +00:00
|
|
|
Your local working directory is set up as a shared directory with the VM (/vagrant).
|
2015-04-17 07:13:40 +00:00
|
|
|
7. Check the changes in your browser in the VM.
|
2017-10-04 18:25:15 +00:00
|
|
|
Debug via the "vagrant ssh" login.
|
2015-11-07 13:55:58 +00:00
|
|
|
Find the Friendica log file /vagrant/logfile.out.
|
2015-01-14 17:32:10 +00:00
|
|
|
8. Commit and push your changes directly back to Github.
|
2015-01-16 10:20:48 +00:00
|
|
|
|
|
|
|
If you want to stop vagrant after finishing your work, run the following command
|
|
|
|
|
2017-10-04 18:25:15 +00:00
|
|
|
$> vagrant halt
|
2015-01-16 10:20:48 +00:00
|
|
|
|
|
|
|
in the development directory.
|
2017-10-04 18:25:15 +00:00
|
|
|
This will not delete the virtual machine.
|
|
|
|
9. To ultimately delete the virtual machine run
|
|
|
|
|
|
|
|
$> vagrant destroy
|
2018-11-25 06:56:02 +00:00
|
|
|
$> rm /vagrant/config/local.config.php
|
2017-10-04 18:25:15 +00:00
|
|
|
|
|
|
|
to make sure that you can start from scratch with another "vagrant up".
|
2015-01-16 10:20:48 +00:00
|
|
|
|
2015-07-23 20:11:09 +00:00
|
|
|
The vagrant Friendica instance contains a test database.
|
2015-02-02 22:14:01 +00:00
|
|
|
You will then have the following accounts to login:
|
|
|
|
|
|
|
|
* admin, password admin
|
2015-04-17 07:08:57 +00:00
|
|
|
* friendica1, password friendica1
|
2015-02-02 22:14:01 +00:00
|
|
|
* friendica2, password friendica2 and so on until friendica5
|
|
|
|
* friendica1 is connected to all others. friendica1 has two groups: group1 with friendica2 and friendica4, group2 with friendica3 and friendica5.
|
2018-11-25 06:56:02 +00:00
|
|
|
* friendica2 and friendica3 are connected. friendica4 and friendica5 are connected.
|
2015-02-02 22:14:01 +00:00
|
|
|
|
2015-01-16 10:20:48 +00:00
|
|
|
For further documentation of vagrant, please see [the vagrant*docs*](https://docs.vagrantup.com/v2/).
|