Week 16 Class 30 Wed May 08 Posted: May 08
Project 4
In some cases, the failure that I got when running the tests may be due to where the build directory is located. When building in a docker container, the build directory is not a subdirectory. Some tests assumed that the input data was in the source directory, and the source directory was the parent directory of the build.
However, your tests should run wherever your build directory is located, so some points will still be taken off. I updated the Report.md and the scores for those who had this issue.
Week 15 Class 28 Thu May 02 Posted: May 02
After Class
Exercises DOOD and DIND
For some reason I did not put a due date. Let's make it Monday, May 6 at 4:30 pm.
Project 4
In some cases, the failure that I got when running the tests may be due to where the build directory is located. When building in a docker container, the build directory is not a subdirectory. Some tests assumed that the input data was in the source directory, and the source directory was the parent directory of the build.
I will take another look at those who had failing tests.
However, your tests should run wherever your build directory is located, so some points will still be taken off.
I will post here once I am through going back over these.
Announcements
Agenda
GitHub Actions
Docker - Where we build our executable?
DIND (Docker IN Docker)
At this point, you can start another container inside of this one, view what containers are running, and contrast with the Host docker.
Record an asciinema session of running DIND. Set it up, and then use the docker ps
command to verify that DIND is in effect.
Commands must be entered in character by character, no cut and paste.
DOOD (Docker Outside Of Docker)
At this point, you can start another container that is a sibling of this one, view what containers are running, and see how it is the same as the Host docker.
Record an asciinema session of running DOOD. Set it up, and then use the docker ps
command to verify that DOOD is in effect, both in the container and on the host
Commands must be entered in character by character, no cut and paste.
Final Exam Posted: May 2
The Final Exam is in our regular classroom Final Exam: May 9, 2:30 - 4:30 pm.
You are responsible for the following. Questions marked 589 are optional for those in the 489 section.
The following are specific "How to" that you may be required to show:
docker
on the command lineCLIENT
Optional: DIND, DOOD
The exam has various types of problems, including short answers, definitions, comparisons, drawing diagrams, and coding.
The questions are based on what I covered in class, including the book, the exercises, and the projects. If I did not cover it in class, it is not on the exam.
Week 15 Class 27 Tue Apr 30 Posted: Apr 30
After Class
Office Hours My Office Hours on Thursday, May 2 are from 10:30 - 11:00 am and 3:15 - 4:15 pm.
Project 5: Due date changed and requirements clarified.
Announcements
CircleCI Committed a multi-job, with upload of artifacts .circleci/config.yml in both the UACPSC/DevOpsComplexityCMake and mlcollard/DevOpsComplexityCMake.
One change from class: The path:
for store_artifacts
is a directory. You can specify specific files, but can't seem to use a wildcard for specific files.
Agenda
Docker Builders
docker builder ls
docker buildx create --use
CPack
GitHub Actions
upload-artifacts
Self-Hosted GitHub Action Runners
Week 14 Class 26 Thu Apr 25 Posted: Apr 25
After Class
CircleCI Committed a multi-job, with upload of artifacts .circleci/config.yml in both the UACPSC/DevOpsComplexityCMake and mlcollard/DevOpsComplexityCMake.
One change from class: The path:
for store_artifacts
is a directory. You can specify specific files, but can't seem to use a wildcard for specific files.
Announcements
docker buildx create --use
For multiplatform builds.
Experiencing some issues where images are built, but are not showing up in the image list (docker image ls
). This may be due to a builder issue. Will post as I figure out more.
DevOps Engineer time efficiency
Agenda
CircleCI Configuration Reference
workflow
s between multiple jobsCPack
Using the bash screen
command.
screen -S upgrade
[ctrl + a] + d
screen -list
screen -list
screen -r upgrade
Week 14 Class 25 Tue Apr 23 Posted: Apr 23
After Class
docker buildx create --use
For multiplatform builds.
Agenda
Project 5
Docker Compose: Build tags
CircleCI Configuration Reference
Setup:
Working:
Periodically and at Completion:
Docker Compose & Dockerfile Principle
Base variations on attributes not specific versions
Week 13 Class 24 Thu Apr 18 Posted: Apr 18
Announcements
Office Hours My 10:30 - 11:30 office hours today are moved to 3:15 - 4:15 pm.
Project 3 Feedback is in the file Report.md in your repository.
If your Report.md states "Fix the Dockerfile so that it builds", put your fixes in by 8 am Monday, Apr 22.
Agenda
General Principles
Project 5
ARG and ENV
Share secrets with a container: Local file
Share secrets with Docker Secret
Parameters to GitHub Actions
Run and manage workflows from the command line
Project 5: CI/CD Posted: Apr 18
The following counts as two projects and is due Friday, May 3 Thursday, May 9.
Implement the following in the Makefile repository in the branch compose:
cpack
.lintian
or rpmlint
). The result should be saved. As many corrections as possible should be made to what the lint program finds.Students in the 589 section must additionally do the following:
For students in the 489 section, any part of the 589 requirements will count as extra credit.
Items crossed out are not required. If you do complete them, they will count as extra credit.
Some restrictions:
Week 13 Class 23 Tue Apr 16 Posted: Apr 16
After Class
Office Hours My 10:30 - 11:30 office hours today are moved to 3:15 - 4:15 pm.
Project 3 Feedback is in the file Report.md in your repository.
If your Report.md states "Fix the Dockerfile so that it builds", put your fixes in by 8 am Monday, Apr 22.
Agenda
CPack
Week 12 Class 22 Thu Apr 11 Posted: Apr 11
Agenda
CPack
Keep track of the commands entered in class. You may abbreviate long filenames
With each command write the general purpose.
Use the link of the title of the exercise to submit.
Due by 4:30 pm on Monday, April 15.
Week 12 Class 21 Tue Apr 09 Posted: Apr 09
Agenda
Docker Compose
docker compose build
docker compose up
export PLATFORM="linux/amd64"
Week 11 Class 20 Thu Apr 04 Posted: Apr 04
Announcements
Agenda
GitHub Actions
CPack
Week 11 Class 19 Tue Apr 02 Posted: Apr 02
Announcements
Agenda
GitHub Actions
curl -L "https://github.com/Kitware/CMake/releases/download/v3.28.3/cmake-3.28.3-linux-x86_64.tar.gz" | tar xz --strip-components=1 -C /usr/local
Week 10 Class 18 Thu Mar 21 Posted: Mar 21
Announcements
Agenda
hyperfine
--timeout n
GitHub Actions
curl -L "https://github.com/Kitware/CMake/releases/download/v3.28.3/cmake-3.28.3-linux-x86_64.tar.gz" | tar xz --strip-components=1 -C /usr/local
Docker Compose
Project 4: Testing & Actions Posted: Mar 21
Project 4 is due by Midnight on Friday Apr 5
Implement the following for the Makefile repository in the new branch actions:
Part A: Create a testsuite:
ctest
Part B: Create a GitHub Action workflow to build and run tests:
cmake
3.28As with all topics in this class, an iterative process of a small edit followed by build and test is core to DevOps (in general, not just this class). Failure to do so on this project will lead to a lower score.
Midterm Class Meeting Posted: Mar 14
Week 9 Class 15 Tue Mar 12 Posted: Mar 12
After Class
Announcements
Agenda
Environment variable
sshpass -e
export UseMultiToolTask=true
srcml
srcml --text="int n;" -l C++
ctest
Week 9 Class 15 Tue Mar 12 Posted: Mar 12
Announcements
Agenda
df -h
du -hs
top
--timeout n
GitHub Actions
curl -L "https://github.com/Kitware/CMake/releases/download/v3.28.3/cmake-3.28.3-linux-x86_64.tar.gz" | tar xz --strip-components=1 -C /usr/local
Week 8 Class 14 Thu Mar 07 Posted: Mar 07
Announcements
Agenda
docker commit
, docker image ls
, docker system prune
CMD
& ENTRYPOINT
, shell vs exec formmake install
, make install/strip
ctest
, shell scripts, testsuiteMidterm Exam Posted: Mar 7
The Midterm Exam is during class time in our regular classroom on Thursday, Mar 14.
You are responsible for the following:
apt-get
, update
, upgrade
, install
make
and ninja
, in-source vs. out-of-source buildsrun
, build
, exec
, history
, --volume
, --interactive
, --tty
FROM
, RUN
, COPY
, ARG
, ENV
, CMD
, ENTRYPOINT
The exam has assorted problem types, including short answers, definitions, comparisons, configuration, and coding.
Questions are from what I covered in class, the exercises, and the projects. If I did not cover it in class, it is not on the exam.
Week 8 Class 14 Tue Mar 05 Posted: Mar 05
After Class
Announcements
vcpkg
The environment variable, VCPKG_ROOT
, may not be set. You can replace $VCPKG_ROOT
with the path to your vcpkg
cloned repository, or set it with export VCPKG_ROOT=<INSERT PATH HERE>
The use of libxml2 has an issue with liblzma in Ubuntu (and therefore in WSL). To fix, install pkg-config
.
Exercise 32: Docker Hub Accounts
In order for me to view you Docker Hub account, you have to have an image. So push an image if you need to.
Agenda
COPY
ARG
& ENV
ARG
${TAG}
Project 3: Product Posted: Mar 5
Project 3 is due by Noon on Wed Mar 13.
Instead of only providing an environment for building, e.g., srcml/codespaces, most Docker containers offer a service or produce a product. In our case, a product is an executable program or an installer for an executable program.
Create a Dockerfile for an application. The image must:
libxml2
or libarchive
, or another library of your choosinggit
to download the files for the program, or add the files to the repository with the DockerfileA container of the image must:
docker
commandsThe Dockerfile must:
LABEL
Week 7 Class 13 Thu Feb 29 Posted: Feb 29
After Class
vcpkg
The environment variable, VCPKG_ROOT
, may not be set. You can replace $VCPKG_ROOT
with the path to your vcpkg
cloned repository, or set it with export VCPKG_ROOT=<INSERT PATH HERE>
The use of libxml2 has an issue with liblzma in Ubuntu (and therefore in WSL). To fix, install pkg-config
.
Agenda
Exercise 32: Docker Hub Accounts
Create a Docker Hub account. Enter your Docker Hub username into the form.
Exercise 33: vcpkg
Exercise 34: Dockerfile II
Follow along.
You can build an image from this Dockerfile, and create a container from this image, anywhere you have access to docker
. You can even copy the Dockerfile to the devops server and build there:
scp Dockerfile devops:.
GitHub Actions
All exercises are due by 4:30 pm on Fri Mar 01
Week 7 Class 12 Tue Feb 27 Posted: Feb 27
Agenda
Exercise 30: DevOpsComplexity CMake IV
Follow along and duplicate my changes to the CMake for the DevOps Complexity program.
Exercise 31: Dockerfile
Follow along and create a Dockerfile for an image that allows us to have containers that build programs.
You can build an image from this Dockerfile, and create a container from this image, anywhere you have access to docker
. You can even copy the Dockerfile to the devops server and build there:
scp Dockerfile devops:.
All exercises are due by 4:30 pm on Wed Feb 28
Week 6 Class 11 Thu Feb 22 Posted: Feb 22
Announcements
Project 1
I posted my current version of feedback for Project 1 in your GitHub repository. It is in the branch feedback in the file Report.md. Best to view it on GitHub.
If you can use gh browse
, then you can go directly to it:
gh browse --branch feedback Report.md
If you are using WSL and gh browse
cannot open a browser, then you should try to fix that. You are in a DevOps course, and fixing stuff like that is common.
I will post scores in Brightspace once I am done with them, and will update this page.
The due date for Project 2 remains the same. However, I will allow changes to your Project 2 (based on feedback from Project 1) until Monday, Feb 26. The basics must be implemented by the original due date.
Overall Feedback
host devops
, and indentation is not required. I did not know this before grading your exercise (and had to look it up) However, not using the given form, e.g., Host devops
, and not indenting will lead to unnecessary confusion, and with some configuration files, the wrong result.Agenda
Exercise 23: DevOpsComplexity CMake III
Follow along and duplicate my changes to the CMake for the DevOps Complexity program.
Exercise 28: Docker: Build from Local Files
In an asciinema screencast, show using Docker to build from a local file. This can be any code.
Make sure to time how long the build takes (after a make clean
).
Exercise 29: Docker: Build Using Another Architecture
In an asciinema screencast, show using Docker to build a local file from another architecture. So if you are on amd64 (x86), build on arm64, and if you are on arm64 (Apple Silicon), build on amd64.
Make sure to time how long the build takes (after a make clean
).
In your screencast, echo how much longer it takes as a ration (10x longer, etc.)
All exercises are due by 4:30 pm on Monday, Feb 26
Week 5 Class 10 Thu Feb 15 Posted: Feb 15
After Class
Project 1
I posted my current version of feedback for Project 1 in your GitHub repository. It is in the branch feedback in the file Report.md. Best to view it on GitHub.
If you can use gh browse
, then you can go directly to it:
gh browse --branch feedback Report.md
If you are using WSL and gh browse
cannot open a browser, then you should try to fix that. You are in a DevOps course, and fixing stuff like that is common.
I will post scores in Brightspace once I am done with them, and will update this page.
The due date for Project 2 remains the same. However, I will allow changes to your Project 2 (based on feedback from Project 1) until Monday, Feb 26. The basics must be implemented by the original due date.
Announcements
Exercise 17: Entropy
This exercise is optional for CPSC 489 students, but required for CPSC 589 students.
Write a 1 page PDF that explains the relationship between the number of words in a Diceware password, the number of bits of entropy, and the estimated time it would take to break the password. For the estimated times, provide a reference or the calculation used.
End the paper with an argument for what length of Diceware password to use.
Upload the paper to Brightspace. This is due by 11:59:59 on Thu Feb 15.
Agenda
Exercise 24: SSH Config
Create your .ssh/config if you haven't already on your local machine.
Make sure it has a Host of devops which handles the devops server IP address, your username, and agent forwarding. If on macOS, customize it to your O.S.
Copy the .ssh/config from your local machine to the devops server in the same location:
scp ~/.ssh/config devops:.ssh/.
Verify on the devops server that the file copied and the contents are the same:
ssh devops tree -a
ssh devops cat .ssh/config
Note that the tree
command does not have to be installed on your local machine. You are running these commands on the devops
server where they are installed.
Create an asciinema screencast of applying the command rmcomment
to some source code.
However, in this case, the command will not be on the devops server, but in a Docker container.
Do not log into the devops server, but use the docker command as part of a pipe.
docker run -i mlcollard/srctools rmcomment
Exercise 23: DevOpsComplexity CMake III
Follow along and duplicate my changes to the CMake for the DevOps Complexity program.
All exercises are due by 4:30 pm on Wednesday, Feb 21
Project 2: CMake Posted: Feb 15
The application code is the same as for Project 1. The difference is that you will create a CMake build version.
Make sure to include the following:
all
targetrun
targetcheck
target that uses the demo file-O3
optimizationYou will work on the project in a branch called cmake
. Create a branch of the current code:
git switch -c cmake
git push
The git push
will have an error message. Follow what it says.
Then, delete the Makefile
from the cmake branch (not from the main branch):
git rm Makefile
Commit and push as always.
The project is due 11:59:59 pm on Thursday, Feb 22
Week 5 Class 9 Tue Feb 13 Posted: Feb 13
After Class
chfn
now works.Announcements
Exercise 17: Entropy
This exercise is optional for CPSC 489 students, but required for CPSC 589 students.
Write a 1 page PDF that explains the relationship between the number of words in a Diceware password, the number of bits of entropy, and the estimated time it would take to break the password. For the estimated times, provide a reference or the calculation used.
End the paper with an argument for what length of Diceware password to use.
Upload the paper to Brightspace. This is due by 11:59:59 on Thu Feb 15.
Agenda
Exercise 21: passwd
mkpasswd
passwd
Create an asciinema screencast of applying the command rmcomment
to some source code.
Do not log into the devops server, but use the ssh command as part of a pipe.
Exercise 23: DevOpsComplexity CMake III
Follow along and duplicate my changes to the CMake for the DevOps Complexity program.
All exercises are due by 4:30 pm on Wed Feb 14
Week 4 Class 8 Thu Feb 08 Posted: Feb 08
After Class
Crossword answers that I did not specifically mention in class:
Announcements
Diceware
SSH Public Key
ssh-ed25519
and the suffix with your username or comment. Make sure you entered the complete key in the form.ssh-keygen
do that. Why? You need to create things with the proper permissions. If you use mkdir
to create the directory, you have to look up what permissions to make it. If you let ssh-keygen
create it, then it uses the proper permissions.ssh-keygen
, especially when you are first using the command. Some of you did not use the default key filenames, and the ones you created are non-standard and not particularly good.Agenda
Exercise 17: Entropy
This exercise is optional for CPSC 489 students, but required for CPSC 589 students.
Write a 1 page PDF that explains the relationship between the number of words in a Diceware password, the number of bits of entropy, and the estimated time it would take to break the password. For the estimated times, provide a reference or the calculation used.
End the paper with an argument for what length of Diceware password to use.
Upload the paper to Brightspace. This is due by 11:59:59 on Thu Feb 15.
Exercise 19: Login
If you provided your SSH Public Key before the due date, your key is installed in your account on the devops server.
Your username is the your UA id (email without the @uakron.edu, e.g., jdoe1@uakron.edu has the account name jdoe1
The devops server IP address is on Brightspace.
Exercise 20: DevOpsComplexity CMake II
Follow along and duplicate my changes to the CMake for the DevOps Complexity program.
All exercises are due by 4:30 pm on Fri Feb 09
Week 4 Class 7 Tue Feb 06 Posted: Feb 06
After Class
ssh-ed25519
and the suffix with your username or comment. Make sure you entered the complete key in the form.Announcements
Agenda
Create a 6-word diceware password. For each word, show the random numbers generated, and the equivalent word from the word list. Then show the entire 6-word diceware password.
Notes:
Enter this data using the form in the link of the exercise.
Exercise 15: SSH Key Generation
In a UNIX environment (Linux, macOS, GitHub Codespaces) perform the following steps:
Create an asciinema screencast, and upload the (proper) URL.
Fill in the form in the link of this exercise with the SSH public key you will use from your shell. This can be from WSL, Linux, or macOS.
Make sure that this public key is installed in the machine/shell you will be using to access a remote server.
Exercise 13: DevOpsComplexity CMake
Follow along and duplicate my changes to the CMake for the DevOps Complexity program.
This is a different repo than the one we used for Make. Invitation link in GitHub.
All exercises are due by 4:30 pm on Wed Feb 07
Project 1: Makefile Posted: Feb 6
The decompressor is a universal decompressor that uses libarchive to convert a compressed and archived file to the original content. If the compressed file is an archive with multiple entries, the output entries are separated by ASCII NULL ('\0'). The input formats are shown on the libarchive formats.
Create a Makefile and associated files to build the Decompressor project. Make sure to include the following:
all
targetrun
targetcheck
target that uses the demo file-O3
optimizationNotes:
Week 3 Class 6 Thu Feb 01 Posted: Feb 01
Announcements
git
issues from last classAgenda
CMake
Exercise 11: Dance
Follow along and duplicate my changes to the CMake for the Dance program.
Exercise 12: Dance Dance Dance
An optional exercise to improve the dancing in the Dance program. This involves either increasing the number of frames, the dance moves, or the number of dancers.
To implement this exercise, improve the dance program in your repository. Then tag the commit with the commands:
As with all tags, verify on GitHub that the tag appears. This is a totally optional exercise, and credit will be given based on the quality of the result.
All exercises are due by 4:30 pm on Mon, Feb 5
Week 3 Class 5 Tue Jan 30 Posted: Jan 30
After Class
There are some commits for the Git source code that cause compilation problems. To get around this, try just building for the executable git
, not all the other stuff. To do so (with a parallel build):
The srcml/codespaces image (used in GitHub Codespaces) did not have autoconf
nor autoheader
installed. I updated the image so that they are installed. If you have a running codespace, delete it and start another one to get the newer image.
For WSL/Linux some packages need installing. From a base Ubuntu 22.04 image, install the following:
For macOS: brew install autoconf
Announcements
Choices
Agenda
Exercise 6: Makefile
Follow along and duplicate my changes to the Makefile for the DevOpsComplexity program.
GNU Autotools (GNU Build System)
The make
utility needs help
autoheader
- Generates config fileautoconf
- Generates configure
scriptconfigure
- Generated by above, custom script for that buildExercise 8: HelloWorld Autotools
Build and run the HelloWorld program. The steps are:
To demonstrate this, you will record a terminal session using asciinema. It records the commands you enter and the output the command produces. asciinema
is already installed in the GitHub Codespaces image. You can also install asciinema on Linux/WSL/macOS.
asciinema
is relatively straightforward to use.
You can play, pause, skip, etc. You can also copy the commands as text. Note that the replay even includes your pauses and any delay as the command is run.
At the end of the terminal session, asciinema
will show a URL. Anybody can use this URL to view the session. This is what you will submit for the exercise to the link in the exercise title. The URL should not contain "connect" or be a local file. Test your URL in a browser; an incorrect URL will receive a 0.
Build and run the Git program. The steps are:
git
program running. Note that the executables are put in the same directory, so it is ./git
As in Exercise 8, show this in an asciinema screencast and submit via the link of this exercise.
All exercises are due by 4:30 pm on Wed Jan 31
Week 2 Class 3 Tue Jan 23 Posted: Jan 23
Agenda
All exercises are due by 4:30 pm on Wed Jan 24
Week 2 Class 3 Tue Jan 23 Posted: Jan 23
After Class
Announcements
Agenda
Exercise 6: Makefile
Follow along and duplicate my changes to the Makefile for the DevOpsComplexity program.
GitHub Codespaces is enabled for all repositories.
Commit these changes to the your GitHub repository. Link to create your repository is available in Brightspace.
Note If the file srcMLPathCount_t.cpp is in your repository, then it needs to be deleted. First, remove the file:
Then commit with the following commit message (use copy/paste):
Then push the commit.
Note We did not get to this yet, so this exercise is delayed.
Keep a list of the shell commands that I show in class. After class, submit this list using the link of this exercise.
The list is in the form of one command per line, with the command name and a short description separated by a comma.
All exercises are due by 4:30 pm on Monday, Jan 29
Week 1 Class 2 Thu Jan 18 Posted: Jan 18
Announcements
DevOps Tools Survey
Agenda
All exercises are due by 4:30 pm on Fri Jan 19
Week 1 Class 1 Tue Jan 16 Posted: Jan 16
Announcements
GitHub We use GitHub and GitHub Classroom in the class to manage source code for projects, exercises, and examples. You are required to have a GitHub account.
Optionally, you can apply for the Student Github Developer Pack and get a free GitHub Pro account. To apply, your account email can be a school account, or a personal account if you upload documents to prove your current enrollment status.
O'Reilly Online Learning The course textbook is available in O'Reilly Online Learning.
You do not have to be on the campus network (e.g., via VPN) to access O'Reilly Online Learning.
To access content, click the "Institution not listed?" link below the dropdown and enter your UA email. You will then create an account and use that account from now on.
For more information: Library LibGuide
Exercises
All exercises are due by 4:30 pm on Wed Jan 17
Greetings and welcome to CPSC 489/589 DevOps for Spring 2024.
GitHub We use GitHub and GitHub Classroom in the class to manage source code for projects, exercises, and examples. You are required to have a GitHub account.
Optionally, you can apply for the Student Github Developer Pack and get a free GitHub Pro account. To apply, your account email can be a school account, or a personal account if you upload documents to prove your current enrollment status.
See you on Tuesday, Jan 16 at 2:00 pm - 3:15 pm in (CAS) room 134