Thanks to our generous sponsors at Red Hat, we are excited to provide hosted TuxLab instances for eligible Universities and K-12 Institutions. If you are interested, fill out our application form:
APPLICATION FORM
TuxLab is comprised of a number of services, which are designed to run on separate virtual instances:
TuxLab uses MongoDB as a database backend. For small installations, this can be co-located with the Meteor server. However, in production we recommend using a redundant MongoDB Cluster to ensure data integrity. There are number of ways to deploy MongoDB clusters to the cloud:
Meteor is an application server, integrating Node.JS, MongoDB and Ansible. The Meteor application server is automatically configured by the TuxLab Ansible Playbook, so all that is needed is a CentOS 7.X host. We recommend using the following images:
TuxLab uses Docker Swarm for scaling the Docker container execution environment across servers. The Docker Swarm Manager is the cluster manager for these systems, as well as running several services including DNS. It is automatically configured by the TuxLab Ansible Playbook, so all that is needed is a CentOS Atomic host.
!> The version requirements for this system are specific (due to ETCD versioning), so be sure to use the following images:
TuxLab uses Docker Swarm for scaling the Docker Container execution environment across servers. The Docker Swarm hosts are members of the Docker cluster, running the lab runtime as well as proxy containers for providing access to labs. It is automatically configured by the TuxLab Ansible Playbook, so all that is needed is a CentOS Atomic host.
!> The version requirements for this system are specific (due to ETCD versioning), so be sure to use the following images:
Clone the tuxlab-infra repository into a local directory. Make sure to do it recursively, as it has submodule dependencies:
git clone --recursive https://github.com/learnlinux/tuxlab-infra.gitEdit the config.yml configuration file found in the repository root.
The options are outlined here:
| Option | Value |
|---|---|
| TUX_DOMAIN | Domain name used for TuxLab |
| TUX_ORG | Organization name, used in SSL CA. |
| TUX_EMAIL | Service E-Mail. Used in SSL CA. |
| TUX_HOMEPAGE | Root URL. Mut be suffixed by / |
| Option | Value |
|---|---|
| SSL_COUNTRY | Organization country, used in SSL CA. |
| SSL_STATE | Organization state, used in SSL CA. |
| SSL_LOCALITY | Organization locality, used in SSL CA. |
| SSL_ORG | Organization name, used in SSL CA. |
| SSL_ORG_UNIT | Organization unit name, used in SSL CA. |
| Option | Value |
|---|---|
| LAB_IMAGES | A list of Lab Images to be downloaded from the Docker Hub. Read more |
| Option | Value |
|---|---|
| AUTH_GOOGLE | Whether to use Google Authentication |
| AUTH_GOOGLE_CLIENTID | Google API Client ID |
| AUTH_GOOGLE_SECRET | Google API Secret ID |
| AUTH_GOOGLE_DOMAIN | Limit to a single email domain. (Optional) |
Not yet implemented. A work in progress.
Once the requisite systems are configured, create an Ansible inventory file containing the systems you wish to provision. For example:
\[all:vars\]
swarm_node_ip: 10.100.1.10
\[tuxlab-swarm-manager\]
dswarm ansible_host=10.100.1.10 ansible_port=22 ansible_user='username' ansible_password='password'
\[tuxlab-swarm-host\]
dhost ansible_host=10.100.1.11 ansible_port=22 ansible_user='username' ansible_password='password'
\[tuxlab-meteor\]
meteor ansible_host=10.100.1.2 ansible_port=22 ansible_user='username' ansible_password='password'Then execute the playbook using the Ansible shell command:
ansible-playbook -i /path/to/inventory.yml setup.ymlTuxLab is designed to be provisioned automatically using a separate server application, such as Ansible Tower or Rundeck. This provides a number of benefits:
- Reduce server resources, and/or cloud service costs.
- Increase performance during peak usage.
- Recover from server failures.
- Automatically update on code changes.
To enable this, TuxLab exposes the setup.yml playbook for provisioning servers,
and the test.yml for repeatedly testing cluster health.