Student competition - Build a module and win cash

April 7, 2022

The CFEngine team is pleased to announce a competition for students in Norway. We want you to write a module in Python, and submit it to CFEngine Build. Your module will be Open Source (MIT License), available for our community of users worldwide. CFEngine is a programming language, and modules can be added to do whatever the user needs, so the possibilities are endless. You can look at some examples for inspiration at the end of this blog post.

Prizes

The prizes are as follows:

  1. 🥇 10 000 NOK for the winner(s)
  2. 🥈 2 000 NOK for 2nd place
  3. 🥉 1 000 NOK for 3rd place

We will judge the quality and value of your module (how well it’s made and how useful it is to our users). Anyone can submit modules to CFEngine Build, but only students at UiO, UiB, OsloMet, and NTNU are eligible for prizes. (If you are studying at another Norwegian university / college, please send us an email and we may be able to accept you as well.) We will ask for some transcripts / documentation from the winners to verify this. Teams of up to 3 are allowed, but you will have to split the prize money.

What you have to do

  1. Complete getting started tutorial
  2. Optional: Talk to us about what you want to make: student-2022@cfengine.com
  3. Use our template and start coding!

Estimated time spend: 1-2 work days

Deadline: The deadline for submitting your module is April 25th 2022.

The python module you will make

To give you an idea of what your module will look like, here is our template:

from cfengine import PromiseModule, ValidationError, Result

class ExamplePromiseTypeModule(PromiseModule):
    def validate_promise(self, promiser, attributes, metadata):
        # Your code here, do error checking and raise ValidationError
        pass

    def evaluate_promise(self, promiser, attributes, metadata):
        # Your code here, make changes to the system and return Result
        pass

if __name__ == "__main__":
    ExamplePromiseTypeModule().start()

Filling out the 2 functions, validate_promise() and evaluate_promise() is all you need to do. A basic implementation of a git module looks like this:

https://github.com/cfengine/promise-type-template/blob/main/git_example.py

Help

Participants are encouraged to contact us via email:

student-2022@cfengine.com

We can help you with:

  • Help getting started / setting up a Virtual Machine
  • Any questions you have or problems you encounter
  • Ideas / suggestions for what to build
  • Feedback on your idea / what you want to build

Inspiration

Some examples of modules to look at for inspiration: