Skip to content

Commit

Permalink
Merge github.com:KTH/devops-course into 2021
Browse files Browse the repository at this point in the history
* github.com:KTH/devops-course: (127 commits)
  Updated Demo: Setting up Drone CI with Bitbucket (KTH#1322)
  added presentation slides. (KTH#1302)
  [Submission] Executable tutorial: CI workflow using GitHub Actions for Node.js, Express app, Jest and ESLint (KTH#1269)
  Tutorial proposal update change (oldPR: KTH#1163) (KTH#1313)
  Added important information to README (KTH#1309)
  Course Automation Proposal: Labelizing "feedbackable" merged PR contributions (KTH#1306)
  Presentation : DevOps adoption in large Enterprise through Continuous Testing (KTH#1285)
  Delete contributions/presentation/week3/renanb-ved.megha directory (KTH#1300)
  Awesome guest lecturer for week 6
  Change folder name (KTH#1289)
  Final Submission - Course Automation: Checking Open-Source Requirements (KTH#1299)
  Feedback Proposal on Executable Tutorial KTH#1278 (KTH#1292)
  Revert "Final Submission - Course Automation: Checking Open-Source Requirements (KTH#1068)" (KTH#1298)
  Final Submission - Course Automation: Checking Open-Source Requirements (KTH#1068)
  Presentation Proposal: Managing secrets in dynamic environments with HashiCorp Vault (KTH#1282)
  Update README.md
  Amend students involved in tutorial (KTH#1262)
  Withdraw proposal KTH#1201 (KTH#1280)
  Executable tutorial proposal: Integrating Code Climate in developers workflow with shell scripts and docker (KTH#1278)
  Feedback proposal on KTH#1134: Deploying scheduled functions on Kubernetes using Kubeless (KTH#1273)
  ...
  • Loading branch information
arxra committed Apr 23, 2021
2 parents b19488f + 3b03d2b commit bf0a5be
Show file tree
Hide file tree
Showing 114 changed files with 1,914 additions and 126 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,18 @@ The schedule is at <https://www.kth.se/social/course/DD2482/calendar/>
### Week 4
* Technical Briefing (B. Baudry)
* Guest Lecture: MLOps [Alex Nodet (King)](https://www.linkedin.com/in/alexnodet/)
* Preparatory material: [IaaS Explained](https://www.youtube.com/watch?v=XRdmfo4M_YA) and [SaaS Vs PaaS Vs IaaS](https://tms-outsource.com/blog/posts/saas-vs-paas-vs-iaas/)
* Student presentations

### Week 5
* Technical Briefing (M. Monperrus)
* Guest Lecture: Supply-chain security [Rhys Arkins (Whitesource)](https://www.linkedin.com/in/rhys-arkins-5a643a/)
* Preparatory material: [A 'Worst Nightmare' Cyberattack: The Untold Story Of The SolarWinds Hack](https://www.npr.org/2021/04/16/985439655/a-worst-nightmare-cyberattack-the-untold-story-of-the-solarwinds-hack)
* Student presentations

### Week 6
* Technical Briefing (B. Baudry)
* TBA
* Guest Lecture: Resilient Software [Heidi Waterhouse](https://heidiwaterhouse.com/)
* Student presentations

### Week 7: Michelin Devops Demo Day
Expand Down Expand Up @@ -87,6 +89,7 @@ To pass the course, the student has to collect 4 grades:
* Group work is encouraged (max 3 persons) but you cannot be with the same persons for more than 2 projects. You can do a work alone for one or at most two projects.
* A failed task requires to pass it again at the end of the course, based on the feedback from the failure. A repeated task cannot be passed with distinction. A task can only be repeated once.
* If the whole course is failed, no grades are kept if the student registers again to the course the year after.
* After a proposal has been merged, the topic of that proposal cannot be changed.

Group Rules
* When you send a pull request for registration, please follow the name convention of using email addresses of two members to create the folder: email-email.
Expand Down
68 changes: 68 additions & 0 deletions Registered_KTH_IDs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
borzi
sestak
marwask
anhenri
lazarc
gdba
despinoy
fbjorkma
cjgst
swill
sebene
ericvi
renanb
brogard
johlin5
joarr
kultala
eryman
kunwu
alekru
johhamm
johennin
atema
andnil5
kittyt
isacarv
stahr
augustjo
karrby
carllei
urama
gchang
frnorlin
shapour
alexdiaz
fseifert
agnespet
aatif
abwogi
mwesslen
henrlind
linusri
majate
kalpet
ramtinet
manande
ntas
lerjevik
amarh
fwallb
axp
taqui
arieltan
axelelm
agnesfo
zangis
oscarekh
chrigu
carinawi
aronber
oskstr
damne
nwessman
yuxinm
isakha
kallem
yuehao
lukasgut
30 changes: 30 additions & 0 deletions contributions/course-automation/agnesfo-eryman/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Course automation proposal: check criterion for groups with 3 students.

## Members
Agnes Forsberg (agnesfo@kth.se)
github: agnesforsberg

Elin Ryman (eryman@kth.se)
github: rymane

### Group rules in this course regarding groups with 3 student.
"We recommend 2 students. Three is also possible for ambitious essays, demos or contribution to open-source."

## Proposal
Since a group of 3 students has some extra criterion to fulfill than the regular group of 1-2 students,
we want to simplify the TAs job in deciding whether the criterion is met. We would like to create a Github Action
that automatically adds a label to the pull request when the group consists of 3 students. This is for the TA to know
which pull requests should be ambitious enough. We will also check that the pull request submitted is regarding essays,
demos or contributions to open-source since those categories are the only allowed for 3 students.
The Github Action should create a PR comment with information about if 3 students are ok for the chosen category.

We aim to fulfill the following criterion:

| | Yes | No | Remarkable |
|-------------------------------------------- | ----|----|-------------|
|The work is done before April 6, 2021 (in order to be useful for the course) | Yes | **No** | n-a|
|The automation task produces a PR status or issue / PR comment | **Yes**, PR comment and adds a label | No | Points to a generated page with valuable additional information |
|The automation task is reusable | **Yes (next year for this course)** | No | In other courses than this one |
|The task runs on a standard platform | **Yes**, will use Github action | No | Other platforms (e.g. Moodle, Canvas) |
|The task is praised by the other students of this course | Yes | No | n-a |
|The code for the task is available | **Yes**, will use a public repo | No | **Well documented repo** |
24 changes: 24 additions & 0 deletions contributions/course-automation/bouaddi/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# GitHub action to show what is available for feedback

## Member

Hilaire Bouaddi, bouaddi@kth.se [https://github.com/Hilaire-Bouaddi]

## Rationale

It takes some minutes to check if a contribution we are interested in will receive feedback or not. This can generate frustration.
The aim of the proposal is to automate the labelization of PR to mark the ones that can be feedbacked.

## Proposal

I would like to try to create a GitHub Action. This action would:
- get the URL of every merged PR for contributions in either essay or executable tutorial.
- for every URL
- if the URL is referenced in a contribution for feedback, put the label "feedbacked" to the PR, delete other labels "feedbackable" and "feedback claimed"
- else if the URL is referenced in a feedback PR that waits to be merged, put the label "feedback claimed" to the PR, delete other labels "feedbackable" and "feedbacked"
- else put the label "feedbackable" to the PR, delete other labels "feedback claimed" and "feedbacked"

### Legend
* "feedbackable": nobody claimed the feedback for this task yet
* "feedback claimed": a PR is waiting to be merged for the feedback of this contribution
* "feedbacked": the feedback for this contribution has been claimed
59 changes: 57 additions & 2 deletions contributions/course-automation/oskstr-swill/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,61 @@ The action should check that repo has:
- More than 100 commits
- An active community
- open to interpretation
- provide stats on what has happend the last year (comments, PRs, commits)
- provide stats on what has happened the last year (comments, PRs, commits)

We believe that checking that a project is related to DevOps may be too difficult for the purposes of this project.
We believe that checking that a project is related to DevOps may be too difficult for the purposes of this project.

## Final Submission
We have created a GitHub action at: https://github.com/sfkwww/milkyway

The action can be used to find a link to an open-source GitHub repository in a body of text, like a pull request, and
get the following stats:
- stars
- watchers
- contributors
- forks
- commits
- commits last year
- open issues

The action can test that those stats satisfy some minimum requirement, e.g. 10 stars and 100 commits.

With this pull request we have added a file at `.github/workflows/open-source-requirement.yml` that
would run this action whenever a pull request to `2021` gets the label `contribution_to_opensource`.

The minimum requirements currently in place are:
- stars: 10
- watchers: 10
- contributors: 10
- forks: 1
- commits: 100
- commits last year: 10
- open issues: 10

If needed they can be changed or removed. The default requirement is 0.

The current workflow also uses `github-script` to comment a table of stats on the pull request.

An example would be:

> [ rust-lang/rust ]
> -----------------------
> | Stat | Number | Pass |
> |---|---|---|
> |Stars ⭐ | 53440 | ✔️ |
> |Commits 📦 | 141152 | ✔️ |
> |Commits Last Year ⏱️ | 14472 | ✔️ |
> |Watchers 👀 | 1489 | ✔️ |
> |Contributors 🧑🏻‍🤝‍🧑🏻 | 4135 | ✔️ |
> |Forks 🍴 | 7696 | ✔️ |
> |Open Issues 🟢 | 7056 | ✔️ |
### Update according to change in grading criteria
In a proposed update [#1209](https://github.com/KTH/devops-course/pull/1209) to the grading criteria for this task there are two additional requirements.

1. Implemented in stand-alone repository (already done, no issue here)
2. Demonstrate that automation technique actually works, for example in fork of [KTH/devops-course](https://github.com/KTH/devops-course) (we have tested but haven't provided a link)

Here is a link to the Pull Request where we did our testing: [sfkwww/milkyway#2](https://github.com/sfkwww/milkyway/pull/2).

Here is a link to the actions invoked during said testing: [sfkwww/milkyway/actions](https://github.com/sfkwww/milkyway/actions).
28 changes: 25 additions & 3 deletions contributions/course-automation/zangis/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,35 @@
## Members

Ralfs Zangis (zangis@kth.se)
GitHub: [Ralfs](https://github.com/bubriks)
GitHub: https://github.com/bubriks

## Proposal
Ensuring that pull request can be approved only if the formatting requirements are met.
Ensuring that pull requests can be approved only if the formatting requirements are met.

## Description
- Check changed .md file contents (contains: task name, members, and description)
- Verify that the member names (from README.md) are represented in the containing folder name
- Confirm that file structure follows the rules (no changes outside members folder in the selected category)
- Disallow pull request approval if any checks have failed
- Inform user if any checks have failed (for more details on what has failed check build)

## Final solution

### Overview
Code testing the validity of markdown files and the change location is expected to be run on pull requests.
This solution should allow for relatively easy future updates requiring few modifications, as the most complex part is handled by the referenced GitHub action.
[KTH course content verifier](https://github.com/bubriks/KTH-Course-content-verifier)

### Info about the solution

An example solution is provided and explained within the provided GitHub link and an aditional file for implementation is provided ("validation.yml"), this file only needs to be copied into the following folder for it to work: DevOps-course\.github\workflows.

Since single action was necassary the functionality of the following actions is incorporated in this repository (in addition to logic related to folder naming):
- https://github.com/bubriks/string-verifier
- https://github.com/bubriks/file-content-checker

They were made to allow for usage of the implemented functions outside of this curse (As the provided solution could be considered specialized for the task at hand).

### Getting started:
Example of deployed solution can be found in: https://github.com/bubriks/devops-course/tree/course-automation-deployed

And tests performed by forking the deployed solotion can be seen here: https://github.com/bubriks/devops-course/pull/25 (with each commit being a separate test, read comments for more info)
66 changes: 66 additions & 0 deletions contributions/course-automation/zangis/validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Markdown content and change location validation

on: pull_request

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- id: changed-files
name: Get changed files
uses: jitterbit/get-changed-files@v1

- name: Verify submission details
uses: bubriks/KTH-Course-content-verifier@master
with:
location: ^contributions/(.+)/(.+)/
changes: ${{ steps.changed-files.outputs.all }}
structure: >
{
"title": [
"^# presentation:.*$",
"^# essay:.*$",
"^# demo:.*$",
"^# open-source:.*$",
"^# executable tutorial:.*$",
"^# course automation:.*$",
"^# feedback:.*$"
],
"member": {
"title": "^## members$",
"memberOne": [
{
"nameAndEmail": "^[a-z]+( [a-z]+)* [a-z]+ \([a-z]+@kth.se\)$",
"gitHub": "^github: https://github.com/[a-z]+$"
},
{
"nameAndEmail": "^[a-z]+( [a-z]+)* [a-z]+ \([a-z]+@kth.se\)$"
}
],
"memberTwo": [
{
"nameAndEmail": "^[a-z]+( [a-z]+)* [a-z]+ \([a-z]+@kth.se\)$",
"gitHub": "^github: https://github.com/[a-z]+$"
},
{
"nameAndEmail": "^[a-z]+( [a-z]+)* [a-z]+ \([a-z]+@kth.se\)$"
},
{}
],
"memberThree": [
{
"nameAndEmail": "^[a-z]+( [a-z]+)* [a-z]+ \([a-z]+@kth.se\)$",
"gitHub": "^github: https://github.com/[a-z]+$"
},
{
"nameAndEmail": "^[a-z]+( [a-z]+)* [a-z]+ \([a-z]+@kth.se\)$"
},
{}
]
},
"proposal": "^## proposal$"
}
32 changes: 26 additions & 6 deletions contributions/demo/annnik/README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,43 @@
# DEMO 🎥 : Testing and running Github actions locally with Act
# DEMO 🎥 : Testing and running Github actions locally with Nektos Act

## Members
Anna Nikolskaya (annnik@kth.se)

Github username: annsudo

## Problem area within DevOps
To test you scripts for custom-written github actions you are forced to push them to the github. That is time consuming and unproductive.
To test you scripts for custom-written github actions you are forced to push them to the github 🤦‍♀️ That is time consuming and unproductive!

## Solution to it
with help of open source project Act you can test and debug your actions locally
with help of open source project Nektos Act and Docker you can run, test and debug your actions locally!

## Agenda for demo (Preliminary)
## Agenda for demo

- ✅ How Act work
- ✅ Installing Act
- ✅ Several basic comands to run you github action locally
- ✅ Handeling Secretes
- ✅ Usage
- ✅ Handling Secretes
- ✅ Let´s run it together
- ✅ Take away

## Youtube
[To the Demo](https://youtu.be/5mYUMxHOjI4)

## Code repo of the example-action
[Action code](https://github.com/annsudo/discord-comments)

## Aiming for
💥 Remarkable 💥



| | Yes | No | Remarkable |
|-------------------------------------------- | ----|----|-------------|
|The demonstration is clearly motivated (why it matters for Devops?) | 💥 Yes | No | 💥 Relates to a hard problem |
|The demonstration is difficult to do | 💥 Yes | No | Relies on a non trivial infrastructure |
|The demonstration is original | 💥 Yes | No | 💥 The are less than 10 demos on the topic on Internet |
|The video is sublime (eg visually appealing) | Yes | No | 💥 Excellent narrative |
|The video contains an [easter egg](https://github.com/OrkoHunter/python-easter-eggs) | Yes |💥 No | Related to the demo |
|There is a code repo to run the demo | 💥 Yes | No | 💥 Code repo with a solid readme |
|The video must contain subtitles which are clear and in proper English | 💥 Yes | No | 💥 Clearly understandable voice over |
|The video includes a take-home message | 💥 Yes | No | 💥 Actionable takeaway |
2 changes: 1 addition & 1 deletion contributions/demo/arieltan-zangis/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ Creating an easy-to-follow guide on why/how to use backups.
- Showcasing results

## Submission
[Screencast](https://youtu.be/GGqW3pk-sCg)
[Screencast](https://www.youtube.com/watch?v=GQ9qroAbqr4)
12 changes: 12 additions & 0 deletions contributions/demo/atema-siper/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Monitoring availability using Cloudprobe and Prometheus

## Members

Martijn Atema, atema@kth.se, GitHub: Atema
Simon Persson, siper@kth.se, GitHub: altaired

## Proposal

After building software that users depend on every day it becomes clear that uptime and response times are very important measures to always keep track of. We need to be able to respond quickly when something goes wrong, and want to know when an endpoint doesn't work; preferably before the user even notices. There are some paid, closed-source tools that achieve this, but there's very few self-hosted, open-source alternatives.

[Cloudprober](https://cloudprober.org) is a good option; it is an open-source monitoring tool that makes it easy to monitor availability and performance of applications. In this demo we will show how to setup Cloudprober to monitor an API and then display the data in [Prometheus](https://prometheus.io).
Loading

0 comments on commit bf0a5be

Please sign in to comment.