os_assignmentno_delivery
os_assignmentno_delivery
on
Background info.
Bash, short for "Bourne Again Shell", is a challenging scripting language and one of
the widely-used command-line shell and scripting languages in the world of DevOps
(Development and Operations) and automated environment setup. DevOps is a set
of practices that combine software development (Dev) and IT operations (Ops) to
automate and streamline the software delivery and infrastructure management
processes. Some examples of using bash in DevOps and Automatic Environment
Setup:
1. Integration: Bash can be easily integrated into various DevOps tools and
platforms. It can call APIs, execute commands, and parse data from tools like
version control systems, continuous integration servers, and container
orchestration platforms, enabling seamless integration into the DevOps
toolchain.
2. Infrastructure as Code (IaC): Bash is often used to write scripts that define
infrastructure as code. IaC enables the creation and management of
infrastructure resources (e.g., servers, databases, networking) using code.
Bash scripts can interact with cloud providers' APIs or configuration
management tools, making it easier to
Bash plays often a significant role in operating systems in several ways. Here are
some examples:
The goal of this assignment is for you to implement a Bash script to set up, install,
uninstall, test, and manage two software packages (applications) on the standard
virtual machine, provided during the course (Debian 11).
This assignment uses methods like many scripts from software/framework
developers to make your OS ready for programming and testing. Your script will
install the following two packages:
• Nosecrets (https://github.com/bartobri/no-more-secrets)
• Pywebserver (https://github.com/nickjj/webserver#installation).
The implementation
Use the folder/file structure and the Bash template provided to perform the
following tasks/implementations (have a look at the template).
The template contains several TODOs to provide some guidance for the
implementation.
• User Input and Parameter Values Validation: validate user and non-user-
provided arguments everywhere to ensure they are valid commands and
options. Provide feedback if the arguments are not valid or recognized.
./apps/nosecrets/
./apps/pywebserver/
There are multiple ways to test. The expected way for this assignment is to
read the values from "test.json" and pass it to the pywebserver. See
the example on the repository website.
• Configuration File Usage: The code reads configuration settings from a file
named "config.conf" to determine the URLs for downloading specific
applications. It also uses data available in "test.json" to test the
"pywebserver".
Usage .
To run and test your Bash script implementation, change the path in the command
line to the folder where the script is located. The following commands and options
are expected to be used (“# ” represents the bash prompt):
# ./assignment.sh setup
To clean up the download folder and remove installed dependencies from the OS.
# ./assignment.sh remove
Tip: test your application extensively before submission to handle all types of errors.
For example, run every command mentioned above but do not provide all arguments
and handle each error you encounter. Remove required files during testing and
handle printed errors accordingly. This will make your implementation robust.
Grading.
The script will be tested in the given environment and might also be tested in the
delivery system for plagiarism/nonsense.
Submission
It is allowed to deliver in groups of up to 2 students. Each student will be responsible
for the whole assignment.
The reviewers will always have the possibility to have an oral check to verify the
integrity and or originality of the delivery.
The instructions for the submission will be added here later when it is ready, please
bear with it, we must make many new setups and experiments.
The upload will be via “codegrade”, and mandatory ONLY for one participant of each
group.
Deadline
The deadline for this upload is the 3rd of November at 11:30 P.M.