teaching-webterm/README.md

64 lines
1.2 KiB
Markdown
Raw Normal View History

2022-05-26 15:31:39 +00:00
2022-05-30 19:48:31 +00:00
# Teaching WebTerm
2022-05-26 15:31:39 +00:00
2022-05-31 12:06:29 +00:00
Easy web terminal for students, when you have to teach system administration,
2022-05-30 19:48:31 +00:00
and SSH is not available, not installable or not allowed.
2022-05-31 12:05:44 +00:00
## Prerequisites
2022-05-30 19:48:31 +00:00
2022-05-31 12:05:44 +00:00
* For development
* Vagrant - manage virtual machines
* Minica - generate certificates
* Ansible - provisionning
* For production
* Terraform - manage provider infrastructure
* Ansible - provisionning
## Installation
2022-05-30 19:48:31 +00:00
### Development / Test
vagrant up
### Production
2022-05-31 12:03:24 +00:00
Adjust your environment variables in the `.env` file
TF_VAR_gandi_key="xxxxxxxx"
TF_VAR_ssh_private_key="$HOME/.ssh/path/to/key"
TF_VAR_ssh_public_key="$HOME/.ssh/path/to/key.pub"
TF_VAR_domain_name="example.com"
ANSIBLE_HOST_KEY_CHECKING=False
ANSIBLE_VAULT_PASSWORD_FILE="$HOME/path/to/passphrase"
And load it
source ../.env
Then create the infrastructure:
2022-05-30 19:48:31 +00:00
cd terraform/
terraform plan
terraform apply
2022-05-31 12:03:24 +00:00
cd ..
2022-05-30 19:48:31 +00:00
2022-05-31 12:03:24 +00:00
And install everything:
2022-05-30 19:48:31 +00:00
2022-05-31 12:03:24 +00:00
cd ansible
ansible-playbook -i inventories/terraform playbook.yml
cd ..
2022-05-30 19:48:31 +00:00
## Usage
Open your web browser and type the gateway IP or domain.
For development
* URL: <http://192.168.50.250>
* Password: demo
For production:
* Please use the credentials defined in `ansible/host_vars/*`
2022-05-26 15:31:39 +00:00