Difference between revisions of "Dev/Warrior"
m (→Logging into the Warrior: typo) |
(Add some updates for newer 3.2 architecture) |
||
Line 3: | Line 3: | ||
== Packages == | == Packages == | ||
The [https://github.com/ArchiveTeam/Ubuntu-Warrior Warrior image] is built off Alpine Linux 3.6.2: | The [https://github.com/ArchiveTeam/Ubuntu-Warrior Warrior image] is built off Alpine Linux 3.6.2 (VM version 3.0), Alpine Linux 3.12.0 (VM version 3.1), Alpine Linux 3.13.2 (VM version 3.2): | ||
* kernel 4.9.32 | * kernel 4.9.32 (VM version 3.0), kernel ? (VM version 3.1), kernel ? (VM version 3.2) | ||
* the virtual machine image is prepared using the <code>[https://github.com/ArchiveTeam/Ubuntu-Warrior/blob/master/stage.sh stage.sh]</code> script and contains a pre-installed <code>[https://raw.githubusercontent.com/ArchiveTeam/Ubuntu-Warrior/master/boot.sh /root/boot.sh]</code> script that downloads and boots the warrior. | * the virtual machine image is prepared using the <code>[https://github.com/ArchiveTeam/Ubuntu-Warrior/blob/master/stage.sh stage.sh]</code> script and contains a pre-installed <code>[https://raw.githubusercontent.com/ArchiveTeam/Ubuntu-Warrior/master/boot.sh /root/boot.sh]</code> script that downloads and boots the warrior. | ||
The warrior itself runs in a [https://store.docker.com/community/images/archiveteam/warrior-dockerfile | The warrior itself runs in a [https://github.com/ArchiveTeam/warrior-dockerfile Docker container] running Debian 10 Buster that contains Python 3.9, NodeJS, wget-at, and [https://github.com/ArchiveTeam/grab-base-df/blob/master/Dockerfile numerous other dependencies]. | ||
<strike>Warrior VM versions 3.0 and 3.1 ship with a [https://store.docker.com/community/images/archiveteam/warrior-dockerfile Docker container] running Ubuntu 16.04 that contains | |||
* Python 3.5.2, pip 8.1.1 | * Python 3.5.2, pip 8.1.1 | ||
* Perl v5.22.1 | * Perl v5.22.1 | ||
* gcc 5.4.0, make 4.1, bash 4.3.48 | * gcc 5.4.0, make 4.1, bash 4.3.48 | ||
* curl 7.47.0 | * curl 7.47.0</strike> | ||
VM versions 3.0 and 3.1 will automatically be updated use the new, updated container configuration the next time they are booted up and connected to the internet. | |||
== Bootup == | == Bootup == | ||
Line 22: | Line 26: | ||
# Linux boots | # Linux boots | ||
# <code>boot.sh</code> downloads and launches <code>[https://github.com/ArchiveTeam/Ubuntu-Warrior/blob/master/startup.sh /root/startup.sh]</code> | # <code>boot.sh</code> downloads and launches <code>[https://github.com/ArchiveTeam/Ubuntu-Warrior/blob/master/startup.sh /root/startup.sh]</code> | ||
# <code>startup.sh</code> prepares and runs a | # <code>startup.sh</code> prepares and runs a Docker container with the warrior runner | ||
# Point your web browser to http://localhost:8001 and go. | # Point your web browser to http://localhost:8001 and go. | ||
== Viewing container logs == | |||
Starting with VM version 3.2, you can view basic logs from the virtual machine console: press ALT+F2 for Warrior logs, press ALT+F3 for automatic updater logs, and press ALT+F1 to return to the splash screen. | |||
== Logging into the Warrior == | == Logging into the Warrior == | ||
Line 29: | Line 36: | ||
To log into the warrior, | To log into the warrior, | ||
# Press Alt+ | # Press Alt+F4 (make sure you capture your keyboard in the VM first or instead press Alt+Right several times). | ||
# The username is <code>root</code> and the password is <code>archiveteam</code> | # The username is <code>root</code> and the password is <code>archiveteam</code> | ||
# You are now logged in as root. | # You are now logged in as root. | ||
# Check the docker container with <code>docker ps</code>. This will give you docker container identifier, among others. | # Check the docker container with <code>docker ps</code>. This will give you docker container identifier, among others. If you are using VM version 3.2, there should be containers named <code>warrior</code> (the Warrior itself), <code>watchtower</code> (automatic updater, runs every hour), and <code>instantwtower</code> (automatic updater, runs once on VM startup). VM versions 3.0 and 3.1 will automatically be updated use these new, named containers the next time they are booted up and connected to the internet. | ||
# Enter the inside of the docker container with <code>docker exec -it ''identifier'' /bin/bash</code> | # Enter the inside of the docker container with <code>docker exec -it ''identifier'' /bin/bash</code> | ||
== Testing Core Warrior Code == | == Testing Core Warrior Code == | ||
''This part may be outdated and refer to Warrior version 2'' | |||
Since the Warrior pulls from GitHub, it is important to commit only stable changes into the <code>master</code> branch. Recommended Git branching practices use a development branch. | Since the Warrior pulls from GitHub, it is important to commit only stable changes into the <code>master</code> branch. Recommended Git branching practices use a development branch. |
Revision as of 21:52, 9 May 2023
The Warrior is a virtual machine appliance used by volunteers to participate in projects.
Packages
The Warrior image is built off Alpine Linux 3.6.2 (VM version 3.0), Alpine Linux 3.12.0 (VM version 3.1), Alpine Linux 3.13.2 (VM version 3.2):
- kernel 4.9.32 (VM version 3.0), kernel ? (VM version 3.1), kernel ? (VM version 3.2)
- the virtual machine image is prepared using the
stage.sh
script and contains a pre-installed/root/boot.sh
script that downloads and boots the warrior.
The warrior itself runs in a Docker container running Debian 10 Buster that contains Python 3.9, NodeJS, wget-at, and numerous other dependencies.
Warrior VM versions 3.0 and 3.1 ship with a Docker container running Ubuntu 16.04 that contains
- Python 3.5.2, pip 8.1.1
- Perl v5.22.1
- gcc 5.4.0, make 4.1, bash 4.3.48
curl 7.47.0
VM versions 3.0 and 3.1 will automatically be updated use the new, updated container configuration the next time they are booted up and connected to the internet.
Bootup
The virtual machine is self-updating. It does the following:
- Start the virtual machine
- Linux boots
boot.sh
downloads and launches/root/startup.sh
startup.sh
prepares and runs a Docker container with the warrior runner- Point your web browser to http://localhost:8001 and go.
Viewing container logs
Starting with VM version 3.2, you can view basic logs from the virtual machine console: press ALT+F2 for Warrior logs, press ALT+F3 for automatic updater logs, and press ALT+F1 to return to the splash screen.
Logging into the Warrior
To log into the warrior,
- Press Alt+F4 (make sure you capture your keyboard in the VM first or instead press Alt+Right several times).
- The username is
root
and the password isarchiveteam
- You are now logged in as root.
- Check the docker container with
docker ps
. This will give you docker container identifier, among others. If you are using VM version 3.2, there should be containers namedwarrior
(the Warrior itself),watchtower
(automatic updater, runs every hour), andinstantwtower
(automatic updater, runs once on VM startup). VM versions 3.0 and 3.1 will automatically be updated use these new, named containers the next time they are booted up and connected to the internet. - Enter the inside of the docker container with
docker exec -it identifier /bin/bash
Testing Core Warrior Code
This part may be outdated and refer to Warrior version 2
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.
The code for each project is stored in /home/warrior/projects/<PROJECTNAME>/