#Sitecore #Docker Containers Syncing Database Changes the Lazy Way

I have been using Docker/Containers for about six months. I have to tell you I really like using them. A recent project I am helping architect the solution for I decided to have the other developers use them. There were some hiccups along the way getting some developers setup, but so far it has worked out well. I think I convinced them change is good.

Ted Lasso Memes At Your Service!

Anyway one of the things I have learned is how easy it is to deploy things to containers. One of them being databases. Normally you would install Sitecore and serialize items or use Sitecore packages for changes. We are doing that. However we had multiple sites/tenants to create in SXA and wanted to make sure the team was in sync from the start. With the out of the box Sitecore tools for Docker it is easy to do.

If you look into your docker\data\mssql folder (could be a different folder depending how you setup your volume, but in this case I am using the default) you will find the ldf and mdf files for each Sitecore database. Just copy the ones for the database you want to share and put it in a shared folder for other developers. I actually stored them in Teams.

The developer who is installing the database should do a docker-compose down first. Then copy the database files to their local data\mssql folder. Once they are a copied to the other developer’s local data\mssql folder they will need to do a docker-compose up. Now they will have the same database changes as the other developer for their containerized Sitecore instance. BTW inside the mssql image you can view the database files.

So what happened? Was it magic? Well if you think PowerShell is magic then it was. As with custom web changes databases are also deployed into the images using the built in Sitecore tools. So as soon as the files are copied the watcher does its thing.

So one catch with this that I noticed recently. If you clean out your Docker Data\Deploy folders by running something like the clean.ps1 script it clears out the data\mssql folder. Which means the database changes could be lost. I will look for a workaround for this, but one thing that I did was create a clean script that keeps the database folder contents. See below for an example:

# Clean data folders
Get-ChildItem -Path (Join-Path $PSScriptRoot "\docker\data") -Directory | ForEach-Object {
    $dataPath = $_.FullName

    Get-ChildItem -Path $dataPath -Exclude ".gitkeep", "license.xml", "*.ldf", "*.mdf" -Recurse | Remove-Item -Force -Recurse -Verbose
}

# Clean deploy folders
Get-ChildItem -Path (Join-Path $PSScriptRoot "\docker\deploy") -Directory | ForEach-Object {
    $deployPath = $_.FullName

    Get-ChildItem -Path $deployPath -Exclude ".gitkeep", "license.xml", "*.ldf", "*.mdf" -Recurse | Remove-Item -Force -Recurse -Verbose
}

I will update this blog post I am sure as things evolve with Docker/Containers, but I hope for now this will give one way to share database changes. If you have a better way I would love to know.

#Sitecore Milwaukee In Person Meetup Impressions and Pictures

My favorite Sitecore meetup has been the Milwaukee since I attended my first one. After a long time off a new one was going to be put on by Mike Congdon and Joe Ouimlet. It would take place at Milwaukee Tool. I asked them if they needed a presenter and was honored to be picked. They even got me a six pack of Spotted Cow for speaking. It was worth the 2+ hour drive just for that. 🙂 You can find the full video of the meetup here.

The first speaker was Geoff Morgeene from Milwaukee Tool. Geoff shared tricks and gotchas from using the Sitecore Powershell extension. I learned a lot on his presentation and will definitely use his ideas.

Geoff Morgeene presenting.

The second speaker was me, talking about using Content Hub and webmethods.io. You can check out a few videos on YouTube of me presenting this. If you would like me to present at your meetup let me know.

Look at all those awesome tools.
Joe getting things ready.

Looking forward to the next one.

Working Remote. Tips from a Veteran Basement Warrior

I have been working remote for a long time and with the current events going on, I thought I would share some of my advice I learned along the way. Everyone is different so not everything I do will work for everyone. I am always tweaking things myself. A happy workplace = happy working. So, here are my top tips.

Get Your Dream Desk. A Sit/Stand Desk Perhaps

I always wanted the desk my old boss had. It was one of the nicest desks I have seen. When I started working remote, I end up purchasing something similar. However, with the stand-up desk movement I added a conversion for it. My tastes have changed since then and I wouldn’t go back to a traditional desk. I am in the process of upgrading my desk now. I wanted to go for a clean look and a sit/stand desk with a motor. I also ended up upgrading my chair to an ergonomic stool. You can find lots of YouTube videos on the clean look or you can always just go for a traditional look. Either way find something that makes you happy. This is the site where I got my current ergonomic stool has free fast shipping and desk that is on its way. Check out Autonomous here.

Get Out of the House

This could be going to the store, meeting up with a group to exercise, going to the gym etc.… It also could mean going out your front door and sitting on the porch for ten minutes. That fresh air will do you good.

Meetups

Find out where professional meetups are in your area and try to attend. If you don’t have one, maybe start one. I attend Sitecore meetups in Chicago and Milwaukee. I have also spoke virtually at meetups. It is a great way to make connections and friends.

Exercise

This is so important. You could run before working in the morning, go to the gym at lunch, take a bike ride, walk the dog etc.… Just get out there and take care of you.

Good Internet Connection and Strong Signal

This is important. Communication and productivity are key when working remote. Without a good internet connection with fast speeds you will run into many issues. Also, your Wi-Fi should reach the whole house. I highly recommend a mesh system instead.

Tweak Your Office

The nice thing about working from home is you can make your office the perfect setting. Tastes change. You get sick of looking at the same stuff or using the same electronics. You can try something new and mix things up. Paint your office or rearrange your desk. Whatever you do it is your choice.

Use Your Webcam

I know a lot of times you don’t want to be seen, because you may be in your pajamas. However, it is nice to get a face with the people you are talking to. I attend a virtual Sitecore lunch every Friday and we have our webcams on. It is fun to talk about our different backgrounds and put a name to a face.

Switch Office Places

Sometimes you need a change of scenery. Go to the coffee shop or library sometimes. Or maybe just sit on a recliner. This a big advantage you have working remote that you couldn’t do working in a company office. Can you imagine leaving and going to a coffee shop before you were remote?

Comfortable Footwear

I have gone through my fair share of slippers. Not a lot of good quality ones so they don’t last long, but they were fun to try. I had a running injury a while back and now I just use shoes. You should wear whatever you are comfortable in.

Dress Professional Sometimes

Believe it or not I miss some of the days of dressing nice for the office. I am not talking about formal wear, but business casual. Occasionally wear something you would wear in the office. It always feels good to dress the part.

Virtual Meetings

I briefly touched on this above. Meeting with co-workers, clients, professionals in the same are of work as you are great ways to keep connecting to the outside world. Most clients will already have virtual meetings, but that does not mean you can’t do lunch and learns with them and your co-workers.

Talk Off Topics with Your Co-Workers

Slack and Microsoft Teams are just a few of the ways to talk to your co-workers. Most modern companies are already are using these tools. Why not use it to talk about stuff you would normally share around a water cooler?

Use a Trackball Instead of a Mouse

This is my personal favorite. Trackballs have been around for a long time and don’t get the recognition they deserve. I am not a fan of using a touchpad or mouse. Trackballs are ergonomic, don’t take up a lot of space, easily portable and they are one of the neatest gadgets. Nobody can judge you for using one when working remote.

Keep Your Office Clean

You don’t have a cleaning crew usually working at your home office. So, you are it. I just threw away a ton of garbage in my office. Stuff like cables and paper (recycled what I could). Don’t be like me. Throw it away or recycle anything you can that you won’t probably need.

Work the Hours You Would Work in an Office

This is a given for most companies, but you may be tempted to work at different times throughout the day. I know there are different situations, but keeping to the 8-9 hour work days really helps make the remote situation more like you are in the office. Also, most people are available from 8-5, 9-5 etc.… Keep in mind time zones come into play, but more than likely the communication will be better when things are not off hours. Now of course these days working remote almost feels like you are always around. Which is true in a way. You will find yourself working off the clock more than when you are in a n office. Sometimes though you need to shut it off, so you are ready for the next workday.

I will update this blog as I think of new things and updates. For the ones who are new at this you will get the hang of it. If you have any questions don’t hesitate to ask.

#Sitecore #SCHackathon 2020 Team Sitecore Daredevil (My solo adventure.)

This was my fourth year competing in the Sitecore Hackathon. This year was a little different for me though. As I had to go in it alone. I am not going to lie; I was a little nervous doing this solo. I thought hey I will try and do what I can, but if after a few hours if I just don’t get it, I will be done. After all I had a lot going on as early in the morning, I would have to stop to do Dad duty. However, this experience made me better and I even discovered some things about myself. So, here is the play by play and what I learned along the way.

Pre-Planning

The last three years I learned a lot of how to prepare as much as I could. You can check out those experiences here. I learned my lesson in the past to install Sitecore beforehand. This year it was the latest version 9.3. Also learned to make sure I had access to my GitHub repo and to download the solution. All good there.


Hours 1-2

For some reason I did not get the topics emailed to me, but that didn’t stop me. I went on Slack to the Hackathon channel and one of the judges sent me them. I looked them over and my first thought was I need a team to do this.

Task were something like this (had to choose just one):

  • Create a meetup website.
  • Create a new site for Sitecore modules.
  • Create a new Hackathon website.

You see these tasks kind of needed a front-end developer to make it look pretty. Not that I can’t do front-end work, but not one of my strengths. However, I was in the same boat as others as I found out in Slack. So, functionality first then I will make it look as pretty as possible. I did need to envision the screen either way and I sketched out something for the meetup website task. Then after an hour of research I said no. I saw someone post in Slack about the KISS (keep it simple stupid) method. One of the best coding philosophies ever. So from the past I have learned go for the path with the least resistance and make it work. I chose to do the Hackathon website. I had ideas on how to make it better and utilize Sitecore out of the box. Just pure raw Sitecore is all I needed.

Hours 3-10

Did I ever mention I have run over ten marathons? If I could do that maybe I could do this I thought. Well in the words of Forrest Gump I was running. Except replace running with coding. Well to be honest I created the templates, layouts and content for the first few hours. Does that count as coding? I had a vision on how I could make the site easy to maintain. I want to mention that I used the icon Sitecore searcher. Thank you Gabrial Streza.

After creating the initial Sitecore stuff it was time to fire up Visual Studio and start integrating. I coded away. With each hour that went by I got a little further. In fact, I didn’t want to stop. I finally got to a point where I had to as I had to make a two-hour drive round trip and be on Dad duty at a sporting event.

Not going to lie. At this point I was really wishing I had a team. When you know you will have to go on little sleep the next day it is good to have someone there with you that you can tag in. Fortunately, just going on Slack helped me feel a little more supported.

Hours 11-13

I slept. Also dreamed about the Hackathon.

Hours 14-19

Drove and went to one of my kids sporting events. Thought about the Hackathon while there and if I will get the documentation done on time. Drove home and then I was back at it.

Hours 20-23

Finish up the code and make the screen look pretty as possible. Okay looks like the 90’s front-end and Netscape only compatible, but the functionality and my vision are there. Let’s package it up. Update the Readme file with installation instructions and screen shots. Okay got that. Now I must do a video. The part I was dreading the most. It was like when Scrooge was going to meet the ghost of Christmas future. So, after trying a few things decided what the heck time to buy Snagit. In one take I had my video. Checked in code and double checked it and checked it in a few more times to make sure it was perfect. Viewed the readme file which contained installation instructions, screen shots, package link and video link. Alright time to call it a day.

Lessons Learned This Year (short list this year)

  • Functionality first. I always knew this, but most of the time with Sitecore projects I prefer the screens done first.
  • Buy Snagit. It is worth every penny.
  • Do a clean install of the package. Not that it would fail, but I am thinking next year have another vanilla Sitecore site at the standby.

Summary

I have to say no matter what happens. I learned a lot about myself and gained some confidence I felt I have been missing. In 24 hours I got to be an architect, lead developer, senior developer and entry level developer. Others may not always believe in you and support you, but for sure you must be your own biggest cheerleader.

#Sitecore October 2018 Chicago Meetup Impressions

This was the second Sitecore meetup this year. This one was at a different location. It was at Productive Edge in downtown Chicago. It was a scenic walk from the train. The office itself was setup nice. A lot of the attendees will be at the Sitecore Symposium, so it was nice to connect with them. We also used the Symposium app scan on the network menu to connect with each other. Of course, they had my favorite pizza, Lou Malnati’s.

The first presentation was a joint effort by Ryan Kuchler and Will Rolloff. This covered Context Marketing from both a marketer’s point of view and developers’ point of view. One of the things I believe that are overlooked by clients after a Sitecore site is complete is the powerful marketing tools that are in Sitecore.

Summary of topics:

  • Marketers – Get to know Context Marketing and deliver personalization to your audiences with out of the box Sitecore features and configurations – Today!
  • Developers – Architect and deploy the right application components that enable the business to drive context marketing and scaling it to meet your organizations needs using Microsoft Azure

They did an excellent job presenting and it was the best presentation I have seen on Context Marketing. I walked away with much more specific understanding on how all the different pieces worked. I especially liked the parts were previous versions of a page were compared to a new page, setting the score for each campaign and swapping out presentations based on visits. I will be using this information in the future.

Last, but not least Will presented tips for first time Symposium attendees. I wish I had these for my first Symposium. Even so it being my second Symposium coming up I still learned a few things.

One thing he forgot to mention. Take all the Sitecore bling you can with you.