Dev/Warrior
< Dev
Jump to navigation
Jump to search
The Warrior is a virtual machine appliance used by volunteers to participate in projects.
MOTHERFUCKER ! ! !
MOTHERFUCKER ! ! !
MOTHERFUCKER ! ! !
MOTHERFUCKER ! ! !
MOTHERFUCKER ! ! !
MOTHERFUCKER ! ! !
MOTHERFUCKER ! ! !
Bootup
The virtual machine is self-updating. It does the following:
- Start the virtual machine
- Linux boots
- The user
warrior
is automatically logged in. /etc/inittab
kicks off/home/warrior/warrior-code2/boot.sh
.- This will
git pull https://github.com/ArchiveTeam/warrior-code2
into/home/warrior/warrior-code2/
. /home/warrior/warrior-code2/warrior-runner.sh
sets up a process which monitors/dev/shm/ready-for-warrior
and launchesrun-warrior
when the state changes.
- This will
boot.sh
launches/home/warrior/warrior-code/boot-part-2.sh
boot-part-2.sh
is a short script that does the following:./warrior-install.sh
- install/update seesaw, check branch, version
- installs seesaw-kit into
/home/warrior/warrior-code2/src
- installs seesaw-kit into
- install framebuffer support, DNS caching
- install/update seesaw, check branch, version
sudo ./make-data-disk.sh
(the second virtual disk)- cleans up
- it creates and prepares the data partition
- mounts the partition under
/data
mkdir -p /home/warrior/projects
touch /dev/shm/ready-for-warrior
- triggers the launch of
/usr/local/bin/run-warrior
which launches/home/warrior/warrior-code2/src/seesaw/run-warrior
- contacts warriorhq.archiveteam.org and requests the
projects.json
file. This file contains the projects you see in the Available Projects page.
- triggers the launch of
./say-hello.sh
- setup vmware port forwarding
- show splash screen
- Point your web browser to http://localhost:8001 and go.
The code for each project is stored in /home/warrior/projects/<PROJECTNAME>/
Logging into the Warrior
To log into the warrior,
- Press Alt+F3 (or press Alt+Right).
- The username is
root
and the password isarchiveteam
- You are now logged in as root.
- To log in as
warrior
, enter:sudo -u warrior -i
Testing Core Warrior Code
Since the Warrior pulls from GitHub, it is important to commit only stable changes into the master
branch. Recommended Git branching practices use a development branch.
To test core Warrior code, you can switch from the master
branch to the development
branch. The Warrior will fetch the corresponding seesaw-kit repository branch.
To change branches,
- Log in as root
- Execute
cd /home/warrior/warrior-code2
- Execute
sudo -u warrior git checkout development
- Execute
reboot
By the same route you can return your warrior to the master
branch.