Jack Moore

Email: jack(at)jmoore53.com
Project Updates

Remap Blogs

01 Mar 2019 »

Background

I use jekyll for both the devops blog and company blog and up until recently I started to notice how technical the company blog posts were and how regular the devops’s blog posts were so this is an attempt to switch the sites with file changes, DNS changes, gitlab & git changes, and pipeline & deploy changes essentially swapping the sites.

It would have been much easier to manage this had I recognized the problems from the beginning, but hindsight is 20/20 and the sites are still very much in their infancy. This change will force me to really understand the full stack of the applications and everything the sites work with. I recognize a simple DNS change and some simple HTML changes could solve the problem, but it doesn’t provide the full solution I want.

This post covers the parts of the stack I touched and modified, from the server up.

Server

I am temporarily taking the two sites down and mapping them to the company’s landing page. This isn’t the greatest way to do these changes, but it works. Any bigger and I would have made a temporarily down page.

As a TODO: I may create a stock 503 Server Page just to put in NGINX while maintenance is being completed.

AWS’s CodeDeploy & CodePipeline

I originally planned to change the names of these, but realized that I could just change the Gitlab Webhook links and the same results would show.

I ended up not modifying anything in CodeDeploy or CodePipeline. This saved me many hours and many headaches.

Gitlab & Git

In Gitlab, I unprotected the master branches and then changed the remote origins on the local machines using git remote set-url origin https://here and then ran a forced push to master to update the gitlab repo. This was done with git push origin master -f. Everything committed properly and was looking good from the application side.

Folder Names on Dev Boxes

After getting git configured, I changed the name on my local machines to match the repos in gitlab to reduce confusion. This would have been a problem had multiple developers been working on the sites with me. I would have had to made server side changes and changes more upstream.

Appspec Scripts & Config

The force push to master didn’t solve my problems because the sites were still being deployed to the older locations. I changed this by modifying the start_server.sh and the reload_server.sh. This ensured the websites were deployed to their correct locations.

Site HTML

I updated the names in the config.yml and I also updated the about pages as well as the other locations where the blog names had changed. I am manually checking the sites to see what changes need to be made in the HTML.

Conclusions

This was very easy to do considering these are solo developed sites and I manage the entire stack. This project could have run into many hiccups had the sites been worked on by many developers. I would have had to have gone all the way down the stack to the server to manually reconfigure everything, but I found a hackier version of the fix that worked for me.

© Jack Moore - This site was last built Fri 30 Aug 2024 12:31:24 PM EDT