Skip to content

Injects an FTL Grader repo into an existing environment and setups supporting infrastructure

Notifications You must be signed in to change notification settings

redhat-gpte-devopsautomation/ftl-injector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

88 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

environment:toc:

Overview

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.

What does ftl-injector do:

  1. Create grading virtualenv - isolating FTL from student configuration

  2. Clones the FTL Repo, containing graders etc onto the grader host

  3. Create custom facts about students, course(s), for simple reporting

  4. Installs grader scripts etc.

Usage

  1. 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 in pre_software.yml

        - name: Inject and configure FTL on bastion as grader host
          hosts: bastions
          become: true
          roles:
            - ftl-injector
          tags:
            - step004
            - ftl-injector
  2. 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.

Notes

Adding, or updating, the ftl-injector role to your project:

  1. 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

About

Injects an FTL Grader repo into an existing environment and setups supporting infrastructure

Resources

Stars

Watchers

Forks

Packages

No packages published