#A sane(r) development environment for the tmw server and server data
##About tmwa-vagrant is a Vagrantfile and provisioning script to get you started with developing your own content for The Mana World. It's also an easy way for you to get a local server going, just if you want to fool around with it.
It creates a disposable headless virtual machine (VM), based on Ubuntu Server 12.04 LTS, which automatically clones tmwa and tmwa-server-data, sets up the server, adds a GM level 99 account, and runs the server. tmwa and tmwa-server-data are shared, so you can access them from the host OS -- they will appear in the folder where you've cloned this repository. It also sets up port forwarding, allowing you to connect to the server using your normal client.
You do not need a pre-existing VM image, everything is downloaded automatically.
##Installation
- Install Vagrant
- Install VirtualBox
- Optional step for Windows users: Install the Windows GitHub app
- Clone this repository
- Navigate into the repository you've cloned and run
vagrant up
- Have fun!
Important: Installing the Windows GitHub app provides you with a Git GUI and Windows PowerShell, as well as SSH, needed for Vagrant to SSH into the VM.
##Warning If you are making any local changes, testing content, or anything like that, it's recommended that you do it on a different branch. The provisioning script will now always checkout the master branch before updating, leaving the other branches you might've created untouched.
##Usage
To get shell access to the machine, run vagrant ssh
.
All these commands can be wrapped in vagrant ssh -c "command"
tmwa-init is a tool to help build and update the sources
sudo /etc/init.d/tmwa-init {start|stop|restart|build|update|update_server|update_data|admin_reset|install|status}
start|stop|restart|status
All deal with the servers tmwa-{char|login|map}build
will build what ever you have checked out in tmwaupdate
will update both TMWA and TMWA-data to current master reposupdate_server
updates TMWA to current master repoupdate_data
updates TMWA-data to current master repoadmin_reset
will reset the admin password to vagrantinstall
will update and reinstall everything
Use vagrant suspend
to pause the machine. The contents of the VM's ram will be written to your hard drive and it won't be using and CPU or RAM while it's paused. To run it again from its paused state, use vagrant resume
. To turn the machine off, use vagrant halt
. To run it again, use vagrant up
.
To destroy the machine completely (you'll still keep the Vagrantfile and any changes you've made to tmwa and/or tmwa-server data) run vagrant destroy
.
Important: Since version 1.3, Vagrant only provisions the machine on first run. You can either run vagrant up --provision
or login after the server boots with vagrant ssh to use `vagrant ssh -c "/etc/init.d/tmwa-init install" to rebuild new sources
##Development of base image
vagrant init wushin/tmw-vagrant
will pull just the image used to make the vmimage. That is hosted here.
Vagrant Cloud
##To do
- Fix the output of the provisioning script (formatting, more information)
- General improvments to the script