curriculum

TechLit Curriculum

TechLit curriculum is split into subjects, each with its own build process. We have a build step because it's MUCH faster to develop curriculum that way.

TL;DR

When all dependencies are available...

# Generating all the curriculum
./bin/build

# Generating a specific subject (for example, Python)
./python/build

Setup

To develop curriculum, you need these things:

  1. Have a unix system (tested on Linux and MacOS)
  2. Have an sh-like shell
  3. Have dev tools: git, for example. But also: git-lfs
  4. Have the ruby, crystal, and python versions from .tool-versions

How to install dependencies with asdf-vm and bash

Here's how you can clone this repo, install ruby, python, and crystal with asdf if you're using bash:

# Cloning this repo
git clone https://gitlab.com/techlit-africa/curriculum
cd curriculum

# Install git's large files extensions
git lfs install
# Download all the large files
git lfs fetch
# Checkout all the large files
git lfs checkout

# Installing the asdf version manager
git clone https://github.com/asdf-vm/asdf ~/.asdf

# Configuring bash to use asdf
echo source ~/.asdf/asdf.sh >> ~/.bashrc

# Reloading bash
source ~/.bashrc

# Installing nodejs and golang plugins for asdf
asdf plugin add ruby
asdf plugin add python

# Installing nodejs and golang versions
asdf install ruby $(cat .tool-versions | grep ruby | cut -d' ' -f2)
asdf install python $(cat .tool-versions | grep python | cut -d' ' -f2)
asdf install crystal $(cat .tool-versions | grep crystal | cut -d' ' -f2)

Working from the TechLit desktop

Copy SSH keys for guest and admin

WARNING: Assume your key is publicly accessible while on the image. Delete it from both places when you're done developing, and don't let others use the image while your keys are there.

We're assuming your key is here: /tmp/my_key.

Run these commands as admin:

# Make the ssh key private
sudo chmod 600 /tmp/my_key

# Let guest use the key
sudo cp /tmp/my_key /srv/guest/gitlab_ssh
sudo chown guest:guest /srv/guest/gitlab_ssh

# Let admin use the key
sudo cp /tmp/my_key /srv/secure/ssh/bastion_access
sudo chown admin:admin /srv/secure/ssh/bastion_access

Disable firewall

# Stop the firewall (re-enable when you're done)
rsv disable nftables

Clone the curriculum repo

As guest, clone the repo to guest storage and link it to the desktop:

git clone ssh://git@gitlab.com/techlit-africa/curriculum /srv/guest/curriculum
git lfs install
git lfs fetch
git lfs checkout
git -C /srv/guest/curriculum config user.name "My Name"
git -C /srv/guest/curriculum config user.email "name@email.me"
ln -sf /srv/guest/curriculum /var/btrfs/@guest/Desktop/curriculum

Restart the guest session. You should have the curriculum repo linked to the desktop. It won't get erased on logout.

Test a curriculum update

As admin, download the latest build and install it:

tl-comp-pull curriculum bastion
tl-curriculum-install
rsv restart desktop

Disable "login" screen

As admin, edit The lockscreen script: sudo nvim /var/btrfs/@guest/Desktop/.lockscreen.

Comment out the python script (the first command): # ~/.lockscreen.py.

Restart the guest session: rsv restart desktop.

Autostart your session

NOTE: This is erased every shutdown or reboot.

As guest, make this file: /tmp/guest/autostart

nemo /home/guest/Desktop/curriculum/raster/activities &
xfce4-terminal --working-directory=/home/guest/Desktop/curriculum

Put the OS back to normal

rm /srv/guest/gitlab_ssh
rm /srv/secure/ssh/bastion_access
rm /var/btrfs/@guest/Desktop/curriculum
rsv enable nftables
rsv restart desktop
Repository

curriculum

Owner
Statistic
  • 0
  • 0
  • 0
  • 0
  • 0
  • about 11 hours ago
  • June 2, 2023
License

Links
Synced at

Fri, 17 Jan 2025 17:40:42 GMT

Languages