Skip to content

Latest commit

 

History

History
76 lines (48 loc) · 2.3 KB

README.tatovm.dev.md

File metadata and controls

76 lines (48 loc) · 2.3 KB

This is for developpers of TatoVM

This guide is for developpers of TatoVM. If you want to install a local instance of Tatoeba, please refer to the file README.tatovm.md instead.

Requirements

Here are the basic requirements of the machine you’re using TatoVM from.

  • GNU/Linux or MacOS
  • Git
  • Ansible 2.4 or later (also available on pip: pip install ansible)
  • VirtualBox 4.0 or later, which can be installed with a package manager or with the help of generic binaries)
  • Vagrant 1.7 or later

Building a local VM

  • Install the requirements above.

  • Clone the repository and go to its directory:

git clone https://github.com/Tatoeba/tatoeba2
cd tatoeba2
  • If you need to use a proxy, follow the instructions in README.proxy.md.

  • Run these commands to install everything. Please be patient, it takes a while for vagrant to download the ~300MB box on your machine and then to provision it using ansible.

BUILD=1 vagrant box update
BUILD=1 vagrant up

Post-provisioning tasks

You may want to perform certain tasks or steps independently without having to re-provision the whole machine again. To do that you can use the following command:

ansible-playbook -i .vagrant/provisioners/ansible/inventory/vagrant_ansible_inventory --private-key=~/.vagrant.d/insecure_private_key ansible/vagrant.yml --tag <tag>

where <tag> is one of the tags present in the file ansible/tatoeba.tasks.yml. You can also use --skip-tag to run all the tasks but one in particular. Since the command is too long and very difficult to remember, you can use the following commands to create an alias:

echo "alias tatovm-provision='ansible-playbook -i .vagrant/provisioners/ansible/inventory/vagrant_ansible_inventory --private-key=~/.vagrant.d/insecure_private_key ansible/vagrant.yml'" >> ~/.bashrc
source ~/.bashrc

Now you can simply use the following command to run a particular step:

tatovm-provision --tag external_tools

Publish the VM

  • Export the VM into a file
vagrant package --output tatoeba.box
  • Upload the VM

    • Log into https://app.vagrantup.com/

    • Add a new version

    • Add a new provider

      • Type virtualbox for the Provider field

      • Upload the exported VM

    • Release the new version