No Rest for the Wicked
Tags: opensource, beginners
Published: 2022-03-12 01:45:21

It's been a couple weeks since my last blog on account of last week being reading week. For me, it felt like any other weak because instead of going to class's I just did more work, and I still had to do school work as well so that I don't fall behind. Such is life.

## Setting up the Registry

The moment has finally come. As I write this the final piece of the puzzle has just landed for setting up our docker image registry.

![Commit History](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/re4xdkzfc7d0qw7b2ag6.png)
 

This has been where all of my attention has been going for this course over the past couple of weeks. I started it off by drafting up an initial version of how I thought the registry files should look. 

After getting a bunch of input and making a similar amount of adjustments it was time to test it out. In order to do that I had to set up an `ssh` connection with the hard drive we are using for our physical storage. 

I had some issues with that. I first gave the professor an ssh key that I had generated a wile back so that he could add me as a user. I tired to connect to the box using `moba Xterm` which is an ssh client i had been using for work, but for some reason it would not allow me to connect to the box. After trying that, I asked for some assistance and found that it was likely because the key was not being read. 
![ssh help](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9a35q9ev30w3plabyv4n.png)
 
I went back to ol reliable `ssh client` that I had been using for school on the recommendation of one of the best professors I had at Seneca Les Czegel (R.I.P :cry: ). After playing around with the configuration I thought I had it figured out for sure, but it still wouldn't let me connect. So I then generated another key, this time right from my `ssh client`'s built in interface, and asked Dave to add that key as a user since I thought the other key was faulty (of course it's not my fault). Once he added that key as another user, I attempted to connect again...and it didn't work, again. I finally bit the bullet and downloaded PUTTY, and followed the instructions Dave had linked me in the picture above and it worked like a charm, with the original key that I had wanted to use.

Okay, great. Now that I was finally connected into the box it was time to fire up the registry. With a little help from Josue I was able to fire up the registry and push an image to it!

![tested](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pr7odjqnralw4qonadbl.png)
 
There was another couple of small changes to make before landing the initial files. There was also some follow up issues that needed to be created. 

## Teaming up on the Authorization

The main follow up issue that was created was the last piece of the puzzle needed in order to get the registry officially up and running.

![Issue](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/st6womrw3s2pigf7y720.png)
 
Throughout this process Kevan has been interested in it and following along with it. He asked me if I had started on the auth stuff yet and I hadn't. He then asked a question in Slack that lead me to believe that he was looking into the issue.

![Question](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ssww0ia41m5mkb2zd2pm.png)
 
I had a registry file in the first version of the registry files but did not land it because it was not being used at that point. the registry config was needed however for the auth process. As you can see in the screengrab, I had offered to send a PR up to get the ball rolling and to start the collaboration process. Luckily, before I had started the process Kevan had informed me that he already had something started, and then there was this little exchange on Slack which was nice to hear.

![learning outcome](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hvs2f7s4jfjsgebjqxic.png)
 
So after Kevan got his PR up, I then made a PR to his fork with the missing registry file and a couple of other minor adjustments. In the end, there where three of us that contributed to the one commit.

![triple header](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rf5nvp3w5nzdj7uzlt0m.png)

This was a great learning experience. I got to build a self hosted Docker registry from the ground up. I feel like I have a lot better understanding of how these dockerfiles and config files, work together and what a volume actually is. It also makes me sad that all of my professional option level courses will be done after this semester. I wish I had known Dave had a cloud computing course before I took the Azure course I am taking. He touches on all this, real world applicable, information in that course apparently.