environment:toc:
ftl-injector
clones the FTL Repo into an existing environemnt and configures the target machine to be able to grade labs. Originally designed to work with AgnosticD FTL can work with any environment where the appropriate Ansible credentials can be supplied.
-
Create grading virtualenv - isolating FTL from student configuration
-
Clones the FTL Repo, containing graders etc onto the grader host
-
Create custom facts about students, course(s), for simple reporting
-
Installs grader scripts etc.
-
Add FTL to your config by
-
Choosing a grader host where FTL will be installed, typically a machine a student works on.
-
bastion
-
Some form of client VM
-
-
Calling the ftl-injector role
-
For example config
three-tier-app
adds in inpre_software.yml
- name: Inject and configure FTL on bastion as grader host hosts: bastions become: true roles: - ftl-injector tags: - step004 - ftl-injector
-
-
-
OPTIONAL To provide accurate reporting provide a
student_login
var-
For agnosticd users working with CloudForms, in your deployer scripts:
export OPENTLC_STUDENT=${USER:-unknown-student} (1) ansible-playbook \ ${DEPLOYER_REPO_PATH}/main.yml \ -e ANSIBLE_REPO_PATH=${DEPLOYER_REPO_PATH} \ -e guid=${GUID} \ -e env_type=${ENVTYPE} \ -e key_name=${KEYNAME} \ -e email=${USEREMAIL} \ -e student_login=${OPENTLC_STUDENT} \ (2)
-
1 Assign the CloudForms
--user
argument to an ENV VAR -
2 Use 1 to pass to
ansible
via-e
-
-
Note
|
Failing to do this will NOT result in failure as student_login defaults to john-doe in the the roles defaults/main.yml .
|
Adding, or updating, the ftl-injector
role to your project:
-
Create a requirements.yml, with the correct version tag:
--- # External role to setup grader host virtualenv and FTL grading infra - src: https://github.com/redhat-gpte-devopsautomation/ftl-injector name: ftl-injector version: v0.5
Use
ansible-galaxy
to install, (substituting your roles directory path if necessary).ansible-galaxy install -r requirements.yml -p roles