Linux Server Management Assignment 6 – Final Course SaltStack Module Project

H6 – SatlStack Final Project

Assignment given by Tero Karvinen

Tämän tehtävän määräaika on jo w19 perjantaina 2018-05-11, koska tämä tehtävä korvaa viikon lähiopetustunnit.

a) Kultainen polku. Tee ensimmäinen versio modulistasi, joka toimii ainakin optimiolosuhteissa. Jos jokin säätö on poikkeuksellisen hankala, voit tehdä sen tässä versiossa käsin, ja dokumentoida ajamasi käskyt. (Valmis moduli tarvitaan vasta esitykseen ensi viikolla).

b) Kokeile moduliasi tyhjässä koneessa. Voit käyttää virtualboxia, vagranttia tai livetikkua.

c) Käyttäjätarina (user story): ketkä ovat modulisi käyttäjät? Mitä he haluavat saada aikaan modulillasi? Missä tilanteessa he sitä käyttävät? Mitkä ovat tärkeimmät parannukset käyttäjän kannalta, joita moduliin pitäisi vielä tehdä? Tähän c-kohtaan vain sanallinen vastaus, tämä kohta ei poikkeuksellisesti edellytä testejä tietokoneella.

d) Kertaa materiaali ja valmistaudu kokeeseen. Tätä d-kohtaa ei tarvitse raportoida.

Testing Envinroment

For this assignment I used Laptop Acer 5439 and using Ubuntu 18.04 LTS

a) First assigment for my final project was to make first version of my saltstack model or state that I would present to my other classmates.

My module isn’t quite yet anything impressive or hard to do but it will help my friend and my friends workmates to start off faster from live-USB. It it just a module that installs a couple of programs but in the end I want it to configure them also as soon as I learn how to do it!

So now for first version of my project I made just a small things to start making them better! I started by making to salt-master master just to download the specific programs to slaves:

master$cat init.sls
    - pkgs:
      - gparted
      - ubuntu-restricted-extras
      - picocom

My module is installing following apps:

  • GParted is for partitioning disk and drives
  • Picocom is for zeroing sim-cards
  • Ubuntu-restricted-extras is also activated or installed so the user can now install packages that can’t be normally installed without this activated

And then I had my top.sls with which I could apply it immediately with state.highstate:

master$ cat top.sls
    - finalproject

And now on my master I had to run this command:

 master$ sudo salt slavepc state.highstate


It was all successfully installed and because this isn’t live-usb where I am now testing so ubuntu-restricted-extras is installed and activated.

-dev-sda - GParted_005.png

Software & Updates_004.png

So programs were installed (I don’t yet know how to demonstrate the Picocom but when I will I will demonstare).

b) This is part where I have to test that my module or state works on a fresh computer/virtual machine. For this I am going to boot a fresh Ubuntu from a live-USB and connect it to my master and see that will it work or not.

So I booted a live Ubuntu and connected to my master.

 slave$ sudo apt-get update && sudo apt-get -y upgrade
 slave$ sudo apt-get -y intstall salt-minion

And after installation I had to connect to my master:

 slave$ echo -e 'master: ip-address\nid: slavelive'|sudo tee /etc/salt/minion

After connecting I ran the same command to install the programs:

master$ sudo salt slave* state.highstate

It wasn’t as successful as I expected….


It didn’t install the ubuntu-restricted-extras. Now I have to figure it out how to fix this.


c) My module is very simple module for friends at her workplace. They have to zero sim cards and they also want need to modify disk partition. They also need a minimal terminal to test and debugging tool. Because they are doing a lot with Linux so they need a way to install some essential apps tat normally can’t be installed for one reason or another.

This module can also used by anyone who needs to modify their disk partition and debug something.

One thing that I didn’t find any good instruction that would work for automate configure USB-modem. I will look at that and try to add some kind of configuration because I have never done it so I don’t know where to begin or how to even test it.

How I could it also make it better and what I am going to do as I learn more about SaltStack. I want to also configure these programs to immediately start doing what they are programmed to do and also to configure modem-USB which I don’t know how to do.

d) This is a part is just a reminder to repeat the course material and prepare for the test!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s