Skip to content

Latest commit

 

History

History
172 lines (111 loc) · 8.49 KB

M1.md

File metadata and controls

172 lines (111 loc) · 8.49 KB

Pipeline > Build

🗿 For this milestone and project, you will work in teams of 3 people.

Checkpoint Wednesday, March 2nd, before class. Due Friday, March 11th, before midnight.

🚰 Pipeline Design

Your pipeline will use a node.js project to act as a driver for provisioning and running tasks inside your computing environment from a host machine.

A skelton/template project has been provided to help start this process.

For this milestone, you must provide the following two commands:

# Provision and configure computing environment for pipeline
$ pipeline init
<connection information>

# Trigger a build job, running steps outlined by build.yml, wait for output, and print build log.
$ pipeline build [job-name] [build.yml]
<build output>
SUCCESS|FAILURE

🗄️ To pass environment settings to your pipeline, it is recommended you store your environment variables in a .env file that will be loaded when running the program. This will not be checked into your repository; however, you can provide the details of what a .env file should contain in your project README.md

🪟 /🍏 / 🐧: Your teammates and teaching staff may be running a different host computer. Your program should be agnostic to the host environment and do any platform-specific work inside a locally provisioned virtual machine. Keep in mind issues, such as git config core.autocrlf being set to true, and interferring with script files, or differences in quote styles across platforms. Keep in mind, some teammates might also have Mac M1 processors, which will require a different architecture, virtualization provider, and have different settings for accessing the VM.

General Tasks

  • Automatically provision and configure a build server.
  • Create a build job specification.
  • Automatically configure a build environment for given build job specification.

🎛️ Automatically configure a build server.

Automatically create a locally provisioned virtual machine. Ensure the virtual machine is configured to with appropriate networking access (e.g. host-only networking), ssh access, shared folders, etc.

Configure the VM to contain the tools and files necessary for your build server.

This setup should be primarily handled when running pipeline init.

Constraints

  • Use basicvm or bakerx for locally provisioning VM.
  • Use base image Ubuntu "focal" 20.04.
  • Output and store information related to connecting to your VM
    • user, ip address, path of ssh key

📋 Create a build job specification.

You will be designing a build job specification based on YAML. The exact content of build job will vary based on your design, but should roughly follow this format, 1) a setup object, with a list of steps or information that can be used for configuring the build environment, and 2)jobs, a list of jobs, with, each job, containing a list of named commands to run in build environment.

setup: 
  - CMD, VARIBLE, PACKAGE NAME, or DATA
  - {package: mysql, version: 8.0}
  - apt-get install mysql -y
  - java11, nodejs, wget
  - URL=https://github.ncsu.edu/engr-csc326-staff/iTrust2-v10
  - ...

jobs:
  - name: itrust-build
    steps: 
      - name: cmd name
        run: [CMD]
      - name: step name
        run: cd iTrust2 && mvn --batch-mode --update-snapshots clean test

Create a build.yml file for iTrust2-v10, an "enterprise" Java system.

iTrust2 is a java application used in the undergrad software engineering system. It using enterprise Java technology. It has a rich set of unit and integration tests.

Use the following guide, to help you understand how to build and run iTrust. Note: as you are not using Eclipse, you do not need to configure or install anything related to it.

Roughly, the build environment will need to install/configure:

  • Application specification configuration (application.yml.template)
  • JDK 11
  • MySQL 8.x (configured with password)
  • Maven 3.x

Constraints

  • Format or file should be YAML.
  • While you have freedom to design how the build.yml is constructed, keep in mind, you must handle future pipeline jobs. In short, you'll want to make sure your design can generalize to other build or deploy jobs.
  • Secrets should not be stored in build.yml

🛠️ Automatically configure a build environment for given build job specification.

Develop a component that will read and parse the given build.yml, update/install the necessary environment within the build environment, then perform the given build steps in that build environment.

While there isn't a lot to say here, this task will require most of the work, and will require coordination across all team members and task.

Constraints

  • Any technology may be used to translate the build.yml steps into configuration changes in the build environment---as long as it is dynamically performed (e.g., no prebuilt components or images).
  • The build environment should be clean after a build---A build should be able to run multiple times without problems.

Team responsibilities

👥 Task leaders

Each major task should have a team member responsible for implementing the majority of the assigned task. Use your GitHub Project Board to help coordinate and assign tasks.

Project Board

⚠️ Considerations

  • Points will be deducted for non-contributing members, including receiving zero credit for a milestone.
  • Create and assign tasks early: This means, you've documented how to break down and assign the work, meaning, everyone on the team is accountable for the work to be done.
  • Assigned tasks are the ultimate fix for drama-free teams: If a teammate didn't do work, it is clear what they didn't do, and when they didn't do it.
  • Do not create all your tasks just before due date---no credit will be given, some might even be subtracted, that's not how an engineering process works.

Checkpoint and milestone report.

Checkpoint

🛂 A checkpoint will occur on March 2nd, before class.

By the checkpoint, will be required to report interim progress reported, by checking in a document (CHECKPOINT-M1.md), that describes your current progress and team contributions. Note work you have completed, what issues you have faced, and what work remains. Include screenshots of your GitHub Project.

Additionally, a teaching staff member will examine your team repository, inspect your contents, project board, and run your code. They will report any major issues they identify and potentially deduct points for teams not making any progress.

⚠️ Points will be deducted for teams not making steady progress throughout the milestone.

Milestone report

As you learn how to setup your pipeline, document the experiences you have in learning about setting up the system and the issues you had in automating the process. This can be described in your submission's README.md.

💯 Evaluation

  • Automatically provision and configure a build server (20%)
  • Create a build job specification (20%)
  • Automatically configure a build environment for given build job specification (30%)
  • Checkpoint and milestone report. (20%)
  • Screencast. (10%)

Points may be deducted for not following constraints, poor quality of implementation, poor task communication and delegation, or failing to include sufficient detail required to evaluate capabilities.

A teaching staff member will be evaluating your code by inspecting, and then running your code by:

  • Updating and placing the provided .env file in README.md in root directory of project
  • Running npm install
  • Running node index.js init
  • Running node index.js build itrust-build build.yml

Points will be deducted for non-contributing members, including receiving zero credit.

Submission

Commit your all your work related to your project into your designated repository in the master branch before the final deadline.

When you have finished the submission, create a branch called M1 to hold a snapshot of your work related to this milestone.

Ensure your repository contains:

  • a top-level node.js project supporting the required commands for running your build server.
  • a sample .env file that describes any necessary settings needed for running your pipeline.
  • a README.md, with your report details.
  • a CHECKPOINT.md, with your checkpoint reports.
  • a link to screencast that demostrates each task.

Due Friday, March 11th, before midnight.